-
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 #1325 from demergent-labs/js_refactor
Js refactor
- Loading branch information
Showing
151 changed files
with
2,256 additions
and
4,137 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,10 @@ | ||
type rec_2 = record {id:principal; username:text; recordingIds:vec principal; createdAt:nat64}; | ||
type rec_3 = record {id:principal; username:text; recordingIds:vec principal; createdAt:nat64}; | ||
type rec_4 = record {id:principal; username:text; recordingIds:vec principal; createdAt:nat64}; | ||
type rec_5 = record {id:principal; username:text; recordingIds:vec principal; createdAt:nat64}; | ||
type rec_6 = variant {RecordingDoesNotExist:principal; UserDoesNotExist:principal}; | ||
type rec_7 = record {id:principal; audio:vec nat8; userId:principal; name:text; createdAt:nat64}; | ||
type rec_8 = variant {RecordingDoesNotExist:principal; UserDoesNotExist:principal}; | ||
type rec_9 = record {id:principal; audio:vec nat8; userId:principal; name:text; createdAt:nat64}; | ||
type rec_10 = record {id:principal; audio:vec nat8; userId:principal; name:text; createdAt:nat64}; | ||
type rec_11 = record {id:principal; audio:vec nat8; userId:principal; name:text; createdAt:nat64}; | ||
type rec_12 = variant {RecordingDoesNotExist:principal; UserDoesNotExist:principal}; | ||
service: () -> { | ||
createUser: (text) -> (rec_2); | ||
readUsers: () -> (vec rec_3) query; | ||
readUserById: (principal) -> (opt rec_4) query; | ||
deleteUser: (principal) -> (variant {Ok:rec_5; Err:rec_6}); | ||
createRecording: (vec nat8, text, principal) -> (variant {Ok:rec_7; Err:rec_8}); | ||
readRecordings: () -> (vec rec_9) query; | ||
readRecordingById: (principal) -> (opt rec_10) query; | ||
deleteRecording: (principal) -> (variant {Ok:rec_11; Err:rec_12}); | ||
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; | ||
} |
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,56 +1,15 @@ | ||
type rec_41 = variant {Int:int; Nat:nat; Blob:vec nat8; Text:text}; | ||
type rec_42 = record {owner:principal; subaccount:opt vec nat8}; | ||
type rec_43 = record {owner:principal; subaccount:opt vec nat8}; | ||
type rec_45 = record {owner:principal; subaccount:opt vec nat8}; | ||
type rec_44 = record {to:rec_45; fee:opt nat; memo:opt vec nat8; from_subaccount:opt vec nat8; created_at_time:opt nat64; amount:nat}; | ||
type rec_53 = record {message:text; error_code:nat}; | ||
type rec_49 = record {min_burn_amount:nat}; | ||
type rec_52 = record {duplicate_of:nat}; | ||
type rec_48 = record {expected_fee:nat}; | ||
type rec_51 = record {ledger_time:nat64}; | ||
type rec_50 = record {balance:nat}; | ||
type rec_47 = variant {GenericError:rec_53; TemporarilyUnavailable; BadBurn:rec_49; Duplicate:rec_52; BadFee:rec_48; CreatedInFuture:rec_51; TooOld; InsufficientFunds:rec_50}; | ||
type rec_46 = variant {Ok:nat; Err:rec_47}; | ||
type rec_54 = record {url:text; name:text}; | ||
type rec_56 = record {owner:principal; subaccount:opt vec nat8}; | ||
type rec_55 = record {fee:opt nat; memo:opt vec nat8; from_subaccount:opt vec nat8; created_at_time:opt nat64; amount:nat; expected_allowance:opt nat; expires_at:opt nat64; spender:rec_56}; | ||
type rec_65 = record {message:text; error_code:nat}; | ||
type rec_64 = record {duplicate_of:nat}; | ||
type rec_59 = record {expected_fee:nat}; | ||
type rec_61 = record {current_allowance:nat}; | ||
type rec_63 = record {ledger_time:nat64}; | ||
type rec_62 = record {ledger_time:nat64}; | ||
type rec_60 = record {balance:nat}; | ||
type rec_58 = variant {GenericError:rec_65; TemporarilyUnavailable; Duplicate:rec_64; BadFee:rec_59; AllowanceChanged:rec_61; CreatedInFuture:rec_63; TooOld; Expired:rec_62; InsufficientFunds:rec_60}; | ||
type rec_57 = variant {Ok:nat; Err:rec_58}; | ||
type rec_68 = record {owner:principal; subaccount:opt vec nat8}; | ||
type rec_67 = record {owner:principal; subaccount:opt vec nat8}; | ||
type rec_66 = record {to:rec_68; fee:opt nat; from:rec_67; memo:opt vec nat8; created_at_time:opt nat64; amount:nat}; | ||
type rec_77 = record {message:text; error_code:nat}; | ||
type rec_74 = record {allowance:nat}; | ||
type rec_72 = record {min_burn_amount:nat}; | ||
type rec_76 = record {duplicate_of:nat}; | ||
type rec_71 = record {expected_fee:nat}; | ||
type rec_75 = record {ledger_time:nat64}; | ||
type rec_73 = record {balance:nat}; | ||
type rec_70 = variant {GenericError:rec_77; TemporarilyUnavailable; InsufficientAllowance:rec_74; BadBurn:rec_72; Duplicate:rec_76; BadFee:rec_71; CreatedInFuture:rec_75; TooOld; InsufficientFunds:rec_73}; | ||
type rec_69 = variant {Ok:nat; Err:rec_70}; | ||
type rec_79 = record {owner:principal; subaccount:opt vec nat8}; | ||
type rec_80 = record {owner:principal; subaccount:opt vec nat8}; | ||
type rec_78 = record {account:rec_79; spender:rec_80}; | ||
type rec_81 = record {allowance:nat; expires_at:opt nat64}; | ||
service: () -> { | ||
icrc1_metadata: () -> (vec record {text; rec_41}) query; | ||
icrc1_name: () -> (text) query; | ||
icrc1_balance_of: (record {owner:principal; subaccount:opt vec nat8}) -> (nat) query; | ||
icrc1_decimals: () -> (nat8) query; | ||
icrc1_symbol: () -> (text) query; | ||
icrc1_fee: () -> (nat) query; | ||
icrc1_metadata: () -> (vec record {text; variant {Int:int; Nat:nat; Blob:vec nat8; Text:text}}) query; | ||
icrc1_minting_account: () -> (opt record {owner:principal; subaccount:opt vec nat8}) query; | ||
icrc1_name: () -> (text) query; | ||
icrc1_supported_standards: () -> (vec record {url:text; name:text}) query; | ||
icrc1_symbol: () -> (text) query; | ||
icrc1_total_supply: () -> (nat) query; | ||
icrc1_minting_account: () -> (opt rec_42) query; | ||
icrc1_balance_of: (rec_43) -> (nat) query; | ||
icrc1_transfer: (rec_44) -> (rec_46); | ||
icrc1_supported_standards: () -> (vec rec_54) query; | ||
icrc2_approve: (rec_55) -> (rec_57); | ||
icrc2_transfer_from: (rec_66) -> (rec_69); | ||
icrc2_allowance: (rec_78) -> (rec_81); | ||
icrc1_transfer: (record {to:record {owner:principal; subaccount:opt vec nat8}; fee:opt nat; memo:opt vec nat8; from_subaccount:opt vec nat8; created_at_time:opt nat64; amount:nat}) -> (variant {Ok:nat; Err:variant {GenericError:record {message:text; error_code:nat}; TemporarilyUnavailable; BadBurn:record {min_burn_amount:nat}; Duplicate:record {duplicate_of:nat}; BadFee:record {expected_fee:nat}; CreatedInFuture:record {ledger_time:nat64}; TooOld; InsufficientFunds:record {balance:nat}}}); | ||
icrc2_allowance: (record {account:record {owner:principal; subaccount:opt vec nat8}; spender:record {owner:principal; subaccount:opt vec nat8}}) -> (record {allowance:nat; expires_at:opt nat64}); | ||
icrc2_approve: (record {fee:opt nat; memo:opt vec nat8; from_subaccount:opt vec nat8; created_at_time:opt nat64; amount:nat; expected_allowance:opt nat; expires_at:opt nat64; spender:record {owner:principal; subaccount:opt vec nat8}}) -> (variant {Ok:nat; Err:variant {GenericError:record {message:text; error_code:nat}; TemporarilyUnavailable; Duplicate:record {duplicate_of:nat}; BadFee:record {expected_fee:nat}; AllowanceChanged:record {current_allowance:nat}; CreatedInFuture:record {ledger_time:nat64}; TooOld; Expired:record {ledger_time:nat64}; InsufficientFunds:record {balance:nat}}}); | ||
icrc2_transfer_from: (record {to:record {owner:principal; subaccount:opt vec nat8}; fee:opt nat; from:record {owner:principal; subaccount:opt vec nat8}; memo:opt vec nat8; created_at_time:opt nat64; amount:nat}) -> (variant {Ok:nat; Err:variant {GenericError:record {message:text; error_code:nat}; TemporarilyUnavailable; InsufficientAllowance:record {allowance:nat}; BadBurn:record {min_burn_amount:nat}; Duplicate:record {duplicate_of:nat}; BadFee:record {expected_fee:nat}; CreatedInFuture:record {ledger_time:nat64}; TooOld; InsufficientFunds:record {balance:nat}}}); | ||
} |
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,5 +1,5 @@ | ||
service: () -> { | ||
accessible: () -> (bool); | ||
inaccessible: () -> (bool); | ||
alsoInaccessible: () -> (bool); | ||
inaccessible: () -> (bool); | ||
} |
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,11 +1,7 @@ | ||
type rec_0 = variant {NoError; CanisterError; SysTransient; DestinationInvalid; Unknown; SysFatal; CanisterReject}; | ||
type rec_1 = variant {NoError; CanisterError; SysTransient; DestinationInvalid; Unknown; SysFatal; CanisterReject}; | ||
type rec_2 = variant {NoError; CanisterError; SysTransient; DestinationInvalid; Unknown; SysFatal; CanisterReject}; | ||
type rec_3 = variant {NoError; CanisterError; SysTransient; DestinationInvalid; Unknown; SysFatal; CanisterReject}; | ||
service: () -> { | ||
getRejectionCodeNoError: () -> (rec_0); | ||
getRejectionCodeDestinationInvalid: () -> (rec_1); | ||
getRejectionCodeCanisterReject: () -> (rec_2); | ||
getRejectionCodeCanisterError: () -> (rec_3); | ||
getRejectionCodeCanisterError: () -> (variant {NoError; CanisterError; SysTransient; DestinationInvalid; Unknown; SysFatal; CanisterReject}); | ||
getRejectionCodeCanisterReject: () -> (variant {NoError; CanisterError; SysTransient; DestinationInvalid; Unknown; SysFatal; CanisterReject}); | ||
getRejectionCodeDestinationInvalid: () -> (variant {NoError; CanisterError; SysTransient; DestinationInvalid; Unknown; SysFatal; CanisterReject}); | ||
getRejectionCodeNoError: () -> (variant {NoError; CanisterError; SysTransient; DestinationInvalid; Unknown; SysFatal; CanisterReject}); | ||
getRejectionMessage: (text) -> (text); | ||
} |
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,5 +1,5 @@ | ||
service: () -> { | ||
reject: (text) -> (empty) query; | ||
accept: () -> (bool) query; | ||
error: () -> (empty) query; | ||
reject: (text) -> (empty) 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
service: () -> { | ||
stableSize: () -> (nat32) query; | ||
stable64Size: () -> (nat64) query; | ||
stableGrow: (nat32) -> (nat32); | ||
stable64Grow: (nat64) -> (nat64); | ||
stableWrite: (nat32, vec nat8) -> (); | ||
stable64Write: (nat64, vec nat8) -> (); | ||
stableRead: (nat32, nat32) -> (vec nat8) query; | ||
stable64Read: (nat64, nat64) -> (vec nat8) query; | ||
stable64Size: () -> (nat64) query; | ||
stable64Write: (nat64, vec nat8) -> (); | ||
stableBytes: () -> (vec nat8) query; | ||
stableGrow: (nat32) -> (nat32); | ||
stableRead: (nat32, nat32) -> (vec nat8) query; | ||
stableSize: () -> (nat32) query; | ||
stableWrite: (nat32, vec nat8) -> (); | ||
} |
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,7 +1,5 @@ | ||
type rec_0 = record {repeat:nat64; repeatCrossCanister:nat64; inline:nat64; capture:nat64; single:nat64; singleCrossCanister:nat64}; | ||
type rec_1 = record {repeat:int8; repeatCrossCanister:vec nat8; inline:int8; capture:text; single:bool; singleCrossCanister:vec nat8}; | ||
service: () -> { | ||
clearTimer: (nat64) -> (); | ||
setTimers: (nat64, nat64) -> (rec_0); | ||
statusReport: () -> (rec_1) query; | ||
setTimers: (nat64, nat64) -> (record {repeat:nat64; repeatCrossCanister:nat64; inline:nat64; capture:nat64; single:nat64; singleCrossCanister:nat64}); | ||
statusReport: () -> (record {repeat:int8; repeatCrossCanister:vec nat8; inline:int8; capture:text; single:bool; singleCrossCanister:vec nat8}) 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
Oops, something went wrong.