@junobuild/admin 0.0.52 → 0.0.53-next-2024-08-04.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.
- package/declarations/satellite/satellite.did.d.ts +25 -2
- package/declarations/satellite/satellite.factory.did.js +28 -4
- package/declarations/satellite/satellite.factory.did.mjs +28 -4
- package/dist/browser/index.js +7 -7
- package/dist/browser/index.js.map +4 -4
- package/dist/declarations/satellite/satellite.did.d.ts +25 -2
- package/dist/declarations/satellite/satellite.factory.did.js +28 -4
- package/dist/declarations/satellite/satellite.factory.did.mjs +28 -4
- package/dist/node/index.mjs +7 -7
- package/dist/node/index.mjs.map +4 -4
- package/dist/types/api/satellite.api.d.ts +13 -3
- package/dist/types/services/satellite.services.d.ts +23 -14
- package/dist/types/utils/memory.utils.d.ts +3 -0
- package/package.json +6 -6
|
@@ -35,8 +35,14 @@ export interface CommitBatch {
|
|
|
35
35
|
chunk_ids: Array<bigint>;
|
|
36
36
|
}
|
|
37
37
|
export interface Config {
|
|
38
|
+
db: [] | [DbConfig];
|
|
39
|
+
authentication: [] | [AuthenticationConfig];
|
|
38
40
|
storage: StorageConfig;
|
|
39
41
|
}
|
|
42
|
+
export interface ConfigMaxMemorySize {
|
|
43
|
+
stable: [] | [bigint];
|
|
44
|
+
heap: [] | [bigint];
|
|
45
|
+
}
|
|
40
46
|
export interface Controller {
|
|
41
47
|
updated_at: bigint;
|
|
42
48
|
metadata: Array<[string, string]>;
|
|
@@ -51,9 +57,15 @@ export interface CustomDomain {
|
|
|
51
57
|
version: [] | [bigint];
|
|
52
58
|
bn_id: [] | [string];
|
|
53
59
|
}
|
|
60
|
+
export interface DbConfig {
|
|
61
|
+
max_memory_size: [] | [ConfigMaxMemorySize];
|
|
62
|
+
}
|
|
54
63
|
export interface DelDoc {
|
|
55
64
|
version: [] | [bigint];
|
|
56
65
|
}
|
|
66
|
+
export interface DelRule {
|
|
67
|
+
version: [] | [bigint];
|
|
68
|
+
}
|
|
57
69
|
export interface DeleteControllersArgs {
|
|
58
70
|
controllers: Array<Principal>;
|
|
59
71
|
}
|
|
@@ -95,7 +107,9 @@ export interface InitUploadResult {
|
|
|
95
107
|
}
|
|
96
108
|
export interface ListMatcher {
|
|
97
109
|
key: [] | [string];
|
|
110
|
+
updated_at: [] | [TimestampMatcher];
|
|
98
111
|
description: [] | [string];
|
|
112
|
+
created_at: [] | [TimestampMatcher];
|
|
99
113
|
}
|
|
100
114
|
export interface ListOrder {
|
|
101
115
|
field: ListOrderField;
|
|
@@ -171,6 +185,7 @@ export interface StorageConfig {
|
|
|
171
185
|
iframe: [] | [StorageConfigIFrame];
|
|
172
186
|
rewrites: Array<[string, string]>;
|
|
173
187
|
headers: Array<[string, Array<[string, string]>]>;
|
|
188
|
+
max_memory_size: [] | [ConfigMaxMemorySize];
|
|
174
189
|
raw_access: [] | [StorageConfigRawAccess];
|
|
175
190
|
redirects: [] | [Array<[string, StorageConfigRedirect]>];
|
|
176
191
|
}
|
|
@@ -199,6 +214,11 @@ export type StreamingStrategy = {
|
|
|
199
214
|
callback: [Principal, string];
|
|
200
215
|
};
|
|
201
216
|
};
|
|
217
|
+
export type TimestampMatcher =
|
|
218
|
+
| {Equal: bigint}
|
|
219
|
+
| {Between: [bigint, bigint]}
|
|
220
|
+
| {GreaterThan: bigint}
|
|
221
|
+
| {LessThan: bigint};
|
|
202
222
|
export interface UploadChunk {
|
|
203
223
|
content: Uint8Array | number[];
|
|
204
224
|
batch_id: bigint;
|
|
@@ -220,14 +240,16 @@ export interface _SERVICE {
|
|
|
220
240
|
del_docs: ActorMethod<[string], undefined>;
|
|
221
241
|
del_many_assets: ActorMethod<[Array<[string, string]>], undefined>;
|
|
222
242
|
del_many_docs: ActorMethod<[Array<[string, string, DelDoc]>], undefined>;
|
|
223
|
-
del_rule: ActorMethod<[RulesType, string,
|
|
243
|
+
del_rule: ActorMethod<[RulesType, string, DelRule], undefined>;
|
|
224
244
|
deposit_cycles: ActorMethod<[DepositCyclesArgs], undefined>;
|
|
225
245
|
get_asset: ActorMethod<[string, string], [] | [AssetNoContent]>;
|
|
226
246
|
get_auth_config: ActorMethod<[], [] | [AuthenticationConfig]>;
|
|
227
247
|
get_config: ActorMethod<[], Config>;
|
|
248
|
+
get_db_config: ActorMethod<[], [] | [DbConfig]>;
|
|
228
249
|
get_doc: ActorMethod<[string, string], [] | [Doc]>;
|
|
229
250
|
get_many_assets: ActorMethod<[Array<[string, string]>], Array<[string, [] | [AssetNoContent]]>>;
|
|
230
251
|
get_many_docs: ActorMethod<[Array<[string, string]>], Array<[string, [] | [Doc]]>>;
|
|
252
|
+
get_storage_config: ActorMethod<[], StorageConfig>;
|
|
231
253
|
http_request: ActorMethod<[HttpRequest], HttpResponse>;
|
|
232
254
|
http_request_streaming_callback: ActorMethod<
|
|
233
255
|
[StreamingCallbackToken],
|
|
@@ -241,12 +263,13 @@ export interface _SERVICE {
|
|
|
241
263
|
list_rules: ActorMethod<[RulesType], Array<[string, Rule]>>;
|
|
242
264
|
memory_size: ActorMethod<[], MemorySize>;
|
|
243
265
|
set_auth_config: ActorMethod<[AuthenticationConfig], undefined>;
|
|
244
|
-
set_config: ActorMethod<[Config], undefined>;
|
|
245
266
|
set_controllers: ActorMethod<[SetControllersArgs], Array<[Principal, Controller]>>;
|
|
246
267
|
set_custom_domain: ActorMethod<[string, [] | [string]], undefined>;
|
|
268
|
+
set_db_config: ActorMethod<[DbConfig], undefined>;
|
|
247
269
|
set_doc: ActorMethod<[string, string, SetDoc], Doc>;
|
|
248
270
|
set_many_docs: ActorMethod<[Array<[string, string, SetDoc]>], Array<[string, Doc]>>;
|
|
249
271
|
set_rule: ActorMethod<[RulesType, string, SetRule], undefined>;
|
|
272
|
+
set_storage_config: ActorMethod<[StorageConfig], undefined>;
|
|
250
273
|
upload_asset_chunk: ActorMethod<[UploadChunk], UploadChunkResult>;
|
|
251
274
|
version: ActorMethod<[], string>;
|
|
252
275
|
}
|
|
@@ -21,6 +21,7 @@ export const idlFactory = ({IDL}) => {
|
|
|
21
21
|
});
|
|
22
22
|
const DelDoc = IDL.Record({version: IDL.Opt(IDL.Nat64)});
|
|
23
23
|
const RulesType = IDL.Variant({Db: IDL.Null, Storage: IDL.Null});
|
|
24
|
+
const DelRule = IDL.Record({version: IDL.Opt(IDL.Nat64)});
|
|
24
25
|
const DepositCyclesArgs = IDL.Record({
|
|
25
26
|
cycles: IDL.Nat,
|
|
26
27
|
destination_id: IDL.Principal
|
|
@@ -52,6 +53,13 @@ export const idlFactory = ({IDL}) => {
|
|
|
52
53
|
const AuthenticationConfig = IDL.Record({
|
|
53
54
|
internet_identity: IDL.Opt(AuthenticationConfigInternetIdentity)
|
|
54
55
|
});
|
|
56
|
+
const ConfigMaxMemorySize = IDL.Record({
|
|
57
|
+
stable: IDL.Opt(IDL.Nat64),
|
|
58
|
+
heap: IDL.Opt(IDL.Nat64)
|
|
59
|
+
});
|
|
60
|
+
const DbConfig = IDL.Record({
|
|
61
|
+
max_memory_size: IDL.Opt(ConfigMaxMemorySize)
|
|
62
|
+
});
|
|
55
63
|
const StorageConfigIFrame = IDL.Variant({
|
|
56
64
|
Deny: IDL.Null,
|
|
57
65
|
AllowAny: IDL.Null,
|
|
@@ -69,10 +77,15 @@ export const idlFactory = ({IDL}) => {
|
|
|
69
77
|
iframe: IDL.Opt(StorageConfigIFrame),
|
|
70
78
|
rewrites: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
|
|
71
79
|
headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)))),
|
|
80
|
+
max_memory_size: IDL.Opt(ConfigMaxMemorySize),
|
|
72
81
|
raw_access: IDL.Opt(StorageConfigRawAccess),
|
|
73
82
|
redirects: IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Text, StorageConfigRedirect)))
|
|
74
83
|
});
|
|
75
|
-
const Config = IDL.Record({
|
|
84
|
+
const Config = IDL.Record({
|
|
85
|
+
db: IDL.Opt(DbConfig),
|
|
86
|
+
authentication: IDL.Opt(AuthenticationConfig),
|
|
87
|
+
storage: StorageConfig
|
|
88
|
+
});
|
|
76
89
|
const Doc = IDL.Record({
|
|
77
90
|
updated_at: IDL.Nat64,
|
|
78
91
|
owner: IDL.Principal,
|
|
@@ -129,9 +142,17 @@ export const idlFactory = ({IDL}) => {
|
|
|
129
142
|
CreatedAt: IDL.Null
|
|
130
143
|
});
|
|
131
144
|
const ListOrder = IDL.Record({field: ListOrderField, desc: IDL.Bool});
|
|
145
|
+
const TimestampMatcher = IDL.Variant({
|
|
146
|
+
Equal: IDL.Nat64,
|
|
147
|
+
Between: IDL.Tuple(IDL.Nat64, IDL.Nat64),
|
|
148
|
+
GreaterThan: IDL.Nat64,
|
|
149
|
+
LessThan: IDL.Nat64
|
|
150
|
+
});
|
|
132
151
|
const ListMatcher = IDL.Record({
|
|
133
152
|
key: IDL.Opt(IDL.Text),
|
|
134
|
-
|
|
153
|
+
updated_at: IDL.Opt(TimestampMatcher),
|
|
154
|
+
description: IDL.Opt(IDL.Text),
|
|
155
|
+
created_at: IDL.Opt(TimestampMatcher)
|
|
135
156
|
});
|
|
136
157
|
const ListPaginate = IDL.Record({
|
|
137
158
|
start_after: IDL.Opt(IDL.Text),
|
|
@@ -227,11 +248,12 @@ export const idlFactory = ({IDL}) => {
|
|
|
227
248
|
del_docs: IDL.Func([IDL.Text], [], []),
|
|
228
249
|
del_many_assets: IDL.Func([IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))], [], []),
|
|
229
250
|
del_many_docs: IDL.Func([IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text, DelDoc))], [], []),
|
|
230
|
-
del_rule: IDL.Func([RulesType, IDL.Text,
|
|
251
|
+
del_rule: IDL.Func([RulesType, IDL.Text, DelRule], [], []),
|
|
231
252
|
deposit_cycles: IDL.Func([DepositCyclesArgs], [], []),
|
|
232
253
|
get_asset: IDL.Func([IDL.Text, IDL.Text], [IDL.Opt(AssetNoContent)], ['query']),
|
|
233
254
|
get_auth_config: IDL.Func([], [IDL.Opt(AuthenticationConfig)], ['query']),
|
|
234
255
|
get_config: IDL.Func([], [Config], []),
|
|
256
|
+
get_db_config: IDL.Func([], [IDL.Opt(DbConfig)], ['query']),
|
|
235
257
|
get_doc: IDL.Func([IDL.Text, IDL.Text], [IDL.Opt(Doc)], ['query']),
|
|
236
258
|
get_many_assets: IDL.Func(
|
|
237
259
|
[IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))],
|
|
@@ -243,6 +265,7 @@ export const idlFactory = ({IDL}) => {
|
|
|
243
265
|
[IDL.Vec(IDL.Tuple(IDL.Text, IDL.Opt(Doc)))],
|
|
244
266
|
['query']
|
|
245
267
|
),
|
|
268
|
+
get_storage_config: IDL.Func([], [StorageConfig], ['query']),
|
|
246
269
|
http_request: IDL.Func([HttpRequest], [HttpResponse], ['query']),
|
|
247
270
|
http_request_streaming_callback: IDL.Func(
|
|
248
271
|
[StreamingCallbackToken],
|
|
@@ -257,13 +280,13 @@ export const idlFactory = ({IDL}) => {
|
|
|
257
280
|
list_rules: IDL.Func([RulesType], [IDL.Vec(IDL.Tuple(IDL.Text, Rule))], ['query']),
|
|
258
281
|
memory_size: IDL.Func([], [MemorySize], ['query']),
|
|
259
282
|
set_auth_config: IDL.Func([AuthenticationConfig], [], []),
|
|
260
|
-
set_config: IDL.Func([Config], [], []),
|
|
261
283
|
set_controllers: IDL.Func(
|
|
262
284
|
[SetControllersArgs],
|
|
263
285
|
[IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
|
|
264
286
|
[]
|
|
265
287
|
),
|
|
266
288
|
set_custom_domain: IDL.Func([IDL.Text, IDL.Opt(IDL.Text)], [], []),
|
|
289
|
+
set_db_config: IDL.Func([DbConfig], [], []),
|
|
267
290
|
set_doc: IDL.Func([IDL.Text, IDL.Text, SetDoc], [Doc], []),
|
|
268
291
|
set_many_docs: IDL.Func(
|
|
269
292
|
[IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text, SetDoc))],
|
|
@@ -271,6 +294,7 @@ export const idlFactory = ({IDL}) => {
|
|
|
271
294
|
[]
|
|
272
295
|
),
|
|
273
296
|
set_rule: IDL.Func([RulesType, IDL.Text, SetRule], [], []),
|
|
297
|
+
set_storage_config: IDL.Func([StorageConfig], [], []),
|
|
274
298
|
upload_asset_chunk: IDL.Func([UploadChunk], [UploadChunkResult], []),
|
|
275
299
|
version: IDL.Func([], [IDL.Text], ['query'])
|
|
276
300
|
});
|
|
@@ -21,6 +21,7 @@ export const idlFactory = ({IDL}) => {
|
|
|
21
21
|
});
|
|
22
22
|
const DelDoc = IDL.Record({version: IDL.Opt(IDL.Nat64)});
|
|
23
23
|
const RulesType = IDL.Variant({Db: IDL.Null, Storage: IDL.Null});
|
|
24
|
+
const DelRule = IDL.Record({version: IDL.Opt(IDL.Nat64)});
|
|
24
25
|
const DepositCyclesArgs = IDL.Record({
|
|
25
26
|
cycles: IDL.Nat,
|
|
26
27
|
destination_id: IDL.Principal
|
|
@@ -52,6 +53,13 @@ export const idlFactory = ({IDL}) => {
|
|
|
52
53
|
const AuthenticationConfig = IDL.Record({
|
|
53
54
|
internet_identity: IDL.Opt(AuthenticationConfigInternetIdentity)
|
|
54
55
|
});
|
|
56
|
+
const ConfigMaxMemorySize = IDL.Record({
|
|
57
|
+
stable: IDL.Opt(IDL.Nat64),
|
|
58
|
+
heap: IDL.Opt(IDL.Nat64)
|
|
59
|
+
});
|
|
60
|
+
const DbConfig = IDL.Record({
|
|
61
|
+
max_memory_size: IDL.Opt(ConfigMaxMemorySize)
|
|
62
|
+
});
|
|
55
63
|
const StorageConfigIFrame = IDL.Variant({
|
|
56
64
|
Deny: IDL.Null,
|
|
57
65
|
AllowAny: IDL.Null,
|
|
@@ -69,10 +77,15 @@ export const idlFactory = ({IDL}) => {
|
|
|
69
77
|
iframe: IDL.Opt(StorageConfigIFrame),
|
|
70
78
|
rewrites: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
|
|
71
79
|
headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)))),
|
|
80
|
+
max_memory_size: IDL.Opt(ConfigMaxMemorySize),
|
|
72
81
|
raw_access: IDL.Opt(StorageConfigRawAccess),
|
|
73
82
|
redirects: IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Text, StorageConfigRedirect)))
|
|
74
83
|
});
|
|
75
|
-
const Config = IDL.Record({
|
|
84
|
+
const Config = IDL.Record({
|
|
85
|
+
db: IDL.Opt(DbConfig),
|
|
86
|
+
authentication: IDL.Opt(AuthenticationConfig),
|
|
87
|
+
storage: StorageConfig
|
|
88
|
+
});
|
|
76
89
|
const Doc = IDL.Record({
|
|
77
90
|
updated_at: IDL.Nat64,
|
|
78
91
|
owner: IDL.Principal,
|
|
@@ -129,9 +142,17 @@ export const idlFactory = ({IDL}) => {
|
|
|
129
142
|
CreatedAt: IDL.Null
|
|
130
143
|
});
|
|
131
144
|
const ListOrder = IDL.Record({field: ListOrderField, desc: IDL.Bool});
|
|
145
|
+
const TimestampMatcher = IDL.Variant({
|
|
146
|
+
Equal: IDL.Nat64,
|
|
147
|
+
Between: IDL.Tuple(IDL.Nat64, IDL.Nat64),
|
|
148
|
+
GreaterThan: IDL.Nat64,
|
|
149
|
+
LessThan: IDL.Nat64
|
|
150
|
+
});
|
|
132
151
|
const ListMatcher = IDL.Record({
|
|
133
152
|
key: IDL.Opt(IDL.Text),
|
|
134
|
-
|
|
153
|
+
updated_at: IDL.Opt(TimestampMatcher),
|
|
154
|
+
description: IDL.Opt(IDL.Text),
|
|
155
|
+
created_at: IDL.Opt(TimestampMatcher)
|
|
135
156
|
});
|
|
136
157
|
const ListPaginate = IDL.Record({
|
|
137
158
|
start_after: IDL.Opt(IDL.Text),
|
|
@@ -227,11 +248,12 @@ export const idlFactory = ({IDL}) => {
|
|
|
227
248
|
del_docs: IDL.Func([IDL.Text], [], []),
|
|
228
249
|
del_many_assets: IDL.Func([IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))], [], []),
|
|
229
250
|
del_many_docs: IDL.Func([IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text, DelDoc))], [], []),
|
|
230
|
-
del_rule: IDL.Func([RulesType, IDL.Text,
|
|
251
|
+
del_rule: IDL.Func([RulesType, IDL.Text, DelRule], [], []),
|
|
231
252
|
deposit_cycles: IDL.Func([DepositCyclesArgs], [], []),
|
|
232
253
|
get_asset: IDL.Func([IDL.Text, IDL.Text], [IDL.Opt(AssetNoContent)], ['query']),
|
|
233
254
|
get_auth_config: IDL.Func([], [IDL.Opt(AuthenticationConfig)], ['query']),
|
|
234
255
|
get_config: IDL.Func([], [Config], []),
|
|
256
|
+
get_db_config: IDL.Func([], [IDL.Opt(DbConfig)], ['query']),
|
|
235
257
|
get_doc: IDL.Func([IDL.Text, IDL.Text], [IDL.Opt(Doc)], ['query']),
|
|
236
258
|
get_many_assets: IDL.Func(
|
|
237
259
|
[IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))],
|
|
@@ -243,6 +265,7 @@ export const idlFactory = ({IDL}) => {
|
|
|
243
265
|
[IDL.Vec(IDL.Tuple(IDL.Text, IDL.Opt(Doc)))],
|
|
244
266
|
['query']
|
|
245
267
|
),
|
|
268
|
+
get_storage_config: IDL.Func([], [StorageConfig], ['query']),
|
|
246
269
|
http_request: IDL.Func([HttpRequest], [HttpResponse], ['query']),
|
|
247
270
|
http_request_streaming_callback: IDL.Func(
|
|
248
271
|
[StreamingCallbackToken],
|
|
@@ -257,13 +280,13 @@ export const idlFactory = ({IDL}) => {
|
|
|
257
280
|
list_rules: IDL.Func([RulesType], [IDL.Vec(IDL.Tuple(IDL.Text, Rule))], ['query']),
|
|
258
281
|
memory_size: IDL.Func([], [MemorySize], ['query']),
|
|
259
282
|
set_auth_config: IDL.Func([AuthenticationConfig], [], []),
|
|
260
|
-
set_config: IDL.Func([Config], [], []),
|
|
261
283
|
set_controllers: IDL.Func(
|
|
262
284
|
[SetControllersArgs],
|
|
263
285
|
[IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
|
|
264
286
|
[]
|
|
265
287
|
),
|
|
266
288
|
set_custom_domain: IDL.Func([IDL.Text, IDL.Opt(IDL.Text)], [], []),
|
|
289
|
+
set_db_config: IDL.Func([DbConfig], [], []),
|
|
267
290
|
set_doc: IDL.Func([IDL.Text, IDL.Text, SetDoc], [Doc], []),
|
|
268
291
|
set_many_docs: IDL.Func(
|
|
269
292
|
[IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text, SetDoc))],
|
|
@@ -271,6 +294,7 @@ export const idlFactory = ({IDL}) => {
|
|
|
271
294
|
[]
|
|
272
295
|
),
|
|
273
296
|
set_rule: IDL.Func([RulesType, IDL.Text, SetRule], [], []),
|
|
297
|
+
set_storage_config: IDL.Func([StorageConfig], [], []),
|
|
274
298
|
upload_asset_chunk: IDL.Func([UploadChunk], [UploadChunkResult], []),
|
|
275
299
|
version: IDL.Func([], [IDL.Text], ['query'])
|
|
276
300
|
});
|