@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,240 @@
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
+ }
25
+ export interface CommitBatch {
26
+ batch_id: bigint;
27
+ headers: Array<[string, string]>;
28
+ chunk_ids: Array<bigint>;
29
+ }
30
+ export interface Config {
31
+ storage: StorageConfig;
32
+ }
33
+ export interface Controller {
34
+ updated_at: bigint;
35
+ metadata: Array<[string, string]>;
36
+ created_at: bigint;
37
+ scope: ControllerScope;
38
+ expires_at: [] | [bigint];
39
+ }
40
+ export type ControllerScope = {Write: null} | {Admin: null};
41
+ export interface CustomDomain {
42
+ updated_at: bigint;
43
+ created_at: bigint;
44
+ bn_id: [] | [string];
45
+ }
46
+ export interface DelDoc {
47
+ updated_at: [] | [bigint];
48
+ }
49
+ export interface DeleteControllersArgs {
50
+ controllers: Array<Principal>;
51
+ }
52
+ export interface DepositCyclesArgs {
53
+ cycles: bigint;
54
+ destination_id: Principal;
55
+ }
56
+ export interface Doc {
57
+ updated_at: bigint;
58
+ owner: Principal;
59
+ data: Uint8Array | number[];
60
+ description: [] | [string];
61
+ created_at: bigint;
62
+ }
63
+ export interface HttpRequest {
64
+ url: string;
65
+ method: string;
66
+ body: Uint8Array | number[];
67
+ headers: Array<[string, string]>;
68
+ certificate_version: [] | [number];
69
+ }
70
+ export interface HttpResponse {
71
+ body: Uint8Array | number[];
72
+ headers: Array<[string, string]>;
73
+ streaming_strategy: [] | [StreamingStrategy];
74
+ status_code: number;
75
+ }
76
+ export interface InitAssetKey {
77
+ token: [] | [string];
78
+ collection: string;
79
+ name: string;
80
+ description: [] | [string];
81
+ encoding_type: [] | [string];
82
+ full_path: string;
83
+ }
84
+ export interface InitUploadResult {
85
+ batch_id: bigint;
86
+ }
87
+ export interface ListMatcher {
88
+ key: [] | [string];
89
+ description: [] | [string];
90
+ }
91
+ export interface ListOrder {
92
+ field: ListOrderField;
93
+ desc: boolean;
94
+ }
95
+ export type ListOrderField = {UpdatedAt: null} | {Keys: null} | {CreatedAt: null};
96
+ export interface ListPaginate {
97
+ start_after: [] | [string];
98
+ limit: [] | [bigint];
99
+ }
100
+ export interface ListParams {
101
+ order: [] | [ListOrder];
102
+ owner: [] | [Principal];
103
+ matcher: [] | [ListMatcher];
104
+ paginate: [] | [ListPaginate];
105
+ }
106
+ export interface ListResults {
107
+ matches_pages: [] | [bigint];
108
+ matches_length: bigint;
109
+ items_page: [] | [bigint];
110
+ items: Array<[string, AssetNoContent]>;
111
+ items_length: bigint;
112
+ }
113
+ export interface ListResults_1 {
114
+ matches_pages: [] | [bigint];
115
+ matches_length: bigint;
116
+ items_page: [] | [bigint];
117
+ items: Array<[string, Doc]>;
118
+ items_length: bigint;
119
+ }
120
+ export type Memory = {Heap: null} | {Stable: null};
121
+ export interface MemorySize {
122
+ stable: bigint;
123
+ heap: bigint;
124
+ }
125
+ export type Permission = {Controllers: null} | {Private: null} | {Public: null} | {Managed: null};
126
+ export interface Rule {
127
+ max_capacity: [] | [number];
128
+ memory: [] | [Memory];
129
+ updated_at: bigint;
130
+ max_size: [] | [bigint];
131
+ read: Permission;
132
+ created_at: bigint;
133
+ mutable_permissions: [] | [boolean];
134
+ write: Permission;
135
+ }
136
+ export type RulesType = {Db: null} | {Storage: null};
137
+ export interface SetController {
138
+ metadata: Array<[string, string]>;
139
+ scope: ControllerScope;
140
+ expires_at: [] | [bigint];
141
+ }
142
+ export interface SetControllersArgs {
143
+ controller: SetController;
144
+ controllers: Array<Principal>;
145
+ }
146
+ export interface SetDoc {
147
+ updated_at: [] | [bigint];
148
+ data: Uint8Array | number[];
149
+ description: [] | [string];
150
+ }
151
+ export interface SetRule {
152
+ max_capacity: [] | [number];
153
+ memory: [] | [Memory];
154
+ updated_at: [] | [bigint];
155
+ max_size: [] | [bigint];
156
+ read: Permission;
157
+ mutable_permissions: [] | [boolean];
158
+ write: Permission;
159
+ }
160
+ export interface StorageConfig {
161
+ iframe: [] | [StorageConfigIFrame];
162
+ rewrites: Array<[string, string]>;
163
+ headers: Array<[string, Array<[string, string]>]>;
164
+ redirects: [] | [Array<[string, StorageConfigRedirect]>];
165
+ }
166
+ export type StorageConfigIFrame = {Deny: null} | {AllowAny: null} | {SameOrigin: null};
167
+ export interface StorageConfigRedirect {
168
+ status_code: number;
169
+ location: string;
170
+ }
171
+ export interface StreamingCallbackHttpResponse {
172
+ token: [] | [StreamingCallbackToken];
173
+ body: Uint8Array | number[];
174
+ }
175
+ export interface StreamingCallbackToken {
176
+ memory: Memory;
177
+ token: [] | [string];
178
+ sha256: [] | [Uint8Array | number[]];
179
+ headers: Array<[string, string]>;
180
+ index: bigint;
181
+ encoding_type: string;
182
+ full_path: string;
183
+ }
184
+ export type StreamingStrategy = {
185
+ Callback: {
186
+ token: StreamingCallbackToken;
187
+ callback: [Principal, string];
188
+ };
189
+ };
190
+ export interface UploadChunk {
191
+ content: Uint8Array | number[];
192
+ batch_id: bigint;
193
+ order_id: [] | [bigint];
194
+ }
195
+ export interface UploadChunkResult {
196
+ chunk_id: bigint;
197
+ }
198
+ export interface _SERVICE {
199
+ build_version: ActorMethod<[], string>;
200
+ commit_asset_upload: ActorMethod<[CommitBatch], undefined>;
201
+ count_assets: ActorMethod<[string], bigint>;
202
+ count_docs: ActorMethod<[string], bigint>;
203
+ del_asset: ActorMethod<[string, string], undefined>;
204
+ del_assets: ActorMethod<[string], undefined>;
205
+ del_controllers: ActorMethod<[DeleteControllersArgs], Array<[Principal, Controller]>>;
206
+ del_custom_domain: ActorMethod<[string], undefined>;
207
+ del_doc: ActorMethod<[string, string, DelDoc], undefined>;
208
+ del_docs: ActorMethod<[string], undefined>;
209
+ del_many_assets: ActorMethod<[Array<[string, string]>], undefined>;
210
+ del_many_docs: ActorMethod<[Array<[string, string, DelDoc]>], undefined>;
211
+ del_rule: ActorMethod<[RulesType, string, DelDoc], undefined>;
212
+ deposit_cycles: ActorMethod<[DepositCyclesArgs], undefined>;
213
+ get_asset: ActorMethod<[string, string], [] | [AssetNoContent]>;
214
+ get_config: ActorMethod<[], Config>;
215
+ get_doc: ActorMethod<[string, string], [] | [Doc]>;
216
+ get_many_assets: ActorMethod<[Array<[string, string]>], Array<[string, [] | [AssetNoContent]]>>;
217
+ get_many_docs: ActorMethod<[Array<[string, string]>], Array<[string, [] | [Doc]]>>;
218
+ http_request: ActorMethod<[HttpRequest], HttpResponse>;
219
+ http_request_streaming_callback: ActorMethod<
220
+ [StreamingCallbackToken],
221
+ StreamingCallbackHttpResponse
222
+ >;
223
+ init_asset_upload: ActorMethod<[InitAssetKey], InitUploadResult>;
224
+ list_assets: ActorMethod<[string, ListParams], ListResults>;
225
+ list_controllers: ActorMethod<[], Array<[Principal, Controller]>>;
226
+ list_custom_domains: ActorMethod<[], Array<[string, CustomDomain]>>;
227
+ list_docs: ActorMethod<[string, ListParams], ListResults_1>;
228
+ list_rules: ActorMethod<[RulesType], Array<[string, Rule]>>;
229
+ memory_size: ActorMethod<[], MemorySize>;
230
+ set_config: ActorMethod<[Config], undefined>;
231
+ set_controllers: ActorMethod<[SetControllersArgs], Array<[Principal, Controller]>>;
232
+ set_custom_domain: ActorMethod<[string, [] | [string]], undefined>;
233
+ set_doc: ActorMethod<[string, string, SetDoc], Doc>;
234
+ set_many_docs: ActorMethod<[Array<[string, string, SetDoc]>], Array<[string, Doc]>>;
235
+ set_rule: ActorMethod<[RulesType, string, SetRule], undefined>;
236
+ upload_asset_chunk: ActorMethod<[UploadChunk], UploadChunkResult>;
237
+ version: ActorMethod<[], string>;
238
+ }
239
+ export declare const idlFactory: IDL.InterfaceFactory;
240
+ export declare const init: (args: {IDL: typeof IDL}) => IDL.Type[];
@@ -0,0 +1,264 @@
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({updated_at: 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
+ });
48
+ const StorageConfigIFrame = IDL.Variant({
49
+ Deny: IDL.Null,
50
+ AllowAny: IDL.Null,
51
+ SameOrigin: IDL.Null
52
+ });
53
+ const StorageConfigRedirect = IDL.Record({
54
+ status_code: IDL.Nat16,
55
+ location: IDL.Text
56
+ });
57
+ const StorageConfig = IDL.Record({
58
+ iframe: IDL.Opt(StorageConfigIFrame),
59
+ rewrites: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
60
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)))),
61
+ redirects: IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Text, StorageConfigRedirect)))
62
+ });
63
+ const Config = IDL.Record({storage: StorageConfig});
64
+ const Doc = IDL.Record({
65
+ updated_at: IDL.Nat64,
66
+ owner: IDL.Principal,
67
+ data: IDL.Vec(IDL.Nat8),
68
+ description: IDL.Opt(IDL.Text),
69
+ created_at: IDL.Nat64
70
+ });
71
+ const HttpRequest = IDL.Record({
72
+ url: IDL.Text,
73
+ method: IDL.Text,
74
+ body: IDL.Vec(IDL.Nat8),
75
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
76
+ certificate_version: IDL.Opt(IDL.Nat16)
77
+ });
78
+ const Memory = IDL.Variant({Heap: IDL.Null, Stable: IDL.Null});
79
+ const StreamingCallbackToken = IDL.Record({
80
+ memory: Memory,
81
+ token: IDL.Opt(IDL.Text),
82
+ sha256: IDL.Opt(IDL.Vec(IDL.Nat8)),
83
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
84
+ index: IDL.Nat64,
85
+ encoding_type: IDL.Text,
86
+ full_path: IDL.Text
87
+ });
88
+ const StreamingStrategy = IDL.Variant({
89
+ Callback: IDL.Record({
90
+ token: StreamingCallbackToken,
91
+ callback: IDL.Func([], [], ['query'])
92
+ })
93
+ });
94
+ const HttpResponse = IDL.Record({
95
+ body: IDL.Vec(IDL.Nat8),
96
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
97
+ streaming_strategy: IDL.Opt(StreamingStrategy),
98
+ status_code: IDL.Nat16
99
+ });
100
+ const StreamingCallbackHttpResponse = IDL.Record({
101
+ token: IDL.Opt(StreamingCallbackToken),
102
+ body: IDL.Vec(IDL.Nat8)
103
+ });
104
+ const InitAssetKey = IDL.Record({
105
+ token: IDL.Opt(IDL.Text),
106
+ collection: IDL.Text,
107
+ name: IDL.Text,
108
+ description: IDL.Opt(IDL.Text),
109
+ encoding_type: IDL.Opt(IDL.Text),
110
+ full_path: IDL.Text
111
+ });
112
+ const InitUploadResult = IDL.Record({batch_id: IDL.Nat});
113
+ const ListOrderField = IDL.Variant({
114
+ UpdatedAt: IDL.Null,
115
+ Keys: IDL.Null,
116
+ CreatedAt: IDL.Null
117
+ });
118
+ const ListOrder = IDL.Record({field: ListOrderField, desc: IDL.Bool});
119
+ const ListMatcher = IDL.Record({
120
+ key: IDL.Opt(IDL.Text),
121
+ description: IDL.Opt(IDL.Text)
122
+ });
123
+ const ListPaginate = IDL.Record({
124
+ start_after: IDL.Opt(IDL.Text),
125
+ limit: IDL.Opt(IDL.Nat64)
126
+ });
127
+ const ListParams = IDL.Record({
128
+ order: IDL.Opt(ListOrder),
129
+ owner: IDL.Opt(IDL.Principal),
130
+ matcher: IDL.Opt(ListMatcher),
131
+ paginate: IDL.Opt(ListPaginate)
132
+ });
133
+ const ListResults = IDL.Record({
134
+ matches_pages: IDL.Opt(IDL.Nat64),
135
+ matches_length: IDL.Nat64,
136
+ items_page: IDL.Opt(IDL.Nat64),
137
+ items: IDL.Vec(IDL.Tuple(IDL.Text, AssetNoContent)),
138
+ items_length: IDL.Nat64
139
+ });
140
+ const CustomDomain = IDL.Record({
141
+ updated_at: IDL.Nat64,
142
+ created_at: IDL.Nat64,
143
+ bn_id: IDL.Opt(IDL.Text)
144
+ });
145
+ const ListResults_1 = IDL.Record({
146
+ matches_pages: IDL.Opt(IDL.Nat64),
147
+ matches_length: IDL.Nat64,
148
+ items_page: IDL.Opt(IDL.Nat64),
149
+ items: IDL.Vec(IDL.Tuple(IDL.Text, Doc)),
150
+ items_length: IDL.Nat64
151
+ });
152
+ const Permission = IDL.Variant({
153
+ Controllers: IDL.Null,
154
+ Private: IDL.Null,
155
+ Public: IDL.Null,
156
+ Managed: IDL.Null
157
+ });
158
+ const Rule = IDL.Record({
159
+ max_capacity: IDL.Opt(IDL.Nat32),
160
+ memory: IDL.Opt(Memory),
161
+ updated_at: IDL.Nat64,
162
+ max_size: IDL.Opt(IDL.Nat),
163
+ read: Permission,
164
+ created_at: IDL.Nat64,
165
+ mutable_permissions: IDL.Opt(IDL.Bool),
166
+ write: Permission
167
+ });
168
+ const MemorySize = IDL.Record({stable: IDL.Nat64, heap: IDL.Nat64});
169
+ const SetController = IDL.Record({
170
+ metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
171
+ scope: ControllerScope,
172
+ expires_at: IDL.Opt(IDL.Nat64)
173
+ });
174
+ const SetControllersArgs = IDL.Record({
175
+ controller: SetController,
176
+ controllers: IDL.Vec(IDL.Principal)
177
+ });
178
+ const SetDoc = IDL.Record({
179
+ updated_at: IDL.Opt(IDL.Nat64),
180
+ data: IDL.Vec(IDL.Nat8),
181
+ description: IDL.Opt(IDL.Text)
182
+ });
183
+ const SetRule = IDL.Record({
184
+ max_capacity: IDL.Opt(IDL.Nat32),
185
+ memory: IDL.Opt(Memory),
186
+ updated_at: IDL.Opt(IDL.Nat64),
187
+ max_size: IDL.Opt(IDL.Nat),
188
+ read: Permission,
189
+ mutable_permissions: IDL.Opt(IDL.Bool),
190
+ write: Permission
191
+ });
192
+ const UploadChunk = IDL.Record({
193
+ content: IDL.Vec(IDL.Nat8),
194
+ batch_id: IDL.Nat,
195
+ order_id: IDL.Opt(IDL.Nat)
196
+ });
197
+ const UploadChunkResult = IDL.Record({chunk_id: IDL.Nat});
198
+ return IDL.Service({
199
+ build_version: IDL.Func([], [IDL.Text], ['query']),
200
+ commit_asset_upload: IDL.Func([CommitBatch], [], []),
201
+ count_assets: IDL.Func([IDL.Text], [IDL.Nat64], ['query']),
202
+ count_docs: IDL.Func([IDL.Text], [IDL.Nat64], ['query']),
203
+ del_asset: IDL.Func([IDL.Text, IDL.Text], [], []),
204
+ del_assets: IDL.Func([IDL.Text], [], []),
205
+ del_controllers: IDL.Func(
206
+ [DeleteControllersArgs],
207
+ [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
208
+ []
209
+ ),
210
+ del_custom_domain: IDL.Func([IDL.Text], [], []),
211
+ del_doc: IDL.Func([IDL.Text, IDL.Text, DelDoc], [], []),
212
+ del_docs: IDL.Func([IDL.Text], [], []),
213
+ del_many_assets: IDL.Func([IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))], [], []),
214
+ del_many_docs: IDL.Func([IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text, DelDoc))], [], []),
215
+ del_rule: IDL.Func([RulesType, IDL.Text, DelDoc], [], []),
216
+ deposit_cycles: IDL.Func([DepositCyclesArgs], [], []),
217
+ get_asset: IDL.Func([IDL.Text, IDL.Text], [IDL.Opt(AssetNoContent)], ['query']),
218
+ get_config: IDL.Func([], [Config], []),
219
+ get_doc: IDL.Func([IDL.Text, IDL.Text], [IDL.Opt(Doc)], ['query']),
220
+ get_many_assets: IDL.Func(
221
+ [IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))],
222
+ [IDL.Vec(IDL.Tuple(IDL.Text, IDL.Opt(AssetNoContent)))],
223
+ ['query']
224
+ ),
225
+ get_many_docs: IDL.Func(
226
+ [IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))],
227
+ [IDL.Vec(IDL.Tuple(IDL.Text, IDL.Opt(Doc)))],
228
+ ['query']
229
+ ),
230
+ http_request: IDL.Func([HttpRequest], [HttpResponse], ['query']),
231
+ http_request_streaming_callback: IDL.Func(
232
+ [StreamingCallbackToken],
233
+ [StreamingCallbackHttpResponse],
234
+ ['query']
235
+ ),
236
+ init_asset_upload: IDL.Func([InitAssetKey], [InitUploadResult], []),
237
+ list_assets: IDL.Func([IDL.Text, ListParams], [ListResults], ['query']),
238
+ list_controllers: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))], ['query']),
239
+ list_custom_domains: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Text, CustomDomain))], ['query']),
240
+ list_docs: IDL.Func([IDL.Text, ListParams], [ListResults_1], ['query']),
241
+ list_rules: IDL.Func([RulesType], [IDL.Vec(IDL.Tuple(IDL.Text, Rule))], ['query']),
242
+ memory_size: IDL.Func([], [MemorySize], ['query']),
243
+ set_config: IDL.Func([Config], [], []),
244
+ set_controllers: IDL.Func(
245
+ [SetControllersArgs],
246
+ [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
247
+ []
248
+ ),
249
+ set_custom_domain: IDL.Func([IDL.Text, IDL.Opt(IDL.Text)], [], []),
250
+ set_doc: IDL.Func([IDL.Text, IDL.Text, SetDoc], [Doc], []),
251
+ set_many_docs: IDL.Func(
252
+ [IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text, SetDoc))],
253
+ [IDL.Vec(IDL.Tuple(IDL.Text, Doc))],
254
+ []
255
+ ),
256
+ set_rule: IDL.Func([RulesType, IDL.Text, SetRule], [], []),
257
+ upload_asset_chunk: IDL.Func([UploadChunk], [UploadChunkResult], []),
258
+ version: IDL.Func([], [IDL.Text], ['query'])
259
+ });
260
+ };
261
+ // @ts-ignore
262
+ export const init = ({IDL}) => {
263
+ return [];
264
+ };