-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1641 from demergent-labs/remove_candid
Remove candid
- Loading branch information
Showing
17 changed files
with
407 additions
and
329 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,30 @@ | ||
type User = record { | ||
id: principal; | ||
createdAt: nat64; | ||
recordingIds: vec principal; | ||
username: text; | ||
}; | ||
|
||
type Recording = record { | ||
id: principal; | ||
audio: blob; | ||
createdAt: nat64; | ||
name: text; | ||
userId: principal; | ||
}; | ||
|
||
type AudioRecorderError = variant { | ||
RecordingDoesNotExist: principal; | ||
UserDoesNotExist: principal; | ||
}; | ||
|
||
service: () -> { | ||
createRecording: (vec nat8, text, principal) -> (variant {Ok:record {id:principal; audio:vec nat8; userId:principal; name:text; createdAt:nat64}; Err:variant {RecordingDoesNotExist:principal; UserDoesNotExist:principal}}); | ||
createUser: (text) -> (record {id:principal; username:text; recordingIds:vec principal; createdAt:nat64}); | ||
deleteRecording: (principal) -> (variant {Ok:record {id:principal; audio:vec nat8; userId:principal; name:text; createdAt:nat64}; Err:variant {RecordingDoesNotExist:principal; UserDoesNotExist:principal}}); | ||
deleteUser: (principal) -> (variant {Ok:record {id:principal; username:text; recordingIds:vec principal; createdAt:nat64}; Err:variant {RecordingDoesNotExist:principal; UserDoesNotExist:principal}}); | ||
readRecordingById: (principal) -> (opt record {id:principal; audio:vec nat8; userId:principal; name:text; createdAt:nat64}) query; | ||
readRecordings: () -> (vec record {id:principal; audio:vec nat8; userId:principal; name:text; createdAt:nat64}) query; | ||
readUserById: (principal) -> (opt record {id:principal; username:text; recordingIds:vec principal; createdAt:nat64}) query; | ||
readUsers: () -> (vec record {id:principal; username:text; recordingIds:vec principal; createdAt:nat64}) query; | ||
createUser: (text) -> (User); | ||
readUsers: () -> (vec User) query; | ||
readUserById: (principal) -> (opt User) query; | ||
deleteUser: (principal) -> (variant { Ok: User; Err: AudioRecorderError }); | ||
createRecording: (vec nat8, text, principal) -> (variant { Ok: Recording; Err: AudioRecorderError }); | ||
readRecordings: () -> (vec Recording) query; | ||
readRecordingById: (principal) -> (opt Recording) query; | ||
deleteRecording: (principal) -> (variant { Ok: Recording; Err: AudioRecorderError }); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,46 @@ | ||
type rec_441 = record {id:text; username:text; threads:vec record {id:text; title:text; author:rec_441; posts:vec rec_440}; posts:vec rec_440; reactions:vec record {id:text; post:rec_440; author:rec_441; reactionType:variant {Fire; ThumbsDown; ThumbsUp}}}; | ||
type rec_443 = record {id:text; username:text; threads:vec record {id:text; title:text; author:rec_443; posts:vec rec_440}; posts:vec rec_440; reactions:vec record {id:text; post:rec_440; author:rec_443; reactionType:variant {Fire; ThumbsDown; ThumbsUp}}}; | ||
type rec_442 = record {id:text; username:text; threads:vec record {id:text; title:text; author:rec_442; posts:vec rec_440}; posts:vec rec_440; reactions:vec record {id:text; post:rec_440; author:rec_442; reactionType:variant {Fire; ThumbsDown; ThumbsUp}}}; | ||
type rec_440 = record {id:text; text:text; author:rec_441; thread:record {id:text; title:text; author:rec_443; posts:vec rec_440}; reactions:vec record {id:text; post:rec_440; author:rec_442; reactionType:variant {Fire; ThumbsDown; ThumbsUp}}}; | ||
type rec_485 = record {id:text; username:text; threads:vec record {id:text; title:text; author:rec_485; posts:vec rec_484}; posts:vec rec_484; reactions:vec record {id:text; post:rec_484; author:rec_485; reactionType:variant {Fire; ThumbsDown; ThumbsUp}}}; | ||
type rec_487 = record {id:text; username:text; threads:vec record {id:text; title:text; author:rec_487; posts:vec rec_484}; posts:vec rec_484; reactions:vec record {id:text; post:rec_484; author:rec_487; reactionType:variant {Fire; ThumbsDown; ThumbsUp}}}; | ||
type rec_486 = record {id:text; username:text; threads:vec record {id:text; title:text; author:rec_486; posts:vec rec_484}; posts:vec rec_484; reactions:vec record {id:text; post:rec_484; author:rec_486; reactionType:variant {Fire; ThumbsDown; ThumbsUp}}}; | ||
type rec_484 = record {id:text; text:text; author:rec_485; thread:record {id:text; title:text; author:rec_487; posts:vec rec_484}; reactions:vec record {id:text; post:rec_484; author:rec_486; reactionType:variant {Fire; ThumbsDown; ThumbsUp}}}; | ||
type rec_483 = record {id:text; text:text; author:rec_480; thread:record {id:text; title:text; author:rec_480; posts:vec rec_483}; reactions:vec record {id:text; post:rec_483; author:rec_480; reactionType:variant {Fire; ThumbsDown; ThumbsUp}}}; | ||
type rec_481 = record {id:text; text:text; author:rec_480; thread:record {id:text; title:text; author:rec_480; posts:vec rec_481}; reactions:vec record {id:text; post:rec_481; author:rec_480; reactionType:variant {Fire; ThumbsDown; ThumbsUp}}}; | ||
type rec_482 = record {id:text; text:text; author:rec_480; thread:record {id:text; title:text; author:rec_480; posts:vec rec_482}; reactions:vec record {id:text; post:rec_482; author:rec_480; reactionType:variant {Fire; ThumbsDown; ThumbsUp}}}; | ||
type rec_480 = record {id:text; username:text; threads:vec record {id:text; title:text; author:rec_480; posts:vec rec_483}; posts:vec rec_481; reactions:vec record {id:text; post:rec_482; author:rec_480; reactionType:variant {Fire; ThumbsDown; ThumbsUp}}}; | ||
type rec_547 = record {id:text; text:text; author:rec_544; thread:record {id:text; title:text; author:rec_544; posts:vec rec_547}; reactions:vec record {id:text; post:rec_547; author:rec_544; reactionType:variant {Fire; ThumbsDown; ThumbsUp}}}; | ||
type rec_545 = record {id:text; text:text; author:rec_544; thread:record {id:text; title:text; author:rec_544; posts:vec rec_545}; reactions:vec record {id:text; post:rec_545; author:rec_544; reactionType:variant {Fire; ThumbsDown; ThumbsUp}}}; | ||
type rec_546 = record {id:text; text:text; author:rec_544; thread:record {id:text; title:text; author:rec_544; posts:vec rec_546}; reactions:vec record {id:text; post:rec_546; author:rec_544; reactionType:variant {Fire; ThumbsDown; ThumbsUp}}}; | ||
type rec_544 = record {id:text; username:text; threads:vec record {id:text; title:text; author:rec_544; posts:vec rec_547}; posts:vec rec_545; reactions:vec record {id:text; post:rec_546; author:rec_544; reactionType:variant {Fire; ThumbsDown; ThumbsUp}}}; | ||
type rec_549 = record {id:text; username:text; threads:vec record {id:text; title:text; author:rec_549; posts:vec rec_548}; posts:vec rec_548; reactions:vec record {id:text; post:rec_548; author:rec_549; reactionType:variant {Fire; ThumbsDown; ThumbsUp}}}; | ||
type rec_551 = record {id:text; username:text; threads:vec record {id:text; title:text; author:rec_551; posts:vec rec_548}; posts:vec rec_548; reactions:vec record {id:text; post:rec_548; author:rec_551; reactionType:variant {Fire; ThumbsDown; ThumbsUp}}}; | ||
type rec_550 = record {id:text; username:text; threads:vec record {id:text; title:text; author:rec_550; posts:vec rec_548}; posts:vec rec_548; reactions:vec record {id:text; post:rec_548; author:rec_550; reactionType:variant {Fire; ThumbsDown; ThumbsUp}}}; | ||
type rec_548 = record {id:text; text:text; author:rec_549; thread:record {id:text; title:text; author:rec_551; posts:vec rec_548}; reactions:vec record {id:text; post:rec_548; author:rec_550; reactionType:variant {Fire; ThumbsDown; ThumbsUp}}}; | ||
type rec_603 = record {id:text; text:text; author:rec_600; thread:record {id:text; title:text; author:rec_600; posts:vec rec_603}; reactions:vec record {id:text; post:rec_603; author:rec_600; reactionType:variant {Fire; ThumbsDown; ThumbsUp}}}; | ||
type rec_601 = record {id:text; text:text; author:rec_600; thread:record {id:text; title:text; author:rec_600; posts:vec rec_601}; reactions:vec record {id:text; post:rec_601; author:rec_600; reactionType:variant {Fire; ThumbsDown; ThumbsUp}}}; | ||
type rec_602 = record {id:text; text:text; author:rec_600; thread:record {id:text; title:text; author:rec_600; posts:vec rec_602}; reactions:vec record {id:text; post:rec_602; author:rec_600; reactionType:variant {Fire; ThumbsDown; ThumbsUp}}}; | ||
type rec_600 = record {id:text; username:text; threads:vec record {id:text; title:text; author:rec_600; posts:vec rec_603}; posts:vec rec_601; reactions:vec record {id:text; post:rec_602; author:rec_600; reactionType:variant {Fire; ThumbsDown; ThumbsUp}}}; | ||
type rec_457 = record {id:text; username:text; threads:vec record {id:text; title:text; author:rec_457; posts:vec rec_456}; posts:vec rec_456; reactions:vec record {id:text; post:rec_456; author:rec_457; reactionType:variant {Fire; ThumbsDown; ThumbsUp}}}; | ||
type rec_459 = record {id:text; username:text; threads:vec record {id:text; title:text; author:rec_459; posts:vec rec_456}; posts:vec rec_456; reactions:vec record {id:text; post:rec_456; author:rec_459; reactionType:variant {Fire; ThumbsDown; ThumbsUp}}}; | ||
type rec_458 = record {id:text; username:text; threads:vec record {id:text; title:text; author:rec_458; posts:vec rec_456}; posts:vec rec_456; reactions:vec record {id:text; post:rec_456; author:rec_458; reactionType:variant {Fire; ThumbsDown; ThumbsUp}}}; | ||
type rec_456 = record {id:text; text:text; author:rec_457; thread:record {id:text; title:text; author:rec_459; posts:vec rec_456}; reactions:vec record {id:text; post:rec_456; author:rec_458; reactionType:variant {Fire; ThumbsDown; ThumbsUp}}}; | ||
type rec_517 = record {id:text; username:text; threads:vec record {id:text; title:text; author:rec_517; posts:vec rec_516}; posts:vec rec_516; reactions:vec record {id:text; post:rec_516; author:rec_517; reactionType:variant {Fire; ThumbsDown; ThumbsUp}}}; | ||
type rec_519 = record {id:text; username:text; threads:vec record {id:text; title:text; author:rec_519; posts:vec rec_516}; posts:vec rec_516; reactions:vec record {id:text; post:rec_516; author:rec_519; reactionType:variant {Fire; ThumbsDown; ThumbsUp}}}; | ||
type rec_518 = record {id:text; username:text; threads:vec record {id:text; title:text; author:rec_518; posts:vec rec_516}; posts:vec rec_516; reactions:vec record {id:text; post:rec_516; author:rec_518; reactionType:variant {Fire; ThumbsDown; ThumbsUp}}}; | ||
type rec_516 = record {id:text; text:text; author:rec_517; thread:record {id:text; title:text; author:rec_519; posts:vec rec_516}; reactions:vec record {id:text; post:rec_516; author:rec_518; reactionType:variant {Fire; ThumbsDown; ThumbsUp}}}; | ||
type rec_515 = record {id:text; text:text; author:rec_512; thread:record {id:text; title:text; author:rec_512; posts:vec rec_515}; reactions:vec record {id:text; post:rec_515; author:rec_512; reactionType:variant {Fire; ThumbsDown; ThumbsUp}}}; | ||
type rec_513 = record {id:text; text:text; author:rec_512; thread:record {id:text; title:text; author:rec_512; posts:vec rec_513}; reactions:vec record {id:text; post:rec_513; author:rec_512; reactionType:variant {Fire; ThumbsDown; ThumbsUp}}}; | ||
type rec_514 = record {id:text; text:text; author:rec_512; thread:record {id:text; title:text; author:rec_512; posts:vec rec_514}; reactions:vec record {id:text; post:rec_514; author:rec_512; reactionType:variant {Fire; ThumbsDown; ThumbsUp}}}; | ||
type rec_512 = record {id:text; username:text; threads:vec record {id:text; title:text; author:rec_512; posts:vec rec_515}; posts:vec rec_513; reactions:vec record {id:text; post:rec_514; author:rec_512; reactionType:variant {Fire; ThumbsDown; ThumbsUp}}}; | ||
type rec_579 = record {id:text; text:text; author:rec_576; thread:record {id:text; title:text; author:rec_576; posts:vec rec_579}; reactions:vec record {id:text; post:rec_579; author:rec_576; reactionType:variant {Fire; ThumbsDown; ThumbsUp}}}; | ||
type rec_577 = record {id:text; text:text; author:rec_576; thread:record {id:text; title:text; author:rec_576; posts:vec rec_577}; reactions:vec record {id:text; post:rec_577; author:rec_576; reactionType:variant {Fire; ThumbsDown; ThumbsUp}}}; | ||
type rec_578 = record {id:text; text:text; author:rec_576; thread:record {id:text; title:text; author:rec_576; posts:vec rec_578}; reactions:vec record {id:text; post:rec_578; author:rec_576; reactionType:variant {Fire; ThumbsDown; ThumbsUp}}}; | ||
type rec_576 = record {id:text; username:text; threads:vec record {id:text; title:text; author:rec_576; posts:vec rec_579}; posts:vec rec_577; reactions:vec record {id:text; post:rec_578; author:rec_576; reactionType:variant {Fire; ThumbsDown; ThumbsUp}}}; | ||
type rec_581 = record {id:text; username:text; threads:vec record {id:text; title:text; author:rec_581; posts:vec rec_580}; posts:vec rec_580; reactions:vec record {id:text; post:rec_580; author:rec_581; reactionType:variant {Fire; ThumbsDown; ThumbsUp}}}; | ||
type rec_583 = record {id:text; username:text; threads:vec record {id:text; title:text; author:rec_583; posts:vec rec_580}; posts:vec rec_580; reactions:vec record {id:text; post:rec_580; author:rec_583; reactionType:variant {Fire; ThumbsDown; ThumbsUp}}}; | ||
type rec_582 = record {id:text; username:text; threads:vec record {id:text; title:text; author:rec_582; posts:vec rec_580}; posts:vec rec_580; reactions:vec record {id:text; post:rec_580; author:rec_582; reactionType:variant {Fire; ThumbsDown; ThumbsUp}}}; | ||
type rec_580 = record {id:text; text:text; author:rec_581; thread:record {id:text; title:text; author:rec_583; posts:vec rec_580}; reactions:vec record {id:text; post:rec_580; author:rec_582; reactionType:variant {Fire; ThumbsDown; ThumbsUp}}}; | ||
type rec_619 = record {id:text; text:text; author:rec_616; thread:record {id:text; title:text; author:rec_616; posts:vec rec_619}; reactions:vec record {id:text; post:rec_619; author:rec_616; reactionType:variant {Fire; ThumbsDown; ThumbsUp}}}; | ||
type rec_617 = record {id:text; text:text; author:rec_616; thread:record {id:text; title:text; author:rec_616; posts:vec rec_617}; reactions:vec record {id:text; post:rec_617; author:rec_616; reactionType:variant {Fire; ThumbsDown; ThumbsUp}}}; | ||
type rec_618 = record {id:text; text:text; author:rec_616; thread:record {id:text; title:text; author:rec_616; posts:vec rec_618}; reactions:vec record {id:text; post:rec_618; author:rec_616; reactionType:variant {Fire; ThumbsDown; ThumbsUp}}}; | ||
type rec_616 = record {id:text; username:text; threads:vec record {id:text; title:text; author:rec_616; posts:vec rec_619}; posts:vec rec_617; reactions:vec record {id:text; post:rec_618; author:rec_616; reactionType:variant {Fire; ThumbsDown; ThumbsUp}}}; | ||
type Post = record { | ||
id: text; | ||
author: User; | ||
reactions: vec Reaction; | ||
text: text; | ||
thread: Thread; | ||
}; | ||
|
||
type Reaction = record { | ||
id: text; | ||
author: User; | ||
post: Post; | ||
reactionType: ReactionType; | ||
}; | ||
|
||
type ReactionType = variant { | ||
Fire; | ||
ThumbsUp; | ||
ThumbsDown; | ||
}; | ||
|
||
type Thread = record { | ||
id: text; | ||
author: User; | ||
posts: vec Post; | ||
title: text; | ||
}; | ||
|
||
type User = record { | ||
id: text; | ||
posts: vec Post; | ||
reactions: vec Reaction; | ||
threads: vec Thread; | ||
username: text; | ||
}; | ||
|
||
service: () -> { | ||
createPost: (text, text, text, nat32) -> (rec_440); | ||
createReaction: (text, text, variant {Fire; ThumbsDown; ThumbsUp}, nat32) -> (record {id:text; post:rec_484; author:rec_480; reactionType:variant {Fire; ThumbsDown; ThumbsUp}}); | ||
createThread: (text, text, nat32) -> (record {id:text; title:text; author:rec_544; posts:vec rec_548}); | ||
createUser: (text, nat32) -> (rec_600); | ||
getAllPosts: (nat32) -> (vec rec_456) query; | ||
getAllReactions: (nat32) -> (vec record {id:text; post:rec_516; author:rec_512; reactionType:variant {Fire; ThumbsDown; ThumbsUp}}) query; | ||
getAllThreads: (nat32) -> (vec record {id:text; title:text; author:rec_576; posts:vec rec_580}) query; | ||
getAllUsers: (nat32) -> (vec rec_616) query; | ||
createPost: (text, text, text, nat32) -> (Post); | ||
getAllPosts: (nat32) -> (vec Post) query; | ||
createReaction: (text, text, ReactionType, nat32) -> (Reaction); | ||
getAllReactions: (nat32) -> (vec Reaction) query; | ||
createThread: (text, text, nat32) -> (Thread); | ||
getAllThreads: (nat32) -> (vec Thread) query; | ||
createUser: (text, nat32) -> (User); | ||
getAllUsers: (nat32) -> (vec User) query; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.