@junobuild/core 0.0.62 → 0.0.63
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 +13 -13
- package/dist/browser/index.js.map +3 -3
- package/dist/declarations/satellite/satellite.did.d.ts +10 -1
- package/dist/declarations/satellite/satellite.factory.did.js +28 -19
- package/dist/declarations/satellite/satellite.factory.did.mjs +28 -19
- package/dist/node/index.mjs +20 -20
- package/dist/node/index.mjs.map +3 -3
- package/dist/types/api/doc.api.d.ts +7 -2
- package/dist/types/api/storage.api.d.ts +10 -6
- package/dist/types/services/doc.services.d.ts +17 -2
- package/dist/types/services/identity.services.d.ts +1 -1
- package/dist/types/services/storage.services.d.ts +22 -7
- package/dist/types/utils/data.utils.d.ts +1 -1
- package/dist/types/utils/env.utils.d.ts +2 -2
- package/dist/types/workers/auth.worker.d.ts +0 -1
- package/package.json +1 -1
|
@@ -146,6 +146,10 @@ export interface MemorySize {
|
|
|
146
146
|
heap: bigint;
|
|
147
147
|
}
|
|
148
148
|
export type Permission = {Controllers: null} | {Private: null} | {Public: null} | {Managed: null};
|
|
149
|
+
export interface RateConfig {
|
|
150
|
+
max_tokens: bigint;
|
|
151
|
+
time_per_token_ns: bigint;
|
|
152
|
+
}
|
|
149
153
|
export interface Rule {
|
|
150
154
|
max_capacity: [] | [number];
|
|
151
155
|
memory: [] | [Memory];
|
|
@@ -155,6 +159,7 @@ export interface Rule {
|
|
|
155
159
|
created_at: bigint;
|
|
156
160
|
version: [] | [bigint];
|
|
157
161
|
mutable_permissions: [] | [boolean];
|
|
162
|
+
rate_config: [] | [RateConfig];
|
|
158
163
|
write: Permission;
|
|
159
164
|
}
|
|
160
165
|
export type RulesType = {Db: null} | {Storage: null};
|
|
@@ -179,6 +184,7 @@ export interface SetRule {
|
|
|
179
184
|
read: Permission;
|
|
180
185
|
version: [] | [bigint];
|
|
181
186
|
mutable_permissions: [] | [boolean];
|
|
187
|
+
rate_config: [] | [RateConfig];
|
|
182
188
|
write: Permission;
|
|
183
189
|
}
|
|
184
190
|
export interface StorageConfig {
|
|
@@ -240,6 +246,8 @@ export interface _SERVICE {
|
|
|
240
246
|
del_custom_domain: ActorMethod<[string], undefined>;
|
|
241
247
|
del_doc: ActorMethod<[string, string, DelDoc], undefined>;
|
|
242
248
|
del_docs: ActorMethod<[string], undefined>;
|
|
249
|
+
del_filtered_assets: ActorMethod<[string, ListParams], undefined>;
|
|
250
|
+
del_filtered_docs: ActorMethod<[string, ListParams], undefined>;
|
|
243
251
|
del_many_assets: ActorMethod<[Array<[string, string]>], undefined>;
|
|
244
252
|
del_many_docs: ActorMethod<[Array<[string, string, DelDoc]>], undefined>;
|
|
245
253
|
del_rule: ActorMethod<[RulesType, string, DelRule], undefined>;
|
|
@@ -251,6 +259,7 @@ export interface _SERVICE {
|
|
|
251
259
|
get_doc: ActorMethod<[string, string], [] | [Doc]>;
|
|
252
260
|
get_many_assets: ActorMethod<[Array<[string, string]>], Array<[string, [] | [AssetNoContent]]>>;
|
|
253
261
|
get_many_docs: ActorMethod<[Array<[string, string]>], Array<[string, [] | [Doc]]>>;
|
|
262
|
+
get_rule: ActorMethod<[RulesType, string], [] | [Rule]>;
|
|
254
263
|
get_storage_config: ActorMethod<[], StorageConfig>;
|
|
255
264
|
http_request: ActorMethod<[HttpRequest], HttpResponse>;
|
|
256
265
|
http_request_streaming_callback: ActorMethod<
|
|
@@ -270,7 +279,7 @@ export interface _SERVICE {
|
|
|
270
279
|
set_db_config: ActorMethod<[DbConfig], undefined>;
|
|
271
280
|
set_doc: ActorMethod<[string, string, SetDoc], Doc>;
|
|
272
281
|
set_many_docs: ActorMethod<[Array<[string, string, SetDoc]>], Array<[string, Doc]>>;
|
|
273
|
-
set_rule: ActorMethod<[RulesType, string, SetRule],
|
|
282
|
+
set_rule: ActorMethod<[RulesType, string, SetRule], Rule>;
|
|
274
283
|
set_storage_config: ActorMethod<[StorageConfig], undefined>;
|
|
275
284
|
upload_asset_chunk: ActorMethod<[UploadChunk], UploadChunkResult>;
|
|
276
285
|
version: ActorMethod<[], string>;
|
|
@@ -122,6 +122,29 @@ export const idlFactory = ({IDL}) => {
|
|
|
122
122
|
created_at: IDL.Nat64,
|
|
123
123
|
version: IDL.Opt(IDL.Nat64)
|
|
124
124
|
});
|
|
125
|
+
const Memory = IDL.Variant({Heap: IDL.Null, Stable: IDL.Null});
|
|
126
|
+
const Permission = IDL.Variant({
|
|
127
|
+
Controllers: IDL.Null,
|
|
128
|
+
Private: IDL.Null,
|
|
129
|
+
Public: IDL.Null,
|
|
130
|
+
Managed: IDL.Null
|
|
131
|
+
});
|
|
132
|
+
const RateConfig = IDL.Record({
|
|
133
|
+
max_tokens: IDL.Nat64,
|
|
134
|
+
time_per_token_ns: IDL.Nat64
|
|
135
|
+
});
|
|
136
|
+
const Rule = IDL.Record({
|
|
137
|
+
max_capacity: IDL.Opt(IDL.Nat32),
|
|
138
|
+
memory: IDL.Opt(Memory),
|
|
139
|
+
updated_at: IDL.Nat64,
|
|
140
|
+
max_size: IDL.Opt(IDL.Nat),
|
|
141
|
+
read: Permission,
|
|
142
|
+
created_at: IDL.Nat64,
|
|
143
|
+
version: IDL.Opt(IDL.Nat64),
|
|
144
|
+
mutable_permissions: IDL.Opt(IDL.Bool),
|
|
145
|
+
rate_config: IDL.Opt(RateConfig),
|
|
146
|
+
write: Permission
|
|
147
|
+
});
|
|
125
148
|
const HttpRequest = IDL.Record({
|
|
126
149
|
url: IDL.Text,
|
|
127
150
|
method: IDL.Text,
|
|
@@ -129,7 +152,6 @@ export const idlFactory = ({IDL}) => {
|
|
|
129
152
|
headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
|
|
130
153
|
certificate_version: IDL.Opt(IDL.Nat16)
|
|
131
154
|
});
|
|
132
|
-
const Memory = IDL.Variant({Heap: IDL.Null, Stable: IDL.Null});
|
|
133
155
|
const StreamingCallbackToken = IDL.Record({
|
|
134
156
|
memory: Memory,
|
|
135
157
|
token: IDL.Opt(IDL.Text),
|
|
@@ -184,23 +206,6 @@ export const idlFactory = ({IDL}) => {
|
|
|
184
206
|
items: IDL.Vec(IDL.Tuple(IDL.Text, Doc)),
|
|
185
207
|
items_length: IDL.Nat64
|
|
186
208
|
});
|
|
187
|
-
const Permission = IDL.Variant({
|
|
188
|
-
Controllers: IDL.Null,
|
|
189
|
-
Private: IDL.Null,
|
|
190
|
-
Public: IDL.Null,
|
|
191
|
-
Managed: IDL.Null
|
|
192
|
-
});
|
|
193
|
-
const Rule = IDL.Record({
|
|
194
|
-
max_capacity: IDL.Opt(IDL.Nat32),
|
|
195
|
-
memory: IDL.Opt(Memory),
|
|
196
|
-
updated_at: IDL.Nat64,
|
|
197
|
-
max_size: IDL.Opt(IDL.Nat),
|
|
198
|
-
read: Permission,
|
|
199
|
-
created_at: IDL.Nat64,
|
|
200
|
-
version: IDL.Opt(IDL.Nat64),
|
|
201
|
-
mutable_permissions: IDL.Opt(IDL.Bool),
|
|
202
|
-
write: Permission
|
|
203
|
-
});
|
|
204
209
|
const MemorySize = IDL.Record({stable: IDL.Nat64, heap: IDL.Nat64});
|
|
205
210
|
const SetController = IDL.Record({
|
|
206
211
|
metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
|
|
@@ -223,6 +228,7 @@ export const idlFactory = ({IDL}) => {
|
|
|
223
228
|
read: Permission,
|
|
224
229
|
version: IDL.Opt(IDL.Nat64),
|
|
225
230
|
mutable_permissions: IDL.Opt(IDL.Bool),
|
|
231
|
+
rate_config: IDL.Opt(RateConfig),
|
|
226
232
|
write: Permission
|
|
227
233
|
});
|
|
228
234
|
const UploadChunk = IDL.Record({
|
|
@@ -248,6 +254,8 @@ export const idlFactory = ({IDL}) => {
|
|
|
248
254
|
del_custom_domain: IDL.Func([IDL.Text], [], []),
|
|
249
255
|
del_doc: IDL.Func([IDL.Text, IDL.Text, DelDoc], [], []),
|
|
250
256
|
del_docs: IDL.Func([IDL.Text], [], []),
|
|
257
|
+
del_filtered_assets: IDL.Func([IDL.Text, ListParams], [], []),
|
|
258
|
+
del_filtered_docs: IDL.Func([IDL.Text, ListParams], [], []),
|
|
251
259
|
del_many_assets: IDL.Func([IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))], [], []),
|
|
252
260
|
del_many_docs: IDL.Func([IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text, DelDoc))], [], []),
|
|
253
261
|
del_rule: IDL.Func([RulesType, IDL.Text, DelRule], [], []),
|
|
@@ -267,6 +275,7 @@ export const idlFactory = ({IDL}) => {
|
|
|
267
275
|
[IDL.Vec(IDL.Tuple(IDL.Text, IDL.Opt(Doc)))],
|
|
268
276
|
['query']
|
|
269
277
|
),
|
|
278
|
+
get_rule: IDL.Func([RulesType, IDL.Text], [IDL.Opt(Rule)], ['query']),
|
|
270
279
|
get_storage_config: IDL.Func([], [StorageConfig], ['query']),
|
|
271
280
|
http_request: IDL.Func([HttpRequest], [HttpResponse], ['query']),
|
|
272
281
|
http_request_streaming_callback: IDL.Func(
|
|
@@ -295,7 +304,7 @@ export const idlFactory = ({IDL}) => {
|
|
|
295
304
|
[IDL.Vec(IDL.Tuple(IDL.Text, Doc))],
|
|
296
305
|
[]
|
|
297
306
|
),
|
|
298
|
-
set_rule: IDL.Func([RulesType, IDL.Text, SetRule], [], []),
|
|
307
|
+
set_rule: IDL.Func([RulesType, IDL.Text, SetRule], [Rule], []),
|
|
299
308
|
set_storage_config: IDL.Func([StorageConfig], [], []),
|
|
300
309
|
upload_asset_chunk: IDL.Func([UploadChunk], [UploadChunkResult], []),
|
|
301
310
|
version: IDL.Func([], [IDL.Text], ['query'])
|
|
@@ -122,6 +122,29 @@ export const idlFactory = ({IDL}) => {
|
|
|
122
122
|
created_at: IDL.Nat64,
|
|
123
123
|
version: IDL.Opt(IDL.Nat64)
|
|
124
124
|
});
|
|
125
|
+
const Memory = IDL.Variant({Heap: IDL.Null, Stable: IDL.Null});
|
|
126
|
+
const Permission = IDL.Variant({
|
|
127
|
+
Controllers: IDL.Null,
|
|
128
|
+
Private: IDL.Null,
|
|
129
|
+
Public: IDL.Null,
|
|
130
|
+
Managed: IDL.Null
|
|
131
|
+
});
|
|
132
|
+
const RateConfig = IDL.Record({
|
|
133
|
+
max_tokens: IDL.Nat64,
|
|
134
|
+
time_per_token_ns: IDL.Nat64
|
|
135
|
+
});
|
|
136
|
+
const Rule = IDL.Record({
|
|
137
|
+
max_capacity: IDL.Opt(IDL.Nat32),
|
|
138
|
+
memory: IDL.Opt(Memory),
|
|
139
|
+
updated_at: IDL.Nat64,
|
|
140
|
+
max_size: IDL.Opt(IDL.Nat),
|
|
141
|
+
read: Permission,
|
|
142
|
+
created_at: IDL.Nat64,
|
|
143
|
+
version: IDL.Opt(IDL.Nat64),
|
|
144
|
+
mutable_permissions: IDL.Opt(IDL.Bool),
|
|
145
|
+
rate_config: IDL.Opt(RateConfig),
|
|
146
|
+
write: Permission
|
|
147
|
+
});
|
|
125
148
|
const HttpRequest = IDL.Record({
|
|
126
149
|
url: IDL.Text,
|
|
127
150
|
method: IDL.Text,
|
|
@@ -129,7 +152,6 @@ export const idlFactory = ({IDL}) => {
|
|
|
129
152
|
headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
|
|
130
153
|
certificate_version: IDL.Opt(IDL.Nat16)
|
|
131
154
|
});
|
|
132
|
-
const Memory = IDL.Variant({Heap: IDL.Null, Stable: IDL.Null});
|
|
133
155
|
const StreamingCallbackToken = IDL.Record({
|
|
134
156
|
memory: Memory,
|
|
135
157
|
token: IDL.Opt(IDL.Text),
|
|
@@ -184,23 +206,6 @@ export const idlFactory = ({IDL}) => {
|
|
|
184
206
|
items: IDL.Vec(IDL.Tuple(IDL.Text, Doc)),
|
|
185
207
|
items_length: IDL.Nat64
|
|
186
208
|
});
|
|
187
|
-
const Permission = IDL.Variant({
|
|
188
|
-
Controllers: IDL.Null,
|
|
189
|
-
Private: IDL.Null,
|
|
190
|
-
Public: IDL.Null,
|
|
191
|
-
Managed: IDL.Null
|
|
192
|
-
});
|
|
193
|
-
const Rule = IDL.Record({
|
|
194
|
-
max_capacity: IDL.Opt(IDL.Nat32),
|
|
195
|
-
memory: IDL.Opt(Memory),
|
|
196
|
-
updated_at: IDL.Nat64,
|
|
197
|
-
max_size: IDL.Opt(IDL.Nat),
|
|
198
|
-
read: Permission,
|
|
199
|
-
created_at: IDL.Nat64,
|
|
200
|
-
version: IDL.Opt(IDL.Nat64),
|
|
201
|
-
mutable_permissions: IDL.Opt(IDL.Bool),
|
|
202
|
-
write: Permission
|
|
203
|
-
});
|
|
204
209
|
const MemorySize = IDL.Record({stable: IDL.Nat64, heap: IDL.Nat64});
|
|
205
210
|
const SetController = IDL.Record({
|
|
206
211
|
metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
|
|
@@ -223,6 +228,7 @@ export const idlFactory = ({IDL}) => {
|
|
|
223
228
|
read: Permission,
|
|
224
229
|
version: IDL.Opt(IDL.Nat64),
|
|
225
230
|
mutable_permissions: IDL.Opt(IDL.Bool),
|
|
231
|
+
rate_config: IDL.Opt(RateConfig),
|
|
226
232
|
write: Permission
|
|
227
233
|
});
|
|
228
234
|
const UploadChunk = IDL.Record({
|
|
@@ -248,6 +254,8 @@ export const idlFactory = ({IDL}) => {
|
|
|
248
254
|
del_custom_domain: IDL.Func([IDL.Text], [], []),
|
|
249
255
|
del_doc: IDL.Func([IDL.Text, IDL.Text, DelDoc], [], []),
|
|
250
256
|
del_docs: IDL.Func([IDL.Text], [], []),
|
|
257
|
+
del_filtered_assets: IDL.Func([IDL.Text, ListParams], [], []),
|
|
258
|
+
del_filtered_docs: IDL.Func([IDL.Text, ListParams], [], []),
|
|
251
259
|
del_many_assets: IDL.Func([IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))], [], []),
|
|
252
260
|
del_many_docs: IDL.Func([IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text, DelDoc))], [], []),
|
|
253
261
|
del_rule: IDL.Func([RulesType, IDL.Text, DelRule], [], []),
|
|
@@ -267,6 +275,7 @@ export const idlFactory = ({IDL}) => {
|
|
|
267
275
|
[IDL.Vec(IDL.Tuple(IDL.Text, IDL.Opt(Doc)))],
|
|
268
276
|
['query']
|
|
269
277
|
),
|
|
278
|
+
get_rule: IDL.Func([RulesType, IDL.Text], [IDL.Opt(Rule)], ['query']),
|
|
270
279
|
get_storage_config: IDL.Func([], [StorageConfig], ['query']),
|
|
271
280
|
http_request: IDL.Func([HttpRequest], [HttpResponse], ['query']),
|
|
272
281
|
http_request_streaming_callback: IDL.Func(
|
|
@@ -295,7 +304,7 @@ export const idlFactory = ({IDL}) => {
|
|
|
295
304
|
[IDL.Vec(IDL.Tuple(IDL.Text, Doc))],
|
|
296
305
|
[]
|
|
297
306
|
),
|
|
298
|
-
set_rule: IDL.Func([RulesType, IDL.Text, SetRule], [], []),
|
|
307
|
+
set_rule: IDL.Func([RulesType, IDL.Text, SetRule], [Rule], []),
|
|
299
308
|
set_storage_config: IDL.Func([StorageConfig], [], []),
|
|
300
309
|
upload_asset_chunk: IDL.Func([UploadChunk], [UploadChunkResult], []),
|
|
301
310
|
version: IDL.Func([], [IDL.Text], ['query'])
|