diff --git a/examples/audio_recorder/src/index.did b/examples/audio_recorder/src/index.did index 00906c820d..ba5448ffc2 100644 --- a/examples/audio_recorder/src/index.did +++ b/examples/audio_recorder/src/index.did @@ -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; } diff --git a/src/lib/candid/index.ts b/src/lib/candid/index.ts index 8a76f9de2e..4fa2a1a7b7 100644 --- a/src/lib/candid/index.ts +++ b/src/lib/candid/index.ts @@ -27,6 +27,7 @@ import { Principal } from './types/reference'; export * from './types/constructed'; export * from './types/primitive'; export * from './types/reference'; +export * from './recursive'; export type TypeMapping = RecursionLevel extends 10 ? T diff --git a/src/lib/index.ts b/src/lib/index.ts index f2fcdf6e05..61e854fab6 100644 --- a/src/lib/index.ts +++ b/src/lib/index.ts @@ -3,4 +3,5 @@ export * from './candid'; export * from './canister_methods'; export * from './ic'; export * from './stable_b_tree_map'; +export * from './system_types'; export { IDL } from '@dfinity/candid';