@junobuild/ic-client 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +21 -0
  3. package/dist/browser/index.js +2 -0
  4. package/dist/browser/index.js.map +7 -0
  5. package/dist/declarations/console/console.did.d.ts +311 -0
  6. package/dist/declarations/console/console.factory.certified.did.js +326 -0
  7. package/dist/declarations/console/console.factory.did.js +326 -0
  8. package/dist/declarations/console/console.factory.did.mjs +326 -0
  9. package/dist/declarations/deprecated/console-0-0-14.did.d.ts +267 -0
  10. package/dist/declarations/deprecated/console-0-0-14.factory.did.js +285 -0
  11. package/dist/declarations/deprecated/console-0-0-8-patch1.did.d.ts +75 -0
  12. package/dist/declarations/deprecated/console-0-0-8-patch1.factory.did.js +80 -0
  13. package/dist/declarations/deprecated/mission_control-0-0-13.did.d.ts +246 -0
  14. package/dist/declarations/deprecated/mission_control-0-0-13.factory.did.js +280 -0
  15. package/dist/declarations/deprecated/mission_control-0-0-14.did.d.ts +241 -0
  16. package/dist/declarations/deprecated/mission_control-0-0-14.factory.did.js +258 -0
  17. package/dist/declarations/deprecated/mission_control-0-0-4.did.d.ts +80 -0
  18. package/dist/declarations/deprecated/mission_control-0-0-4.factory.did.js +99 -0
  19. package/dist/declarations/deprecated/mission_control-deprecated-version.did.d.ts +231 -0
  20. package/dist/declarations/deprecated/mission_control-deprecated-version.factory.did.js +247 -0
  21. package/dist/declarations/deprecated/observatory-0-0-9.did.d.ts +70 -0
  22. package/dist/declarations/deprecated/observatory-0-0-9.factory.did.js +76 -0
  23. package/dist/declarations/deprecated/orbiter-0-0-6.did.d.ts +161 -0
  24. package/dist/declarations/deprecated/orbiter-0-0-6.factory.did.js +192 -0
  25. package/dist/declarations/deprecated/orbiter-0-0-7.did.d.ts +166 -0
  26. package/dist/declarations/deprecated/orbiter-0-0-7.factory.did.js +197 -0
  27. package/dist/declarations/deprecated/orbiter-0-0-8.did.d.ts +245 -0
  28. package/dist/declarations/deprecated/orbiter-0-0-8.factory.did.js +287 -0
  29. package/dist/declarations/deprecated/orbiter-0-2-0.did.d.ts +277 -0
  30. package/dist/declarations/deprecated/orbiter-0-2-0.factory.did.js +319 -0
  31. package/dist/declarations/deprecated/orbiter-deprecated-version.did.d.ts +229 -0
  32. package/dist/declarations/deprecated/orbiter-deprecated-version.factory.did.js +271 -0
  33. package/dist/declarations/deprecated/satellite-0-0-16.did.d.ts +240 -0
  34. package/dist/declarations/deprecated/satellite-0-0-16.factory.did.js +264 -0
  35. package/dist/declarations/deprecated/satellite-0-0-17.did.d.ts +254 -0
  36. package/dist/declarations/deprecated/satellite-0-0-17.factory.did.js +281 -0
  37. package/dist/declarations/deprecated/satellite-0-0-21.did.d.ts +299 -0
  38. package/dist/declarations/deprecated/satellite-0-0-21.factory.did.js +333 -0
  39. package/dist/declarations/deprecated/satellite-0-0-22.did.d.ts +290 -0
  40. package/dist/declarations/deprecated/satellite-0-0-22.factory.did.js +318 -0
  41. package/dist/declarations/deprecated/satellite-0-0-8.did.d.ts +183 -0
  42. package/dist/declarations/deprecated/satellite-0-0-8.factory.did.js +194 -0
  43. package/dist/declarations/deprecated/satellite-0-0-9.did.d.ts +199 -0
  44. package/dist/declarations/deprecated/satellite-0-0-9.factory.did.js +213 -0
  45. package/dist/declarations/deprecated/satellite-deprecated-no-scope.did.d.ts +183 -0
  46. package/dist/declarations/deprecated/satellite-deprecated-no-scope.factory.did.js +194 -0
  47. package/dist/declarations/deprecated/satellite-deprecated-no-scope.factory.did.mjs +192 -0
  48. package/dist/declarations/deprecated/satellite-deprecated-version.did.d.ts +291 -0
  49. package/dist/declarations/deprecated/satellite-deprecated-version.factory.did.js +319 -0
  50. package/dist/declarations/deprecated/satellite-deprecated.did.d.ts +182 -0
  51. package/dist/declarations/deprecated/satellite-deprecated.factory.did.js +191 -0
  52. package/dist/declarations/deprecated/satellite-deprecated.factory.did.mjs +191 -0
  53. package/dist/declarations/mission_control/mission_control.did.d.ts +241 -0
  54. package/dist/declarations/mission_control/mission_control.factory.certified.did.js +259 -0
  55. package/dist/declarations/mission_control/mission_control.factory.did.js +259 -0
  56. package/dist/declarations/observatory/observatory.did.d.ts +86 -0
  57. package/dist/declarations/observatory/observatory.factory.certified.did.js +93 -0
  58. package/dist/declarations/observatory/observatory.factory.did.js +93 -0
  59. package/dist/declarations/observatory/observatory.factory.did.mjs +93 -0
  60. package/dist/declarations/orbiter/orbiter.did.d.ts +277 -0
  61. package/dist/declarations/orbiter/orbiter.factory.certified.did.js +304 -0
  62. package/dist/declarations/orbiter/orbiter.factory.did.js +320 -0
  63. package/dist/declarations/orbiter/orbiter.factory.did.mjs +320 -0
  64. package/dist/declarations/satellite/satellite.did.d.ts +396 -0
  65. package/dist/declarations/satellite/satellite.factory.certified.did.js +419 -0
  66. package/dist/declarations/satellite/satellite.factory.did.js +419 -0
  67. package/dist/declarations/satellite/satellite.factory.did.mjs +419 -0
  68. package/dist/declarations/sputnik/sputnik.did.d.ts +396 -0
  69. package/dist/declarations/sputnik/sputnik.factory.certified.did.js +419 -0
  70. package/dist/declarations/sputnik/sputnik.factory.did.js +419 -0
  71. package/dist/index.js +1 -0
  72. package/dist/node/index.mjs +4 -0
  73. package/dist/node/index.mjs.map +7 -0
  74. package/dist/types/api/_agent.api.d.ts +3 -0
  75. package/dist/types/api/actor.api.d.ts +34 -0
  76. package/dist/types/api/actor.factory.d.ts +19 -0
  77. package/dist/types/index.d.ts +2 -0
  78. package/dist/types/types/actor.d.ts +74 -0
  79. package/dist/types/utils/agent.utils.d.ts +6 -0
  80. package/package.json +63 -0
@@ -0,0 +1,311 @@
1
+ import type {ActorMethod} from '@dfinity/agent';
2
+ import type {IDL} from '@dfinity/candid';
3
+ import type {Principal} from '@dfinity/principal';
4
+
5
+ export interface AssertMissionControlCenterArgs {
6
+ mission_control_id: Principal;
7
+ user: Principal;
8
+ }
9
+ export interface AssetEncodingNoContent {
10
+ modified: bigint;
11
+ sha256: Uint8Array | number[];
12
+ total_length: bigint;
13
+ }
14
+ export interface AssetKey {
15
+ token: [] | [string];
16
+ collection: string;
17
+ owner: Principal;
18
+ name: string;
19
+ description: [] | [string];
20
+ full_path: string;
21
+ }
22
+ export interface AssetNoContent {
23
+ key: AssetKey;
24
+ updated_at: bigint;
25
+ encodings: Array<[string, AssetEncodingNoContent]>;
26
+ headers: Array<[string, string]>;
27
+ created_at: bigint;
28
+ version: [] | [bigint];
29
+ }
30
+ export interface AssetsUpgradeOptions {
31
+ clear_existing_assets: [] | [boolean];
32
+ }
33
+ export interface CommitBatch {
34
+ batch_id: bigint;
35
+ headers: Array<[string, string]>;
36
+ chunk_ids: Array<bigint>;
37
+ }
38
+ export interface CommitProposal {
39
+ sha256: Uint8Array | number[];
40
+ proposal_id: bigint;
41
+ }
42
+ export interface Config {
43
+ storage: StorageConfig;
44
+ }
45
+ export interface ConfigMaxMemorySize {
46
+ stable: [] | [bigint];
47
+ heap: [] | [bigint];
48
+ }
49
+ export interface Controller {
50
+ updated_at: bigint;
51
+ metadata: Array<[string, string]>;
52
+ created_at: bigint;
53
+ scope: ControllerScope;
54
+ expires_at: [] | [bigint];
55
+ }
56
+ export type ControllerScope = {Write: null} | {Admin: null} | {Submit: null};
57
+ export interface CreateCanisterArgs {
58
+ block_index: [] | [bigint];
59
+ subnet_id: [] | [Principal];
60
+ user: Principal;
61
+ }
62
+ export interface CustomDomain {
63
+ updated_at: bigint;
64
+ created_at: bigint;
65
+ version: [] | [bigint];
66
+ bn_id: [] | [string];
67
+ }
68
+ export interface DeleteControllersArgs {
69
+ controllers: Array<Principal>;
70
+ }
71
+ export interface DeleteProposalAssets {
72
+ proposal_ids: Array<bigint>;
73
+ }
74
+ export interface GetCreateCanisterFeeArgs {
75
+ user: Principal;
76
+ }
77
+ export interface HttpRequest {
78
+ url: string;
79
+ method: string;
80
+ body: Uint8Array | number[];
81
+ headers: Array<[string, string]>;
82
+ certificate_version: [] | [number];
83
+ }
84
+ export interface HttpResponse {
85
+ body: Uint8Array | number[];
86
+ headers: Array<[string, string]>;
87
+ streaming_strategy: [] | [StreamingStrategy];
88
+ status_code: number;
89
+ }
90
+ export interface InitAssetKey {
91
+ token: [] | [string];
92
+ collection: string;
93
+ name: string;
94
+ description: [] | [string];
95
+ encoding_type: [] | [string];
96
+ full_path: string;
97
+ }
98
+ export interface InitUploadResult {
99
+ batch_id: bigint;
100
+ }
101
+ export interface ListMatcher {
102
+ key: [] | [string];
103
+ updated_at: [] | [TimestampMatcher];
104
+ description: [] | [string];
105
+ created_at: [] | [TimestampMatcher];
106
+ }
107
+ export interface ListOrder {
108
+ field: ListOrderField;
109
+ desc: boolean;
110
+ }
111
+ export type ListOrderField = {UpdatedAt: null} | {Keys: null} | {CreatedAt: null};
112
+ export interface ListPaginate {
113
+ start_after: [] | [string];
114
+ limit: [] | [bigint];
115
+ }
116
+ export interface ListParams {
117
+ order: [] | [ListOrder];
118
+ owner: [] | [Principal];
119
+ matcher: [] | [ListMatcher];
120
+ paginate: [] | [ListPaginate];
121
+ }
122
+ export interface ListProposalResults {
123
+ matches_length: bigint;
124
+ items: Array<[ProposalKey, Proposal]>;
125
+ items_length: bigint;
126
+ }
127
+ export interface ListProposalsOrder {
128
+ desc: boolean;
129
+ }
130
+ export interface ListProposalsPaginate {
131
+ start_after: [] | [bigint];
132
+ limit: [] | [bigint];
133
+ }
134
+ export interface ListProposalsParams {
135
+ order: [] | [ListProposalsOrder];
136
+ paginate: [] | [ListProposalsPaginate];
137
+ }
138
+ export interface ListResults {
139
+ matches_pages: [] | [bigint];
140
+ matches_length: bigint;
141
+ items_page: [] | [bigint];
142
+ items: Array<[string, AssetNoContent]>;
143
+ items_length: bigint;
144
+ }
145
+ export type Memory = {Heap: null} | {Stable: null};
146
+ export interface MissionControl {
147
+ updated_at: bigint;
148
+ credits: Tokens;
149
+ mission_control_id: [] | [Principal];
150
+ owner: Principal;
151
+ created_at: bigint;
152
+ }
153
+ export interface Payment {
154
+ status: PaymentStatus;
155
+ updated_at: bigint;
156
+ block_index_payment: bigint;
157
+ mission_control_id: [] | [Principal];
158
+ created_at: bigint;
159
+ block_index_refunded: [] | [bigint];
160
+ }
161
+ export type PaymentStatus = {Refunded: null} | {Acknowledged: null} | {Completed: null};
162
+ export interface Proposal {
163
+ status: ProposalStatus;
164
+ updated_at: bigint;
165
+ sha256: [] | [Uint8Array | number[]];
166
+ executed_at: [] | [bigint];
167
+ owner: Principal;
168
+ created_at: bigint;
169
+ version: [] | [bigint];
170
+ proposal_type: ProposalType;
171
+ }
172
+ export interface ProposalKey {
173
+ proposal_id: bigint;
174
+ }
175
+ export type ProposalStatus =
176
+ | {Initialized: null}
177
+ | {Failed: null}
178
+ | {Open: null}
179
+ | {Rejected: null}
180
+ | {Executed: null}
181
+ | {Accepted: null};
182
+ export type ProposalType =
183
+ | {AssetsUpgrade: AssetsUpgradeOptions}
184
+ | {SegmentsDeployment: SegmentsDeploymentOptions};
185
+ export interface RateConfig {
186
+ max_tokens: bigint;
187
+ time_per_token_ns: bigint;
188
+ }
189
+ export type SegmentKind = {Orbiter: null} | {MissionControl: null} | {Satellite: null};
190
+ export interface SegmentsDeploymentOptions {
191
+ orbiter: [] | [string];
192
+ mission_control_version: [] | [string];
193
+ satellite_version: [] | [string];
194
+ }
195
+ export interface SetController {
196
+ metadata: Array<[string, string]>;
197
+ scope: ControllerScope;
198
+ expires_at: [] | [bigint];
199
+ }
200
+ export interface SetControllersArgs {
201
+ controller: SetController;
202
+ controllers: Array<Principal>;
203
+ }
204
+ export interface SetStorageConfig {
205
+ iframe: [] | [StorageConfigIFrame];
206
+ rewrites: Array<[string, string]>;
207
+ headers: Array<[string, Array<[string, string]>]>;
208
+ version: [] | [bigint];
209
+ max_memory_size: [] | [ConfigMaxMemorySize];
210
+ raw_access: [] | [StorageConfigRawAccess];
211
+ redirects: [] | [Array<[string, StorageConfigRedirect]>];
212
+ }
213
+ export interface StorageConfig {
214
+ iframe: [] | [StorageConfigIFrame];
215
+ updated_at: [] | [bigint];
216
+ rewrites: Array<[string, string]>;
217
+ headers: Array<[string, Array<[string, string]>]>;
218
+ created_at: [] | [bigint];
219
+ version: [] | [bigint];
220
+ max_memory_size: [] | [ConfigMaxMemorySize];
221
+ raw_access: [] | [StorageConfigRawAccess];
222
+ redirects: [] | [Array<[string, StorageConfigRedirect]>];
223
+ }
224
+ export type StorageConfigIFrame = {Deny: null} | {AllowAny: null} | {SameOrigin: null};
225
+ export type StorageConfigRawAccess = {Deny: null} | {Allow: null};
226
+ export interface StorageConfigRedirect {
227
+ status_code: number;
228
+ location: string;
229
+ }
230
+ export interface StreamingCallbackHttpResponse {
231
+ token: [] | [StreamingCallbackToken];
232
+ body: Uint8Array | number[];
233
+ }
234
+ export interface StreamingCallbackToken {
235
+ memory: Memory;
236
+ token: [] | [string];
237
+ sha256: [] | [Uint8Array | number[]];
238
+ headers: Array<[string, string]>;
239
+ index: bigint;
240
+ encoding_type: string;
241
+ full_path: string;
242
+ }
243
+ export type StreamingStrategy = {
244
+ Callback: {
245
+ token: StreamingCallbackToken;
246
+ callback: [Principal, string];
247
+ };
248
+ };
249
+ export type TimestampMatcher =
250
+ | {Equal: bigint}
251
+ | {Between: [bigint, bigint]}
252
+ | {GreaterThan: bigint}
253
+ | {LessThan: bigint};
254
+ export interface Tokens {
255
+ e8s: bigint;
256
+ }
257
+ export interface UploadChunk {
258
+ content: Uint8Array | number[];
259
+ batch_id: bigint;
260
+ order_id: [] | [bigint];
261
+ }
262
+ export interface UploadChunkResult {
263
+ chunk_id: bigint;
264
+ }
265
+ export interface _SERVICE {
266
+ add_credits: ActorMethod<[Principal, Tokens], undefined>;
267
+ add_invitation_code: ActorMethod<[string], undefined>;
268
+ assert_mission_control_center: ActorMethod<[AssertMissionControlCenterArgs], undefined>;
269
+ commit_asset_upload: ActorMethod<[CommitBatch], undefined>;
270
+ commit_proposal: ActorMethod<[CommitProposal], null>;
271
+ commit_proposal_asset_upload: ActorMethod<[CommitBatch], undefined>;
272
+ count_proposals: ActorMethod<[], bigint>;
273
+ create_orbiter: ActorMethod<[CreateCanisterArgs], Principal>;
274
+ create_satellite: ActorMethod<[CreateCanisterArgs], Principal>;
275
+ del_controllers: ActorMethod<[DeleteControllersArgs], undefined>;
276
+ del_custom_domain: ActorMethod<[string], undefined>;
277
+ delete_proposal_assets: ActorMethod<[DeleteProposalAssets], undefined>;
278
+ get_config: ActorMethod<[], Config>;
279
+ get_create_orbiter_fee: ActorMethod<[GetCreateCanisterFeeArgs], [] | [Tokens]>;
280
+ get_create_satellite_fee: ActorMethod<[GetCreateCanisterFeeArgs], [] | [Tokens]>;
281
+ get_credits: ActorMethod<[], Tokens>;
282
+ get_proposal: ActorMethod<[bigint], [] | [Proposal]>;
283
+ get_storage_config: ActorMethod<[], StorageConfig>;
284
+ get_user_mission_control_center: ActorMethod<[], [] | [MissionControl]>;
285
+ http_request: ActorMethod<[HttpRequest], HttpResponse>;
286
+ http_request_streaming_callback: ActorMethod<
287
+ [StreamingCallbackToken],
288
+ StreamingCallbackHttpResponse
289
+ >;
290
+ init_asset_upload: ActorMethod<[InitAssetKey, bigint], InitUploadResult>;
291
+ init_proposal: ActorMethod<[ProposalType], [bigint, Proposal]>;
292
+ init_proposal_asset_upload: ActorMethod<[InitAssetKey, bigint], InitUploadResult>;
293
+ init_user_mission_control_center: ActorMethod<[], MissionControl>;
294
+ list_assets: ActorMethod<[string, ListParams], ListResults>;
295
+ list_controllers: ActorMethod<[], Array<[Principal, Controller]>>;
296
+ list_custom_domains: ActorMethod<[], Array<[string, CustomDomain]>>;
297
+ list_payments: ActorMethod<[], Array<[bigint, Payment]>>;
298
+ list_proposals: ActorMethod<[ListProposalsParams], ListProposalResults>;
299
+ list_user_mission_control_centers: ActorMethod<[], Array<[Principal, MissionControl]>>;
300
+ reject_proposal: ActorMethod<[CommitProposal], null>;
301
+ set_controllers: ActorMethod<[SetControllersArgs], undefined>;
302
+ set_custom_domain: ActorMethod<[string, [] | [string]], undefined>;
303
+ set_fee: ActorMethod<[SegmentKind, Tokens], undefined>;
304
+ set_storage_config: ActorMethod<[SetStorageConfig], StorageConfig>;
305
+ submit_proposal: ActorMethod<[bigint], [bigint, Proposal]>;
306
+ update_rate_config: ActorMethod<[SegmentKind, RateConfig], undefined>;
307
+ upload_asset_chunk: ActorMethod<[UploadChunk], UploadChunkResult>;
308
+ upload_proposal_asset_chunk: ActorMethod<[UploadChunk], UploadChunkResult>;
309
+ }
310
+ export declare const idlFactory: IDL.InterfaceFactory;
311
+ export declare const init: (args: {IDL: typeof IDL}) => IDL.Type[];
@@ -0,0 +1,326 @@
1
+ // @ts-ignore
2
+ export const idlFactory = ({IDL}) => {
3
+ const Tokens = IDL.Record({e8s: IDL.Nat64});
4
+ const AssertMissionControlCenterArgs = IDL.Record({
5
+ mission_control_id: IDL.Principal,
6
+ user: IDL.Principal
7
+ });
8
+ const CommitBatch = IDL.Record({
9
+ batch_id: IDL.Nat,
10
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
11
+ chunk_ids: IDL.Vec(IDL.Nat)
12
+ });
13
+ const CommitProposal = IDL.Record({
14
+ sha256: IDL.Vec(IDL.Nat8),
15
+ proposal_id: IDL.Nat
16
+ });
17
+ const CreateCanisterArgs = IDL.Record({
18
+ block_index: IDL.Opt(IDL.Nat64),
19
+ subnet_id: IDL.Opt(IDL.Principal),
20
+ user: IDL.Principal
21
+ });
22
+ const DeleteControllersArgs = IDL.Record({
23
+ controllers: IDL.Vec(IDL.Principal)
24
+ });
25
+ const DeleteProposalAssets = IDL.Record({
26
+ proposal_ids: IDL.Vec(IDL.Nat)
27
+ });
28
+ const StorageConfigIFrame = IDL.Variant({
29
+ Deny: IDL.Null,
30
+ AllowAny: IDL.Null,
31
+ SameOrigin: IDL.Null
32
+ });
33
+ const ConfigMaxMemorySize = IDL.Record({
34
+ stable: IDL.Opt(IDL.Nat64),
35
+ heap: IDL.Opt(IDL.Nat64)
36
+ });
37
+ const StorageConfigRawAccess = IDL.Variant({
38
+ Deny: IDL.Null,
39
+ Allow: IDL.Null
40
+ });
41
+ const StorageConfigRedirect = IDL.Record({
42
+ status_code: IDL.Nat16,
43
+ location: IDL.Text
44
+ });
45
+ const StorageConfig = IDL.Record({
46
+ iframe: IDL.Opt(StorageConfigIFrame),
47
+ updated_at: IDL.Opt(IDL.Nat64),
48
+ rewrites: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
49
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)))),
50
+ created_at: IDL.Opt(IDL.Nat64),
51
+ version: IDL.Opt(IDL.Nat64),
52
+ max_memory_size: IDL.Opt(ConfigMaxMemorySize),
53
+ raw_access: IDL.Opt(StorageConfigRawAccess),
54
+ redirects: IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Text, StorageConfigRedirect)))
55
+ });
56
+ const Config = IDL.Record({storage: StorageConfig});
57
+ const GetCreateCanisterFeeArgs = IDL.Record({user: IDL.Principal});
58
+ const ProposalStatus = IDL.Variant({
59
+ Initialized: IDL.Null,
60
+ Failed: IDL.Null,
61
+ Open: IDL.Null,
62
+ Rejected: IDL.Null,
63
+ Executed: IDL.Null,
64
+ Accepted: IDL.Null
65
+ });
66
+ const AssetsUpgradeOptions = IDL.Record({
67
+ clear_existing_assets: IDL.Opt(IDL.Bool)
68
+ });
69
+ const SegmentsDeploymentOptions = IDL.Record({
70
+ orbiter: IDL.Opt(IDL.Text),
71
+ mission_control_version: IDL.Opt(IDL.Text),
72
+ satellite_version: IDL.Opt(IDL.Text)
73
+ });
74
+ const ProposalType = IDL.Variant({
75
+ AssetsUpgrade: AssetsUpgradeOptions,
76
+ SegmentsDeployment: SegmentsDeploymentOptions
77
+ });
78
+ const Proposal = IDL.Record({
79
+ status: ProposalStatus,
80
+ updated_at: IDL.Nat64,
81
+ sha256: IDL.Opt(IDL.Vec(IDL.Nat8)),
82
+ executed_at: IDL.Opt(IDL.Nat64),
83
+ owner: IDL.Principal,
84
+ created_at: IDL.Nat64,
85
+ version: IDL.Opt(IDL.Nat64),
86
+ proposal_type: ProposalType
87
+ });
88
+ const MissionControl = IDL.Record({
89
+ updated_at: IDL.Nat64,
90
+ credits: Tokens,
91
+ mission_control_id: IDL.Opt(IDL.Principal),
92
+ owner: IDL.Principal,
93
+ created_at: IDL.Nat64
94
+ });
95
+ const HttpRequest = IDL.Record({
96
+ url: IDL.Text,
97
+ method: IDL.Text,
98
+ body: IDL.Vec(IDL.Nat8),
99
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
100
+ certificate_version: IDL.Opt(IDL.Nat16)
101
+ });
102
+ const Memory = IDL.Variant({Heap: IDL.Null, Stable: IDL.Null});
103
+ const StreamingCallbackToken = IDL.Record({
104
+ memory: Memory,
105
+ token: IDL.Opt(IDL.Text),
106
+ sha256: IDL.Opt(IDL.Vec(IDL.Nat8)),
107
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
108
+ index: IDL.Nat64,
109
+ encoding_type: IDL.Text,
110
+ full_path: IDL.Text
111
+ });
112
+ const StreamingStrategy = IDL.Variant({
113
+ Callback: IDL.Record({
114
+ token: StreamingCallbackToken,
115
+ callback: IDL.Func([], [], [])
116
+ })
117
+ });
118
+ const HttpResponse = IDL.Record({
119
+ body: IDL.Vec(IDL.Nat8),
120
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
121
+ streaming_strategy: IDL.Opt(StreamingStrategy),
122
+ status_code: IDL.Nat16
123
+ });
124
+ const StreamingCallbackHttpResponse = IDL.Record({
125
+ token: IDL.Opt(StreamingCallbackToken),
126
+ body: IDL.Vec(IDL.Nat8)
127
+ });
128
+ const InitAssetKey = IDL.Record({
129
+ token: IDL.Opt(IDL.Text),
130
+ collection: IDL.Text,
131
+ name: IDL.Text,
132
+ description: IDL.Opt(IDL.Text),
133
+ encoding_type: IDL.Opt(IDL.Text),
134
+ full_path: IDL.Text
135
+ });
136
+ const InitUploadResult = IDL.Record({batch_id: IDL.Nat});
137
+ const ListOrderField = IDL.Variant({
138
+ UpdatedAt: IDL.Null,
139
+ Keys: IDL.Null,
140
+ CreatedAt: IDL.Null
141
+ });
142
+ const ListOrder = IDL.Record({field: ListOrderField, desc: IDL.Bool});
143
+ const TimestampMatcher = IDL.Variant({
144
+ Equal: IDL.Nat64,
145
+ Between: IDL.Tuple(IDL.Nat64, IDL.Nat64),
146
+ GreaterThan: IDL.Nat64,
147
+ LessThan: IDL.Nat64
148
+ });
149
+ const ListMatcher = IDL.Record({
150
+ key: IDL.Opt(IDL.Text),
151
+ updated_at: IDL.Opt(TimestampMatcher),
152
+ description: IDL.Opt(IDL.Text),
153
+ created_at: IDL.Opt(TimestampMatcher)
154
+ });
155
+ const ListPaginate = IDL.Record({
156
+ start_after: IDL.Opt(IDL.Text),
157
+ limit: IDL.Opt(IDL.Nat64)
158
+ });
159
+ const ListParams = IDL.Record({
160
+ order: IDL.Opt(ListOrder),
161
+ owner: IDL.Opt(IDL.Principal),
162
+ matcher: IDL.Opt(ListMatcher),
163
+ paginate: IDL.Opt(ListPaginate)
164
+ });
165
+ const AssetKey = IDL.Record({
166
+ token: IDL.Opt(IDL.Text),
167
+ collection: IDL.Text,
168
+ owner: IDL.Principal,
169
+ name: IDL.Text,
170
+ description: IDL.Opt(IDL.Text),
171
+ full_path: IDL.Text
172
+ });
173
+ const AssetEncodingNoContent = IDL.Record({
174
+ modified: IDL.Nat64,
175
+ sha256: IDL.Vec(IDL.Nat8),
176
+ total_length: IDL.Nat
177
+ });
178
+ const AssetNoContent = IDL.Record({
179
+ key: AssetKey,
180
+ updated_at: IDL.Nat64,
181
+ encodings: IDL.Vec(IDL.Tuple(IDL.Text, AssetEncodingNoContent)),
182
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
183
+ created_at: IDL.Nat64,
184
+ version: IDL.Opt(IDL.Nat64)
185
+ });
186
+ const ListResults = IDL.Record({
187
+ matches_pages: IDL.Opt(IDL.Nat64),
188
+ matches_length: IDL.Nat64,
189
+ items_page: IDL.Opt(IDL.Nat64),
190
+ items: IDL.Vec(IDL.Tuple(IDL.Text, AssetNoContent)),
191
+ items_length: IDL.Nat64
192
+ });
193
+ const ControllerScope = IDL.Variant({
194
+ Write: IDL.Null,
195
+ Admin: IDL.Null,
196
+ Submit: IDL.Null
197
+ });
198
+ const Controller = IDL.Record({
199
+ updated_at: IDL.Nat64,
200
+ metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
201
+ created_at: IDL.Nat64,
202
+ scope: ControllerScope,
203
+ expires_at: IDL.Opt(IDL.Nat64)
204
+ });
205
+ const CustomDomain = IDL.Record({
206
+ updated_at: IDL.Nat64,
207
+ created_at: IDL.Nat64,
208
+ version: IDL.Opt(IDL.Nat64),
209
+ bn_id: IDL.Opt(IDL.Text)
210
+ });
211
+ const PaymentStatus = IDL.Variant({
212
+ Refunded: IDL.Null,
213
+ Acknowledged: IDL.Null,
214
+ Completed: IDL.Null
215
+ });
216
+ const Payment = IDL.Record({
217
+ status: PaymentStatus,
218
+ updated_at: IDL.Nat64,
219
+ block_index_payment: IDL.Nat64,
220
+ mission_control_id: IDL.Opt(IDL.Principal),
221
+ created_at: IDL.Nat64,
222
+ block_index_refunded: IDL.Opt(IDL.Nat64)
223
+ });
224
+ const ListProposalsOrder = IDL.Record({desc: IDL.Bool});
225
+ const ListProposalsPaginate = IDL.Record({
226
+ start_after: IDL.Opt(IDL.Nat),
227
+ limit: IDL.Opt(IDL.Nat)
228
+ });
229
+ const ListProposalsParams = IDL.Record({
230
+ order: IDL.Opt(ListProposalsOrder),
231
+ paginate: IDL.Opt(ListProposalsPaginate)
232
+ });
233
+ const ProposalKey = IDL.Record({proposal_id: IDL.Nat});
234
+ const ListProposalResults = IDL.Record({
235
+ matches_length: IDL.Nat64,
236
+ items: IDL.Vec(IDL.Tuple(ProposalKey, Proposal)),
237
+ items_length: IDL.Nat64
238
+ });
239
+ const SetController = IDL.Record({
240
+ metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
241
+ scope: ControllerScope,
242
+ expires_at: IDL.Opt(IDL.Nat64)
243
+ });
244
+ const SetControllersArgs = IDL.Record({
245
+ controller: SetController,
246
+ controllers: IDL.Vec(IDL.Principal)
247
+ });
248
+ const SegmentKind = IDL.Variant({
249
+ Orbiter: IDL.Null,
250
+ MissionControl: IDL.Null,
251
+ Satellite: IDL.Null
252
+ });
253
+ const SetStorageConfig = IDL.Record({
254
+ iframe: IDL.Opt(StorageConfigIFrame),
255
+ rewrites: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
256
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)))),
257
+ version: IDL.Opt(IDL.Nat64),
258
+ max_memory_size: IDL.Opt(ConfigMaxMemorySize),
259
+ raw_access: IDL.Opt(StorageConfigRawAccess),
260
+ redirects: IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Text, StorageConfigRedirect)))
261
+ });
262
+ const RateConfig = IDL.Record({
263
+ max_tokens: IDL.Nat64,
264
+ time_per_token_ns: IDL.Nat64
265
+ });
266
+ const UploadChunk = IDL.Record({
267
+ content: IDL.Vec(IDL.Nat8),
268
+ batch_id: IDL.Nat,
269
+ order_id: IDL.Opt(IDL.Nat)
270
+ });
271
+ const UploadChunkResult = IDL.Record({chunk_id: IDL.Nat});
272
+ return IDL.Service({
273
+ add_credits: IDL.Func([IDL.Principal, Tokens], [], []),
274
+ add_invitation_code: IDL.Func([IDL.Text], [], []),
275
+ assert_mission_control_center: IDL.Func([AssertMissionControlCenterArgs], [], []),
276
+ commit_asset_upload: IDL.Func([CommitBatch], [], []),
277
+ commit_proposal: IDL.Func([CommitProposal], [IDL.Null], []),
278
+ commit_proposal_asset_upload: IDL.Func([CommitBatch], [], []),
279
+ count_proposals: IDL.Func([], [IDL.Nat64], []),
280
+ create_orbiter: IDL.Func([CreateCanisterArgs], [IDL.Principal], []),
281
+ create_satellite: IDL.Func([CreateCanisterArgs], [IDL.Principal], []),
282
+ del_controllers: IDL.Func([DeleteControllersArgs], [], []),
283
+ del_custom_domain: IDL.Func([IDL.Text], [], []),
284
+ delete_proposal_assets: IDL.Func([DeleteProposalAssets], [], []),
285
+ get_config: IDL.Func([], [Config], []),
286
+ get_create_orbiter_fee: IDL.Func([GetCreateCanisterFeeArgs], [IDL.Opt(Tokens)], []),
287
+ get_create_satellite_fee: IDL.Func([GetCreateCanisterFeeArgs], [IDL.Opt(Tokens)], []),
288
+ get_credits: IDL.Func([], [Tokens], []),
289
+ get_proposal: IDL.Func([IDL.Nat], [IDL.Opt(Proposal)], []),
290
+ get_storage_config: IDL.Func([], [StorageConfig], []),
291
+ get_user_mission_control_center: IDL.Func([], [IDL.Opt(MissionControl)], []),
292
+ http_request: IDL.Func([HttpRequest], [HttpResponse], []),
293
+ http_request_streaming_callback: IDL.Func(
294
+ [StreamingCallbackToken],
295
+ [StreamingCallbackHttpResponse],
296
+ []
297
+ ),
298
+ init_asset_upload: IDL.Func([InitAssetKey, IDL.Nat], [InitUploadResult], []),
299
+ init_proposal: IDL.Func([ProposalType], [IDL.Nat, Proposal], []),
300
+ init_proposal_asset_upload: IDL.Func([InitAssetKey, IDL.Nat], [InitUploadResult], []),
301
+ init_user_mission_control_center: IDL.Func([], [MissionControl], []),
302
+ list_assets: IDL.Func([IDL.Text, ListParams], [ListResults], []),
303
+ list_controllers: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))], []),
304
+ list_custom_domains: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Text, CustomDomain))], []),
305
+ list_payments: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Nat64, Payment))], []),
306
+ list_proposals: IDL.Func([ListProposalsParams], [ListProposalResults], []),
307
+ list_user_mission_control_centers: IDL.Func(
308
+ [],
309
+ [IDL.Vec(IDL.Tuple(IDL.Principal, MissionControl))],
310
+ []
311
+ ),
312
+ reject_proposal: IDL.Func([CommitProposal], [IDL.Null], []),
313
+ set_controllers: IDL.Func([SetControllersArgs], [], []),
314
+ set_custom_domain: IDL.Func([IDL.Text, IDL.Opt(IDL.Text)], [], []),
315
+ set_fee: IDL.Func([SegmentKind, Tokens], [], []),
316
+ set_storage_config: IDL.Func([SetStorageConfig], [StorageConfig], []),
317
+ submit_proposal: IDL.Func([IDL.Nat], [IDL.Nat, Proposal], []),
318
+ update_rate_config: IDL.Func([SegmentKind, RateConfig], [], []),
319
+ upload_asset_chunk: IDL.Func([UploadChunk], [UploadChunkResult], []),
320
+ upload_proposal_asset_chunk: IDL.Func([UploadChunk], [UploadChunkResult], [])
321
+ });
322
+ };
323
+ // @ts-ignore
324
+ export const init = ({IDL}) => {
325
+ return [];
326
+ };