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