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