@junobuild/ic-client 0.0.1
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/LICENSE +21 -0
- package/README.md +21 -0
- package/dist/browser/index.js +2 -0
- package/dist/browser/index.js.map +7 -0
- package/dist/declarations/console/console.did.d.ts +311 -0
- package/dist/declarations/console/console.factory.certified.did.js +326 -0
- package/dist/declarations/console/console.factory.did.js +326 -0
- package/dist/declarations/console/console.factory.did.mjs +326 -0
- package/dist/declarations/deprecated/console-0-0-14.did.d.ts +267 -0
- package/dist/declarations/deprecated/console-0-0-14.factory.did.js +285 -0
- package/dist/declarations/deprecated/console-0-0-8-patch1.did.d.ts +75 -0
- package/dist/declarations/deprecated/console-0-0-8-patch1.factory.did.js +80 -0
- package/dist/declarations/deprecated/mission_control-0-0-13.did.d.ts +246 -0
- package/dist/declarations/deprecated/mission_control-0-0-13.factory.did.js +280 -0
- package/dist/declarations/deprecated/mission_control-0-0-14.did.d.ts +241 -0
- package/dist/declarations/deprecated/mission_control-0-0-14.factory.did.js +258 -0
- package/dist/declarations/deprecated/mission_control-0-0-4.did.d.ts +80 -0
- package/dist/declarations/deprecated/mission_control-0-0-4.factory.did.js +99 -0
- package/dist/declarations/deprecated/mission_control-deprecated-version.did.d.ts +231 -0
- package/dist/declarations/deprecated/mission_control-deprecated-version.factory.did.js +247 -0
- package/dist/declarations/deprecated/observatory-0-0-9.did.d.ts +70 -0
- package/dist/declarations/deprecated/observatory-0-0-9.factory.did.js +76 -0
- package/dist/declarations/deprecated/orbiter-0-0-6.did.d.ts +161 -0
- package/dist/declarations/deprecated/orbiter-0-0-6.factory.did.js +192 -0
- package/dist/declarations/deprecated/orbiter-0-0-7.did.d.ts +166 -0
- package/dist/declarations/deprecated/orbiter-0-0-7.factory.did.js +197 -0
- package/dist/declarations/deprecated/orbiter-0-0-8.did.d.ts +245 -0
- package/dist/declarations/deprecated/orbiter-0-0-8.factory.did.js +287 -0
- package/dist/declarations/deprecated/orbiter-0-2-0.did.d.ts +277 -0
- package/dist/declarations/deprecated/orbiter-0-2-0.factory.did.js +319 -0
- package/dist/declarations/deprecated/orbiter-deprecated-version.did.d.ts +229 -0
- package/dist/declarations/deprecated/orbiter-deprecated-version.factory.did.js +271 -0
- package/dist/declarations/deprecated/satellite-0-0-16.did.d.ts +240 -0
- package/dist/declarations/deprecated/satellite-0-0-16.factory.did.js +264 -0
- package/dist/declarations/deprecated/satellite-0-0-17.did.d.ts +254 -0
- package/dist/declarations/deprecated/satellite-0-0-17.factory.did.js +281 -0
- package/dist/declarations/deprecated/satellite-0-0-21.did.d.ts +299 -0
- package/dist/declarations/deprecated/satellite-0-0-21.factory.did.js +333 -0
- package/dist/declarations/deprecated/satellite-0-0-22.did.d.ts +290 -0
- package/dist/declarations/deprecated/satellite-0-0-22.factory.did.js +318 -0
- package/dist/declarations/deprecated/satellite-0-0-8.did.d.ts +183 -0
- package/dist/declarations/deprecated/satellite-0-0-8.factory.did.js +194 -0
- package/dist/declarations/deprecated/satellite-0-0-9.did.d.ts +199 -0
- package/dist/declarations/deprecated/satellite-0-0-9.factory.did.js +213 -0
- package/dist/declarations/deprecated/satellite-deprecated-no-scope.did.d.ts +183 -0
- package/dist/declarations/deprecated/satellite-deprecated-no-scope.factory.did.js +194 -0
- package/dist/declarations/deprecated/satellite-deprecated-no-scope.factory.did.mjs +192 -0
- package/dist/declarations/deprecated/satellite-deprecated-version.did.d.ts +291 -0
- package/dist/declarations/deprecated/satellite-deprecated-version.factory.did.js +319 -0
- package/dist/declarations/deprecated/satellite-deprecated.did.d.ts +182 -0
- package/dist/declarations/deprecated/satellite-deprecated.factory.did.js +191 -0
- package/dist/declarations/deprecated/satellite-deprecated.factory.did.mjs +191 -0
- package/dist/declarations/mission_control/mission_control.did.d.ts +241 -0
- package/dist/declarations/mission_control/mission_control.factory.certified.did.js +259 -0
- package/dist/declarations/mission_control/mission_control.factory.did.js +259 -0
- package/dist/declarations/observatory/observatory.did.d.ts +86 -0
- package/dist/declarations/observatory/observatory.factory.certified.did.js +93 -0
- package/dist/declarations/observatory/observatory.factory.did.js +93 -0
- package/dist/declarations/observatory/observatory.factory.did.mjs +93 -0
- package/dist/declarations/orbiter/orbiter.did.d.ts +277 -0
- package/dist/declarations/orbiter/orbiter.factory.certified.did.js +304 -0
- package/dist/declarations/orbiter/orbiter.factory.did.js +320 -0
- package/dist/declarations/orbiter/orbiter.factory.did.mjs +320 -0
- package/dist/declarations/satellite/satellite.did.d.ts +396 -0
- package/dist/declarations/satellite/satellite.factory.certified.did.js +419 -0
- package/dist/declarations/satellite/satellite.factory.did.js +419 -0
- package/dist/declarations/satellite/satellite.factory.did.mjs +419 -0
- package/dist/declarations/sputnik/sputnik.did.d.ts +396 -0
- package/dist/declarations/sputnik/sputnik.factory.certified.did.js +419 -0
- package/dist/declarations/sputnik/sputnik.factory.did.js +419 -0
- package/dist/index.js +1 -0
- package/dist/node/index.mjs +4 -0
- package/dist/node/index.mjs.map +7 -0
- package/dist/types/api/_agent.api.d.ts +3 -0
- package/dist/types/api/actor.api.d.ts +34 -0
- package/dist/types/api/actor.factory.d.ts +19 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/types/actor.d.ts +74 -0
- package/dist/types/utils/agent.utils.d.ts +6 -0
- package/package.json +63 -0
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
export const idlFactory = ({IDL}) => {
|
|
2
|
+
const CommitBatch = IDL.Record({
|
|
3
|
+
batch_id: IDL.Nat,
|
|
4
|
+
headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
|
|
5
|
+
chunk_ids: IDL.Vec(IDL.Nat)
|
|
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
|
+
});
|
|
16
|
+
const DelDoc = IDL.Record({updated_at: IDL.Opt(IDL.Nat64)});
|
|
17
|
+
const StorageConfig = IDL.Record({
|
|
18
|
+
headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))))
|
|
19
|
+
});
|
|
20
|
+
const Config = IDL.Record({storage: StorageConfig});
|
|
21
|
+
const Doc = IDL.Record({
|
|
22
|
+
updated_at: IDL.Nat64,
|
|
23
|
+
owner: IDL.Principal,
|
|
24
|
+
data: IDL.Vec(IDL.Nat8),
|
|
25
|
+
created_at: IDL.Nat64
|
|
26
|
+
});
|
|
27
|
+
const HttpRequest = IDL.Record({
|
|
28
|
+
url: IDL.Text,
|
|
29
|
+
method: IDL.Text,
|
|
30
|
+
body: IDL.Vec(IDL.Nat8),
|
|
31
|
+
headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))
|
|
32
|
+
});
|
|
33
|
+
const StreamingCallbackToken = IDL.Record({
|
|
34
|
+
token: IDL.Opt(IDL.Text),
|
|
35
|
+
sha256: IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
36
|
+
headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
|
|
37
|
+
index: IDL.Nat64,
|
|
38
|
+
encoding_type: IDL.Text,
|
|
39
|
+
full_path: IDL.Text
|
|
40
|
+
});
|
|
41
|
+
const StreamingStrategy = IDL.Variant({
|
|
42
|
+
Callback: IDL.Record({
|
|
43
|
+
token: StreamingCallbackToken,
|
|
44
|
+
callback: IDL.Func([], [], [])
|
|
45
|
+
})
|
|
46
|
+
});
|
|
47
|
+
const HttpResponse = IDL.Record({
|
|
48
|
+
body: IDL.Vec(IDL.Nat8),
|
|
49
|
+
headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
|
|
50
|
+
streaming_strategy: IDL.Opt(StreamingStrategy),
|
|
51
|
+
status_code: IDL.Nat16
|
|
52
|
+
});
|
|
53
|
+
const StreamingCallbackHttpResponse = IDL.Record({
|
|
54
|
+
token: IDL.Opt(StreamingCallbackToken),
|
|
55
|
+
body: IDL.Vec(IDL.Nat8)
|
|
56
|
+
});
|
|
57
|
+
const InitAssetKey = IDL.Record({
|
|
58
|
+
token: IDL.Opt(IDL.Text),
|
|
59
|
+
collection: IDL.Text,
|
|
60
|
+
name: IDL.Text,
|
|
61
|
+
encoding_type: IDL.Opt(IDL.Text),
|
|
62
|
+
full_path: IDL.Text
|
|
63
|
+
});
|
|
64
|
+
const InitUploadResult = IDL.Record({batch_id: IDL.Nat});
|
|
65
|
+
const ListOrderField = IDL.Variant({
|
|
66
|
+
UpdatedAt: IDL.Null,
|
|
67
|
+
Keys: IDL.Null,
|
|
68
|
+
CreatedAt: IDL.Null
|
|
69
|
+
});
|
|
70
|
+
const ListOrder = IDL.Record({field: ListOrderField, desc: IDL.Bool});
|
|
71
|
+
const ListPaginate = IDL.Record({
|
|
72
|
+
start_after: IDL.Opt(IDL.Text),
|
|
73
|
+
limit: IDL.Opt(IDL.Nat64)
|
|
74
|
+
});
|
|
75
|
+
const ListParams = IDL.Record({
|
|
76
|
+
order: IDL.Opt(ListOrder),
|
|
77
|
+
owner: IDL.Opt(IDL.Principal),
|
|
78
|
+
matcher: IDL.Opt(IDL.Text),
|
|
79
|
+
paginate: IDL.Opt(ListPaginate)
|
|
80
|
+
});
|
|
81
|
+
const AssetKey = IDL.Record({
|
|
82
|
+
token: IDL.Opt(IDL.Text),
|
|
83
|
+
collection: IDL.Text,
|
|
84
|
+
owner: IDL.Principal,
|
|
85
|
+
name: IDL.Text,
|
|
86
|
+
full_path: IDL.Text
|
|
87
|
+
});
|
|
88
|
+
const AssetEncodingNoContent = IDL.Record({
|
|
89
|
+
modified: IDL.Nat64,
|
|
90
|
+
sha256: IDL.Vec(IDL.Nat8),
|
|
91
|
+
total_length: IDL.Nat
|
|
92
|
+
});
|
|
93
|
+
const AssetNoContent = IDL.Record({
|
|
94
|
+
key: AssetKey,
|
|
95
|
+
updated_at: IDL.Nat64,
|
|
96
|
+
encodings: IDL.Vec(IDL.Tuple(IDL.Text, AssetEncodingNoContent)),
|
|
97
|
+
headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
|
|
98
|
+
created_at: IDL.Nat64
|
|
99
|
+
});
|
|
100
|
+
const ListResults = IDL.Record({
|
|
101
|
+
matches_length: IDL.Nat64,
|
|
102
|
+
length: IDL.Nat64,
|
|
103
|
+
items: IDL.Vec(IDL.Tuple(IDL.Text, AssetNoContent))
|
|
104
|
+
});
|
|
105
|
+
const CustomDomain = IDL.Record({
|
|
106
|
+
updated_at: IDL.Nat64,
|
|
107
|
+
created_at: IDL.Nat64,
|
|
108
|
+
bn_id: IDL.Opt(IDL.Text)
|
|
109
|
+
});
|
|
110
|
+
const ListResults_1 = IDL.Record({
|
|
111
|
+
matches_length: IDL.Nat64,
|
|
112
|
+
length: IDL.Nat64,
|
|
113
|
+
items: IDL.Vec(IDL.Tuple(IDL.Text, Doc))
|
|
114
|
+
});
|
|
115
|
+
const RulesType = IDL.Variant({Db: IDL.Null, Storage: IDL.Null});
|
|
116
|
+
const Permission = IDL.Variant({
|
|
117
|
+
Controllers: IDL.Null,
|
|
118
|
+
Private: IDL.Null,
|
|
119
|
+
Public: IDL.Null,
|
|
120
|
+
Managed: IDL.Null
|
|
121
|
+
});
|
|
122
|
+
const Rule = IDL.Record({
|
|
123
|
+
updated_at: IDL.Nat64,
|
|
124
|
+
max_size: IDL.Opt(IDL.Nat),
|
|
125
|
+
read: Permission,
|
|
126
|
+
created_at: IDL.Nat64,
|
|
127
|
+
write: Permission
|
|
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
|
+
});
|
|
137
|
+
const SetDoc = IDL.Record({
|
|
138
|
+
updated_at: IDL.Opt(IDL.Nat64),
|
|
139
|
+
data: IDL.Vec(IDL.Nat8)
|
|
140
|
+
});
|
|
141
|
+
const SetRule = IDL.Record({
|
|
142
|
+
updated_at: IDL.Opt(IDL.Nat64),
|
|
143
|
+
max_size: IDL.Opt(IDL.Nat),
|
|
144
|
+
read: Permission,
|
|
145
|
+
write: Permission
|
|
146
|
+
});
|
|
147
|
+
const Chunk = IDL.Record({
|
|
148
|
+
content: IDL.Vec(IDL.Nat8),
|
|
149
|
+
batch_id: IDL.Nat
|
|
150
|
+
});
|
|
151
|
+
const UploadChunk = IDL.Record({chunk_id: IDL.Nat});
|
|
152
|
+
return IDL.Service({
|
|
153
|
+
commit_asset_upload: IDL.Func([CommitBatch], [], []),
|
|
154
|
+
del_asset: IDL.Func([IDL.Text, IDL.Text], [], []),
|
|
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
|
+
),
|
|
161
|
+
del_custom_domain: IDL.Func([IDL.Text], [], []),
|
|
162
|
+
del_doc: IDL.Func([IDL.Text, IDL.Text, DelDoc], [], []),
|
|
163
|
+
get_config: IDL.Func([], [Config], []),
|
|
164
|
+
get_doc: IDL.Func([IDL.Text, IDL.Text], [IDL.Opt(Doc)], ['query']),
|
|
165
|
+
http_request: IDL.Func([HttpRequest], [HttpResponse], ['query']),
|
|
166
|
+
http_request_streaming_callback: IDL.Func(
|
|
167
|
+
[StreamingCallbackToken],
|
|
168
|
+
[StreamingCallbackHttpResponse],
|
|
169
|
+
['query']
|
|
170
|
+
),
|
|
171
|
+
init_asset_upload: IDL.Func([InitAssetKey], [InitUploadResult], []),
|
|
172
|
+
list_assets: IDL.Func([IDL.Opt(IDL.Text), ListParams], [ListResults], ['query']),
|
|
173
|
+
list_controllers: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))], ['query']),
|
|
174
|
+
list_custom_domains: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Text, CustomDomain))], ['query']),
|
|
175
|
+
list_docs: IDL.Func([IDL.Text, ListParams], [ListResults_1], ['query']),
|
|
176
|
+
list_rules: IDL.Func([RulesType], [IDL.Vec(IDL.Tuple(IDL.Text, Rule))], ['query']),
|
|
177
|
+
set_config: IDL.Func([Config], [], []),
|
|
178
|
+
set_controllers: IDL.Func(
|
|
179
|
+
[SetControllersArgs],
|
|
180
|
+
[IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
|
|
181
|
+
[]
|
|
182
|
+
),
|
|
183
|
+
set_custom_domain: IDL.Func([IDL.Text, IDL.Opt(IDL.Text)], [], []),
|
|
184
|
+
set_doc: IDL.Func([IDL.Text, IDL.Text, SetDoc], [Doc], []),
|
|
185
|
+
set_rule: IDL.Func([RulesType, IDL.Text, SetRule], [], []),
|
|
186
|
+
upload_asset_chunk: IDL.Func([Chunk], [UploadChunk], []),
|
|
187
|
+
version: IDL.Func([], [IDL.Text], ['query'])
|
|
188
|
+
});
|
|
189
|
+
};
|
|
190
|
+
export const init = ({IDL}) => {
|
|
191
|
+
return [];
|
|
192
|
+
};
|
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
import type {ActorMethod} from '@dfinity/agent';
|
|
2
|
+
import type {IDL} from '@dfinity/candid';
|
|
3
|
+
import type {Principal} from '@dfinity/principal';
|
|
4
|
+
|
|
5
|
+
export interface AssetEncodingNoContent {
|
|
6
|
+
modified: bigint;
|
|
7
|
+
sha256: Uint8Array | number[];
|
|
8
|
+
total_length: bigint;
|
|
9
|
+
}
|
|
10
|
+
export interface AssetKey {
|
|
11
|
+
token: [] | [string];
|
|
12
|
+
collection: string;
|
|
13
|
+
owner: Principal;
|
|
14
|
+
name: string;
|
|
15
|
+
description: [] | [string];
|
|
16
|
+
full_path: string;
|
|
17
|
+
}
|
|
18
|
+
export interface AssetNoContent {
|
|
19
|
+
key: AssetKey;
|
|
20
|
+
updated_at: bigint;
|
|
21
|
+
encodings: Array<[string, AssetEncodingNoContent]>;
|
|
22
|
+
headers: Array<[string, string]>;
|
|
23
|
+
created_at: bigint;
|
|
24
|
+
version: [] | [bigint];
|
|
25
|
+
}
|
|
26
|
+
export interface AuthenticationConfig {
|
|
27
|
+
internet_identity: [] | [AuthenticationConfigInternetIdentity];
|
|
28
|
+
}
|
|
29
|
+
export interface AuthenticationConfigInternetIdentity {
|
|
30
|
+
derivation_origin: [] | [string];
|
|
31
|
+
external_alternative_origins: [] | [Array<string>];
|
|
32
|
+
}
|
|
33
|
+
export type CollectionType = {Db: null} | {Storage: null};
|
|
34
|
+
export interface CommitBatch {
|
|
35
|
+
batch_id: bigint;
|
|
36
|
+
headers: Array<[string, string]>;
|
|
37
|
+
chunk_ids: Array<bigint>;
|
|
38
|
+
}
|
|
39
|
+
export interface Config {
|
|
40
|
+
db: [] | [DbConfig];
|
|
41
|
+
authentication: [] | [AuthenticationConfig];
|
|
42
|
+
storage: StorageConfig;
|
|
43
|
+
}
|
|
44
|
+
export interface ConfigMaxMemorySize {
|
|
45
|
+
stable: [] | [bigint];
|
|
46
|
+
heap: [] | [bigint];
|
|
47
|
+
}
|
|
48
|
+
export interface Controller {
|
|
49
|
+
updated_at: bigint;
|
|
50
|
+
metadata: Array<[string, string]>;
|
|
51
|
+
created_at: bigint;
|
|
52
|
+
scope: ControllerScope;
|
|
53
|
+
expires_at: [] | [bigint];
|
|
54
|
+
}
|
|
55
|
+
export type ControllerScope = {Write: null} | {Admin: null};
|
|
56
|
+
export interface CustomDomain {
|
|
57
|
+
updated_at: bigint;
|
|
58
|
+
created_at: bigint;
|
|
59
|
+
version: [] | [bigint];
|
|
60
|
+
bn_id: [] | [string];
|
|
61
|
+
}
|
|
62
|
+
export interface DbConfig {
|
|
63
|
+
max_memory_size: [] | [ConfigMaxMemorySize];
|
|
64
|
+
}
|
|
65
|
+
export interface DelDoc {
|
|
66
|
+
version: [] | [bigint];
|
|
67
|
+
}
|
|
68
|
+
export interface DelRule {
|
|
69
|
+
version: [] | [bigint];
|
|
70
|
+
}
|
|
71
|
+
export interface DeleteControllersArgs {
|
|
72
|
+
controllers: Array<Principal>;
|
|
73
|
+
}
|
|
74
|
+
export interface DepositCyclesArgs {
|
|
75
|
+
cycles: bigint;
|
|
76
|
+
destination_id: Principal;
|
|
77
|
+
}
|
|
78
|
+
export interface Doc {
|
|
79
|
+
updated_at: bigint;
|
|
80
|
+
owner: Principal;
|
|
81
|
+
data: Uint8Array | number[];
|
|
82
|
+
description: [] | [string];
|
|
83
|
+
created_at: bigint;
|
|
84
|
+
version: [] | [bigint];
|
|
85
|
+
}
|
|
86
|
+
export interface HttpRequest {
|
|
87
|
+
url: string;
|
|
88
|
+
method: string;
|
|
89
|
+
body: Uint8Array | number[];
|
|
90
|
+
headers: Array<[string, string]>;
|
|
91
|
+
certificate_version: [] | [number];
|
|
92
|
+
}
|
|
93
|
+
export interface HttpResponse {
|
|
94
|
+
body: Uint8Array | number[];
|
|
95
|
+
headers: Array<[string, string]>;
|
|
96
|
+
streaming_strategy: [] | [StreamingStrategy];
|
|
97
|
+
status_code: number;
|
|
98
|
+
}
|
|
99
|
+
export interface InitAssetKey {
|
|
100
|
+
token: [] | [string];
|
|
101
|
+
collection: string;
|
|
102
|
+
name: string;
|
|
103
|
+
description: [] | [string];
|
|
104
|
+
encoding_type: [] | [string];
|
|
105
|
+
full_path: string;
|
|
106
|
+
}
|
|
107
|
+
export interface InitUploadResult {
|
|
108
|
+
batch_id: bigint;
|
|
109
|
+
}
|
|
110
|
+
export interface ListMatcher {
|
|
111
|
+
key: [] | [string];
|
|
112
|
+
updated_at: [] | [TimestampMatcher];
|
|
113
|
+
description: [] | [string];
|
|
114
|
+
created_at: [] | [TimestampMatcher];
|
|
115
|
+
}
|
|
116
|
+
export interface ListOrder {
|
|
117
|
+
field: ListOrderField;
|
|
118
|
+
desc: boolean;
|
|
119
|
+
}
|
|
120
|
+
export type ListOrderField = {UpdatedAt: null} | {Keys: null} | {CreatedAt: null};
|
|
121
|
+
export interface ListPaginate {
|
|
122
|
+
start_after: [] | [string];
|
|
123
|
+
limit: [] | [bigint];
|
|
124
|
+
}
|
|
125
|
+
export interface ListParams {
|
|
126
|
+
order: [] | [ListOrder];
|
|
127
|
+
owner: [] | [Principal];
|
|
128
|
+
matcher: [] | [ListMatcher];
|
|
129
|
+
paginate: [] | [ListPaginate];
|
|
130
|
+
}
|
|
131
|
+
export interface ListResults {
|
|
132
|
+
matches_pages: [] | [bigint];
|
|
133
|
+
matches_length: bigint;
|
|
134
|
+
items_page: [] | [bigint];
|
|
135
|
+
items: Array<[string, AssetNoContent]>;
|
|
136
|
+
items_length: bigint;
|
|
137
|
+
}
|
|
138
|
+
export interface ListResults_1 {
|
|
139
|
+
matches_pages: [] | [bigint];
|
|
140
|
+
matches_length: bigint;
|
|
141
|
+
items_page: [] | [bigint];
|
|
142
|
+
items: Array<[string, Doc]>;
|
|
143
|
+
items_length: bigint;
|
|
144
|
+
}
|
|
145
|
+
export type Memory = {Heap: null} | {Stable: null};
|
|
146
|
+
export interface MemorySize {
|
|
147
|
+
stable: bigint;
|
|
148
|
+
heap: bigint;
|
|
149
|
+
}
|
|
150
|
+
export type Permission = {Controllers: null} | {Private: null} | {Public: null} | {Managed: null};
|
|
151
|
+
export interface RateConfig {
|
|
152
|
+
max_tokens: bigint;
|
|
153
|
+
time_per_token_ns: bigint;
|
|
154
|
+
}
|
|
155
|
+
export interface Rule {
|
|
156
|
+
max_capacity: [] | [number];
|
|
157
|
+
memory: [] | [Memory];
|
|
158
|
+
updated_at: bigint;
|
|
159
|
+
max_size: [] | [bigint];
|
|
160
|
+
read: Permission;
|
|
161
|
+
created_at: bigint;
|
|
162
|
+
version: [] | [bigint];
|
|
163
|
+
mutable_permissions: [] | [boolean];
|
|
164
|
+
rate_config: [] | [RateConfig];
|
|
165
|
+
write: Permission;
|
|
166
|
+
max_changes_per_user: [] | [number];
|
|
167
|
+
}
|
|
168
|
+
export interface SetController {
|
|
169
|
+
metadata: Array<[string, string]>;
|
|
170
|
+
scope: ControllerScope;
|
|
171
|
+
expires_at: [] | [bigint];
|
|
172
|
+
}
|
|
173
|
+
export interface SetControllersArgs {
|
|
174
|
+
controller: SetController;
|
|
175
|
+
controllers: Array<Principal>;
|
|
176
|
+
}
|
|
177
|
+
export interface SetDoc {
|
|
178
|
+
data: Uint8Array | number[];
|
|
179
|
+
description: [] | [string];
|
|
180
|
+
version: [] | [bigint];
|
|
181
|
+
}
|
|
182
|
+
export interface SetRule {
|
|
183
|
+
max_capacity: [] | [number];
|
|
184
|
+
memory: [] | [Memory];
|
|
185
|
+
max_size: [] | [bigint];
|
|
186
|
+
read: Permission;
|
|
187
|
+
version: [] | [bigint];
|
|
188
|
+
mutable_permissions: [] | [boolean];
|
|
189
|
+
rate_config: [] | [RateConfig];
|
|
190
|
+
write: Permission;
|
|
191
|
+
max_changes_per_user: [] | [number];
|
|
192
|
+
}
|
|
193
|
+
export interface StorageConfig {
|
|
194
|
+
iframe: [] | [StorageConfigIFrame];
|
|
195
|
+
rewrites: Array<[string, string]>;
|
|
196
|
+
headers: Array<[string, Array<[string, string]>]>;
|
|
197
|
+
max_memory_size: [] | [ConfigMaxMemorySize];
|
|
198
|
+
raw_access: [] | [StorageConfigRawAccess];
|
|
199
|
+
redirects: [] | [Array<[string, StorageConfigRedirect]>];
|
|
200
|
+
}
|
|
201
|
+
export type StorageConfigIFrame = {Deny: null} | {AllowAny: null} | {SameOrigin: null};
|
|
202
|
+
export type StorageConfigRawAccess = {Deny: null} | {Allow: null};
|
|
203
|
+
export interface StorageConfigRedirect {
|
|
204
|
+
status_code: number;
|
|
205
|
+
location: string;
|
|
206
|
+
}
|
|
207
|
+
export interface StreamingCallbackHttpResponse {
|
|
208
|
+
token: [] | [StreamingCallbackToken];
|
|
209
|
+
body: Uint8Array | number[];
|
|
210
|
+
}
|
|
211
|
+
export interface StreamingCallbackToken {
|
|
212
|
+
memory: Memory;
|
|
213
|
+
token: [] | [string];
|
|
214
|
+
sha256: [] | [Uint8Array | number[]];
|
|
215
|
+
headers: Array<[string, string]>;
|
|
216
|
+
index: bigint;
|
|
217
|
+
encoding_type: string;
|
|
218
|
+
full_path: string;
|
|
219
|
+
}
|
|
220
|
+
export type StreamingStrategy = {
|
|
221
|
+
Callback: {
|
|
222
|
+
token: StreamingCallbackToken;
|
|
223
|
+
callback: [Principal, string];
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
export type TimestampMatcher =
|
|
227
|
+
| {Equal: bigint}
|
|
228
|
+
| {Between: [bigint, bigint]}
|
|
229
|
+
| {GreaterThan: bigint}
|
|
230
|
+
| {LessThan: bigint};
|
|
231
|
+
export interface UploadChunk {
|
|
232
|
+
content: Uint8Array | number[];
|
|
233
|
+
batch_id: bigint;
|
|
234
|
+
order_id: [] | [bigint];
|
|
235
|
+
}
|
|
236
|
+
export interface UploadChunkResult {
|
|
237
|
+
chunk_id: bigint;
|
|
238
|
+
}
|
|
239
|
+
export interface _SERVICE {
|
|
240
|
+
build_version: ActorMethod<[], string>;
|
|
241
|
+
commit_asset_upload: ActorMethod<[CommitBatch], undefined>;
|
|
242
|
+
count_assets: ActorMethod<[string, ListParams], bigint>;
|
|
243
|
+
count_collection_assets: ActorMethod<[string], bigint>;
|
|
244
|
+
count_collection_docs: ActorMethod<[string], bigint>;
|
|
245
|
+
count_docs: ActorMethod<[string, ListParams], bigint>;
|
|
246
|
+
del_asset: ActorMethod<[string, string], undefined>;
|
|
247
|
+
del_assets: ActorMethod<[string], undefined>;
|
|
248
|
+
del_controllers: ActorMethod<[DeleteControllersArgs], Array<[Principal, Controller]>>;
|
|
249
|
+
del_custom_domain: ActorMethod<[string], undefined>;
|
|
250
|
+
del_doc: ActorMethod<[string, string, DelDoc], undefined>;
|
|
251
|
+
del_docs: ActorMethod<[string], undefined>;
|
|
252
|
+
del_filtered_assets: ActorMethod<[string, ListParams], undefined>;
|
|
253
|
+
del_filtered_docs: ActorMethod<[string, ListParams], undefined>;
|
|
254
|
+
del_many_assets: ActorMethod<[Array<[string, string]>], undefined>;
|
|
255
|
+
del_many_docs: ActorMethod<[Array<[string, string, DelDoc]>], undefined>;
|
|
256
|
+
del_rule: ActorMethod<[CollectionType, string, DelRule], undefined>;
|
|
257
|
+
deposit_cycles: ActorMethod<[DepositCyclesArgs], undefined>;
|
|
258
|
+
get_asset: ActorMethod<[string, string], [] | [AssetNoContent]>;
|
|
259
|
+
get_auth_config: ActorMethod<[], [] | [AuthenticationConfig]>;
|
|
260
|
+
get_config: ActorMethod<[], Config>;
|
|
261
|
+
get_db_config: ActorMethod<[], [] | [DbConfig]>;
|
|
262
|
+
get_doc: ActorMethod<[string, string], [] | [Doc]>;
|
|
263
|
+
get_many_assets: ActorMethod<[Array<[string, string]>], Array<[string, [] | [AssetNoContent]]>>;
|
|
264
|
+
get_many_docs: ActorMethod<[Array<[string, string]>], Array<[string, [] | [Doc]]>>;
|
|
265
|
+
get_rule: ActorMethod<[CollectionType, string], [] | [Rule]>;
|
|
266
|
+
get_storage_config: ActorMethod<[], StorageConfig>;
|
|
267
|
+
http_request: ActorMethod<[HttpRequest], HttpResponse>;
|
|
268
|
+
http_request_streaming_callback: ActorMethod<
|
|
269
|
+
[StreamingCallbackToken],
|
|
270
|
+
StreamingCallbackHttpResponse
|
|
271
|
+
>;
|
|
272
|
+
init_asset_upload: ActorMethod<[InitAssetKey], InitUploadResult>;
|
|
273
|
+
list_assets: ActorMethod<[string, ListParams], ListResults>;
|
|
274
|
+
list_controllers: ActorMethod<[], Array<[Principal, Controller]>>;
|
|
275
|
+
list_custom_domains: ActorMethod<[], Array<[string, CustomDomain]>>;
|
|
276
|
+
list_docs: ActorMethod<[string, ListParams], ListResults_1>;
|
|
277
|
+
list_rules: ActorMethod<[CollectionType], Array<[string, Rule]>>;
|
|
278
|
+
memory_size: ActorMethod<[], MemorySize>;
|
|
279
|
+
set_auth_config: ActorMethod<[AuthenticationConfig], undefined>;
|
|
280
|
+
set_controllers: ActorMethod<[SetControllersArgs], Array<[Principal, Controller]>>;
|
|
281
|
+
set_custom_domain: ActorMethod<[string, [] | [string]], undefined>;
|
|
282
|
+
set_db_config: ActorMethod<[DbConfig], undefined>;
|
|
283
|
+
set_doc: ActorMethod<[string, string, SetDoc], Doc>;
|
|
284
|
+
set_many_docs: ActorMethod<[Array<[string, string, SetDoc]>], Array<[string, Doc]>>;
|
|
285
|
+
set_rule: ActorMethod<[CollectionType, string, SetRule], Rule>;
|
|
286
|
+
set_storage_config: ActorMethod<[StorageConfig], undefined>;
|
|
287
|
+
upload_asset_chunk: ActorMethod<[UploadChunk], UploadChunkResult>;
|
|
288
|
+
version: ActorMethod<[], string>;
|
|
289
|
+
}
|
|
290
|
+
export declare const idlFactory: IDL.InterfaceFactory;
|
|
291
|
+
export declare const init: (args: {IDL: typeof IDL}) => IDL.Type[];
|