@junobuild/core 0.0.32 → 0.0.33
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/README.md +1 -1
- package/{dist/declarations/mission_control/mission_control.did.d.ts → declarations/deprecated/mission_control-0-0-4.did.d.ts} +2 -23
- package/declarations/{mission_control/mission_control.factory.did.js → deprecated/mission_control-0-0-4.factory.did.js} +2 -39
- package/declarations/deprecated/satellite-0-0-8.did.d.ts +183 -0
- package/declarations/deprecated/satellite-0-0-8.factory.did.js +194 -0
- package/declarations/deprecated/satellite-0-0-9.did.d.ts +199 -0
- package/declarations/deprecated/satellite-0-0-9.factory.did.js +213 -0
- package/declarations/satellite/satellite.did.d.ts +6 -0
- package/declarations/satellite/satellite.factory.did.js +6 -0
- package/declarations/satellite/satellite.factory.did.mjs +6 -0
- package/dist/browser/canisterStatus-S2QRROEO.js +2 -0
- package/dist/browser/chunk-IRYD4AKF.js +28 -0
- package/dist/browser/{chunk-PPPG6IG5.js.map → chunk-IRYD4AKF.js.map} +2 -2
- package/dist/browser/index.js +14 -14
- package/dist/browser/index.js.map +3 -3
- package/{declarations/mission_control/mission_control.did.d.ts → dist/declarations/deprecated/mission_control-0-0-4.did.d.ts} +2 -23
- package/dist/declarations/{mission_control/mission_control.factory.did.js → deprecated/mission_control-0-0-4.factory.did.js} +2 -39
- 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/satellite/satellite.did.d.ts +6 -0
- package/dist/declarations/satellite/satellite.factory.did.js +6 -0
- package/dist/declarations/satellite/satellite.factory.did.mjs +6 -0
- package/dist/node/index.mjs +23 -23
- package/dist/node/index.mjs.map +3 -3
- package/dist/workers/auth.worker.js +6 -6
- package/dist/workers/auth.worker.js.gz +0 -0
- package/dist/workers/auth.worker.js.map +2 -2
- package/package.json +3 -3
- package/declarations/cmc/cmc.did +0 -122
- package/declarations/cmc/cmc.did.d.ts +0 -48
- package/declarations/cmc/cmc.factory.did.js +0 -67
- package/declarations/cmc/index.d.ts +0 -45
- package/declarations/cmc/index.js +0 -37
- package/declarations/console/console.did.d.ts +0 -71
- package/declarations/console/console.factory.did.js +0 -79
- package/declarations/console/console.factory.did.mjs +0 -79
- package/declarations/console/index.d.ts +0 -45
- package/declarations/console/index.js +0 -37
- package/declarations/ic/ic.did +0 -195
- package/declarations/ic/ic.did.d.ts +0 -208
- package/declarations/ic/ic.factory.did.js +0 -274
- package/declarations/index/index.d.ts +0 -45
- package/declarations/index/index.did +0 -68
- package/declarations/index/index.did.d.ts +0 -97
- package/declarations/index/index.factory.did.js +0 -94
- package/declarations/index/index.js +0 -37
- package/declarations/mission_control/index.d.ts +0 -45
- package/declarations/mission_control/index.js +0 -38
- package/declarations/observatory/index.d.ts +0 -45
- package/declarations/observatory/index.js +0 -38
- package/declarations/observatory/observatory.did.d.ts +0 -86
- package/declarations/observatory/observatory.factory.did.js +0 -95
- package/declarations/observatory/observatory.factory.did.mjs +0 -95
- package/declarations/orbiter/index.d.ts +0 -45
- package/declarations/orbiter/index.js +0 -37
- package/declarations/orbiter/orbiter.did.d.ts +0 -108
- package/declarations/orbiter/orbiter.factory.did.js +0 -137
- package/dist/browser/canisterStatus-B3CYYH7Z.js +0 -2
- package/dist/browser/chunk-PPPG6IG5.js +0 -28
- package/dist/declarations/cmc/cmc.did +0 -122
- package/dist/declarations/cmc/cmc.did.d.ts +0 -48
- package/dist/declarations/cmc/cmc.factory.did.js +0 -67
- package/dist/declarations/cmc/index.d.ts +0 -45
- package/dist/declarations/cmc/index.js +0 -37
- package/dist/declarations/console/console.did.d.ts +0 -71
- package/dist/declarations/console/console.factory.did.js +0 -79
- package/dist/declarations/console/console.factory.did.mjs +0 -79
- package/dist/declarations/console/index.d.ts +0 -45
- package/dist/declarations/console/index.js +0 -37
- package/dist/declarations/ic/ic.did +0 -195
- package/dist/declarations/ic/ic.did.d.ts +0 -208
- package/dist/declarations/ic/ic.factory.did.js +0 -274
- package/dist/declarations/index/index.d.ts +0 -45
- package/dist/declarations/index/index.did +0 -68
- package/dist/declarations/index/index.did.d.ts +0 -97
- package/dist/declarations/index/index.factory.did.js +0 -94
- package/dist/declarations/index/index.js +0 -37
- package/dist/declarations/mission_control/index.d.ts +0 -45
- package/dist/declarations/mission_control/index.js +0 -38
- package/dist/declarations/observatory/index.d.ts +0 -45
- package/dist/declarations/observatory/index.js +0 -38
- package/dist/declarations/observatory/observatory.did.d.ts +0 -86
- package/dist/declarations/observatory/observatory.factory.did.js +0 -95
- package/dist/declarations/observatory/observatory.factory.did.mjs +0 -95
- package/dist/declarations/orbiter/index.d.ts +0 -45
- package/dist/declarations/orbiter/index.js +0 -37
- package/dist/declarations/orbiter/orbiter.did.d.ts +0 -108
- package/dist/declarations/orbiter/orbiter.factory.did.js +0 -137
- /package/dist/browser/{canisterStatus-B3CYYH7Z.js.map → canisterStatus-S2QRROEO.js.map} +0 -0
|
@@ -14,11 +14,9 @@ export interface Controller {
|
|
|
14
14
|
updated_at: bigint;
|
|
15
15
|
metadata: Array<[string, string]>;
|
|
16
16
|
created_at: bigint;
|
|
17
|
-
scope: ControllerScope;
|
|
18
17
|
expires_at: [] | [bigint];
|
|
19
18
|
}
|
|
20
|
-
export
|
|
21
|
-
export interface CronJobStatusesConfig {
|
|
19
|
+
export interface CronJobStatusesSatelliteConfig {
|
|
22
20
|
enabled: boolean;
|
|
23
21
|
cycles_threshold: [] | [bigint];
|
|
24
22
|
}
|
|
@@ -28,12 +26,6 @@ export interface DefiniteCanisterSettings {
|
|
|
28
26
|
memory_allocation: bigint;
|
|
29
27
|
compute_allocation: bigint;
|
|
30
28
|
}
|
|
31
|
-
export interface Orbiter {
|
|
32
|
-
updated_at: bigint;
|
|
33
|
-
orbiter_id: Principal;
|
|
34
|
-
metadata: Array<[string, string]>;
|
|
35
|
-
created_at: bigint;
|
|
36
|
-
}
|
|
37
29
|
export type Result = {Ok: SegmentStatus} | {Err: string};
|
|
38
30
|
export interface Satellite {
|
|
39
31
|
updated_at: bigint;
|
|
@@ -48,19 +40,16 @@ export interface SegmentStatus {
|
|
|
48
40
|
status_at: bigint;
|
|
49
41
|
}
|
|
50
42
|
export interface SegmentsStatuses {
|
|
51
|
-
orbiters: [] | [Array<Result>];
|
|
52
43
|
satellites: [] | [Array<Result>];
|
|
53
44
|
mission_control: Result;
|
|
54
45
|
}
|
|
55
46
|
export interface SetController {
|
|
56
47
|
metadata: Array<[string, string]>;
|
|
57
|
-
scope: ControllerScope;
|
|
58
48
|
expires_at: [] | [bigint];
|
|
59
49
|
}
|
|
60
50
|
export interface StatusesArgs {
|
|
61
51
|
mission_control_cycles_threshold: [] | [bigint];
|
|
62
|
-
|
|
63
|
-
satellites: Array<[Principal, CronJobStatusesConfig]>;
|
|
52
|
+
satellites: Array<[Principal, CronJobStatusesSatelliteConfig]>;
|
|
64
53
|
cycles_threshold: [] | [bigint];
|
|
65
54
|
}
|
|
66
55
|
export interface Tokens {
|
|
@@ -69,28 +58,18 @@ export interface Tokens {
|
|
|
69
58
|
export interface _SERVICE {
|
|
70
59
|
add_mission_control_controllers: ActorMethod<[Array<Principal>], undefined>;
|
|
71
60
|
add_satellites_controllers: ActorMethod<[Array<Principal>, Array<Principal>], undefined>;
|
|
72
|
-
create_orbiter: ActorMethod<[[] | [string]], Orbiter>;
|
|
73
61
|
create_satellite: ActorMethod<[string], Satellite>;
|
|
74
62
|
del_mission_control_controllers: ActorMethod<[Array<Principal>], undefined>;
|
|
75
|
-
del_orbiters_controllers: ActorMethod<[Array<Principal>, Array<Principal>], undefined>;
|
|
76
63
|
del_satellites_controllers: ActorMethod<[Array<Principal>, Array<Principal>], undefined>;
|
|
77
64
|
get_user: ActorMethod<[], Principal>;
|
|
78
65
|
list_mission_control_controllers: ActorMethod<[], Array<[Principal, Controller]>>;
|
|
79
66
|
list_mission_control_statuses: ActorMethod<[], Array<[bigint, Result]>>;
|
|
80
|
-
list_orbiter_statuses: ActorMethod<[Principal], [] | [Array<[bigint, Result]>]>;
|
|
81
|
-
list_orbiters: ActorMethod<[], Array<[Principal, Orbiter]>>;
|
|
82
67
|
list_satellite_statuses: ActorMethod<[Principal], [] | [Array<[bigint, Result]>]>;
|
|
83
68
|
list_satellites: ActorMethod<[], Array<[Principal, Satellite]>>;
|
|
84
69
|
remove_mission_control_controllers: ActorMethod<[Array<Principal>], undefined>;
|
|
85
70
|
remove_satellites_controllers: ActorMethod<[Array<Principal>, Array<Principal>], undefined>;
|
|
86
71
|
set_metadata: ActorMethod<[Array<[string, string]>], undefined>;
|
|
87
72
|
set_mission_control_controllers: ActorMethod<[Array<Principal>, SetController], undefined>;
|
|
88
|
-
set_orbiter_metadata: ActorMethod<[Principal, Array<[string, string]>], Orbiter>;
|
|
89
|
-
set_orbiters_controllers: ActorMethod<
|
|
90
|
-
[Array<Principal>, Array<Principal>, SetController],
|
|
91
|
-
undefined
|
|
92
|
-
>;
|
|
93
|
-
set_satellite_metadata: ActorMethod<[Principal, Array<[string, string]>], Satellite>;
|
|
94
73
|
set_satellites_controllers: ActorMethod<
|
|
95
74
|
[Array<Principal>, Array<Principal>, SetController],
|
|
96
75
|
undefined
|
|
@@ -1,26 +1,15 @@
|
|
|
1
1
|
// @ts-ignore
|
|
2
2
|
export const idlFactory = ({IDL}) => {
|
|
3
|
-
const Orbiter = IDL.Record({
|
|
4
|
-
updated_at: IDL.Nat64,
|
|
5
|
-
orbiter_id: IDL.Principal,
|
|
6
|
-
metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
|
|
7
|
-
created_at: IDL.Nat64
|
|
8
|
-
});
|
|
9
3
|
const Satellite = IDL.Record({
|
|
10
4
|
updated_at: IDL.Nat64,
|
|
11
5
|
metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
|
|
12
6
|
created_at: IDL.Nat64,
|
|
13
7
|
satellite_id: IDL.Principal
|
|
14
8
|
});
|
|
15
|
-
const ControllerScope = IDL.Variant({
|
|
16
|
-
Write: IDL.Null,
|
|
17
|
-
Admin: IDL.Null
|
|
18
|
-
});
|
|
19
9
|
const Controller = IDL.Record({
|
|
20
10
|
updated_at: IDL.Nat64,
|
|
21
11
|
metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
|
|
22
12
|
created_at: IDL.Nat64,
|
|
23
|
-
scope: ControllerScope,
|
|
24
13
|
expires_at: IDL.Opt(IDL.Nat64)
|
|
25
14
|
});
|
|
26
15
|
const CanisterStatusType = IDL.Variant({
|
|
@@ -51,21 +40,18 @@ export const idlFactory = ({IDL}) => {
|
|
|
51
40
|
const Result = IDL.Variant({Ok: SegmentStatus, Err: IDL.Text});
|
|
52
41
|
const SetController = IDL.Record({
|
|
53
42
|
metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
|
|
54
|
-
scope: ControllerScope,
|
|
55
43
|
expires_at: IDL.Opt(IDL.Nat64)
|
|
56
44
|
});
|
|
57
|
-
const
|
|
45
|
+
const CronJobStatusesSatelliteConfig = IDL.Record({
|
|
58
46
|
enabled: IDL.Bool,
|
|
59
47
|
cycles_threshold: IDL.Opt(IDL.Nat64)
|
|
60
48
|
});
|
|
61
49
|
const StatusesArgs = IDL.Record({
|
|
62
50
|
mission_control_cycles_threshold: IDL.Opt(IDL.Nat64),
|
|
63
|
-
|
|
64
|
-
satellites: IDL.Vec(IDL.Tuple(IDL.Principal, CronJobStatusesConfig)),
|
|
51
|
+
satellites: IDL.Vec(IDL.Tuple(IDL.Principal, CronJobStatusesSatelliteConfig)),
|
|
65
52
|
cycles_threshold: IDL.Opt(IDL.Nat64)
|
|
66
53
|
});
|
|
67
54
|
const SegmentsStatuses = IDL.Record({
|
|
68
|
-
orbiters: IDL.Opt(IDL.Vec(Result)),
|
|
69
55
|
satellites: IDL.Opt(IDL.Vec(Result)),
|
|
70
56
|
mission_control: Result
|
|
71
57
|
});
|
|
@@ -73,10 +59,8 @@ export const idlFactory = ({IDL}) => {
|
|
|
73
59
|
return IDL.Service({
|
|
74
60
|
add_mission_control_controllers: IDL.Func([IDL.Vec(IDL.Principal)], [], []),
|
|
75
61
|
add_satellites_controllers: IDL.Func([IDL.Vec(IDL.Principal), IDL.Vec(IDL.Principal)], [], []),
|
|
76
|
-
create_orbiter: IDL.Func([IDL.Opt(IDL.Text)], [Orbiter], []),
|
|
77
62
|
create_satellite: IDL.Func([IDL.Text], [Satellite], []),
|
|
78
63
|
del_mission_control_controllers: IDL.Func([IDL.Vec(IDL.Principal)], [], []),
|
|
79
|
-
del_orbiters_controllers: IDL.Func([IDL.Vec(IDL.Principal), IDL.Vec(IDL.Principal)], [], []),
|
|
80
64
|
del_satellites_controllers: IDL.Func([IDL.Vec(IDL.Principal), IDL.Vec(IDL.Principal)], [], []),
|
|
81
65
|
get_user: IDL.Func([], [IDL.Principal], ['query']),
|
|
82
66
|
list_mission_control_controllers: IDL.Func(
|
|
@@ -85,12 +69,6 @@ export const idlFactory = ({IDL}) => {
|
|
|
85
69
|
['query']
|
|
86
70
|
),
|
|
87
71
|
list_mission_control_statuses: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Nat64, Result))], ['query']),
|
|
88
|
-
list_orbiter_statuses: IDL.Func(
|
|
89
|
-
[IDL.Principal],
|
|
90
|
-
[IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Nat64, Result)))],
|
|
91
|
-
['query']
|
|
92
|
-
),
|
|
93
|
-
list_orbiters: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Orbiter))], ['query']),
|
|
94
72
|
list_satellite_statuses: IDL.Func(
|
|
95
73
|
[IDL.Principal],
|
|
96
74
|
[IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Nat64, Result)))],
|
|
@@ -105,21 +83,6 @@ export const idlFactory = ({IDL}) => {
|
|
|
105
83
|
),
|
|
106
84
|
set_metadata: IDL.Func([IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))], [], []),
|
|
107
85
|
set_mission_control_controllers: IDL.Func([IDL.Vec(IDL.Principal), SetController], [], []),
|
|
108
|
-
set_orbiter_metadata: IDL.Func(
|
|
109
|
-
[IDL.Principal, IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))],
|
|
110
|
-
[Orbiter],
|
|
111
|
-
[]
|
|
112
|
-
),
|
|
113
|
-
set_orbiters_controllers: IDL.Func(
|
|
114
|
-
[IDL.Vec(IDL.Principal), IDL.Vec(IDL.Principal), SetController],
|
|
115
|
-
[],
|
|
116
|
-
[]
|
|
117
|
-
),
|
|
118
|
-
set_satellite_metadata: IDL.Func(
|
|
119
|
-
[IDL.Principal, IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))],
|
|
120
|
-
[Satellite],
|
|
121
|
-
[]
|
|
122
|
-
),
|
|
123
86
|
set_satellites_controllers: IDL.Func(
|
|
124
87
|
[IDL.Vec(IDL.Principal), IDL.Vec(IDL.Principal), SetController],
|
|
125
88
|
[],
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import type {ActorMethod} from '@dfinity/agent';
|
|
2
|
+
import type {Principal} from '@dfinity/principal';
|
|
3
|
+
|
|
4
|
+
export interface AssetEncodingNoContent {
|
|
5
|
+
modified: bigint;
|
|
6
|
+
sha256: Uint8Array | number[];
|
|
7
|
+
total_length: bigint;
|
|
8
|
+
}
|
|
9
|
+
export interface AssetKey {
|
|
10
|
+
token: [] | [string];
|
|
11
|
+
collection: string;
|
|
12
|
+
owner: Principal;
|
|
13
|
+
name: string;
|
|
14
|
+
full_path: string;
|
|
15
|
+
}
|
|
16
|
+
export interface AssetNoContent {
|
|
17
|
+
key: AssetKey;
|
|
18
|
+
updated_at: bigint;
|
|
19
|
+
encodings: Array<[string, AssetEncodingNoContent]>;
|
|
20
|
+
headers: Array<[string, string]>;
|
|
21
|
+
created_at: bigint;
|
|
22
|
+
}
|
|
23
|
+
export interface Chunk {
|
|
24
|
+
content: Uint8Array | number[];
|
|
25
|
+
batch_id: bigint;
|
|
26
|
+
}
|
|
27
|
+
export interface CommitBatch {
|
|
28
|
+
batch_id: bigint;
|
|
29
|
+
headers: Array<[string, string]>;
|
|
30
|
+
chunk_ids: Array<bigint>;
|
|
31
|
+
}
|
|
32
|
+
export interface Config {
|
|
33
|
+
storage: StorageConfig;
|
|
34
|
+
}
|
|
35
|
+
export interface Controller {
|
|
36
|
+
updated_at: bigint;
|
|
37
|
+
metadata: Array<[string, string]>;
|
|
38
|
+
created_at: bigint;
|
|
39
|
+
expires_at: [] | [bigint];
|
|
40
|
+
}
|
|
41
|
+
export interface CustomDomain {
|
|
42
|
+
updated_at: bigint;
|
|
43
|
+
created_at: bigint;
|
|
44
|
+
bn_id: [] | [string];
|
|
45
|
+
}
|
|
46
|
+
export interface DelDoc {
|
|
47
|
+
updated_at: [] | [bigint];
|
|
48
|
+
}
|
|
49
|
+
export interface DeleteControllersArgs {
|
|
50
|
+
controllers: Array<Principal>;
|
|
51
|
+
}
|
|
52
|
+
export interface Doc {
|
|
53
|
+
updated_at: bigint;
|
|
54
|
+
owner: Principal;
|
|
55
|
+
data: Uint8Array | number[];
|
|
56
|
+
created_at: bigint;
|
|
57
|
+
}
|
|
58
|
+
export interface HttpRequest {
|
|
59
|
+
url: string;
|
|
60
|
+
method: string;
|
|
61
|
+
body: Uint8Array | number[];
|
|
62
|
+
headers: Array<[string, string]>;
|
|
63
|
+
}
|
|
64
|
+
export interface HttpResponse {
|
|
65
|
+
body: Uint8Array | number[];
|
|
66
|
+
headers: Array<[string, string]>;
|
|
67
|
+
streaming_strategy: [] | [StreamingStrategy];
|
|
68
|
+
status_code: number;
|
|
69
|
+
}
|
|
70
|
+
export interface InitAssetKey {
|
|
71
|
+
token: [] | [string];
|
|
72
|
+
collection: string;
|
|
73
|
+
name: string;
|
|
74
|
+
encoding_type: [] | [string];
|
|
75
|
+
full_path: string;
|
|
76
|
+
}
|
|
77
|
+
export interface InitUploadResult {
|
|
78
|
+
batch_id: bigint;
|
|
79
|
+
}
|
|
80
|
+
export interface ListOrder {
|
|
81
|
+
field: ListOrderField;
|
|
82
|
+
desc: boolean;
|
|
83
|
+
}
|
|
84
|
+
export type ListOrderField = {UpdatedAt: null} | {Keys: null} | {CreatedAt: null};
|
|
85
|
+
export interface ListPaginate {
|
|
86
|
+
start_after: [] | [string];
|
|
87
|
+
limit: [] | [bigint];
|
|
88
|
+
}
|
|
89
|
+
export interface ListParams {
|
|
90
|
+
order: [] | [ListOrder];
|
|
91
|
+
owner: [] | [Principal];
|
|
92
|
+
matcher: [] | [string];
|
|
93
|
+
paginate: [] | [ListPaginate];
|
|
94
|
+
}
|
|
95
|
+
export interface ListResults {
|
|
96
|
+
matches_length: bigint;
|
|
97
|
+
length: bigint;
|
|
98
|
+
items: Array<[string, AssetNoContent]>;
|
|
99
|
+
}
|
|
100
|
+
export interface ListResults_1 {
|
|
101
|
+
matches_length: bigint;
|
|
102
|
+
length: bigint;
|
|
103
|
+
items: Array<[string, Doc]>;
|
|
104
|
+
}
|
|
105
|
+
export type Permission = {Controllers: null} | {Private: null} | {Public: null} | {Managed: null};
|
|
106
|
+
export interface Rule {
|
|
107
|
+
updated_at: bigint;
|
|
108
|
+
max_size: [] | [bigint];
|
|
109
|
+
read: Permission;
|
|
110
|
+
created_at: bigint;
|
|
111
|
+
write: Permission;
|
|
112
|
+
}
|
|
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
|
+
}
|
|
122
|
+
export interface SetDoc {
|
|
123
|
+
updated_at: [] | [bigint];
|
|
124
|
+
data: Uint8Array | number[];
|
|
125
|
+
}
|
|
126
|
+
export interface SetRule {
|
|
127
|
+
updated_at: [] | [bigint];
|
|
128
|
+
max_size: [] | [bigint];
|
|
129
|
+
read: Permission;
|
|
130
|
+
write: Permission;
|
|
131
|
+
}
|
|
132
|
+
export interface StorageConfig {
|
|
133
|
+
headers: Array<[string, Array<[string, string]>]>;
|
|
134
|
+
}
|
|
135
|
+
export interface StreamingCallbackHttpResponse {
|
|
136
|
+
token: [] | [StreamingCallbackToken];
|
|
137
|
+
body: Uint8Array | number[];
|
|
138
|
+
}
|
|
139
|
+
export interface StreamingCallbackToken {
|
|
140
|
+
token: [] | [string];
|
|
141
|
+
sha256: [] | [Uint8Array | number[]];
|
|
142
|
+
headers: Array<[string, string]>;
|
|
143
|
+
index: bigint;
|
|
144
|
+
encoding_type: string;
|
|
145
|
+
full_path: string;
|
|
146
|
+
}
|
|
147
|
+
export type StreamingStrategy = {
|
|
148
|
+
Callback: {
|
|
149
|
+
token: StreamingCallbackToken;
|
|
150
|
+
callback: [Principal, string];
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
export interface UploadChunk {
|
|
154
|
+
chunk_id: bigint;
|
|
155
|
+
}
|
|
156
|
+
export interface _SERVICE {
|
|
157
|
+
commit_asset_upload: ActorMethod<[CommitBatch], undefined>;
|
|
158
|
+
del_asset: ActorMethod<[string, string], undefined>;
|
|
159
|
+
del_assets: ActorMethod<[[] | [string]], undefined>;
|
|
160
|
+
del_controllers: ActorMethod<[DeleteControllersArgs], Array<[Principal, Controller]>>;
|
|
161
|
+
del_custom_domain: ActorMethod<[string], undefined>;
|
|
162
|
+
del_doc: ActorMethod<[string, string, DelDoc], undefined>;
|
|
163
|
+
get_config: ActorMethod<[], Config>;
|
|
164
|
+
get_doc: ActorMethod<[string, string], [] | [Doc]>;
|
|
165
|
+
http_request: ActorMethod<[HttpRequest], HttpResponse>;
|
|
166
|
+
http_request_streaming_callback: ActorMethod<
|
|
167
|
+
[StreamingCallbackToken],
|
|
168
|
+
StreamingCallbackHttpResponse
|
|
169
|
+
>;
|
|
170
|
+
init_asset_upload: ActorMethod<[InitAssetKey], InitUploadResult>;
|
|
171
|
+
list_assets: ActorMethod<[[] | [string], ListParams], ListResults>;
|
|
172
|
+
list_controllers: ActorMethod<[], Array<[Principal, Controller]>>;
|
|
173
|
+
list_custom_domains: ActorMethod<[], Array<[string, CustomDomain]>>;
|
|
174
|
+
list_docs: ActorMethod<[string, ListParams], ListResults_1>;
|
|
175
|
+
list_rules: ActorMethod<[RulesType], Array<[string, Rule]>>;
|
|
176
|
+
set_config: ActorMethod<[Config], undefined>;
|
|
177
|
+
set_controllers: ActorMethod<[SetControllersArgs], Array<[Principal, Controller]>>;
|
|
178
|
+
set_custom_domain: ActorMethod<[string, [] | [string]], undefined>;
|
|
179
|
+
set_doc: ActorMethod<[string, string, SetDoc], Doc>;
|
|
180
|
+
set_rule: ActorMethod<[RulesType, string, SetRule], undefined>;
|
|
181
|
+
upload_asset_chunk: ActorMethod<[Chunk], UploadChunk>;
|
|
182
|
+
version: ActorMethod<[], string>;
|
|
183
|
+
}
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
// @ts-ignore
|
|
2
|
+
export const idlFactory = ({IDL}) => {
|
|
3
|
+
const CommitBatch = IDL.Record({
|
|
4
|
+
batch_id: IDL.Nat,
|
|
5
|
+
headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
|
|
6
|
+
chunk_ids: IDL.Vec(IDL.Nat)
|
|
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
|
+
});
|
|
17
|
+
const DelDoc = IDL.Record({updated_at: IDL.Opt(IDL.Nat64)});
|
|
18
|
+
const StorageConfig = IDL.Record({
|
|
19
|
+
headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))))
|
|
20
|
+
});
|
|
21
|
+
const Config = IDL.Record({storage: StorageConfig});
|
|
22
|
+
const Doc = IDL.Record({
|
|
23
|
+
updated_at: IDL.Nat64,
|
|
24
|
+
owner: IDL.Principal,
|
|
25
|
+
data: IDL.Vec(IDL.Nat8),
|
|
26
|
+
created_at: IDL.Nat64
|
|
27
|
+
});
|
|
28
|
+
const HttpRequest = IDL.Record({
|
|
29
|
+
url: IDL.Text,
|
|
30
|
+
method: IDL.Text,
|
|
31
|
+
body: IDL.Vec(IDL.Nat8),
|
|
32
|
+
headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))
|
|
33
|
+
});
|
|
34
|
+
const StreamingCallbackToken = IDL.Record({
|
|
35
|
+
token: IDL.Opt(IDL.Text),
|
|
36
|
+
sha256: IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
37
|
+
headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
|
|
38
|
+
index: IDL.Nat64,
|
|
39
|
+
encoding_type: IDL.Text,
|
|
40
|
+
full_path: IDL.Text
|
|
41
|
+
});
|
|
42
|
+
const StreamingStrategy = IDL.Variant({
|
|
43
|
+
Callback: IDL.Record({
|
|
44
|
+
token: StreamingCallbackToken,
|
|
45
|
+
callback: IDL.Func([], [], [])
|
|
46
|
+
})
|
|
47
|
+
});
|
|
48
|
+
const HttpResponse = IDL.Record({
|
|
49
|
+
body: IDL.Vec(IDL.Nat8),
|
|
50
|
+
headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
|
|
51
|
+
streaming_strategy: IDL.Opt(StreamingStrategy),
|
|
52
|
+
status_code: IDL.Nat16
|
|
53
|
+
});
|
|
54
|
+
const StreamingCallbackHttpResponse = IDL.Record({
|
|
55
|
+
token: IDL.Opt(StreamingCallbackToken),
|
|
56
|
+
body: IDL.Vec(IDL.Nat8)
|
|
57
|
+
});
|
|
58
|
+
const InitAssetKey = IDL.Record({
|
|
59
|
+
token: IDL.Opt(IDL.Text),
|
|
60
|
+
collection: IDL.Text,
|
|
61
|
+
name: IDL.Text,
|
|
62
|
+
encoding_type: IDL.Opt(IDL.Text),
|
|
63
|
+
full_path: IDL.Text
|
|
64
|
+
});
|
|
65
|
+
const InitUploadResult = IDL.Record({batch_id: IDL.Nat});
|
|
66
|
+
const ListOrderField = IDL.Variant({
|
|
67
|
+
UpdatedAt: IDL.Null,
|
|
68
|
+
Keys: IDL.Null,
|
|
69
|
+
CreatedAt: IDL.Null
|
|
70
|
+
});
|
|
71
|
+
const ListOrder = IDL.Record({field: ListOrderField, desc: IDL.Bool});
|
|
72
|
+
const ListPaginate = IDL.Record({
|
|
73
|
+
start_after: IDL.Opt(IDL.Text),
|
|
74
|
+
limit: IDL.Opt(IDL.Nat64)
|
|
75
|
+
});
|
|
76
|
+
const ListParams = IDL.Record({
|
|
77
|
+
order: IDL.Opt(ListOrder),
|
|
78
|
+
owner: IDL.Opt(IDL.Principal),
|
|
79
|
+
matcher: IDL.Opt(IDL.Text),
|
|
80
|
+
paginate: IDL.Opt(ListPaginate)
|
|
81
|
+
});
|
|
82
|
+
const AssetKey = IDL.Record({
|
|
83
|
+
token: IDL.Opt(IDL.Text),
|
|
84
|
+
collection: IDL.Text,
|
|
85
|
+
owner: IDL.Principal,
|
|
86
|
+
name: IDL.Text,
|
|
87
|
+
full_path: IDL.Text
|
|
88
|
+
});
|
|
89
|
+
const AssetEncodingNoContent = IDL.Record({
|
|
90
|
+
modified: IDL.Nat64,
|
|
91
|
+
sha256: IDL.Vec(IDL.Nat8),
|
|
92
|
+
total_length: IDL.Nat
|
|
93
|
+
});
|
|
94
|
+
const AssetNoContent = IDL.Record({
|
|
95
|
+
key: AssetKey,
|
|
96
|
+
updated_at: IDL.Nat64,
|
|
97
|
+
encodings: IDL.Vec(IDL.Tuple(IDL.Text, AssetEncodingNoContent)),
|
|
98
|
+
headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
|
|
99
|
+
created_at: IDL.Nat64
|
|
100
|
+
});
|
|
101
|
+
const ListResults = IDL.Record({
|
|
102
|
+
matches_length: IDL.Nat64,
|
|
103
|
+
length: IDL.Nat64,
|
|
104
|
+
items: IDL.Vec(IDL.Tuple(IDL.Text, AssetNoContent))
|
|
105
|
+
});
|
|
106
|
+
const CustomDomain = IDL.Record({
|
|
107
|
+
updated_at: IDL.Nat64,
|
|
108
|
+
created_at: IDL.Nat64,
|
|
109
|
+
bn_id: IDL.Opt(IDL.Text)
|
|
110
|
+
});
|
|
111
|
+
const ListResults_1 = IDL.Record({
|
|
112
|
+
matches_length: IDL.Nat64,
|
|
113
|
+
length: IDL.Nat64,
|
|
114
|
+
items: IDL.Vec(IDL.Tuple(IDL.Text, Doc))
|
|
115
|
+
});
|
|
116
|
+
const RulesType = IDL.Variant({Db: IDL.Null, Storage: IDL.Null});
|
|
117
|
+
const Permission = IDL.Variant({
|
|
118
|
+
Controllers: IDL.Null,
|
|
119
|
+
Private: IDL.Null,
|
|
120
|
+
Public: IDL.Null,
|
|
121
|
+
Managed: IDL.Null
|
|
122
|
+
});
|
|
123
|
+
const Rule = IDL.Record({
|
|
124
|
+
updated_at: IDL.Nat64,
|
|
125
|
+
max_size: IDL.Opt(IDL.Nat),
|
|
126
|
+
read: Permission,
|
|
127
|
+
created_at: IDL.Nat64,
|
|
128
|
+
write: Permission
|
|
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
|
+
});
|
|
138
|
+
const SetDoc = IDL.Record({
|
|
139
|
+
updated_at: IDL.Opt(IDL.Nat64),
|
|
140
|
+
data: IDL.Vec(IDL.Nat8)
|
|
141
|
+
});
|
|
142
|
+
const SetRule = IDL.Record({
|
|
143
|
+
updated_at: IDL.Opt(IDL.Nat64),
|
|
144
|
+
max_size: IDL.Opt(IDL.Nat),
|
|
145
|
+
read: Permission,
|
|
146
|
+
write: Permission
|
|
147
|
+
});
|
|
148
|
+
const Chunk = IDL.Record({
|
|
149
|
+
content: IDL.Vec(IDL.Nat8),
|
|
150
|
+
batch_id: IDL.Nat
|
|
151
|
+
});
|
|
152
|
+
const UploadChunk = IDL.Record({chunk_id: IDL.Nat});
|
|
153
|
+
return IDL.Service({
|
|
154
|
+
commit_asset_upload: IDL.Func([CommitBatch], [], []),
|
|
155
|
+
del_asset: IDL.Func([IDL.Text, IDL.Text], [], []),
|
|
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
|
+
),
|
|
162
|
+
del_custom_domain: IDL.Func([IDL.Text], [], []),
|
|
163
|
+
del_doc: IDL.Func([IDL.Text, IDL.Text, DelDoc], [], []),
|
|
164
|
+
get_config: IDL.Func([], [Config], []),
|
|
165
|
+
get_doc: IDL.Func([IDL.Text, IDL.Text], [IDL.Opt(Doc)], ['query']),
|
|
166
|
+
http_request: IDL.Func([HttpRequest], [HttpResponse], ['query']),
|
|
167
|
+
http_request_streaming_callback: IDL.Func(
|
|
168
|
+
[StreamingCallbackToken],
|
|
169
|
+
[StreamingCallbackHttpResponse],
|
|
170
|
+
['query']
|
|
171
|
+
),
|
|
172
|
+
init_asset_upload: IDL.Func([InitAssetKey], [InitUploadResult], []),
|
|
173
|
+
list_assets: IDL.Func([IDL.Opt(IDL.Text), ListParams], [ListResults], ['query']),
|
|
174
|
+
list_controllers: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))], ['query']),
|
|
175
|
+
list_custom_domains: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Text, CustomDomain))], ['query']),
|
|
176
|
+
list_docs: IDL.Func([IDL.Text, ListParams], [ListResults_1], ['query']),
|
|
177
|
+
list_rules: IDL.Func([RulesType], [IDL.Vec(IDL.Tuple(IDL.Text, Rule))], ['query']),
|
|
178
|
+
set_config: IDL.Func([Config], [], []),
|
|
179
|
+
set_controllers: IDL.Func(
|
|
180
|
+
[SetControllersArgs],
|
|
181
|
+
[IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
|
|
182
|
+
[]
|
|
183
|
+
),
|
|
184
|
+
set_custom_domain: IDL.Func([IDL.Text, IDL.Opt(IDL.Text)], [], []),
|
|
185
|
+
set_doc: IDL.Func([IDL.Text, IDL.Text, SetDoc], [Doc], []),
|
|
186
|
+
set_rule: IDL.Func([RulesType, IDL.Text, SetRule], [], []),
|
|
187
|
+
upload_asset_chunk: IDL.Func([Chunk], [UploadChunk], []),
|
|
188
|
+
version: IDL.Func([], [IDL.Text], ['query'])
|
|
189
|
+
});
|
|
190
|
+
};
|
|
191
|
+
// @ts-ignore
|
|
192
|
+
export const init = ({IDL}) => {
|
|
193
|
+
return [];
|
|
194
|
+
};
|