@junobuild/ic-client 1.2.0 → 2.0.0-next-2025-08-25

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 (157) hide show
  1. package/actor.d.ts +13 -0
  2. package/{dist/browser/index.js → actor.js} +2 -2
  3. package/{dist/browser/index.js.map → actor.js.map} +4 -4
  4. package/{dist/node/index.mjs → actor.mjs} +2 -2
  5. package/{dist/node/index.mjs.map → actor.mjs.map} +4 -4
  6. package/esbuild.mjs +5 -0
  7. package/index.d.ts +0 -0
  8. package/index.js +2 -0
  9. package/index.js.map +7 -0
  10. package/index.mjs +4 -0
  11. package/index.mjs.map +7 -0
  12. package/package.json +34 -22
  13. package/src/declarations/console/console.did.d.ts +313 -0
  14. package/src/declarations/console/console.factory.certified.did.js +329 -0
  15. package/src/declarations/console/console.factory.did.js +329 -0
  16. package/src/declarations/console/console.factory.did.mjs +329 -0
  17. package/src/declarations/deprecated/console-0-0-14.did.d.ts +267 -0
  18. package/src/declarations/deprecated/console-0-0-14.factory.did.js +285 -0
  19. package/src/declarations/deprecated/console-0-0-8-patch1.did.d.ts +75 -0
  20. package/src/declarations/deprecated/console-0-0-8-patch1.factory.did.js +80 -0
  21. package/src/declarations/deprecated/mission_control-0-0-13.did.d.ts +246 -0
  22. package/src/declarations/deprecated/mission_control-0-0-13.factory.did.js +280 -0
  23. package/src/declarations/deprecated/mission_control-0-0-14.did.d.ts +241 -0
  24. package/src/declarations/deprecated/mission_control-0-0-14.factory.did.js +258 -0
  25. package/src/declarations/deprecated/mission_control-0-0-4.did.d.ts +80 -0
  26. package/src/declarations/deprecated/mission_control-0-0-4.factory.did.js +99 -0
  27. package/src/declarations/deprecated/mission_control-deprecated-version.did.d.ts +231 -0
  28. package/src/declarations/deprecated/mission_control-deprecated-version.factory.did.js +247 -0
  29. package/src/declarations/deprecated/observatory-0-0-9.did.d.ts +70 -0
  30. package/src/declarations/deprecated/observatory-0-0-9.factory.did.js +76 -0
  31. package/src/declarations/deprecated/orbiter-0-0-6.did.d.ts +161 -0
  32. package/src/declarations/deprecated/orbiter-0-0-6.factory.did.js +192 -0
  33. package/src/declarations/deprecated/orbiter-0-0-7.did.d.ts +166 -0
  34. package/src/declarations/deprecated/orbiter-0-0-7.factory.did.js +197 -0
  35. package/src/declarations/deprecated/orbiter-0-0-8.did.d.ts +245 -0
  36. package/src/declarations/deprecated/orbiter-0-0-8.factory.did.js +287 -0
  37. package/src/declarations/deprecated/orbiter-0-2-0.did.d.ts +277 -0
  38. package/src/declarations/deprecated/orbiter-0-2-0.factory.did.js +319 -0
  39. package/src/declarations/deprecated/orbiter-deprecated-version.did.d.ts +229 -0
  40. package/src/declarations/deprecated/orbiter-deprecated-version.factory.did.js +271 -0
  41. package/src/declarations/deprecated/satellite-0-0-16.did.d.ts +240 -0
  42. package/src/declarations/deprecated/satellite-0-0-16.factory.did.js +264 -0
  43. package/src/declarations/deprecated/satellite-0-0-17.did.d.ts +254 -0
  44. package/src/declarations/deprecated/satellite-0-0-17.factory.did.js +281 -0
  45. package/src/declarations/deprecated/satellite-0-0-21.did.d.ts +299 -0
  46. package/src/declarations/deprecated/satellite-0-0-21.factory.did.js +333 -0
  47. package/src/declarations/deprecated/satellite-0-0-22.did.d.ts +290 -0
  48. package/src/declarations/deprecated/satellite-0-0-22.factory.did.js +318 -0
  49. package/src/declarations/deprecated/satellite-0-0-8.did.d.ts +183 -0
  50. package/src/declarations/deprecated/satellite-0-0-8.factory.did.js +194 -0
  51. package/src/declarations/deprecated/satellite-0-0-9.did.d.ts +199 -0
  52. package/src/declarations/deprecated/satellite-0-0-9.factory.did.js +213 -0
  53. package/src/declarations/deprecated/satellite-deprecated-no-scope.did.d.ts +183 -0
  54. package/src/declarations/deprecated/satellite-deprecated-no-scope.factory.did.js +194 -0
  55. package/src/declarations/deprecated/satellite-deprecated-no-scope.factory.did.mjs +192 -0
  56. package/src/declarations/deprecated/satellite-deprecated-version.did.d.ts +291 -0
  57. package/src/declarations/deprecated/satellite-deprecated-version.factory.did.js +319 -0
  58. package/src/declarations/deprecated/satellite-deprecated.did.d.ts +182 -0
  59. package/src/declarations/deprecated/satellite-deprecated.factory.did.js +191 -0
  60. package/src/declarations/deprecated/satellite-deprecated.factory.did.mjs +191 -0
  61. package/src/declarations/mission_control/mission_control.did.d.ts +244 -0
  62. package/src/declarations/mission_control/mission_control.factory.certified.did.js +261 -0
  63. package/src/declarations/mission_control/mission_control.factory.did.js +261 -0
  64. package/src/declarations/observatory/observatory.did.d.ts +86 -0
  65. package/src/declarations/observatory/observatory.factory.certified.did.js +93 -0
  66. package/src/declarations/observatory/observatory.factory.did.js +93 -0
  67. package/src/declarations/observatory/observatory.factory.did.mjs +93 -0
  68. package/src/declarations/orbiter/orbiter.did.d.ts +280 -0
  69. package/src/declarations/orbiter/orbiter.factory.certified.did.js +306 -0
  70. package/src/declarations/orbiter/orbiter.factory.did.js +322 -0
  71. package/src/declarations/orbiter/orbiter.factory.did.mjs +322 -0
  72. package/src/declarations/satellite/satellite.did.d.ts +404 -0
  73. package/src/declarations/satellite/satellite.factory.certified.did.js +425 -0
  74. package/src/declarations/satellite/satellite.factory.did.js +425 -0
  75. package/src/declarations/satellite/satellite.factory.did.mjs +425 -0
  76. package/src/declarations/sputnik/sputnik.did.d.ts +404 -0
  77. package/src/declarations/sputnik/sputnik.factory.certified.did.js +425 -0
  78. package/src/declarations/sputnik/sputnik.factory.did.js +425 -0
  79. package/utils.d.ts +1 -0
  80. package/utils.js +2 -0
  81. package/utils.js.map +7 -0
  82. package/utils.mjs +4 -0
  83. package/utils.mjs.map +7 -0
  84. package/dist/index.js +0 -1
  85. package/dist/types/index.d.ts +0 -14
  86. /package/{dist/types → actor}/api/actor.api.d.ts +0 -0
  87. /package/{dist/types → actor}/api/actor.factory.d.ts +0 -0
  88. /package/{dist/types → actor}/api/agent.api.d.ts +0 -0
  89. /package/{dist/types → actor}/types/actor.d.ts +0 -0
  90. /package/{dist/types → actor}/utils/agent.utils.d.ts +0 -0
  91. /package/{dist/declarations → declarations}/console/console.did.d.ts +0 -0
  92. /package/{dist/declarations → declarations}/console/console.factory.certified.did.js +0 -0
  93. /package/{dist/declarations → declarations}/console/console.factory.did.js +0 -0
  94. /package/{dist/declarations → declarations}/console/console.factory.did.mjs +0 -0
  95. /package/{dist/declarations → declarations}/deprecated/console-0-0-14.did.d.ts +0 -0
  96. /package/{dist/declarations → declarations}/deprecated/console-0-0-14.factory.did.js +0 -0
  97. /package/{dist/declarations → declarations}/deprecated/console-0-0-8-patch1.did.d.ts +0 -0
  98. /package/{dist/declarations → declarations}/deprecated/console-0-0-8-patch1.factory.did.js +0 -0
  99. /package/{dist/declarations → declarations}/deprecated/mission_control-0-0-13.did.d.ts +0 -0
  100. /package/{dist/declarations → declarations}/deprecated/mission_control-0-0-13.factory.did.js +0 -0
  101. /package/{dist/declarations → declarations}/deprecated/mission_control-0-0-14.did.d.ts +0 -0
  102. /package/{dist/declarations → declarations}/deprecated/mission_control-0-0-14.factory.did.js +0 -0
  103. /package/{dist/declarations → declarations}/deprecated/mission_control-0-0-4.did.d.ts +0 -0
  104. /package/{dist/declarations → declarations}/deprecated/mission_control-0-0-4.factory.did.js +0 -0
  105. /package/{dist/declarations → declarations}/deprecated/mission_control-deprecated-version.did.d.ts +0 -0
  106. /package/{dist/declarations → declarations}/deprecated/mission_control-deprecated-version.factory.did.js +0 -0
  107. /package/{dist/declarations → declarations}/deprecated/observatory-0-0-9.did.d.ts +0 -0
  108. /package/{dist/declarations → declarations}/deprecated/observatory-0-0-9.factory.did.js +0 -0
  109. /package/{dist/declarations → declarations}/deprecated/orbiter-0-0-6.did.d.ts +0 -0
  110. /package/{dist/declarations → declarations}/deprecated/orbiter-0-0-6.factory.did.js +0 -0
  111. /package/{dist/declarations → declarations}/deprecated/orbiter-0-0-7.did.d.ts +0 -0
  112. /package/{dist/declarations → declarations}/deprecated/orbiter-0-0-7.factory.did.js +0 -0
  113. /package/{dist/declarations → declarations}/deprecated/orbiter-0-0-8.did.d.ts +0 -0
  114. /package/{dist/declarations → declarations}/deprecated/orbiter-0-0-8.factory.did.js +0 -0
  115. /package/{dist/declarations → declarations}/deprecated/orbiter-0-2-0.did.d.ts +0 -0
  116. /package/{dist/declarations → declarations}/deprecated/orbiter-0-2-0.factory.did.js +0 -0
  117. /package/{dist/declarations → declarations}/deprecated/orbiter-deprecated-version.did.d.ts +0 -0
  118. /package/{dist/declarations → declarations}/deprecated/orbiter-deprecated-version.factory.did.js +0 -0
  119. /package/{dist/declarations → declarations}/deprecated/satellite-0-0-16.did.d.ts +0 -0
  120. /package/{dist/declarations → declarations}/deprecated/satellite-0-0-16.factory.did.js +0 -0
  121. /package/{dist/declarations → declarations}/deprecated/satellite-0-0-17.did.d.ts +0 -0
  122. /package/{dist/declarations → declarations}/deprecated/satellite-0-0-17.factory.did.js +0 -0
  123. /package/{dist/declarations → declarations}/deprecated/satellite-0-0-21.did.d.ts +0 -0
  124. /package/{dist/declarations → declarations}/deprecated/satellite-0-0-21.factory.did.js +0 -0
  125. /package/{dist/declarations → declarations}/deprecated/satellite-0-0-22.did.d.ts +0 -0
  126. /package/{dist/declarations → declarations}/deprecated/satellite-0-0-22.factory.did.js +0 -0
  127. /package/{dist/declarations → declarations}/deprecated/satellite-0-0-8.did.d.ts +0 -0
  128. /package/{dist/declarations → declarations}/deprecated/satellite-0-0-8.factory.did.js +0 -0
  129. /package/{dist/declarations → declarations}/deprecated/satellite-0-0-9.did.d.ts +0 -0
  130. /package/{dist/declarations → declarations}/deprecated/satellite-0-0-9.factory.did.js +0 -0
  131. /package/{dist/declarations → declarations}/deprecated/satellite-deprecated-no-scope.did.d.ts +0 -0
  132. /package/{dist/declarations → declarations}/deprecated/satellite-deprecated-no-scope.factory.did.js +0 -0
  133. /package/{dist/declarations → declarations}/deprecated/satellite-deprecated-no-scope.factory.did.mjs +0 -0
  134. /package/{dist/declarations → declarations}/deprecated/satellite-deprecated-version.did.d.ts +0 -0
  135. /package/{dist/declarations → declarations}/deprecated/satellite-deprecated-version.factory.did.js +0 -0
  136. /package/{dist/declarations → declarations}/deprecated/satellite-deprecated.did.d.ts +0 -0
  137. /package/{dist/declarations → declarations}/deprecated/satellite-deprecated.factory.did.js +0 -0
  138. /package/{dist/declarations → declarations}/deprecated/satellite-deprecated.factory.did.mjs +0 -0
  139. /package/{dist/declarations → declarations}/mission_control/mission_control.did.d.ts +0 -0
  140. /package/{dist/declarations → declarations}/mission_control/mission_control.factory.certified.did.js +0 -0
  141. /package/{dist/declarations → declarations}/mission_control/mission_control.factory.did.js +0 -0
  142. /package/{dist/declarations → declarations}/observatory/observatory.did.d.ts +0 -0
  143. /package/{dist/declarations → declarations}/observatory/observatory.factory.certified.did.js +0 -0
  144. /package/{dist/declarations → declarations}/observatory/observatory.factory.did.js +0 -0
  145. /package/{dist/declarations → declarations}/observatory/observatory.factory.did.mjs +0 -0
  146. /package/{dist/declarations → declarations}/orbiter/orbiter.did.d.ts +0 -0
  147. /package/{dist/declarations → declarations}/orbiter/orbiter.factory.certified.did.js +0 -0
  148. /package/{dist/declarations → declarations}/orbiter/orbiter.factory.did.js +0 -0
  149. /package/{dist/declarations → declarations}/orbiter/orbiter.factory.did.mjs +0 -0
  150. /package/{dist/declarations → declarations}/satellite/satellite.did.d.ts +0 -0
  151. /package/{dist/declarations → declarations}/satellite/satellite.factory.certified.did.js +0 -0
  152. /package/{dist/declarations → declarations}/satellite/satellite.factory.did.js +0 -0
  153. /package/{dist/declarations → declarations}/satellite/satellite.factory.did.mjs +0 -0
  154. /package/{dist/declarations → declarations}/sputnik/sputnik.did.d.ts +0 -0
  155. /package/{dist/declarations → declarations}/sputnik/sputnik.factory.certified.did.js +0 -0
  156. /package/{dist/declarations → declarations}/sputnik/sputnik.factory.did.js +0 -0
  157. /package/{dist/types/utils → utils}/principal.utils.d.ts +0 -0
@@ -0,0 +1,299 @@
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[];
@@ -0,0 +1,333 @@
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
+ };