@substrio/sdk 0.0.0-stage → 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.
- package/LICENSE +177 -0
- package/README.md +39 -2
- package/package.json +52 -5
- package/substrio.d.ts +1087 -0
- package/substrio.mjs +3928 -0
- package/substrio_errors.mjs +265 -0
- package/substrio_kv_tcp.mjs +559 -0
- package/substrio_operation_client.d.mts +28 -0
- package/substrio_operation_client.mjs +196 -0
- package/substrio_operations.d.mts +10911 -0
- package/substrio_operations.mjs +1617 -0
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
// Generated by packages/substrio-sdk/scripts/gen_errors.mjs from src/substrio/api/substrio_error.h and
|
|
2
|
+
// src/substrio/api/substrio_error_strings.cpp. Do not edit: change those and run
|
|
3
|
+
// node packages/substrio-sdk/scripts/gen_errors.mjs
|
|
4
|
+
|
|
5
|
+
// Every substrio error: its wire name (the `code` of an error reply) to its
|
|
6
|
+
// numeric code, HTTP status and message, in code order.
|
|
7
|
+
export const SUBSTRIO_ERRORS = Object.freeze({
|
|
8
|
+
SUCCESS: Object.freeze({ hex: 0x0000, status: 200, message: "Operation completed successfully" }),
|
|
9
|
+
UNKNOWN: Object.freeze({ hex: 0x0001, status: 500, message: "An unknown error occurred" }),
|
|
10
|
+
NOT_IMPLEMENTED: Object.freeze({ hex: 0x0002, status: 501, message: "This feature is not implemented" }),
|
|
11
|
+
SYSTEM_CLOSED: Object.freeze({ hex: 0x0100, status: 503, message: "Database system is closed" }),
|
|
12
|
+
SYSTEM_ALREADY_OPEN: Object.freeze({ hex: 0x0101, status: 409, message: "Database system is already open" }),
|
|
13
|
+
INVALID_ARGUMENT: Object.freeze({ hex: 0x0102, status: 400, message: "Invalid argument provided" }),
|
|
14
|
+
INVALID_HANDLE: Object.freeze({ hex: 0x0103, status: 400, message: "Invalid handle" }),
|
|
15
|
+
THREAD_INIT_FAILED: Object.freeze({ hex: 0x0104, status: 500, message: "Thread initialization failed" }),
|
|
16
|
+
SHUTDOWN_IN_PROGRESS: Object.freeze({ hex: 0x0105, status: 503, message: "System is shutting down" }),
|
|
17
|
+
INTERNAL: Object.freeze({ hex: 0x0106, status: 500, message: "Internal server error" }),
|
|
18
|
+
NULL_TREE: Object.freeze({ hex: 0x0107, status: 500, message: "Index tree is not initialized" }),
|
|
19
|
+
NULL_SYSTEM: Object.freeze({ hex: 0x0108, status: 500, message: "Tree is not bound to a system" }),
|
|
20
|
+
BARRIER_UNSUPPORTED: Object.freeze({ hex: 0x0109, status: 500, message: "Process-wide memory barrier unavailable" }),
|
|
21
|
+
STORAGE_IO: Object.freeze({ hex: 0x1000, status: 500, message: "Storage I/O error" }),
|
|
22
|
+
DISK_FULL: Object.freeze({ hex: 0x1001, status: 503, message: "Disk storage is full" }),
|
|
23
|
+
FILE_NOT_FOUND: Object.freeze({ hex: 0x1002, status: 404, message: "File not found" }),
|
|
24
|
+
PERMISSION_DENIED: Object.freeze({ hex: 0x1003, status: 403, message: "Permission denied" }),
|
|
25
|
+
FILE_CORRUPT: Object.freeze({ hex: 0x1004, status: 500, message: "File is corrupted" }),
|
|
26
|
+
MMAP_FAILED: Object.freeze({ hex: 0x1005, status: 500, message: "Memory mapping failed" }),
|
|
27
|
+
FSYNC_FAILED: Object.freeze({ hex: 0x1006, status: 500, message: "File sync failed" }),
|
|
28
|
+
LOCK_FAILED: Object.freeze({ hex: 0x1007, status: 409, message: "File lock failed" }),
|
|
29
|
+
NOT_A_DATABASE: Object.freeze({ hex: 0x1008, status: 500, message: "File is not a database" }),
|
|
30
|
+
OLD_FORMAT: Object.freeze({ hex: 0x1009, status: 500, message: "Database file is in an older format than this build reads" }),
|
|
31
|
+
NEWER_FORMAT: Object.freeze({ hex: 0x100A, status: 500, message: "Database file is in a newer format than this build reads" }),
|
|
32
|
+
OUT_OF_MEMORY: Object.freeze({ hex: 0x2000, status: 503, message: "Out of memory" }),
|
|
33
|
+
BUFFER_TOO_SMALL: Object.freeze({ hex: 0x2001, status: 500, message: "Buffer too small" }),
|
|
34
|
+
ALLOCATOR_FAULT: Object.freeze({ hex: 0x2002, status: 500, message: "Memory allocator fault" }),
|
|
35
|
+
TRANSACTION_CONFLICT: Object.freeze({ hex: 0x3000, status: 409, message: "Transaction conflict, please retry" }),
|
|
36
|
+
RETRY: Object.freeze({ hex: 0x3001, status: 409, message: "Operation should be retried" }),
|
|
37
|
+
TRANSACTION_READ_ONLY: Object.freeze({ hex: 0x3002, status: 403, message: "Transaction is read-only" }),
|
|
38
|
+
TRANSACTION_NOT_FOUND: Object.freeze({ hex: 0x3003, status: 404, message: "Transaction not found" }),
|
|
39
|
+
DEADLOCK_DETECTED: Object.freeze({ hex: 0x3004, status: 409, message: "Deadlock detected" }),
|
|
40
|
+
TIMEOUT: Object.freeze({ hex: 0x3005, status: 504, message: "Operation timed out" }),
|
|
41
|
+
NO_ACTIVE_TRANSACTION: Object.freeze({ hex: 0x3006, status: 400, message: "No active transaction" }),
|
|
42
|
+
LWW_STALE: Object.freeze({ hex: 0x3007, status: 409, message: "A newer version exists" }),
|
|
43
|
+
CANCELLED: Object.freeze({ hex: 0x3008, status: 409, message: "Operation cancelled" }),
|
|
44
|
+
KEY_NOT_FOUND: Object.freeze({ hex: 0x4000, status: 404, message: "Key not found" }),
|
|
45
|
+
KEY_TOO_LARGE: Object.freeze({ hex: 0x4001, status: 400, message: "Key exceeds maximum size" }),
|
|
46
|
+
VALUE_TOO_LARGE: Object.freeze({ hex: 0x4002, status: 413, message: "Value exceeds maximum size" }),
|
|
47
|
+
KEY_EMPTY: Object.freeze({ hex: 0x4003, status: 400, message: "Key cannot be empty" }),
|
|
48
|
+
KEY_EXISTS: Object.freeze({ hex: 0x4004, status: 409, message: "Key already exists" }),
|
|
49
|
+
MISSING_INDEX: Object.freeze({ hex: 0x4005, status: 400, message: "Required index not found" }),
|
|
50
|
+
OWNERSHIP_REQUIRED: Object.freeze({ hex: 0x4006, status: 403, message: "Record ownership required" }),
|
|
51
|
+
KEY_PREFIX_COLLISION: Object.freeze({ hex: 0x4007, status: 409, message: "Key prefix collision" }),
|
|
52
|
+
KEY_DELETED: Object.freeze({ hex: 0x4008, status: 404, message: "Key was deleted" }),
|
|
53
|
+
UNIQUE: Object.freeze({ hex: 0x4009, status: 409, message: "A unique field already holds the value" }),
|
|
54
|
+
ID_RESERVED: Object.freeze({ hex: 0x400A, status: 400, message: "_id is assigned by the collection; use put(doc) to choose an id" }),
|
|
55
|
+
INVALID_ID: Object.freeze({ hex: 0x400B, status: 400, message: "_id names no document: it must be a base62 id string or a positive whole number" }),
|
|
56
|
+
ID_MISMATCH: Object.freeze({ hex: 0x400C, status: 400, message: "the body's _id is not the id in the path" }),
|
|
57
|
+
INDEX_DUPLICATES: Object.freeze({ hex: 0x400D, status: 409, message: "documents already share a value of the field: it cannot be declared unique" }),
|
|
58
|
+
FIELD_IDS_EXHAUSTED: Object.freeze({ hex: 0x400E, status: 507, message: "every index field id of the collection is taken: a member of this document that a wildcard index rule covers cannot be keyed, so nothing was written" }),
|
|
59
|
+
ID_PAST_ROWS: Object.freeze({ hex: 0x400F, status: 507, message: "the collection is a table SQL made, whose row is its id: an id of 2^32 - 1 or more has no row, so nothing was written" }),
|
|
60
|
+
ID_NOT_ISSUED: Object.freeze({ hex: 0x4010, status: 400, message: "the collection is a table SQL made, whose row is its id: a given id is taken only once its generator issued it, so nothing was written" }),
|
|
61
|
+
ENGINE_GATE_HELD: Object.freeze({ hex: 0x4011, status: 500, message: "a writer of a table SQL made ran inside the SQL engine's gate as a reader: the engine cannot wait for its own reader" }),
|
|
62
|
+
ROW_STALE: Object.freeze({ hex: 0x4012, status: 409, message: "the document changed since this row was read: nothing was written, and the row now holds the document as it is; read it and write again" }),
|
|
63
|
+
CURSOR_EXHAUSTED: Object.freeze({ hex: 0x5000, status: 200, message: "Cursor exhausted" }),
|
|
64
|
+
CURSOR_INVALIDATED: Object.freeze({ hex: 0x5001, status: 409, message: "Cursor invalidated" }),
|
|
65
|
+
INVALID_RANGE: Object.freeze({ hex: 0x5002, status: 400, message: "Invalid range" }),
|
|
66
|
+
BATCH_OP_FAILED: Object.freeze({ hex: 0x5003, status: 500, message: "Batch operation failed" }),
|
|
67
|
+
NODE_NOT_FOUND: Object.freeze({ hex: 0x6000, status: 404, message: "Node not found" }),
|
|
68
|
+
EDGE_NOT_FOUND: Object.freeze({ hex: 0x6001, status: 404, message: "Edge not found" }),
|
|
69
|
+
PROPERTY_NOT_FOUND: Object.freeze({ hex: 0x6002, status: 404, message: "Property not found" }),
|
|
70
|
+
INVALID_EDGE: Object.freeze({ hex: 0x6003, status: 400, message: "Invalid edge" }),
|
|
71
|
+
PATH_NOT_FOUND: Object.freeze({ hex: 0x6004, status: 404, message: "Path not found" }),
|
|
72
|
+
GRAPH_CYCLE_DETECTED: Object.freeze({ hex: 0x6005, status: 409, message: "Cycle detected" }),
|
|
73
|
+
DIMENSION_MISMATCH: Object.freeze({ hex: 0x7000, status: 400, message: "Dimension mismatch" }),
|
|
74
|
+
POINT_NOT_FOUND: Object.freeze({ hex: 0x7001, status: 404, message: "Point not found" }),
|
|
75
|
+
INVALID_BOUNDS: Object.freeze({ hex: 0x7002, status: 400, message: "Invalid bounds" }),
|
|
76
|
+
INVALID_RADIUS: Object.freeze({ hex: 0x7003, status: 400, message: "Invalid radius" }),
|
|
77
|
+
SCHEMA_VIOLATION: Object.freeze({ hex: 0x8000, status: 400, message: "Schema violation" }),
|
|
78
|
+
TYPE_MISMATCH: Object.freeze({ hex: 0x8001, status: 400, message: "Type mismatch" }),
|
|
79
|
+
CONSTRAINT_VIOLATION: Object.freeze({ hex: 0x8002, status: 409, message: "Constraint violation" }),
|
|
80
|
+
TOO_MANY_FIELDS: Object.freeze({ hex: 0x8003, status: 400, message: "a collection names at most 4096 distinct fields (the keys of a document and of every object inside it, together); this document would need more" }),
|
|
81
|
+
SCHEMA_REFUSED: Object.freeze({ hex: 0x8004, status: 400, message: "The document does not match the collection's schema" }),
|
|
82
|
+
SCHEMA_VIOLATORS: Object.freeze({ hex: 0x8005, status: 409, message: "stored documents already break the constraint: it is not declared" }),
|
|
83
|
+
SECRET_FIELD: Object.freeze({ hex: 0x8006, status: 400, message: "a secret field cannot be filtered, sorted, grouped, aggregated, joined on or selected by name" }),
|
|
84
|
+
TYPE_TAG_NOT_FIRST: Object.freeze({ hex: 0x8007, status: 400, message: "the $type tag must be the first member of its object" }),
|
|
85
|
+
STORAGE_QUOTA_EXCEEDED: Object.freeze({ hex: 0x9000, status: 507, message: "Storage quota exceeded" }),
|
|
86
|
+
DOCUMENT_QUOTA_EXCEEDED: Object.freeze({ hex: 0x9001, status: 507, message: "Document quota exceeded" }),
|
|
87
|
+
BANDWIDTH_QUOTA_EXCEEDED: Object.freeze({ hex: 0x9002, status: 429, message: "Bandwidth quota exceeded" }),
|
|
88
|
+
RATE_LIMIT_EXCEEDED: Object.freeze({ hex: 0x9003, status: 429, message: "Rate limit exceeded. Please slow down." }),
|
|
89
|
+
REQUEST_TOO_LARGE: Object.freeze({ hex: 0x9004, status: 413, message: "Request payload too large" }),
|
|
90
|
+
CONCURRENT_LIMIT: Object.freeze({ hex: 0x9005, status: 429, message: "Concurrent request limit exceeded" }),
|
|
91
|
+
COLLECTION_LIMIT: Object.freeze({ hex: 0x9006, status: 413, message: "Collection limit exceeded" }),
|
|
92
|
+
INDEX_LIMIT: Object.freeze({ hex: 0x9007, status: 413, message: "Index limit exceeded" }),
|
|
93
|
+
FUNCTION_LIMIT: Object.freeze({ hex: 0x9008, status: 429, message: "Cloud function limit exceeded" }),
|
|
94
|
+
CF_CPU_TIMEOUT: Object.freeze({ hex: 0x9009, status: 408, message: "Cloud function exceeded CPU time limit" }),
|
|
95
|
+
CF_MEMORY_EXCEEDED: Object.freeze({ hex: 0x900A, status: 413, message: "Cloud function exceeded memory limit" }),
|
|
96
|
+
CF_EXECUTION_FAILED: Object.freeze({ hex: 0x900B, status: 500, message: "Cloud function execution error" }),
|
|
97
|
+
SERVER_BUSY: Object.freeze({ hex: 0x900C, status: 503, message: "The server is busy; retry shortly" }),
|
|
98
|
+
CF_TENANT_MEMORY: Object.freeze({ hex: 0x900D, status: 503, message: "The tenant's function memory budget is full; retry shortly" }),
|
|
99
|
+
CF_WALL_TIMEOUT: Object.freeze({ hex: 0x900E, status: 504, message: "Cloud function exceeded its wall-clock limit" }),
|
|
100
|
+
CF_SERVER_MEMORY: Object.freeze({ hex: 0x900F, status: 503, message: "The server is low on memory and starts no new function container; retry shortly" }),
|
|
101
|
+
KEY_RATE_LIMIT_EXCEEDED: Object.freeze({ hex: 0x9010, status: 429, message: "This key's own request rate limit is exceeded" }),
|
|
102
|
+
REALTIME_LIMIT: Object.freeze({ hex: 0x9011, status: 429, message: "This tenant's realtime_connections_limit is at its cap" }),
|
|
103
|
+
CRON_LIMIT: Object.freeze({ hex: 0x9012, status: 429, message: "This tenant's cron_limit is at its cap" }),
|
|
104
|
+
SPACE_FULL: Object.freeze({ hex: 0x9013, status: 507, message: "The account's space is full: free space (delete data or an app) or raise the account's space" }),
|
|
105
|
+
TOKEN_EXPIRED: Object.freeze({ hex: 0xA000, status: 401, message: "Authentication token has expired" }),
|
|
106
|
+
TOKEN_INVALID: Object.freeze({ hex: 0xA001, status: 401, message: "Invalid authentication token" }),
|
|
107
|
+
TOKEN_REVOKED: Object.freeze({ hex: 0xA002, status: 401, message: "Authentication token has been revoked" }),
|
|
108
|
+
SESSION_EXPIRED: Object.freeze({ hex: 0xA003, status: 401, message: "Session has expired" }),
|
|
109
|
+
ACCOUNT_SUSPENDED: Object.freeze({ hex: 0xA004, status: 403, message: "Account has been suspended" }),
|
|
110
|
+
TENANT_SUSPENDED: Object.freeze({ hex: 0xA005, status: 403, message: "Tenant has been suspended" }),
|
|
111
|
+
IP_BLOCKED: Object.freeze({ hex: 0xA006, status: 403, message: "IP address is blocked" }),
|
|
112
|
+
INSUFFICIENT_PERMISSIONS: Object.freeze({ hex: 0xA007, status: 403, message: "Insufficient permissions for this operation" }),
|
|
113
|
+
CREDENTIAL_REQUIRED: Object.freeze({ hex: 0xA008, status: 401, message: "Authentication credentials required" }),
|
|
114
|
+
OAUTH_INVALID: Object.freeze({ hex: 0xA009, status: 401, message: "Invalid OAuth token or code" }),
|
|
115
|
+
PROVIDER_NOT_CONFIGURED: Object.freeze({ hex: 0xA00A, status: 409, message: "Authentication provider not configured" }),
|
|
116
|
+
PROVIDER_DISABLED: Object.freeze({ hex: 0xA00B, status: 403, message: "Authentication provider is disabled" }),
|
|
117
|
+
TENANT_READ_ONLY: Object.freeze({ hex: 0xA00C, status: 423, message: "Tenant is read-only: writes are refused" }),
|
|
118
|
+
APPROVAL_REQUIRED: Object.freeze({ hex: 0xA00D, status: 403, message: "This call is irreversible and a person must approve it: show the person approve_url, and once they approve, repeat the same call" }),
|
|
119
|
+
APPROVAL_INVALID: Object.freeze({ hex: 0xA00E, status: 403, message: "No such approval" }),
|
|
120
|
+
APPROVAL_DENIED: Object.freeze({ hex: 0xA00F, status: 403, message: "A person denied this call; a repeat is refused until the approval lapses" }),
|
|
121
|
+
AGENT_BUDGET_EXHAUSTED: Object.freeze({ hex: 0xA010, status: 403, message: "This agent session spent its request budget (its own or one of its parents')" }),
|
|
122
|
+
KEY_BUDGET_EXHAUSTED: Object.freeze({ hex: 0xA011, status: 403, message: "This key spent its own request budget" }),
|
|
123
|
+
EMAIL_VERIFICATION_REQUIRED: Object.freeze({ hex: 0xA012, status: 403, message: "Verify your email address to continue" }),
|
|
124
|
+
LIVE_BY_PROMOTE: Object.freeze({ hex: 0xA013, status: 409, message: "This app changes only by promote: change its dev sandbox and promote the version" }),
|
|
125
|
+
TENANT_MOVED: Object.freeze({ hex: 0xA014, status: 308, message: "This app moved to another server: send the request to the address in Location" }),
|
|
126
|
+
GRANT_REQUIRED: Object.freeze({ hex: 0xA015, status: 403, message: "This app has not been granted the capability the call needs; the system admin grants it (tenant.update grants)" }),
|
|
127
|
+
KEY_ORIGIN_REFUSED: Object.freeze({ hex: 0xA016, status: 403, message: "A publishable key is refused here: the request's Origin is not one of its origins, or the route does not take one" }),
|
|
128
|
+
APPROVAL_PENDING: Object.freeze({ hex: 0xA017, status: 403, message: "No person has approved this call yet: show the person approve_url, and once they approve, repeat the same call" }),
|
|
129
|
+
APPROVAL_SPENT: Object.freeze({ hex: 0xA018, status: 403, message: "This exact call already ran with its approval; a repeat is refused until the approval lapses" }),
|
|
130
|
+
APPROVAL_EXPIRED: Object.freeze({ hex: 0xA019, status: 403, message: "The approval lapsed before it was used: repeat the call without it to ask again" }),
|
|
131
|
+
APPROVAL_MISMATCH: Object.freeze({ hex: 0xA01A, status: 403, message: "The approval names another call or another session: it works only for the exact call that asked for it" }),
|
|
132
|
+
WEBHOOK_SIGNATURE_INVALID: Object.freeze({ hex: 0xA01B, status: 400, message: "The payment provider webhook's signature does not verify" }),
|
|
133
|
+
BILLING_NOT_SET_UP: Object.freeze({ hex: 0xA01C, status: 503, message: "Billing is not set up: the payment provider's keys are not set" }),
|
|
134
|
+
QUERY_TOO_COMPLEX: Object.freeze({ hex: 0xB000, status: 400, message: "Query is too complex" }),
|
|
135
|
+
QUERY_TIMEOUT: Object.freeze({ hex: 0xB001, status: 504, message: "Query execution timed out" }),
|
|
136
|
+
RESULT_SET_TOO_LARGE: Object.freeze({ hex: 0xB002, status: 413, message: "Result set exceeds maximum size" }),
|
|
137
|
+
SORT_LIMIT_EXCEEDED: Object.freeze({ hex: 0xB003, status: 400, message: "Sort operation exceeds limit" }),
|
|
138
|
+
SCAN_LIMIT_EXCEEDED: Object.freeze({ hex: 0xB004, status: 400, message: "Scan operation exceeds limit" }),
|
|
139
|
+
INVALID_QUERY_SYNTAX: Object.freeze({ hex: 0xB005, status: 400, message: "Invalid query syntax" }),
|
|
140
|
+
SQL_FAILED: Object.freeze({ hex: 0xB006, status: 400, message: "The SQL statement did not parse or run" }),
|
|
141
|
+
TENANT_NOT_FOUND: Object.freeze({ hex: 0xC000, status: 404, message: "Tenant not found" }),
|
|
142
|
+
TENANT_ALREADY_EXISTS: Object.freeze({ hex: 0xC001, status: 409, message: "Tenant already exists" }),
|
|
143
|
+
TENANT_INVALID: Object.freeze({ hex: 0xC002, status: 400, message: "Invalid tenant" }),
|
|
144
|
+
TENANT_CANNOT_DROP_DEFAULT: Object.freeze({ hex: 0xC003, status: 403, message: "Cannot drop the default tenant" }),
|
|
145
|
+
COLLECTION_NOT_FOUND: Object.freeze({ hex: 0xC004, status: 404, message: "Collection not found" }),
|
|
146
|
+
COLLECTION_ALREADY_EXISTS: Object.freeze({ hex: 0xC005, status: 409, message: "Collection already exists" }),
|
|
147
|
+
FUNCTION_NOT_FOUND: Object.freeze({ hex: 0xC006, status: 404, message: "Function not found" }),
|
|
148
|
+
THREAD_NOT_FOUND: Object.freeze({ hex: 0xC007, status: 404, message: "Thread not found" }),
|
|
149
|
+
MESSAGE_NOT_FOUND: Object.freeze({ hex: 0xC008, status: 404, message: "Message not found" }),
|
|
150
|
+
DATABASE_ERROR: Object.freeze({ hex: 0xC009, status: 500, message: "Database error" }),
|
|
151
|
+
ACCOUNT_NOT_FOUND: Object.freeze({ hex: 0xC00A, status: 404, message: "Account not found" }),
|
|
152
|
+
ACCOUNT_MEMBER_NOT_FOUND: Object.freeze({ hex: 0xC00B, status: 404, message: "No such member of the account" }),
|
|
153
|
+
ACCOUNT_LAST_OWNER: Object.freeze({ hex: 0xC00C, status: 409, message: "An account keeps at least one owner" }),
|
|
154
|
+
ACCOUNT_HAS_APPS: Object.freeze({ hex: 0xC00D, status: 409, message: "The account still owns apps" }),
|
|
155
|
+
ACCOUNT_LIMIT: Object.freeze({ hex: 0xC00E, status: 409, message: "An account limit is reached" }),
|
|
156
|
+
ACCOUNT_KEY_NOT_FOUND: Object.freeze({ hex: 0xC00F, status: 404, message: "No such key of the account" }),
|
|
157
|
+
ACCOUNT_INVITE_NOT_FOUND: Object.freeze({ hex: 0xC010, status: 404, message: "No such invite, or it was used or revoked" }),
|
|
158
|
+
ACCOUNT_INVITE_EXPIRED: Object.freeze({ hex: 0xC011, status: 409, message: "The invite has expired" }),
|
|
159
|
+
ACCOUNT_INVITE_EMAIL: Object.freeze({ hex: 0xC012, status: 403, message: "The invite is for another verified email address" }),
|
|
160
|
+
UNDO_TOKEN_NOT_FOUND: Object.freeze({ hex: 0xC013, status: 404, message: "No such undo token for this app, or it was used" }),
|
|
161
|
+
UNDO_TOKEN_EXPIRED: Object.freeze({ hex: 0xC014, status: 410, message: "The undo token has expired" }),
|
|
162
|
+
UNDO_RESOURCE_CHANGED: Object.freeze({ hex: 0xC015, status: 409, message: "The resource changed after this undo token was issued" }),
|
|
163
|
+
APP_OWNED_BY_ANOTHER_ACCOUNT: Object.freeze({ hex: 0xC016, status: 409, message: "The app belongs to another account" }),
|
|
164
|
+
KEY_EXPIRED: Object.freeze({ hex: 0xC017, status: 401, message: "The tenant key has expired" }),
|
|
165
|
+
TENANT_KEY_NOT_FOUND: Object.freeze({ hex: 0xC018, status: 404, message: "No such key of the tenant" }),
|
|
166
|
+
TENANT_SLUG_RESERVED: Object.freeze({ hex: 0xC019, status: 409, message: "This slug was renamed away recently and is held for its former account" }),
|
|
167
|
+
TENANT_NOTE_TOO_LONG: Object.freeze({ hex: 0xC01A, status: 400, message: "The suspension note is longer than the 127 bytes the record holds; shorten it (nothing is cut)" }),
|
|
168
|
+
TENANT_JOBS_DISABLED: Object.freeze({ hex: 0xC01B, status: 409, message: "This tenant's background work is switched off; nothing queued is lost and tenant.resume starts it again" }),
|
|
169
|
+
TOOL_BAD_NAME: Object.freeze({ hex: 0xC020, status: 400, message: "A tool's name is 1 to 63 bytes of lowercase letters, digits, '-' and '_', not starting with '-' or '_'" }),
|
|
170
|
+
TOOL_HASH_MISMATCH: Object.freeze({ hex: 0xC021, status: 400, message: "The uploaded bytes do not hash to the declared sha256" }),
|
|
171
|
+
TOOL_BAD_SIZE: Object.freeze({ hex: 0xC022, status: 400, message: "The tool's image is empty or larger than the per-tenant limit" }),
|
|
172
|
+
TOOL_BAD_FORMAT: Object.freeze({ hex: 0xC023, status: 400, message: "The tool's image is not an executable this platform runs" }),
|
|
173
|
+
TOOL_TOO_MANY: Object.freeze({ hex: 0xC024, status: 409, message: "This tenant already has as many tools installed as it may" }),
|
|
174
|
+
TOOL_STORAGE_IO: Object.freeze({ hex: 0xC025, status: 500, message: "The tool's image could not be stored" }),
|
|
175
|
+
TOOL_NOT_INSTALLED: Object.freeze({ hex: 0xC026, status: 404, message: "No such tool version is installed" }),
|
|
176
|
+
TOOL_TOO_MANY_BYTES: Object.freeze({ hex: 0xC027, status: 409, message: "This tenant's installed tool images already total as many bytes as it may" }),
|
|
177
|
+
TOOL_LIMIT_OUT_OF_RANGE: Object.freeze({ hex: 0xC028, status: 400, message: "A tool limit is above the ceiling this platform allows for it" }),
|
|
178
|
+
TOOL_BAD_ARGS: Object.freeze({ hex: 0xC029, status: 400, message: "tool.run's args, env or stdin are not shaped as this operation requires" }),
|
|
179
|
+
TOOL_CONFINEMENT_UNAVAILABLE: Object.freeze({ hex: 0xC02A, status: 503, message: "This host cannot confine a tool process; tool.run never runs one unconfined" }),
|
|
180
|
+
TOOL_SPAWN_FAILED: Object.freeze({ hex: 0xC02B, status: 500, message: "The tool process could not be started" }),
|
|
181
|
+
DIRECT_CHANGES: Object.freeze({ hex: 0xC02C, status: 409, message: "A function deployed outside a version would be overwritten or deleted; send direct:\"replace\" or direct:\"keep\"" }),
|
|
182
|
+
HOST_NOT_FOUND: Object.freeze({ hex: 0xC02D, status: 404, message: "Host not found" }),
|
|
183
|
+
HOST_HAS_NODES: Object.freeze({ hex: 0xC02E, status: 409, message: "The host still carries nodes; move them off it first" }),
|
|
184
|
+
NODE_LABEL_NOT_FOUND: Object.freeze({ hex: 0xC02F, status: 404, message: "Node label not found; node_label.set defines it" }),
|
|
185
|
+
NODE_LABEL_IN_USE: Object.freeze({ hex: 0xC030, status: 409, message: "A host still carries the node label; take it off the host first" }),
|
|
186
|
+
NODE_LABEL_LIMIT: Object.freeze({ hex: 0xC031, status: 409, message: "Every one of the 64 node labels is defined; delete one first" }),
|
|
187
|
+
HOST_CAPABILITY_MISSING: Object.freeze({ hex: 0xC032, status: 409, message: "The host lacks a capability the operation needs (the detail names it); run host.probe first" }),
|
|
188
|
+
HOST_AT_CAPACITY: Object.freeze({ hex: 0xC033, status: 409, message: "The host holds as many apps as its max_tenants allows; raise it or place the app on another host" }),
|
|
189
|
+
HOST_HAS_APPS: Object.freeze({ hex: 0xC034, status: 409, message: "Apps are still placed on the host; tenant.place moves them off it" }),
|
|
190
|
+
SETTING_IS_PLATFORM: Object.freeze({ hex: 0xC035, status: 403, message: "The key is a server-wide platform setting; a system admin sets it with platform.setting.set" }),
|
|
191
|
+
NO_CALL_CONTEXT: Object.freeze({ hex: 0xC036, status: 400, message: "The host call was made outside a function's call: no database or function context is bound" }),
|
|
192
|
+
LEDGER_UNAVAILABLE: Object.freeze({ hex: 0xC037, status: 503, message: "The app's ledger could not be opened" }),
|
|
193
|
+
APP_QUERY_NOT_INDEXED: Object.freeze({ hex: 0xC038, status: 400, message: "An offered query's where field is not declared indexed on its collection (index.create kind collection)" }),
|
|
194
|
+
APP_QUERY_FIELD_NOT_EXPOSED: Object.freeze({ hex: 0xC039, status: 400, message: "The reader names a field the offered query does not select" }),
|
|
195
|
+
APP_USE_UNKNOWN_APP: Object.freeze({ hex: 0xC03A, status: 200, message: "The word names an app that does not exist yet; kept, and refused per call until it does" }),
|
|
196
|
+
SECRET_NOT_FOUND: Object.freeze({ hex: 0xC03B, status: 404, message: "The app has no secret of this key; secret.list names the ones it has" }),
|
|
197
|
+
EDIT_NO_MATCH: Object.freeze({ hex: 0xC03C, status: 409, message: "The unit does not hold the edit's old text as given; read it again (version.unit) and edit what it holds" }),
|
|
198
|
+
EDIT_AMBIGUOUS: Object.freeze({ hex: 0xC03D, status: 400, message: "The edit's old text occurs more than once; give more of the surrounding text, or replace_all" }),
|
|
199
|
+
MODULE_NOT_FOUND: Object.freeze({ hex: 0xC040, status: 400, message: "An import names a file the version does not hold; commit the file or fix the specifier" }),
|
|
200
|
+
IMPORT_OUTSIDE_PROJECT: Object.freeze({ hex: 0xC041, status: 400, message: "An import climbs above the version's root; import only files of the version" }),
|
|
201
|
+
IMPORT_NEEDS_VERSION: Object.freeze({ hex: 0xC042, status: 400, message: "A function deployed outside a version imports a file; ship it in a version (version.commit, then version.live.set)" }),
|
|
202
|
+
PACKAGE_NOT_FOUND: Object.freeze({ hex: 0xC043, status: 400, message: "A bare import names a package the version does not hold under node_modules; add it with package.add" }),
|
|
203
|
+
PACKAGE_NOT_EXPORTED: Object.freeze({ hex: 0xC044, status: 400, message: "The package's \"exports\" names no entry for the imported subpath; import one it exports" }),
|
|
204
|
+
PACKAGE_NOT_ESM: Object.freeze({ hex: 0xC045, status: 400, message: "The package's entry is CommonJS by its own package.json; only ES module packages load" }),
|
|
205
|
+
PACKAGE_MANIFEST_INVALID: Object.freeze({ hex: 0xC046, status: 400, message: "The package's package.json is not a JSON object; add the package again with package.add" }),
|
|
206
|
+
HOST_TAKEN: Object.freeze({ hex: 0xC048, status: 409, message: "Another app holds this host's label (under one root or another); choose another label" }),
|
|
207
|
+
HOST_INVALID: Object.freeze({ hex: 0xC049, status: 400, message: "The host is not <label>.<root domain> with a label of lowercase letters, digits and inner hyphens (1 to 63); the detail says why and suggestion is the nearest valid host" }),
|
|
208
|
+
HOST_RESERVED: Object.freeze({ hex: 0xC04A, status: 409, message: "The label belongs to the platform (www, api, mcp, platform), to an app's own host, or to sandbox hosts (it holds --); choose another label" }),
|
|
209
|
+
ENV_HOST_NOT_FOUND: Object.freeze({ hex: 0xC04B, status: 404, message: "This app has no such host; env.host.list names its hosts" }),
|
|
210
|
+
ENVIRONMENT_NOT_FOUND: Object.freeze({ hex: 0xC04C, status: 404, message: "No such environment: live, a sandbox from sandbox.list, or a host from env.host.list" }),
|
|
211
|
+
ROOT_DOMAIN_UNKNOWN: Object.freeze({ hex: 0xC04D, status: 404, message: "The host is not under a root domain of this platform; env.host.list answers the roots a host may be bound under" }),
|
|
212
|
+
ROOT_DOMAIN_DISABLED: Object.freeze({ hex: 0xC04E, status: 409, message: "The root domain is disabled: no host is bound under it until the platform admin enables it" }),
|
|
213
|
+
ROOT_DOMAIN_IN_USE: Object.freeze({ hex: 0xC04F, status: 409, message: "Test hosts are bound under the root domain (hosts is their count); they are removed with env.host.remove first" }),
|
|
214
|
+
FEATURED_APP_NOT_FOUND: Object.freeze({ hex: 0xC050, status: 404, message: "No featured app has this name; featured.list names every one" }),
|
|
215
|
+
FEATURED_NOT_ENABLED: Object.freeze({ hex: 0xC051, status: 409, message: "The account has not enabled this featured app; featured.enable it first" }),
|
|
216
|
+
FEATURED_NEEDS_PLANS: Object.freeze({ hex: 0xC052, status: 400, message: "Only an app open to other accounts' keys whose plans file has a featured block (title, summary, admin) can be featured" }),
|
|
217
|
+
BILLING_KEY_NOT_TEST: Object.freeze({ hex: 0xC060, status: 503, message: "The payment provider key set is not a test key (sk_test_ or rk_test_); the platform takes test keys only, so nothing was sent" }),
|
|
218
|
+
CART_EMPTY: Object.freeze({ hex: 0xC061, status: 400, message: "The cart buys nothing: name at least one plan in items, or funds" }),
|
|
219
|
+
CART_PLAN_NOT_FOUND: Object.freeze({ hex: 0xC062, status: 400, message: "The app has no plan by this id; billing.catalog lists every plan" }),
|
|
220
|
+
CART_PLAN_NOT_FOR_SALE: Object.freeze({ hex: 0xC063, status: 400, message: "This plan is free: featured.enable or account.plan.change puts the account on it, no cart needed" }),
|
|
221
|
+
CART_APP_REPEATED: Object.freeze({ hex: 0xC064, status: 400, message: "The cart names this app twice; one plan an app" }),
|
|
222
|
+
CART_COVERED: Object.freeze({ hex: 0xC065, status: 400, message: "The cart's Substrio plan already includes this app at this plan or a higher one; take it out" }),
|
|
223
|
+
CART_MIXED: Object.freeze({ hex: 0xC066, status: 400, message: "Every plan in one cart has the first one's currency and interval; buy the other in a cart of its own" }),
|
|
224
|
+
FUNDS_OUT_OF_RANGE: Object.freeze({ hex: 0xC067, status: 400, message: "Funds are from 500 to 1000000 in the minor unit (5.00 to 10,000.00)" }),
|
|
225
|
+
CART_NOT_FOUND: Object.freeze({ hex: 0xC068, status: 404, message: "The account has no cart by this id; billing.cart.create makes one" }),
|
|
226
|
+
CART_CLOSED: Object.freeze({ hex: 0xC069, status: 409, message: "The cart's checkout has started or is paid, so it no longer changes; make a new cart" }),
|
|
227
|
+
CHECKOUT_PERSON_ONLY: Object.freeze({ hex: 0xC06A, status: 403, message: "Paying is the person's own: give them the cart's checkout_url to pay on" }),
|
|
228
|
+
PAYMENT_NOT_DONE: Object.freeze({ hex: 0xC06B, status: 409, message: "The cart is not paid: the person pays on its checkout page (billing.checkout.start), then this call" }),
|
|
229
|
+
PAYMENT_PROCESSING: Object.freeze({ hex: 0xC06C, status: 409, message: "The payment is still being processed by the provider; ask again shortly" }),
|
|
230
|
+
SUBSCRIPTION_NONE: Object.freeze({ hex: 0xC06D, status: 404, message: "The account has no subscription to cancel" }),
|
|
231
|
+
PROVIDER_ANSWER_INVALID: Object.freeze({ hex: 0xC06E, status: 503, message: "The payment provider's answer was not the object asked for (the field names it); nothing was applied, ask again" }),
|
|
232
|
+
MCP_TOOL_NOT_FOUND: Object.freeze({ hex: 0xC080, status: 404, message: "The app's MCP manifest has no tool of this name; mcp.tool.list names the ones it has" }),
|
|
233
|
+
MCP_TOOL_INVALID: Object.freeze({ hex: 0xC081, status: 400, message: "The tool is not one the app's /mcp can serve; field names the member at fault" }),
|
|
234
|
+
MCP_TEST_USER_NOT_FOUND: Object.freeze({ hex: 0xC082, status: 404, message: "The app has no user of this id to call the tool as; user.list names its people" }),
|
|
235
|
+
MCP_TOOL_FROM_ROUTE: Object.freeze({ hex: 0xC083, status: 409, message: "The tool is a route's own; its function takes it out with tools: {\"<route>\": false} (functions/<name>.json)" }),
|
|
236
|
+
KEY_AUTOMATION_NEEDS_PERSON: Object.freeze({ hex: 0xC090, status: 403, message: "Only a person signed in as themselves makes an automation key; a key, an agent or the system key makes agent keys" }),
|
|
237
|
+
PACKAGE_REGISTRY_UNSET: Object.freeze({ hex: 0xC0A0, status: 503, message: "package.add has no registry: the platform setting package_registry_origin is unset" }),
|
|
238
|
+
PACKAGE_UNKNOWN: Object.freeze({ hex: 0xC0A1, status: 404, message: "The registry has no package of that name" }),
|
|
239
|
+
PACKAGE_NAME_INVALID: Object.freeze({ hex: 0xC0A2, status: 400, message: "Not an npm package name: lowercase letters, digits, - . _ ~, an optional @scope/" }),
|
|
240
|
+
PACKAGE_RANGE_INVALID: Object.freeze({ hex: 0xC0A3, status: 400, message: "Not a version, a range or a dist-tag" }),
|
|
241
|
+
PACKAGE_VERSION_NOT_FOUND: Object.freeze({ hex: 0xC0A4, status: 404, message: "No published version of the package meets the range or tag" }),
|
|
242
|
+
PACKAGE_VERSION_CONFLICT: Object.freeze({ hex: 0xC0A5, status: 409, message: "One package name would need two versions; a version holds one of each name" }),
|
|
243
|
+
PACKAGE_REGISTRY_FAILED: Object.freeze({ hex: 0xC0A6, status: 502, message: "The registry could not be reached or answered with an error" }),
|
|
244
|
+
PACKAGE_TARBALL_OUTSIDE_REGISTRY: Object.freeze({ hex: 0xC0A7, status: 502, message: "The registry names a tarball outside its own origin; only the configured registry is fetched from" }),
|
|
245
|
+
PACKAGE_INTEGRITY_MISMATCH: Object.freeze({ hex: 0xC0A8, status: 502, message: "The tarball's SHA-512 is not the registry's dist.integrity, or the registry gives no sha512" }),
|
|
246
|
+
PACKAGE_TARBALL_INVALID: Object.freeze({ hex: 0xC0A9, status: 502, message: "The tarball is not a gzip tar of a package: a link, an unsafe path, or no package.json" }),
|
|
247
|
+
PACKAGE_TOO_LARGE: Object.freeze({ hex: 0xC0AA, status: 413, message: "The package unpacks past 256 MiB, or its metadata past 64 MiB" }),
|
|
248
|
+
TEST_TENANT_REQUIRED: Object.freeze({ hex: 0xC570, status: 403, message: "Only a test tenant (tenant.create test=true) has fetch stubs and a clock" }),
|
|
249
|
+
SERIALIZATION: Object.freeze({ hex: 0xF000, status: 500, message: "Serialization error" }),
|
|
250
|
+
DESERIALIZATION: Object.freeze({ hex: 0xF001, status: 400, message: "Deserialization error" }),
|
|
251
|
+
PIPELINE_TOO_LARGE: Object.freeze({ hex: 0xF002, status: 400, message: "Pipeline too large" }),
|
|
252
|
+
INVALID_JSON: Object.freeze({ hex: 0xF003, status: 400, message: "Invalid JSON" }),
|
|
253
|
+
EMPTY_PAYLOAD: Object.freeze({ hex: 0xF004, status: 400, message: "Request payload is empty" }),
|
|
254
|
+
BODY_REQUIRED: Object.freeze({ hex: 0xF005, status: 400, message: "Request body is required" }),
|
|
255
|
+
METHOD_NOT_ALLOWED: Object.freeze({ hex: 0xF006, status: 405, message: "HTTP method not allowed" }),
|
|
256
|
+
ENDPOINT_NOT_FOUND: Object.freeze({ hex: 0xF007, status: 404, message: "API endpoint not found" }),
|
|
257
|
+
MISSING_FIELD: Object.freeze({ hex: 0xF008, status: 400, message: "Required field is missing" }),
|
|
258
|
+
UNSUPPORTED_OPERATION: Object.freeze({ hex: 0xF009, status: 400, message: "Operation not supported" }),
|
|
259
|
+
NO_WAIT_IN_QUERY: Object.freeze({ hex: 0xF00A, status: 400, message: "Cannot wait inside an open query cursor: $whereJS runs per row while the query holds its position; do the waiting work before or after the query" }),
|
|
260
|
+
NO_WAIT_IN_TRANSACTION: Object.freeze({ hex: 0xF00B, status: 400, message: "Cannot wait inside db.transaction: it holds the database's writer gate for its whole body; do the waiting work before or after the transaction" }),
|
|
261
|
+
NO_WAIT_IN_UPSERT: Object.freeze({ hex: 0xF00C, status: 400, message: "Cannot wait inside an upsert: it holds the collection's upsert gate from its find to its insert; do the waiting work before or after the upsert" }),
|
|
262
|
+
NO_WAIT_IN_ENGINE_GATE: Object.freeze({ hex: 0xF00D, status: 400, message: "Cannot wait for a script transaction inside a query's sink or a registered function's call: it holds the database's engine gate, which the transaction needs to open" }),
|
|
263
|
+
FETCH_FAILED: Object.freeze({ hex: 0xF00E, status: 502, message: "The fetch's upstream could not be reached or broke off" }),
|
|
264
|
+
CRITICAL_SEGFAULT: Object.freeze({ hex: 0xFFFF, status: 500, message: "Critical system failure" }),
|
|
265
|
+
});
|