@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
@@ -1,378 +0,0 @@
1
- // @ts-ignore
2
- export const idlFactory = ({IDL}) => {
3
- const bitcoin_network = IDL.Variant({
4
- mainnet: IDL.Null,
5
- testnet: IDL.Null
6
- });
7
- const bitcoin_address = IDL.Text;
8
- const bitcoin_get_balance_args = IDL.Record({
9
- network: bitcoin_network,
10
- address: bitcoin_address,
11
- min_confirmations: IDL.Opt(IDL.Nat32)
12
- });
13
- const satoshi = IDL.Nat64;
14
- const bitcoin_get_balance_result = satoshi;
15
- const bitcoin_get_balance_query_args = IDL.Record({
16
- network: bitcoin_network,
17
- address: bitcoin_address,
18
- min_confirmations: IDL.Opt(IDL.Nat32)
19
- });
20
- const bitcoin_get_balance_query_result = satoshi;
21
- const bitcoin_get_current_fee_percentiles_args = IDL.Record({
22
- network: bitcoin_network
23
- });
24
- const millisatoshi_per_byte = IDL.Nat64;
25
- const bitcoin_get_current_fee_percentiles_result = IDL.Vec(millisatoshi_per_byte);
26
- const bitcoin_get_utxos_args = IDL.Record({
27
- network: bitcoin_network,
28
- filter: IDL.Opt(
29
- IDL.Variant({
30
- page: IDL.Vec(IDL.Nat8),
31
- min_confirmations: IDL.Nat32
32
- })
33
- ),
34
- address: bitcoin_address
35
- });
36
- const block_hash = IDL.Vec(IDL.Nat8);
37
- const outpoint = IDL.Record({
38
- txid: IDL.Vec(IDL.Nat8),
39
- vout: IDL.Nat32
40
- });
41
- const utxo = IDL.Record({
42
- height: IDL.Nat32,
43
- value: satoshi,
44
- outpoint: outpoint
45
- });
46
- const bitcoin_get_utxos_result = IDL.Record({
47
- next_page: IDL.Opt(IDL.Vec(IDL.Nat8)),
48
- tip_height: IDL.Nat32,
49
- tip_block_hash: block_hash,
50
- utxos: IDL.Vec(utxo)
51
- });
52
- const bitcoin_get_utxos_query_args = IDL.Record({
53
- network: bitcoin_network,
54
- filter: IDL.Opt(
55
- IDL.Variant({
56
- page: IDL.Vec(IDL.Nat8),
57
- min_confirmations: IDL.Nat32
58
- })
59
- ),
60
- address: bitcoin_address
61
- });
62
- const bitcoin_get_utxos_query_result = IDL.Record({
63
- next_page: IDL.Opt(IDL.Vec(IDL.Nat8)),
64
- tip_height: IDL.Nat32,
65
- tip_block_hash: block_hash,
66
- utxos: IDL.Vec(utxo)
67
- });
68
- const bitcoin_send_transaction_args = IDL.Record({
69
- transaction: IDL.Vec(IDL.Nat8),
70
- network: bitcoin_network
71
- });
72
- const canister_id = IDL.Principal;
73
- const canister_info_args = IDL.Record({
74
- canister_id: canister_id,
75
- num_requested_changes: IDL.Opt(IDL.Nat64)
76
- });
77
- const change_origin = IDL.Variant({
78
- from_user: IDL.Record({user_id: IDL.Principal}),
79
- from_canister: IDL.Record({
80
- canister_version: IDL.Opt(IDL.Nat64),
81
- canister_id: IDL.Principal
82
- })
83
- });
84
- const change_details = IDL.Variant({
85
- creation: IDL.Record({controllers: IDL.Vec(IDL.Principal)}),
86
- code_deployment: IDL.Record({
87
- mode: IDL.Variant({
88
- reinstall: IDL.Null,
89
- upgrade: IDL.Null,
90
- install: IDL.Null
91
- }),
92
- module_hash: IDL.Vec(IDL.Nat8)
93
- }),
94
- controllers_change: IDL.Record({
95
- controllers: IDL.Vec(IDL.Principal)
96
- }),
97
- code_uninstall: IDL.Null
98
- });
99
- const change = IDL.Record({
100
- timestamp_nanos: IDL.Nat64,
101
- canister_version: IDL.Nat64,
102
- origin: change_origin,
103
- details: change_details
104
- });
105
- const canister_info_result = IDL.Record({
106
- controllers: IDL.Vec(IDL.Principal),
107
- module_hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
108
- recent_changes: IDL.Vec(change),
109
- total_num_changes: IDL.Nat64
110
- });
111
- const canister_status_args = IDL.Record({canister_id: canister_id});
112
- const log_visibility = IDL.Variant({
113
- controllers: IDL.Null,
114
- public: IDL.Null
115
- });
116
- const definite_canister_settings = IDL.Record({
117
- freezing_threshold: IDL.Nat,
118
- controllers: IDL.Vec(IDL.Principal),
119
- reserved_cycles_limit: IDL.Nat,
120
- log_visibility: log_visibility,
121
- wasm_memory_limit: IDL.Nat,
122
- memory_allocation: IDL.Nat,
123
- compute_allocation: IDL.Nat
124
- });
125
- const canister_status_result = IDL.Record({
126
- status: IDL.Variant({
127
- stopped: IDL.Null,
128
- stopping: IDL.Null,
129
- running: IDL.Null
130
- }),
131
- memory_size: IDL.Nat,
132
- cycles: IDL.Nat,
133
- settings: definite_canister_settings,
134
- query_stats: IDL.Record({
135
- response_payload_bytes_total: IDL.Nat,
136
- num_instructions_total: IDL.Nat,
137
- num_calls_total: IDL.Nat,
138
- request_payload_bytes_total: IDL.Nat
139
- }),
140
- idle_cycles_burned_per_day: IDL.Nat,
141
- module_hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
142
- reserved_cycles: IDL.Nat
143
- });
144
- const clear_chunk_store_args = IDL.Record({canister_id: canister_id});
145
- const canister_settings = IDL.Record({
146
- freezing_threshold: IDL.Opt(IDL.Nat),
147
- controllers: IDL.Opt(IDL.Vec(IDL.Principal)),
148
- reserved_cycles_limit: IDL.Opt(IDL.Nat),
149
- log_visibility: IDL.Opt(log_visibility),
150
- wasm_memory_limit: IDL.Opt(IDL.Nat),
151
- memory_allocation: IDL.Opt(IDL.Nat),
152
- compute_allocation: IDL.Opt(IDL.Nat)
153
- });
154
- const create_canister_args = IDL.Record({
155
- settings: IDL.Opt(canister_settings),
156
- sender_canister_version: IDL.Opt(IDL.Nat64)
157
- });
158
- const create_canister_result = IDL.Record({canister_id: canister_id});
159
- const delete_canister_args = IDL.Record({canister_id: canister_id});
160
- const deposit_cycles_args = IDL.Record({canister_id: canister_id});
161
- const ecdsa_curve = IDL.Variant({secp256k1: IDL.Null});
162
- const ecdsa_public_key_args = IDL.Record({
163
- key_id: IDL.Record({name: IDL.Text, curve: ecdsa_curve}),
164
- canister_id: IDL.Opt(canister_id),
165
- derivation_path: IDL.Vec(IDL.Vec(IDL.Nat8))
166
- });
167
- const ecdsa_public_key_result = IDL.Record({
168
- public_key: IDL.Vec(IDL.Nat8),
169
- chain_code: IDL.Vec(IDL.Nat8)
170
- });
171
- const fetch_canister_logs_args = IDL.Record({canister_id: canister_id});
172
- const canister_log_record = IDL.Record({
173
- idx: IDL.Nat64,
174
- timestamp_nanos: IDL.Nat64,
175
- content: IDL.Vec(IDL.Nat8)
176
- });
177
- const fetch_canister_logs_result = IDL.Record({
178
- canister_log_records: IDL.Vec(canister_log_record)
179
- });
180
- const http_header = IDL.Record({value: IDL.Text, name: IDL.Text});
181
- const http_request_result = IDL.Record({
182
- status: IDL.Nat,
183
- body: IDL.Vec(IDL.Nat8),
184
- headers: IDL.Vec(http_header)
185
- });
186
- const http_request_args = IDL.Record({
187
- url: IDL.Text,
188
- method: IDL.Variant({
189
- get: IDL.Null,
190
- head: IDL.Null,
191
- post: IDL.Null
192
- }),
193
- max_response_bytes: IDL.Opt(IDL.Nat64),
194
- body: IDL.Opt(IDL.Vec(IDL.Nat8)),
195
- transform: IDL.Opt(
196
- IDL.Record({
197
- function: IDL.Func(
198
- [
199
- IDL.Record({
200
- context: IDL.Vec(IDL.Nat8),
201
- response: http_request_result
202
- })
203
- ],
204
- [http_request_result],
205
- ['query']
206
- ),
207
- context: IDL.Vec(IDL.Nat8)
208
- })
209
- ),
210
- headers: IDL.Vec(http_header)
211
- });
212
- const canister_install_mode = IDL.Variant({
213
- reinstall: IDL.Null,
214
- upgrade: IDL.Opt(
215
- IDL.Record({
216
- wasm_memory_persistence: IDL.Opt(IDL.Variant({keep: IDL.Null, replace: IDL.Null})),
217
- skip_pre_upgrade: IDL.Opt(IDL.Bool)
218
- })
219
- ),
220
- install: IDL.Null
221
- });
222
- const chunk_hash = IDL.Record({hash: IDL.Vec(IDL.Nat8)});
223
- const install_chunked_code_args = IDL.Record({
224
- arg: IDL.Vec(IDL.Nat8),
225
- wasm_module_hash: IDL.Vec(IDL.Nat8),
226
- mode: canister_install_mode,
227
- chunk_hashes_list: IDL.Vec(chunk_hash),
228
- target_canister: canister_id,
229
- store_canister: IDL.Opt(canister_id),
230
- sender_canister_version: IDL.Opt(IDL.Nat64)
231
- });
232
- const wasm_module = IDL.Vec(IDL.Nat8);
233
- const install_code_args = IDL.Record({
234
- arg: IDL.Vec(IDL.Nat8),
235
- wasm_module: wasm_module,
236
- mode: canister_install_mode,
237
- canister_id: canister_id,
238
- sender_canister_version: IDL.Opt(IDL.Nat64)
239
- });
240
- const node_metrics_history_args = IDL.Record({
241
- start_at_timestamp_nanos: IDL.Nat64,
242
- subnet_id: IDL.Principal
243
- });
244
- const node_metrics = IDL.Record({
245
- num_block_failures_total: IDL.Nat64,
246
- node_id: IDL.Principal,
247
- num_blocks_proposed_total: IDL.Nat64
248
- });
249
- const node_metrics_history_result = IDL.Vec(
250
- IDL.Record({
251
- timestamp_nanos: IDL.Nat64,
252
- node_metrics: IDL.Vec(node_metrics)
253
- })
254
- );
255
- const provisional_create_canister_with_cycles_args = IDL.Record({
256
- settings: IDL.Opt(canister_settings),
257
- specified_id: IDL.Opt(canister_id),
258
- amount: IDL.Opt(IDL.Nat),
259
- sender_canister_version: IDL.Opt(IDL.Nat64)
260
- });
261
- const provisional_create_canister_with_cycles_result = IDL.Record({
262
- canister_id: canister_id
263
- });
264
- const provisional_top_up_canister_args = IDL.Record({
265
- canister_id: canister_id,
266
- amount: IDL.Nat
267
- });
268
- const raw_rand_result = IDL.Vec(IDL.Nat8);
269
- const schnorr_algorithm = IDL.Variant({
270
- ed25519: IDL.Null,
271
- bip340secp256k1: IDL.Null
272
- });
273
- const schnorr_public_key_args = IDL.Record({
274
- key_id: IDL.Record({
275
- algorithm: schnorr_algorithm,
276
- name: IDL.Text
277
- }),
278
- canister_id: IDL.Opt(canister_id),
279
- derivation_path: IDL.Vec(IDL.Vec(IDL.Nat8))
280
- });
281
- const schnorr_public_key_result = IDL.Record({
282
- public_key: IDL.Vec(IDL.Nat8),
283
- chain_code: IDL.Vec(IDL.Nat8)
284
- });
285
- const sign_with_ecdsa_args = IDL.Record({
286
- key_id: IDL.Record({name: IDL.Text, curve: ecdsa_curve}),
287
- derivation_path: IDL.Vec(IDL.Vec(IDL.Nat8)),
288
- message_hash: IDL.Vec(IDL.Nat8)
289
- });
290
- const sign_with_ecdsa_result = IDL.Record({
291
- signature: IDL.Vec(IDL.Nat8)
292
- });
293
- const sign_with_schnorr_args = IDL.Record({
294
- key_id: IDL.Record({
295
- algorithm: schnorr_algorithm,
296
- name: IDL.Text
297
- }),
298
- derivation_path: IDL.Vec(IDL.Vec(IDL.Nat8)),
299
- message: IDL.Vec(IDL.Nat8)
300
- });
301
- const sign_with_schnorr_result = IDL.Record({
302
- signature: IDL.Vec(IDL.Nat8)
303
- });
304
- const start_canister_args = IDL.Record({canister_id: canister_id});
305
- const stop_canister_args = IDL.Record({canister_id: canister_id});
306
- const stored_chunks_args = IDL.Record({canister_id: canister_id});
307
- const stored_chunks_result = IDL.Vec(chunk_hash);
308
- const uninstall_code_args = IDL.Record({
309
- canister_id: canister_id,
310
- sender_canister_version: IDL.Opt(IDL.Nat64)
311
- });
312
- const update_settings_args = IDL.Record({
313
- canister_id: IDL.Principal,
314
- settings: canister_settings,
315
- sender_canister_version: IDL.Opt(IDL.Nat64)
316
- });
317
- const upload_chunk_args = IDL.Record({
318
- chunk: IDL.Vec(IDL.Nat8),
319
- canister_id: IDL.Principal
320
- });
321
- const upload_chunk_result = chunk_hash;
322
- return IDL.Service({
323
- bitcoin_get_balance: IDL.Func([bitcoin_get_balance_args], [bitcoin_get_balance_result], []),
324
- bitcoin_get_balance_query: IDL.Func(
325
- [bitcoin_get_balance_query_args],
326
- [bitcoin_get_balance_query_result],
327
- ['query']
328
- ),
329
- bitcoin_get_current_fee_percentiles: IDL.Func(
330
- [bitcoin_get_current_fee_percentiles_args],
331
- [bitcoin_get_current_fee_percentiles_result],
332
- []
333
- ),
334
- bitcoin_get_utxos: IDL.Func([bitcoin_get_utxos_args], [bitcoin_get_utxos_result], []),
335
- bitcoin_get_utxos_query: IDL.Func(
336
- [bitcoin_get_utxos_query_args],
337
- [bitcoin_get_utxos_query_result],
338
- ['query']
339
- ),
340
- bitcoin_send_transaction: IDL.Func([bitcoin_send_transaction_args], [], []),
341
- canister_info: IDL.Func([canister_info_args], [canister_info_result], []),
342
- canister_status: IDL.Func([canister_status_args], [canister_status_result], []),
343
- clear_chunk_store: IDL.Func([clear_chunk_store_args], [], []),
344
- create_canister: IDL.Func([create_canister_args], [create_canister_result], []),
345
- delete_canister: IDL.Func([delete_canister_args], [], []),
346
- deposit_cycles: IDL.Func([deposit_cycles_args], [], []),
347
- ecdsa_public_key: IDL.Func([ecdsa_public_key_args], [ecdsa_public_key_result], []),
348
- fetch_canister_logs: IDL.Func(
349
- [fetch_canister_logs_args],
350
- [fetch_canister_logs_result],
351
- ['query']
352
- ),
353
- http_request: IDL.Func([http_request_args], [http_request_result], []),
354
- install_chunked_code: IDL.Func([install_chunked_code_args], [], []),
355
- install_code: IDL.Func([install_code_args], [], []),
356
- node_metrics_history: IDL.Func([node_metrics_history_args], [node_metrics_history_result], []),
357
- provisional_create_canister_with_cycles: IDL.Func(
358
- [provisional_create_canister_with_cycles_args],
359
- [provisional_create_canister_with_cycles_result],
360
- []
361
- ),
362
- provisional_top_up_canister: IDL.Func([provisional_top_up_canister_args], [], []),
363
- raw_rand: IDL.Func([], [raw_rand_result], []),
364
- schnorr_public_key: IDL.Func([schnorr_public_key_args], [schnorr_public_key_result], []),
365
- sign_with_ecdsa: IDL.Func([sign_with_ecdsa_args], [sign_with_ecdsa_result], []),
366
- sign_with_schnorr: IDL.Func([sign_with_schnorr_args], [sign_with_schnorr_result], []),
367
- start_canister: IDL.Func([start_canister_args], [], []),
368
- stop_canister: IDL.Func([stop_canister_args], [], []),
369
- stored_chunks: IDL.Func([stored_chunks_args], [stored_chunks_result], []),
370
- uninstall_code: IDL.Func([uninstall_code_args], [], []),
371
- update_settings: IDL.Func([update_settings_args], [], []),
372
- upload_chunk: IDL.Func([upload_chunk_args], [upload_chunk_result], [])
373
- });
374
- };
375
- // @ts-ignore
376
- export const init = ({IDL}) => {
377
- return [];
378
- };
@@ -1,45 +0,0 @@
1
- import { Principal } from '@dfinity/principal';
2
- import type { Controller } from '../../declarations/mission_control/mission_control.did';
3
- import type { MemorySize } from '../../declarations/orbiter/orbiter.did';
4
- import type { OrbiterParameters } from '../types/actor.types';
5
- /**
6
- * Retrieves the version of the Orbiter.
7
- * @param {Object} params - The parameters for the Orbiter.
8
- * @param {OrbiterParameters} params.orbiter - The Orbiter parameters.
9
- * @returns {Promise<string>} A promise that resolves to the version of the Orbiter.
10
- */
11
- export declare const orbiterVersion: (params: {
12
- orbiter: OrbiterParameters;
13
- }) => Promise<string>;
14
- /**
15
- * Upgrades the Orbiter with the provided WASM module.
16
- * @param {Object} params - The parameters for upgrading the Orbiter.
17
- * @param {OrbiterParameters} params.orbiter - The Orbiter parameters.
18
- * @param {Uint8Array} params.wasm_module - The WASM module for the upgrade.
19
- * @param {boolean} [params.reset=false] - Whether to reset the Orbiter (reinstall) instead of upgrading.
20
- * @throws Will throw an error if no orbiter principal is defined.
21
- * @returns {Promise<void>} A promise that resolves when the upgrade is complete.
22
- */
23
- export declare const upgradeOrbiter: ({ orbiter, wasm_module, reset }: {
24
- orbiter: OrbiterParameters;
25
- wasm_module: Uint8Array;
26
- reset?: boolean;
27
- }) => Promise<void>;
28
- /**
29
- * Retrieves the memory size of the Orbiter.
30
- * @param {Object} params - The parameters for the Orbiter.
31
- * @param {OrbiterParameters} params.orbiter - The Orbiter parameters.
32
- * @returns {Promise<MemorySize>} A promise that resolves to the memory size of the Orbiter.
33
- */
34
- export declare const orbiterMemorySize: (params: {
35
- orbiter: OrbiterParameters;
36
- }) => Promise<MemorySize>;
37
- /**
38
- * Lists the controllers of the Orbiter.
39
- * @param {Object} params - The parameters for listing the controllers.
40
- * @param {OrbiterParameters} params.orbiter - The Orbiter parameters.
41
- * @returns {Promise<[Principal, Controller][]>} A promise that resolves to a list of controllers.
42
- */
43
- export declare const listOrbiterControllers: (params: {
44
- orbiter: OrbiterParameters;
45
- }) => Promise<[Principal, Controller][]>;
@@ -1,215 +0,0 @@
1
- import { Principal } from '@dfinity/principal';
2
- import type { AuthenticationConfig, DatastoreConfig, Rule, RulesType, StorageConfig } from '@junobuild/config';
3
- import type { Controller, MemorySize, SetControllersArgs } from '../../declarations/satellite/satellite.did';
4
- import type { SatelliteParameters } from '../types/actor.types';
5
- import type { BuildType } from '../types/build.types';
6
- import type { CustomDomain } from '../types/customdomain.types';
7
- /**
8
- * Sets the configuration for the Storage of a Satellite.
9
- * @param {Object} params - The parameters for setting the configuration.
10
- * @param {Object} params.config - The storage configuration.
11
- * @param {Array<StorageConfigHeader>} params.config.headers - The headers configuration.
12
- * @param {Array<StorageConfigRewrite>} params.config.rewrites - The rewrites configuration.
13
- * @param {Array<StorageConfigRedirect>} params.config.redirects - The redirects configuration.
14
- * @param {string} params.config.iframe - The iframe configuration.
15
- * @param {SatelliteParameters} params.satellite - The satellite parameters.
16
- * @returns {Promise<void>} A promise that resolves when the configuration is set.
17
- */
18
- export declare const setStorageConfig: ({ config: { headers: configHeaders, rewrites: configRewrites, redirects: configRedirects, iframe: configIFrame, rawAccess: configRawAccess, maxMemorySize: configMaxMemorySize }, satellite }: {
19
- config: StorageConfig;
20
- satellite: SatelliteParameters;
21
- }) => Promise<void>;
22
- /**
23
- * Sets the datastore configuration for a satellite.
24
- * @param {Object} params - The parameters for setting the authentication configuration.
25
- * @param {Object} params.config - The datastore configuration.
26
- * @param {SatelliteParameters} params.satellite - The satellite parameters.
27
- * @returns {Promise<void>} A promise that resolves when the datastore configuration is set.
28
- */
29
- export declare const setDatastoreConfig: ({ config: { maxMemorySize }, ...rest }: {
30
- config: DatastoreConfig;
31
- satellite: SatelliteParameters;
32
- }) => Promise<void>;
33
- /**
34
- * Sets the authentication configuration for a satellite.
35
- * @param {Object} params - The parameters for setting the authentication configuration.
36
- * @param {Object} params.config - The authentication configuration.
37
- * @param {SatelliteParameters} params.satellite - The satellite parameters.
38
- * @returns {Promise<void>} A promise that resolves when the authentication configuration is set.
39
- */
40
- export declare const setAuthConfig: ({ config: { internetIdentity }, ...rest }: {
41
- config: AuthenticationConfig;
42
- satellite: SatelliteParameters;
43
- }) => Promise<void>;
44
- /**
45
- * Gets the authentication configuration for a satellite.
46
- * @param {Object} params - The parameters for getting the authentication configuration.
47
- * @param {SatelliteParameters} params.satellite - The satellite parameters.
48
- * @returns {Promise<AuthenticationConfig | undefined>} A promise that resolves to the authentication configuration or undefined if not found.
49
- */
50
- export declare const getAuthConfig: ({ satellite }: {
51
- satellite: SatelliteParameters;
52
- }) => Promise<AuthenticationConfig | undefined>;
53
- /**
54
- * Lists the rules for a satellite.
55
- * @param {Object} params - The parameters for listing the rules.
56
- * @param {RulesType} params.type - The type of rules to list.
57
- * @param {SatelliteParameters} params.satellite - The satellite parameters.
58
- * @returns {Promise<Rule[]>} A promise that resolves to an array of rules.
59
- */
60
- export declare const listRules: ({ type, satellite }: {
61
- type: RulesType;
62
- satellite: SatelliteParameters;
63
- }) => Promise<Rule[]>;
64
- /**
65
- * Sets a rule for a satellite.
66
- * @param {Object} params - The parameters for setting the rule.
67
- * @param {Rule} params.rule - The rule to set.
68
- * @param {RulesType} params.type - The type of rule.
69
- * @param {SatelliteParameters} params.satellite - The satellite parameters.
70
- * @returns {Promise<void>} A promise that resolves when the rule is set.
71
- */
72
- export declare const setRule: ({ rule: { collection, ...rest }, type, satellite }: {
73
- rule: Rule;
74
- type: RulesType;
75
- satellite: SatelliteParameters;
76
- }) => Promise<void>;
77
- /**
78
- * Retrieves the version of the satellite.
79
- * @param {Object} params - The parameters for retrieving the version.
80
- * @param {SatelliteParameters} params.satellite - The satellite parameters.
81
- * @returns {Promise<string>} A promise that resolves to the version of the satellite.
82
- */
83
- export declare const satelliteVersion: (params: {
84
- satellite: SatelliteParameters;
85
- }) => Promise<string>;
86
- /**
87
- * Retrieves the build version of the satellite.
88
- * @param {Object} params - The parameters for retrieving the build version.
89
- * @param {SatelliteParameters} params.satellite - The satellite parameters.
90
- * @returns {Promise<string>} A promise that resolves to the build version of the satellite.
91
- */
92
- export declare const satelliteBuildVersion: (params: {
93
- satellite: SatelliteParameters;
94
- }) => Promise<string>;
95
- /**
96
- * Retrieves the build type of the satellite.
97
- * @param {Object} params - The parameters for retrieving the build type.
98
- * @param {SatelliteParameters} params.satellite - The satellite parameters.
99
- * @returns {Promise<BuildType | undefined>} A promise that resolves to the build type of the satellite or undefined if not found.
100
- */
101
- export declare const satelliteBuildType: ({ satellite: { satelliteId, ...rest } }: {
102
- satellite: SatelliteParameters;
103
- }) => Promise<BuildType | undefined>;
104
- /**
105
- * Upgrades the satellite with the provided WASM module.
106
- * @param {Object} params - The parameters for upgrading the satellite.
107
- * @param {SatelliteParameters} params.satellite - The satellite parameters.
108
- * @param {Uint8Array} params.wasm_module - The WASM module for the upgrade.
109
- * @param {boolean} params.deprecated - Whether the upgrade is deprecated.
110
- * @param {boolean} params.deprecatedNoScope - Whether the upgrade is deprecated with no scope.
111
- * @param {boolean} [params.reset=false] - Whether to reset the satellite (reinstall) instead of upgrading.
112
- * @returns {Promise<void>} A promise that resolves when the upgrade is complete.
113
- */
114
- export declare const upgradeSatellite: ({ satellite, wasm_module, deprecated, deprecatedNoScope, reset }: {
115
- satellite: SatelliteParameters;
116
- wasm_module: Uint8Array;
117
- deprecated: boolean;
118
- deprecatedNoScope: boolean;
119
- reset?: boolean;
120
- }) => Promise<void>;
121
- /**
122
- * Lists the custom domains for a satellite.
123
- * @param {Object} params - The parameters for listing the custom domains.
124
- * @param {SatelliteParameters} params.satellite - The satellite parameters.
125
- * @returns {Promise<CustomDomain[]>} A promise that resolves to an array of custom domains.
126
- */
127
- export declare const listCustomDomains: ({ satellite }: {
128
- satellite: SatelliteParameters;
129
- }) => Promise<CustomDomain[]>;
130
- /**
131
- * Sets the custom domains for a satellite.
132
- * @param {Object} params - The parameters for setting the custom domains.
133
- * @param {SatelliteParameters} params.satellite - The satellite parameters.
134
- * @param {CustomDomain[]} params.domains - The custom domains to set.
135
- * @returns {Promise<void[]>} A promise that resolves when the custom domains are set.
136
- */
137
- export declare const setCustomDomains: ({ satellite, domains }: {
138
- satellite: SatelliteParameters;
139
- domains: CustomDomain[];
140
- }) => Promise<void[]>;
141
- /**
142
- * Retrieves the memory size of a satellite.
143
- * @param {Object} params - The parameters for retrieving the memory size.
144
- * @param {SatelliteParameters} params.satellite - The satellite parameters.
145
- * @returns {Promise<MemorySize>} A promise that resolves to the memory size of the satellite.
146
- */
147
- export declare const satelliteMemorySize: (params: {
148
- satellite: SatelliteParameters;
149
- }) => Promise<MemorySize>;
150
- /**
151
- * Counts the documents in a collection.
152
- * @param {Object} params - The parameters for counting the documents.
153
- * @param {string} params.collection - The name of the collection.
154
- * @param {SatelliteParameters} params.satellite - The satellite parameters.
155
- * @returns {Promise<bigint>} A promise that resolves to the number of documents in the collection.
156
- */
157
- export declare const countDocs: (params: {
158
- collection: string;
159
- satellite: SatelliteParameters;
160
- }) => Promise<bigint>;
161
- /**
162
- * Deletes the documents in a collection.
163
- * @param {Object} params - The parameters for deleting the documents.
164
- * @param {string} params.collection - The name of the collection.
165
- * @param {SatelliteParameters} params.satellite - The satellite parameters.
166
- * @returns {Promise<void>} A promise that resolves when the documents are deleted.
167
- */
168
- export declare const deleteDocs: (params: {
169
- collection: string;
170
- satellite: SatelliteParameters;
171
- }) => Promise<void>;
172
- /**
173
- * Counts the assets in a collection.
174
- * @param {Object} params - The parameters for counting the assets.
175
- * @param {string} params.collection - The name of the collection.
176
- * @param {SatelliteParameters} params.satellite - The satellite parameters.
177
- * @returns {Promise<bigint>} A promise that resolves to the number of assets in the collection.
178
- */
179
- export declare const countAssets: (params: {
180
- collection: string;
181
- satellite: SatelliteParameters;
182
- }) => Promise<bigint>;
183
- /**
184
- * Deletes the assets in a collection.
185
- * @param {Object} params - The parameters for deleting the assets.
186
- * @param {string} params.collection - The name of the collection.
187
- * @param {SatelliteParameters} params.satellite - The satellite parameters.
188
- * @returns {Promise<void>} A promise that resolves when the assets are deleted.
189
- */
190
- export declare const deleteAssets: (params: {
191
- collection: string;
192
- satellite: SatelliteParameters;
193
- }) => Promise<void>;
194
- /**
195
- * Lists the controllers of a satellite.
196
- * @param {Object} params - The parameters for listing the controllers.
197
- * @param {SatelliteParameters} params.satellite - The satellite parameters.
198
- * @param {boolean} [params.deprecatedNoScope] - Whether to list deprecated no-scope controllers.
199
- * @returns {Promise<[Principal, Controller][]>} A promise that resolves to a list of controllers.
200
- */
201
- export declare const listSatelliteControllers: ({ deprecatedNoScope, ...params }: {
202
- satellite: SatelliteParameters;
203
- deprecatedNoScope?: boolean;
204
- }) => Promise<[Principal, Controller][]>;
205
- /**
206
- * Sets the controllers of a satellite.
207
- * @param {Object} params - The parameters for setting the controllers.
208
- * @param {SatelliteParameters} params.satellite - The satellite parameters.
209
- * @param {SetControllersArgs} params.args - The arguments for setting the controllers.
210
- * @returns {Promise<[Principal, Controller][]>} A promise that resolves to a list of controllers.
211
- */
212
- export declare const setSatelliteControllers: (params: {
213
- satellite: SatelliteParameters;
214
- args: SetControllersArgs;
215
- }) => Promise<[Principal, Controller][]>;
@@ -1,14 +0,0 @@
1
- import type { canister_id, install_code_args, wasm_module } from '../../declarations/ic/ic.did';
2
- /**
3
- * Represents the parameters for installing code on a canister.
4
- * @typedef {Object} InstallCodeParams
5
- * @property {Uint8Array} arg - The argument to pass to the installation.
6
- * @property {wasm_module} wasm_module - The WebAssembly module to install.
7
- * @property {canister_id} canister_id - The ID of the canister.
8
- * @property {install_code_args['mode']} mode - The mode of the installation.
9
- */
10
- export type InstallCodeParams = {
11
- arg: Uint8Array;
12
- wasm_module: wasm_module;
13
- canister_id: canister_id;
14
- } & Pick<install_code_args, 'mode'>;