@junobuild/admin 0.5.0-next-2025-05-26.1 → 0.5.0-next-2025-05-27

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.
@@ -1,14 +1,5 @@
1
1
  // @ts-ignore
2
2
  export const idlFactory = ({IDL}) => {
3
- const CommitProposal = IDL.Record({
4
- sha256: IDL.Vec(IDL.Nat8),
5
- proposal_id: IDL.Nat
6
- });
7
- const CommitBatch = IDL.Record({
8
- batch_id: IDL.Nat,
9
- headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
10
- chunk_ids: IDL.Vec(IDL.Nat)
11
- });
12
3
  const CyclesThreshold = IDL.Record({
13
4
  fund_cycles: IDL.Nat,
14
5
  min_cycles: IDL.Nat
@@ -40,9 +31,6 @@ export const idlFactory = ({IDL}) => {
40
31
  satellite_id: IDL.Principal,
41
32
  settings: IDL.Opt(Settings)
42
33
  });
43
- const DeleteProposalAssets = IDL.Record({
44
- proposal_ids: IDL.Vec(IDL.Nat)
45
- });
46
34
  const DepositCyclesArgs = IDL.Record({
47
35
  cycles: IDL.Nat,
48
36
  destination_id: IDL.Principal
@@ -99,66 +87,11 @@ export const idlFactory = ({IDL}) => {
99
87
  const MonitoringStatus = IDL.Record({
100
88
  cycles: IDL.Opt(CyclesMonitoringStatus)
101
89
  });
102
- const ProposalStatus = IDL.Variant({
103
- Initialized: IDL.Null,
104
- Failed: IDL.Null,
105
- Open: IDL.Null,
106
- Rejected: IDL.Null,
107
- Executed: IDL.Null,
108
- Accepted: IDL.Null
109
- });
110
- const AssetsUpgradeOptions = IDL.Record({
111
- clear_existing_assets: IDL.Opt(IDL.Bool)
112
- });
113
- const SegmentsDeploymentOptions = IDL.Record({
114
- orbiter: IDL.Opt(IDL.Text),
115
- mission_control_version: IDL.Opt(IDL.Text),
116
- satellite_version: IDL.Opt(IDL.Text)
117
- });
118
- const ProposalType = IDL.Variant({
119
- AssetsUpgrade: AssetsUpgradeOptions,
120
- SegmentsDeployment: SegmentsDeploymentOptions
121
- });
122
- const Proposal = IDL.Record({
123
- status: ProposalStatus,
124
- updated_at: IDL.Nat64,
125
- sha256: IDL.Opt(IDL.Vec(IDL.Nat8)),
126
- executed_at: IDL.Opt(IDL.Nat64),
127
- owner: IDL.Principal,
128
- created_at: IDL.Nat64,
129
- version: IDL.Opt(IDL.Nat64),
130
- proposal_type: ProposalType
131
- });
132
90
  const MissionControlSettings = IDL.Record({
133
91
  updated_at: IDL.Nat64,
134
92
  created_at: IDL.Nat64,
135
93
  monitoring: IDL.Opt(Monitoring)
136
94
  });
137
- const StorageConfigIFrame = IDL.Variant({
138
- Deny: IDL.Null,
139
- AllowAny: IDL.Null,
140
- SameOrigin: IDL.Null
141
- });
142
- const ConfigMaxMemorySize = IDL.Record({
143
- stable: IDL.Opt(IDL.Nat64),
144
- heap: IDL.Opt(IDL.Nat64)
145
- });
146
- const StorageConfigRawAccess = IDL.Variant({
147
- Deny: IDL.Null,
148
- Allow: IDL.Null
149
- });
150
- const StorageConfigRedirect = IDL.Record({
151
- status_code: IDL.Nat16,
152
- location: IDL.Text
153
- });
154
- const StorageConfig = IDL.Record({
155
- iframe: IDL.Opt(StorageConfigIFrame),
156
- rewrites: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
157
- headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)))),
158
- max_memory_size: IDL.Opt(ConfigMaxMemorySize),
159
- raw_access: IDL.Opt(StorageConfigRawAccess),
160
- redirects: IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Text, StorageConfigRedirect)))
161
- });
162
95
  const User = IDL.Record({
163
96
  updated_at: IDL.Nat64,
164
97
  metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
@@ -166,39 +99,6 @@ export const idlFactory = ({IDL}) => {
166
99
  created_at: IDL.Nat64,
167
100
  config: IDL.Opt(Config)
168
101
  });
169
- const HttpRequest = IDL.Record({
170
- url: IDL.Text,
171
- method: IDL.Text,
172
- body: IDL.Vec(IDL.Nat8),
173
- headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
174
- certificate_version: IDL.Opt(IDL.Nat16)
175
- });
176
- const Memory = IDL.Variant({Heap: IDL.Null, Stable: IDL.Null});
177
- const StreamingCallbackToken = IDL.Record({
178
- memory: Memory,
179
- token: IDL.Opt(IDL.Text),
180
- sha256: IDL.Opt(IDL.Vec(IDL.Nat8)),
181
- headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
182
- index: IDL.Nat64,
183
- encoding_type: IDL.Text,
184
- full_path: IDL.Text
185
- });
186
- const StreamingStrategy = IDL.Variant({
187
- Callback: IDL.Record({
188
- token: StreamingCallbackToken,
189
- callback: IDL.Func([], [], ['query'])
190
- })
191
- });
192
- const HttpResponse = IDL.Record({
193
- body: IDL.Vec(IDL.Nat8),
194
- headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
195
- streaming_strategy: IDL.Opt(StreamingStrategy),
196
- status_code: IDL.Nat16
197
- });
198
- const StreamingCallbackHttpResponse = IDL.Record({
199
- token: IDL.Opt(StreamingCallbackToken),
200
- body: IDL.Vec(IDL.Nat8)
201
- });
202
102
  const Tokens = IDL.Record({e8s: IDL.Nat64});
203
103
  const Timestamp = IDL.Record({timestamp_nanos: IDL.Nat64});
204
104
  const TransferArgs = IDL.Record({
@@ -243,77 +143,6 @@ export const idlFactory = ({IDL}) => {
243
143
  InsufficientFunds: IDL.Record({balance: IDL.Nat})
244
144
  });
245
145
  const Result_1 = IDL.Variant({Ok: IDL.Nat, Err: TransferError_1});
246
- const InitAssetKey = IDL.Record({
247
- token: IDL.Opt(IDL.Text),
248
- collection: IDL.Text,
249
- name: IDL.Text,
250
- description: IDL.Opt(IDL.Text),
251
- encoding_type: IDL.Opt(IDL.Text),
252
- full_path: IDL.Text
253
- });
254
- const InitUploadResult = IDL.Record({batch_id: IDL.Nat});
255
- const ListOrderField = IDL.Variant({
256
- UpdatedAt: IDL.Null,
257
- Keys: IDL.Null,
258
- CreatedAt: IDL.Null
259
- });
260
- const ListOrder = IDL.Record({field: ListOrderField, desc: IDL.Bool});
261
- const TimestampMatcher = IDL.Variant({
262
- Equal: IDL.Nat64,
263
- Between: IDL.Tuple(IDL.Nat64, IDL.Nat64),
264
- GreaterThan: IDL.Nat64,
265
- LessThan: IDL.Nat64
266
- });
267
- const ListMatcher = IDL.Record({
268
- key: IDL.Opt(IDL.Text),
269
- updated_at: IDL.Opt(TimestampMatcher),
270
- description: IDL.Opt(IDL.Text),
271
- created_at: IDL.Opt(TimestampMatcher)
272
- });
273
- const ListPaginate = IDL.Record({
274
- start_after: IDL.Opt(IDL.Text),
275
- limit: IDL.Opt(IDL.Nat64)
276
- });
277
- const ListParams = IDL.Record({
278
- order: IDL.Opt(ListOrder),
279
- owner: IDL.Opt(IDL.Principal),
280
- matcher: IDL.Opt(ListMatcher),
281
- paginate: IDL.Opt(ListPaginate)
282
- });
283
- const AssetKey = IDL.Record({
284
- token: IDL.Opt(IDL.Text),
285
- collection: IDL.Text,
286
- owner: IDL.Principal,
287
- name: IDL.Text,
288
- description: IDL.Opt(IDL.Text),
289
- full_path: IDL.Text
290
- });
291
- const AssetEncodingNoContent = IDL.Record({
292
- modified: IDL.Nat64,
293
- sha256: IDL.Vec(IDL.Nat8),
294
- total_length: IDL.Nat
295
- });
296
- const AssetNoContent = IDL.Record({
297
- key: AssetKey,
298
- updated_at: IDL.Nat64,
299
- encodings: IDL.Vec(IDL.Tuple(IDL.Text, AssetEncodingNoContent)),
300
- headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
301
- created_at: IDL.Nat64,
302
- version: IDL.Opt(IDL.Nat64)
303
- });
304
- const ListResults = IDL.Record({
305
- matches_pages: IDL.Opt(IDL.Nat64),
306
- matches_length: IDL.Nat64,
307
- items_page: IDL.Opt(IDL.Nat64),
308
- items: IDL.Vec(IDL.Tuple(IDL.Text, AssetNoContent)),
309
- items_length: IDL.Nat64
310
- });
311
- const CustomDomain = IDL.Record({
312
- updated_at: IDL.Nat64,
313
- created_at: IDL.Nat64,
314
- version: IDL.Opt(IDL.Nat64),
315
- bn_id: IDL.Opt(IDL.Text)
316
- });
317
146
  const ControllerScope = IDL.Variant({
318
147
  Write: IDL.Null,
319
148
  Admin: IDL.Null
@@ -350,28 +179,18 @@ export const idlFactory = ({IDL}) => {
350
179
  const MonitoringStopConfig = IDL.Record({
351
180
  cycles_config: IDL.Opt(CyclesMonitoringStopConfig)
352
181
  });
353
- const UploadChunk = IDL.Record({
354
- content: IDL.Vec(IDL.Nat8),
355
- batch_id: IDL.Nat,
356
- order_id: IDL.Opt(IDL.Nat)
357
- });
358
- const UploadChunkResult = IDL.Record({chunk_id: IDL.Nat});
359
182
  return IDL.Service({
360
183
  add_mission_control_controllers: IDL.Func([IDL.Vec(IDL.Principal)], [], []),
361
184
  add_satellites_controllers: IDL.Func([IDL.Vec(IDL.Principal), IDL.Vec(IDL.Principal)], [], []),
362
- commit_proposal: IDL.Func([CommitProposal], [IDL.Null], []),
363
- commit_proposal_asset_upload: IDL.Func([CommitBatch], [], []),
364
185
  create_orbiter: IDL.Func([IDL.Opt(IDL.Text)], [Orbiter], []),
365
186
  create_orbiter_with_config: IDL.Func([CreateCanisterConfig], [Orbiter], []),
366
187
  create_satellite: IDL.Func([IDL.Text], [Satellite], []),
367
188
  create_satellite_with_config: IDL.Func([CreateCanisterConfig], [Satellite], []),
368
- del_custom_domain: IDL.Func([IDL.Text], [], []),
369
189
  del_mission_control_controllers: IDL.Func([IDL.Vec(IDL.Principal)], [], []),
370
190
  del_orbiter: IDL.Func([IDL.Principal, IDL.Nat], [], []),
371
191
  del_orbiters_controllers: IDL.Func([IDL.Vec(IDL.Principal), IDL.Vec(IDL.Principal)], [], []),
372
192
  del_satellite: IDL.Func([IDL.Principal, IDL.Nat], [], []),
373
193
  del_satellites_controllers: IDL.Func([IDL.Vec(IDL.Principal), IDL.Vec(IDL.Principal)], [], []),
374
- delete_proposal_assets: IDL.Func([DeleteProposalAssets], [], []),
375
194
  deposit_cycles: IDL.Func([DepositCyclesArgs], [], []),
376
195
  get_config: IDL.Func([], [IDL.Opt(Config)], ['query']),
377
196
  get_metadata: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))], ['query']),
@@ -381,23 +200,11 @@ export const idlFactory = ({IDL}) => {
381
200
  ['query']
382
201
  ),
383
202
  get_monitoring_status: IDL.Func([], [MonitoringStatus], ['query']),
384
- get_proposal: IDL.Func([IDL.Nat], [IDL.Opt(Proposal)], ['query']),
385
203
  get_settings: IDL.Func([], [IDL.Opt(MissionControlSettings)], ['query']),
386
- get_storage_config: IDL.Func([], [StorageConfig], ['query']),
387
204
  get_user: IDL.Func([], [IDL.Principal], ['query']),
388
205
  get_user_data: IDL.Func([], [User], ['query']),
389
- http_request: IDL.Func([HttpRequest], [HttpResponse], ['query']),
390
- http_request_streaming_callback: IDL.Func(
391
- [StreamingCallbackToken],
392
- [StreamingCallbackHttpResponse],
393
- ['query']
394
- ),
395
206
  icp_transfer: IDL.Func([TransferArgs], [Result], []),
396
207
  icrc_transfer: IDL.Func([IDL.Principal, TransferArg], [Result_1], []),
397
- init_proposal: IDL.Func([ProposalType], [IDL.Nat, Proposal], []),
398
- init_proposal_asset_upload: IDL.Func([InitAssetKey, IDL.Nat], [InitUploadResult], []),
399
- list_assets: IDL.Func([IDL.Text, ListParams], [ListResults], ['query']),
400
- list_custom_domains: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Text, CustomDomain))], ['query']),
401
208
  list_mission_control_controllers: IDL.Func(
402
209
  [],
403
210
  [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
@@ -412,7 +219,6 @@ export const idlFactory = ({IDL}) => {
412
219
  []
413
220
  ),
414
221
  set_config: IDL.Func([IDL.Opt(Config)], [], []),
415
- set_custom_domain: IDL.Func([IDL.Text, IDL.Opt(IDL.Text)], [], []),
416
222
  set_metadata: IDL.Func([IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))], [], []),
417
223
  set_mission_control_controllers: IDL.Func([IDL.Vec(IDL.Principal), SetController], [], []),
418
224
  set_orbiter: IDL.Func([IDL.Principal, IDL.Opt(IDL.Text)], [Orbiter], []),
@@ -437,16 +243,13 @@ export const idlFactory = ({IDL}) => {
437
243
  [],
438
244
  []
439
245
  ),
440
- set_storage_config: IDL.Func([StorageConfig], [], []),
441
246
  start_monitoring: IDL.Func([], [], []),
442
247
  stop_monitoring: IDL.Func([], [], []),
443
- submit_proposal: IDL.Func([IDL.Nat], [IDL.Nat, Proposal], []),
444
248
  top_up: IDL.Func([IDL.Principal, Tokens], [], []),
445
249
  unset_orbiter: IDL.Func([IDL.Principal], [], []),
446
250
  unset_satellite: IDL.Func([IDL.Principal], [], []),
447
251
  update_and_start_monitoring: IDL.Func([MonitoringStartConfig], [], []),
448
- update_and_stop_monitoring: IDL.Func([MonitoringStopConfig], [], []),
449
- upload_proposal_asset_chunk: IDL.Func([UploadChunk], [UploadChunkResult], [])
252
+ update_and_stop_monitoring: IDL.Func([MonitoringStopConfig], [], [])
450
253
  });
451
254
  };
452
255
  // @ts-ignore
@@ -23,6 +23,9 @@ export interface AssetNoContent {
23
23
  created_at: bigint;
24
24
  version: [] | [bigint];
25
25
  }
26
+ export interface AssetsUpgradeOptions {
27
+ clear_existing_assets: [] | [boolean];
28
+ }
26
29
  export interface AuthenticationConfig {
27
30
  internet_identity: [] | [AuthenticationConfigInternetIdentity];
28
31
  }
@@ -36,6 +39,10 @@ export interface CommitBatch {
36
39
  headers: Array<[string, string]>;
37
40
  chunk_ids: Array<bigint>;
38
41
  }
42
+ export interface CommitProposal {
43
+ sha256: Uint8Array | number[];
44
+ proposal_id: bigint;
45
+ }
39
46
  export interface Config {
40
47
  db: [] | [DbConfig];
41
48
  authentication: [] | [AuthenticationConfig];
@@ -71,6 +78,9 @@ export interface DelRule {
71
78
  export interface DeleteControllersArgs {
72
79
  controllers: Array<Principal>;
73
80
  }
81
+ export interface DeleteProposalAssets {
82
+ proposal_ids: Array<bigint>;
83
+ }
74
84
  export interface DepositCyclesArgs {
75
85
  cycles: bigint;
76
86
  destination_id: Principal;
@@ -148,6 +158,26 @@ export interface MemorySize {
148
158
  heap: bigint;
149
159
  }
150
160
  export type Permission = {Controllers: null} | {Private: null} | {Public: null} | {Managed: null};
161
+ export interface Proposal {
162
+ status: ProposalStatus;
163
+ updated_at: bigint;
164
+ sha256: [] | [Uint8Array | number[]];
165
+ executed_at: [] | [bigint];
166
+ owner: Principal;
167
+ created_at: bigint;
168
+ version: [] | [bigint];
169
+ proposal_type: ProposalType;
170
+ }
171
+ export type ProposalStatus =
172
+ | {Initialized: null}
173
+ | {Failed: null}
174
+ | {Open: null}
175
+ | {Rejected: null}
176
+ | {Executed: null}
177
+ | {Accepted: null};
178
+ export type ProposalType =
179
+ | {AssetsUpgrade: AssetsUpgradeOptions}
180
+ | {SegmentsDeployment: SegmentsDeploymentOptions};
151
181
  export interface RateConfig {
152
182
  max_tokens: bigint;
153
183
  time_per_token_ns: bigint;
@@ -165,6 +195,11 @@ export interface Rule {
165
195
  write: Permission;
166
196
  max_changes_per_user: [] | [number];
167
197
  }
198
+ export interface SegmentsDeploymentOptions {
199
+ orbiter: [] | [string];
200
+ mission_control_version: [] | [string];
201
+ satellite_version: [] | [string];
202
+ }
168
203
  export interface SetController {
169
204
  metadata: Array<[string, string]>;
170
205
  scope: ControllerScope;
@@ -238,6 +273,8 @@ export interface UploadChunkResult {
238
273
  }
239
274
  export interface _SERVICE {
240
275
  commit_asset_upload: ActorMethod<[CommitBatch], undefined>;
276
+ commit_proposal: ActorMethod<[CommitProposal], null>;
277
+ commit_proposal_asset_upload: ActorMethod<[CommitBatch], undefined>;
241
278
  count_assets: ActorMethod<[string, ListParams], bigint>;
242
279
  count_collection_assets: ActorMethod<[string], bigint>;
243
280
  count_collection_docs: ActorMethod<[string], bigint>;
@@ -253,6 +290,7 @@ export interface _SERVICE {
253
290
  del_many_assets: ActorMethod<[Array<[string, string]>], undefined>;
254
291
  del_many_docs: ActorMethod<[Array<[string, string, DelDoc]>], undefined>;
255
292
  del_rule: ActorMethod<[CollectionType, string, DelRule], undefined>;
293
+ delete_proposal_assets: ActorMethod<[DeleteProposalAssets], undefined>;
256
294
  deposit_cycles: ActorMethod<[DepositCyclesArgs], undefined>;
257
295
  get_asset: ActorMethod<[string, string], [] | [AssetNoContent]>;
258
296
  get_auth_config: ActorMethod<[], [] | [AuthenticationConfig]>;
@@ -261,6 +299,7 @@ export interface _SERVICE {
261
299
  get_doc: ActorMethod<[string, string], [] | [Doc]>;
262
300
  get_many_assets: ActorMethod<[Array<[string, string]>], Array<[string, [] | [AssetNoContent]]>>;
263
301
  get_many_docs: ActorMethod<[Array<[string, string]>], Array<[string, [] | [Doc]]>>;
302
+ get_proposal: ActorMethod<[bigint], [] | [Proposal]>;
264
303
  get_rule: ActorMethod<[CollectionType, string], [] | [Rule]>;
265
304
  get_storage_config: ActorMethod<[], StorageConfig>;
266
305
  http_request: ActorMethod<[HttpRequest], HttpResponse>;
@@ -269,6 +308,8 @@ export interface _SERVICE {
269
308
  StreamingCallbackHttpResponse
270
309
  >;
271
310
  init_asset_upload: ActorMethod<[InitAssetKey], InitUploadResult>;
311
+ init_proposal: ActorMethod<[ProposalType], [bigint, Proposal]>;
312
+ init_proposal_asset_upload: ActorMethod<[InitAssetKey, bigint], InitUploadResult>;
272
313
  list_assets: ActorMethod<[string, ListParams], ListResults>;
273
314
  list_controllers: ActorMethod<[], Array<[Principal, Controller]>>;
274
315
  list_custom_domains: ActorMethod<[], Array<[string, CustomDomain]>>;
@@ -283,7 +324,9 @@ export interface _SERVICE {
283
324
  set_many_docs: ActorMethod<[Array<[string, string, SetDoc]>], Array<[string, Doc]>>;
284
325
  set_rule: ActorMethod<[CollectionType, string, SetRule], Rule>;
285
326
  set_storage_config: ActorMethod<[StorageConfig], undefined>;
327
+ submit_proposal: ActorMethod<[bigint], [bigint, Proposal]>;
286
328
  upload_asset_chunk: ActorMethod<[UploadChunk], UploadChunkResult>;
329
+ upload_proposal_asset_chunk: ActorMethod<[UploadChunk], UploadChunkResult>;
287
330
  }
288
331
  export declare const idlFactory: IDL.InterfaceFactory;
289
332
  export declare const init: (args: {IDL: typeof IDL}) => IDL.Type[];
@@ -5,6 +5,10 @@ export const idlFactory = ({IDL}) => {
5
5
  headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
6
6
  chunk_ids: IDL.Vec(IDL.Nat)
7
7
  });
8
+ const CommitProposal = IDL.Record({
9
+ sha256: IDL.Vec(IDL.Nat8),
10
+ proposal_id: IDL.Nat
11
+ });
8
12
  const ListOrderField = IDL.Variant({
9
13
  UpdatedAt: IDL.Null,
10
14
  Keys: IDL.Null,
@@ -50,6 +54,9 @@ export const idlFactory = ({IDL}) => {
50
54
  const DelDoc = IDL.Record({version: IDL.Opt(IDL.Nat64)});
51
55
  const CollectionType = IDL.Variant({Db: IDL.Null, Storage: IDL.Null});
52
56
  const DelRule = IDL.Record({version: IDL.Opt(IDL.Nat64)});
57
+ const DeleteProposalAssets = IDL.Record({
58
+ proposal_ids: IDL.Vec(IDL.Nat)
59
+ });
53
60
  const DepositCyclesArgs = IDL.Record({
54
61
  cycles: IDL.Nat,
55
62
  destination_id: IDL.Principal
@@ -123,6 +130,36 @@ export const idlFactory = ({IDL}) => {
123
130
  created_at: IDL.Nat64,
124
131
  version: IDL.Opt(IDL.Nat64)
125
132
  });
133
+ const ProposalStatus = IDL.Variant({
134
+ Initialized: IDL.Null,
135
+ Failed: IDL.Null,
136
+ Open: IDL.Null,
137
+ Rejected: IDL.Null,
138
+ Executed: IDL.Null,
139
+ Accepted: IDL.Null
140
+ });
141
+ const AssetsUpgradeOptions = IDL.Record({
142
+ clear_existing_assets: IDL.Opt(IDL.Bool)
143
+ });
144
+ const SegmentsDeploymentOptions = IDL.Record({
145
+ orbiter: IDL.Opt(IDL.Text),
146
+ mission_control_version: IDL.Opt(IDL.Text),
147
+ satellite_version: IDL.Opt(IDL.Text)
148
+ });
149
+ const ProposalType = IDL.Variant({
150
+ AssetsUpgrade: AssetsUpgradeOptions,
151
+ SegmentsDeployment: SegmentsDeploymentOptions
152
+ });
153
+ const Proposal = IDL.Record({
154
+ status: ProposalStatus,
155
+ updated_at: IDL.Nat64,
156
+ sha256: IDL.Opt(IDL.Vec(IDL.Nat8)),
157
+ executed_at: IDL.Opt(IDL.Nat64),
158
+ owner: IDL.Principal,
159
+ created_at: IDL.Nat64,
160
+ version: IDL.Opt(IDL.Nat64),
161
+ proposal_type: ProposalType
162
+ });
126
163
  const Memory = IDL.Variant({Heap: IDL.Null, Stable: IDL.Null});
127
164
  const Permission = IDL.Variant({
128
165
  Controllers: IDL.Null,
@@ -242,6 +279,8 @@ export const idlFactory = ({IDL}) => {
242
279
  const UploadChunkResult = IDL.Record({chunk_id: IDL.Nat});
243
280
  return IDL.Service({
244
281
  commit_asset_upload: IDL.Func([CommitBatch], [], []),
282
+ commit_proposal: IDL.Func([CommitProposal], [IDL.Null], []),
283
+ commit_proposal_asset_upload: IDL.Func([CommitBatch], [], []),
245
284
  count_assets: IDL.Func([IDL.Text, ListParams], [IDL.Nat64], []),
246
285
  count_collection_assets: IDL.Func([IDL.Text], [IDL.Nat64], []),
247
286
  count_collection_docs: IDL.Func([IDL.Text], [IDL.Nat64], []),
@@ -261,6 +300,7 @@ export const idlFactory = ({IDL}) => {
261
300
  del_many_assets: IDL.Func([IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))], [], []),
262
301
  del_many_docs: IDL.Func([IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text, DelDoc))], [], []),
263
302
  del_rule: IDL.Func([CollectionType, IDL.Text, DelRule], [], []),
303
+ delete_proposal_assets: IDL.Func([DeleteProposalAssets], [], []),
264
304
  deposit_cycles: IDL.Func([DepositCyclesArgs], [], []),
265
305
  get_asset: IDL.Func([IDL.Text, IDL.Text], [IDL.Opt(AssetNoContent)], []),
266
306
  get_auth_config: IDL.Func([], [IDL.Opt(AuthenticationConfig)], []),
@@ -277,6 +317,7 @@ export const idlFactory = ({IDL}) => {
277
317
  [IDL.Vec(IDL.Tuple(IDL.Text, IDL.Opt(Doc)))],
278
318
  []
279
319
  ),
320
+ get_proposal: IDL.Func([IDL.Nat], [IDL.Opt(Proposal)], []),
280
321
  get_rule: IDL.Func([CollectionType, IDL.Text], [IDL.Opt(Rule)], []),
281
322
  get_storage_config: IDL.Func([], [StorageConfig], []),
282
323
  http_request: IDL.Func([HttpRequest], [HttpResponse], []),
@@ -286,6 +327,8 @@ export const idlFactory = ({IDL}) => {
286
327
  []
287
328
  ),
288
329
  init_asset_upload: IDL.Func([InitAssetKey], [InitUploadResult], []),
330
+ init_proposal: IDL.Func([ProposalType], [IDL.Nat, Proposal], []),
331
+ init_proposal_asset_upload: IDL.Func([InitAssetKey, IDL.Nat], [InitUploadResult], []),
289
332
  list_assets: IDL.Func([IDL.Text, ListParams], [ListResults], []),
290
333
  list_controllers: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))], []),
291
334
  list_custom_domains: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Text, CustomDomain))], []),
@@ -308,7 +351,9 @@ export const idlFactory = ({IDL}) => {
308
351
  ),
309
352
  set_rule: IDL.Func([CollectionType, IDL.Text, SetRule], [Rule], []),
310
353
  set_storage_config: IDL.Func([StorageConfig], [], []),
311
- upload_asset_chunk: IDL.Func([UploadChunk], [UploadChunkResult], [])
354
+ submit_proposal: IDL.Func([IDL.Nat], [IDL.Nat, Proposal], []),
355
+ upload_asset_chunk: IDL.Func([UploadChunk], [UploadChunkResult], []),
356
+ upload_proposal_asset_chunk: IDL.Func([UploadChunk], [UploadChunkResult], [])
312
357
  });
313
358
  };
314
359
  // @ts-ignore
@@ -5,6 +5,10 @@ export const idlFactory = ({IDL}) => {
5
5
  headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
6
6
  chunk_ids: IDL.Vec(IDL.Nat)
7
7
  });
8
+ const CommitProposal = IDL.Record({
9
+ sha256: IDL.Vec(IDL.Nat8),
10
+ proposal_id: IDL.Nat
11
+ });
8
12
  const ListOrderField = IDL.Variant({
9
13
  UpdatedAt: IDL.Null,
10
14
  Keys: IDL.Null,
@@ -50,6 +54,9 @@ export const idlFactory = ({IDL}) => {
50
54
  const DelDoc = IDL.Record({version: IDL.Opt(IDL.Nat64)});
51
55
  const CollectionType = IDL.Variant({Db: IDL.Null, Storage: IDL.Null});
52
56
  const DelRule = IDL.Record({version: IDL.Opt(IDL.Nat64)});
57
+ const DeleteProposalAssets = IDL.Record({
58
+ proposal_ids: IDL.Vec(IDL.Nat)
59
+ });
53
60
  const DepositCyclesArgs = IDL.Record({
54
61
  cycles: IDL.Nat,
55
62
  destination_id: IDL.Principal
@@ -123,6 +130,36 @@ export const idlFactory = ({IDL}) => {
123
130
  created_at: IDL.Nat64,
124
131
  version: IDL.Opt(IDL.Nat64)
125
132
  });
133
+ const ProposalStatus = IDL.Variant({
134
+ Initialized: IDL.Null,
135
+ Failed: IDL.Null,
136
+ Open: IDL.Null,
137
+ Rejected: IDL.Null,
138
+ Executed: IDL.Null,
139
+ Accepted: IDL.Null
140
+ });
141
+ const AssetsUpgradeOptions = IDL.Record({
142
+ clear_existing_assets: IDL.Opt(IDL.Bool)
143
+ });
144
+ const SegmentsDeploymentOptions = IDL.Record({
145
+ orbiter: IDL.Opt(IDL.Text),
146
+ mission_control_version: IDL.Opt(IDL.Text),
147
+ satellite_version: IDL.Opt(IDL.Text)
148
+ });
149
+ const ProposalType = IDL.Variant({
150
+ AssetsUpgrade: AssetsUpgradeOptions,
151
+ SegmentsDeployment: SegmentsDeploymentOptions
152
+ });
153
+ const Proposal = IDL.Record({
154
+ status: ProposalStatus,
155
+ updated_at: IDL.Nat64,
156
+ sha256: IDL.Opt(IDL.Vec(IDL.Nat8)),
157
+ executed_at: IDL.Opt(IDL.Nat64),
158
+ owner: IDL.Principal,
159
+ created_at: IDL.Nat64,
160
+ version: IDL.Opt(IDL.Nat64),
161
+ proposal_type: ProposalType
162
+ });
126
163
  const Memory = IDL.Variant({Heap: IDL.Null, Stable: IDL.Null});
127
164
  const Permission = IDL.Variant({
128
165
  Controllers: IDL.Null,
@@ -242,6 +279,8 @@ export const idlFactory = ({IDL}) => {
242
279
  const UploadChunkResult = IDL.Record({chunk_id: IDL.Nat});
243
280
  return IDL.Service({
244
281
  commit_asset_upload: IDL.Func([CommitBatch], [], []),
282
+ commit_proposal: IDL.Func([CommitProposal], [IDL.Null], []),
283
+ commit_proposal_asset_upload: IDL.Func([CommitBatch], [], []),
245
284
  count_assets: IDL.Func([IDL.Text, ListParams], [IDL.Nat64], ['query']),
246
285
  count_collection_assets: IDL.Func([IDL.Text], [IDL.Nat64], ['query']),
247
286
  count_collection_docs: IDL.Func([IDL.Text], [IDL.Nat64], ['query']),
@@ -261,6 +300,7 @@ export const idlFactory = ({IDL}) => {
261
300
  del_many_assets: IDL.Func([IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))], [], []),
262
301
  del_many_docs: IDL.Func([IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text, DelDoc))], [], []),
263
302
  del_rule: IDL.Func([CollectionType, IDL.Text, DelRule], [], []),
303
+ delete_proposal_assets: IDL.Func([DeleteProposalAssets], [], []),
264
304
  deposit_cycles: IDL.Func([DepositCyclesArgs], [], []),
265
305
  get_asset: IDL.Func([IDL.Text, IDL.Text], [IDL.Opt(AssetNoContent)], ['query']),
266
306
  get_auth_config: IDL.Func([], [IDL.Opt(AuthenticationConfig)], ['query']),
@@ -277,6 +317,7 @@ export const idlFactory = ({IDL}) => {
277
317
  [IDL.Vec(IDL.Tuple(IDL.Text, IDL.Opt(Doc)))],
278
318
  ['query']
279
319
  ),
320
+ get_proposal: IDL.Func([IDL.Nat], [IDL.Opt(Proposal)], ['query']),
280
321
  get_rule: IDL.Func([CollectionType, IDL.Text], [IDL.Opt(Rule)], ['query']),
281
322
  get_storage_config: IDL.Func([], [StorageConfig], ['query']),
282
323
  http_request: IDL.Func([HttpRequest], [HttpResponse], ['query']),
@@ -286,6 +327,8 @@ export const idlFactory = ({IDL}) => {
286
327
  ['query']
287
328
  ),
288
329
  init_asset_upload: IDL.Func([InitAssetKey], [InitUploadResult], []),
330
+ init_proposal: IDL.Func([ProposalType], [IDL.Nat, Proposal], []),
331
+ init_proposal_asset_upload: IDL.Func([InitAssetKey, IDL.Nat], [InitUploadResult], []),
289
332
  list_assets: IDL.Func([IDL.Text, ListParams], [ListResults], ['query']),
290
333
  list_controllers: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))], ['query']),
291
334
  list_custom_domains: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Text, CustomDomain))], ['query']),
@@ -308,7 +351,9 @@ export const idlFactory = ({IDL}) => {
308
351
  ),
309
352
  set_rule: IDL.Func([CollectionType, IDL.Text, SetRule], [Rule], []),
310
353
  set_storage_config: IDL.Func([StorageConfig], [], []),
311
- upload_asset_chunk: IDL.Func([UploadChunk], [UploadChunkResult], [])
354
+ submit_proposal: IDL.Func([IDL.Nat], [IDL.Nat, Proposal], []),
355
+ upload_asset_chunk: IDL.Func([UploadChunk], [UploadChunkResult], []),
356
+ upload_proposal_asset_chunk: IDL.Func([UploadChunk], [UploadChunkResult], [])
312
357
  });
313
358
  };
314
359
  // @ts-ignore