@junobuild/admin 0.0.8 → 0.0.10
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 +8 -8
- package/dist/browser/index.js.map +4 -4
- package/dist/declarations/cmc/cmc.did.d.ts +30 -30
- package/dist/declarations/cmc/cmc.factory.did.js +63 -63
- package/dist/declarations/cmc/index.d.ts +18 -18
- package/dist/declarations/cmc/index.js +22 -22
- package/dist/declarations/console/console.did.d.ts +37 -37
- package/dist/declarations/console/console.factory.did.js +60 -60
- package/dist/declarations/console/console.factory.did.mjs +60 -60
- package/dist/declarations/console/index.d.ts +18 -18
- package/dist/declarations/console/index.js +22 -22
- package/dist/declarations/frontend/frontend.did.d.ts +136 -136
- package/dist/declarations/frontend/frontend.factory.did.js +206 -206
- package/dist/declarations/frontend/index.d.ts +18 -18
- package/dist/declarations/frontend/index.js +22 -22
- package/dist/declarations/ic/ic.did.d.ts +63 -63
- package/dist/declarations/ic/ic.factory.did.js +126 -126
- package/dist/declarations/internet_identity/index.d.ts +18 -18
- package/dist/declarations/internet_identity/index.js +22 -22
- package/dist/declarations/internet_identity/internet_identity.did.d.ts +136 -136
- package/dist/declarations/internet_identity/internet_identity.factory.did.js +231 -231
- package/dist/declarations/ledger/index.d.ts +18 -18
- package/dist/declarations/ledger/index.js +22 -22
- package/dist/declarations/ledger/ledger.did.d.ts +64 -64
- package/dist/declarations/ledger/ledger.factory.did.js +96 -96
- package/dist/declarations/mission_control/index.d.ts +18 -18
- package/dist/declarations/mission_control/index.js +22 -22
- package/dist/declarations/mission_control/mission_control.did.d.ts +30 -30
- package/dist/declarations/mission_control/mission_control.factory.did.js +48 -48
- package/dist/declarations/satellite/index.d.ts +18 -18
- package/dist/declarations/satellite/index.js +22 -22
- package/dist/declarations/satellite/satellite-deprecated.did.d.ts +120 -124
- package/dist/declarations/satellite/satellite-deprecated.factory.did.js +189 -189
- package/dist/declarations/satellite/satellite-deprecated.factory.did.mjs +189 -189
- package/dist/declarations/satellite/satellite.did.d.ts +121 -124
- package/dist/declarations/satellite/satellite.factory.did.js +192 -189
- package/dist/declarations/satellite/satellite.factory.did.mjs +190 -189
- package/dist/node/index.mjs +22 -22
- package/dist/node/index.mjs.map +4 -4
- package/dist/types/api/satellite.api.d.ts +11 -1
- package/dist/types/constants/rules.constants.d.ts +7 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/services/satellite.services.d.ts +10 -0
- package/dist/types/types/rules.types.d.ts +10 -0
- package/dist/types/utils/did.utils.d.ts +4 -0
- package/dist/types/utils/rule.utils.d.ts +6 -0
- package/dist/types/utils/utils.d.ts +7 -0
- package/package.json +1 -1
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
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
4
|
|
|
5
|
-
import {
|
|
5
|
+
import {_SERVICE} from './satellite.did';
|
|
6
6
|
|
|
7
7
|
export declare const idlFactory: IDL.InterfaceFactory;
|
|
8
8
|
export declare const canisterId: string;
|
|
9
9
|
|
|
10
10
|
export declare interface CreateActorOptions {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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
23
|
}
|
|
24
24
|
|
|
25
25
|
/**
|
|
@@ -34,8 +34,8 @@ export declare interface CreateActorOptions {
|
|
|
34
34
|
* @see {@link ActorConfig}
|
|
35
35
|
*/
|
|
36
36
|
export declare const createActor: (
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
canisterId: string | Principal,
|
|
38
|
+
options?: CreateActorOptions
|
|
39
39
|
) => ActorSubclass<_SERVICE>;
|
|
40
40
|
|
|
41
41
|
/**
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {Actor, HttpAgent} from '@dfinity/agent';
|
|
2
2
|
|
|
3
3
|
// Imports and re-exports candid interface
|
|
4
|
-
import {
|
|
5
|
-
export {
|
|
4
|
+
import {idlFactory} from './satellite.did.js';
|
|
5
|
+
export {idlFactory} from './satellite.did.js';
|
|
6
6
|
|
|
7
7
|
// CANISTER_ID is replaced by webpack based on node environment
|
|
8
8
|
|
|
9
9
|
export const createActor = (canisterId, options = {}) => {
|
|
10
|
-
|
|
10
|
+
const agent = options.agent || new HttpAgent({...options.agentOptions});
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
if (options.agent && options.agentOptions) {
|
|
13
|
+
console.warn(
|
|
14
|
+
'Detected both agent and agentOptions passed to createActor. Ignoring agentOptions and proceeding with the provided agent.'
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
// Fetch root key for certificate validation during development
|
|
19
|
+
if (process.env.DFX_NETWORK !== 'ic') {
|
|
20
|
+
agent.fetchRootKey().catch((err) => {
|
|
21
|
+
console.warn('Unable to fetch root key. Check to ensure that your local replica is running');
|
|
22
|
+
console.error(err);
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
// Creates an actor with using the candid interface and the HttpAgent
|
|
27
|
+
return Actor.createActor(idlFactory, {
|
|
28
|
+
agent,
|
|
29
|
+
canisterId,
|
|
30
|
+
...options.actorOptions
|
|
31
|
+
});
|
|
32
32
|
};
|
|
@@ -1,186 +1,182 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type {ActorMethod} from '@dfinity/agent';
|
|
2
|
+
import type {Principal} from '@dfinity/principal';
|
|
3
3
|
|
|
4
4
|
export interface AssetEncodingNoContent {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
modified: bigint;
|
|
6
|
+
sha256: Uint8Array | number[];
|
|
7
|
+
total_length: bigint;
|
|
8
8
|
}
|
|
9
9
|
export interface AssetKey {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
token: [] | [string];
|
|
11
|
+
collection: string;
|
|
12
|
+
owner: Principal;
|
|
13
|
+
name: string;
|
|
14
|
+
full_path: string;
|
|
15
15
|
}
|
|
16
16
|
export interface AssetNoContent {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
key: AssetKey;
|
|
18
|
+
updated_at: bigint;
|
|
19
|
+
encodings: Array<[string, AssetEncodingNoContent]>;
|
|
20
|
+
headers: Array<[string, string]>;
|
|
21
|
+
created_at: bigint;
|
|
22
22
|
}
|
|
23
23
|
export interface Chunk {
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
content: Uint8Array | number[];
|
|
25
|
+
batch_id: bigint;
|
|
26
26
|
}
|
|
27
27
|
export interface CommitBatch {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
batch_id: bigint;
|
|
29
|
+
headers: Array<[string, string]>;
|
|
30
|
+
chunk_ids: Array<bigint>;
|
|
31
31
|
}
|
|
32
32
|
export interface Config {
|
|
33
|
-
|
|
33
|
+
storage: StorageConfig;
|
|
34
34
|
}
|
|
35
35
|
export interface Controller {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
updated_at: bigint;
|
|
37
|
+
metadata: Array<[string, string]>;
|
|
38
|
+
created_at: bigint;
|
|
39
|
+
expires_at: [] | [bigint];
|
|
40
40
|
}
|
|
41
41
|
export interface CustomDomain {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
updated_at: bigint;
|
|
43
|
+
created_at: bigint;
|
|
44
|
+
bn_id: [] | [string];
|
|
45
45
|
}
|
|
46
46
|
export interface DelDoc {
|
|
47
|
-
|
|
47
|
+
updated_at: [] | [bigint];
|
|
48
48
|
}
|
|
49
49
|
export interface DeleteControllersArgs {
|
|
50
|
-
|
|
50
|
+
controllers: Array<Principal>;
|
|
51
51
|
}
|
|
52
52
|
export interface Doc {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
updated_at: bigint;
|
|
54
|
+
owner: Principal;
|
|
55
|
+
data: Uint8Array | number[];
|
|
56
|
+
created_at: bigint;
|
|
57
57
|
}
|
|
58
58
|
export interface HttpRequest {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
url: string;
|
|
60
|
+
method: string;
|
|
61
|
+
body: Uint8Array | number[];
|
|
62
|
+
headers: Array<[string, string]>;
|
|
63
63
|
}
|
|
64
64
|
export interface HttpResponse {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
65
|
+
body: Uint8Array | number[];
|
|
66
|
+
headers: Array<[string, string]>;
|
|
67
|
+
streaming_strategy: [] | [StreamingStrategy];
|
|
68
|
+
status_code: number;
|
|
69
69
|
}
|
|
70
70
|
export interface InitAssetKey {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
71
|
+
token: [] | [string];
|
|
72
|
+
collection: string;
|
|
73
|
+
name: string;
|
|
74
|
+
encoding_type: [] | [string];
|
|
75
|
+
full_path: string;
|
|
76
76
|
}
|
|
77
77
|
export interface InitUploadResult {
|
|
78
|
-
|
|
78
|
+
batch_id: bigint;
|
|
79
79
|
}
|
|
80
80
|
export interface ListOrder {
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
field: ListOrderField;
|
|
82
|
+
desc: boolean;
|
|
83
83
|
}
|
|
84
|
-
export type ListOrderField = {
|
|
84
|
+
export type ListOrderField = {UpdatedAt: null} | {Keys: null} | {CreatedAt: null};
|
|
85
85
|
export interface ListPaginate {
|
|
86
|
-
|
|
87
|
-
|
|
86
|
+
start_after: [] | [string];
|
|
87
|
+
limit: [] | [bigint];
|
|
88
88
|
}
|
|
89
89
|
export interface ListParams {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
90
|
+
order: [] | [ListOrder];
|
|
91
|
+
matcher: [] | [string];
|
|
92
|
+
paginate: [] | [ListPaginate];
|
|
93
93
|
}
|
|
94
94
|
export interface ListResults {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
95
|
+
matches_length: bigint;
|
|
96
|
+
length: bigint;
|
|
97
|
+
items: Array<[string, AssetNoContent]>;
|
|
98
98
|
}
|
|
99
99
|
export interface ListResults_1 {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}
|
|
104
|
-
export type Permission =
|
|
105
|
-
| { Controllers: null }
|
|
106
|
-
| { Private: null }
|
|
107
|
-
| { Public: null }
|
|
108
|
-
| { Managed: null };
|
|
100
|
+
matches_length: bigint;
|
|
101
|
+
length: bigint;
|
|
102
|
+
items: Array<[string, Doc]>;
|
|
103
|
+
}
|
|
104
|
+
export type Permission = {Controllers: null} | {Private: null} | {Public: null} | {Managed: null};
|
|
109
105
|
export interface Rule {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
106
|
+
updated_at: bigint;
|
|
107
|
+
max_size: [] | [bigint];
|
|
108
|
+
read: Permission;
|
|
109
|
+
created_at: bigint;
|
|
110
|
+
write: Permission;
|
|
115
111
|
}
|
|
116
|
-
export type RulesType = {
|
|
112
|
+
export type RulesType = {Db: null} | {Storage: null};
|
|
117
113
|
export interface SetController {
|
|
118
|
-
|
|
119
|
-
|
|
114
|
+
metadata: Array<[string, string]>;
|
|
115
|
+
expires_at: [] | [bigint];
|
|
120
116
|
}
|
|
121
117
|
export interface SetControllersArgs {
|
|
122
|
-
|
|
123
|
-
|
|
118
|
+
controller: SetController;
|
|
119
|
+
controllers: Array<Principal>;
|
|
124
120
|
}
|
|
125
121
|
export interface SetDoc {
|
|
126
|
-
|
|
127
|
-
|
|
122
|
+
updated_at: [] | [bigint];
|
|
123
|
+
data: Uint8Array | number[];
|
|
128
124
|
}
|
|
129
125
|
export interface SetRule {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
126
|
+
updated_at: [] | [bigint];
|
|
127
|
+
max_size: [] | [bigint];
|
|
128
|
+
read: Permission;
|
|
129
|
+
write: Permission;
|
|
134
130
|
}
|
|
135
131
|
export interface StorageConfig {
|
|
136
|
-
|
|
132
|
+
headers: Array<[string, Array<[string, string]>]>;
|
|
137
133
|
}
|
|
138
134
|
export interface StreamingCallbackHttpResponse {
|
|
139
|
-
|
|
140
|
-
|
|
135
|
+
token: [] | [StreamingCallbackToken];
|
|
136
|
+
body: Uint8Array | number[];
|
|
141
137
|
}
|
|
142
138
|
export interface StreamingCallbackToken {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
139
|
+
token: [] | [string];
|
|
140
|
+
sha256: [] | [Uint8Array | number[]];
|
|
141
|
+
headers: Array<[string, string]>;
|
|
142
|
+
index: bigint;
|
|
143
|
+
encoding_type: string;
|
|
144
|
+
full_path: string;
|
|
149
145
|
}
|
|
150
146
|
export type StreamingStrategy = {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
147
|
+
Callback: {
|
|
148
|
+
token: StreamingCallbackToken;
|
|
149
|
+
callback: [Principal, string];
|
|
150
|
+
};
|
|
155
151
|
};
|
|
156
152
|
export interface UploadChunk {
|
|
157
|
-
|
|
153
|
+
chunk_id: bigint;
|
|
158
154
|
}
|
|
159
155
|
export interface _SERVICE {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
156
|
+
commit_asset_upload: ActorMethod<[CommitBatch], undefined>;
|
|
157
|
+
del_asset: ActorMethod<[string, string], undefined>;
|
|
158
|
+
del_assets: ActorMethod<[[] | [string]], undefined>;
|
|
159
|
+
del_controllers: ActorMethod<[DeleteControllersArgs], Array<[Principal, Controller]>>;
|
|
160
|
+
del_custom_domain: ActorMethod<[string], undefined>;
|
|
161
|
+
del_doc: ActorMethod<[string, string, DelDoc], undefined>;
|
|
162
|
+
get_config: ActorMethod<[], Config>;
|
|
163
|
+
get_doc: ActorMethod<[string, string], [] | [Doc]>;
|
|
164
|
+
http_request: ActorMethod<[HttpRequest], HttpResponse>;
|
|
165
|
+
http_request_streaming_callback: ActorMethod<
|
|
166
|
+
[StreamingCallbackToken],
|
|
167
|
+
StreamingCallbackHttpResponse
|
|
168
|
+
>;
|
|
169
|
+
init_asset_upload: ActorMethod<[InitAssetKey], InitUploadResult>;
|
|
170
|
+
list_assets: ActorMethod<[[] | [string], ListParams], ListResults>;
|
|
171
|
+
list_controllers: ActorMethod<[], Array<Principal>>;
|
|
172
|
+
list_custom_domains: ActorMethod<[], Array<[string, CustomDomain]>>;
|
|
173
|
+
list_docs: ActorMethod<[string, ListParams], ListResults_1>;
|
|
174
|
+
list_rules: ActorMethod<[RulesType], Array<[string, Rule]>>;
|
|
175
|
+
set_config: ActorMethod<[Config], undefined>;
|
|
176
|
+
set_controllers: ActorMethod<[SetControllersArgs], Array<[Principal, Controller]>>;
|
|
177
|
+
set_custom_domain: ActorMethod<[string, [] | [string]], undefined>;
|
|
178
|
+
set_doc: ActorMethod<[string, string, SetDoc], Doc>;
|
|
179
|
+
set_rule: ActorMethod<[RulesType, string, SetRule], undefined>;
|
|
180
|
+
upload_asset_chunk: ActorMethod<[Chunk], UploadChunk>;
|
|
181
|
+
version: ActorMethod<[], string>;
|
|
186
182
|
}
|