@junobuild/admin 0.0.33 → 0.0.34

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 (56) hide show
  1. package/README.md +1 -1
  2. package/declarations/satellite/satellite.did.d.ts +6 -0
  3. package/declarations/satellite/satellite.factory.did.js +6 -0
  4. package/declarations/satellite/satellite.factory.did.mjs +6 -0
  5. package/dist/browser/index.js +7 -7
  6. package/dist/browser/index.js.map +3 -3
  7. package/dist/declarations/satellite/satellite.did.d.ts +6 -0
  8. package/dist/declarations/satellite/satellite.factory.did.js +6 -0
  9. package/dist/declarations/satellite/satellite.factory.did.mjs +6 -0
  10. package/dist/node/index.mjs +7 -7
  11. package/dist/node/index.mjs.map +3 -3
  12. package/dist/types/api/actor.api.d.ts +1 -3
  13. package/dist/types/constants/rules.constants.d.ts +3 -1
  14. package/dist/types/types/rules.types.d.ts +3 -0
  15. package/dist/types/utils/rule.utils.d.ts +5 -3
  16. package/package.json +3 -3
  17. package/declarations/cmc/cmc.did +0 -122
  18. package/declarations/cmc/cmc.did.d.ts +0 -48
  19. package/declarations/cmc/cmc.factory.did.js +0 -67
  20. package/declarations/cmc/index.d.ts +0 -45
  21. package/declarations/cmc/index.js +0 -37
  22. package/declarations/console/console.did.d.ts +0 -71
  23. package/declarations/console/console.factory.did.js +0 -79
  24. package/declarations/console/console.factory.did.mjs +0 -79
  25. package/declarations/console/index.d.ts +0 -45
  26. package/declarations/console/index.js +0 -37
  27. package/declarations/index/index.d.ts +0 -45
  28. package/declarations/index/index.did +0 -68
  29. package/declarations/index/index.did.d.ts +0 -97
  30. package/declarations/index/index.factory.did.js +0 -94
  31. package/declarations/index/index.js +0 -37
  32. package/declarations/observatory/index.d.ts +0 -45
  33. package/declarations/observatory/index.js +0 -38
  34. package/declarations/observatory/observatory.did.d.ts +0 -86
  35. package/declarations/observatory/observatory.factory.did.js +0 -95
  36. package/declarations/observatory/observatory.factory.did.mjs +0 -95
  37. package/dist/declarations/cmc/cmc.did +0 -122
  38. package/dist/declarations/cmc/cmc.did.d.ts +0 -48
  39. package/dist/declarations/cmc/cmc.factory.did.js +0 -67
  40. package/dist/declarations/cmc/index.d.ts +0 -45
  41. package/dist/declarations/cmc/index.js +0 -37
  42. package/dist/declarations/console/console.did.d.ts +0 -71
  43. package/dist/declarations/console/console.factory.did.js +0 -79
  44. package/dist/declarations/console/console.factory.did.mjs +0 -79
  45. package/dist/declarations/console/index.d.ts +0 -45
  46. package/dist/declarations/console/index.js +0 -37
  47. package/dist/declarations/index/index.d.ts +0 -45
  48. package/dist/declarations/index/index.did +0 -68
  49. package/dist/declarations/index/index.did.d.ts +0 -97
  50. package/dist/declarations/index/index.factory.did.js +0 -94
  51. package/dist/declarations/index/index.js +0 -37
  52. package/dist/declarations/observatory/index.d.ts +0 -45
  53. package/dist/declarations/observatory/index.js +0 -38
  54. package/dist/declarations/observatory/observatory.did.d.ts +0 -86
  55. package/dist/declarations/observatory/observatory.factory.did.js +0 -95
  56. package/dist/declarations/observatory/observatory.factory.did.mjs +0 -95
@@ -1,37 +0,0 @@
1
- import {Actor, HttpAgent} from '@dfinity/agent';
2
-
3
- // Imports and re-exports candid interface
4
- import {idlFactory} from './console.did.js';
5
- export {idlFactory} from './console.did.js';
6
-
7
- /* CANISTER_ID is replaced by webpack based on node environment
8
- * Note: canister environment variable will be standardized as
9
- * process.env.CANISTER_ID_<CANISTER_NAME_UPPERCASE>
10
- * beginning in dfx 0.15.0
11
- */
12
- export const canisterId = process.env.CANISTER_ID_CONSOLE || process.env.CONSOLE_CANISTER_ID;
13
-
14
- export const createActor = (canisterId, options = {}) => {
15
- const agent = options.agent || new HttpAgent({...options.agentOptions});
16
-
17
- if (options.agent && options.agentOptions) {
18
- console.warn(
19
- 'Detected both agent and agentOptions passed to createActor. Ignoring agentOptions and proceeding with the provided agent.'
20
- );
21
- }
22
-
23
- // Fetch root key for certificate validation during development
24
- if (process.env.DFX_NETWORK !== 'ic') {
25
- agent.fetchRootKey().catch((err) => {
26
- console.warn('Unable to fetch root key. Check to ensure that your local replica is running');
27
- console.error(err);
28
- });
29
- }
30
-
31
- // Creates an actor with using the candid interface and the HttpAgent
32
- return Actor.createActor(idlFactory, {
33
- agent,
34
- canisterId,
35
- ...options.actorOptions
36
- });
37
- };
@@ -1,45 +0,0 @@
1
- import type {ActorConfig, ActorSubclass, Agent, HttpAgentOptions} from '@dfinity/agent';
2
- import type {IDL} from '@dfinity/candid';
3
- import type {Principal} from '@dfinity/principal';
4
-
5
- import {_SERVICE} from './index.did';
6
-
7
- export declare const idlFactory: IDL.InterfaceFactory;
8
- export declare const canisterId: string;
9
-
10
- export declare interface CreateActorOptions {
11
- /**
12
- * @see {@link Agent}
13
- */
14
- agent?: Agent;
15
- /**
16
- * @see {@link HttpAgentOptions}
17
- */
18
- agentOptions?: HttpAgentOptions;
19
- /**
20
- * @see {@link ActorConfig}
21
- */
22
- actorOptions?: ActorConfig;
23
- }
24
-
25
- /**
26
- * Intializes an {@link ActorSubclass}, configured with the provided SERVICE interface of a canister.
27
- * @constructs {@link ActorSubClass}
28
- * @param {string | Principal} canisterId - ID of the canister the {@link Actor} will talk to
29
- * @param {CreateActorOptions} options - see {@link CreateActorOptions}
30
- * @param {CreateActorOptions["agent"]} options.agent - a pre-configured agent you'd like to use. Supercedes agentOptions
31
- * @param {CreateActorOptions["agentOptions"]} options.agentOptions - options to set up a new agent
32
- * @see {@link HttpAgentOptions}
33
- * @param {CreateActorOptions["actorOptions"]} options.actorOptions - options for the Actor
34
- * @see {@link ActorConfig}
35
- */
36
- export declare const createActor: (
37
- canisterId: string | Principal,
38
- options?: CreateActorOptions
39
- ) => ActorSubclass<_SERVICE>;
40
-
41
- /**
42
- * Intialized Actor using default settings, ready to talk to a canister using its candid interface
43
- * @constructs {@link ActorSubClass}
44
- */
45
- export declare const index: ActorSubclass<_SERVICE>;
@@ -1,68 +0,0 @@
1
- type GetAccountIdentifierTransactionsArgs = record {
2
- max_results : nat64;
3
- start : opt nat64;
4
- account_identifier : text;
5
- };
6
- type GetAccountIdentifierTransactionsError = record { message : text };
7
- type GetAccountIdentifierTransactionsResponse = record {
8
- balance : nat64;
9
- transactions : vec TransactionWithId;
10
- oldest_tx_id : opt nat64;
11
- };
12
- type GetBlocksRequest = record { start : nat; length : nat };
13
- type GetBlocksResponse = record { blocks : vec vec nat8; chain_length : nat64 };
14
- type HttpRequest = record {
15
- url : text;
16
- method : text;
17
- body : vec nat8;
18
- headers : vec record { text; text };
19
- };
20
- type HttpResponse = record {
21
- body : vec nat8;
22
- headers : vec record { text; text };
23
- status_code : nat16;
24
- };
25
- type InitArg = record { ledger_id : principal };
26
- type Operation = variant {
27
- Approve : record {
28
- fee : Tokens;
29
- from : text;
30
- allowance : Tokens;
31
- expires_at : opt TimeStamp;
32
- spender : text;
33
- };
34
- Burn : record { from : text; amount : Tokens };
35
- Mint : record { to : text; amount : Tokens };
36
- Transfer : record { to : text; fee : Tokens; from : text; amount : Tokens };
37
- TransferFrom : record {
38
- to : text;
39
- fee : Tokens;
40
- from : text;
41
- amount : Tokens;
42
- spender : text;
43
- };
44
- };
45
- type Result = variant {
46
- Ok : GetAccountIdentifierTransactionsResponse;
47
- Err : GetAccountIdentifierTransactionsError;
48
- };
49
- type Status = record { num_blocks_synced : nat64 };
50
- type TimeStamp = record { timestamp_nanos : nat64 };
51
- type Tokens = record { e8s : nat64 };
52
- type Transaction = record {
53
- memo : nat64;
54
- icrc1_memo : opt vec nat8;
55
- operation : Operation;
56
- created_at_time : opt TimeStamp;
57
- };
58
- type TransactionWithId = record { id : nat64; transaction : Transaction };
59
- service : (InitArg) -> {
60
- get_account_identifier_balance : (text) -> (nat64) query;
61
- get_account_identifier_transactions : (
62
- GetAccountIdentifierTransactionsArgs,
63
- ) -> (Result) query;
64
- get_blocks : (GetBlocksRequest) -> (GetBlocksResponse) query;
65
- http_request : (HttpRequest) -> (HttpResponse) query;
66
- ledger_id : () -> (principal) query;
67
- status : () -> (Status) query;
68
- }
@@ -1,97 +0,0 @@
1
- import type {ActorMethod} from '@dfinity/agent';
2
- import type {Principal} from '@dfinity/principal';
3
-
4
- export interface GetAccountIdentifierTransactionsArgs {
5
- max_results: bigint;
6
- start: [] | [bigint];
7
- account_identifier: string;
8
- }
9
- export interface GetAccountIdentifierTransactionsError {
10
- message: string;
11
- }
12
- export interface GetAccountIdentifierTransactionsResponse {
13
- balance: bigint;
14
- transactions: Array<TransactionWithId>;
15
- oldest_tx_id: [] | [bigint];
16
- }
17
- export interface GetBlocksRequest {
18
- start: bigint;
19
- length: bigint;
20
- }
21
- export interface GetBlocksResponse {
22
- blocks: Array<Uint8Array | number[]>;
23
- chain_length: bigint;
24
- }
25
- export interface HttpRequest {
26
- url: string;
27
- method: string;
28
- body: Uint8Array | number[];
29
- headers: Array<[string, string]>;
30
- }
31
- export interface HttpResponse {
32
- body: Uint8Array | number[];
33
- headers: Array<[string, string]>;
34
- status_code: number;
35
- }
36
- export interface InitArg {
37
- ledger_id: Principal;
38
- }
39
- export type Operation =
40
- | {
41
- Approve: {
42
- fee: Tokens;
43
- from: string;
44
- allowance: Tokens;
45
- expires_at: [] | [TimeStamp];
46
- spender: string;
47
- };
48
- }
49
- | {Burn: {from: string; amount: Tokens}}
50
- | {Mint: {to: string; amount: Tokens}}
51
- | {
52
- Transfer: {
53
- to: string;
54
- fee: Tokens;
55
- from: string;
56
- amount: Tokens;
57
- };
58
- }
59
- | {
60
- TransferFrom: {
61
- to: string;
62
- fee: Tokens;
63
- from: string;
64
- amount: Tokens;
65
- spender: string;
66
- };
67
- };
68
- export type Result =
69
- | {Ok: GetAccountIdentifierTransactionsResponse}
70
- | {Err: GetAccountIdentifierTransactionsError};
71
- export interface Status {
72
- num_blocks_synced: bigint;
73
- }
74
- export interface TimeStamp {
75
- timestamp_nanos: bigint;
76
- }
77
- export interface Tokens {
78
- e8s: bigint;
79
- }
80
- export interface Transaction {
81
- memo: bigint;
82
- icrc1_memo: [] | [Uint8Array | number[]];
83
- operation: Operation;
84
- created_at_time: [] | [TimeStamp];
85
- }
86
- export interface TransactionWithId {
87
- id: bigint;
88
- transaction: Transaction;
89
- }
90
- export interface _SERVICE {
91
- get_account_identifier_balance: ActorMethod<[string], bigint>;
92
- get_account_identifier_transactions: ActorMethod<[GetAccountIdentifierTransactionsArgs], Result>;
93
- get_blocks: ActorMethod<[GetBlocksRequest], GetBlocksResponse>;
94
- http_request: ActorMethod<[HttpRequest], HttpResponse>;
95
- ledger_id: ActorMethod<[], Principal>;
96
- status: ActorMethod<[], Status>;
97
- }
@@ -1,94 +0,0 @@
1
- // @ts-ignore
2
- export const idlFactory = ({IDL}) => {
3
- const InitArg = IDL.Record({ledger_id: IDL.Principal});
4
- const GetAccountIdentifierTransactionsArgs = IDL.Record({
5
- max_results: IDL.Nat64,
6
- start: IDL.Opt(IDL.Nat64),
7
- account_identifier: IDL.Text
8
- });
9
- const Tokens = IDL.Record({e8s: IDL.Nat64});
10
- const TimeStamp = IDL.Record({timestamp_nanos: IDL.Nat64});
11
- const Operation = IDL.Variant({
12
- Approve: IDL.Record({
13
- fee: Tokens,
14
- from: IDL.Text,
15
- allowance: Tokens,
16
- expires_at: IDL.Opt(TimeStamp),
17
- spender: IDL.Text
18
- }),
19
- Burn: IDL.Record({from: IDL.Text, amount: Tokens}),
20
- Mint: IDL.Record({to: IDL.Text, amount: Tokens}),
21
- Transfer: IDL.Record({
22
- to: IDL.Text,
23
- fee: Tokens,
24
- from: IDL.Text,
25
- amount: Tokens
26
- }),
27
- TransferFrom: IDL.Record({
28
- to: IDL.Text,
29
- fee: Tokens,
30
- from: IDL.Text,
31
- amount: Tokens,
32
- spender: IDL.Text
33
- })
34
- });
35
- const Transaction = IDL.Record({
36
- memo: IDL.Nat64,
37
- icrc1_memo: IDL.Opt(IDL.Vec(IDL.Nat8)),
38
- operation: Operation,
39
- created_at_time: IDL.Opt(TimeStamp)
40
- });
41
- const TransactionWithId = IDL.Record({
42
- id: IDL.Nat64,
43
- transaction: Transaction
44
- });
45
- const GetAccountIdentifierTransactionsResponse = IDL.Record({
46
- balance: IDL.Nat64,
47
- transactions: IDL.Vec(TransactionWithId),
48
- oldest_tx_id: IDL.Opt(IDL.Nat64)
49
- });
50
- const GetAccountIdentifierTransactionsError = IDL.Record({
51
- message: IDL.Text
52
- });
53
- const Result = IDL.Variant({
54
- Ok: GetAccountIdentifierTransactionsResponse,
55
- Err: GetAccountIdentifierTransactionsError
56
- });
57
- const GetBlocksRequest = IDL.Record({
58
- start: IDL.Nat,
59
- length: IDL.Nat
60
- });
61
- const GetBlocksResponse = IDL.Record({
62
- blocks: IDL.Vec(IDL.Vec(IDL.Nat8)),
63
- chain_length: IDL.Nat64
64
- });
65
- const HttpRequest = IDL.Record({
66
- url: IDL.Text,
67
- method: IDL.Text,
68
- body: IDL.Vec(IDL.Nat8),
69
- headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))
70
- });
71
- const HttpResponse = IDL.Record({
72
- body: IDL.Vec(IDL.Nat8),
73
- headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
74
- status_code: IDL.Nat16
75
- });
76
- const Status = IDL.Record({num_blocks_synced: IDL.Nat64});
77
- return IDL.Service({
78
- get_account_identifier_balance: IDL.Func([IDL.Text], [IDL.Nat64], ['query']),
79
- get_account_identifier_transactions: IDL.Func(
80
- [GetAccountIdentifierTransactionsArgs],
81
- [Result],
82
- ['query']
83
- ),
84
- get_blocks: IDL.Func([GetBlocksRequest], [GetBlocksResponse], ['query']),
85
- http_request: IDL.Func([HttpRequest], [HttpResponse], ['query']),
86
- ledger_id: IDL.Func([], [IDL.Principal], ['query']),
87
- status: IDL.Func([], [Status], ['query'])
88
- });
89
- };
90
- // @ts-ignore
91
- export const init = ({IDL}) => {
92
- const InitArg = IDL.Record({ledger_id: IDL.Principal});
93
- return [InitArg];
94
- };
@@ -1,37 +0,0 @@
1
- import {Actor, HttpAgent} from '@dfinity/agent';
2
-
3
- // Imports and re-exports candid interface
4
- import {idlFactory} from './index.did.js';
5
- export {idlFactory} from './index.did.js';
6
-
7
- /* CANISTER_ID is replaced by webpack based on node environment
8
- * Note: canister environment variable will be standardized as
9
- * process.env.CANISTER_ID_<CANISTER_NAME_UPPERCASE>
10
- * beginning in dfx 0.15.0
11
- */
12
- export const canisterId = process.env.CANISTER_ID_INDEX || process.env.INDEX_CANISTER_ID;
13
-
14
- export const createActor = (canisterId, options = {}) => {
15
- const agent = options.agent || new HttpAgent({...options.agentOptions});
16
-
17
- if (options.agent && options.agentOptions) {
18
- console.warn(
19
- 'Detected both agent and agentOptions passed to createActor. Ignoring agentOptions and proceeding with the provided agent.'
20
- );
21
- }
22
-
23
- // Fetch root key for certificate validation during development
24
- if (process.env.DFX_NETWORK !== 'ic') {
25
- agent.fetchRootKey().catch((err) => {
26
- console.warn('Unable to fetch root key. Check to ensure that your local replica is running');
27
- console.error(err);
28
- });
29
- }
30
-
31
- // Creates an actor with using the candid interface and the HttpAgent
32
- return Actor.createActor(idlFactory, {
33
- agent,
34
- canisterId,
35
- ...options.actorOptions
36
- });
37
- };
@@ -1,45 +0,0 @@
1
- import type {ActorConfig, ActorSubclass, Agent, HttpAgentOptions} from '@dfinity/agent';
2
- import type {IDL} from '@dfinity/candid';
3
- import type {Principal} from '@dfinity/principal';
4
-
5
- import {_SERVICE} from './observatory.did';
6
-
7
- export declare const idlFactory: IDL.InterfaceFactory;
8
- export declare const canisterId: string;
9
-
10
- export declare interface CreateActorOptions {
11
- /**
12
- * @see {@link Agent}
13
- */
14
- agent?: Agent;
15
- /**
16
- * @see {@link HttpAgentOptions}
17
- */
18
- agentOptions?: HttpAgentOptions;
19
- /**
20
- * @see {@link ActorConfig}
21
- */
22
- actorOptions?: ActorConfig;
23
- }
24
-
25
- /**
26
- * Intializes an {@link ActorSubclass}, configured with the provided SERVICE interface of a canister.
27
- * @constructs {@link ActorSubClass}
28
- * @param {string | Principal} canisterId - ID of the canister the {@link Actor} will talk to
29
- * @param {CreateActorOptions} options - see {@link CreateActorOptions}
30
- * @param {CreateActorOptions["agent"]} options.agent - a pre-configured agent you'd like to use. Supercedes agentOptions
31
- * @param {CreateActorOptions["agentOptions"]} options.agentOptions - options to set up a new agent
32
- * @see {@link HttpAgentOptions}
33
- * @param {CreateActorOptions["actorOptions"]} options.actorOptions - options for the Actor
34
- * @see {@link ActorConfig}
35
- */
36
- export declare const createActor: (
37
- canisterId: string | Principal,
38
- options?: CreateActorOptions
39
- ) => ActorSubclass<_SERVICE>;
40
-
41
- /**
42
- * Intialized Actor using default settings, ready to talk to a canister using its candid interface
43
- * @constructs {@link ActorSubClass}
44
- */
45
- export declare const observatory: ActorSubclass<_SERVICE>;
@@ -1,38 +0,0 @@
1
- import {Actor, HttpAgent} from '@dfinity/agent';
2
-
3
- // Imports and re-exports candid interface
4
- import {idlFactory} from './observatory.did.js';
5
- export {idlFactory} from './observatory.did.js';
6
-
7
- /* CANISTER_ID is replaced by webpack based on node environment
8
- * Note: canister environment variable will be standardized as
9
- * process.env.CANISTER_ID_<CANISTER_NAME_UPPERCASE>
10
- * beginning in dfx 0.15.0
11
- */
12
- export const canisterId =
13
- process.env.CANISTER_ID_OBSERVATORY || process.env.OBSERVATORY_CANISTER_ID;
14
-
15
- export const createActor = (canisterId, options = {}) => {
16
- const agent = options.agent || new HttpAgent({...options.agentOptions});
17
-
18
- if (options.agent && options.agentOptions) {
19
- console.warn(
20
- 'Detected both agent and agentOptions passed to createActor. Ignoring agentOptions and proceeding with the provided agent.'
21
- );
22
- }
23
-
24
- // Fetch root key for certificate validation during development
25
- if (process.env.DFX_NETWORK !== 'ic') {
26
- agent.fetchRootKey().catch((err) => {
27
- console.warn('Unable to fetch root key. Check to ensure that your local replica is running');
28
- console.error(err);
29
- });
30
- }
31
-
32
- // Creates an actor with using the candid interface and the HttpAgent
33
- return Actor.createActor(idlFactory, {
34
- agent,
35
- canisterId,
36
- ...options.actorOptions
37
- });
38
- };
@@ -1,86 +0,0 @@
1
- import type {ActorMethod} from '@dfinity/agent';
2
- import type {Principal} from '@dfinity/principal';
3
-
4
- export interface CanisterStatusResponse {
5
- status: CanisterStatusType;
6
- memory_size: bigint;
7
- cycles: bigint;
8
- settings: DefiniteCanisterSettings;
9
- idle_cycles_burned_per_day: bigint;
10
- module_hash: [] | [Uint8Array | number[]];
11
- }
12
- export type CanisterStatusType = {stopped: null} | {stopping: null} | {running: null};
13
- export type ControllerScope = {Write: null} | {Admin: null};
14
- export interface CronJobStatuses {
15
- mission_control_cycles_threshold: [] | [bigint];
16
- orbiters: Array<[Principal, CronJobStatusesConfig]>;
17
- satellites: Array<[Principal, CronJobStatusesConfig]>;
18
- enabled: boolean;
19
- cycles_threshold: [] | [bigint];
20
- }
21
- export interface CronJobStatusesConfig {
22
- enabled: boolean;
23
- cycles_threshold: [] | [bigint];
24
- }
25
- export interface CronJobs {
26
- metadata: Array<[string, string]>;
27
- statuses: CronJobStatuses;
28
- }
29
- export interface CronTab {
30
- cron_jobs: CronJobs;
31
- updated_at: bigint;
32
- mission_control_id: Principal;
33
- created_at: bigint;
34
- }
35
- export interface DefiniteCanisterSettings {
36
- freezing_threshold: bigint;
37
- controllers: Array<Principal>;
38
- memory_allocation: bigint;
39
- compute_allocation: bigint;
40
- }
41
- export interface DeleteControllersArgs {
42
- controllers: Array<Principal>;
43
- }
44
- export interface ListStatuses {
45
- cron_jobs: CronJobs;
46
- statuses: Result_1;
47
- timestamp: bigint;
48
- }
49
- export interface ListStatusesArgs {
50
- time_delta: [] | [bigint];
51
- }
52
- export type Result = {Ok: SegmentStatus} | {Err: string};
53
- export type Result_1 = {Ok: SegmentsStatuses} | {Err: string};
54
- export interface SegmentStatus {
55
- id: Principal;
56
- status: CanisterStatusResponse;
57
- metadata: [] | [Array<[string, string]>];
58
- status_at: bigint;
59
- }
60
- export interface SegmentsStatuses {
61
- orbiters: [] | [Array<Result>];
62
- satellites: [] | [Array<Result>];
63
- mission_control: Result;
64
- }
65
- export interface SetController {
66
- metadata: Array<[string, string]>;
67
- scope: ControllerScope;
68
- expires_at: [] | [bigint];
69
- }
70
- export interface SetControllersArgs {
71
- controller: SetController;
72
- controllers: Array<Principal>;
73
- }
74
- export interface SetCronTab {
75
- cron_jobs: CronJobs;
76
- updated_at: [] | [bigint];
77
- mission_control_id: Principal;
78
- }
79
- export interface _SERVICE {
80
- del_controllers: ActorMethod<[DeleteControllersArgs], undefined>;
81
- get_cron_tab: ActorMethod<[], [] | [CronTab]>;
82
- list_statuses: ActorMethod<[ListStatusesArgs], Array<ListStatuses>>;
83
- set_controllers: ActorMethod<[SetControllersArgs], undefined>;
84
- set_cron_tab: ActorMethod<[SetCronTab], CronTab>;
85
- version: ActorMethod<[], string>;
86
- }
@@ -1,95 +0,0 @@
1
- // @ts-ignore
2
- export const idlFactory = ({IDL}) => {
3
- const DeleteControllersArgs = IDL.Record({
4
- controllers: IDL.Vec(IDL.Principal)
5
- });
6
- const CronJobStatusesConfig = IDL.Record({
7
- enabled: IDL.Bool,
8
- cycles_threshold: IDL.Opt(IDL.Nat64)
9
- });
10
- const CronJobStatuses = IDL.Record({
11
- mission_control_cycles_threshold: IDL.Opt(IDL.Nat64),
12
- orbiters: IDL.Vec(IDL.Tuple(IDL.Principal, CronJobStatusesConfig)),
13
- satellites: IDL.Vec(IDL.Tuple(IDL.Principal, CronJobStatusesConfig)),
14
- enabled: IDL.Bool,
15
- cycles_threshold: IDL.Opt(IDL.Nat64)
16
- });
17
- const CronJobs = IDL.Record({
18
- metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
19
- statuses: CronJobStatuses
20
- });
21
- const CronTab = IDL.Record({
22
- cron_jobs: CronJobs,
23
- updated_at: IDL.Nat64,
24
- mission_control_id: IDL.Principal,
25
- created_at: IDL.Nat64
26
- });
27
- const ListStatusesArgs = IDL.Record({time_delta: IDL.Opt(IDL.Nat64)});
28
- const CanisterStatusType = IDL.Variant({
29
- stopped: IDL.Null,
30
- stopping: IDL.Null,
31
- running: IDL.Null
32
- });
33
- const DefiniteCanisterSettings = IDL.Record({
34
- freezing_threshold: IDL.Nat,
35
- controllers: IDL.Vec(IDL.Principal),
36
- memory_allocation: IDL.Nat,
37
- compute_allocation: IDL.Nat
38
- });
39
- const CanisterStatusResponse = IDL.Record({
40
- status: CanisterStatusType,
41
- memory_size: IDL.Nat,
42
- cycles: IDL.Nat,
43
- settings: DefiniteCanisterSettings,
44
- idle_cycles_burned_per_day: IDL.Nat,
45
- module_hash: IDL.Opt(IDL.Vec(IDL.Nat8))
46
- });
47
- const SegmentStatus = IDL.Record({
48
- id: IDL.Principal,
49
- status: CanisterStatusResponse,
50
- metadata: IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))),
51
- status_at: IDL.Nat64
52
- });
53
- const Result = IDL.Variant({Ok: SegmentStatus, Err: IDL.Text});
54
- const SegmentsStatuses = IDL.Record({
55
- orbiters: IDL.Opt(IDL.Vec(Result)),
56
- satellites: IDL.Opt(IDL.Vec(Result)),
57
- mission_control: Result
58
- });
59
- const Result_1 = IDL.Variant({Ok: SegmentsStatuses, Err: IDL.Text});
60
- const ListStatuses = IDL.Record({
61
- cron_jobs: CronJobs,
62
- statuses: Result_1,
63
- timestamp: IDL.Nat64
64
- });
65
- const ControllerScope = IDL.Variant({
66
- Write: IDL.Null,
67
- Admin: IDL.Null
68
- });
69
- const SetController = IDL.Record({
70
- metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
71
- scope: ControllerScope,
72
- expires_at: IDL.Opt(IDL.Nat64)
73
- });
74
- const SetControllersArgs = IDL.Record({
75
- controller: SetController,
76
- controllers: IDL.Vec(IDL.Principal)
77
- });
78
- const SetCronTab = IDL.Record({
79
- cron_jobs: CronJobs,
80
- updated_at: IDL.Opt(IDL.Nat64),
81
- mission_control_id: IDL.Principal
82
- });
83
- return IDL.Service({
84
- del_controllers: IDL.Func([DeleteControllersArgs], [], []),
85
- get_cron_tab: IDL.Func([], [IDL.Opt(CronTab)], ['query']),
86
- list_statuses: IDL.Func([ListStatusesArgs], [IDL.Vec(ListStatuses)], ['query']),
87
- set_controllers: IDL.Func([SetControllersArgs], [], []),
88
- set_cron_tab: IDL.Func([SetCronTab], [CronTab], []),
89
- version: IDL.Func([], [IDL.Text], ['query'])
90
- });
91
- };
92
- // @ts-ignore
93
- export const init = ({IDL}) => {
94
- return [];
95
- };