@colveor/admin 0.0.0-stage → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +106 -0
- package/TAILWINDADMIN-LICENSE +21 -0
- package/dist/account/data.d.ts +1 -0
- package/dist/account/data.js +44 -0
- package/dist/account/profile.d.ts +6 -0
- package/dist/account/profile.js +118 -0
- package/dist/account/sessions.d.ts +1 -0
- package/dist/account/sessions.js +26 -0
- package/dist/account/shared.d.ts +26 -0
- package/dist/account/shared.js +44 -0
- package/dist/account/two-factor.d.ts +5 -0
- package/dist/account/two-factor.js +60 -0
- package/dist/actions.d.ts +39 -0
- package/dist/actions.js +81 -0
- package/dist/api/audit.gen.d.ts +80 -0
- package/dist/api/audit.gen.js +43 -0
- package/dist/api/auth.gen.d.ts +537 -0
- package/dist/api/auth.gen.js +313 -0
- package/dist/api/errors.gen.d.ts +16 -0
- package/dist/api/errors.gen.js +2 -0
- package/dist/api/gormx.gen.d.ts +60 -0
- package/dist/api/gormx.gen.js +16 -0
- package/dist/api/health.gen.d.ts +103 -0
- package/dist/api/health.gen.js +23 -0
- package/dist/api/index.gen.d.ts +21 -0
- package/dist/api/index.gen.js +22 -0
- package/dist/api/invitations.gen.d.ts +128 -0
- package/dist/api/invitations.gen.js +57 -0
- package/dist/api/ledger.gen.d.ts +269 -0
- package/dist/api/ledger.gen.js +113 -0
- package/dist/api/msgtemplate.gen.d.ts +31 -0
- package/dist/api/msgtemplate.gen.js +2 -0
- package/dist/api/notifications.gen.d.ts +66 -0
- package/dist/api/notifications.gen.js +28 -0
- package/dist/api/outbox.gen.d.ts +8 -0
- package/dist/api/outbox.gen.js +2 -0
- package/dist/api/queue.gen.d.ts +112 -0
- package/dist/api/queue.gen.js +15 -0
- package/dist/api/rbac.gen.d.ts +406 -0
- package/dist/api/rbac.gen.js +191 -0
- package/dist/api/reauth.gen.d.ts +289 -0
- package/dist/api/reauth.gen.js +122 -0
- package/dist/api/recorded_payments.gen.d.ts +171 -0
- package/dist/api/recorded_payments.gen.js +79 -0
- package/dist/api/sessions.gen.d.ts +64 -0
- package/dist/api/sessions.gen.js +48 -0
- package/dist/api/settings.gen.d.ts +147 -0
- package/dist/api/settings.gen.js +69 -0
- package/dist/api/storage.gen.d.ts +327 -0
- package/dist/api/storage.gen.js +208 -0
- package/dist/api/support_access.gen.d.ts +155 -0
- package/dist/api/support_access.gen.js +131 -0
- package/dist/api/users.gen.d.ts +407 -0
- package/dist/api/users.gen.js +159 -0
- package/dist/api/verification.gen.d.ts +427 -0
- package/dist/api/verification.gen.js +280 -0
- package/dist/api/webhooks.gen.d.ts +110 -0
- package/dist/api/webhooks.gen.js +45 -0
- package/dist/auth-layout.d.ts +9 -0
- package/dist/auth-layout.js +5 -0
- package/dist/client.d.ts +41 -0
- package/dist/client.js +72 -0
- package/dist/config.d.ts +27 -0
- package/dist/config.js +82 -0
- package/dist/dates.d.ts +4 -0
- package/dist/dates.js +16 -0
- package/dist/header.d.ts +12 -0
- package/dist/header.js +105 -0
- package/dist/icons.d.ts +2 -0
- package/dist/icons.js +15 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.js +42 -0
- package/dist/kit/avatar.d.ts +5 -0
- package/dist/kit/avatar.js +16 -0
- package/dist/kit/badge.d.ts +10 -0
- package/dist/kit/badge.js +31 -0
- package/dist/kit/card.d.ts +12 -0
- package/dist/kit/card.js +7 -0
- package/dist/kit/code-area.d.ts +15 -0
- package/dist/kit/code-area.js +69 -0
- package/dist/kit/dropdown.d.ts +26 -0
- package/dist/kit/dropdown.js +67 -0
- package/dist/kit/filter-tabs.d.ts +9 -0
- package/dist/kit/filter-tabs.js +7 -0
- package/dist/kit/modal.d.ts +8 -0
- package/dist/kit/modal.js +15 -0
- package/dist/kit/page-header.d.ts +13 -0
- package/dist/kit/page-header.js +13 -0
- package/dist/kit/search.d.ts +4 -0
- package/dist/kit/search.js +16 -0
- package/dist/kit/tooltip.d.ts +17 -0
- package/dist/kit/tooltip.js +52 -0
- package/dist/message-editor.d.ts +9 -0
- package/dist/message-editor.js +80 -0
- package/dist/money.d.ts +10 -0
- package/dist/money.js +17 -0
- package/dist/next.d.ts +6 -0
- package/dist/next.js +19 -0
- package/dist/pages/account.d.ts +1 -0
- package/dist/pages/account.js +47 -0
- package/dist/pages/audit.d.ts +1 -0
- package/dist/pages/audit.js +88 -0
- package/dist/pages/forgot-password.d.ts +1 -0
- package/dist/pages/forgot-password.js +73 -0
- package/dist/pages/ledger.d.ts +1 -0
- package/dist/pages/ledger.js +132 -0
- package/dist/pages/roles.d.ts +1 -0
- package/dist/pages/roles.js +102 -0
- package/dist/pages/settings.d.ts +1 -0
- package/dist/pages/settings.js +86 -0
- package/dist/pages/sign-in.d.ts +5 -0
- package/dist/pages/sign-in.js +117 -0
- package/dist/pages/status.d.ts +1 -0
- package/dist/pages/status.js +122 -0
- package/dist/pages/support.d.ts +1 -0
- package/dist/pages/support.js +90 -0
- package/dist/pages/teams.d.ts +1 -0
- package/dist/pages/teams.js +94 -0
- package/dist/pages/users.d.ts +1 -0
- package/dist/pages/users.js +158 -0
- package/dist/pages/webhooks.d.ts +1 -0
- package/dist/pages/webhooks.js +88 -0
- package/dist/permissions.d.ts +5 -0
- package/dist/permissions.js +31 -0
- package/dist/proof.d.ts +10 -0
- package/dist/proof.js +78 -0
- package/dist/proxy.d.ts +10 -0
- package/dist/proxy.js +166 -0
- package/dist/retry.d.ts +8 -0
- package/dist/retry.js +30 -0
- package/dist/router.d.ts +13 -0
- package/dist/router.js +14 -0
- package/dist/setting-fields.d.ts +12 -0
- package/dist/setting-fields.js +102 -0
- package/dist/setting-list.d.ts +22 -0
- package/dist/setting-list.js +78 -0
- package/dist/shell.d.ts +40 -0
- package/dist/shell.js +97 -0
- package/dist/support.d.ts +37 -0
- package/dist/support.js +76 -0
- package/dist/table.d.ts +40 -0
- package/dist/table.js +73 -0
- package/dist/ui.d.ts +39 -0
- package/dist/ui.js +56 -0
- package/dist/user-actions.d.ts +30 -0
- package/dist/user-actions.js +129 -0
- package/dist/user-roles.d.ts +4 -0
- package/dist/user-roles.js +51 -0
- package/dist/user-row-menu.d.ts +14 -0
- package/dist/user-row-menu.js +45 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +3 -0
- package/package.json +59 -4
- package/README.md +0 -3
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Actions recorded in the audit log (section 42.1). Files removed by the
|
|
3
|
+
* cleanup jobs are not recorded: they were never used.
|
|
4
|
+
*/
|
|
5
|
+
export declare const ActionFileDeleted = "storage.FileDeleted";
|
|
6
|
+
/**
|
|
7
|
+
* File is how another module shows an attached file (e.g. a profile photo).
|
|
8
|
+
*/
|
|
9
|
+
export interface File {
|
|
10
|
+
id?: string;
|
|
11
|
+
url?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Status is where a file is in its life.
|
|
15
|
+
*/
|
|
16
|
+
export type Status = string;
|
|
17
|
+
/**
|
|
18
|
+
* StatusPending: created, waiting for the client to upload the bytes.
|
|
19
|
+
*/
|
|
20
|
+
export declare const StatusPending: Status;
|
|
21
|
+
/**
|
|
22
|
+
* StatusUploaded: the bytes are in, processing is queued.
|
|
23
|
+
*/
|
|
24
|
+
export declare const StatusUploaded: Status;
|
|
25
|
+
/**
|
|
26
|
+
* StatusProcessing: being checked and transformed (see Stage).
|
|
27
|
+
*/
|
|
28
|
+
export declare const StatusProcessing: Status;
|
|
29
|
+
export declare const StatusReady: Status;
|
|
30
|
+
export declare const StatusFailed: Status;
|
|
31
|
+
export declare const StatusDeleted: Status;
|
|
32
|
+
/**
|
|
33
|
+
* CreateRequest starts an upload. SizeBytes and ContentType must be what
|
|
34
|
+
* the client then sends: a single upload's URL is signed for them.
|
|
35
|
+
*/
|
|
36
|
+
export interface CreateRequest {
|
|
37
|
+
category: string;
|
|
38
|
+
filename: string;
|
|
39
|
+
size_bytes: number;
|
|
40
|
+
content_type: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Upload says how to send the bytes. Method "PUT": one PUT to URL with
|
|
44
|
+
* Headers. Method "MULTIPART": PUT each part (PartSize bytes, the last may
|
|
45
|
+
* be smaller) to its URL, keep each response's ETag header, then complete
|
|
46
|
+
* with the list.
|
|
47
|
+
*/
|
|
48
|
+
export interface Upload {
|
|
49
|
+
method: string;
|
|
50
|
+
url?: string;
|
|
51
|
+
headers?: {
|
|
52
|
+
[key: string]: string;
|
|
53
|
+
};
|
|
54
|
+
part_size?: number;
|
|
55
|
+
part_count?: number;
|
|
56
|
+
parts?: PartURL[];
|
|
57
|
+
/**
|
|
58
|
+
* ExpiresAt is when the URLs stop working (Unix milliseconds).
|
|
59
|
+
*/
|
|
60
|
+
expires_at: number;
|
|
61
|
+
}
|
|
62
|
+
export interface PartURL {
|
|
63
|
+
number: number;
|
|
64
|
+
url: string;
|
|
65
|
+
}
|
|
66
|
+
export interface CreateResponse {
|
|
67
|
+
file_id: string;
|
|
68
|
+
upload: Upload;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* PartsRequest asks for fresh URLs for some parts of a multipart upload
|
|
72
|
+
* (to resume after the first ones expired).
|
|
73
|
+
*/
|
|
74
|
+
export interface PartsRequest {
|
|
75
|
+
numbers: number[];
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* CompleteRequest finishes an upload. Parts is required for a multipart
|
|
79
|
+
* upload: every part's number and the ETag R2 returned for it.
|
|
80
|
+
*/
|
|
81
|
+
export interface CompleteRequest {
|
|
82
|
+
parts: Part[];
|
|
83
|
+
}
|
|
84
|
+
export interface Part {
|
|
85
|
+
number: number;
|
|
86
|
+
etag: string;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Variant is an extra rendition of an image, such as a thumbnail.
|
|
90
|
+
*/
|
|
91
|
+
export interface Variant {
|
|
92
|
+
url: string;
|
|
93
|
+
width: number;
|
|
94
|
+
height: number;
|
|
95
|
+
size_bytes: number;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* FileResponse is a file and where it is. URL (and the variants' URLs) is
|
|
99
|
+
* set when the file is ready: a CDN URL for a public category, otherwise a
|
|
100
|
+
* download URL valid for 5 minutes.
|
|
101
|
+
*/
|
|
102
|
+
export interface FileResponse {
|
|
103
|
+
id: string;
|
|
104
|
+
category: string;
|
|
105
|
+
status: Status;
|
|
106
|
+
stage?: string;
|
|
107
|
+
progress: number;
|
|
108
|
+
error?: string;
|
|
109
|
+
original_name: string;
|
|
110
|
+
mime_type?: string;
|
|
111
|
+
extension?: string;
|
|
112
|
+
size_bytes: number;
|
|
113
|
+
width?: number;
|
|
114
|
+
height?: number;
|
|
115
|
+
url?: string;
|
|
116
|
+
variants?: {
|
|
117
|
+
[key: string]: Variant;
|
|
118
|
+
};
|
|
119
|
+
attached: boolean;
|
|
120
|
+
created_at: string;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* CategoryResponse is an upload category with its current limits, for
|
|
124
|
+
* clients to check a file before starting.
|
|
125
|
+
*/
|
|
126
|
+
export interface CategoryResponse {
|
|
127
|
+
name: string;
|
|
128
|
+
label: string;
|
|
129
|
+
extensions: string[];
|
|
130
|
+
max_size_bytes: number;
|
|
131
|
+
max_files_per_user: number;
|
|
132
|
+
public: boolean;
|
|
133
|
+
/**
|
|
134
|
+
* Optimized: the server converts images (Format is the stored type).
|
|
135
|
+
*/
|
|
136
|
+
optimized: boolean;
|
|
137
|
+
format?: string;
|
|
138
|
+
}
|
|
139
|
+
export interface CategoriesResponse {
|
|
140
|
+
categories: CategoryResponse[];
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Ref is what Attach returns: the file and its URL (stable for a public
|
|
144
|
+
* category, so the owning module may store it).
|
|
145
|
+
*/
|
|
146
|
+
export interface Ref {
|
|
147
|
+
ID: string;
|
|
148
|
+
URL: string;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Stable error codes for this module (section 42.5: <module>.<error>).
|
|
152
|
+
* The processing failures are also a failed file's "error" field.
|
|
153
|
+
*/
|
|
154
|
+
export declare const ErrCodeUnavailable = "storage.unavailable";
|
|
155
|
+
/**
|
|
156
|
+
* Stable error codes for this module (section 42.5: <module>.<error>).
|
|
157
|
+
* The processing failures are also a failed file's "error" field.
|
|
158
|
+
*/
|
|
159
|
+
export declare const ErrCodeCategoryUnknown = "storage.category_unknown";
|
|
160
|
+
/**
|
|
161
|
+
* Stable error codes for this module (section 42.5: <module>.<error>).
|
|
162
|
+
* The processing failures are also a failed file's "error" field.
|
|
163
|
+
*/
|
|
164
|
+
export declare const ErrCodeCategoryDisabled = "storage.category_disabled";
|
|
165
|
+
/**
|
|
166
|
+
* Stable error codes for this module (section 42.5: <module>.<error>).
|
|
167
|
+
* The processing failures are also a failed file's "error" field.
|
|
168
|
+
*/
|
|
169
|
+
export declare const ErrCodeTypeNotAllowed = "storage.type_not_allowed";
|
|
170
|
+
/**
|
|
171
|
+
* Stable error codes for this module (section 42.5: <module>.<error>).
|
|
172
|
+
* The processing failures are also a failed file's "error" field.
|
|
173
|
+
*/
|
|
174
|
+
export declare const ErrCodeTooLarge = "storage.too_large";
|
|
175
|
+
/**
|
|
176
|
+
* Stable error codes for this module (section 42.5: <module>.<error>).
|
|
177
|
+
* The processing failures are also a failed file's "error" field.
|
|
178
|
+
*/
|
|
179
|
+
export declare const ErrCodeQuotaExceeded = "storage.quota_exceeded";
|
|
180
|
+
/**
|
|
181
|
+
* Stable error codes for this module (section 42.5: <module>.<error>).
|
|
182
|
+
* The processing failures are also a failed file's "error" field.
|
|
183
|
+
*/
|
|
184
|
+
export declare const ErrCodeNotPending = "storage.not_pending";
|
|
185
|
+
/**
|
|
186
|
+
* Stable error codes for this module (section 42.5: <module>.<error>).
|
|
187
|
+
* The processing failures are also a failed file's "error" field.
|
|
188
|
+
*/
|
|
189
|
+
export declare const ErrCodeNotUploaded = "storage.not_uploaded";
|
|
190
|
+
/**
|
|
191
|
+
* Stable error codes for this module (section 42.5: <module>.<error>).
|
|
192
|
+
* The processing failures are also a failed file's "error" field.
|
|
193
|
+
*/
|
|
194
|
+
export declare const ErrCodeNotReady = "storage.not_ready";
|
|
195
|
+
/**
|
|
196
|
+
* Stable error codes for this module (section 42.5: <module>.<error>).
|
|
197
|
+
* The processing failures are also a failed file's "error" field.
|
|
198
|
+
*/
|
|
199
|
+
export declare const ErrCodeWrongCategory = "storage.wrong_category";
|
|
200
|
+
/**
|
|
201
|
+
* Stable error codes for this module (section 42.5: <module>.<error>).
|
|
202
|
+
* The processing failures are also a failed file's "error" field.
|
|
203
|
+
*/
|
|
204
|
+
export declare const ErrCodeNotOwner = "storage.not_owner";
|
|
205
|
+
/**
|
|
206
|
+
* Stable error codes for this module (section 42.5: <module>.<error>).
|
|
207
|
+
* The processing failures are also a failed file's "error" field.
|
|
208
|
+
*/
|
|
209
|
+
export declare const ErrCodeInUse = "storage.in_use";
|
|
210
|
+
/**
|
|
211
|
+
* Stable error codes for this module (section 42.5: <module>.<error>).
|
|
212
|
+
* The processing failures are also a failed file's "error" field.
|
|
213
|
+
*/
|
|
214
|
+
export declare const ErrCodeNotFound = "storage.not_found";
|
|
215
|
+
/**
|
|
216
|
+
* Stable error codes for this module (section 42.5: <module>.<error>).
|
|
217
|
+
* The processing failures are also a failed file's "error" field.
|
|
218
|
+
*/
|
|
219
|
+
export declare const ErrCodeStatusInvalid = "storage.status_invalid";
|
|
220
|
+
/**
|
|
221
|
+
* Stable error codes for this module (section 42.5: <module>.<error>).
|
|
222
|
+
* The processing failures are also a failed file's "error" field.
|
|
223
|
+
*/
|
|
224
|
+
export declare const ErrCodeUnauthenticated = "storage.unauthenticated";
|
|
225
|
+
/**
|
|
226
|
+
* Processing failures (the file's "error").
|
|
227
|
+
*/
|
|
228
|
+
export declare const ErrCodeTypeMismatch = "storage.type_mismatch";
|
|
229
|
+
/**
|
|
230
|
+
* Stable error codes for this module (section 42.5: <module>.<error>).
|
|
231
|
+
* The processing failures are also a failed file's "error" field.
|
|
232
|
+
*/
|
|
233
|
+
export declare const ErrCodeImageTooLarge = "storage.image_too_large";
|
|
234
|
+
/**
|
|
235
|
+
* Stable error codes for this module (section 42.5: <module>.<error>).
|
|
236
|
+
* The processing failures are also a failed file's "error" field.
|
|
237
|
+
*/
|
|
238
|
+
export declare const ErrCodeImageInvalid = "storage.image_invalid";
|
|
239
|
+
/**
|
|
240
|
+
* Stable error codes for this module (section 42.5: <module>.<error>).
|
|
241
|
+
* The processing failures are also a failed file's "error" field.
|
|
242
|
+
*/
|
|
243
|
+
export declare const ErrCodeInfected = "storage.infected";
|
|
244
|
+
/**
|
|
245
|
+
* Stable error codes for this module (section 42.5: <module>.<error>).
|
|
246
|
+
* The processing failures are also a failed file's "error" field.
|
|
247
|
+
*/
|
|
248
|
+
export declare const ErrCodeExpired = "storage.expired";
|
|
249
|
+
/**
|
|
250
|
+
* Permissions this module guards (section 25.1: one source of truth). By
|
|
251
|
+
* convention "<domain>.write" acts on the caller's own resources and
|
|
252
|
+
* "<domain>.manage" on anyone's.
|
|
253
|
+
*/
|
|
254
|
+
export declare const PermissionStorageRead: string;
|
|
255
|
+
/**
|
|
256
|
+
* Permissions this module guards (section 25.1: one source of truth). By
|
|
257
|
+
* convention "<domain>.write" acts on the caller's own resources and
|
|
258
|
+
* "<domain>.manage" on anyone's.
|
|
259
|
+
*/
|
|
260
|
+
export declare const PermissionStorageWrite: string;
|
|
261
|
+
/**
|
|
262
|
+
* Rate limit policies (storage.rate_limit.<name>.limit and .per_seconds).
|
|
263
|
+
*/
|
|
264
|
+
export declare const RateLimitCreate = "storage.create";
|
|
265
|
+
/**
|
|
266
|
+
* Rate limit policies (storage.rate_limit.<name>.limit and .per_seconds).
|
|
267
|
+
*/
|
|
268
|
+
export declare const RateLimitComplete = "storage.complete";
|
|
269
|
+
/**
|
|
270
|
+
* Job types.
|
|
271
|
+
*/
|
|
272
|
+
export declare const JobProcess = "storage.process";
|
|
273
|
+
/**
|
|
274
|
+
* Job types.
|
|
275
|
+
*/
|
|
276
|
+
export declare const JobExpirePending = "storage.expire_pending";
|
|
277
|
+
/**
|
|
278
|
+
* Job types.
|
|
279
|
+
*/
|
|
280
|
+
export declare const JobCleanUnattached = "storage.clean_unattached";
|
|
281
|
+
/**
|
|
282
|
+
* Job types.
|
|
283
|
+
*/
|
|
284
|
+
export declare const JobPurgeDeleted = "storage.purge_deleted";
|
|
285
|
+
/**
|
|
286
|
+
* Events published to the owner through realtime.
|
|
287
|
+
*/
|
|
288
|
+
export declare const EventFileProgress = "storage.file.progress";
|
|
289
|
+
/**
|
|
290
|
+
* Events published to the owner through realtime.
|
|
291
|
+
*/
|
|
292
|
+
export declare const EventFileReady = "storage.file.ready";
|
|
293
|
+
/**
|
|
294
|
+
* Events published to the owner through realtime.
|
|
295
|
+
*/
|
|
296
|
+
export declare const EventFileFailed = "storage.file.failed";
|
|
297
|
+
export type Service = unknown;
|
|
298
|
+
/**
|
|
299
|
+
* Runtime settings this module owns (section 24.5: <module>.<key>). The
|
|
300
|
+
* upload categories' own settings (<module>.upload.<name>.*) are declared
|
|
301
|
+
* by the modules that own them.
|
|
302
|
+
*/
|
|
303
|
+
export declare const SettingUploadURLTTLSeconds: string;
|
|
304
|
+
/**
|
|
305
|
+
* Runtime settings this module owns (section 24.5: <module>.<key>). The
|
|
306
|
+
* upload categories' own settings (<module>.upload.<name>.*) are declared
|
|
307
|
+
* by the modules that own them.
|
|
308
|
+
*/
|
|
309
|
+
export declare const SettingDownloadURLTTLSeconds: string;
|
|
310
|
+
/**
|
|
311
|
+
* Runtime settings this module owns (section 24.5: <module>.<key>). The
|
|
312
|
+
* upload categories' own settings (<module>.upload.<name>.*) are declared
|
|
313
|
+
* by the modules that own them.
|
|
314
|
+
*/
|
|
315
|
+
export declare const SettingMultipartThresholdBytes: string;
|
|
316
|
+
/**
|
|
317
|
+
* Runtime settings this module owns (section 24.5: <module>.<key>). The
|
|
318
|
+
* upload categories' own settings (<module>.upload.<name>.*) are declared
|
|
319
|
+
* by the modules that own them.
|
|
320
|
+
*/
|
|
321
|
+
export declare const SettingUnattachedTTLSeconds: string;
|
|
322
|
+
/**
|
|
323
|
+
* Runtime settings this module owns (section 24.5: <module>.<key>). The
|
|
324
|
+
* upload categories' own settings (<module>.upload.<name>.*) are declared
|
|
325
|
+
* by the modules that own them.
|
|
326
|
+
*/
|
|
327
|
+
export declare const SettingKeepDeletedDays: string;
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
// Code generated by tygo. DO NOT EDIT.
|
|
2
|
+
//////////
|
|
3
|
+
// source: actions.go
|
|
4
|
+
/**
|
|
5
|
+
* Actions recorded in the audit log (section 42.1). Files removed by the
|
|
6
|
+
* cleanup jobs are not recorded: they were never used.
|
|
7
|
+
*/
|
|
8
|
+
export const ActionFileDeleted = "storage.FileDeleted";
|
|
9
|
+
/**
|
|
10
|
+
* StatusPending: created, waiting for the client to upload the bytes.
|
|
11
|
+
*/
|
|
12
|
+
export const StatusPending = "pending";
|
|
13
|
+
/**
|
|
14
|
+
* StatusUploaded: the bytes are in, processing is queued.
|
|
15
|
+
*/
|
|
16
|
+
export const StatusUploaded = "uploaded";
|
|
17
|
+
/**
|
|
18
|
+
* StatusProcessing: being checked and transformed (see Stage).
|
|
19
|
+
*/
|
|
20
|
+
export const StatusProcessing = "processing";
|
|
21
|
+
export const StatusReady = "ready";
|
|
22
|
+
export const StatusFailed = "failed";
|
|
23
|
+
export const StatusDeleted = "deleted";
|
|
24
|
+
//////////
|
|
25
|
+
// source: errors.go
|
|
26
|
+
/**
|
|
27
|
+
* Stable error codes for this module (section 42.5: <module>.<error>).
|
|
28
|
+
* The processing failures are also a failed file's "error" field.
|
|
29
|
+
*/
|
|
30
|
+
export const ErrCodeUnavailable = "storage.unavailable";
|
|
31
|
+
/**
|
|
32
|
+
* Stable error codes for this module (section 42.5: <module>.<error>).
|
|
33
|
+
* The processing failures are also a failed file's "error" field.
|
|
34
|
+
*/
|
|
35
|
+
export const ErrCodeCategoryUnknown = "storage.category_unknown";
|
|
36
|
+
/**
|
|
37
|
+
* Stable error codes for this module (section 42.5: <module>.<error>).
|
|
38
|
+
* The processing failures are also a failed file's "error" field.
|
|
39
|
+
*/
|
|
40
|
+
export const ErrCodeCategoryDisabled = "storage.category_disabled";
|
|
41
|
+
/**
|
|
42
|
+
* Stable error codes for this module (section 42.5: <module>.<error>).
|
|
43
|
+
* The processing failures are also a failed file's "error" field.
|
|
44
|
+
*/
|
|
45
|
+
export const ErrCodeTypeNotAllowed = "storage.type_not_allowed";
|
|
46
|
+
/**
|
|
47
|
+
* Stable error codes for this module (section 42.5: <module>.<error>).
|
|
48
|
+
* The processing failures are also a failed file's "error" field.
|
|
49
|
+
*/
|
|
50
|
+
export const ErrCodeTooLarge = "storage.too_large";
|
|
51
|
+
/**
|
|
52
|
+
* Stable error codes for this module (section 42.5: <module>.<error>).
|
|
53
|
+
* The processing failures are also a failed file's "error" field.
|
|
54
|
+
*/
|
|
55
|
+
export const ErrCodeQuotaExceeded = "storage.quota_exceeded";
|
|
56
|
+
/**
|
|
57
|
+
* Stable error codes for this module (section 42.5: <module>.<error>).
|
|
58
|
+
* The processing failures are also a failed file's "error" field.
|
|
59
|
+
*/
|
|
60
|
+
export const ErrCodeNotPending = "storage.not_pending";
|
|
61
|
+
/**
|
|
62
|
+
* Stable error codes for this module (section 42.5: <module>.<error>).
|
|
63
|
+
* The processing failures are also a failed file's "error" field.
|
|
64
|
+
*/
|
|
65
|
+
export const ErrCodeNotUploaded = "storage.not_uploaded";
|
|
66
|
+
/**
|
|
67
|
+
* Stable error codes for this module (section 42.5: <module>.<error>).
|
|
68
|
+
* The processing failures are also a failed file's "error" field.
|
|
69
|
+
*/
|
|
70
|
+
export const ErrCodeNotReady = "storage.not_ready";
|
|
71
|
+
/**
|
|
72
|
+
* Stable error codes for this module (section 42.5: <module>.<error>).
|
|
73
|
+
* The processing failures are also a failed file's "error" field.
|
|
74
|
+
*/
|
|
75
|
+
export const ErrCodeWrongCategory = "storage.wrong_category";
|
|
76
|
+
/**
|
|
77
|
+
* Stable error codes for this module (section 42.5: <module>.<error>).
|
|
78
|
+
* The processing failures are also a failed file's "error" field.
|
|
79
|
+
*/
|
|
80
|
+
export const ErrCodeNotOwner = "storage.not_owner";
|
|
81
|
+
/**
|
|
82
|
+
* Stable error codes for this module (section 42.5: <module>.<error>).
|
|
83
|
+
* The processing failures are also a failed file's "error" field.
|
|
84
|
+
*/
|
|
85
|
+
export const ErrCodeInUse = "storage.in_use";
|
|
86
|
+
/**
|
|
87
|
+
* Stable error codes for this module (section 42.5: <module>.<error>).
|
|
88
|
+
* The processing failures are also a failed file's "error" field.
|
|
89
|
+
*/
|
|
90
|
+
export const ErrCodeNotFound = "storage.not_found";
|
|
91
|
+
/**
|
|
92
|
+
* Stable error codes for this module (section 42.5: <module>.<error>).
|
|
93
|
+
* The processing failures are also a failed file's "error" field.
|
|
94
|
+
*/
|
|
95
|
+
export const ErrCodeStatusInvalid = "storage.status_invalid";
|
|
96
|
+
/**
|
|
97
|
+
* Stable error codes for this module (section 42.5: <module>.<error>).
|
|
98
|
+
* The processing failures are also a failed file's "error" field.
|
|
99
|
+
*/
|
|
100
|
+
export const ErrCodeUnauthenticated = "storage.unauthenticated";
|
|
101
|
+
/**
|
|
102
|
+
* Processing failures (the file's "error").
|
|
103
|
+
*/
|
|
104
|
+
export const ErrCodeTypeMismatch = "storage.type_mismatch";
|
|
105
|
+
/**
|
|
106
|
+
* Stable error codes for this module (section 42.5: <module>.<error>).
|
|
107
|
+
* The processing failures are also a failed file's "error" field.
|
|
108
|
+
*/
|
|
109
|
+
export const ErrCodeImageTooLarge = "storage.image_too_large";
|
|
110
|
+
/**
|
|
111
|
+
* Stable error codes for this module (section 42.5: <module>.<error>).
|
|
112
|
+
* The processing failures are also a failed file's "error" field.
|
|
113
|
+
*/
|
|
114
|
+
export const ErrCodeImageInvalid = "storage.image_invalid";
|
|
115
|
+
/**
|
|
116
|
+
* Stable error codes for this module (section 42.5: <module>.<error>).
|
|
117
|
+
* The processing failures are also a failed file's "error" field.
|
|
118
|
+
*/
|
|
119
|
+
export const ErrCodeInfected = "storage.infected";
|
|
120
|
+
/**
|
|
121
|
+
* Stable error codes for this module (section 42.5: <module>.<error>).
|
|
122
|
+
* The processing failures are also a failed file's "error" field.
|
|
123
|
+
*/
|
|
124
|
+
export const ErrCodeExpired = "storage.expired";
|
|
125
|
+
//////////
|
|
126
|
+
// source: permissions.go
|
|
127
|
+
/**
|
|
128
|
+
* Permissions this module guards (section 25.1: one source of truth). By
|
|
129
|
+
* convention "<domain>.write" acts on the caller's own resources and
|
|
130
|
+
* "<domain>.manage" on anyone's.
|
|
131
|
+
*/
|
|
132
|
+
export const PermissionStorageRead = "storage.read";
|
|
133
|
+
/**
|
|
134
|
+
* Permissions this module guards (section 25.1: one source of truth). By
|
|
135
|
+
* convention "<domain>.write" acts on the caller's own resources and
|
|
136
|
+
* "<domain>.manage" on anyone's.
|
|
137
|
+
*/
|
|
138
|
+
export const PermissionStorageWrite = "storage.write";
|
|
139
|
+
//////////
|
|
140
|
+
// source: ratelimits.go
|
|
141
|
+
/**
|
|
142
|
+
* Rate limit policies (storage.rate_limit.<name>.limit and .per_seconds).
|
|
143
|
+
*/
|
|
144
|
+
export const RateLimitCreate = "storage.create";
|
|
145
|
+
/**
|
|
146
|
+
* Rate limit policies (storage.rate_limit.<name>.limit and .per_seconds).
|
|
147
|
+
*/
|
|
148
|
+
export const RateLimitComplete = "storage.complete";
|
|
149
|
+
/**
|
|
150
|
+
* Job types.
|
|
151
|
+
*/
|
|
152
|
+
export const JobProcess = "storage.process";
|
|
153
|
+
/**
|
|
154
|
+
* Job types.
|
|
155
|
+
*/
|
|
156
|
+
export const JobExpirePending = "storage.expire_pending";
|
|
157
|
+
/**
|
|
158
|
+
* Job types.
|
|
159
|
+
*/
|
|
160
|
+
export const JobCleanUnattached = "storage.clean_unattached";
|
|
161
|
+
/**
|
|
162
|
+
* Job types.
|
|
163
|
+
*/
|
|
164
|
+
export const JobPurgeDeleted = "storage.purge_deleted";
|
|
165
|
+
/**
|
|
166
|
+
* Events published to the owner through realtime.
|
|
167
|
+
*/
|
|
168
|
+
export const EventFileProgress = "storage.file.progress";
|
|
169
|
+
/**
|
|
170
|
+
* Events published to the owner through realtime.
|
|
171
|
+
*/
|
|
172
|
+
export const EventFileReady = "storage.file.ready";
|
|
173
|
+
/**
|
|
174
|
+
* Events published to the owner through realtime.
|
|
175
|
+
*/
|
|
176
|
+
export const EventFileFailed = "storage.file.failed";
|
|
177
|
+
//////////
|
|
178
|
+
// source: settings.go
|
|
179
|
+
/**
|
|
180
|
+
* Runtime settings this module owns (section 24.5: <module>.<key>). The
|
|
181
|
+
* upload categories' own settings (<module>.upload.<name>.*) are declared
|
|
182
|
+
* by the modules that own them.
|
|
183
|
+
*/
|
|
184
|
+
export const SettingUploadURLTTLSeconds = "storage.upload_url_ttl_seconds";
|
|
185
|
+
/**
|
|
186
|
+
* Runtime settings this module owns (section 24.5: <module>.<key>). The
|
|
187
|
+
* upload categories' own settings (<module>.upload.<name>.*) are declared
|
|
188
|
+
* by the modules that own them.
|
|
189
|
+
*/
|
|
190
|
+
export const SettingDownloadURLTTLSeconds = "storage.download_url_ttl_seconds";
|
|
191
|
+
/**
|
|
192
|
+
* Runtime settings this module owns (section 24.5: <module>.<key>). The
|
|
193
|
+
* upload categories' own settings (<module>.upload.<name>.*) are declared
|
|
194
|
+
* by the modules that own them.
|
|
195
|
+
*/
|
|
196
|
+
export const SettingMultipartThresholdBytes = "storage.multipart_threshold_bytes";
|
|
197
|
+
/**
|
|
198
|
+
* Runtime settings this module owns (section 24.5: <module>.<key>). The
|
|
199
|
+
* upload categories' own settings (<module>.upload.<name>.*) are declared
|
|
200
|
+
* by the modules that own them.
|
|
201
|
+
*/
|
|
202
|
+
export const SettingUnattachedTTLSeconds = "storage.unattached_ttl_seconds";
|
|
203
|
+
/**
|
|
204
|
+
* Runtime settings this module owns (section 24.5: <module>.<key>). The
|
|
205
|
+
* upload categories' own settings (<module>.upload.<name>.*) are declared
|
|
206
|
+
* by the modules that own them.
|
|
207
|
+
*/
|
|
208
|
+
export const SettingKeepDeletedDays = "storage.keep_deleted_days";
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Actions recorded in the audit log (section 42.1), with the change, in its
|
|
3
|
+
* transaction. The target is the team; the grant's ID is in metadata.
|
|
4
|
+
*/
|
|
5
|
+
export declare const ActionGrantRequested = "support.GrantRequested";
|
|
6
|
+
/**
|
|
7
|
+
* Actions recorded in the audit log (section 42.1), with the change, in its
|
|
8
|
+
* transaction. The target is the team; the grant's ID is in metadata.
|
|
9
|
+
*/
|
|
10
|
+
export declare const ActionGrantApproved = "support.GrantApproved";
|
|
11
|
+
/**
|
|
12
|
+
* Actions recorded in the audit log (section 42.1), with the change, in its
|
|
13
|
+
* transaction. The target is the team; the grant's ID is in metadata.
|
|
14
|
+
*/
|
|
15
|
+
export declare const ActionGrantDenied = "support.GrantDenied";
|
|
16
|
+
/**
|
|
17
|
+
* Actions recorded in the audit log (section 42.1), with the change, in its
|
|
18
|
+
* transaction. The target is the team; the grant's ID is in metadata.
|
|
19
|
+
*/
|
|
20
|
+
export declare const ActionGrantRevoked = "support.GrantRevoked";
|
|
21
|
+
/**
|
|
22
|
+
* Actions recorded in the audit log (section 42.1), with the change, in its
|
|
23
|
+
* transaction. The target is the team; the grant's ID is in metadata.
|
|
24
|
+
*/
|
|
25
|
+
export declare const ActionGrantEnded = "support.GrantEnded";
|
|
26
|
+
/**
|
|
27
|
+
* Grant statuses (docs/support-access.md). A grant past its ends_at is
|
|
28
|
+
* shown as StatusExpired; it is stored as active.
|
|
29
|
+
*/
|
|
30
|
+
export declare const StatusPending = "pending";
|
|
31
|
+
/**
|
|
32
|
+
* Grant statuses (docs/support-access.md). A grant past its ends_at is
|
|
33
|
+
* shown as StatusExpired; it is stored as active.
|
|
34
|
+
*/
|
|
35
|
+
export declare const StatusActive = "active";
|
|
36
|
+
/**
|
|
37
|
+
* Grant statuses (docs/support-access.md). A grant past its ends_at is
|
|
38
|
+
* shown as StatusExpired; it is stored as active.
|
|
39
|
+
*/
|
|
40
|
+
export declare const StatusDenied = "denied";
|
|
41
|
+
/**
|
|
42
|
+
* Grant statuses (docs/support-access.md). A grant past its ends_at is
|
|
43
|
+
* shown as StatusExpired; it is stored as active.
|
|
44
|
+
*/
|
|
45
|
+
export declare const StatusRevoked = "revoked";
|
|
46
|
+
/**
|
|
47
|
+
* Grant statuses (docs/support-access.md). A grant past its ends_at is
|
|
48
|
+
* shown as StatusExpired; it is stored as active.
|
|
49
|
+
*/
|
|
50
|
+
export declare const StatusEnded = "ended";
|
|
51
|
+
/**
|
|
52
|
+
* Grant statuses (docs/support-access.md). A grant past its ends_at is
|
|
53
|
+
* shown as StatusExpired; it is stored as active.
|
|
54
|
+
*/
|
|
55
|
+
export declare const StatusExpired = "expired";
|
|
56
|
+
/**
|
|
57
|
+
* RequestGrantRequest asks a team for role until EndsAt. The reason is the
|
|
58
|
+
* request's X-Reason.
|
|
59
|
+
*/
|
|
60
|
+
export interface RequestGrantRequest {
|
|
61
|
+
role: string;
|
|
62
|
+
ends_at: string;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* GrantResponse is a support grant.
|
|
66
|
+
*/
|
|
67
|
+
export interface GrantResponse {
|
|
68
|
+
id: string;
|
|
69
|
+
team: {
|
|
70
|
+
kind: string;
|
|
71
|
+
id: string;
|
|
72
|
+
};
|
|
73
|
+
role: string;
|
|
74
|
+
reason: string;
|
|
75
|
+
status: string;
|
|
76
|
+
requested_by: string;
|
|
77
|
+
decided_by?: string;
|
|
78
|
+
/**
|
|
79
|
+
* StartsAt is when it was approved (or asked, in notify mode); absent
|
|
80
|
+
* while pending.
|
|
81
|
+
*/
|
|
82
|
+
starts_at?: string;
|
|
83
|
+
ends_at: string;
|
|
84
|
+
created_at: string;
|
|
85
|
+
decided_at?: string;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Stable error codes for this module (section 42.5: <module>.<error>).
|
|
89
|
+
* These are part of the module's public contract: once released, a code must
|
|
90
|
+
* not change meaning.
|
|
91
|
+
*/
|
|
92
|
+
export declare const ErrCodeNotFound = "support.not_found";
|
|
93
|
+
/**
|
|
94
|
+
* Stable error codes for this module (section 42.5: <module>.<error>).
|
|
95
|
+
* These are part of the module's public contract: once released, a code must
|
|
96
|
+
* not change meaning.
|
|
97
|
+
*/
|
|
98
|
+
export declare const ErrCodeGrantOpen = "support.grant_open";
|
|
99
|
+
/**
|
|
100
|
+
* Stable error codes for this module (section 42.5: <module>.<error>).
|
|
101
|
+
* These are part of the module's public contract: once released, a code must
|
|
102
|
+
* not change meaning.
|
|
103
|
+
*/
|
|
104
|
+
export declare const ErrCodeSelfApproval = "support.self_approval";
|
|
105
|
+
/**
|
|
106
|
+
* Stable error codes for this module (section 42.5: <module>.<error>).
|
|
107
|
+
* These are part of the module's public contract: once released, a code must
|
|
108
|
+
* not change meaning.
|
|
109
|
+
*/
|
|
110
|
+
export declare const ErrCodeNotPending = "support.not_pending";
|
|
111
|
+
/**
|
|
112
|
+
* Stable error codes for this module (section 42.5: <module>.<error>).
|
|
113
|
+
* These are part of the module's public contract: once released, a code must
|
|
114
|
+
* not change meaning.
|
|
115
|
+
*/
|
|
116
|
+
export declare const ErrCodeNotOpen = "support.not_open";
|
|
117
|
+
/**
|
|
118
|
+
* Stable error codes for this module (section 42.5: <module>.<error>).
|
|
119
|
+
* These are part of the module's public contract: once released, a code must
|
|
120
|
+
* not change meaning.
|
|
121
|
+
*/
|
|
122
|
+
export declare const ErrCodeInvalidEnd = "support.invalid_end";
|
|
123
|
+
/**
|
|
124
|
+
* Stable error codes for this module (section 42.5: <module>.<error>).
|
|
125
|
+
* These are part of the module's public contract: once released, a code must
|
|
126
|
+
* not change meaning.
|
|
127
|
+
*/
|
|
128
|
+
export declare const ErrCodeInvalidFilter = "support.invalid_filter";
|
|
129
|
+
/**
|
|
130
|
+
* PermissionRequest lets a platform admin ask a team for access.
|
|
131
|
+
*/
|
|
132
|
+
export declare const PermissionRequest: string;
|
|
133
|
+
/**
|
|
134
|
+
* PermissionRead lets a platform admin see every grant.
|
|
135
|
+
*/
|
|
136
|
+
export declare const PermissionRead: string;
|
|
137
|
+
/**
|
|
138
|
+
* PermissionManage is a team permission: approve, deny and revoke the
|
|
139
|
+
* grants on the team, and see them.
|
|
140
|
+
*/
|
|
141
|
+
export declare const PermissionManage: string;
|
|
142
|
+
/**
|
|
143
|
+
* Service is the support_access module's API (docs/support-access.md).
|
|
144
|
+
*/
|
|
145
|
+
export type Service = unknown;
|
|
146
|
+
export declare const SettingApproval: string;
|
|
147
|
+
export declare const SettingMaxHours: string;
|
|
148
|
+
/**
|
|
149
|
+
* Approval modes (SettingApproval).
|
|
150
|
+
*/
|
|
151
|
+
export declare const ApprovalRequired = "required";
|
|
152
|
+
/**
|
|
153
|
+
* Approval modes (SettingApproval).
|
|
154
|
+
*/
|
|
155
|
+
export declare const ApprovalNotify = "notify";
|