@junobuild/ic-client 0.0.1

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