@junobuild/admin 0.0.6 → 0.0.7

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.
@@ -5,13 +5,29 @@ export const idlFactory = ({IDL}) => {
5
5
  created_at: IDL.Nat64,
6
6
  satellite_id: IDL.Principal
7
7
  });
8
+ const Controller = IDL.Record({
9
+ updated_at: IDL.Nat64,
10
+ metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
11
+ created_at: IDL.Nat64,
12
+ expires_at: IDL.Opt(IDL.Nat64)
13
+ });
14
+ const SetController = IDL.Record({
15
+ metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
16
+ expires_at: IDL.Opt(IDL.Nat64)
17
+ });
8
18
  const Tokens = IDL.Record({e8s: IDL.Nat64});
9
19
  return IDL.Service({
10
20
  add_mission_control_controllers: IDL.Func([IDL.Vec(IDL.Principal)], [], []),
11
21
  add_satellites_controllers: IDL.Func([IDL.Vec(IDL.Principal), IDL.Vec(IDL.Principal)], [], []),
12
22
  create_satellite: IDL.Func([IDL.Text], [Satellite], []),
23
+ del_mission_control_controllers: IDL.Func([IDL.Vec(IDL.Principal)], [], []),
24
+ del_satellites_controllers: IDL.Func([IDL.Vec(IDL.Principal), IDL.Vec(IDL.Principal)], [], []),
13
25
  get_user: IDL.Func([], [IDL.Principal], ['query']),
14
- list_mission_control_controllers: IDL.Func([], [IDL.Vec(IDL.Principal)], ['query']),
26
+ list_mission_control_controllers: IDL.Func(
27
+ [],
28
+ [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
29
+ ['query']
30
+ ),
15
31
  list_satellites: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Satellite))], ['query']),
16
32
  remove_mission_control_controllers: IDL.Func([IDL.Vec(IDL.Principal)], [], []),
17
33
  remove_satellites_controllers: IDL.Func(
@@ -19,6 +35,12 @@ export const idlFactory = ({IDL}) => {
19
35
  [],
20
36
  []
21
37
  ),
38
+ set_mission_control_controllers: IDL.Func([IDL.Vec(IDL.Principal), SetController], [], []),
39
+ set_satellites_controllers: IDL.Func(
40
+ [IDL.Vec(IDL.Principal), IDL.Vec(IDL.Principal), SetController],
41
+ [],
42
+ []
43
+ ),
22
44
  top_up: IDL.Func([IDL.Principal, Tokens], [], []),
23
45
  version: IDL.Func([], [IDL.Text], ['query'])
24
46
  });
@@ -32,8 +32,11 @@ export interface CommitBatch {
32
32
  export interface Config {
33
33
  storage: StorageConfig;
34
34
  }
35
- export interface ControllersArgs {
36
- controllers: Array<Principal>;
35
+ export interface Controller {
36
+ updated_at: bigint;
37
+ metadata: Array<[string, string]>;
38
+ created_at: bigint;
39
+ expires_at: [] | [bigint];
37
40
  }
38
41
  export interface CustomDomain {
39
42
  updated_at: bigint;
@@ -43,6 +46,9 @@ export interface CustomDomain {
43
46
  export interface DelDoc {
44
47
  updated_at: [] | [bigint];
45
48
  }
49
+ export interface DeleteControllersArgs {
50
+ controllers: Array<Principal>;
51
+ }
46
52
  export interface Doc {
47
53
  updated_at: bigint;
48
54
  owner: Principal;
@@ -104,6 +110,14 @@ export interface Rule {
104
110
  write: Permission;
105
111
  }
106
112
  export type RulesType = {Db: null} | {Storage: null};
113
+ export interface SetController {
114
+ metadata: Array<[string, string]>;
115
+ expires_at: [] | [bigint];
116
+ }
117
+ export interface SetControllersArgs {
118
+ controller: SetController;
119
+ controllers: Array<Principal>;
120
+ }
107
121
  export interface SetDoc {
108
122
  updated_at: [] | [bigint];
109
123
  data: Uint8Array | number[];
@@ -139,10 +153,10 @@ export interface UploadChunk {
139
153
  chunk_id: bigint;
140
154
  }
141
155
  export interface _SERVICE {
142
- add_controllers: ActorMethod<[ControllersArgs], Array<Principal>>;
143
156
  commit_asset_upload: ActorMethod<[CommitBatch], undefined>;
144
157
  del_asset: ActorMethod<[string, string], undefined>;
145
158
  del_assets: ActorMethod<[[] | [string]], undefined>;
159
+ del_controllers: ActorMethod<[DeleteControllersArgs], Array<[Principal, Controller]>>;
146
160
  del_custom_domain: ActorMethod<[string], undefined>;
147
161
  del_doc: ActorMethod<[string, string, DelDoc], undefined>;
148
162
  get_config: ActorMethod<[], Config>;
@@ -154,12 +168,12 @@ export interface _SERVICE {
154
168
  >;
155
169
  init_asset_upload: ActorMethod<[InitAssetKey], InitUploadResult>;
156
170
  list_assets: ActorMethod<[[] | [string], ListParams], ListResults>;
157
- list_controllers: ActorMethod<[], Array<Principal>>;
171
+ list_controllers: ActorMethod<[], Array<[Principal, Controller]>>;
158
172
  list_custom_domains: ActorMethod<[], Array<[string, CustomDomain]>>;
159
173
  list_docs: ActorMethod<[string, ListParams], ListResults_1>;
160
174
  list_rules: ActorMethod<[RulesType], Array<[string, Rule]>>;
161
- remove_controllers: ActorMethod<[ControllersArgs], Array<Principal>>;
162
175
  set_config: ActorMethod<[Config], undefined>;
176
+ set_controllers: ActorMethod<[SetControllersArgs], Array<[Principal, Controller]>>;
163
177
  set_custom_domain: ActorMethod<[string, [] | [string]], undefined>;
164
178
  set_doc: ActorMethod<[string, string, SetDoc], Doc>;
165
179
  set_rule: ActorMethod<[RulesType, string, SetRule], undefined>;
@@ -1,12 +1,18 @@
1
1
  export const idlFactory = ({IDL}) => {
2
- const ControllersArgs = IDL.Record({
3
- controllers: IDL.Vec(IDL.Principal)
4
- });
5
2
  const CommitBatch = IDL.Record({
6
3
  batch_id: IDL.Nat,
7
4
  headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
8
5
  chunk_ids: IDL.Vec(IDL.Nat)
9
6
  });
7
+ const DeleteControllersArgs = IDL.Record({
8
+ controllers: IDL.Vec(IDL.Principal)
9
+ });
10
+ const Controller = IDL.Record({
11
+ updated_at: IDL.Nat64,
12
+ metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
13
+ created_at: IDL.Nat64,
14
+ expires_at: IDL.Opt(IDL.Nat64)
15
+ });
10
16
  const DelDoc = IDL.Record({updated_at: IDL.Opt(IDL.Nat64)});
11
17
  const StorageConfig = IDL.Record({
12
18
  headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))))
@@ -119,6 +125,14 @@ export const idlFactory = ({IDL}) => {
119
125
  created_at: IDL.Nat64,
120
126
  write: Permission
121
127
  });
128
+ const SetController = IDL.Record({
129
+ metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
130
+ expires_at: IDL.Opt(IDL.Nat64)
131
+ });
132
+ const SetControllersArgs = IDL.Record({
133
+ controller: SetController,
134
+ controllers: IDL.Vec(IDL.Principal)
135
+ });
122
136
  const SetDoc = IDL.Record({
123
137
  updated_at: IDL.Opt(IDL.Nat64),
124
138
  data: IDL.Vec(IDL.Nat8)
@@ -135,10 +149,14 @@ export const idlFactory = ({IDL}) => {
135
149
  });
136
150
  const UploadChunk = IDL.Record({chunk_id: IDL.Nat});
137
151
  return IDL.Service({
138
- add_controllers: IDL.Func([ControllersArgs], [IDL.Vec(IDL.Principal)], []),
139
152
  commit_asset_upload: IDL.Func([CommitBatch], [], []),
140
153
  del_asset: IDL.Func([IDL.Text, IDL.Text], [], []),
141
154
  del_assets: IDL.Func([IDL.Opt(IDL.Text)], [], []),
155
+ del_controllers: IDL.Func(
156
+ [DeleteControllersArgs],
157
+ [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
158
+ []
159
+ ),
142
160
  del_custom_domain: IDL.Func([IDL.Text], [], []),
143
161
  del_doc: IDL.Func([IDL.Text, IDL.Text, DelDoc], [], []),
144
162
  get_config: IDL.Func([], [Config], []),
@@ -151,12 +169,16 @@ export const idlFactory = ({IDL}) => {
151
169
  ),
152
170
  init_asset_upload: IDL.Func([InitAssetKey], [InitUploadResult], []),
153
171
  list_assets: IDL.Func([IDL.Opt(IDL.Text), ListParams], [ListResults], ['query']),
154
- list_controllers: IDL.Func([], [IDL.Vec(IDL.Principal)], ['query']),
172
+ list_controllers: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))], ['query']),
155
173
  list_custom_domains: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Text, CustomDomain))], ['query']),
156
174
  list_docs: IDL.Func([IDL.Text, ListParams], [ListResults_1], ['query']),
157
175
  list_rules: IDL.Func([RulesType], [IDL.Vec(IDL.Tuple(IDL.Text, Rule))], ['query']),
158
- remove_controllers: IDL.Func([ControllersArgs], [IDL.Vec(IDL.Principal)], []),
159
176
  set_config: IDL.Func([Config], [], []),
177
+ set_controllers: IDL.Func(
178
+ [SetControllersArgs],
179
+ [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
180
+ []
181
+ ),
160
182
  set_custom_domain: IDL.Func([IDL.Text, IDL.Opt(IDL.Text)], [], []),
161
183
  set_doc: IDL.Func([IDL.Text, IDL.Text, SetDoc], [Doc], []),
162
184
  set_rule: IDL.Func([RulesType, IDL.Text, SetRule], [], []),
@@ -1,12 +1,18 @@
1
1
  export const idlFactory = ({IDL}) => {
2
- const ControllersArgs = IDL.Record({
3
- controllers: IDL.Vec(IDL.Principal)
4
- });
5
2
  const CommitBatch = IDL.Record({
6
3
  batch_id: IDL.Nat,
7
4
  headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
8
5
  chunk_ids: IDL.Vec(IDL.Nat)
9
6
  });
7
+ const DeleteControllersArgs = IDL.Record({
8
+ controllers: IDL.Vec(IDL.Principal)
9
+ });
10
+ const Controller = IDL.Record({
11
+ updated_at: IDL.Nat64,
12
+ metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
13
+ created_at: IDL.Nat64,
14
+ expires_at: IDL.Opt(IDL.Nat64)
15
+ });
10
16
  const DelDoc = IDL.Record({updated_at: IDL.Opt(IDL.Nat64)});
11
17
  const StorageConfig = IDL.Record({
12
18
  headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))))
@@ -119,6 +125,14 @@ export const idlFactory = ({IDL}) => {
119
125
  created_at: IDL.Nat64,
120
126
  write: Permission
121
127
  });
128
+ const SetController = IDL.Record({
129
+ metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
130
+ expires_at: IDL.Opt(IDL.Nat64)
131
+ });
132
+ const SetControllersArgs = IDL.Record({
133
+ controller: SetController,
134
+ controllers: IDL.Vec(IDL.Principal)
135
+ });
122
136
  const SetDoc = IDL.Record({
123
137
  updated_at: IDL.Opt(IDL.Nat64),
124
138
  data: IDL.Vec(IDL.Nat8)
@@ -135,10 +149,14 @@ export const idlFactory = ({IDL}) => {
135
149
  });
136
150
  const UploadChunk = IDL.Record({chunk_id: IDL.Nat});
137
151
  return IDL.Service({
138
- add_controllers: IDL.Func([ControllersArgs], [IDL.Vec(IDL.Principal)], []),
139
152
  commit_asset_upload: IDL.Func([CommitBatch], [], []),
140
153
  del_asset: IDL.Func([IDL.Text, IDL.Text], [], []),
141
154
  del_assets: IDL.Func([IDL.Opt(IDL.Text)], [], []),
155
+ del_controllers: IDL.Func(
156
+ [DeleteControllersArgs],
157
+ [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
158
+ []
159
+ ),
142
160
  del_custom_domain: IDL.Func([IDL.Text], [], []),
143
161
  del_doc: IDL.Func([IDL.Text, IDL.Text, DelDoc], [], []),
144
162
  get_config: IDL.Func([], [Config], []),
@@ -151,12 +169,16 @@ export const idlFactory = ({IDL}) => {
151
169
  ),
152
170
  init_asset_upload: IDL.Func([InitAssetKey], [InitUploadResult], []),
153
171
  list_assets: IDL.Func([IDL.Opt(IDL.Text), ListParams], [ListResults], ['query']),
154
- list_controllers: IDL.Func([], [IDL.Vec(IDL.Principal)], ['query']),
172
+ list_controllers: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))], ['query']),
155
173
  list_custom_domains: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Text, CustomDomain))], ['query']),
156
174
  list_docs: IDL.Func([IDL.Text, ListParams], [ListResults_1], ['query']),
157
175
  list_rules: IDL.Func([RulesType], [IDL.Vec(IDL.Tuple(IDL.Text, Rule))], ['query']),
158
- remove_controllers: IDL.Func([ControllersArgs], [IDL.Vec(IDL.Principal)], []),
159
176
  set_config: IDL.Func([Config], [], []),
177
+ set_controllers: IDL.Func(
178
+ [SetControllersArgs],
179
+ [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
180
+ []
181
+ ),
160
182
  set_custom_domain: IDL.Func([IDL.Text, IDL.Opt(IDL.Text)], [], []),
161
183
  set_doc: IDL.Func([IDL.Text, IDL.Text, SetDoc], [Doc], []),
162
184
  set_rule: IDL.Func([RulesType, IDL.Text, SetRule], [], []),