@junobuild/admin 0.0.4 → 0.0.6
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/canisterStatus-D52DQGXX.js +2 -0
- package/dist/browser/chunk-CAKYEEJ6.js +35 -0
- package/dist/browser/chunk-CAKYEEJ6.js.map +7 -0
- package/dist/browser/index.js +32 -0
- package/dist/browser/index.js.map +7 -0
- package/dist/declarations/cmc/cmc.did.d.ts +2 -2
- package/dist/declarations/console/console.did.d.ts +1 -1
- package/dist/declarations/frontend/frontend.did +42 -1
- package/dist/declarations/frontend/frontend.did.d.ts +58 -14
- package/dist/declarations/frontend/frontend.factory.did.js +45 -2
- package/dist/declarations/internet_identity/internet_identity.did.d.ts +9 -9
- package/dist/declarations/ledger/ledger.did.d.ts +4 -4
- package/dist/declarations/satellite/satellite.did.d.ts +19 -17
- package/dist/declarations/satellite/satellite.factory.did.js +9 -4
- package/dist/declarations/satellite/satellite.factory.did.mjs +9 -4
- package/dist/index.js +1 -1
- package/dist/node/index.mjs +72 -0
- package/dist/node/index.mjs.map +7 -0
- package/package.json +8 -7
- package/dist/cjs/index.cjs.js +0 -70
- package/dist/cjs/index.cjs.js.map +0 -7
- package/dist/esm/canisterStatus-XJAXQVDF.js +0 -2
- package/dist/esm/chunk-RNCSYUTB.js +0 -63
- package/dist/esm/chunk-RNCSYUTB.js.map +0 -7
- package/dist/esm/index.js +0 -2
- package/dist/esm/index.js.map +0 -7
- package/dist/index.cjs.js +0 -1
- package/dist/types/utils/did.utils.d.ts +0 -4
- /package/dist/{esm/canisterStatus-XJAXQVDF.js.map → browser/canisterStatus-D52DQGXX.js.map} +0 -0
|
@@ -8,6 +8,8 @@ type CreateAssetArguments = record {
|
|
|
8
8
|
content_type: text;
|
|
9
9
|
max_age: opt nat64;
|
|
10
10
|
headers: opt vec HeaderField;
|
|
11
|
+
enable_aliasing: opt bool;
|
|
12
|
+
allow_raw_access: opt bool;
|
|
11
13
|
};
|
|
12
14
|
|
|
13
15
|
// Add or change content for an asset, by content encoding
|
|
@@ -77,8 +79,32 @@ type StreamingStrategy = variant {
|
|
|
77
79
|
};
|
|
78
80
|
};
|
|
79
81
|
|
|
80
|
-
|
|
82
|
+
type SetAssetPropertiesArguments = record {
|
|
83
|
+
key: Key;
|
|
84
|
+
max_age: opt opt nat64;
|
|
85
|
+
headers: opt opt vec HeaderField;
|
|
86
|
+
allow_raw_access: opt opt bool;
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
type Permission = variant {
|
|
90
|
+
Commit;
|
|
91
|
+
ManagePermissions;
|
|
92
|
+
Prepare;
|
|
93
|
+
};
|
|
81
94
|
|
|
95
|
+
type GrantPermission = record {
|
|
96
|
+
to_principal: principal;
|
|
97
|
+
permission: Permission;
|
|
98
|
+
};
|
|
99
|
+
type RevokePermission = record {
|
|
100
|
+
of_principal: principal;
|
|
101
|
+
permission: Permission;
|
|
102
|
+
};
|
|
103
|
+
type ListPermitted = record { permission: Permission };
|
|
104
|
+
|
|
105
|
+
type ValidationResult = variant { Ok : text; Err : text };
|
|
106
|
+
|
|
107
|
+
service: {
|
|
82
108
|
get: (record {
|
|
83
109
|
key: Key;
|
|
84
110
|
accept_encodings: vec text;
|
|
@@ -144,4 +170,19 @@ service: {
|
|
|
144
170
|
http_request_streaming_callback: (token: StreamingCallbackToken) -> (opt StreamingCallbackHttpResponse) query;
|
|
145
171
|
|
|
146
172
|
authorize: (principal) -> ();
|
|
173
|
+
deauthorize: (principal) -> ();
|
|
174
|
+
list_authorized: () -> (vec principal) query;
|
|
175
|
+
grant_permission: (GrantPermission) -> ();
|
|
176
|
+
revoke_permission: (RevokePermission) -> ();
|
|
177
|
+
list_permitted: (ListPermitted) -> (vec principal) query;
|
|
178
|
+
take_ownership: () -> ();
|
|
179
|
+
|
|
180
|
+
get_asset_properties : (key: Key) -> (record {
|
|
181
|
+
max_age: opt nat64;
|
|
182
|
+
headers: opt vec HeaderField;
|
|
183
|
+
allow_raw_access: opt bool; } ) query;
|
|
184
|
+
set_asset_properties: (SetAssetPropertiesArguments) -> ();
|
|
185
|
+
|
|
186
|
+
validate_grant_permission: (GrantPermission) -> (ValidationResult);
|
|
187
|
+
validate_revoke_permission: (RevokePermission) -> (ValidationResult);
|
|
147
188
|
}
|
|
@@ -14,38 +14,58 @@ export interface CreateAssetArguments {
|
|
|
14
14
|
key: Key;
|
|
15
15
|
content_type: string;
|
|
16
16
|
headers: [] | [Array<HeaderField>];
|
|
17
|
+
allow_raw_access: [] | [boolean];
|
|
17
18
|
max_age: [] | [bigint];
|
|
19
|
+
enable_aliasing: [] | [boolean];
|
|
18
20
|
}
|
|
19
21
|
export interface DeleteAssetArguments {
|
|
20
22
|
key: Key;
|
|
21
23
|
}
|
|
24
|
+
export interface GrantPermission {
|
|
25
|
+
permission: Permission;
|
|
26
|
+
to_principal: Principal;
|
|
27
|
+
}
|
|
22
28
|
export type HeaderField = [string, string];
|
|
23
29
|
export interface HttpRequest {
|
|
24
30
|
url: string;
|
|
25
31
|
method: string;
|
|
26
|
-
body: Uint8Array;
|
|
32
|
+
body: Uint8Array | number[];
|
|
27
33
|
headers: Array<HeaderField>;
|
|
28
34
|
}
|
|
29
35
|
export interface HttpResponse {
|
|
30
|
-
body: Uint8Array;
|
|
36
|
+
body: Uint8Array | number[];
|
|
31
37
|
headers: Array<HeaderField>;
|
|
32
38
|
streaming_strategy: [] | [StreamingStrategy];
|
|
33
39
|
status_code: number;
|
|
34
40
|
}
|
|
35
41
|
export type Key = string;
|
|
42
|
+
export interface ListPermitted {
|
|
43
|
+
permission: Permission;
|
|
44
|
+
}
|
|
45
|
+
export type Permission = {Prepare: null} | {ManagePermissions: null} | {Commit: null};
|
|
46
|
+
export interface RevokePermission {
|
|
47
|
+
permission: Permission;
|
|
48
|
+
of_principal: Principal;
|
|
49
|
+
}
|
|
36
50
|
export interface SetAssetContentArguments {
|
|
37
51
|
key: Key;
|
|
38
|
-
sha256: [] | [Uint8Array];
|
|
52
|
+
sha256: [] | [Uint8Array | number[]];
|
|
39
53
|
chunk_ids: Array<ChunkId>;
|
|
40
54
|
content_encoding: string;
|
|
41
55
|
}
|
|
56
|
+
export interface SetAssetPropertiesArguments {
|
|
57
|
+
key: Key;
|
|
58
|
+
headers: [] | [[] | [Array<HeaderField>]];
|
|
59
|
+
allow_raw_access: [] | [[] | [boolean]];
|
|
60
|
+
max_age: [] | [[] | [bigint]];
|
|
61
|
+
}
|
|
42
62
|
export interface StreamingCallbackHttpResponse {
|
|
43
63
|
token: [] | [StreamingCallbackToken];
|
|
44
|
-
body: Uint8Array;
|
|
64
|
+
body: Uint8Array | number[];
|
|
45
65
|
}
|
|
46
66
|
export interface StreamingCallbackToken {
|
|
47
67
|
key: Key;
|
|
48
|
-
sha256: [] | [Uint8Array];
|
|
68
|
+
sha256: [] | [Uint8Array | number[]];
|
|
49
69
|
index: bigint;
|
|
50
70
|
content_encoding: string;
|
|
51
71
|
}
|
|
@@ -60,9 +80,13 @@ export interface UnsetAssetContentArguments {
|
|
|
60
80
|
key: Key;
|
|
61
81
|
content_encoding: string;
|
|
62
82
|
}
|
|
83
|
+
export type ValidationResult = {Ok: string} | {Err: string};
|
|
63
84
|
export interface _SERVICE {
|
|
64
85
|
authorize: ActorMethod<[Principal], undefined>;
|
|
65
|
-
certified_tree: ActorMethod<
|
|
86
|
+
certified_tree: ActorMethod<
|
|
87
|
+
[{}],
|
|
88
|
+
{certificate: Uint8Array | number[]; tree: Uint8Array | number[]}
|
|
89
|
+
>;
|
|
66
90
|
clear: ActorMethod<[ClearArguments], undefined>;
|
|
67
91
|
commit_batch: ActorMethod<
|
|
68
92
|
[{batch_id: BatchId; operations: Array<BatchOperationKind>}],
|
|
@@ -70,29 +94,42 @@ export interface _SERVICE {
|
|
|
70
94
|
>;
|
|
71
95
|
create_asset: ActorMethod<[CreateAssetArguments], undefined>;
|
|
72
96
|
create_batch: ActorMethod<[{}], {batch_id: BatchId}>;
|
|
73
|
-
create_chunk: ActorMethod<
|
|
97
|
+
create_chunk: ActorMethod<
|
|
98
|
+
[{content: Uint8Array | number[]; batch_id: BatchId}],
|
|
99
|
+
{chunk_id: ChunkId}
|
|
100
|
+
>;
|
|
101
|
+
deauthorize: ActorMethod<[Principal], undefined>;
|
|
74
102
|
delete_asset: ActorMethod<[DeleteAssetArguments], undefined>;
|
|
75
103
|
get: ActorMethod<
|
|
76
104
|
[{key: Key; accept_encodings: Array<string>}],
|
|
77
105
|
{
|
|
78
|
-
content: Uint8Array;
|
|
79
|
-
sha256: [] | [Uint8Array];
|
|
106
|
+
content: Uint8Array | number[];
|
|
107
|
+
sha256: [] | [Uint8Array | number[]];
|
|
80
108
|
content_type: string;
|
|
81
109
|
content_encoding: string;
|
|
82
110
|
total_length: bigint;
|
|
83
111
|
}
|
|
84
112
|
>;
|
|
113
|
+
get_asset_properties: ActorMethod<
|
|
114
|
+
[Key],
|
|
115
|
+
{
|
|
116
|
+
headers: [] | [Array<HeaderField>];
|
|
117
|
+
allow_raw_access: [] | [boolean];
|
|
118
|
+
max_age: [] | [bigint];
|
|
119
|
+
}
|
|
120
|
+
>;
|
|
85
121
|
get_chunk: ActorMethod<
|
|
86
122
|
[
|
|
87
123
|
{
|
|
88
124
|
key: Key;
|
|
89
|
-
sha256: [] | [Uint8Array];
|
|
125
|
+
sha256: [] | [Uint8Array | number[]];
|
|
90
126
|
index: bigint;
|
|
91
127
|
content_encoding: string;
|
|
92
128
|
}
|
|
93
129
|
],
|
|
94
|
-
{content: Uint8Array}
|
|
130
|
+
{content: Uint8Array | number[]}
|
|
95
131
|
>;
|
|
132
|
+
grant_permission: ActorMethod<[GrantPermission], undefined>;
|
|
96
133
|
http_request: ActorMethod<[HttpRequest], HttpResponse>;
|
|
97
134
|
http_request_streaming_callback: ActorMethod<
|
|
98
135
|
[StreamingCallbackToken],
|
|
@@ -104,25 +141,32 @@ export interface _SERVICE {
|
|
|
104
141
|
key: Key;
|
|
105
142
|
encodings: Array<{
|
|
106
143
|
modified: Time;
|
|
107
|
-
sha256: [] | [Uint8Array];
|
|
144
|
+
sha256: [] | [Uint8Array | number[]];
|
|
108
145
|
length: bigint;
|
|
109
146
|
content_encoding: string;
|
|
110
147
|
}>;
|
|
111
148
|
content_type: string;
|
|
112
149
|
}>
|
|
113
150
|
>;
|
|
151
|
+
list_authorized: ActorMethod<[], Array<Principal>>;
|
|
152
|
+
list_permitted: ActorMethod<[ListPermitted], Array<Principal>>;
|
|
153
|
+
revoke_permission: ActorMethod<[RevokePermission], undefined>;
|
|
114
154
|
set_asset_content: ActorMethod<[SetAssetContentArguments], undefined>;
|
|
155
|
+
set_asset_properties: ActorMethod<[SetAssetPropertiesArguments], undefined>;
|
|
115
156
|
store: ActorMethod<
|
|
116
157
|
[
|
|
117
158
|
{
|
|
118
159
|
key: Key;
|
|
119
|
-
content: Uint8Array;
|
|
120
|
-
sha256: [] | [Uint8Array];
|
|
160
|
+
content: Uint8Array | number[];
|
|
161
|
+
sha256: [] | [Uint8Array | number[]];
|
|
121
162
|
content_type: string;
|
|
122
163
|
content_encoding: string;
|
|
123
164
|
}
|
|
124
165
|
],
|
|
125
166
|
undefined
|
|
126
167
|
>;
|
|
168
|
+
take_ownership: ActorMethod<[], undefined>;
|
|
127
169
|
unset_asset_content: ActorMethod<[UnsetAssetContentArguments], undefined>;
|
|
170
|
+
validate_grant_permission: ActorMethod<[GrantPermission], ValidationResult>;
|
|
171
|
+
validate_revoke_permission: ActorMethod<[RevokePermission], ValidationResult>;
|
|
128
172
|
}
|
|
@@ -7,7 +7,9 @@ export const idlFactory = ({IDL}) => {
|
|
|
7
7
|
key: Key,
|
|
8
8
|
content_type: IDL.Text,
|
|
9
9
|
headers: IDL.Opt(IDL.Vec(HeaderField)),
|
|
10
|
-
|
|
10
|
+
allow_raw_access: IDL.Opt(IDL.Bool),
|
|
11
|
+
max_age: IDL.Opt(IDL.Nat64),
|
|
12
|
+
enable_aliasing: IDL.Opt(IDL.Bool)
|
|
11
13
|
});
|
|
12
14
|
const UnsetAssetContentArguments = IDL.Record({
|
|
13
15
|
key: Key,
|
|
@@ -28,6 +30,15 @@ export const idlFactory = ({IDL}) => {
|
|
|
28
30
|
SetAssetContent: SetAssetContentArguments,
|
|
29
31
|
Clear: ClearArguments
|
|
30
32
|
});
|
|
33
|
+
const Permission = IDL.Variant({
|
|
34
|
+
Prepare: IDL.Null,
|
|
35
|
+
ManagePermissions: IDL.Null,
|
|
36
|
+
Commit: IDL.Null
|
|
37
|
+
});
|
|
38
|
+
const GrantPermission = IDL.Record({
|
|
39
|
+
permission: Permission,
|
|
40
|
+
to_principal: IDL.Principal
|
|
41
|
+
});
|
|
31
42
|
const HttpRequest = IDL.Record({
|
|
32
43
|
url: IDL.Text,
|
|
33
44
|
method: IDL.Text,
|
|
@@ -61,6 +72,18 @@ export const idlFactory = ({IDL}) => {
|
|
|
61
72
|
status_code: IDL.Nat16
|
|
62
73
|
});
|
|
63
74
|
const Time = IDL.Int;
|
|
75
|
+
const ListPermitted = IDL.Record({permission: Permission});
|
|
76
|
+
const RevokePermission = IDL.Record({
|
|
77
|
+
permission: Permission,
|
|
78
|
+
of_principal: IDL.Principal
|
|
79
|
+
});
|
|
80
|
+
const SetAssetPropertiesArguments = IDL.Record({
|
|
81
|
+
key: Key,
|
|
82
|
+
headers: IDL.Opt(IDL.Opt(IDL.Vec(HeaderField))),
|
|
83
|
+
allow_raw_access: IDL.Opt(IDL.Opt(IDL.Bool)),
|
|
84
|
+
max_age: IDL.Opt(IDL.Opt(IDL.Nat64))
|
|
85
|
+
});
|
|
86
|
+
const ValidationResult = IDL.Variant({Ok: IDL.Text, Err: IDL.Text});
|
|
64
87
|
return IDL.Service({
|
|
65
88
|
authorize: IDL.Func([IDL.Principal], [], []),
|
|
66
89
|
certified_tree: IDL.Func(
|
|
@@ -91,6 +114,7 @@ export const idlFactory = ({IDL}) => {
|
|
|
91
114
|
[IDL.Record({chunk_id: ChunkId})],
|
|
92
115
|
[]
|
|
93
116
|
),
|
|
117
|
+
deauthorize: IDL.Func([IDL.Principal], [], []),
|
|
94
118
|
delete_asset: IDL.Func([DeleteAssetArguments], [], []),
|
|
95
119
|
get: IDL.Func(
|
|
96
120
|
[IDL.Record({key: Key, accept_encodings: IDL.Vec(IDL.Text)})],
|
|
@@ -105,6 +129,17 @@ export const idlFactory = ({IDL}) => {
|
|
|
105
129
|
],
|
|
106
130
|
['query']
|
|
107
131
|
),
|
|
132
|
+
get_asset_properties: IDL.Func(
|
|
133
|
+
[Key],
|
|
134
|
+
[
|
|
135
|
+
IDL.Record({
|
|
136
|
+
headers: IDL.Opt(IDL.Vec(HeaderField)),
|
|
137
|
+
allow_raw_access: IDL.Opt(IDL.Bool),
|
|
138
|
+
max_age: IDL.Opt(IDL.Nat64)
|
|
139
|
+
})
|
|
140
|
+
],
|
|
141
|
+
['query']
|
|
142
|
+
),
|
|
108
143
|
get_chunk: IDL.Func(
|
|
109
144
|
[
|
|
110
145
|
IDL.Record({
|
|
@@ -117,6 +152,7 @@ export const idlFactory = ({IDL}) => {
|
|
|
117
152
|
[IDL.Record({content: IDL.Vec(IDL.Nat8)})],
|
|
118
153
|
['query']
|
|
119
154
|
),
|
|
155
|
+
grant_permission: IDL.Func([GrantPermission], [], []),
|
|
120
156
|
http_request: IDL.Func([HttpRequest], [HttpResponse], ['query']),
|
|
121
157
|
http_request_streaming_callback: IDL.Func(
|
|
122
158
|
[StreamingCallbackToken],
|
|
@@ -143,7 +179,11 @@ export const idlFactory = ({IDL}) => {
|
|
|
143
179
|
],
|
|
144
180
|
['query']
|
|
145
181
|
),
|
|
182
|
+
list_authorized: IDL.Func([], [IDL.Vec(IDL.Principal)], ['query']),
|
|
183
|
+
list_permitted: IDL.Func([ListPermitted], [IDL.Vec(IDL.Principal)], ['query']),
|
|
184
|
+
revoke_permission: IDL.Func([RevokePermission], [], []),
|
|
146
185
|
set_asset_content: IDL.Func([SetAssetContentArguments], [], []),
|
|
186
|
+
set_asset_properties: IDL.Func([SetAssetPropertiesArguments], [], []),
|
|
147
187
|
store: IDL.Func(
|
|
148
188
|
[
|
|
149
189
|
IDL.Record({
|
|
@@ -157,7 +197,10 @@ export const idlFactory = ({IDL}) => {
|
|
|
157
197
|
[],
|
|
158
198
|
[]
|
|
159
199
|
),
|
|
160
|
-
|
|
200
|
+
take_ownership: IDL.Func([], [], []),
|
|
201
|
+
unset_asset_content: IDL.Func([UnsetAssetContentArguments], [], []),
|
|
202
|
+
validate_grant_permission: IDL.Func([GrantPermission], [ValidationResult], []),
|
|
203
|
+
validate_revoke_permission: IDL.Func([RevokePermission], [ValidationResult], [])
|
|
161
204
|
});
|
|
162
205
|
};
|
|
163
206
|
export const init = ({IDL}) => {
|
|
@@ -16,7 +16,7 @@ export interface ArchiveConfig {
|
|
|
16
16
|
polling_interval_ns: bigint;
|
|
17
17
|
entries_buffer_limit: bigint;
|
|
18
18
|
archive_integration: [] | [{pull: null} | {push: null}];
|
|
19
|
-
module_hash: Uint8Array;
|
|
19
|
+
module_hash: Uint8Array | number[];
|
|
20
20
|
entries_fetch_limit: number;
|
|
21
21
|
}
|
|
22
22
|
export interface ArchiveInfo {
|
|
@@ -25,7 +25,7 @@ export interface ArchiveInfo {
|
|
|
25
25
|
}
|
|
26
26
|
export interface BufferedArchiveEntry {
|
|
27
27
|
sequence_number: bigint;
|
|
28
|
-
entry: Uint8Array;
|
|
28
|
+
entry: Uint8Array | number[];
|
|
29
29
|
anchor_number: UserNumber;
|
|
30
30
|
timestamp: Timestamp;
|
|
31
31
|
}
|
|
@@ -38,7 +38,7 @@ export interface ChallengeResult {
|
|
|
38
38
|
key: ChallengeKey;
|
|
39
39
|
chars: string;
|
|
40
40
|
}
|
|
41
|
-
export type CredentialId = Uint8Array;
|
|
41
|
+
export type CredentialId = Uint8Array | number[];
|
|
42
42
|
export interface Delegation {
|
|
43
43
|
pubkey: PublicKey;
|
|
44
44
|
targets: [] | [Array<Principal>];
|
|
@@ -70,11 +70,11 @@ export type HeaderField = [string, string];
|
|
|
70
70
|
export interface HttpRequest {
|
|
71
71
|
url: string;
|
|
72
72
|
method: string;
|
|
73
|
-
body: Uint8Array;
|
|
73
|
+
body: Uint8Array | number[];
|
|
74
74
|
headers: Array<HeaderField>;
|
|
75
75
|
}
|
|
76
76
|
export interface HttpResponse {
|
|
77
|
-
body: Uint8Array;
|
|
77
|
+
body: Uint8Array | number[];
|
|
78
78
|
headers: Array<HeaderField>;
|
|
79
79
|
streaming_strategy: [] | [StreamingStrategy];
|
|
80
80
|
status_code: number;
|
|
@@ -101,7 +101,7 @@ export type KeyType =
|
|
|
101
101
|
| {seed_phrase: null}
|
|
102
102
|
| {cross_platform: null}
|
|
103
103
|
| {unknown: null};
|
|
104
|
-
export type PublicKey = Uint8Array;
|
|
104
|
+
export type PublicKey = Uint8Array | number[];
|
|
105
105
|
export type Purpose = {authentication: null} | {recovery: null};
|
|
106
106
|
export type RegisterResponse =
|
|
107
107
|
| {bad_challenge: null}
|
|
@@ -109,12 +109,12 @@ export type RegisterResponse =
|
|
|
109
109
|
| {registered: {user_number: UserNumber}};
|
|
110
110
|
export type SessionKey = PublicKey;
|
|
111
111
|
export interface SignedDelegation {
|
|
112
|
-
signature: Uint8Array;
|
|
112
|
+
signature: Uint8Array | number[];
|
|
113
113
|
delegation: Delegation;
|
|
114
114
|
}
|
|
115
115
|
export interface StreamingCallbackHttpResponse {
|
|
116
116
|
token: [] | [Token];
|
|
117
|
-
body: Uint8Array;
|
|
117
|
+
body: Uint8Array | number[];
|
|
118
118
|
}
|
|
119
119
|
export type StreamingStrategy = {
|
|
120
120
|
Callback: {token: Token; callback: [Principal, string]};
|
|
@@ -135,7 +135,7 @@ export interface _SERVICE {
|
|
|
135
135
|
add: ActorMethod<[UserNumber, DeviceData], undefined>;
|
|
136
136
|
add_tentative_device: ActorMethod<[UserNumber, DeviceData], AddTentativeDeviceResponse>;
|
|
137
137
|
create_challenge: ActorMethod<[], Challenge>;
|
|
138
|
-
deploy_archive: ActorMethod<[Uint8Array], DeployArchiveResult>;
|
|
138
|
+
deploy_archive: ActorMethod<[Uint8Array | number[]], DeployArchiveResult>;
|
|
139
139
|
enter_device_registration_mode: ActorMethod<[UserNumber], Timestamp>;
|
|
140
140
|
exit_device_registration_mode: ActorMethod<[UserNumber], undefined>;
|
|
141
141
|
fetch_entries: ActorMethod<[], Array<BufferedArchiveEntry>>;
|
|
@@ -4,7 +4,7 @@ import type {Principal} from '@dfinity/principal';
|
|
|
4
4
|
export interface AccountBalanceArgs {
|
|
5
5
|
account: AccountIdentifier;
|
|
6
6
|
}
|
|
7
|
-
export type AccountIdentifier = Uint8Array;
|
|
7
|
+
export type AccountIdentifier = Uint8Array | number[];
|
|
8
8
|
export interface Archive {
|
|
9
9
|
canister_id: Principal;
|
|
10
10
|
}
|
|
@@ -14,7 +14,7 @@ export interface Archives {
|
|
|
14
14
|
export interface Block {
|
|
15
15
|
transaction: Transaction;
|
|
16
16
|
timestamp: TimeStamp;
|
|
17
|
-
parent_hash: [] | [Uint8Array];
|
|
17
|
+
parent_hash: [] | [Uint8Array | number[]];
|
|
18
18
|
}
|
|
19
19
|
export type BlockIndex = bigint;
|
|
20
20
|
export interface BlockRange {
|
|
@@ -49,13 +49,13 @@ export type QueryArchiveError =
|
|
|
49
49
|
export type QueryArchiveFn = ActorMethod<[GetBlocksArgs], QueryArchiveResult>;
|
|
50
50
|
export type QueryArchiveResult = {Ok: BlockRange} | {Err: QueryArchiveError};
|
|
51
51
|
export interface QueryBlocksResponse {
|
|
52
|
-
certificate: [] | [Uint8Array];
|
|
52
|
+
certificate: [] | [Uint8Array | number[]];
|
|
53
53
|
blocks: Array<Block>;
|
|
54
54
|
chain_length: bigint;
|
|
55
55
|
first_block_index: BlockIndex;
|
|
56
56
|
archived_blocks: Array<{callback: QueryArchiveFn; start: BlockIndex; length: bigint}>;
|
|
57
57
|
}
|
|
58
|
-
export type SubAccount = Uint8Array;
|
|
58
|
+
export type SubAccount = Uint8Array | number[];
|
|
59
59
|
export interface TimeStamp {
|
|
60
60
|
timestamp_nanos: bigint;
|
|
61
61
|
}
|
|
@@ -3,7 +3,7 @@ import type {Principal} from '@dfinity/principal';
|
|
|
3
3
|
|
|
4
4
|
export interface AssetEncodingNoContent {
|
|
5
5
|
modified: bigint;
|
|
6
|
-
sha256: Uint8Array;
|
|
6
|
+
sha256: Uint8Array | number[];
|
|
7
7
|
total_length: bigint;
|
|
8
8
|
}
|
|
9
9
|
export interface AssetKey {
|
|
@@ -21,7 +21,7 @@ export interface AssetNoContent {
|
|
|
21
21
|
created_at: bigint;
|
|
22
22
|
}
|
|
23
23
|
export interface Chunk {
|
|
24
|
-
content: Uint8Array;
|
|
24
|
+
content: Uint8Array | number[];
|
|
25
25
|
batch_id: bigint;
|
|
26
26
|
}
|
|
27
27
|
export interface CommitBatch {
|
|
@@ -46,17 +46,17 @@ export interface DelDoc {
|
|
|
46
46
|
export interface Doc {
|
|
47
47
|
updated_at: bigint;
|
|
48
48
|
owner: Principal;
|
|
49
|
-
data: Uint8Array;
|
|
49
|
+
data: Uint8Array | number[];
|
|
50
50
|
created_at: bigint;
|
|
51
51
|
}
|
|
52
52
|
export interface HttpRequest {
|
|
53
53
|
url: string;
|
|
54
54
|
method: string;
|
|
55
|
-
body: Uint8Array;
|
|
55
|
+
body: Uint8Array | number[];
|
|
56
56
|
headers: Array<[string, string]>;
|
|
57
57
|
}
|
|
58
58
|
export interface HttpResponse {
|
|
59
|
-
body: Uint8Array;
|
|
59
|
+
body: Uint8Array | number[];
|
|
60
60
|
headers: Array<[string, string]>;
|
|
61
61
|
streaming_strategy: [] | [StreamingStrategy];
|
|
62
62
|
status_code: number;
|
|
@@ -71,10 +71,19 @@ export interface InitAssetKey {
|
|
|
71
71
|
export interface InitUploadResult {
|
|
72
72
|
batch_id: bigint;
|
|
73
73
|
}
|
|
74
|
+
export interface ListOrder {
|
|
75
|
+
field: ListOrderField;
|
|
76
|
+
desc: boolean;
|
|
77
|
+
}
|
|
78
|
+
export type ListOrderField = {UpdatedAt: null} | {Keys: null} | {CreatedAt: null};
|
|
79
|
+
export interface ListPaginate {
|
|
80
|
+
start_after: [] | [string];
|
|
81
|
+
limit: [] | [bigint];
|
|
82
|
+
}
|
|
74
83
|
export interface ListParams {
|
|
75
|
-
order: [] | [
|
|
84
|
+
order: [] | [ListOrder];
|
|
76
85
|
matcher: [] | [string];
|
|
77
|
-
paginate: [] | [
|
|
86
|
+
paginate: [] | [ListPaginate];
|
|
78
87
|
}
|
|
79
88
|
export interface ListResults {
|
|
80
89
|
matches_length: bigint;
|
|
@@ -86,13 +95,6 @@ export interface ListResults_1 {
|
|
|
86
95
|
length: bigint;
|
|
87
96
|
items: Array<[string, Doc]>;
|
|
88
97
|
}
|
|
89
|
-
export interface OrderKeys {
|
|
90
|
-
desc: boolean;
|
|
91
|
-
}
|
|
92
|
-
export interface PaginateKeys {
|
|
93
|
-
start_after: [] | [string];
|
|
94
|
-
limit: [] | [bigint];
|
|
95
|
-
}
|
|
96
98
|
export type Permission = {Controllers: null} | {Private: null} | {Public: null} | {Managed: null};
|
|
97
99
|
export interface Rule {
|
|
98
100
|
updated_at: bigint;
|
|
@@ -104,7 +106,7 @@ export interface Rule {
|
|
|
104
106
|
export type RulesType = {Db: null} | {Storage: null};
|
|
105
107
|
export interface SetDoc {
|
|
106
108
|
updated_at: [] | [bigint];
|
|
107
|
-
data: Uint8Array;
|
|
109
|
+
data: Uint8Array | number[];
|
|
108
110
|
}
|
|
109
111
|
export interface SetRule {
|
|
110
112
|
updated_at: [] | [bigint];
|
|
@@ -117,11 +119,11 @@ export interface StorageConfig {
|
|
|
117
119
|
}
|
|
118
120
|
export interface StreamingCallbackHttpResponse {
|
|
119
121
|
token: [] | [StreamingCallbackToken];
|
|
120
|
-
body: Uint8Array;
|
|
122
|
+
body: Uint8Array | number[];
|
|
121
123
|
}
|
|
122
124
|
export interface StreamingCallbackToken {
|
|
123
125
|
token: [] | [string];
|
|
124
|
-
sha256: [] | [Uint8Array];
|
|
126
|
+
sha256: [] | [Uint8Array | number[]];
|
|
125
127
|
headers: Array<[string, string]>;
|
|
126
128
|
index: bigint;
|
|
127
129
|
encoding_type: string;
|
|
@@ -56,15 +56,20 @@ export const idlFactory = ({IDL}) => {
|
|
|
56
56
|
full_path: IDL.Text
|
|
57
57
|
});
|
|
58
58
|
const InitUploadResult = IDL.Record({batch_id: IDL.Nat});
|
|
59
|
-
const
|
|
60
|
-
|
|
59
|
+
const ListOrderField = IDL.Variant({
|
|
60
|
+
UpdatedAt: IDL.Null,
|
|
61
|
+
Keys: IDL.Null,
|
|
62
|
+
CreatedAt: IDL.Null
|
|
63
|
+
});
|
|
64
|
+
const ListOrder = IDL.Record({field: ListOrderField, desc: IDL.Bool});
|
|
65
|
+
const ListPaginate = IDL.Record({
|
|
61
66
|
start_after: IDL.Opt(IDL.Text),
|
|
62
67
|
limit: IDL.Opt(IDL.Nat64)
|
|
63
68
|
});
|
|
64
69
|
const ListParams = IDL.Record({
|
|
65
|
-
order: IDL.Opt(
|
|
70
|
+
order: IDL.Opt(ListOrder),
|
|
66
71
|
matcher: IDL.Opt(IDL.Text),
|
|
67
|
-
paginate: IDL.Opt(
|
|
72
|
+
paginate: IDL.Opt(ListPaginate)
|
|
68
73
|
});
|
|
69
74
|
const AssetKey = IDL.Record({
|
|
70
75
|
token: IDL.Opt(IDL.Text),
|
|
@@ -56,15 +56,20 @@ export const idlFactory = ({IDL}) => {
|
|
|
56
56
|
full_path: IDL.Text
|
|
57
57
|
});
|
|
58
58
|
const InitUploadResult = IDL.Record({batch_id: IDL.Nat});
|
|
59
|
-
const
|
|
60
|
-
|
|
59
|
+
const ListOrderField = IDL.Variant({
|
|
60
|
+
UpdatedAt: IDL.Null,
|
|
61
|
+
Keys: IDL.Null,
|
|
62
|
+
CreatedAt: IDL.Null
|
|
63
|
+
});
|
|
64
|
+
const ListOrder = IDL.Record({field: ListOrderField, desc: IDL.Bool});
|
|
65
|
+
const ListPaginate = IDL.Record({
|
|
61
66
|
start_after: IDL.Opt(IDL.Text),
|
|
62
67
|
limit: IDL.Opt(IDL.Nat64)
|
|
63
68
|
});
|
|
64
69
|
const ListParams = IDL.Record({
|
|
65
|
-
order: IDL.Opt(
|
|
70
|
+
order: IDL.Opt(ListOrder),
|
|
66
71
|
matcher: IDL.Opt(IDL.Text),
|
|
67
|
-
paginate: IDL.Opt(
|
|
72
|
+
paginate: IDL.Opt(ListPaginate)
|
|
68
73
|
});
|
|
69
74
|
const AssetKey = IDL.Record({
|
|
70
75
|
token: IDL.Opt(IDL.Text),
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './browser/index.js';
|