@junobuild/core-peer 1.0.3 → 1.1.0

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 (53) hide show
  1. package/dist/browser/index.js +1 -1
  2. package/dist/browser/index.js.map +4 -4
  3. package/dist/node/index.mjs +1 -1
  4. package/dist/node/index.mjs.map +4 -4
  5. package/dist/types/api/actor.api.d.ts +1 -1
  6. package/dist/types/api/storage.api.d.ts +4 -4
  7. package/dist/types/services/storage.services.d.ts +3 -3
  8. package/dist/types/stores/actor.store.d.ts +1 -2
  9. package/dist/types/types/storage.types.d.ts +2 -2
  10. package/dist/types/utils/data.utils.d.ts +2 -2
  11. package/dist/types/utils/doc.utils.d.ts +4 -4
  12. package/dist/types/utils/list.utils.d.ts +2 -2
  13. package/package.json +6 -5
  14. package/dist/declarations/deprecated/console-0-0-14.did.d.ts +0 -267
  15. package/dist/declarations/deprecated/console-0-0-14.factory.did.js +0 -285
  16. package/dist/declarations/deprecated/console-0-0-8-patch1.did.d.ts +0 -75
  17. package/dist/declarations/deprecated/console-0-0-8-patch1.factory.did.js +0 -80
  18. package/dist/declarations/deprecated/mission_control-0-0-13.did.d.ts +0 -246
  19. package/dist/declarations/deprecated/mission_control-0-0-13.factory.did.js +0 -280
  20. package/dist/declarations/deprecated/mission_control-0-0-14.did.d.ts +0 -241
  21. package/dist/declarations/deprecated/mission_control-0-0-14.factory.did.js +0 -258
  22. package/dist/declarations/deprecated/mission_control-0-0-4.did.d.ts +0 -80
  23. package/dist/declarations/deprecated/mission_control-0-0-4.factory.did.js +0 -99
  24. package/dist/declarations/deprecated/observatory-0-0-9.did.d.ts +0 -70
  25. package/dist/declarations/deprecated/observatory-0-0-9.factory.did.js +0 -76
  26. package/dist/declarations/deprecated/orbiter-0-0-6.did.d.ts +0 -161
  27. package/dist/declarations/deprecated/orbiter-0-0-6.factory.did.js +0 -192
  28. package/dist/declarations/deprecated/orbiter-0-0-7.did.d.ts +0 -166
  29. package/dist/declarations/deprecated/orbiter-0-0-7.factory.did.js +0 -197
  30. package/dist/declarations/deprecated/orbiter-0-0-8.did.d.ts +0 -245
  31. package/dist/declarations/deprecated/orbiter-0-0-8.factory.did.js +0 -287
  32. package/dist/declarations/deprecated/orbiter-0-2-0.did.d.ts +0 -277
  33. package/dist/declarations/deprecated/orbiter-0-2-0.factory.did.js +0 -319
  34. package/dist/declarations/deprecated/satellite-0-0-16.did.d.ts +0 -240
  35. package/dist/declarations/deprecated/satellite-0-0-16.factory.did.js +0 -264
  36. package/dist/declarations/deprecated/satellite-0-0-17.did.d.ts +0 -254
  37. package/dist/declarations/deprecated/satellite-0-0-17.factory.did.js +0 -281
  38. package/dist/declarations/deprecated/satellite-0-0-21.did.d.ts +0 -299
  39. package/dist/declarations/deprecated/satellite-0-0-21.factory.did.js +0 -333
  40. package/dist/declarations/deprecated/satellite-0-0-22.did.d.ts +0 -290
  41. package/dist/declarations/deprecated/satellite-0-0-22.factory.did.js +0 -318
  42. package/dist/declarations/deprecated/satellite-0-0-8.did.d.ts +0 -183
  43. package/dist/declarations/deprecated/satellite-0-0-8.factory.did.js +0 -194
  44. package/dist/declarations/deprecated/satellite-0-0-9.did.d.ts +0 -199
  45. package/dist/declarations/deprecated/satellite-0-0-9.factory.did.js +0 -213
  46. package/dist/declarations/satellite/satellite.did.d.ts +0 -396
  47. package/dist/declarations/satellite/satellite.factory.certified.did.js +0 -419
  48. package/dist/declarations/satellite/satellite.factory.did.js +0 -419
  49. package/dist/declarations/satellite/satellite.factory.did.mjs +0 -419
  50. package/dist/declarations/sputnik/sputnik.did.d.ts +0 -396
  51. package/dist/declarations/sputnik/sputnik.factory.certified.did.js +0 -419
  52. package/dist/declarations/sputnik/sputnik.factory.did.js +0 -419
  53. package/dist/types/api/_actor.factory.d.ts +0 -5
@@ -1,258 +0,0 @@
1
- // @ts-ignore
2
- export const idlFactory = ({IDL}) => {
3
- const CyclesThreshold = IDL.Record({
4
- fund_cycles: IDL.Nat,
5
- min_cycles: IDL.Nat
6
- });
7
- const CyclesMonitoringStrategy = IDL.Variant({
8
- BelowThreshold: CyclesThreshold
9
- });
10
- const CyclesMonitoring = IDL.Record({
11
- strategy: IDL.Opt(CyclesMonitoringStrategy),
12
- enabled: IDL.Bool
13
- });
14
- const Monitoring = IDL.Record({cycles: IDL.Opt(CyclesMonitoring)});
15
- const Settings = IDL.Record({monitoring: IDL.Opt(Monitoring)});
16
- const Orbiter = IDL.Record({
17
- updated_at: IDL.Nat64,
18
- orbiter_id: IDL.Principal,
19
- metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
20
- created_at: IDL.Nat64,
21
- settings: IDL.Opt(Settings)
22
- });
23
- const CreateCanisterConfig = IDL.Record({
24
- subnet_id: IDL.Opt(IDL.Principal),
25
- name: IDL.Opt(IDL.Text)
26
- });
27
- const Satellite = IDL.Record({
28
- updated_at: IDL.Nat64,
29
- metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
30
- created_at: IDL.Nat64,
31
- satellite_id: IDL.Principal,
32
- settings: IDL.Opt(Settings)
33
- });
34
- const DepositCyclesArgs = IDL.Record({
35
- cycles: IDL.Nat,
36
- destination_id: IDL.Principal
37
- });
38
- const DepositedCyclesEmailNotification = IDL.Record({
39
- to: IDL.Opt(IDL.Text),
40
- enabled: IDL.Bool
41
- });
42
- const CyclesMonitoringConfig = IDL.Record({
43
- notification: IDL.Opt(DepositedCyclesEmailNotification),
44
- default_strategy: IDL.Opt(CyclesMonitoringStrategy)
45
- });
46
- const MonitoringConfig = IDL.Record({
47
- cycles: IDL.Opt(CyclesMonitoringConfig)
48
- });
49
- const Config = IDL.Record({monitoring: IDL.Opt(MonitoringConfig)});
50
- const GetMonitoringHistory = IDL.Record({
51
- to: IDL.Opt(IDL.Nat64),
52
- from: IDL.Opt(IDL.Nat64),
53
- segment_id: IDL.Principal
54
- });
55
- const MonitoringHistoryKey = IDL.Record({
56
- segment_id: IDL.Principal,
57
- created_at: IDL.Nat64,
58
- nonce: IDL.Int32
59
- });
60
- const CyclesBalance = IDL.Record({
61
- timestamp: IDL.Nat64,
62
- amount: IDL.Nat
63
- });
64
- const FundingErrorCode = IDL.Variant({
65
- BalanceCheckFailed: IDL.Null,
66
- ObtainCyclesFailed: IDL.Null,
67
- DepositFailed: IDL.Null,
68
- InsufficientCycles: IDL.Null,
69
- Other: IDL.Text
70
- });
71
- const FundingFailure = IDL.Record({
72
- timestamp: IDL.Nat64,
73
- error_code: FundingErrorCode
74
- });
75
- const MonitoringHistoryCycles = IDL.Record({
76
- deposited_cycles: IDL.Opt(CyclesBalance),
77
- cycles: CyclesBalance,
78
- funding_failure: IDL.Opt(FundingFailure)
79
- });
80
- const MonitoringHistory = IDL.Record({
81
- cycles: IDL.Opt(MonitoringHistoryCycles)
82
- });
83
- const CyclesMonitoringStatus = IDL.Record({
84
- monitored_ids: IDL.Vec(IDL.Principal),
85
- running: IDL.Bool
86
- });
87
- const MonitoringStatus = IDL.Record({
88
- cycles: IDL.Opt(CyclesMonitoringStatus)
89
- });
90
- const MissionControlSettings = IDL.Record({
91
- updated_at: IDL.Nat64,
92
- created_at: IDL.Nat64,
93
- monitoring: IDL.Opt(Monitoring)
94
- });
95
- const User = IDL.Record({
96
- updated_at: IDL.Nat64,
97
- metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
98
- user: IDL.Opt(IDL.Principal),
99
- created_at: IDL.Nat64,
100
- config: IDL.Opt(Config)
101
- });
102
- const Tokens = IDL.Record({e8s: IDL.Nat64});
103
- const Timestamp = IDL.Record({timestamp_nanos: IDL.Nat64});
104
- const TransferArgs = IDL.Record({
105
- to: IDL.Vec(IDL.Nat8),
106
- fee: Tokens,
107
- memo: IDL.Nat64,
108
- from_subaccount: IDL.Opt(IDL.Vec(IDL.Nat8)),
109
- created_at_time: IDL.Opt(Timestamp),
110
- amount: Tokens
111
- });
112
- const TransferError = IDL.Variant({
113
- TxTooOld: IDL.Record({allowed_window_nanos: IDL.Nat64}),
114
- BadFee: IDL.Record({expected_fee: Tokens}),
115
- TxDuplicate: IDL.Record({duplicate_of: IDL.Nat64}),
116
- TxCreatedInFuture: IDL.Null,
117
- InsufficientFunds: IDL.Record({balance: Tokens})
118
- });
119
- const Result = IDL.Variant({Ok: IDL.Nat64, Err: TransferError});
120
- const Account = IDL.Record({
121
- owner: IDL.Principal,
122
- subaccount: IDL.Opt(IDL.Vec(IDL.Nat8))
123
- });
124
- const TransferArg = IDL.Record({
125
- to: Account,
126
- fee: IDL.Opt(IDL.Nat),
127
- memo: IDL.Opt(IDL.Vec(IDL.Nat8)),
128
- from_subaccount: IDL.Opt(IDL.Vec(IDL.Nat8)),
129
- created_at_time: IDL.Opt(IDL.Nat64),
130
- amount: IDL.Nat
131
- });
132
- const TransferError_1 = IDL.Variant({
133
- GenericError: IDL.Record({
134
- message: IDL.Text,
135
- error_code: IDL.Nat
136
- }),
137
- TemporarilyUnavailable: IDL.Null,
138
- BadBurn: IDL.Record({min_burn_amount: IDL.Nat}),
139
- Duplicate: IDL.Record({duplicate_of: IDL.Nat}),
140
- BadFee: IDL.Record({expected_fee: IDL.Nat}),
141
- CreatedInFuture: IDL.Record({ledger_time: IDL.Nat64}),
142
- TooOld: IDL.Null,
143
- InsufficientFunds: IDL.Record({balance: IDL.Nat})
144
- });
145
- const Result_1 = IDL.Variant({Ok: IDL.Nat, Err: TransferError_1});
146
- const ControllerScope = IDL.Variant({
147
- Write: IDL.Null,
148
- Admin: IDL.Null
149
- });
150
- const Controller = IDL.Record({
151
- updated_at: IDL.Nat64,
152
- metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
153
- created_at: IDL.Nat64,
154
- scope: ControllerScope,
155
- expires_at: IDL.Opt(IDL.Nat64)
156
- });
157
- const SetController = IDL.Record({
158
- metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
159
- scope: ControllerScope,
160
- expires_at: IDL.Opt(IDL.Nat64)
161
- });
162
- const SegmentsMonitoringStrategy = IDL.Record({
163
- ids: IDL.Vec(IDL.Principal),
164
- strategy: CyclesMonitoringStrategy
165
- });
166
- const CyclesMonitoringStartConfig = IDL.Record({
167
- orbiters_strategy: IDL.Opt(SegmentsMonitoringStrategy),
168
- mission_control_strategy: IDL.Opt(CyclesMonitoringStrategy),
169
- satellites_strategy: IDL.Opt(SegmentsMonitoringStrategy)
170
- });
171
- const MonitoringStartConfig = IDL.Record({
172
- cycles_config: IDL.Opt(CyclesMonitoringStartConfig)
173
- });
174
- const CyclesMonitoringStopConfig = IDL.Record({
175
- satellite_ids: IDL.Opt(IDL.Vec(IDL.Principal)),
176
- try_mission_control: IDL.Opt(IDL.Bool),
177
- orbiter_ids: IDL.Opt(IDL.Vec(IDL.Principal))
178
- });
179
- const MonitoringStopConfig = IDL.Record({
180
- cycles_config: IDL.Opt(CyclesMonitoringStopConfig)
181
- });
182
- return IDL.Service({
183
- add_mission_control_controllers: IDL.Func([IDL.Vec(IDL.Principal)], [], []),
184
- add_satellites_controllers: IDL.Func([IDL.Vec(IDL.Principal), IDL.Vec(IDL.Principal)], [], []),
185
- create_orbiter: IDL.Func([IDL.Opt(IDL.Text)], [Orbiter], []),
186
- create_orbiter_with_config: IDL.Func([CreateCanisterConfig], [Orbiter], []),
187
- create_satellite: IDL.Func([IDL.Text], [Satellite], []),
188
- create_satellite_with_config: IDL.Func([CreateCanisterConfig], [Satellite], []),
189
- del_mission_control_controllers: IDL.Func([IDL.Vec(IDL.Principal)], [], []),
190
- del_orbiter: IDL.Func([IDL.Principal, IDL.Nat], [], []),
191
- del_orbiters_controllers: IDL.Func([IDL.Vec(IDL.Principal), IDL.Vec(IDL.Principal)], [], []),
192
- del_satellite: IDL.Func([IDL.Principal, IDL.Nat], [], []),
193
- del_satellites_controllers: IDL.Func([IDL.Vec(IDL.Principal), IDL.Vec(IDL.Principal)], [], []),
194
- deposit_cycles: IDL.Func([DepositCyclesArgs], [], []),
195
- get_config: IDL.Func([], [IDL.Opt(Config)], ['query']),
196
- get_metadata: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))], ['query']),
197
- get_monitoring_history: IDL.Func(
198
- [GetMonitoringHistory],
199
- [IDL.Vec(IDL.Tuple(MonitoringHistoryKey, MonitoringHistory))],
200
- ['query']
201
- ),
202
- get_monitoring_status: IDL.Func([], [MonitoringStatus], ['query']),
203
- get_settings: IDL.Func([], [IDL.Opt(MissionControlSettings)], ['query']),
204
- get_user: IDL.Func([], [IDL.Principal], ['query']),
205
- get_user_data: IDL.Func([], [User], ['query']),
206
- icp_transfer: IDL.Func([TransferArgs], [Result], []),
207
- icrc_transfer: IDL.Func([IDL.Principal, TransferArg], [Result_1], []),
208
- list_mission_control_controllers: IDL.Func(
209
- [],
210
- [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
211
- ['query']
212
- ),
213
- list_orbiters: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Orbiter))], ['query']),
214
- list_satellites: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Satellite))], ['query']),
215
- remove_mission_control_controllers: IDL.Func([IDL.Vec(IDL.Principal)], [], []),
216
- remove_satellites_controllers: IDL.Func(
217
- [IDL.Vec(IDL.Principal), IDL.Vec(IDL.Principal)],
218
- [],
219
- []
220
- ),
221
- set_config: IDL.Func([IDL.Opt(Config)], [], []),
222
- set_metadata: IDL.Func([IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))], [], []),
223
- set_mission_control_controllers: IDL.Func([IDL.Vec(IDL.Principal), SetController], [], []),
224
- set_orbiter: IDL.Func([IDL.Principal, IDL.Opt(IDL.Text)], [Orbiter], []),
225
- set_orbiter_metadata: IDL.Func(
226
- [IDL.Principal, IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))],
227
- [Orbiter],
228
- []
229
- ),
230
- set_orbiters_controllers: IDL.Func(
231
- [IDL.Vec(IDL.Principal), IDL.Vec(IDL.Principal), SetController],
232
- [],
233
- []
234
- ),
235
- set_satellite: IDL.Func([IDL.Principal, IDL.Opt(IDL.Text)], [Satellite], []),
236
- set_satellite_metadata: IDL.Func(
237
- [IDL.Principal, IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))],
238
- [Satellite],
239
- []
240
- ),
241
- set_satellites_controllers: IDL.Func(
242
- [IDL.Vec(IDL.Principal), IDL.Vec(IDL.Principal), SetController],
243
- [],
244
- []
245
- ),
246
- start_monitoring: IDL.Func([], [], []),
247
- stop_monitoring: IDL.Func([], [], []),
248
- top_up: IDL.Func([IDL.Principal, Tokens], [], []),
249
- unset_orbiter: IDL.Func([IDL.Principal], [], []),
250
- unset_satellite: IDL.Func([IDL.Principal], [], []),
251
- update_and_start_monitoring: IDL.Func([MonitoringStartConfig], [], []),
252
- update_and_stop_monitoring: IDL.Func([MonitoringStopConfig], [], [])
253
- });
254
- };
255
- // @ts-ignore
256
- export const init = ({IDL}) => {
257
- return [];
258
- };
@@ -1,80 +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 interface Controller {
14
- updated_at: bigint;
15
- metadata: Array<[string, string]>;
16
- created_at: bigint;
17
- expires_at: [] | [bigint];
18
- }
19
- export interface CronJobStatusesSatelliteConfig {
20
- enabled: boolean;
21
- cycles_threshold: [] | [bigint];
22
- }
23
- export interface DefiniteCanisterSettings {
24
- freezing_threshold: bigint;
25
- controllers: Array<Principal>;
26
- memory_allocation: bigint;
27
- compute_allocation: bigint;
28
- }
29
- export type Result = {Ok: SegmentStatus} | {Err: string};
30
- export interface Satellite {
31
- updated_at: bigint;
32
- metadata: Array<[string, string]>;
33
- created_at: bigint;
34
- satellite_id: Principal;
35
- }
36
- export interface SegmentStatus {
37
- id: Principal;
38
- status: CanisterStatusResponse;
39
- metadata: [] | [Array<[string, string]>];
40
- status_at: bigint;
41
- }
42
- export interface SegmentsStatuses {
43
- satellites: [] | [Array<Result>];
44
- mission_control: Result;
45
- }
46
- export interface SetController {
47
- metadata: Array<[string, string]>;
48
- expires_at: [] | [bigint];
49
- }
50
- export interface StatusesArgs {
51
- mission_control_cycles_threshold: [] | [bigint];
52
- satellites: Array<[Principal, CronJobStatusesSatelliteConfig]>;
53
- cycles_threshold: [] | [bigint];
54
- }
55
- export interface Tokens {
56
- e8s: bigint;
57
- }
58
- export interface _SERVICE {
59
- add_mission_control_controllers: ActorMethod<[Array<Principal>], undefined>;
60
- add_satellites_controllers: ActorMethod<[Array<Principal>, Array<Principal>], undefined>;
61
- create_satellite: ActorMethod<[string], Satellite>;
62
- del_mission_control_controllers: ActorMethod<[Array<Principal>], undefined>;
63
- del_satellites_controllers: ActorMethod<[Array<Principal>, Array<Principal>], undefined>;
64
- get_user: ActorMethod<[], Principal>;
65
- list_mission_control_controllers: ActorMethod<[], Array<[Principal, Controller]>>;
66
- list_mission_control_statuses: ActorMethod<[], Array<[bigint, Result]>>;
67
- list_satellite_statuses: ActorMethod<[Principal], [] | [Array<[bigint, Result]>]>;
68
- list_satellites: ActorMethod<[], Array<[Principal, Satellite]>>;
69
- remove_mission_control_controllers: ActorMethod<[Array<Principal>], undefined>;
70
- remove_satellites_controllers: ActorMethod<[Array<Principal>, Array<Principal>], undefined>;
71
- set_metadata: ActorMethod<[Array<[string, string]>], undefined>;
72
- set_mission_control_controllers: ActorMethod<[Array<Principal>, SetController], undefined>;
73
- set_satellites_controllers: ActorMethod<
74
- [Array<Principal>, Array<Principal>, SetController],
75
- undefined
76
- >;
77
- status: ActorMethod<[StatusesArgs], SegmentsStatuses>;
78
- top_up: ActorMethod<[Principal, Tokens], undefined>;
79
- version: ActorMethod<[], string>;
80
- }
@@ -1,99 +0,0 @@
1
- // @ts-ignore
2
- export const idlFactory = ({IDL}) => {
3
- const Satellite = IDL.Record({
4
- updated_at: IDL.Nat64,
5
- metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
6
- created_at: IDL.Nat64,
7
- satellite_id: IDL.Principal
8
- });
9
- const Controller = IDL.Record({
10
- updated_at: IDL.Nat64,
11
- metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
12
- created_at: IDL.Nat64,
13
- expires_at: IDL.Opt(IDL.Nat64)
14
- });
15
- const CanisterStatusType = IDL.Variant({
16
- stopped: IDL.Null,
17
- stopping: IDL.Null,
18
- running: IDL.Null
19
- });
20
- const DefiniteCanisterSettings = IDL.Record({
21
- freezing_threshold: IDL.Nat,
22
- controllers: IDL.Vec(IDL.Principal),
23
- memory_allocation: IDL.Nat,
24
- compute_allocation: IDL.Nat
25
- });
26
- const CanisterStatusResponse = IDL.Record({
27
- status: CanisterStatusType,
28
- memory_size: IDL.Nat,
29
- cycles: IDL.Nat,
30
- settings: DefiniteCanisterSettings,
31
- idle_cycles_burned_per_day: IDL.Nat,
32
- module_hash: IDL.Opt(IDL.Vec(IDL.Nat8))
33
- });
34
- const SegmentStatus = IDL.Record({
35
- id: IDL.Principal,
36
- status: CanisterStatusResponse,
37
- metadata: IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))),
38
- status_at: IDL.Nat64
39
- });
40
- const Result = IDL.Variant({Ok: SegmentStatus, Err: IDL.Text});
41
- const SetController = IDL.Record({
42
- metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
43
- expires_at: IDL.Opt(IDL.Nat64)
44
- });
45
- const CronJobStatusesSatelliteConfig = IDL.Record({
46
- enabled: IDL.Bool,
47
- cycles_threshold: IDL.Opt(IDL.Nat64)
48
- });
49
- const StatusesArgs = IDL.Record({
50
- mission_control_cycles_threshold: IDL.Opt(IDL.Nat64),
51
- satellites: IDL.Vec(IDL.Tuple(IDL.Principal, CronJobStatusesSatelliteConfig)),
52
- cycles_threshold: IDL.Opt(IDL.Nat64)
53
- });
54
- const SegmentsStatuses = IDL.Record({
55
- satellites: IDL.Opt(IDL.Vec(Result)),
56
- mission_control: Result
57
- });
58
- const Tokens = IDL.Record({e8s: IDL.Nat64});
59
- return IDL.Service({
60
- add_mission_control_controllers: IDL.Func([IDL.Vec(IDL.Principal)], [], []),
61
- add_satellites_controllers: IDL.Func([IDL.Vec(IDL.Principal), IDL.Vec(IDL.Principal)], [], []),
62
- create_satellite: IDL.Func([IDL.Text], [Satellite], []),
63
- del_mission_control_controllers: IDL.Func([IDL.Vec(IDL.Principal)], [], []),
64
- del_satellites_controllers: IDL.Func([IDL.Vec(IDL.Principal), IDL.Vec(IDL.Principal)], [], []),
65
- get_user: IDL.Func([], [IDL.Principal], ['query']),
66
- list_mission_control_controllers: IDL.Func(
67
- [],
68
- [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
69
- ['query']
70
- ),
71
- list_mission_control_statuses: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Nat64, Result))], ['query']),
72
- list_satellite_statuses: IDL.Func(
73
- [IDL.Principal],
74
- [IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Nat64, Result)))],
75
- ['query']
76
- ),
77
- list_satellites: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Satellite))], ['query']),
78
- remove_mission_control_controllers: IDL.Func([IDL.Vec(IDL.Principal)], [], []),
79
- remove_satellites_controllers: IDL.Func(
80
- [IDL.Vec(IDL.Principal), IDL.Vec(IDL.Principal)],
81
- [],
82
- []
83
- ),
84
- set_metadata: IDL.Func([IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))], [], []),
85
- set_mission_control_controllers: IDL.Func([IDL.Vec(IDL.Principal), SetController], [], []),
86
- set_satellites_controllers: IDL.Func(
87
- [IDL.Vec(IDL.Principal), IDL.Vec(IDL.Principal), SetController],
88
- [],
89
- []
90
- ),
91
- status: IDL.Func([StatusesArgs], [SegmentsStatuses], []),
92
- top_up: IDL.Func([IDL.Principal, Tokens], [], []),
93
- version: IDL.Func([], [IDL.Text], ['query'])
94
- });
95
- };
96
- // @ts-ignore
97
- export const init = ({IDL}) => {
98
- return [];
99
- };
@@ -1,70 +0,0 @@
1
- import type {ActorMethod} from '@dfinity/agent';
2
- import type {IDL} from '@dfinity/candid';
3
- import type {Principal} from '@dfinity/principal';
4
-
5
- export interface Controller {
6
- updated_at: bigint;
7
- metadata: Array<[string, string]>;
8
- created_at: bigint;
9
- scope: ControllerScope;
10
- expires_at: [] | [bigint];
11
- }
12
- export type ControllerScope = {Write: null} | {Admin: null};
13
- export interface CyclesBalance {
14
- timestamp: bigint;
15
- amount: bigint;
16
- }
17
- export interface DeleteControllersArgs {
18
- controllers: Array<Principal>;
19
- }
20
- export interface DepositedCyclesEmailNotification {
21
- to: string;
22
- deposited_cycles: CyclesBalance;
23
- }
24
- export interface Env {
25
- email_api_key: [] | [string];
26
- }
27
- export interface GetNotifications {
28
- to: [] | [bigint];
29
- from: [] | [bigint];
30
- segment_id: [] | [Principal];
31
- }
32
- export type NotificationKind = {
33
- DepositedCyclesEmail: DepositedCyclesEmailNotification;
34
- };
35
- export interface NotifyArgs {
36
- kind: NotificationKind;
37
- user: Principal;
38
- segment: Segment;
39
- }
40
- export interface NotifyStatus {
41
- pending: bigint;
42
- sent: bigint;
43
- failed: bigint;
44
- }
45
- export interface Segment {
46
- id: Principal;
47
- metadata: [] | [Array<[string, string]>];
48
- kind: SegmentKind;
49
- }
50
- export type SegmentKind = {Orbiter: null} | {MissionControl: null} | {Satellite: null};
51
- export interface SetController {
52
- metadata: Array<[string, string]>;
53
- scope: ControllerScope;
54
- expires_at: [] | [bigint];
55
- }
56
- export interface SetControllersArgs {
57
- controller: SetController;
58
- controllers: Array<Principal>;
59
- }
60
- export interface _SERVICE {
61
- del_controllers: ActorMethod<[DeleteControllersArgs], undefined>;
62
- get_notify_status: ActorMethod<[GetNotifications], NotifyStatus>;
63
- list_controllers: ActorMethod<[], Array<[Principal, Controller]>>;
64
- notify: ActorMethod<[NotifyArgs], undefined>;
65
- ping: ActorMethod<[NotifyArgs], undefined>;
66
- set_controllers: ActorMethod<[SetControllersArgs], undefined>;
67
- set_env: ActorMethod<[Env], undefined>;
68
- }
69
- export declare const idlFactory: IDL.InterfaceFactory;
70
- export declare const init: (args: {IDL: typeof IDL}) => IDL.Type[];
@@ -1,76 +0,0 @@
1
- // @ts-ignore
2
- export const idlFactory = ({IDL}) => {
3
- const DeleteControllersArgs = IDL.Record({
4
- controllers: IDL.Vec(IDL.Principal)
5
- });
6
- const GetNotifications = IDL.Record({
7
- to: IDL.Opt(IDL.Nat64),
8
- from: IDL.Opt(IDL.Nat64),
9
- segment_id: IDL.Opt(IDL.Principal)
10
- });
11
- const NotifyStatus = IDL.Record({
12
- pending: IDL.Nat64,
13
- sent: IDL.Nat64,
14
- failed: IDL.Nat64
15
- });
16
- const ControllerScope = IDL.Variant({
17
- Write: IDL.Null,
18
- Admin: IDL.Null
19
- });
20
- const Controller = IDL.Record({
21
- updated_at: IDL.Nat64,
22
- metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
23
- created_at: IDL.Nat64,
24
- scope: ControllerScope,
25
- expires_at: IDL.Opt(IDL.Nat64)
26
- });
27
- const CyclesBalance = IDL.Record({
28
- timestamp: IDL.Nat64,
29
- amount: IDL.Nat
30
- });
31
- const DepositedCyclesEmailNotification = IDL.Record({
32
- to: IDL.Text,
33
- deposited_cycles: CyclesBalance
34
- });
35
- const NotificationKind = IDL.Variant({
36
- DepositedCyclesEmail: DepositedCyclesEmailNotification
37
- });
38
- const SegmentKind = IDL.Variant({
39
- Orbiter: IDL.Null,
40
- MissionControl: IDL.Null,
41
- Satellite: IDL.Null
42
- });
43
- const Segment = IDL.Record({
44
- id: IDL.Principal,
45
- metadata: IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))),
46
- kind: SegmentKind
47
- });
48
- const NotifyArgs = IDL.Record({
49
- kind: NotificationKind,
50
- user: IDL.Principal,
51
- segment: Segment
52
- });
53
- const SetController = IDL.Record({
54
- metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
55
- scope: ControllerScope,
56
- expires_at: IDL.Opt(IDL.Nat64)
57
- });
58
- const SetControllersArgs = IDL.Record({
59
- controller: SetController,
60
- controllers: IDL.Vec(IDL.Principal)
61
- });
62
- const Env = IDL.Record({email_api_key: IDL.Opt(IDL.Text)});
63
- return IDL.Service({
64
- del_controllers: IDL.Func([DeleteControllersArgs], [], []),
65
- get_notify_status: IDL.Func([GetNotifications], [NotifyStatus], ['query']),
66
- list_controllers: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))], ['query']),
67
- notify: IDL.Func([NotifyArgs], [], []),
68
- ping: IDL.Func([NotifyArgs], [], []),
69
- set_controllers: IDL.Func([SetControllersArgs], [], []),
70
- set_env: IDL.Func([Env], [], [])
71
- });
72
- };
73
- // @ts-ignore
74
- export const init = ({IDL}) => {
75
- return [];
76
- };