@snap/push2web 0.11.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.
@@ -0,0 +1,281 @@
1
+ import _m0 from "protobufjs/minimal";
2
+ export declare const protobufPackage = "snapchat.core";
3
+ /**
4
+ * These codes borrow heavily from the GRPC status codes.
5
+ *
6
+ * Sometimes multiple error codes may apply. Services should return
7
+ * the most specific error code that applies. For example, prefer
8
+ * `OUT_OF_RANGE` over `FAILED_PRECONDITION` if both codes apply.
9
+ * Similarly prefer `NOT_FOUND` or `ALREADY_EXISTS` over `FAILED_PRECONDITION`.
10
+ */
11
+ export declare enum Code {
12
+ /**
13
+ * OK - Not an error; returned on success
14
+ *
15
+ * HTTP Mapping: 200 OK
16
+ */
17
+ OK = "OK",
18
+ /**
19
+ * CANCELLED - The operation was cancelled, typically by the caller.
20
+ *
21
+ * HTTP Mapping: 499 Client Closed Request
22
+ */
23
+ CANCELLED = "CANCELLED",
24
+ /**
25
+ * UNKNOWN - Unknown error. For example, this error may be returned when
26
+ * a `Status` value received from another address space belongs to
27
+ * an error space that is not known in this address space. Also
28
+ * errors raised by APIs that do not return enough error information
29
+ * may be converted to this error.
30
+ *
31
+ * HTTP Mapping: 500 Internal Server Error
32
+ */
33
+ UNKNOWN = "UNKNOWN",
34
+ /**
35
+ * INVALID_ARGUMENT - The client specified an invalid argument. Note that this differs
36
+ * from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates arguments
37
+ * that are problematic regardless of the state of the system
38
+ * (e.g., a malformed file name).
39
+ *
40
+ * HTTP Mapping: 400 Bad Request
41
+ */
42
+ INVALID_ARGUMENT = "INVALID_ARGUMENT",
43
+ /**
44
+ * DEADLINE_EXCEEDED - The deadline expired before the operation could complete. For operations
45
+ * that change the state of the system, this error may be returned
46
+ * even if the operation has completed successfully. For example, a
47
+ * successful response from a server could have been delayed long
48
+ * enough for the deadline to expire.
49
+ *
50
+ * HTTP Mapping: 504 Gateway Timeout
51
+ */
52
+ DEADLINE_EXCEEDED = "DEADLINE_EXCEEDED",
53
+ /**
54
+ * NOT_FOUND - Some requested entity (e.g., file or directory) was not found.
55
+ *
56
+ * Note to server developers: if a request is denied for an entire class
57
+ * of users, such as gradual feature rollout or undocumented whitelist,
58
+ * `NOT_FOUND` may be used. If a request is denied for some users within
59
+ * a class of users, such as user-based access control, `PERMISSION_DENIED`
60
+ * must be used.
61
+ *
62
+ * HTTP Mapping: 404 Not Found
63
+ */
64
+ NOT_FOUND = "NOT_FOUND",
65
+ /**
66
+ * ALREADY_EXISTS - The entity that a client attempted to create (e.g., file or directory)
67
+ * already exists.
68
+ *
69
+ * HTTP Mapping: 409 Conflict
70
+ */
71
+ ALREADY_EXISTS = "ALREADY_EXISTS",
72
+ /**
73
+ * PERMISSION_DENIED - The caller does not have permission to execute the specified
74
+ * operation. `PERMISSION_DENIED` must not be used for rejections
75
+ * caused by exhausting some resource (use `RESOURCE_EXHAUSTED`
76
+ * instead for those errors). `PERMISSION_DENIED` must not be
77
+ * used if the caller can not be identified (use `UNAUTHENTICATED`
78
+ * instead for those errors). This error code does not imply the
79
+ * request is valid or the requested entity exists or satisfies
80
+ * other pre-conditions.
81
+ *
82
+ * HTTP Mapping: 403 Forbidden
83
+ */
84
+ PERMISSION_DENIED = "PERMISSION_DENIED",
85
+ /**
86
+ * UNAUTHENTICATED - The request does not have valid authentication credentials for the
87
+ * operation.
88
+ *
89
+ * HTTP Mapping: 401 Unauthorized
90
+ */
91
+ UNAUTHENTICATED = "UNAUTHENTICATED",
92
+ /**
93
+ * RESOURCE_EXHAUSTED - Some resource has been exhausted, perhaps a per-user quota, or
94
+ * perhaps the entire file system is out of space.
95
+ *
96
+ * HTTP Mapping: 429 Too Many Requests
97
+ */
98
+ RESOURCE_EXHAUSTED = "RESOURCE_EXHAUSTED",
99
+ /**
100
+ * FAILED_PRECONDITION - The operation was rejected because the system is not in a state
101
+ * required for the operation's execution. For example, the directory
102
+ * to be deleted is non-empty, an rmdir operation is applied to
103
+ * a non-directory, etc.
104
+ *
105
+ * Service implementors can use the following guidelines to decide
106
+ * between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`:
107
+ * (a) Use `UNAVAILABLE` if the client can retry just the failing call.
108
+ * (b) Use `ABORTED` if the client should retry at a higher level
109
+ * (e.g., when a client-specified test-and-set fails, indicating the
110
+ * client should restart a read-modify-write sequence).
111
+ * (c) Use `FAILED_PRECONDITION` if the client should not retry until
112
+ * the system state has been explicitly fixed. E.g., if an "rmdir"
113
+ * fails because the directory is non-empty, `FAILED_PRECONDITION`
114
+ * should be returned since the client should not retry unless
115
+ * the files are deleted from the directory.
116
+ *
117
+ * HTTP Mapping: 400 Bad Request
118
+ */
119
+ FAILED_PRECONDITION = "FAILED_PRECONDITION",
120
+ /**
121
+ * ABORTED - The operation was aborted, typically due to a concurrency issue such as
122
+ * a sequencer check failure or transaction abort.
123
+ *
124
+ * See the guidelines above for deciding between `FAILED_PRECONDITION`,
125
+ * `ABORTED`, and `UNAVAILABLE`.
126
+ *
127
+ * HTTP Mapping: 409 Conflict
128
+ */
129
+ ABORTED = "ABORTED",
130
+ /**
131
+ * OUT_OF_RANGE - The operation was attempted past the valid range. E.g., seeking or
132
+ * reading past end-of-file.
133
+ *
134
+ * Unlike `INVALID_ARGUMENT`, this error indicates a problem that may
135
+ * be fixed if the system state changes. For example, a 32-bit file
136
+ * system will generate `INVALID_ARGUMENT` if asked to read at an
137
+ * offset that is not in the range [0,2^32-1], but it will generate
138
+ * `OUT_OF_RANGE` if asked to read from an offset past the current
139
+ * file size.
140
+ *
141
+ * There is a fair bit of overlap between `FAILED_PRECONDITION` and
142
+ * `OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more specific
143
+ * error) when it applies so that callers who are iterating through
144
+ * a space can easily look for an `OUT_OF_RANGE` error to detect when
145
+ * they are done.
146
+ *
147
+ * HTTP Mapping: 400 Bad Request
148
+ */
149
+ OUT_OF_RANGE = "OUT_OF_RANGE",
150
+ /**
151
+ * UNIMPLEMENTED - The operation is not implemented or is not supported/enabled in this
152
+ * service.
153
+ *
154
+ * HTTP Mapping: 501 Not Implemented
155
+ */
156
+ UNIMPLEMENTED = "UNIMPLEMENTED",
157
+ /**
158
+ * INTERNAL - Internal errors. This means that some invariants expected by the
159
+ * underlying system have been broken. This error code is reserved
160
+ * for serious errors.
161
+ *
162
+ * HTTP Mapping: 500 Internal Server Error
163
+ */
164
+ INTERNAL = "INTERNAL",
165
+ /**
166
+ * UNAVAILABLE - The service is currently unavailable. This is most likely a
167
+ * transient condition, which can be corrected by retrying with
168
+ * a backoff.
169
+ *
170
+ * See the guidelines above for deciding between `FAILED_PRECONDITION`,
171
+ * `ABORTED`, and `UNAVAILABLE`.
172
+ *
173
+ * HTTP Mapping: 503 Service Unavailable
174
+ */
175
+ UNAVAILABLE = "UNAVAILABLE",
176
+ /**
177
+ * DATA_LOSS - Unrecoverable data loss or corruption.
178
+ *
179
+ * HTTP Mapping: 500 Internal Server Error
180
+ */
181
+ DATA_LOSS = "DATA_LOSS",
182
+ /** NOT_MODIFIED - Equivalent to HTTP 304 not modified */
183
+ NOT_MODIFIED = "NOT_MODIFIED",
184
+ /**
185
+ * DECRYPTION_FAILED - Decryption failed. Similar to DATA_LOSS ("Unrecoverable data loss or corruption."),
186
+ * but HTTP should map to 400 Bad Request, not 500 Internal Server Error.
187
+ * This is not-retriable.
188
+ */
189
+ DECRYPTION_FAILED = "DECRYPTION_FAILED",
190
+ /**
191
+ * INVALID_MEDIA - Invalid media. For example: you request an HLS manifest on a still picture, or pngquant on non-png.
192
+ * HTTP should map to 400 Bad Request. This is not-retriable.
193
+ */
194
+ INVALID_MEDIA = "INVALID_MEDIA",
195
+ /**
196
+ * IN_PROGRESS - Use to signal that ingestion is in progress and we don't have a result yet.
197
+ * It can be used for other similar processes.
198
+ */
199
+ IN_PROGRESS = "IN_PROGRESS",
200
+ /**
201
+ * CONTENT_TOO_LARGE - BOLT can optionally check for content size, before ingestion.
202
+ * This error code signals that the content is too large to be ingested into BOLT.
203
+ * Maximum object size can be specified per use case or per ingestion request.
204
+ */
205
+ CONTENT_TOO_LARGE = "CONTENT_TOO_LARGE",
206
+ /**
207
+ * URL_PROTOCOL_NOT_SUPPORTED - BOLT can only download content from URL protocols HTTP and HTTPS.
208
+ * This error code will be returned if the URL provided in an ingestion request has a different protocol.
209
+ */
210
+ URL_PROTOCOL_NOT_SUPPORTED = "URL_PROTOCOL_NOT_SUPPORTED",
211
+ /**
212
+ * URL_CONTENT_TYPE_NOT_WHITELISTED - Content downloaded from a URL has to have its content-type header whitelisted for the use case making
213
+ * the ingestion request.
214
+ * This error signals that the URL has a content-type not whitelisted for the use case.
215
+ */
216
+ URL_CONTENT_TYPE_NOT_WHITELISTED = "URL_CONTENT_TYPE_NOT_WHITELISTED",
217
+ /**
218
+ * URL_DOWNLOAD_FAILURE - This error signals that BOLT failed to download content from the URL provided in the ingestion request.
219
+ * The HTTP status code is reported in error_code.
220
+ */
221
+ URL_DOWNLOAD_FAILURE = "URL_DOWNLOAD_FAILURE",
222
+ /**
223
+ * CLOUD_STORAGE_FAILURE - This error signals that BOLT failed to carry out a cloud storage operation.
224
+ * This can happen when getting content size from the external bucket provided in the ingestion request or when
225
+ * trying to do the first copy to a BOLT bucket.
226
+ * The HTTP status code is reported in error code.
227
+ */
228
+ CLOUD_STORAGE_FAILURE = "CLOUD_STORAGE_FAILURE",
229
+ UNRECOGNIZED = "UNRECOGNIZED"
230
+ }
231
+ export declare function codeFromJSON(object: any): Code;
232
+ export declare function codeToJSON(object: Code): string;
233
+ export declare function codeToNumber(object: Code): number;
234
+ export interface CodeProperties {
235
+ /**
236
+ * An error code, specific to a give Code, to help identifying an error condition.
237
+ * For example, for Code URL_DOWNLOAD_FAILURE this indicates the HTTP response code.
238
+ */
239
+ errorCode: number;
240
+ /** This might contain a description of the error condition. */
241
+ errorDescription: string;
242
+ /** A value indicating whether Code is retryable. */
243
+ isRetryable: boolean;
244
+ /**
245
+ * The source reporting the error condition.
246
+ * For example, Bolt/MOSS/VideoEncoding.
247
+ */
248
+ source: string;
249
+ }
250
+ export declare const CodeProperties: {
251
+ encode(message: CodeProperties, writer?: _m0.Writer): _m0.Writer;
252
+ decode(input: _m0.Reader | Uint8Array, length?: number): CodeProperties;
253
+ fromJSON(object: any): CodeProperties;
254
+ toJSON(message: CodeProperties): unknown;
255
+ fromPartial<I extends {
256
+ errorCode?: number | undefined;
257
+ errorDescription?: string | undefined;
258
+ isRetryable?: boolean | undefined;
259
+ source?: string | undefined;
260
+ } & {
261
+ errorCode?: number | undefined;
262
+ errorDescription?: string | undefined;
263
+ isRetryable?: boolean | undefined;
264
+ source?: string | undefined;
265
+ } & Record<Exclude<keyof I, keyof CodeProperties>, never>>(object: I): CodeProperties;
266
+ };
267
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
268
+ export type DeepPartial<T> = T extends Builtin ? T : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {
269
+ $case: string;
270
+ } ? {
271
+ [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]>;
272
+ } & {
273
+ $case: T["$case"];
274
+ } : T extends {} ? {
275
+ [K in keyof T]?: DeepPartial<T[K]>;
276
+ } : Partial<T>;
277
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
278
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
279
+ [K in keyof P]: Exact<P[K], I[K]>;
280
+ } & Record<Exclude<keyof I, KeysOfUnion<P>>, never>;
281
+ export {};