@junobuild/admin 0.0.6 → 0.0.8

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.
Files changed (45) hide show
  1. package/dist/browser/index.js +16 -16
  2. package/dist/browser/index.js.map +4 -4
  3. package/dist/declarations/cmc/cmc.did.d.ts +30 -30
  4. package/dist/declarations/cmc/cmc.factory.did.js +63 -63
  5. package/dist/declarations/cmc/index.d.ts +18 -18
  6. package/dist/declarations/cmc/index.js +22 -22
  7. package/dist/declarations/console/console.did.d.ts +45 -32
  8. package/dist/declarations/console/console.factory.did.js +60 -47
  9. package/dist/declarations/console/console.factory.did.mjs +60 -47
  10. package/dist/declarations/console/index.d.ts +18 -18
  11. package/dist/declarations/console/index.js +22 -22
  12. package/dist/declarations/frontend/frontend.did.d.ts +136 -136
  13. package/dist/declarations/frontend/frontend.factory.did.js +206 -206
  14. package/dist/declarations/frontend/index.d.ts +18 -18
  15. package/dist/declarations/frontend/index.js +22 -22
  16. package/dist/declarations/ic/ic.did.d.ts +63 -63
  17. package/dist/declarations/ic/ic.factory.did.js +126 -126
  18. package/dist/declarations/internet_identity/index.d.ts +18 -18
  19. package/dist/declarations/internet_identity/index.js +22 -22
  20. package/dist/declarations/internet_identity/internet_identity.did +79 -20
  21. package/dist/declarations/internet_identity/internet_identity.did.d.ts +152 -109
  22. package/dist/declarations/internet_identity/internet_identity.factory.did.js +231 -185
  23. package/dist/declarations/ledger/index.d.ts +18 -18
  24. package/dist/declarations/ledger/index.js +22 -22
  25. package/dist/declarations/ledger/ledger.did.d.ts +64 -64
  26. package/dist/declarations/ledger/ledger.factory.did.js +96 -96
  27. package/dist/declarations/mission_control/index.d.ts +18 -18
  28. package/dist/declarations/mission_control/index.js +22 -22
  29. package/dist/declarations/mission_control/mission_control.did.d.ts +34 -17
  30. package/dist/declarations/mission_control/mission_control.factory.did.js +48 -26
  31. package/dist/declarations/satellite/index.d.ts +18 -18
  32. package/dist/declarations/satellite/index.js +22 -22
  33. package/dist/declarations/satellite/satellite-deprecated.did.d.ts +186 -0
  34. package/dist/declarations/satellite/satellite-deprecated.factory.did.js +191 -0
  35. package/dist/declarations/satellite/satellite-deprecated.factory.did.mjs +191 -0
  36. package/dist/declarations/satellite/satellite.did.d.ts +131 -113
  37. package/dist/declarations/satellite/satellite.factory.did.js +189 -167
  38. package/dist/declarations/satellite/satellite.factory.did.mjs +189 -167
  39. package/dist/node/index.mjs +23 -23
  40. package/dist/node/index.mjs.map +4 -4
  41. package/dist/types/api/actor.api.d.ts +2 -0
  42. package/dist/types/api/mission-control.api.d.ts +2 -1
  43. package/dist/types/api/satellite.api.d.ts +5 -2
  44. package/dist/types/services/satellite.services.d.ts +2 -1
  45. package/package.json +1 -1
@@ -1,168 +1,186 @@
1
- import type {ActorMethod} from '@dfinity/agent';
2
- import type {Principal} from '@dfinity/principal';
1
+ import type { ActorMethod } from '@dfinity/agent';
2
+ import type { Principal } from '@dfinity/principal';
3
3
 
4
4
  export interface AssetEncodingNoContent {
5
- modified: bigint;
6
- sha256: Uint8Array | number[];
7
- total_length: bigint;
5
+ modified: bigint;
6
+ sha256: Uint8Array | number[];
7
+ total_length: bigint;
8
8
  }
9
9
  export interface AssetKey {
10
- token: [] | [string];
11
- collection: string;
12
- owner: Principal;
13
- name: string;
14
- full_path: string;
10
+ token: [] | [string];
11
+ collection: string;
12
+ owner: Principal;
13
+ name: string;
14
+ full_path: string;
15
15
  }
16
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;
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
- content: Uint8Array | number[];
25
- batch_id: bigint;
24
+ content: Uint8Array | number[];
25
+ batch_id: bigint;
26
26
  }
27
27
  export interface CommitBatch {
28
- batch_id: bigint;
29
- headers: Array<[string, string]>;
30
- chunk_ids: Array<bigint>;
28
+ batch_id: bigint;
29
+ headers: Array<[string, string]>;
30
+ chunk_ids: Array<bigint>;
31
31
  }
32
32
  export interface Config {
33
- storage: StorageConfig;
33
+ storage: StorageConfig;
34
34
  }
35
- export interface ControllersArgs {
36
- controllers: Array<Principal>;
35
+ export interface Controller {
36
+ updated_at: bigint;
37
+ metadata: Array<[string, string]>;
38
+ created_at: bigint;
39
+ expires_at: [] | [bigint];
37
40
  }
38
41
  export interface CustomDomain {
39
- updated_at: bigint;
40
- created_at: bigint;
41
- bn_id: [] | [string];
42
+ updated_at: bigint;
43
+ created_at: bigint;
44
+ bn_id: [] | [string];
42
45
  }
43
46
  export interface DelDoc {
44
- updated_at: [] | [bigint];
47
+ updated_at: [] | [bigint];
48
+ }
49
+ export interface DeleteControllersArgs {
50
+ controllers: Array<Principal>;
45
51
  }
46
52
  export interface Doc {
47
- updated_at: bigint;
48
- owner: Principal;
49
- data: Uint8Array | number[];
50
- created_at: bigint;
53
+ updated_at: bigint;
54
+ owner: Principal;
55
+ data: Uint8Array | number[];
56
+ created_at: bigint;
51
57
  }
52
58
  export interface HttpRequest {
53
- url: string;
54
- method: string;
55
- body: Uint8Array | number[];
56
- headers: Array<[string, string]>;
59
+ url: string;
60
+ method: string;
61
+ body: Uint8Array | number[];
62
+ headers: Array<[string, string]>;
57
63
  }
58
64
  export interface HttpResponse {
59
- body: Uint8Array | number[];
60
- headers: Array<[string, string]>;
61
- streaming_strategy: [] | [StreamingStrategy];
62
- status_code: number;
65
+ body: Uint8Array | number[];
66
+ headers: Array<[string, string]>;
67
+ streaming_strategy: [] | [StreamingStrategy];
68
+ status_code: number;
63
69
  }
64
70
  export interface InitAssetKey {
65
- token: [] | [string];
66
- collection: string;
67
- name: string;
68
- encoding_type: [] | [string];
69
- full_path: string;
71
+ token: [] | [string];
72
+ collection: string;
73
+ name: string;
74
+ encoding_type: [] | [string];
75
+ full_path: string;
70
76
  }
71
77
  export interface InitUploadResult {
72
- batch_id: bigint;
78
+ batch_id: bigint;
73
79
  }
74
80
  export interface ListOrder {
75
- field: ListOrderField;
76
- desc: boolean;
81
+ field: ListOrderField;
82
+ desc: boolean;
77
83
  }
78
- export type ListOrderField = {UpdatedAt: null} | {Keys: null} | {CreatedAt: null};
84
+ export type ListOrderField = { UpdatedAt: null } | { Keys: null } | { CreatedAt: null };
79
85
  export interface ListPaginate {
80
- start_after: [] | [string];
81
- limit: [] | [bigint];
86
+ start_after: [] | [string];
87
+ limit: [] | [bigint];
82
88
  }
83
89
  export interface ListParams {
84
- order: [] | [ListOrder];
85
- matcher: [] | [string];
86
- paginate: [] | [ListPaginate];
90
+ order: [] | [ListOrder];
91
+ matcher: [] | [string];
92
+ paginate: [] | [ListPaginate];
87
93
  }
88
94
  export interface ListResults {
89
- matches_length: bigint;
90
- length: bigint;
91
- items: Array<[string, AssetNoContent]>;
95
+ matches_length: bigint;
96
+ length: bigint;
97
+ items: Array<[string, AssetNoContent]>;
92
98
  }
93
99
  export interface ListResults_1 {
94
- matches_length: bigint;
95
- length: bigint;
96
- items: Array<[string, Doc]>;
97
- }
98
- export type Permission = {Controllers: null} | {Private: null} | {Public: null} | {Managed: null};
100
+ matches_length: bigint;
101
+ length: bigint;
102
+ items: Array<[string, Doc]>;
103
+ }
104
+ export type Permission =
105
+ | { Controllers: null }
106
+ | { Private: null }
107
+ | { Public: null }
108
+ | { Managed: null };
99
109
  export interface Rule {
100
- updated_at: bigint;
101
- max_size: [] | [bigint];
102
- read: Permission;
103
- created_at: bigint;
104
- write: Permission;
110
+ updated_at: bigint;
111
+ max_size: [] | [bigint];
112
+ read: Permission;
113
+ created_at: bigint;
114
+ write: Permission;
115
+ }
116
+ export type RulesType = { Db: null } | { Storage: null };
117
+ export interface SetController {
118
+ metadata: Array<[string, string]>;
119
+ expires_at: [] | [bigint];
120
+ }
121
+ export interface SetControllersArgs {
122
+ controller: SetController;
123
+ controllers: Array<Principal>;
105
124
  }
106
- export type RulesType = {Db: null} | {Storage: null};
107
125
  export interface SetDoc {
108
- updated_at: [] | [bigint];
109
- data: Uint8Array | number[];
126
+ updated_at: [] | [bigint];
127
+ data: Uint8Array | number[];
110
128
  }
111
129
  export interface SetRule {
112
- updated_at: [] | [bigint];
113
- max_size: [] | [bigint];
114
- read: Permission;
115
- write: Permission;
130
+ updated_at: [] | [bigint];
131
+ max_size: [] | [bigint];
132
+ read: Permission;
133
+ write: Permission;
116
134
  }
117
135
  export interface StorageConfig {
118
- headers: Array<[string, Array<[string, string]>]>;
136
+ headers: Array<[string, Array<[string, string]>]>;
119
137
  }
120
138
  export interface StreamingCallbackHttpResponse {
121
- token: [] | [StreamingCallbackToken];
122
- body: Uint8Array | number[];
139
+ token: [] | [StreamingCallbackToken];
140
+ body: Uint8Array | number[];
123
141
  }
124
142
  export interface StreamingCallbackToken {
125
- token: [] | [string];
126
- sha256: [] | [Uint8Array | number[]];
127
- headers: Array<[string, string]>;
128
- index: bigint;
129
- encoding_type: string;
130
- full_path: string;
143
+ token: [] | [string];
144
+ sha256: [] | [Uint8Array | number[]];
145
+ headers: Array<[string, string]>;
146
+ index: bigint;
147
+ encoding_type: string;
148
+ full_path: string;
131
149
  }
132
150
  export type StreamingStrategy = {
133
- Callback: {
134
- token: StreamingCallbackToken;
135
- callback: [Principal, string];
136
- };
151
+ Callback: {
152
+ token: StreamingCallbackToken;
153
+ callback: [Principal, string];
154
+ };
137
155
  };
138
156
  export interface UploadChunk {
139
- chunk_id: bigint;
157
+ chunk_id: bigint;
140
158
  }
141
159
  export interface _SERVICE {
142
- add_controllers: ActorMethod<[ControllersArgs], Array<Principal>>;
143
- commit_asset_upload: ActorMethod<[CommitBatch], undefined>;
144
- del_asset: ActorMethod<[string, string], undefined>;
145
- del_assets: ActorMethod<[[] | [string]], undefined>;
146
- del_custom_domain: ActorMethod<[string], undefined>;
147
- del_doc: ActorMethod<[string, string, DelDoc], undefined>;
148
- get_config: ActorMethod<[], Config>;
149
- get_doc: ActorMethod<[string, string], [] | [Doc]>;
150
- http_request: ActorMethod<[HttpRequest], HttpResponse>;
151
- http_request_streaming_callback: ActorMethod<
152
- [StreamingCallbackToken],
153
- StreamingCallbackHttpResponse
154
- >;
155
- init_asset_upload: ActorMethod<[InitAssetKey], InitUploadResult>;
156
- list_assets: ActorMethod<[[] | [string], ListParams], ListResults>;
157
- list_controllers: ActorMethod<[], Array<Principal>>;
158
- list_custom_domains: ActorMethod<[], Array<[string, CustomDomain]>>;
159
- list_docs: ActorMethod<[string, ListParams], ListResults_1>;
160
- list_rules: ActorMethod<[RulesType], Array<[string, Rule]>>;
161
- remove_controllers: ActorMethod<[ControllersArgs], Array<Principal>>;
162
- set_config: ActorMethod<[Config], undefined>;
163
- set_custom_domain: ActorMethod<[string, [] | [string]], undefined>;
164
- set_doc: ActorMethod<[string, string, SetDoc], Doc>;
165
- set_rule: ActorMethod<[RulesType, string, SetRule], undefined>;
166
- upload_asset_chunk: ActorMethod<[Chunk], UploadChunk>;
167
- version: ActorMethod<[], string>;
160
+ commit_asset_upload: ActorMethod<[CommitBatch], undefined>;
161
+ del_asset: ActorMethod<[string, string], undefined>;
162
+ del_assets: ActorMethod<[[] | [string]], undefined>;
163
+ del_controllers: ActorMethod<[DeleteControllersArgs], Array<[Principal, Controller]>>;
164
+ del_custom_domain: ActorMethod<[string], undefined>;
165
+ del_doc: ActorMethod<[string, string, DelDoc], undefined>;
166
+ get_config: ActorMethod<[], Config>;
167
+ get_doc: ActorMethod<[string, string], [] | [Doc]>;
168
+ http_request: ActorMethod<[HttpRequest], HttpResponse>;
169
+ http_request_streaming_callback: ActorMethod<
170
+ [StreamingCallbackToken],
171
+ StreamingCallbackHttpResponse
172
+ >;
173
+ init_asset_upload: ActorMethod<[InitAssetKey], InitUploadResult>;
174
+ list_assets: ActorMethod<[[] | [string], ListParams], ListResults>;
175
+ list_controllers: ActorMethod<[], Array<[Principal, Controller]>>;
176
+ list_custom_domains: ActorMethod<[], Array<[string, CustomDomain]>>;
177
+ list_docs: ActorMethod<[string, ListParams], ListResults_1>;
178
+ list_rules: ActorMethod<[RulesType], Array<[string, Rule]>>;
179
+ set_config: ActorMethod<[Config], undefined>;
180
+ set_controllers: ActorMethod<[SetControllersArgs], Array<[Principal, Controller]>>;
181
+ set_custom_domain: ActorMethod<[string, [] | [string]], undefined>;
182
+ set_doc: ActorMethod<[string, string, SetDoc], Doc>;
183
+ set_rule: ActorMethod<[RulesType, string, SetRule], undefined>;
184
+ upload_asset_chunk: ActorMethod<[Chunk], UploadChunk>;
185
+ version: ActorMethod<[], string>;
168
186
  }
@@ -1,169 +1,191 @@
1
- export const idlFactory = ({IDL}) => {
2
- const ControllersArgs = IDL.Record({
3
- controllers: IDL.Vec(IDL.Principal)
4
- });
5
- const CommitBatch = IDL.Record({
6
- batch_id: IDL.Nat,
7
- headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
8
- chunk_ids: IDL.Vec(IDL.Nat)
9
- });
10
- const DelDoc = IDL.Record({updated_at: IDL.Opt(IDL.Nat64)});
11
- const StorageConfig = IDL.Record({
12
- headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))))
13
- });
14
- const Config = IDL.Record({storage: StorageConfig});
15
- const Doc = IDL.Record({
16
- updated_at: IDL.Nat64,
17
- owner: IDL.Principal,
18
- data: IDL.Vec(IDL.Nat8),
19
- created_at: IDL.Nat64
20
- });
21
- const HttpRequest = IDL.Record({
22
- url: IDL.Text,
23
- method: IDL.Text,
24
- body: IDL.Vec(IDL.Nat8),
25
- headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))
26
- });
27
- const StreamingCallbackToken = IDL.Record({
28
- token: IDL.Opt(IDL.Text),
29
- sha256: IDL.Opt(IDL.Vec(IDL.Nat8)),
30
- headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
31
- index: IDL.Nat64,
32
- encoding_type: IDL.Text,
33
- full_path: IDL.Text
34
- });
35
- const StreamingStrategy = IDL.Variant({
36
- Callback: IDL.Record({
37
- token: StreamingCallbackToken,
38
- callback: IDL.Func([], [], [])
39
- })
40
- });
41
- const HttpResponse = IDL.Record({
42
- body: IDL.Vec(IDL.Nat8),
43
- headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
44
- streaming_strategy: IDL.Opt(StreamingStrategy),
45
- status_code: IDL.Nat16
46
- });
47
- const StreamingCallbackHttpResponse = IDL.Record({
48
- token: IDL.Opt(StreamingCallbackToken),
49
- body: IDL.Vec(IDL.Nat8)
50
- });
51
- const InitAssetKey = IDL.Record({
52
- token: IDL.Opt(IDL.Text),
53
- collection: IDL.Text,
54
- name: IDL.Text,
55
- encoding_type: IDL.Opt(IDL.Text),
56
- full_path: IDL.Text
57
- });
58
- const InitUploadResult = IDL.Record({batch_id: IDL.Nat});
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({
66
- start_after: IDL.Opt(IDL.Text),
67
- limit: IDL.Opt(IDL.Nat64)
68
- });
69
- const ListParams = IDL.Record({
70
- order: IDL.Opt(ListOrder),
71
- matcher: IDL.Opt(IDL.Text),
72
- paginate: IDL.Opt(ListPaginate)
73
- });
74
- const AssetKey = IDL.Record({
75
- token: IDL.Opt(IDL.Text),
76
- collection: IDL.Text,
77
- owner: IDL.Principal,
78
- name: IDL.Text,
79
- full_path: IDL.Text
80
- });
81
- const AssetEncodingNoContent = IDL.Record({
82
- modified: IDL.Nat64,
83
- sha256: IDL.Vec(IDL.Nat8),
84
- total_length: IDL.Nat
85
- });
86
- const AssetNoContent = IDL.Record({
87
- key: AssetKey,
88
- updated_at: IDL.Nat64,
89
- encodings: IDL.Vec(IDL.Tuple(IDL.Text, AssetEncodingNoContent)),
90
- headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
91
- created_at: IDL.Nat64
92
- });
93
- const ListResults = IDL.Record({
94
- matches_length: IDL.Nat64,
95
- length: IDL.Nat64,
96
- items: IDL.Vec(IDL.Tuple(IDL.Text, AssetNoContent))
97
- });
98
- const CustomDomain = IDL.Record({
99
- updated_at: IDL.Nat64,
100
- created_at: IDL.Nat64,
101
- bn_id: IDL.Opt(IDL.Text)
102
- });
103
- const ListResults_1 = IDL.Record({
104
- matches_length: IDL.Nat64,
105
- length: IDL.Nat64,
106
- items: IDL.Vec(IDL.Tuple(IDL.Text, Doc))
107
- });
108
- const RulesType = IDL.Variant({Db: IDL.Null, Storage: IDL.Null});
109
- const Permission = IDL.Variant({
110
- Controllers: IDL.Null,
111
- Private: IDL.Null,
112
- Public: IDL.Null,
113
- Managed: IDL.Null
114
- });
115
- const Rule = IDL.Record({
116
- updated_at: IDL.Nat64,
117
- max_size: IDL.Opt(IDL.Nat),
118
- read: Permission,
119
- created_at: IDL.Nat64,
120
- write: Permission
121
- });
122
- const SetDoc = IDL.Record({
123
- updated_at: IDL.Opt(IDL.Nat64),
124
- data: IDL.Vec(IDL.Nat8)
125
- });
126
- const SetRule = IDL.Record({
127
- updated_at: IDL.Opt(IDL.Nat64),
128
- max_size: IDL.Opt(IDL.Nat),
129
- read: Permission,
130
- write: Permission
131
- });
132
- const Chunk = IDL.Record({
133
- content: IDL.Vec(IDL.Nat8),
134
- batch_id: IDL.Nat
135
- });
136
- const UploadChunk = IDL.Record({chunk_id: IDL.Nat});
137
- return IDL.Service({
138
- add_controllers: IDL.Func([ControllersArgs], [IDL.Vec(IDL.Principal)], []),
139
- commit_asset_upload: IDL.Func([CommitBatch], [], []),
140
- del_asset: IDL.Func([IDL.Text, IDL.Text], [], []),
141
- del_assets: IDL.Func([IDL.Opt(IDL.Text)], [], []),
142
- del_custom_domain: IDL.Func([IDL.Text], [], []),
143
- del_doc: IDL.Func([IDL.Text, IDL.Text, DelDoc], [], []),
144
- get_config: IDL.Func([], [Config], []),
145
- get_doc: IDL.Func([IDL.Text, IDL.Text], [IDL.Opt(Doc)], ['query']),
146
- http_request: IDL.Func([HttpRequest], [HttpResponse], ['query']),
147
- http_request_streaming_callback: IDL.Func(
148
- [StreamingCallbackToken],
149
- [StreamingCallbackHttpResponse],
150
- ['query']
151
- ),
152
- init_asset_upload: IDL.Func([InitAssetKey], [InitUploadResult], []),
153
- list_assets: IDL.Func([IDL.Opt(IDL.Text), ListParams], [ListResults], ['query']),
154
- list_controllers: IDL.Func([], [IDL.Vec(IDL.Principal)], ['query']),
155
- list_custom_domains: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Text, CustomDomain))], ['query']),
156
- list_docs: IDL.Func([IDL.Text, ListParams], [ListResults_1], ['query']),
157
- list_rules: IDL.Func([RulesType], [IDL.Vec(IDL.Tuple(IDL.Text, Rule))], ['query']),
158
- remove_controllers: IDL.Func([ControllersArgs], [IDL.Vec(IDL.Principal)], []),
159
- set_config: IDL.Func([Config], [], []),
160
- set_custom_domain: IDL.Func([IDL.Text, IDL.Opt(IDL.Text)], [], []),
161
- set_doc: IDL.Func([IDL.Text, IDL.Text, SetDoc], [Doc], []),
162
- set_rule: IDL.Func([RulesType, IDL.Text, SetRule], [], []),
163
- upload_asset_chunk: IDL.Func([Chunk], [UploadChunk], []),
164
- version: IDL.Func([], [IDL.Text], ['query'])
165
- });
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
+ matcher: IDL.Opt(IDL.Text),
78
+ paginate: IDL.Opt(ListPaginate)
79
+ });
80
+ const AssetKey = IDL.Record({
81
+ token: IDL.Opt(IDL.Text),
82
+ collection: IDL.Text,
83
+ owner: IDL.Principal,
84
+ name: IDL.Text,
85
+ full_path: IDL.Text
86
+ });
87
+ const AssetEncodingNoContent = IDL.Record({
88
+ modified: IDL.Nat64,
89
+ sha256: IDL.Vec(IDL.Nat8),
90
+ total_length: IDL.Nat
91
+ });
92
+ const AssetNoContent = IDL.Record({
93
+ key: AssetKey,
94
+ updated_at: IDL.Nat64,
95
+ encodings: IDL.Vec(IDL.Tuple(IDL.Text, AssetEncodingNoContent)),
96
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
97
+ created_at: IDL.Nat64
98
+ });
99
+ const ListResults = IDL.Record({
100
+ matches_length: IDL.Nat64,
101
+ length: IDL.Nat64,
102
+ items: IDL.Vec(IDL.Tuple(IDL.Text, AssetNoContent))
103
+ });
104
+ const CustomDomain = IDL.Record({
105
+ updated_at: IDL.Nat64,
106
+ created_at: IDL.Nat64,
107
+ bn_id: IDL.Opt(IDL.Text)
108
+ });
109
+ const ListResults_1 = IDL.Record({
110
+ matches_length: IDL.Nat64,
111
+ length: IDL.Nat64,
112
+ items: IDL.Vec(IDL.Tuple(IDL.Text, Doc))
113
+ });
114
+ const RulesType = IDL.Variant({ Db: IDL.Null, Storage: IDL.Null });
115
+ const Permission = IDL.Variant({
116
+ Controllers: IDL.Null,
117
+ Private: IDL.Null,
118
+ Public: IDL.Null,
119
+ Managed: IDL.Null
120
+ });
121
+ const Rule = IDL.Record({
122
+ updated_at: IDL.Nat64,
123
+ max_size: IDL.Opt(IDL.Nat),
124
+ read: Permission,
125
+ created_at: IDL.Nat64,
126
+ write: Permission
127
+ });
128
+ const SetController = IDL.Record({
129
+ metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
130
+ expires_at: IDL.Opt(IDL.Nat64)
131
+ });
132
+ const SetControllersArgs = IDL.Record({
133
+ controller: SetController,
134
+ controllers: IDL.Vec(IDL.Principal)
135
+ });
136
+ const SetDoc = IDL.Record({
137
+ updated_at: IDL.Opt(IDL.Nat64),
138
+ data: IDL.Vec(IDL.Nat8)
139
+ });
140
+ const SetRule = IDL.Record({
141
+ updated_at: IDL.Opt(IDL.Nat64),
142
+ max_size: IDL.Opt(IDL.Nat),
143
+ read: Permission,
144
+ write: Permission
145
+ });
146
+ const Chunk = IDL.Record({
147
+ content: IDL.Vec(IDL.Nat8),
148
+ batch_id: IDL.Nat
149
+ });
150
+ const UploadChunk = IDL.Record({ chunk_id: IDL.Nat });
151
+ return IDL.Service({
152
+ commit_asset_upload: IDL.Func([CommitBatch], [], []),
153
+ del_asset: IDL.Func([IDL.Text, IDL.Text], [], []),
154
+ del_assets: IDL.Func([IDL.Opt(IDL.Text)], [], []),
155
+ del_controllers: IDL.Func(
156
+ [DeleteControllersArgs],
157
+ [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
158
+ []
159
+ ),
160
+ del_custom_domain: IDL.Func([IDL.Text], [], []),
161
+ del_doc: IDL.Func([IDL.Text, IDL.Text, DelDoc], [], []),
162
+ get_config: IDL.Func([], [Config], []),
163
+ get_doc: IDL.Func([IDL.Text, IDL.Text], [IDL.Opt(Doc)], ['query']),
164
+ http_request: IDL.Func([HttpRequest], [HttpResponse], ['query']),
165
+ http_request_streaming_callback: IDL.Func(
166
+ [StreamingCallbackToken],
167
+ [StreamingCallbackHttpResponse],
168
+ ['query']
169
+ ),
170
+ init_asset_upload: IDL.Func([InitAssetKey], [InitUploadResult], []),
171
+ list_assets: IDL.Func([IDL.Opt(IDL.Text), ListParams], [ListResults], ['query']),
172
+ list_controllers: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))], ['query']),
173
+ list_custom_domains: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Text, CustomDomain))], ['query']),
174
+ list_docs: IDL.Func([IDL.Text, ListParams], [ListResults_1], ['query']),
175
+ list_rules: IDL.Func([RulesType], [IDL.Vec(IDL.Tuple(IDL.Text, Rule))], ['query']),
176
+ set_config: IDL.Func([Config], [], []),
177
+ set_controllers: IDL.Func(
178
+ [SetControllersArgs],
179
+ [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
180
+ []
181
+ ),
182
+ set_custom_domain: IDL.Func([IDL.Text, IDL.Opt(IDL.Text)], [], []),
183
+ set_doc: IDL.Func([IDL.Text, IDL.Text, SetDoc], [Doc], []),
184
+ set_rule: IDL.Func([RulesType, IDL.Text, SetRule], [], []),
185
+ upload_asset_chunk: IDL.Func([Chunk], [UploadChunk], []),
186
+ version: IDL.Func([], [IDL.Text], ['query'])
187
+ });
166
188
  };
167
- export const init = ({IDL}) => {
168
- return [];
189
+ export const init = ({ IDL }) => {
190
+ return [];
169
191
  };