@junobuild/core-standalone 0.1.0

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