@junobuild/admin 0.0.53 → 0.0.54-next-2024-08-09

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