@junobuild/admin 0.0.57 → 0.0.58-next-2024-11-22

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 (40) hide show
  1. package/dist/browser/index.js +7 -7
  2. package/dist/browser/index.js.map +4 -4
  3. package/dist/declarations/mission_control/mission_control.did.d.ts +59 -7
  4. package/dist/declarations/mission_control/mission_control.factory.did.js +63 -8
  5. package/dist/declarations/satellite/satellite.did.d.ts +10 -1
  6. package/dist/declarations/satellite/satellite.factory.did.js +28 -19
  7. package/dist/declarations/satellite/satellite.factory.did.mjs +28 -19
  8. package/dist/node/index.mjs +7 -7
  9. package/dist/node/index.mjs.map +4 -4
  10. package/dist/types/api/actor.api.d.ts +0 -2
  11. package/dist/types/api/ic.api.d.ts +1 -1
  12. package/dist/types/api/satellite.api.d.ts +1 -1
  13. package/dist/types/constants/rules.constants.d.ts +1 -0
  14. package/dist/types/index.d.ts +16 -4
  15. package/dist/types/services/{mission-control.services.d.ts → mission-control.controllers.services.d.ts} +0 -21
  16. package/dist/types/services/mission-control.upgrade.services.d.ts +13 -0
  17. package/dist/types/services/mission-control.version.services.d.ts +10 -0
  18. package/dist/types/services/orbiter.controllers.services.d.ts +12 -0
  19. package/dist/types/services/orbiter.memory.services.d.ts +11 -0
  20. package/dist/types/services/orbiter.upgrade.services.d.ts +15 -0
  21. package/dist/types/services/orbiter.version.services.d.ts +10 -0
  22. package/dist/types/services/satellite.assets.services.d.ts +23 -0
  23. package/dist/types/services/satellite.config.services.d.ts +48 -0
  24. package/dist/types/services/satellite.controllers.services.d.ts +25 -0
  25. package/dist/types/services/satellite.docs.services.d.ts +23 -0
  26. package/dist/types/services/satellite.domains.services.d.ts +22 -0
  27. package/dist/types/services/satellite.memory.services.d.ts +11 -0
  28. package/dist/types/services/satellite.rules.services.d.ts +26 -0
  29. package/dist/types/services/satellite.upgrade.services.d.ts +18 -0
  30. package/dist/types/services/satellite.version.services.d.ts +29 -0
  31. package/dist/types/types/controllers.types.d.ts +2 -2
  32. package/dist/types/utils/actor.utils.d.ts +2 -3
  33. package/dist/types/utils/rule.utils.d.ts +1 -1
  34. package/package.json +7 -6
  35. package/dist/declarations/ic/ic.did.d.ts +0 -344
  36. package/dist/declarations/ic/ic.factory.did.js +0 -378
  37. package/dist/declarations/ic/ic.factory.did.mjs +0 -378
  38. package/dist/types/services/orbiter.services.d.ts +0 -45
  39. package/dist/types/services/satellite.services.d.ts +0 -215
  40. package/dist/types/types/ic.types.d.ts +0 -14
@@ -2,6 +2,10 @@ import type {ActorMethod} from '@dfinity/agent';
2
2
  import type {IDL} from '@dfinity/candid';
3
3
  import type {Principal} from '@dfinity/principal';
4
4
 
5
+ export interface Account {
6
+ owner: Principal;
7
+ subaccount: [] | [Uint8Array | number[]];
8
+ }
5
9
  export type CanisterStatusType = {stopped: null} | {stopping: null} | {running: null};
6
10
  export interface Controller {
7
11
  updated_at: bigint;
@@ -11,6 +15,10 @@ export interface Controller {
11
15
  expires_at: [] | [bigint];
12
16
  }
13
17
  export type ControllerScope = {Write: null} | {Admin: null};
18
+ export interface CreateCanisterConfig {
19
+ subnet_id: [] | [Principal];
20
+ name: [] | [string];
21
+ }
14
22
  export interface CronJobStatusesConfig {
15
23
  enabled: boolean;
16
24
  cycles_threshold: [] | [bigint];
@@ -25,7 +33,9 @@ export interface Orbiter {
25
33
  metadata: Array<[string, string]>;
26
34
  created_at: bigint;
27
35
  }
28
- export type Result = {Ok: SegmentStatus} | {Err: string};
36
+ export type Result = {Ok: bigint} | {Err: TransferError};
37
+ export type Result_1 = {Ok: bigint} | {Err: TransferError_1};
38
+ export type Result_2 = {Ok: SegmentStatus} | {Err: string};
29
39
  export interface Satellite {
30
40
  updated_at: bigint;
31
41
  metadata: Array<[string, string]>;
@@ -53,9 +63,9 @@ export interface SegmentStatus {
53
63
  status_at: bigint;
54
64
  }
55
65
  export interface SegmentsStatuses {
56
- orbiters: [] | [Array<Result>];
57
- satellites: [] | [Array<Result>];
58
- mission_control: Result;
66
+ orbiters: [] | [Array<Result_2>];
67
+ satellites: [] | [Array<Result_2>];
68
+ mission_control: Result_2;
59
69
  }
60
70
  export interface SetController {
61
71
  metadata: Array<[string, string]>;
@@ -68,14 +78,54 @@ export interface StatusesArgs {
68
78
  satellites: Array<[Principal, CronJobStatusesConfig]>;
69
79
  cycles_threshold: [] | [bigint];
70
80
  }
81
+ export interface Timestamp {
82
+ timestamp_nanos: bigint;
83
+ }
71
84
  export interface Tokens {
72
85
  e8s: bigint;
73
86
  }
87
+ export interface TransferArg {
88
+ to: Account;
89
+ fee: [] | [bigint];
90
+ memo: [] | [Uint8Array | number[]];
91
+ from_subaccount: [] | [Uint8Array | number[]];
92
+ created_at_time: [] | [bigint];
93
+ amount: bigint;
94
+ }
95
+ export interface TransferArgs {
96
+ to: Uint8Array | number[];
97
+ fee: Tokens;
98
+ memo: bigint;
99
+ from_subaccount: [] | [Uint8Array | number[]];
100
+ created_at_time: [] | [Timestamp];
101
+ amount: Tokens;
102
+ }
103
+ export type TransferError =
104
+ | {
105
+ TxTooOld: {allowed_window_nanos: bigint};
106
+ }
107
+ | {BadFee: {expected_fee: Tokens}}
108
+ | {TxDuplicate: {duplicate_of: bigint}}
109
+ | {TxCreatedInFuture: null}
110
+ | {InsufficientFunds: {balance: Tokens}};
111
+ export type TransferError_1 =
112
+ | {
113
+ GenericError: {message: string; error_code: bigint};
114
+ }
115
+ | {TemporarilyUnavailable: null}
116
+ | {BadBurn: {min_burn_amount: bigint}}
117
+ | {Duplicate: {duplicate_of: bigint}}
118
+ | {BadFee: {expected_fee: bigint}}
119
+ | {CreatedInFuture: {ledger_time: bigint}}
120
+ | {TooOld: null}
121
+ | {InsufficientFunds: {balance: bigint}};
74
122
  export interface _SERVICE {
75
123
  add_mission_control_controllers: ActorMethod<[Array<Principal>], undefined>;
76
124
  add_satellites_controllers: ActorMethod<[Array<Principal>, Array<Principal>], undefined>;
77
125
  create_orbiter: ActorMethod<[[] | [string]], Orbiter>;
126
+ create_orbiter_with_config: ActorMethod<[CreateCanisterConfig], Orbiter>;
78
127
  create_satellite: ActorMethod<[string], Satellite>;
128
+ create_satellite_with_config: ActorMethod<[CreateCanisterConfig], Satellite>;
79
129
  del_mission_control_controllers: ActorMethod<[Array<Principal>], undefined>;
80
130
  del_orbiter: ActorMethod<[Principal, bigint], undefined>;
81
131
  del_orbiters_controllers: ActorMethod<[Array<Principal>, Array<Principal>], undefined>;
@@ -83,11 +133,13 @@ export interface _SERVICE {
83
133
  del_satellites_controllers: ActorMethod<[Array<Principal>, Array<Principal>], undefined>;
84
134
  deposit_cycles: ActorMethod<[DepositCyclesArgs], undefined>;
85
135
  get_user: ActorMethod<[], Principal>;
136
+ icp_transfer: ActorMethod<[TransferArgs], Result>;
137
+ icrc_transfer: ActorMethod<[Principal, TransferArg], Result_1>;
86
138
  list_mission_control_controllers: ActorMethod<[], Array<[Principal, Controller]>>;
87
- list_mission_control_statuses: ActorMethod<[], Array<[bigint, Result]>>;
88
- list_orbiter_statuses: ActorMethod<[Principal], [] | [Array<[bigint, Result]>]>;
139
+ list_mission_control_statuses: ActorMethod<[], Array<[bigint, Result_2]>>;
140
+ list_orbiter_statuses: ActorMethod<[Principal], [] | [Array<[bigint, Result_2]>]>;
89
141
  list_orbiters: ActorMethod<[], Array<[Principal, Orbiter]>>;
90
- list_satellite_statuses: ActorMethod<[Principal], [] | [Array<[bigint, Result]>]>;
142
+ list_satellite_statuses: ActorMethod<[Principal], [] | [Array<[bigint, Result_2]>]>;
91
143
  list_satellites: ActorMethod<[], Array<[Principal, Satellite]>>;
92
144
  remove_mission_control_controllers: ActorMethod<[Array<Principal>], undefined>;
93
145
  remove_satellites_controllers: ActorMethod<[Array<Principal>, Array<Principal>], undefined>;
@@ -6,6 +6,10 @@ export const idlFactory = ({IDL}) => {
6
6
  metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
7
7
  created_at: IDL.Nat64
8
8
  });
9
+ const CreateCanisterConfig = IDL.Record({
10
+ subnet_id: IDL.Opt(IDL.Principal),
11
+ name: IDL.Opt(IDL.Text)
12
+ });
9
13
  const Satellite = IDL.Record({
10
14
  updated_at: IDL.Nat64,
11
15
  metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
@@ -16,6 +20,50 @@ export const idlFactory = ({IDL}) => {
16
20
  cycles: IDL.Nat,
17
21
  destination_id: IDL.Principal
18
22
  });
23
+ const Tokens = IDL.Record({e8s: IDL.Nat64});
24
+ const Timestamp = IDL.Record({timestamp_nanos: IDL.Nat64});
25
+ const TransferArgs = IDL.Record({
26
+ to: IDL.Vec(IDL.Nat8),
27
+ fee: Tokens,
28
+ memo: IDL.Nat64,
29
+ from_subaccount: IDL.Opt(IDL.Vec(IDL.Nat8)),
30
+ created_at_time: IDL.Opt(Timestamp),
31
+ amount: Tokens
32
+ });
33
+ const TransferError = IDL.Variant({
34
+ TxTooOld: IDL.Record({allowed_window_nanos: IDL.Nat64}),
35
+ BadFee: IDL.Record({expected_fee: Tokens}),
36
+ TxDuplicate: IDL.Record({duplicate_of: IDL.Nat64}),
37
+ TxCreatedInFuture: IDL.Null,
38
+ InsufficientFunds: IDL.Record({balance: Tokens})
39
+ });
40
+ const Result = IDL.Variant({Ok: IDL.Nat64, Err: TransferError});
41
+ const Account = IDL.Record({
42
+ owner: IDL.Principal,
43
+ subaccount: IDL.Opt(IDL.Vec(IDL.Nat8))
44
+ });
45
+ const TransferArg = IDL.Record({
46
+ to: Account,
47
+ fee: IDL.Opt(IDL.Nat),
48
+ memo: IDL.Opt(IDL.Vec(IDL.Nat8)),
49
+ from_subaccount: IDL.Opt(IDL.Vec(IDL.Nat8)),
50
+ created_at_time: IDL.Opt(IDL.Nat64),
51
+ amount: IDL.Nat
52
+ });
53
+ const TransferError_1 = IDL.Variant({
54
+ GenericError: IDL.Record({
55
+ message: IDL.Text,
56
+ error_code: IDL.Nat
57
+ }),
58
+ TemporarilyUnavailable: IDL.Null,
59
+ BadBurn: IDL.Record({min_burn_amount: IDL.Nat}),
60
+ Duplicate: IDL.Record({duplicate_of: IDL.Nat}),
61
+ BadFee: IDL.Record({expected_fee: IDL.Nat}),
62
+ CreatedInFuture: IDL.Record({ledger_time: IDL.Nat64}),
63
+ TooOld: IDL.Null,
64
+ InsufficientFunds: IDL.Record({balance: IDL.Nat})
65
+ });
66
+ const Result_1 = IDL.Variant({Ok: IDL.Nat, Err: TransferError_1});
19
67
  const ControllerScope = IDL.Variant({
20
68
  Write: IDL.Null,
21
69
  Admin: IDL.Null
@@ -52,7 +100,7 @@ export const idlFactory = ({IDL}) => {
52
100
  metadata: IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))),
53
101
  status_at: IDL.Nat64
54
102
  });
55
- const Result = IDL.Variant({Ok: SegmentStatus, Err: IDL.Text});
103
+ const Result_2 = IDL.Variant({Ok: SegmentStatus, Err: IDL.Text});
56
104
  const SetController = IDL.Record({
57
105
  metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
58
106
  scope: ControllerScope,
@@ -69,16 +117,17 @@ export const idlFactory = ({IDL}) => {
69
117
  cycles_threshold: IDL.Opt(IDL.Nat64)
70
118
  });
71
119
  const SegmentsStatuses = IDL.Record({
72
- orbiters: IDL.Opt(IDL.Vec(Result)),
73
- satellites: IDL.Opt(IDL.Vec(Result)),
74
- mission_control: Result
120
+ orbiters: IDL.Opt(IDL.Vec(Result_2)),
121
+ satellites: IDL.Opt(IDL.Vec(Result_2)),
122
+ mission_control: Result_2
75
123
  });
76
- const Tokens = IDL.Record({e8s: IDL.Nat64});
77
124
  return IDL.Service({
78
125
  add_mission_control_controllers: IDL.Func([IDL.Vec(IDL.Principal)], [], []),
79
126
  add_satellites_controllers: IDL.Func([IDL.Vec(IDL.Principal), IDL.Vec(IDL.Principal)], [], []),
80
127
  create_orbiter: IDL.Func([IDL.Opt(IDL.Text)], [Orbiter], []),
128
+ create_orbiter_with_config: IDL.Func([CreateCanisterConfig], [Orbiter], []),
81
129
  create_satellite: IDL.Func([IDL.Text], [Satellite], []),
130
+ create_satellite_with_config: IDL.Func([CreateCanisterConfig], [Satellite], []),
82
131
  del_mission_control_controllers: IDL.Func([IDL.Vec(IDL.Principal)], [], []),
83
132
  del_orbiter: IDL.Func([IDL.Principal, IDL.Nat], [], []),
84
133
  del_orbiters_controllers: IDL.Func([IDL.Vec(IDL.Principal), IDL.Vec(IDL.Principal)], [], []),
@@ -86,21 +135,27 @@ export const idlFactory = ({IDL}) => {
86
135
  del_satellites_controllers: IDL.Func([IDL.Vec(IDL.Principal), IDL.Vec(IDL.Principal)], [], []),
87
136
  deposit_cycles: IDL.Func([DepositCyclesArgs], [], []),
88
137
  get_user: IDL.Func([], [IDL.Principal], ['query']),
138
+ icp_transfer: IDL.Func([TransferArgs], [Result], []),
139
+ icrc_transfer: IDL.Func([IDL.Principal, TransferArg], [Result_1], []),
89
140
  list_mission_control_controllers: IDL.Func(
90
141
  [],
91
142
  [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
92
143
  ['query']
93
144
  ),
94
- list_mission_control_statuses: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Nat64, Result))], ['query']),
145
+ list_mission_control_statuses: IDL.Func(
146
+ [],
147
+ [IDL.Vec(IDL.Tuple(IDL.Nat64, Result_2))],
148
+ ['query']
149
+ ),
95
150
  list_orbiter_statuses: IDL.Func(
96
151
  [IDL.Principal],
97
- [IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Nat64, Result)))],
152
+ [IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Nat64, Result_2)))],
98
153
  ['query']
99
154
  ),
100
155
  list_orbiters: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Orbiter))], ['query']),
101
156
  list_satellite_statuses: IDL.Func(
102
157
  [IDL.Principal],
103
- [IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Nat64, Result)))],
158
+ [IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Nat64, Result_2)))],
104
159
  ['query']
105
160
  ),
106
161
  list_satellites: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Satellite))], ['query']),
@@ -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], undefined>;
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'])