@junobuild/cdn 0.2.3 → 1.0.0

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.
@@ -1,326 +0,0 @@
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
- };
@@ -1,326 +0,0 @@
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([], [], ['query'])
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], [], ['query']),
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], ['query']),
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], ['query']),
286
- get_create_orbiter_fee: IDL.Func([GetCreateCanisterFeeArgs], [IDL.Opt(Tokens)], ['query']),
287
- get_create_satellite_fee: IDL.Func([GetCreateCanisterFeeArgs], [IDL.Opt(Tokens)], ['query']),
288
- get_credits: IDL.Func([], [Tokens], ['query']),
289
- get_proposal: IDL.Func([IDL.Nat], [IDL.Opt(Proposal)], ['query']),
290
- get_storage_config: IDL.Func([], [StorageConfig], ['query']),
291
- get_user_mission_control_center: IDL.Func([], [IDL.Opt(MissionControl)], ['query']),
292
- http_request: IDL.Func([HttpRequest], [HttpResponse], ['query']),
293
- http_request_streaming_callback: IDL.Func(
294
- [StreamingCallbackToken],
295
- [StreamingCallbackHttpResponse],
296
- ['query']
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], ['query']),
303
- list_controllers: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))], ['query']),
304
- list_custom_domains: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Text, CustomDomain))], ['query']),
305
- list_payments: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Nat64, Payment))], ['query']),
306
- list_proposals: IDL.Func([ListProposalsParams], [ListProposalResults], ['query']),
307
- list_user_mission_control_centers: IDL.Func(
308
- [],
309
- [IDL.Vec(IDL.Tuple(IDL.Principal, MissionControl))],
310
- ['query']
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
- };