@junobuild/core 0.1.9 → 0.1.10-next-2025-04-06

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 (26) hide show
  1. package/dist/browser/index.js +1 -1
  2. package/dist/browser/index.js.map +2 -2
  3. package/dist/declarations/deprecated/console-0-0-8-patch1.did.d.ts +75 -0
  4. package/dist/declarations/deprecated/console-0-0-8-patch1.factory.did.js +80 -0
  5. package/dist/declarations/deprecated/mission_control-0-0-13.did.d.ts +246 -0
  6. package/dist/declarations/deprecated/mission_control-0-0-13.factory.did.js +280 -0
  7. package/dist/declarations/deprecated/orbiter-0-0-6.did.d.ts +161 -0
  8. package/dist/declarations/deprecated/orbiter-0-0-6.factory.did.js +192 -0
  9. package/dist/declarations/deprecated/orbiter-0-0-7.did.d.ts +166 -0
  10. package/dist/declarations/deprecated/orbiter-0-0-7.factory.did.js +197 -0
  11. package/dist/declarations/deprecated/satellite-0-0-16.did.d.ts +240 -0
  12. package/dist/declarations/deprecated/satellite-0-0-16.factory.did.js +264 -0
  13. package/dist/declarations/deprecated/satellite-0-0-17.did.d.ts +254 -0
  14. package/dist/declarations/deprecated/satellite-0-0-17.factory.did.js +281 -0
  15. package/dist/declarations/deprecated/satellite-0-0-21.did.d.ts +299 -0
  16. package/dist/declarations/deprecated/satellite-0-0-21.factory.did.js +333 -0
  17. package/dist/declarations/satellite/satellite.factory.certified.did.js +319 -0
  18. package/dist/declarations/sputnik/sputnik.did.d.ts +291 -0
  19. package/dist/declarations/sputnik/sputnik.factory.certified.did.js +319 -0
  20. package/dist/declarations/sputnik/sputnik.factory.did.js +319 -0
  21. package/dist/node/index.mjs +1 -1
  22. package/dist/node/index.mjs.map +2 -2
  23. package/dist/types/api/actor.api.d.ts +1 -1
  24. package/dist/types/services/factory.services.d.ts +1 -1
  25. package/dist/types/types/doc.types.d.ts +1 -1
  26. package/package.json +8 -8
@@ -0,0 +1,319 @@
1
+ // @ts-ignore
2
+ export const idlFactory = ({IDL}) => {
3
+ const CommitBatch = IDL.Record({
4
+ batch_id: IDL.Nat,
5
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
6
+ chunk_ids: IDL.Vec(IDL.Nat)
7
+ });
8
+ const ListOrderField = IDL.Variant({
9
+ UpdatedAt: IDL.Null,
10
+ Keys: IDL.Null,
11
+ CreatedAt: IDL.Null
12
+ });
13
+ const ListOrder = IDL.Record({field: ListOrderField, desc: IDL.Bool});
14
+ const TimestampMatcher = IDL.Variant({
15
+ Equal: IDL.Nat64,
16
+ Between: IDL.Tuple(IDL.Nat64, IDL.Nat64),
17
+ GreaterThan: IDL.Nat64,
18
+ LessThan: IDL.Nat64
19
+ });
20
+ const ListMatcher = IDL.Record({
21
+ key: IDL.Opt(IDL.Text),
22
+ updated_at: IDL.Opt(TimestampMatcher),
23
+ description: IDL.Opt(IDL.Text),
24
+ created_at: IDL.Opt(TimestampMatcher)
25
+ });
26
+ const ListPaginate = IDL.Record({
27
+ start_after: IDL.Opt(IDL.Text),
28
+ limit: IDL.Opt(IDL.Nat64)
29
+ });
30
+ const ListParams = IDL.Record({
31
+ order: IDL.Opt(ListOrder),
32
+ owner: IDL.Opt(IDL.Principal),
33
+ matcher: IDL.Opt(ListMatcher),
34
+ paginate: IDL.Opt(ListPaginate)
35
+ });
36
+ const DeleteControllersArgs = IDL.Record({
37
+ controllers: IDL.Vec(IDL.Principal)
38
+ });
39
+ const ControllerScope = IDL.Variant({
40
+ Write: IDL.Null,
41
+ Admin: IDL.Null
42
+ });
43
+ const Controller = IDL.Record({
44
+ updated_at: IDL.Nat64,
45
+ metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
46
+ created_at: IDL.Nat64,
47
+ scope: ControllerScope,
48
+ expires_at: IDL.Opt(IDL.Nat64)
49
+ });
50
+ const DelDoc = IDL.Record({version: IDL.Opt(IDL.Nat64)});
51
+ const CollectionType = IDL.Variant({Db: IDL.Null, Storage: IDL.Null});
52
+ const DelRule = IDL.Record({version: IDL.Opt(IDL.Nat64)});
53
+ const DepositCyclesArgs = IDL.Record({
54
+ cycles: IDL.Nat,
55
+ destination_id: IDL.Principal
56
+ });
57
+ const AssetKey = IDL.Record({
58
+ token: IDL.Opt(IDL.Text),
59
+ collection: IDL.Text,
60
+ owner: IDL.Principal,
61
+ name: IDL.Text,
62
+ description: IDL.Opt(IDL.Text),
63
+ full_path: IDL.Text
64
+ });
65
+ const AssetEncodingNoContent = IDL.Record({
66
+ modified: IDL.Nat64,
67
+ sha256: IDL.Vec(IDL.Nat8),
68
+ total_length: IDL.Nat
69
+ });
70
+ const AssetNoContent = IDL.Record({
71
+ key: AssetKey,
72
+ updated_at: IDL.Nat64,
73
+ encodings: IDL.Vec(IDL.Tuple(IDL.Text, AssetEncodingNoContent)),
74
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
75
+ created_at: IDL.Nat64,
76
+ version: IDL.Opt(IDL.Nat64)
77
+ });
78
+ const AuthenticationConfigInternetIdentity = IDL.Record({
79
+ derivation_origin: IDL.Opt(IDL.Text),
80
+ external_alternative_origins: IDL.Opt(IDL.Vec(IDL.Text))
81
+ });
82
+ const AuthenticationConfig = IDL.Record({
83
+ internet_identity: IDL.Opt(AuthenticationConfigInternetIdentity)
84
+ });
85
+ const ConfigMaxMemorySize = IDL.Record({
86
+ stable: IDL.Opt(IDL.Nat64),
87
+ heap: IDL.Opt(IDL.Nat64)
88
+ });
89
+ const DbConfig = IDL.Record({
90
+ max_memory_size: IDL.Opt(ConfigMaxMemorySize)
91
+ });
92
+ const StorageConfigIFrame = IDL.Variant({
93
+ Deny: IDL.Null,
94
+ AllowAny: IDL.Null,
95
+ SameOrigin: IDL.Null
96
+ });
97
+ const StorageConfigRawAccess = IDL.Variant({
98
+ Deny: IDL.Null,
99
+ Allow: IDL.Null
100
+ });
101
+ const StorageConfigRedirect = IDL.Record({
102
+ status_code: IDL.Nat16,
103
+ location: IDL.Text
104
+ });
105
+ const StorageConfig = IDL.Record({
106
+ iframe: IDL.Opt(StorageConfigIFrame),
107
+ rewrites: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
108
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)))),
109
+ max_memory_size: IDL.Opt(ConfigMaxMemorySize),
110
+ raw_access: IDL.Opt(StorageConfigRawAccess),
111
+ redirects: IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Text, StorageConfigRedirect)))
112
+ });
113
+ const Config = IDL.Record({
114
+ db: IDL.Opt(DbConfig),
115
+ authentication: IDL.Opt(AuthenticationConfig),
116
+ storage: StorageConfig
117
+ });
118
+ const Doc = IDL.Record({
119
+ updated_at: IDL.Nat64,
120
+ owner: IDL.Principal,
121
+ data: IDL.Vec(IDL.Nat8),
122
+ description: IDL.Opt(IDL.Text),
123
+ created_at: IDL.Nat64,
124
+ version: IDL.Opt(IDL.Nat64)
125
+ });
126
+ const Memory = IDL.Variant({Heap: IDL.Null, Stable: IDL.Null});
127
+ const Permission = IDL.Variant({
128
+ Controllers: IDL.Null,
129
+ Private: IDL.Null,
130
+ Public: IDL.Null,
131
+ Managed: IDL.Null
132
+ });
133
+ const RateConfig = IDL.Record({
134
+ max_tokens: IDL.Nat64,
135
+ time_per_token_ns: IDL.Nat64
136
+ });
137
+ const Rule = IDL.Record({
138
+ max_capacity: IDL.Opt(IDL.Nat32),
139
+ memory: IDL.Opt(Memory),
140
+ updated_at: IDL.Nat64,
141
+ max_size: IDL.Opt(IDL.Nat),
142
+ read: Permission,
143
+ created_at: IDL.Nat64,
144
+ version: IDL.Opt(IDL.Nat64),
145
+ mutable_permissions: IDL.Opt(IDL.Bool),
146
+ rate_config: IDL.Opt(RateConfig),
147
+ write: Permission,
148
+ max_changes_per_user: IDL.Opt(IDL.Nat32)
149
+ });
150
+ const HttpRequest = IDL.Record({
151
+ url: IDL.Text,
152
+ method: IDL.Text,
153
+ body: IDL.Vec(IDL.Nat8),
154
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
155
+ certificate_version: IDL.Opt(IDL.Nat16)
156
+ });
157
+ const StreamingCallbackToken = IDL.Record({
158
+ memory: Memory,
159
+ token: IDL.Opt(IDL.Text),
160
+ sha256: IDL.Opt(IDL.Vec(IDL.Nat8)),
161
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
162
+ index: IDL.Nat64,
163
+ encoding_type: IDL.Text,
164
+ full_path: IDL.Text
165
+ });
166
+ const StreamingStrategy = IDL.Variant({
167
+ Callback: IDL.Record({
168
+ token: StreamingCallbackToken,
169
+ callback: IDL.Func([], [], [])
170
+ })
171
+ });
172
+ const HttpResponse = IDL.Record({
173
+ body: IDL.Vec(IDL.Nat8),
174
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
175
+ streaming_strategy: IDL.Opt(StreamingStrategy),
176
+ status_code: IDL.Nat16
177
+ });
178
+ const StreamingCallbackHttpResponse = IDL.Record({
179
+ token: IDL.Opt(StreamingCallbackToken),
180
+ body: IDL.Vec(IDL.Nat8)
181
+ });
182
+ const InitAssetKey = IDL.Record({
183
+ token: IDL.Opt(IDL.Text),
184
+ collection: IDL.Text,
185
+ name: IDL.Text,
186
+ description: IDL.Opt(IDL.Text),
187
+ encoding_type: IDL.Opt(IDL.Text),
188
+ full_path: IDL.Text
189
+ });
190
+ const InitUploadResult = IDL.Record({batch_id: IDL.Nat});
191
+ const ListResults = IDL.Record({
192
+ matches_pages: IDL.Opt(IDL.Nat64),
193
+ matches_length: IDL.Nat64,
194
+ items_page: IDL.Opt(IDL.Nat64),
195
+ items: IDL.Vec(IDL.Tuple(IDL.Text, AssetNoContent)),
196
+ items_length: IDL.Nat64
197
+ });
198
+ const CustomDomain = IDL.Record({
199
+ updated_at: IDL.Nat64,
200
+ created_at: IDL.Nat64,
201
+ version: IDL.Opt(IDL.Nat64),
202
+ bn_id: IDL.Opt(IDL.Text)
203
+ });
204
+ const ListResults_1 = IDL.Record({
205
+ matches_pages: IDL.Opt(IDL.Nat64),
206
+ matches_length: IDL.Nat64,
207
+ items_page: IDL.Opt(IDL.Nat64),
208
+ items: IDL.Vec(IDL.Tuple(IDL.Text, Doc)),
209
+ items_length: IDL.Nat64
210
+ });
211
+ const MemorySize = IDL.Record({stable: IDL.Nat64, heap: IDL.Nat64});
212
+ const SetController = IDL.Record({
213
+ metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
214
+ scope: ControllerScope,
215
+ expires_at: IDL.Opt(IDL.Nat64)
216
+ });
217
+ const SetControllersArgs = IDL.Record({
218
+ controller: SetController,
219
+ controllers: IDL.Vec(IDL.Principal)
220
+ });
221
+ const SetDoc = IDL.Record({
222
+ data: IDL.Vec(IDL.Nat8),
223
+ description: IDL.Opt(IDL.Text),
224
+ version: IDL.Opt(IDL.Nat64)
225
+ });
226
+ const SetRule = IDL.Record({
227
+ max_capacity: IDL.Opt(IDL.Nat32),
228
+ memory: IDL.Opt(Memory),
229
+ max_size: IDL.Opt(IDL.Nat),
230
+ read: Permission,
231
+ version: IDL.Opt(IDL.Nat64),
232
+ mutable_permissions: IDL.Opt(IDL.Bool),
233
+ rate_config: IDL.Opt(RateConfig),
234
+ write: Permission,
235
+ max_changes_per_user: IDL.Opt(IDL.Nat32)
236
+ });
237
+ const UploadChunk = IDL.Record({
238
+ content: IDL.Vec(IDL.Nat8),
239
+ batch_id: IDL.Nat,
240
+ order_id: IDL.Opt(IDL.Nat)
241
+ });
242
+ const UploadChunkResult = IDL.Record({chunk_id: IDL.Nat});
243
+ return IDL.Service({
244
+ build_version: IDL.Func([], [IDL.Text], []),
245
+ commit_asset_upload: IDL.Func([CommitBatch], [], []),
246
+ count_assets: IDL.Func([IDL.Text, ListParams], [IDL.Nat64], []),
247
+ count_collection_assets: IDL.Func([IDL.Text], [IDL.Nat64], []),
248
+ count_collection_docs: IDL.Func([IDL.Text], [IDL.Nat64], []),
249
+ count_docs: IDL.Func([IDL.Text, ListParams], [IDL.Nat64], []),
250
+ del_asset: IDL.Func([IDL.Text, IDL.Text], [], []),
251
+ del_assets: IDL.Func([IDL.Text], [], []),
252
+ del_controllers: IDL.Func(
253
+ [DeleteControllersArgs],
254
+ [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
255
+ []
256
+ ),
257
+ del_custom_domain: IDL.Func([IDL.Text], [], []),
258
+ del_doc: IDL.Func([IDL.Text, IDL.Text, DelDoc], [], []),
259
+ del_docs: IDL.Func([IDL.Text], [], []),
260
+ del_filtered_assets: IDL.Func([IDL.Text, ListParams], [], []),
261
+ del_filtered_docs: IDL.Func([IDL.Text, ListParams], [], []),
262
+ del_many_assets: IDL.Func([IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))], [], []),
263
+ del_many_docs: IDL.Func([IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text, DelDoc))], [], []),
264
+ del_rule: IDL.Func([CollectionType, IDL.Text, DelRule], [], []),
265
+ deposit_cycles: IDL.Func([DepositCyclesArgs], [], []),
266
+ get_asset: IDL.Func([IDL.Text, IDL.Text], [IDL.Opt(AssetNoContent)], []),
267
+ get_auth_config: IDL.Func([], [IDL.Opt(AuthenticationConfig)], []),
268
+ get_config: IDL.Func([], [Config], []),
269
+ get_db_config: IDL.Func([], [IDL.Opt(DbConfig)], []),
270
+ get_doc: IDL.Func([IDL.Text, IDL.Text], [IDL.Opt(Doc)], []),
271
+ get_many_assets: IDL.Func(
272
+ [IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))],
273
+ [IDL.Vec(IDL.Tuple(IDL.Text, IDL.Opt(AssetNoContent)))],
274
+ []
275
+ ),
276
+ get_many_docs: IDL.Func(
277
+ [IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))],
278
+ [IDL.Vec(IDL.Tuple(IDL.Text, IDL.Opt(Doc)))],
279
+ []
280
+ ),
281
+ get_rule: IDL.Func([CollectionType, IDL.Text], [IDL.Opt(Rule)], []),
282
+ get_storage_config: IDL.Func([], [StorageConfig], []),
283
+ http_request: IDL.Func([HttpRequest], [HttpResponse], []),
284
+ http_request_streaming_callback: IDL.Func(
285
+ [StreamingCallbackToken],
286
+ [StreamingCallbackHttpResponse],
287
+ []
288
+ ),
289
+ init_asset_upload: IDL.Func([InitAssetKey], [InitUploadResult], []),
290
+ list_assets: IDL.Func([IDL.Text, ListParams], [ListResults], []),
291
+ list_controllers: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))], []),
292
+ list_custom_domains: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Text, CustomDomain))], []),
293
+ list_docs: IDL.Func([IDL.Text, ListParams], [ListResults_1], []),
294
+ list_rules: IDL.Func([CollectionType], [IDL.Vec(IDL.Tuple(IDL.Text, Rule))], []),
295
+ memory_size: IDL.Func([], [MemorySize], []),
296
+ set_auth_config: IDL.Func([AuthenticationConfig], [], []),
297
+ set_controllers: IDL.Func(
298
+ [SetControllersArgs],
299
+ [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
300
+ []
301
+ ),
302
+ set_custom_domain: IDL.Func([IDL.Text, IDL.Opt(IDL.Text)], [], []),
303
+ set_db_config: IDL.Func([DbConfig], [], []),
304
+ set_doc: IDL.Func([IDL.Text, IDL.Text, SetDoc], [Doc], []),
305
+ set_many_docs: IDL.Func(
306
+ [IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text, SetDoc))],
307
+ [IDL.Vec(IDL.Tuple(IDL.Text, Doc))],
308
+ []
309
+ ),
310
+ set_rule: IDL.Func([CollectionType, IDL.Text, SetRule], [Rule], []),
311
+ set_storage_config: IDL.Func([StorageConfig], [], []),
312
+ upload_asset_chunk: IDL.Func([UploadChunk], [UploadChunkResult], []),
313
+ version: IDL.Func([], [IDL.Text], [])
314
+ });
315
+ };
316
+ // @ts-ignore
317
+ export const init = ({IDL}) => {
318
+ return [];
319
+ };
@@ -0,0 +1,319 @@
1
+ // @ts-ignore
2
+ export const idlFactory = ({IDL}) => {
3
+ const CommitBatch = IDL.Record({
4
+ batch_id: IDL.Nat,
5
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
6
+ chunk_ids: IDL.Vec(IDL.Nat)
7
+ });
8
+ const ListOrderField = IDL.Variant({
9
+ UpdatedAt: IDL.Null,
10
+ Keys: IDL.Null,
11
+ CreatedAt: IDL.Null
12
+ });
13
+ const ListOrder = IDL.Record({field: ListOrderField, desc: IDL.Bool});
14
+ const TimestampMatcher = IDL.Variant({
15
+ Equal: IDL.Nat64,
16
+ Between: IDL.Tuple(IDL.Nat64, IDL.Nat64),
17
+ GreaterThan: IDL.Nat64,
18
+ LessThan: IDL.Nat64
19
+ });
20
+ const ListMatcher = IDL.Record({
21
+ key: IDL.Opt(IDL.Text),
22
+ updated_at: IDL.Opt(TimestampMatcher),
23
+ description: IDL.Opt(IDL.Text),
24
+ created_at: IDL.Opt(TimestampMatcher)
25
+ });
26
+ const ListPaginate = IDL.Record({
27
+ start_after: IDL.Opt(IDL.Text),
28
+ limit: IDL.Opt(IDL.Nat64)
29
+ });
30
+ const ListParams = IDL.Record({
31
+ order: IDL.Opt(ListOrder),
32
+ owner: IDL.Opt(IDL.Principal),
33
+ matcher: IDL.Opt(ListMatcher),
34
+ paginate: IDL.Opt(ListPaginate)
35
+ });
36
+ const DeleteControllersArgs = IDL.Record({
37
+ controllers: IDL.Vec(IDL.Principal)
38
+ });
39
+ const ControllerScope = IDL.Variant({
40
+ Write: IDL.Null,
41
+ Admin: IDL.Null
42
+ });
43
+ const Controller = IDL.Record({
44
+ updated_at: IDL.Nat64,
45
+ metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
46
+ created_at: IDL.Nat64,
47
+ scope: ControllerScope,
48
+ expires_at: IDL.Opt(IDL.Nat64)
49
+ });
50
+ const DelDoc = IDL.Record({version: IDL.Opt(IDL.Nat64)});
51
+ const CollectionType = IDL.Variant({Db: IDL.Null, Storage: IDL.Null});
52
+ const DelRule = IDL.Record({version: IDL.Opt(IDL.Nat64)});
53
+ const DepositCyclesArgs = IDL.Record({
54
+ cycles: IDL.Nat,
55
+ destination_id: IDL.Principal
56
+ });
57
+ const AssetKey = IDL.Record({
58
+ token: IDL.Opt(IDL.Text),
59
+ collection: IDL.Text,
60
+ owner: IDL.Principal,
61
+ name: IDL.Text,
62
+ description: IDL.Opt(IDL.Text),
63
+ full_path: IDL.Text
64
+ });
65
+ const AssetEncodingNoContent = IDL.Record({
66
+ modified: IDL.Nat64,
67
+ sha256: IDL.Vec(IDL.Nat8),
68
+ total_length: IDL.Nat
69
+ });
70
+ const AssetNoContent = IDL.Record({
71
+ key: AssetKey,
72
+ updated_at: IDL.Nat64,
73
+ encodings: IDL.Vec(IDL.Tuple(IDL.Text, AssetEncodingNoContent)),
74
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
75
+ created_at: IDL.Nat64,
76
+ version: IDL.Opt(IDL.Nat64)
77
+ });
78
+ const AuthenticationConfigInternetIdentity = IDL.Record({
79
+ derivation_origin: IDL.Opt(IDL.Text),
80
+ external_alternative_origins: IDL.Opt(IDL.Vec(IDL.Text))
81
+ });
82
+ const AuthenticationConfig = IDL.Record({
83
+ internet_identity: IDL.Opt(AuthenticationConfigInternetIdentity)
84
+ });
85
+ const ConfigMaxMemorySize = IDL.Record({
86
+ stable: IDL.Opt(IDL.Nat64),
87
+ heap: IDL.Opt(IDL.Nat64)
88
+ });
89
+ const DbConfig = IDL.Record({
90
+ max_memory_size: IDL.Opt(ConfigMaxMemorySize)
91
+ });
92
+ const StorageConfigIFrame = IDL.Variant({
93
+ Deny: IDL.Null,
94
+ AllowAny: IDL.Null,
95
+ SameOrigin: IDL.Null
96
+ });
97
+ const StorageConfigRawAccess = IDL.Variant({
98
+ Deny: IDL.Null,
99
+ Allow: IDL.Null
100
+ });
101
+ const StorageConfigRedirect = IDL.Record({
102
+ status_code: IDL.Nat16,
103
+ location: IDL.Text
104
+ });
105
+ const StorageConfig = IDL.Record({
106
+ iframe: IDL.Opt(StorageConfigIFrame),
107
+ rewrites: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
108
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)))),
109
+ max_memory_size: IDL.Opt(ConfigMaxMemorySize),
110
+ raw_access: IDL.Opt(StorageConfigRawAccess),
111
+ redirects: IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Text, StorageConfigRedirect)))
112
+ });
113
+ const Config = IDL.Record({
114
+ db: IDL.Opt(DbConfig),
115
+ authentication: IDL.Opt(AuthenticationConfig),
116
+ storage: StorageConfig
117
+ });
118
+ const Doc = IDL.Record({
119
+ updated_at: IDL.Nat64,
120
+ owner: IDL.Principal,
121
+ data: IDL.Vec(IDL.Nat8),
122
+ description: IDL.Opt(IDL.Text),
123
+ created_at: IDL.Nat64,
124
+ version: IDL.Opt(IDL.Nat64)
125
+ });
126
+ const Memory = IDL.Variant({Heap: IDL.Null, Stable: IDL.Null});
127
+ const Permission = IDL.Variant({
128
+ Controllers: IDL.Null,
129
+ Private: IDL.Null,
130
+ Public: IDL.Null,
131
+ Managed: IDL.Null
132
+ });
133
+ const RateConfig = IDL.Record({
134
+ max_tokens: IDL.Nat64,
135
+ time_per_token_ns: IDL.Nat64
136
+ });
137
+ const Rule = IDL.Record({
138
+ max_capacity: IDL.Opt(IDL.Nat32),
139
+ memory: IDL.Opt(Memory),
140
+ updated_at: IDL.Nat64,
141
+ max_size: IDL.Opt(IDL.Nat),
142
+ read: Permission,
143
+ created_at: IDL.Nat64,
144
+ version: IDL.Opt(IDL.Nat64),
145
+ mutable_permissions: IDL.Opt(IDL.Bool),
146
+ rate_config: IDL.Opt(RateConfig),
147
+ write: Permission,
148
+ max_changes_per_user: IDL.Opt(IDL.Nat32)
149
+ });
150
+ const HttpRequest = IDL.Record({
151
+ url: IDL.Text,
152
+ method: IDL.Text,
153
+ body: IDL.Vec(IDL.Nat8),
154
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
155
+ certificate_version: IDL.Opt(IDL.Nat16)
156
+ });
157
+ const StreamingCallbackToken = IDL.Record({
158
+ memory: Memory,
159
+ token: IDL.Opt(IDL.Text),
160
+ sha256: IDL.Opt(IDL.Vec(IDL.Nat8)),
161
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
162
+ index: IDL.Nat64,
163
+ encoding_type: IDL.Text,
164
+ full_path: IDL.Text
165
+ });
166
+ const StreamingStrategy = IDL.Variant({
167
+ Callback: IDL.Record({
168
+ token: StreamingCallbackToken,
169
+ callback: IDL.Func([], [], ['query'])
170
+ })
171
+ });
172
+ const HttpResponse = IDL.Record({
173
+ body: IDL.Vec(IDL.Nat8),
174
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
175
+ streaming_strategy: IDL.Opt(StreamingStrategy),
176
+ status_code: IDL.Nat16
177
+ });
178
+ const StreamingCallbackHttpResponse = IDL.Record({
179
+ token: IDL.Opt(StreamingCallbackToken),
180
+ body: IDL.Vec(IDL.Nat8)
181
+ });
182
+ const InitAssetKey = IDL.Record({
183
+ token: IDL.Opt(IDL.Text),
184
+ collection: IDL.Text,
185
+ name: IDL.Text,
186
+ description: IDL.Opt(IDL.Text),
187
+ encoding_type: IDL.Opt(IDL.Text),
188
+ full_path: IDL.Text
189
+ });
190
+ const InitUploadResult = IDL.Record({batch_id: IDL.Nat});
191
+ const ListResults = IDL.Record({
192
+ matches_pages: IDL.Opt(IDL.Nat64),
193
+ matches_length: IDL.Nat64,
194
+ items_page: IDL.Opt(IDL.Nat64),
195
+ items: IDL.Vec(IDL.Tuple(IDL.Text, AssetNoContent)),
196
+ items_length: IDL.Nat64
197
+ });
198
+ const CustomDomain = IDL.Record({
199
+ updated_at: IDL.Nat64,
200
+ created_at: IDL.Nat64,
201
+ version: IDL.Opt(IDL.Nat64),
202
+ bn_id: IDL.Opt(IDL.Text)
203
+ });
204
+ const ListResults_1 = IDL.Record({
205
+ matches_pages: IDL.Opt(IDL.Nat64),
206
+ matches_length: IDL.Nat64,
207
+ items_page: IDL.Opt(IDL.Nat64),
208
+ items: IDL.Vec(IDL.Tuple(IDL.Text, Doc)),
209
+ items_length: IDL.Nat64
210
+ });
211
+ const MemorySize = IDL.Record({stable: IDL.Nat64, heap: IDL.Nat64});
212
+ const SetController = IDL.Record({
213
+ metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
214
+ scope: ControllerScope,
215
+ expires_at: IDL.Opt(IDL.Nat64)
216
+ });
217
+ const SetControllersArgs = IDL.Record({
218
+ controller: SetController,
219
+ controllers: IDL.Vec(IDL.Principal)
220
+ });
221
+ const SetDoc = IDL.Record({
222
+ data: IDL.Vec(IDL.Nat8),
223
+ description: IDL.Opt(IDL.Text),
224
+ version: IDL.Opt(IDL.Nat64)
225
+ });
226
+ const SetRule = IDL.Record({
227
+ max_capacity: IDL.Opt(IDL.Nat32),
228
+ memory: IDL.Opt(Memory),
229
+ max_size: IDL.Opt(IDL.Nat),
230
+ read: Permission,
231
+ version: IDL.Opt(IDL.Nat64),
232
+ mutable_permissions: IDL.Opt(IDL.Bool),
233
+ rate_config: IDL.Opt(RateConfig),
234
+ write: Permission,
235
+ max_changes_per_user: IDL.Opt(IDL.Nat32)
236
+ });
237
+ const UploadChunk = IDL.Record({
238
+ content: IDL.Vec(IDL.Nat8),
239
+ batch_id: IDL.Nat,
240
+ order_id: IDL.Opt(IDL.Nat)
241
+ });
242
+ const UploadChunkResult = IDL.Record({chunk_id: IDL.Nat});
243
+ return IDL.Service({
244
+ build_version: IDL.Func([], [IDL.Text], ['query']),
245
+ commit_asset_upload: IDL.Func([CommitBatch], [], []),
246
+ count_assets: IDL.Func([IDL.Text, ListParams], [IDL.Nat64], ['query']),
247
+ count_collection_assets: IDL.Func([IDL.Text], [IDL.Nat64], ['query']),
248
+ count_collection_docs: IDL.Func([IDL.Text], [IDL.Nat64], ['query']),
249
+ count_docs: IDL.Func([IDL.Text, ListParams], [IDL.Nat64], ['query']),
250
+ del_asset: IDL.Func([IDL.Text, IDL.Text], [], []),
251
+ del_assets: IDL.Func([IDL.Text], [], []),
252
+ del_controllers: IDL.Func(
253
+ [DeleteControllersArgs],
254
+ [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
255
+ []
256
+ ),
257
+ del_custom_domain: IDL.Func([IDL.Text], [], []),
258
+ del_doc: IDL.Func([IDL.Text, IDL.Text, DelDoc], [], []),
259
+ del_docs: IDL.Func([IDL.Text], [], []),
260
+ del_filtered_assets: IDL.Func([IDL.Text, ListParams], [], []),
261
+ del_filtered_docs: IDL.Func([IDL.Text, ListParams], [], []),
262
+ del_many_assets: IDL.Func([IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))], [], []),
263
+ del_many_docs: IDL.Func([IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text, DelDoc))], [], []),
264
+ del_rule: IDL.Func([CollectionType, IDL.Text, DelRule], [], []),
265
+ deposit_cycles: IDL.Func([DepositCyclesArgs], [], []),
266
+ get_asset: IDL.Func([IDL.Text, IDL.Text], [IDL.Opt(AssetNoContent)], ['query']),
267
+ get_auth_config: IDL.Func([], [IDL.Opt(AuthenticationConfig)], ['query']),
268
+ get_config: IDL.Func([], [Config], []),
269
+ get_db_config: IDL.Func([], [IDL.Opt(DbConfig)], ['query']),
270
+ get_doc: IDL.Func([IDL.Text, IDL.Text], [IDL.Opt(Doc)], ['query']),
271
+ get_many_assets: IDL.Func(
272
+ [IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))],
273
+ [IDL.Vec(IDL.Tuple(IDL.Text, IDL.Opt(AssetNoContent)))],
274
+ ['query']
275
+ ),
276
+ get_many_docs: IDL.Func(
277
+ [IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))],
278
+ [IDL.Vec(IDL.Tuple(IDL.Text, IDL.Opt(Doc)))],
279
+ ['query']
280
+ ),
281
+ get_rule: IDL.Func([CollectionType, IDL.Text], [IDL.Opt(Rule)], ['query']),
282
+ get_storage_config: IDL.Func([], [StorageConfig], ['query']),
283
+ http_request: IDL.Func([HttpRequest], [HttpResponse], ['query']),
284
+ http_request_streaming_callback: IDL.Func(
285
+ [StreamingCallbackToken],
286
+ [StreamingCallbackHttpResponse],
287
+ ['query']
288
+ ),
289
+ init_asset_upload: IDL.Func([InitAssetKey], [InitUploadResult], []),
290
+ list_assets: IDL.Func([IDL.Text, ListParams], [ListResults], ['query']),
291
+ list_controllers: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))], ['query']),
292
+ list_custom_domains: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Text, CustomDomain))], ['query']),
293
+ list_docs: IDL.Func([IDL.Text, ListParams], [ListResults_1], ['query']),
294
+ list_rules: IDL.Func([CollectionType], [IDL.Vec(IDL.Tuple(IDL.Text, Rule))], ['query']),
295
+ memory_size: IDL.Func([], [MemorySize], ['query']),
296
+ set_auth_config: IDL.Func([AuthenticationConfig], [], []),
297
+ set_controllers: IDL.Func(
298
+ [SetControllersArgs],
299
+ [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
300
+ []
301
+ ),
302
+ set_custom_domain: IDL.Func([IDL.Text, IDL.Opt(IDL.Text)], [], []),
303
+ set_db_config: IDL.Func([DbConfig], [], []),
304
+ set_doc: IDL.Func([IDL.Text, IDL.Text, SetDoc], [Doc], []),
305
+ set_many_docs: IDL.Func(
306
+ [IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text, SetDoc))],
307
+ [IDL.Vec(IDL.Tuple(IDL.Text, Doc))],
308
+ []
309
+ ),
310
+ set_rule: IDL.Func([CollectionType, IDL.Text, SetRule], [Rule], []),
311
+ set_storage_config: IDL.Func([StorageConfig], [], []),
312
+ upload_asset_chunk: IDL.Func([UploadChunk], [UploadChunkResult], []),
313
+ version: IDL.Func([], [IDL.Text], ['query'])
314
+ });
315
+ };
316
+ // @ts-ignore
317
+ export const init = ({IDL}) => {
318
+ return [];
319
+ };