@junobuild/core 0.0.9 → 0.0.11
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.
- package/dist/browser/index.js +15 -15
- package/dist/browser/index.js.map +4 -4
- package/dist/declarations/console/console.did.d.ts +21 -8
- package/dist/declarations/console/console.factory.did.js +21 -8
- package/dist/declarations/console/console.factory.did.mjs +21 -8
- package/dist/declarations/internet_identity/internet_identity.did +79 -20
- package/dist/declarations/internet_identity/internet_identity.did.d.ts +46 -3
- package/dist/declarations/internet_identity/internet_identity.factory.did.js +54 -8
- package/dist/declarations/mission_control/mission_control.did.d.ts +18 -1
- package/dist/declarations/mission_control/mission_control.factory.did.js +23 -1
- package/dist/declarations/satellite/satellite.did.d.ts +20 -5
- package/dist/declarations/satellite/satellite.factory.did.js +31 -6
- package/dist/declarations/satellite/satellite.factory.did.mjs +29 -6
- package/dist/node/index.mjs +23 -23
- package/dist/node/index.mjs.map +4 -4
- package/dist/types/constants/auth.constants.d.ts +10 -3
- package/dist/types/index.d.ts +1 -0
- package/dist/types/providers/auth.providers.d.ts +31 -0
- package/dist/types/services/auth.services.d.ts +2 -2
- package/dist/types/services/user.services.d.ts +2 -2
- package/dist/types/stores/auth.store.d.ts +0 -1
- package/dist/types/types/auth.types.d.ts +4 -4
- package/dist/types/types/doc.types.d.ts +1 -0
- package/dist/types/types/list.types.d.ts +3 -0
- package/dist/types/types/storage.types.d.ts +3 -0
- package/dist/types/utils/list.utils.d.ts +1 -1
- package/dist/workers/auth.worker.js.map +3 -3
- package/package.json +1 -1
|
@@ -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(
|
|
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
|
|
36
|
-
|
|
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;
|
|
@@ -82,6 +88,7 @@ export interface ListPaginate {
|
|
|
82
88
|
}
|
|
83
89
|
export interface ListParams {
|
|
84
90
|
order: [] | [ListOrder];
|
|
91
|
+
owner: [] | [Principal];
|
|
85
92
|
matcher: [] | [string];
|
|
86
93
|
paginate: [] | [ListPaginate];
|
|
87
94
|
}
|
|
@@ -104,6 +111,14 @@ export interface Rule {
|
|
|
104
111
|
write: Permission;
|
|
105
112
|
}
|
|
106
113
|
export type RulesType = {Db: null} | {Storage: null};
|
|
114
|
+
export interface SetController {
|
|
115
|
+
metadata: Array<[string, string]>;
|
|
116
|
+
expires_at: [] | [bigint];
|
|
117
|
+
}
|
|
118
|
+
export interface SetControllersArgs {
|
|
119
|
+
controller: SetController;
|
|
120
|
+
controllers: Array<Principal>;
|
|
121
|
+
}
|
|
107
122
|
export interface SetDoc {
|
|
108
123
|
updated_at: [] | [bigint];
|
|
109
124
|
data: Uint8Array | number[];
|
|
@@ -139,10 +154,10 @@ export interface UploadChunk {
|
|
|
139
154
|
chunk_id: bigint;
|
|
140
155
|
}
|
|
141
156
|
export interface _SERVICE {
|
|
142
|
-
add_controllers: ActorMethod<[ControllersArgs], Array<Principal>>;
|
|
143
157
|
commit_asset_upload: ActorMethod<[CommitBatch], undefined>;
|
|
144
158
|
del_asset: ActorMethod<[string, string], undefined>;
|
|
145
159
|
del_assets: ActorMethod<[[] | [string]], undefined>;
|
|
160
|
+
del_controllers: ActorMethod<[DeleteControllersArgs], Array<[Principal, Controller]>>;
|
|
146
161
|
del_custom_domain: ActorMethod<[string], undefined>;
|
|
147
162
|
del_doc: ActorMethod<[string, string, DelDoc], undefined>;
|
|
148
163
|
get_config: ActorMethod<[], Config>;
|
|
@@ -154,12 +169,12 @@ export interface _SERVICE {
|
|
|
154
169
|
>;
|
|
155
170
|
init_asset_upload: ActorMethod<[InitAssetKey], InitUploadResult>;
|
|
156
171
|
list_assets: ActorMethod<[[] | [string], ListParams], ListResults>;
|
|
157
|
-
list_controllers: ActorMethod<[], Array<Principal>>;
|
|
172
|
+
list_controllers: ActorMethod<[], Array<[Principal, Controller]>>;
|
|
158
173
|
list_custom_domains: ActorMethod<[], Array<[string, CustomDomain]>>;
|
|
159
174
|
list_docs: ActorMethod<[string, ListParams], ListResults_1>;
|
|
160
175
|
list_rules: ActorMethod<[RulesType], Array<[string, Rule]>>;
|
|
161
|
-
remove_controllers: ActorMethod<[ControllersArgs], Array<Principal>>;
|
|
162
176
|
set_config: ActorMethod<[Config], undefined>;
|
|
177
|
+
set_controllers: ActorMethod<[SetControllersArgs], Array<[Principal, Controller]>>;
|
|
163
178
|
set_custom_domain: ActorMethod<[string, [] | [string]], undefined>;
|
|
164
179
|
set_doc: ActorMethod<[string, string, SetDoc], Doc>;
|
|
165
180
|
set_rule: ActorMethod<[RulesType, string, SetRule], undefined>;
|
|
@@ -1,12 +1,19 @@
|
|
|
1
|
+
// @ts-ignore
|
|
1
2
|
export const idlFactory = ({IDL}) => {
|
|
2
|
-
const ControllersArgs = IDL.Record({
|
|
3
|
-
controllers: IDL.Vec(IDL.Principal)
|
|
4
|
-
});
|
|
5
3
|
const CommitBatch = IDL.Record({
|
|
6
4
|
batch_id: IDL.Nat,
|
|
7
5
|
headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
|
|
8
6
|
chunk_ids: IDL.Vec(IDL.Nat)
|
|
9
7
|
});
|
|
8
|
+
const DeleteControllersArgs = IDL.Record({
|
|
9
|
+
controllers: IDL.Vec(IDL.Principal)
|
|
10
|
+
});
|
|
11
|
+
const Controller = IDL.Record({
|
|
12
|
+
updated_at: IDL.Nat64,
|
|
13
|
+
metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
|
|
14
|
+
created_at: IDL.Nat64,
|
|
15
|
+
expires_at: IDL.Opt(IDL.Nat64)
|
|
16
|
+
});
|
|
10
17
|
const DelDoc = IDL.Record({updated_at: IDL.Opt(IDL.Nat64)});
|
|
11
18
|
const StorageConfig = IDL.Record({
|
|
12
19
|
headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))))
|
|
@@ -68,6 +75,7 @@ export const idlFactory = ({IDL}) => {
|
|
|
68
75
|
});
|
|
69
76
|
const ListParams = IDL.Record({
|
|
70
77
|
order: IDL.Opt(ListOrder),
|
|
78
|
+
owner: IDL.Opt(IDL.Principal),
|
|
71
79
|
matcher: IDL.Opt(IDL.Text),
|
|
72
80
|
paginate: IDL.Opt(ListPaginate)
|
|
73
81
|
});
|
|
@@ -119,6 +127,14 @@ export const idlFactory = ({IDL}) => {
|
|
|
119
127
|
created_at: IDL.Nat64,
|
|
120
128
|
write: Permission
|
|
121
129
|
});
|
|
130
|
+
const SetController = IDL.Record({
|
|
131
|
+
metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
|
|
132
|
+
expires_at: IDL.Opt(IDL.Nat64)
|
|
133
|
+
});
|
|
134
|
+
const SetControllersArgs = IDL.Record({
|
|
135
|
+
controller: SetController,
|
|
136
|
+
controllers: IDL.Vec(IDL.Principal)
|
|
137
|
+
});
|
|
122
138
|
const SetDoc = IDL.Record({
|
|
123
139
|
updated_at: IDL.Opt(IDL.Nat64),
|
|
124
140
|
data: IDL.Vec(IDL.Nat8)
|
|
@@ -135,10 +151,14 @@ export const idlFactory = ({IDL}) => {
|
|
|
135
151
|
});
|
|
136
152
|
const UploadChunk = IDL.Record({chunk_id: IDL.Nat});
|
|
137
153
|
return IDL.Service({
|
|
138
|
-
add_controllers: IDL.Func([ControllersArgs], [IDL.Vec(IDL.Principal)], []),
|
|
139
154
|
commit_asset_upload: IDL.Func([CommitBatch], [], []),
|
|
140
155
|
del_asset: IDL.Func([IDL.Text, IDL.Text], [], []),
|
|
141
156
|
del_assets: IDL.Func([IDL.Opt(IDL.Text)], [], []),
|
|
157
|
+
del_controllers: IDL.Func(
|
|
158
|
+
[DeleteControllersArgs],
|
|
159
|
+
[IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
|
|
160
|
+
[]
|
|
161
|
+
),
|
|
142
162
|
del_custom_domain: IDL.Func([IDL.Text], [], []),
|
|
143
163
|
del_doc: IDL.Func([IDL.Text, IDL.Text, DelDoc], [], []),
|
|
144
164
|
get_config: IDL.Func([], [Config], []),
|
|
@@ -151,12 +171,16 @@ export const idlFactory = ({IDL}) => {
|
|
|
151
171
|
),
|
|
152
172
|
init_asset_upload: IDL.Func([InitAssetKey], [InitUploadResult], []),
|
|
153
173
|
list_assets: IDL.Func([IDL.Opt(IDL.Text), ListParams], [ListResults], ['query']),
|
|
154
|
-
list_controllers: IDL.Func([], [IDL.Vec(IDL.Principal)], ['query']),
|
|
174
|
+
list_controllers: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))], ['query']),
|
|
155
175
|
list_custom_domains: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Text, CustomDomain))], ['query']),
|
|
156
176
|
list_docs: IDL.Func([IDL.Text, ListParams], [ListResults_1], ['query']),
|
|
157
177
|
list_rules: IDL.Func([RulesType], [IDL.Vec(IDL.Tuple(IDL.Text, Rule))], ['query']),
|
|
158
|
-
remove_controllers: IDL.Func([ControllersArgs], [IDL.Vec(IDL.Principal)], []),
|
|
159
178
|
set_config: IDL.Func([Config], [], []),
|
|
179
|
+
set_controllers: IDL.Func(
|
|
180
|
+
[SetControllersArgs],
|
|
181
|
+
[IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
|
|
182
|
+
[]
|
|
183
|
+
),
|
|
160
184
|
set_custom_domain: IDL.Func([IDL.Text, IDL.Opt(IDL.Text)], [], []),
|
|
161
185
|
set_doc: IDL.Func([IDL.Text, IDL.Text, SetDoc], [Doc], []),
|
|
162
186
|
set_rule: IDL.Func([RulesType, IDL.Text, SetRule], [], []),
|
|
@@ -164,6 +188,7 @@ export const idlFactory = ({IDL}) => {
|
|
|
164
188
|
version: IDL.Func([], [IDL.Text], ['query'])
|
|
165
189
|
});
|
|
166
190
|
};
|
|
191
|
+
// @ts-ignore
|
|
167
192
|
export const init = ({IDL}) => {
|
|
168
193
|
return [];
|
|
169
194
|
};
|
|
@@ -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))))
|
|
@@ -68,6 +74,7 @@ export const idlFactory = ({IDL}) => {
|
|
|
68
74
|
});
|
|
69
75
|
const ListParams = IDL.Record({
|
|
70
76
|
order: IDL.Opt(ListOrder),
|
|
77
|
+
owner: IDL.Opt(IDL.Principal),
|
|
71
78
|
matcher: IDL.Opt(IDL.Text),
|
|
72
79
|
paginate: IDL.Opt(ListPaginate)
|
|
73
80
|
});
|
|
@@ -119,6 +126,14 @@ export const idlFactory = ({IDL}) => {
|
|
|
119
126
|
created_at: IDL.Nat64,
|
|
120
127
|
write: Permission
|
|
121
128
|
});
|
|
129
|
+
const SetController = IDL.Record({
|
|
130
|
+
metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
|
|
131
|
+
expires_at: IDL.Opt(IDL.Nat64)
|
|
132
|
+
});
|
|
133
|
+
const SetControllersArgs = IDL.Record({
|
|
134
|
+
controller: SetController,
|
|
135
|
+
controllers: IDL.Vec(IDL.Principal)
|
|
136
|
+
});
|
|
122
137
|
const SetDoc = IDL.Record({
|
|
123
138
|
updated_at: IDL.Opt(IDL.Nat64),
|
|
124
139
|
data: IDL.Vec(IDL.Nat8)
|
|
@@ -135,10 +150,14 @@ export const idlFactory = ({IDL}) => {
|
|
|
135
150
|
});
|
|
136
151
|
const UploadChunk = IDL.Record({chunk_id: IDL.Nat});
|
|
137
152
|
return IDL.Service({
|
|
138
|
-
add_controllers: IDL.Func([ControllersArgs], [IDL.Vec(IDL.Principal)], []),
|
|
139
153
|
commit_asset_upload: IDL.Func([CommitBatch], [], []),
|
|
140
154
|
del_asset: IDL.Func([IDL.Text, IDL.Text], [], []),
|
|
141
155
|
del_assets: IDL.Func([IDL.Opt(IDL.Text)], [], []),
|
|
156
|
+
del_controllers: IDL.Func(
|
|
157
|
+
[DeleteControllersArgs],
|
|
158
|
+
[IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
|
|
159
|
+
[]
|
|
160
|
+
),
|
|
142
161
|
del_custom_domain: IDL.Func([IDL.Text], [], []),
|
|
143
162
|
del_doc: IDL.Func([IDL.Text, IDL.Text, DelDoc], [], []),
|
|
144
163
|
get_config: IDL.Func([], [Config], []),
|
|
@@ -151,12 +170,16 @@ export const idlFactory = ({IDL}) => {
|
|
|
151
170
|
),
|
|
152
171
|
init_asset_upload: IDL.Func([InitAssetKey], [InitUploadResult], []),
|
|
153
172
|
list_assets: IDL.Func([IDL.Opt(IDL.Text), ListParams], [ListResults], ['query']),
|
|
154
|
-
list_controllers: IDL.Func([], [IDL.Vec(IDL.Principal)], ['query']),
|
|
173
|
+
list_controllers: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))], ['query']),
|
|
155
174
|
list_custom_domains: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Text, CustomDomain))], ['query']),
|
|
156
175
|
list_docs: IDL.Func([IDL.Text, ListParams], [ListResults_1], ['query']),
|
|
157
176
|
list_rules: IDL.Func([RulesType], [IDL.Vec(IDL.Tuple(IDL.Text, Rule))], ['query']),
|
|
158
|
-
remove_controllers: IDL.Func([ControllersArgs], [IDL.Vec(IDL.Principal)], []),
|
|
159
177
|
set_config: IDL.Func([Config], [], []),
|
|
178
|
+
set_controllers: IDL.Func(
|
|
179
|
+
[SetControllersArgs],
|
|
180
|
+
[IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
|
|
181
|
+
[]
|
|
182
|
+
),
|
|
160
183
|
set_custom_domain: IDL.Func([IDL.Text, IDL.Opt(IDL.Text)], [], []),
|
|
161
184
|
set_doc: IDL.Func([IDL.Text, IDL.Text, SetDoc], [Doc], []),
|
|
162
185
|
set_rule: IDL.Func([RulesType, IDL.Text, SetRule], [], []),
|