@primitivedotdev/sdk 0.31.0 → 0.31.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/dist/api/index.d.ts +2 -2
- package/dist/api/index.js +3 -3
- package/dist/{api-CMPC1ByD.js → api-C7hBq-Wd.js} +81 -26
- package/dist/{index-Cbsl8j7G.d.ts → index-C17n15Eq.d.ts} +313 -47
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/openapi/index.js +1 -1
- package/dist/{operations.generated-DsbeO3l-.js → operations.generated-CDIos4wH.js} +769 -94
- package/package.json +1 -1
|
@@ -10,7 +10,7 @@ const openapiDocument = {
|
|
|
10
10
|
"info": {
|
|
11
11
|
"title": "Primitive API",
|
|
12
12
|
"version": "1.0.0",
|
|
13
|
-
"description": "The Primitive API lets you manage domains, emails, webhook endpoints,\nfilters, and account settings programmatically.\n\n## Authentication\n\nMost endpoints require a Bearer token in the `Authorization` header:\n\n```\nAuthorization: Bearer prim_<your_api_key>\n```\n\nAPI keys are org-scoped. Create and manage them in your dashboard\nunder Settings > API Keys. CLI login
|
|
13
|
+
"description": "The Primitive API lets you manage domains, emails, webhook endpoints,\nfilters, and account settings programmatically.\n\n## Authentication\n\nMost endpoints require a Bearer token in the `Authorization` header:\n\n```\nAuthorization: Bearer prim_<your_api_key>\n```\n\nAPI keys are org-scoped. Create and manage them in your dashboard\nunder Settings > API Keys. CLI login plus CLI/agent signup endpoints\nexplicitly declare `security: []`; they do not require an API key because\nthey are used to create OAuth CLI sessions.\n\n## Rate Limiting\n\nThe API enforces a sliding window rate limit of **120 requests per\n60 seconds** per organization. When exceeded, the API returns `429`\nwith a `Retry-After` header indicating how many seconds to wait.\n\n## Pagination\n\nList endpoints use cursor-based pagination. Responses include a\n`meta` object with `total`, `limit`, and `cursor` fields. Pass the\n`cursor` value as a query parameter to fetch the next page. When\n`cursor` is `null`, there are no more results.\n\n## Response Format\n\nAll responses use a consistent envelope:\n\n```json\n{\n \"success\": true,\n \"data\": { ... },\n \"meta\": { \"total\": 42, \"limit\": 50, \"cursor\": \"...\" }\n}\n```\n\nErrors follow the same pattern:\n\n```json\n{\n \"success\": false,\n \"error\": { \"code\": \"not_found\", \"message\": \"Email not found\" }\n}\n```\n\n## Webhook signing\n\nOutbound webhook deliveries (configured via the `endpoints` API)\nare signed so receivers can verify they came from Primitive and\nhave not been tampered with in transit. The signing scheme is\ndeliberately simple so it can be reimplemented in any language\nin a few lines. The Node SDK's `verifyWebhookSignature` helper\nis the reference implementation; the wire details below let you\nwrite a verifier in Python, Go, Ruby, etc. without reading our\nsource.\n\n**Header**: `Primitive-Signature: t=<unix-seconds>,v1=<hex>`\n\nA legacy `MyMX-Signature` header is also sent on every delivery\nwith the same value, retained for back-compatibility with\nintegrations written before the rename. New code should read\n`Primitive-Signature`.\n\n**Signed string**: `${timestamp}.${rawBody}` where `timestamp`\nis the Unix-seconds integer from the `t=` parameter and\n`rawBody` is the exact bytes of the HTTP request body BEFORE\nany JSON decoding. Verify against the raw body, not a\nre-serialized parse, or you will silently mismatch on\ninsignificant whitespace.\n\n**Signature**: HMAC-SHA256 of the signed string, hex-encoded\n(lowercase). Use the account's webhook secret as the HMAC key,\nas a UTF-8 byte sequence.\n\n**Secret**: returned by `GET /account/webhook-secret`. The\nstring looks base64-shaped (e.g. `XNHBBW8VqoBjRfNs1tkZj11jTk...`)\nbut is NOT base64; use it AS-IS as a UTF-8 string for the HMAC\nkey. Base64-decoding before HMAC will silently produce\nmismatched signatures.\n\n**Tolerance**: by convention, reject deliveries whose `t=`\ntimestamp is more than 5 minutes off your wall-clock to defend\nagainst replay attacks. The Node SDK's helper enforces this by\ndefault.\n\n**Verification recipe** (any language):\n\n```\n1. Read the raw HTTP body (do not parse).\n2. Read `Primitive-Signature: t=<ts>,v1=<sig>`.\n3. Reject if abs(now - ts) > 300 seconds.\n4. expected = HMAC_SHA256_hex(secret_utf8, f\"{ts}.{rawBody}\")\n5. Constant-time compare expected to sig. Reject if not equal.\n```\n\nFor Node, use `verifyWebhookSignature` from\n`@primitivedotdev/sdk/webhook` (or the higher-level\n`handleWebhook` helper if you want a one-liner). For other\nlanguages, the recipe above is everything you need.\n\nTest deliveries: `POST /endpoints/{id}/test` triggers a fake\ndelivery to your endpoint URL, signed with your real account\nsecret, so you can confirm verification end-to-end without\nneeding real inbound mail. The test response carries the exact\n`signature` header value sent on the wire so you can compare\nstrings directly.\n",
|
|
14
14
|
"contact": {
|
|
15
15
|
"name": "Primitive",
|
|
16
16
|
"url": "https://primitive.dev"
|
|
@@ -33,6 +33,10 @@ const openapiDocument = {
|
|
|
33
33
|
"name": "CLI",
|
|
34
34
|
"description": "Browser-assisted CLI authentication"
|
|
35
35
|
},
|
|
36
|
+
{
|
|
37
|
+
"name": "Agent",
|
|
38
|
+
"description": "Agent signup and authentication"
|
|
39
|
+
},
|
|
36
40
|
{
|
|
37
41
|
"name": "Account",
|
|
38
42
|
"description": "Manage your account settings, storage, and webhook secret"
|
|
@@ -63,7 +67,7 @@ const openapiDocument = {
|
|
|
63
67
|
},
|
|
64
68
|
{
|
|
65
69
|
"name": "Functions",
|
|
66
|
-
"description": "Deploy JavaScript handlers that run on inbound mail. Each function\nis a single ESM module whose default export is an object with an\nasync `fetch(request, env)` method, in the shape of a Workers-style\nhandler.
|
|
70
|
+
"description": "Deploy JavaScript handlers that run on inbound mail. Each function\nis a single ESM module whose default export is an object with an\nasync `fetch(request, env)` method, in the shape of a Workers-style\nhandler. Primitive signs each delivery and forwards the\n`Primitive-Signature` header to the handler; verify the raw request\nbody with `PRIMITIVE_WEBHOOK_SECRET` before trusting the parsed\n`email.received` event (see `EmailReceivedEvent` and the Webhook\npayload section for the full schema). Code runs on\nPrimitive's edge runtime; there is no infrastructure to manage.\nSecrets land in `env` as encrypted bindings and are refreshed on\nevery redeploy.\n"
|
|
67
71
|
}
|
|
68
72
|
],
|
|
69
73
|
"paths": {
|
|
@@ -96,7 +100,7 @@ const openapiDocument = {
|
|
|
96
100
|
"/cli/login/poll": { "post": {
|
|
97
101
|
"operationId": "pollCliLogin",
|
|
98
102
|
"summary": "Poll CLI browser login",
|
|
99
|
-
"description": "Polls a CLI login session until the browser approval either succeeds,\nis denied, expires, or is polled too quickly. The
|
|
103
|
+
"description": "Polls a CLI login session until the browser approval either succeeds,\nis denied, expires, or is polled too quickly. The OAuth token set is\ncreated only after approval and is returned exactly once.\n",
|
|
100
104
|
"tags": ["CLI"],
|
|
101
105
|
"security": [],
|
|
102
106
|
"requestBody": {
|
|
@@ -105,7 +109,7 @@ const openapiDocument = {
|
|
|
105
109
|
},
|
|
106
110
|
"responses": {
|
|
107
111
|
"200": {
|
|
108
|
-
"description": "CLI login approved and
|
|
112
|
+
"description": "CLI login approved and OAuth token set created",
|
|
109
113
|
"headers": { "Cache-Control": {
|
|
110
114
|
"schema": { "type": "string" },
|
|
111
115
|
"description": "Always `no-store`"
|
|
@@ -246,8 +250,8 @@ const openapiDocument = {
|
|
|
246
250
|
} },
|
|
247
251
|
"/cli/signup/verify": { "post": {
|
|
248
252
|
"operationId": "verifyCliSignup",
|
|
249
|
-
"summary": "Verify CLI signup and create
|
|
250
|
-
"description": "Verifies the email code for a CLI signup session, creates the account,\nredeems the reserved signup code,
|
|
253
|
+
"summary": "Verify CLI signup and create OAuth session",
|
|
254
|
+
"description": "Verifies the email code for a CLI signup session, creates the account,\nredeems the reserved signup code, creates an org-scoped OAuth CLI\nsession, and returns the token set exactly once. This endpoint does not\nrequire an API key.\n",
|
|
251
255
|
"tags": ["CLI"],
|
|
252
256
|
"security": [],
|
|
253
257
|
"requestBody": {
|
|
@@ -256,7 +260,7 @@ const openapiDocument = {
|
|
|
256
260
|
},
|
|
257
261
|
"responses": {
|
|
258
262
|
"200": {
|
|
259
|
-
"description": "CLI signup verified and
|
|
263
|
+
"description": "CLI signup verified and OAuth token set created",
|
|
260
264
|
"headers": { "Cache-Control": {
|
|
261
265
|
"schema": { "type": "string" },
|
|
262
266
|
"description": "Always `no-store`"
|
|
@@ -273,10 +277,106 @@ const openapiDocument = {
|
|
|
273
277
|
"429": { "$ref": "#/components/responses/RateLimited" }
|
|
274
278
|
}
|
|
275
279
|
} },
|
|
280
|
+
"/agent/signup/start": { "post": {
|
|
281
|
+
"operationId": "startAgentSignup",
|
|
282
|
+
"summary": "Start agent account signup",
|
|
283
|
+
"description": "Starts an agent-native signup session. The API validates the signup code,\ncreates a pending signup session, sends an email verification code, and\nreturns an opaque signup token used by the resend and verify steps. This\nendpoint does not require an API key.\n",
|
|
284
|
+
"tags": ["Agent"],
|
|
285
|
+
"security": [],
|
|
286
|
+
"requestBody": {
|
|
287
|
+
"required": true,
|
|
288
|
+
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/StartAgentSignupInput" } } }
|
|
289
|
+
},
|
|
290
|
+
"responses": {
|
|
291
|
+
"201": {
|
|
292
|
+
"description": "Agent signup session created and verification email sent",
|
|
293
|
+
"headers": { "Cache-Control": {
|
|
294
|
+
"schema": { "type": "string" },
|
|
295
|
+
"description": "Always `no-store`"
|
|
296
|
+
} },
|
|
297
|
+
"content": { "application/json": { "schema": { "allOf": [{ "$ref": "#/components/schemas/SuccessEnvelope" }, {
|
|
298
|
+
"type": "object",
|
|
299
|
+
"properties": { "data": { "$ref": "#/components/schemas/AgentSignupStartResult" } }
|
|
300
|
+
}] } } }
|
|
301
|
+
},
|
|
302
|
+
"400": { "$ref": "#/components/responses/ValidationError" },
|
|
303
|
+
"429": { "$ref": "#/components/responses/RateLimited" }
|
|
304
|
+
}
|
|
305
|
+
} },
|
|
306
|
+
"/agent/signup/resend": { "post": {
|
|
307
|
+
"operationId": "resendAgentSignupVerification",
|
|
308
|
+
"summary": "Resend agent signup verification code",
|
|
309
|
+
"description": "Sends a new email verification code for a pending agent signup session.\nThis endpoint does not require an API key.\n",
|
|
310
|
+
"tags": ["Agent"],
|
|
311
|
+
"security": [],
|
|
312
|
+
"requestBody": {
|
|
313
|
+
"required": true,
|
|
314
|
+
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResendAgentSignupVerificationInput" } } }
|
|
315
|
+
},
|
|
316
|
+
"responses": {
|
|
317
|
+
"200": {
|
|
318
|
+
"description": "Verification email resent",
|
|
319
|
+
"headers": { "Cache-Control": {
|
|
320
|
+
"schema": { "type": "string" },
|
|
321
|
+
"description": "Always `no-store`"
|
|
322
|
+
} },
|
|
323
|
+
"content": { "application/json": { "schema": { "allOf": [{ "$ref": "#/components/schemas/SuccessEnvelope" }, {
|
|
324
|
+
"type": "object",
|
|
325
|
+
"properties": { "data": { "$ref": "#/components/schemas/AgentSignupResendResult" } }
|
|
326
|
+
}] } } }
|
|
327
|
+
},
|
|
328
|
+
"400": {
|
|
329
|
+
"description": "Invalid token or expired token",
|
|
330
|
+
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
331
|
+
},
|
|
332
|
+
"429": {
|
|
333
|
+
"description": "Global rate limit exceeded or resend requested too quickly",
|
|
334
|
+
"headers": { "Retry-After": {
|
|
335
|
+
"schema": { "type": "integer" },
|
|
336
|
+
"description": "Seconds to wait before retrying"
|
|
337
|
+
} },
|
|
338
|
+
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
} },
|
|
342
|
+
"/agent/signup/verify": { "post": {
|
|
343
|
+
"operationId": "verifyAgentSignup",
|
|
344
|
+
"summary": "Verify agent signup and create OAuth tokens",
|
|
345
|
+
"description": "Verifies the email code for an agent signup session, creates the account\nwhen needed, redeems the reserved signup code, mints an org-scoped OAuth\nsession for CLI authentication, and returns the raw tokens exactly once.\nFor existing users, the optional `org_id` selects which accessible\nworkspace should receive the new session.\n",
|
|
346
|
+
"tags": ["Agent"],
|
|
347
|
+
"security": [],
|
|
348
|
+
"requestBody": {
|
|
349
|
+
"required": true,
|
|
350
|
+
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/VerifyAgentSignupInput" } } }
|
|
351
|
+
},
|
|
352
|
+
"responses": {
|
|
353
|
+
"200": {
|
|
354
|
+
"description": "Agent signup verified and OAuth tokens created",
|
|
355
|
+
"headers": { "Cache-Control": {
|
|
356
|
+
"schema": { "type": "string" },
|
|
357
|
+
"description": "Always `no-store`"
|
|
358
|
+
} },
|
|
359
|
+
"content": { "application/json": { "schema": { "allOf": [{ "$ref": "#/components/schemas/SuccessEnvelope" }, {
|
|
360
|
+
"type": "object",
|
|
361
|
+
"properties": { "data": { "$ref": "#/components/schemas/AgentSignupVerifyResult" } }
|
|
362
|
+
}] } } }
|
|
363
|
+
},
|
|
364
|
+
"400": {
|
|
365
|
+
"description": "Invalid request, invalid verification code, expired token, invalid signup code, or account creation failure",
|
|
366
|
+
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
367
|
+
},
|
|
368
|
+
"403": { "$ref": "#/components/responses/Forbidden" },
|
|
369
|
+
"409": {
|
|
370
|
+
"description": "Existing account is not in a usable workspace state",
|
|
371
|
+
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } }
|
|
372
|
+
},
|
|
373
|
+
"429": { "$ref": "#/components/responses/RateLimited" }
|
|
374
|
+
}
|
|
375
|
+
} },
|
|
276
376
|
"/cli/logout": { "post": {
|
|
277
377
|
"operationId": "cliLogout",
|
|
278
|
-
"summary": "Revoke the current CLI
|
|
279
|
-
"description": "Revokes the
|
|
378
|
+
"summary": "Revoke the current CLI OAuth session",
|
|
379
|
+
"description": "Revokes the OAuth grant used to authenticate the request. API-key\nauthenticated legacy logout requests succeed without deleting server API\nkeys so old local CLI state can be cleared safely.\n",
|
|
280
380
|
"tags": ["CLI"],
|
|
281
381
|
"requestBody": {
|
|
282
382
|
"required": false,
|
|
@@ -284,7 +384,7 @@ const openapiDocument = {
|
|
|
284
384
|
},
|
|
285
385
|
"responses": {
|
|
286
386
|
"200": {
|
|
287
|
-
"description": "CLI
|
|
387
|
+
"description": "CLI logout completed",
|
|
288
388
|
"content": { "application/json": { "schema": { "allOf": [{ "$ref": "#/components/schemas/SuccessEnvelope" }, {
|
|
289
389
|
"type": "object",
|
|
290
390
|
"properties": { "data": { "$ref": "#/components/schemas/CliLogoutResult" } }
|
|
@@ -1403,7 +1503,7 @@ const openapiDocument = {
|
|
|
1403
1503
|
"get": {
|
|
1404
1504
|
"operationId": "listFunctions",
|
|
1405
1505
|
"summary": "List functions",
|
|
1406
|
-
"description": "Returns every active (non-deleted) function in the org, newest\nfirst. Each entry carries
|
|
1506
|
+
"description": "Returns every active (non-deleted) function in the org, newest\nfirst. Each entry carries deploy status and timestamps. To\ninspect the source code or deploy errors, use `GET /functions/{id}`.\n",
|
|
1407
1507
|
"tags": ["Functions"],
|
|
1408
1508
|
"responses": {
|
|
1409
1509
|
"200": {
|
|
@@ -1422,7 +1522,7 @@ const openapiDocument = {
|
|
|
1422
1522
|
"post": {
|
|
1423
1523
|
"operationId": "createFunction",
|
|
1424
1524
|
"summary": "Deploy a function",
|
|
1425
|
-
"description": "Creates and deploys a new function. The handler must be a single\nESM module whose default export is an object with an async\n`fetch(request, env)` method (Workers-style).
|
|
1525
|
+
"description": "Creates and deploys a new function. The handler must be a single\nESM module whose default export is an object with an async\n`fetch(request, env)` method (Workers-style). Primitive signs\neach delivery and forwards the `Primitive-Signature` header to\nthe handler. Verify the raw request body with\n`PRIMITIVE_WEBHOOK_SECRET` before parsing JSON; after verification\nthe request body parses to an `email.received` event (see\n`EmailReceivedEvent` and the Webhook payload section for the full\nschema). Code is bundled before being uploaded; ship a single\nself-contained file rather than relying on external imports.\n\n**Code limits.** `code` is capped at 1 MiB UTF-8. `sourceMap`\n(optional) is capped at 5 MiB UTF-8, stored with each deployment\nattempt, and sent to the runtime so stack traces can resolve to\noriginal source files.\n\n**Auto-wiring.** On successful deploy, Primitive automatically\ncreates a webhook endpoint that delivers inbound mail to the\nfunction. There is nothing to configure on the Endpoints API\nfor this to work; the internal runtime URL is not returned by\nthe API and is not a customer-facing integration surface.\n\n**Secrets.** New functions ship with the managed secrets\n(`PRIMITIVE_WEBHOOK_SECRET`, `PRIMITIVE_API_KEY`,\n`PRIMITIVE_API_BASE_URL`) already bound. Add user-set secrets via\n`POST /functions/{id}/secrets`; secret writes only land in the\nrunning handler on the next redeploy.\n",
|
|
1426
1526
|
"tags": ["Functions"],
|
|
1427
1527
|
"requestBody": {
|
|
1428
1528
|
"required": true,
|
|
@@ -1591,7 +1691,7 @@ const openapiDocument = {
|
|
|
1591
1691
|
"get": {
|
|
1592
1692
|
"operationId": "listFunctionSecrets",
|
|
1593
1693
|
"summary": "List a function's secrets",
|
|
1594
|
-
"description": "Returns metadata for every secret bound to the function, with\nmanaged entries (provisioned by Primitive) listed first and\nuser-set entries listed alphabetically after. **Values are\nnever returned.** Secret writes are write-only.\n\nManaged entries (e.g. `PRIMITIVE_WEBHOOK_SECRET`,\n`PRIMITIVE_API_KEY`) carry a
|
|
1694
|
+
"description": "Returns metadata for every secret bound to the function, with\nmanaged entries (provisioned by Primitive) listed first and\nuser-set entries listed alphabetically after. **Values are\nnever returned.** Secret writes are write-only.\n\nManaged entries (e.g. `PRIMITIVE_WEBHOOK_SECRET`,\n`PRIMITIVE_API_KEY`, `PRIMITIVE_API_BASE_URL`) carry a\n`description` instead of `created_at` / `updated_at`. They\ncannot be created, updated, or deleted via this API.\n",
|
|
1595
1695
|
"tags": ["Functions"],
|
|
1596
1696
|
"responses": {
|
|
1597
1697
|
"200": {
|
|
@@ -2012,7 +2112,14 @@ const openapiDocument = {
|
|
|
2012
2112
|
"slow_down",
|
|
2013
2113
|
"access_denied",
|
|
2014
2114
|
"expired_token",
|
|
2015
|
-
"invalid_device_code"
|
|
2115
|
+
"invalid_device_code",
|
|
2116
|
+
"invalid_signup_code",
|
|
2117
|
+
"invalid_signup_token",
|
|
2118
|
+
"invalid_verification_code",
|
|
2119
|
+
"email_delivery_failed",
|
|
2120
|
+
"clerk_signup_failed",
|
|
2121
|
+
"no_orgs_for_user",
|
|
2122
|
+
"org_not_accessible"
|
|
2016
2123
|
]
|
|
2017
2124
|
},
|
|
2018
2125
|
"message": { "type": "string" },
|
|
@@ -2196,13 +2303,42 @@ const openapiDocument = {
|
|
|
2196
2303
|
"properties": {
|
|
2197
2304
|
"api_key": {
|
|
2198
2305
|
"type": "string",
|
|
2199
|
-
"description": "
|
|
2306
|
+
"description": "Legacy alias for access_token. New CLI builds should persist access_token and refresh_token."
|
|
2200
2307
|
},
|
|
2201
2308
|
"key_id": {
|
|
2309
|
+
"type": "string",
|
|
2310
|
+
"format": "uuid",
|
|
2311
|
+
"description": "Legacy alias for oauth_grant_id"
|
|
2312
|
+
},
|
|
2313
|
+
"key_prefix": {
|
|
2314
|
+
"type": "string",
|
|
2315
|
+
"description": "Legacy display prefix derived from access_token"
|
|
2316
|
+
},
|
|
2317
|
+
"access_token": {
|
|
2318
|
+
"type": "string",
|
|
2319
|
+
"description": "OAuth access token for CLI API authentication"
|
|
2320
|
+
},
|
|
2321
|
+
"refresh_token": {
|
|
2322
|
+
"type": "string",
|
|
2323
|
+
"description": "OAuth refresh token used by the CLI to renew access"
|
|
2324
|
+
},
|
|
2325
|
+
"token_type": {
|
|
2326
|
+
"type": "string",
|
|
2327
|
+
"enum": ["Bearer"]
|
|
2328
|
+
},
|
|
2329
|
+
"expires_in": {
|
|
2330
|
+
"type": "integer",
|
|
2331
|
+
"description": "Seconds until access_token expires"
|
|
2332
|
+
},
|
|
2333
|
+
"auth_method": {
|
|
2334
|
+
"type": "string",
|
|
2335
|
+
"enum": ["oauth"]
|
|
2336
|
+
},
|
|
2337
|
+
"oauth_grant_id": {
|
|
2202
2338
|
"type": "string",
|
|
2203
2339
|
"format": "uuid"
|
|
2204
2340
|
},
|
|
2205
|
-
"
|
|
2341
|
+
"oauth_client_id": { "type": "string" },
|
|
2206
2342
|
"org_id": {
|
|
2207
2343
|
"type": "string",
|
|
2208
2344
|
"format": "uuid"
|
|
@@ -2213,6 +2349,13 @@ const openapiDocument = {
|
|
|
2213
2349
|
"api_key",
|
|
2214
2350
|
"key_id",
|
|
2215
2351
|
"key_prefix",
|
|
2352
|
+
"access_token",
|
|
2353
|
+
"refresh_token",
|
|
2354
|
+
"token_type",
|
|
2355
|
+
"expires_in",
|
|
2356
|
+
"auth_method",
|
|
2357
|
+
"oauth_grant_id",
|
|
2358
|
+
"oauth_client_id",
|
|
2216
2359
|
"org_id",
|
|
2217
2360
|
"org_name"
|
|
2218
2361
|
]
|
|
@@ -2240,7 +2383,7 @@ const openapiDocument = {
|
|
|
2240
2383
|
"type": "string",
|
|
2241
2384
|
"minLength": 1,
|
|
2242
2385
|
"maxLength": 80,
|
|
2243
|
-
"description": "Human-readable device name used for the created CLI
|
|
2386
|
+
"description": "Human-readable device name used for the created CLI OAuth grant"
|
|
2244
2387
|
},
|
|
2245
2388
|
"metadata": {
|
|
2246
2389
|
"type": "object",
|
|
@@ -2341,24 +2484,49 @@ const openapiDocument = {
|
|
|
2341
2484
|
"maxLength": 1024
|
|
2342
2485
|
}
|
|
2343
2486
|
},
|
|
2344
|
-
"required": [
|
|
2345
|
-
"signup_token",
|
|
2346
|
-
"verification_code",
|
|
2347
|
-
"password"
|
|
2348
|
-
]
|
|
2487
|
+
"required": ["signup_token", "verification_code"]
|
|
2349
2488
|
},
|
|
2350
2489
|
"CliSignupVerifyResult": {
|
|
2351
2490
|
"type": "object",
|
|
2352
2491
|
"properties": {
|
|
2353
2492
|
"api_key": {
|
|
2354
2493
|
"type": "string",
|
|
2355
|
-
"description": "
|
|
2494
|
+
"description": "Legacy alias for access_token. New CLI builds should persist access_token and refresh_token."
|
|
2356
2495
|
},
|
|
2357
2496
|
"key_id": {
|
|
2497
|
+
"type": "string",
|
|
2498
|
+
"format": "uuid",
|
|
2499
|
+
"description": "Legacy alias for oauth_grant_id"
|
|
2500
|
+
},
|
|
2501
|
+
"key_prefix": {
|
|
2502
|
+
"type": "string",
|
|
2503
|
+
"description": "Legacy display prefix derived from access_token"
|
|
2504
|
+
},
|
|
2505
|
+
"access_token": {
|
|
2506
|
+
"type": "string",
|
|
2507
|
+
"description": "OAuth access token for CLI API authentication"
|
|
2508
|
+
},
|
|
2509
|
+
"refresh_token": {
|
|
2510
|
+
"type": "string",
|
|
2511
|
+
"description": "OAuth refresh token used by the CLI to renew access"
|
|
2512
|
+
},
|
|
2513
|
+
"token_type": {
|
|
2514
|
+
"type": "string",
|
|
2515
|
+
"enum": ["Bearer"]
|
|
2516
|
+
},
|
|
2517
|
+
"expires_in": {
|
|
2518
|
+
"type": "integer",
|
|
2519
|
+
"description": "Seconds until access_token expires"
|
|
2520
|
+
},
|
|
2521
|
+
"auth_method": {
|
|
2522
|
+
"type": "string",
|
|
2523
|
+
"enum": ["oauth"]
|
|
2524
|
+
},
|
|
2525
|
+
"oauth_grant_id": {
|
|
2358
2526
|
"type": "string",
|
|
2359
2527
|
"format": "uuid"
|
|
2360
2528
|
},
|
|
2361
|
-
"
|
|
2529
|
+
"oauth_client_id": { "type": "string" },
|
|
2362
2530
|
"org_id": {
|
|
2363
2531
|
"type": "string",
|
|
2364
2532
|
"format": "uuid"
|
|
@@ -2369,17 +2537,229 @@ const openapiDocument = {
|
|
|
2369
2537
|
"api_key",
|
|
2370
2538
|
"key_id",
|
|
2371
2539
|
"key_prefix",
|
|
2540
|
+
"access_token",
|
|
2541
|
+
"refresh_token",
|
|
2542
|
+
"token_type",
|
|
2543
|
+
"expires_in",
|
|
2544
|
+
"auth_method",
|
|
2545
|
+
"oauth_grant_id",
|
|
2546
|
+
"oauth_client_id",
|
|
2372
2547
|
"org_id",
|
|
2373
2548
|
"org_name"
|
|
2374
2549
|
]
|
|
2375
2550
|
},
|
|
2551
|
+
"StartAgentSignupInput": {
|
|
2552
|
+
"type": "object",
|
|
2553
|
+
"additionalProperties": false,
|
|
2554
|
+
"properties": {
|
|
2555
|
+
"email": {
|
|
2556
|
+
"type": "string",
|
|
2557
|
+
"format": "email",
|
|
2558
|
+
"maxLength": 254
|
|
2559
|
+
},
|
|
2560
|
+
"signup_code": {
|
|
2561
|
+
"type": "string",
|
|
2562
|
+
"minLength": 1,
|
|
2563
|
+
"maxLength": 128
|
|
2564
|
+
},
|
|
2565
|
+
"terms_accepted": {
|
|
2566
|
+
"type": "boolean",
|
|
2567
|
+
"const": true,
|
|
2568
|
+
"description": "Must be true to confirm acceptance of Primitive's Terms of Service and Privacy Policy"
|
|
2569
|
+
},
|
|
2570
|
+
"device_name": {
|
|
2571
|
+
"type": "string",
|
|
2572
|
+
"minLength": 1,
|
|
2573
|
+
"maxLength": 80,
|
|
2574
|
+
"description": "Human-readable device name used for the created agent OAuth session"
|
|
2575
|
+
},
|
|
2576
|
+
"metadata": {
|
|
2577
|
+
"type": "object",
|
|
2578
|
+
"additionalProperties": true,
|
|
2579
|
+
"description": "Optional client metadata stored with the signup session; serialized JSON must be 2048 bytes or fewer"
|
|
2580
|
+
}
|
|
2581
|
+
},
|
|
2582
|
+
"required": [
|
|
2583
|
+
"email",
|
|
2584
|
+
"signup_code",
|
|
2585
|
+
"terms_accepted"
|
|
2586
|
+
]
|
|
2587
|
+
},
|
|
2588
|
+
"AgentSignupStartResult": {
|
|
2589
|
+
"type": "object",
|
|
2590
|
+
"properties": {
|
|
2591
|
+
"signup_token": {
|
|
2592
|
+
"type": "string",
|
|
2593
|
+
"description": "Opaque token used to verify or resend the pending agent signup"
|
|
2594
|
+
},
|
|
2595
|
+
"email": {
|
|
2596
|
+
"type": "string",
|
|
2597
|
+
"format": "email"
|
|
2598
|
+
},
|
|
2599
|
+
"expires_in": {
|
|
2600
|
+
"type": "integer",
|
|
2601
|
+
"description": "Seconds until the pending signup expires"
|
|
2602
|
+
},
|
|
2603
|
+
"resend_after": {
|
|
2604
|
+
"type": "integer",
|
|
2605
|
+
"description": "Minimum seconds before requesting another verification email"
|
|
2606
|
+
},
|
|
2607
|
+
"verification_code_length": {
|
|
2608
|
+
"type": "integer",
|
|
2609
|
+
"description": "Number of digits in the emailed verification code"
|
|
2610
|
+
}
|
|
2611
|
+
},
|
|
2612
|
+
"required": [
|
|
2613
|
+
"signup_token",
|
|
2614
|
+
"email",
|
|
2615
|
+
"expires_in",
|
|
2616
|
+
"resend_after",
|
|
2617
|
+
"verification_code_length"
|
|
2618
|
+
]
|
|
2619
|
+
},
|
|
2620
|
+
"ResendAgentSignupVerificationInput": {
|
|
2621
|
+
"type": "object",
|
|
2622
|
+
"additionalProperties": false,
|
|
2623
|
+
"properties": { "signup_token": {
|
|
2624
|
+
"type": "string",
|
|
2625
|
+
"minLength": 1
|
|
2626
|
+
} },
|
|
2627
|
+
"required": ["signup_token"]
|
|
2628
|
+
},
|
|
2629
|
+
"AgentSignupResendResult": {
|
|
2630
|
+
"type": "object",
|
|
2631
|
+
"properties": {
|
|
2632
|
+
"email": {
|
|
2633
|
+
"type": "string",
|
|
2634
|
+
"format": "email"
|
|
2635
|
+
},
|
|
2636
|
+
"expires_in": {
|
|
2637
|
+
"type": "integer",
|
|
2638
|
+
"description": "Seconds until the pending signup expires"
|
|
2639
|
+
},
|
|
2640
|
+
"resend_after": {
|
|
2641
|
+
"type": "integer",
|
|
2642
|
+
"description": "Minimum seconds before requesting another verification email"
|
|
2643
|
+
},
|
|
2644
|
+
"verification_code_length": {
|
|
2645
|
+
"type": "integer",
|
|
2646
|
+
"description": "Number of digits in the emailed verification code"
|
|
2647
|
+
}
|
|
2648
|
+
},
|
|
2649
|
+
"required": [
|
|
2650
|
+
"email",
|
|
2651
|
+
"expires_in",
|
|
2652
|
+
"resend_after",
|
|
2653
|
+
"verification_code_length"
|
|
2654
|
+
]
|
|
2655
|
+
},
|
|
2656
|
+
"VerifyAgentSignupInput": {
|
|
2657
|
+
"type": "object",
|
|
2658
|
+
"additionalProperties": false,
|
|
2659
|
+
"properties": {
|
|
2660
|
+
"signup_token": {
|
|
2661
|
+
"type": "string",
|
|
2662
|
+
"minLength": 1
|
|
2663
|
+
},
|
|
2664
|
+
"verification_code": {
|
|
2665
|
+
"type": "string",
|
|
2666
|
+
"minLength": 1,
|
|
2667
|
+
"maxLength": 32
|
|
2668
|
+
},
|
|
2669
|
+
"org_id": {
|
|
2670
|
+
"type": "string",
|
|
2671
|
+
"format": "uuid",
|
|
2672
|
+
"description": "Optional workspace id to target when the verified email already belongs to multiple workspaces"
|
|
2673
|
+
}
|
|
2674
|
+
},
|
|
2675
|
+
"required": ["signup_token", "verification_code"]
|
|
2676
|
+
},
|
|
2677
|
+
"AgentOrgRef": {
|
|
2678
|
+
"type": "object",
|
|
2679
|
+
"properties": {
|
|
2680
|
+
"id": {
|
|
2681
|
+
"type": "string",
|
|
2682
|
+
"format": "uuid"
|
|
2683
|
+
},
|
|
2684
|
+
"name": { "type": ["string", "null"] }
|
|
2685
|
+
},
|
|
2686
|
+
"required": ["id", "name"]
|
|
2687
|
+
},
|
|
2688
|
+
"AgentSignupVerifyResult": {
|
|
2689
|
+
"type": "object",
|
|
2690
|
+
"properties": {
|
|
2691
|
+
"api_key": {
|
|
2692
|
+
"type": "string",
|
|
2693
|
+
"description": "Legacy alias for access_token. New CLI builds should persist access_token and refresh_token."
|
|
2694
|
+
},
|
|
2695
|
+
"key_id": {
|
|
2696
|
+
"type": "string",
|
|
2697
|
+
"format": "uuid",
|
|
2698
|
+
"description": "Legacy alias for oauth_grant_id"
|
|
2699
|
+
},
|
|
2700
|
+
"key_prefix": {
|
|
2701
|
+
"type": "string",
|
|
2702
|
+
"description": "Legacy display prefix derived from access_token"
|
|
2703
|
+
},
|
|
2704
|
+
"access_token": {
|
|
2705
|
+
"type": "string",
|
|
2706
|
+
"description": "OAuth access token for CLI API authentication"
|
|
2707
|
+
},
|
|
2708
|
+
"refresh_token": {
|
|
2709
|
+
"type": "string",
|
|
2710
|
+
"description": "OAuth refresh token used by the CLI to renew access"
|
|
2711
|
+
},
|
|
2712
|
+
"token_type": {
|
|
2713
|
+
"type": "string",
|
|
2714
|
+
"enum": ["Bearer"]
|
|
2715
|
+
},
|
|
2716
|
+
"expires_in": {
|
|
2717
|
+
"type": "integer",
|
|
2718
|
+
"description": "Seconds until access_token expires"
|
|
2719
|
+
},
|
|
2720
|
+
"auth_method": {
|
|
2721
|
+
"type": "string",
|
|
2722
|
+
"enum": ["oauth"]
|
|
2723
|
+
},
|
|
2724
|
+
"oauth_grant_id": {
|
|
2725
|
+
"type": "string",
|
|
2726
|
+
"format": "uuid"
|
|
2727
|
+
},
|
|
2728
|
+
"oauth_client_id": { "type": "string" },
|
|
2729
|
+
"org_id": {
|
|
2730
|
+
"type": "string",
|
|
2731
|
+
"format": "uuid"
|
|
2732
|
+
},
|
|
2733
|
+
"org_name": { "type": ["string", "null"] },
|
|
2734
|
+
"orgs": {
|
|
2735
|
+
"type": "array",
|
|
2736
|
+
"items": { "$ref": "#/components/schemas/AgentOrgRef" },
|
|
2737
|
+
"description": "Workspaces available to the verified email. The minted session targets `org_id`."
|
|
2738
|
+
}
|
|
2739
|
+
},
|
|
2740
|
+
"required": [
|
|
2741
|
+
"api_key",
|
|
2742
|
+
"key_id",
|
|
2743
|
+
"key_prefix",
|
|
2744
|
+
"access_token",
|
|
2745
|
+
"refresh_token",
|
|
2746
|
+
"token_type",
|
|
2747
|
+
"expires_in",
|
|
2748
|
+
"auth_method",
|
|
2749
|
+
"oauth_grant_id",
|
|
2750
|
+
"oauth_client_id",
|
|
2751
|
+
"org_id",
|
|
2752
|
+
"org_name",
|
|
2753
|
+
"orgs"
|
|
2754
|
+
]
|
|
2755
|
+
},
|
|
2376
2756
|
"CliLogoutInput": {
|
|
2377
2757
|
"type": "object",
|
|
2378
2758
|
"additionalProperties": false,
|
|
2379
2759
|
"properties": { "key_id": {
|
|
2380
2760
|
"type": "string",
|
|
2381
2761
|
"format": "uuid",
|
|
2382
|
-
"description": "Optional
|
|
2762
|
+
"description": "Optional id guard; when provided it must match the authenticated OAuth grant id or API key id"
|
|
2383
2763
|
} }
|
|
2384
2764
|
},
|
|
2385
2765
|
"CliLogoutResult": {
|
|
@@ -2387,14 +2767,20 @@ const openapiDocument = {
|
|
|
2387
2767
|
"properties": {
|
|
2388
2768
|
"revoked": {
|
|
2389
2769
|
"type": "boolean",
|
|
2390
|
-
"
|
|
2770
|
+
"description": "True when an OAuth grant was revoked. False for API-key-authenticated legacy logout, which only clears local CLI state."
|
|
2391
2771
|
},
|
|
2392
2772
|
"key_id": {
|
|
2393
2773
|
"type": "string",
|
|
2394
|
-
"format": "uuid"
|
|
2774
|
+
"format": "uuid",
|
|
2775
|
+
"description": "API key id for API-key-authenticated legacy logout"
|
|
2776
|
+
},
|
|
2777
|
+
"oauth_grant_id": {
|
|
2778
|
+
"type": "string",
|
|
2779
|
+
"format": "uuid",
|
|
2780
|
+
"description": "OAuth grant id revoked by OAuth-authenticated logout"
|
|
2395
2781
|
}
|
|
2396
2782
|
},
|
|
2397
|
-
"required": ["revoked"
|
|
2783
|
+
"required": ["revoked"]
|
|
2398
2784
|
},
|
|
2399
2785
|
"Account": {
|
|
2400
2786
|
"type": "object",
|
|
@@ -3757,11 +4143,6 @@ const openapiDocument = {
|
|
|
3757
4143
|
"format": "date-time",
|
|
3758
4144
|
"description": "Timestamp of the most recent successful deploy. Null until the first deploy succeeds."
|
|
3759
4145
|
},
|
|
3760
|
-
"gateway_url": {
|
|
3761
|
-
"type": "string",
|
|
3762
|
-
"format": "uri",
|
|
3763
|
-
"description": "URL the platform's webhook delivery loop posts to in order\nto invoke the function. Reference only; not directly\ncallable from outside.\n"
|
|
3764
|
-
},
|
|
3765
4146
|
"created_at": {
|
|
3766
4147
|
"type": "string",
|
|
3767
4148
|
"format": "date-time"
|
|
@@ -3775,7 +4156,6 @@ const openapiDocument = {
|
|
|
3775
4156
|
"id",
|
|
3776
4157
|
"name",
|
|
3777
4158
|
"deploy_status",
|
|
3778
|
-
"gateway_url",
|
|
3779
4159
|
"created_at",
|
|
3780
4160
|
"updated_at"
|
|
3781
4161
|
]
|
|
@@ -3799,12 +4179,8 @@ const openapiDocument = {
|
|
|
3799
4179
|
"description": "Error message from the most recent failed deploy, or null\nafter a successful deploy. Surface this to users to explain\na `failed` status without polling.\n"
|
|
3800
4180
|
},
|
|
3801
4181
|
"deployed_at": {
|
|
3802
|
-
"type": ["string", "null"],
|
|
3803
|
-
"format": "date-time"
|
|
3804
|
-
},
|
|
3805
|
-
"gateway_url": {
|
|
3806
|
-
"type": "string",
|
|
3807
|
-
"format": "uri"
|
|
4182
|
+
"type": ["string", "null"],
|
|
4183
|
+
"format": "date-time"
|
|
3808
4184
|
},
|
|
3809
4185
|
"created_at": {
|
|
3810
4186
|
"type": "string",
|
|
@@ -3820,7 +4196,6 @@ const openapiDocument = {
|
|
|
3820
4196
|
"name",
|
|
3821
4197
|
"code",
|
|
3822
4198
|
"deploy_status",
|
|
3823
|
-
"gateway_url",
|
|
3824
4199
|
"created_at",
|
|
3825
4200
|
"updated_at"
|
|
3826
4201
|
]
|
|
@@ -3858,17 +4233,12 @@ const openapiDocument = {
|
|
|
3858
4233
|
"format": "uuid"
|
|
3859
4234
|
},
|
|
3860
4235
|
"name": { "type": "string" },
|
|
3861
|
-
"deploy_status": { "$ref": "#/components/schemas/FunctionDeployStatus" }
|
|
3862
|
-
"gateway_url": {
|
|
3863
|
-
"type": "string",
|
|
3864
|
-
"format": "uri"
|
|
3865
|
-
}
|
|
4236
|
+
"deploy_status": { "$ref": "#/components/schemas/FunctionDeployStatus" }
|
|
3866
4237
|
},
|
|
3867
4238
|
"required": [
|
|
3868
4239
|
"id",
|
|
3869
4240
|
"name",
|
|
3870
|
-
"deploy_status"
|
|
3871
|
-
"gateway_url"
|
|
4241
|
+
"deploy_status"
|
|
3872
4242
|
]
|
|
3873
4243
|
},
|
|
3874
4244
|
"UpdateFunctionInput": {
|
|
@@ -4344,7 +4714,7 @@ const openapiDocument = {
|
|
|
4344
4714
|
"key": {
|
|
4345
4715
|
"type": "string",
|
|
4346
4716
|
"pattern": "^[A-Z_][A-Z0-9_]*$",
|
|
4347
|
-
"description": "Uppercase letters, digits, and underscores. Must start with\na letter or underscore. System-managed keys (e.g.\nPRIMITIVE_WEBHOOK_SECRET) are reserved.\n"
|
|
4717
|
+
"description": "Uppercase letters, digits, and underscores. Must start with\na letter or underscore. System-managed keys (e.g.\nPRIMITIVE_WEBHOOK_SECRET, PRIMITIVE_API_KEY, and\nPRIMITIVE_API_BASE_URL) are reserved.\n"
|
|
4348
4718
|
},
|
|
4349
4719
|
"value": {
|
|
4350
4720
|
"type": "string",
|
|
@@ -4614,11 +4984,263 @@ const operationManifest = [
|
|
|
4614
4984
|
"tag": "Account",
|
|
4615
4985
|
"tagCommand": "account"
|
|
4616
4986
|
},
|
|
4987
|
+
{
|
|
4988
|
+
"binaryResponse": false,
|
|
4989
|
+
"bodyRequired": true,
|
|
4990
|
+
"command": "resend-agent-signup-verification",
|
|
4991
|
+
"description": "Sends a new email verification code for a pending agent signup session.\nThis endpoint does not require an API key.\n",
|
|
4992
|
+
"hasJsonBody": true,
|
|
4993
|
+
"method": "POST",
|
|
4994
|
+
"operationId": "resendAgentSignupVerification",
|
|
4995
|
+
"path": "/agent/signup/resend",
|
|
4996
|
+
"pathParams": [],
|
|
4997
|
+
"queryParams": [],
|
|
4998
|
+
"requestSchema": {
|
|
4999
|
+
"type": "object",
|
|
5000
|
+
"additionalProperties": false,
|
|
5001
|
+
"properties": { "signup_token": {
|
|
5002
|
+
"type": "string",
|
|
5003
|
+
"minLength": 1
|
|
5004
|
+
} },
|
|
5005
|
+
"required": ["signup_token"]
|
|
5006
|
+
},
|
|
5007
|
+
"responseSchema": {
|
|
5008
|
+
"type": "object",
|
|
5009
|
+
"properties": {
|
|
5010
|
+
"email": {
|
|
5011
|
+
"type": "string",
|
|
5012
|
+
"format": "email"
|
|
5013
|
+
},
|
|
5014
|
+
"expires_in": {
|
|
5015
|
+
"type": "integer",
|
|
5016
|
+
"description": "Seconds until the pending signup expires"
|
|
5017
|
+
},
|
|
5018
|
+
"resend_after": {
|
|
5019
|
+
"type": "integer",
|
|
5020
|
+
"description": "Minimum seconds before requesting another verification email"
|
|
5021
|
+
},
|
|
5022
|
+
"verification_code_length": {
|
|
5023
|
+
"type": "integer",
|
|
5024
|
+
"description": "Number of digits in the emailed verification code"
|
|
5025
|
+
}
|
|
5026
|
+
},
|
|
5027
|
+
"required": [
|
|
5028
|
+
"email",
|
|
5029
|
+
"expires_in",
|
|
5030
|
+
"resend_after",
|
|
5031
|
+
"verification_code_length"
|
|
5032
|
+
]
|
|
5033
|
+
},
|
|
5034
|
+
"sdkName": "resendAgentSignupVerification",
|
|
5035
|
+
"summary": "Resend agent signup verification code",
|
|
5036
|
+
"tag": "Agent",
|
|
5037
|
+
"tagCommand": "agent"
|
|
5038
|
+
},
|
|
5039
|
+
{
|
|
5040
|
+
"binaryResponse": false,
|
|
5041
|
+
"bodyRequired": true,
|
|
5042
|
+
"command": "start-agent-signup",
|
|
5043
|
+
"description": "Starts an agent-native signup session. The API validates the signup code,\ncreates a pending signup session, sends an email verification code, and\nreturns an opaque signup token used by the resend and verify steps. This\nendpoint does not require an API key.\n",
|
|
5044
|
+
"hasJsonBody": true,
|
|
5045
|
+
"method": "POST",
|
|
5046
|
+
"operationId": "startAgentSignup",
|
|
5047
|
+
"path": "/agent/signup/start",
|
|
5048
|
+
"pathParams": [],
|
|
5049
|
+
"queryParams": [],
|
|
5050
|
+
"requestSchema": {
|
|
5051
|
+
"type": "object",
|
|
5052
|
+
"additionalProperties": false,
|
|
5053
|
+
"properties": {
|
|
5054
|
+
"email": {
|
|
5055
|
+
"type": "string",
|
|
5056
|
+
"format": "email",
|
|
5057
|
+
"maxLength": 254
|
|
5058
|
+
},
|
|
5059
|
+
"signup_code": {
|
|
5060
|
+
"type": "string",
|
|
5061
|
+
"minLength": 1,
|
|
5062
|
+
"maxLength": 128
|
|
5063
|
+
},
|
|
5064
|
+
"terms_accepted": {
|
|
5065
|
+
"type": "boolean",
|
|
5066
|
+
"const": true,
|
|
5067
|
+
"description": "Must be true to confirm acceptance of Primitive's Terms of Service and Privacy Policy"
|
|
5068
|
+
},
|
|
5069
|
+
"device_name": {
|
|
5070
|
+
"type": "string",
|
|
5071
|
+
"minLength": 1,
|
|
5072
|
+
"maxLength": 80,
|
|
5073
|
+
"description": "Human-readable device name used for the created agent OAuth session"
|
|
5074
|
+
},
|
|
5075
|
+
"metadata": {
|
|
5076
|
+
"type": "object",
|
|
5077
|
+
"additionalProperties": true,
|
|
5078
|
+
"description": "Optional client metadata stored with the signup session; serialized JSON must be 2048 bytes or fewer"
|
|
5079
|
+
}
|
|
5080
|
+
},
|
|
5081
|
+
"required": [
|
|
5082
|
+
"email",
|
|
5083
|
+
"signup_code",
|
|
5084
|
+
"terms_accepted"
|
|
5085
|
+
]
|
|
5086
|
+
},
|
|
5087
|
+
"responseSchema": {
|
|
5088
|
+
"type": "object",
|
|
5089
|
+
"properties": {
|
|
5090
|
+
"signup_token": {
|
|
5091
|
+
"type": "string",
|
|
5092
|
+
"description": "Opaque token used to verify or resend the pending agent signup"
|
|
5093
|
+
},
|
|
5094
|
+
"email": {
|
|
5095
|
+
"type": "string",
|
|
5096
|
+
"format": "email"
|
|
5097
|
+
},
|
|
5098
|
+
"expires_in": {
|
|
5099
|
+
"type": "integer",
|
|
5100
|
+
"description": "Seconds until the pending signup expires"
|
|
5101
|
+
},
|
|
5102
|
+
"resend_after": {
|
|
5103
|
+
"type": "integer",
|
|
5104
|
+
"description": "Minimum seconds before requesting another verification email"
|
|
5105
|
+
},
|
|
5106
|
+
"verification_code_length": {
|
|
5107
|
+
"type": "integer",
|
|
5108
|
+
"description": "Number of digits in the emailed verification code"
|
|
5109
|
+
}
|
|
5110
|
+
},
|
|
5111
|
+
"required": [
|
|
5112
|
+
"signup_token",
|
|
5113
|
+
"email",
|
|
5114
|
+
"expires_in",
|
|
5115
|
+
"resend_after",
|
|
5116
|
+
"verification_code_length"
|
|
5117
|
+
]
|
|
5118
|
+
},
|
|
5119
|
+
"sdkName": "startAgentSignup",
|
|
5120
|
+
"summary": "Start agent account signup",
|
|
5121
|
+
"tag": "Agent",
|
|
5122
|
+
"tagCommand": "agent"
|
|
5123
|
+
},
|
|
5124
|
+
{
|
|
5125
|
+
"binaryResponse": false,
|
|
5126
|
+
"bodyRequired": true,
|
|
5127
|
+
"command": "verify-agent-signup",
|
|
5128
|
+
"description": "Verifies the email code for an agent signup session, creates the account\nwhen needed, redeems the reserved signup code, mints an org-scoped OAuth\nsession for CLI authentication, and returns the raw tokens exactly once.\nFor existing users, the optional `org_id` selects which accessible\nworkspace should receive the new session.\n",
|
|
5129
|
+
"hasJsonBody": true,
|
|
5130
|
+
"method": "POST",
|
|
5131
|
+
"operationId": "verifyAgentSignup",
|
|
5132
|
+
"path": "/agent/signup/verify",
|
|
5133
|
+
"pathParams": [],
|
|
5134
|
+
"queryParams": [],
|
|
5135
|
+
"requestSchema": {
|
|
5136
|
+
"type": "object",
|
|
5137
|
+
"additionalProperties": false,
|
|
5138
|
+
"properties": {
|
|
5139
|
+
"signup_token": {
|
|
5140
|
+
"type": "string",
|
|
5141
|
+
"minLength": 1
|
|
5142
|
+
},
|
|
5143
|
+
"verification_code": {
|
|
5144
|
+
"type": "string",
|
|
5145
|
+
"minLength": 1,
|
|
5146
|
+
"maxLength": 32
|
|
5147
|
+
},
|
|
5148
|
+
"org_id": {
|
|
5149
|
+
"type": "string",
|
|
5150
|
+
"format": "uuid",
|
|
5151
|
+
"description": "Optional workspace id to target when the verified email already belongs to multiple workspaces"
|
|
5152
|
+
}
|
|
5153
|
+
},
|
|
5154
|
+
"required": ["signup_token", "verification_code"]
|
|
5155
|
+
},
|
|
5156
|
+
"responseSchema": {
|
|
5157
|
+
"type": "object",
|
|
5158
|
+
"properties": {
|
|
5159
|
+
"api_key": {
|
|
5160
|
+
"type": "string",
|
|
5161
|
+
"description": "Legacy alias for access_token. New CLI builds should persist access_token and refresh_token."
|
|
5162
|
+
},
|
|
5163
|
+
"key_id": {
|
|
5164
|
+
"type": "string",
|
|
5165
|
+
"format": "uuid",
|
|
5166
|
+
"description": "Legacy alias for oauth_grant_id"
|
|
5167
|
+
},
|
|
5168
|
+
"key_prefix": {
|
|
5169
|
+
"type": "string",
|
|
5170
|
+
"description": "Legacy display prefix derived from access_token"
|
|
5171
|
+
},
|
|
5172
|
+
"access_token": {
|
|
5173
|
+
"type": "string",
|
|
5174
|
+
"description": "OAuth access token for CLI API authentication"
|
|
5175
|
+
},
|
|
5176
|
+
"refresh_token": {
|
|
5177
|
+
"type": "string",
|
|
5178
|
+
"description": "OAuth refresh token used by the CLI to renew access"
|
|
5179
|
+
},
|
|
5180
|
+
"token_type": {
|
|
5181
|
+
"type": "string",
|
|
5182
|
+
"enum": ["Bearer"]
|
|
5183
|
+
},
|
|
5184
|
+
"expires_in": {
|
|
5185
|
+
"type": "integer",
|
|
5186
|
+
"description": "Seconds until access_token expires"
|
|
5187
|
+
},
|
|
5188
|
+
"auth_method": {
|
|
5189
|
+
"type": "string",
|
|
5190
|
+
"enum": ["oauth"]
|
|
5191
|
+
},
|
|
5192
|
+
"oauth_grant_id": {
|
|
5193
|
+
"type": "string",
|
|
5194
|
+
"format": "uuid"
|
|
5195
|
+
},
|
|
5196
|
+
"oauth_client_id": { "type": "string" },
|
|
5197
|
+
"org_id": {
|
|
5198
|
+
"type": "string",
|
|
5199
|
+
"format": "uuid"
|
|
5200
|
+
},
|
|
5201
|
+
"org_name": { "type": ["string", "null"] },
|
|
5202
|
+
"orgs": {
|
|
5203
|
+
"type": "array",
|
|
5204
|
+
"items": {
|
|
5205
|
+
"type": "object",
|
|
5206
|
+
"properties": {
|
|
5207
|
+
"id": {
|
|
5208
|
+
"type": "string",
|
|
5209
|
+
"format": "uuid"
|
|
5210
|
+
},
|
|
5211
|
+
"name": { "type": ["string", "null"] }
|
|
5212
|
+
},
|
|
5213
|
+
"required": ["id", "name"]
|
|
5214
|
+
},
|
|
5215
|
+
"description": "Workspaces available to the verified email. The minted session targets `org_id`."
|
|
5216
|
+
}
|
|
5217
|
+
},
|
|
5218
|
+
"required": [
|
|
5219
|
+
"api_key",
|
|
5220
|
+
"key_id",
|
|
5221
|
+
"key_prefix",
|
|
5222
|
+
"access_token",
|
|
5223
|
+
"refresh_token",
|
|
5224
|
+
"token_type",
|
|
5225
|
+
"expires_in",
|
|
5226
|
+
"auth_method",
|
|
5227
|
+
"oauth_grant_id",
|
|
5228
|
+
"oauth_client_id",
|
|
5229
|
+
"org_id",
|
|
5230
|
+
"org_name",
|
|
5231
|
+
"orgs"
|
|
5232
|
+
]
|
|
5233
|
+
},
|
|
5234
|
+
"sdkName": "verifyAgentSignup",
|
|
5235
|
+
"summary": "Verify agent signup and create OAuth tokens",
|
|
5236
|
+
"tag": "Agent",
|
|
5237
|
+
"tagCommand": "agent"
|
|
5238
|
+
},
|
|
4617
5239
|
{
|
|
4618
5240
|
"binaryResponse": false,
|
|
4619
5241
|
"bodyRequired": false,
|
|
4620
5242
|
"command": "cli-logout",
|
|
4621
|
-
"description": "Revokes the
|
|
5243
|
+
"description": "Revokes the OAuth grant used to authenticate the request. API-key\nauthenticated legacy logout requests succeed without deleting server API\nkeys so old local CLI state can be cleared safely.\n",
|
|
4622
5244
|
"hasJsonBody": true,
|
|
4623
5245
|
"method": "POST",
|
|
4624
5246
|
"operationId": "cliLogout",
|
|
@@ -4631,7 +5253,7 @@ const operationManifest = [
|
|
|
4631
5253
|
"properties": { "key_id": {
|
|
4632
5254
|
"type": "string",
|
|
4633
5255
|
"format": "uuid",
|
|
4634
|
-
"description": "Optional
|
|
5256
|
+
"description": "Optional id guard; when provided it must match the authenticated OAuth grant id or API key id"
|
|
4635
5257
|
} }
|
|
4636
5258
|
},
|
|
4637
5259
|
"responseSchema": {
|
|
@@ -4639,17 +5261,23 @@ const operationManifest = [
|
|
|
4639
5261
|
"properties": {
|
|
4640
5262
|
"revoked": {
|
|
4641
5263
|
"type": "boolean",
|
|
4642
|
-
"
|
|
5264
|
+
"description": "True when an OAuth grant was revoked. False for API-key-authenticated legacy logout, which only clears local CLI state."
|
|
4643
5265
|
},
|
|
4644
5266
|
"key_id": {
|
|
4645
5267
|
"type": "string",
|
|
4646
|
-
"format": "uuid"
|
|
5268
|
+
"format": "uuid",
|
|
5269
|
+
"description": "API key id for API-key-authenticated legacy logout"
|
|
5270
|
+
},
|
|
5271
|
+
"oauth_grant_id": {
|
|
5272
|
+
"type": "string",
|
|
5273
|
+
"format": "uuid",
|
|
5274
|
+
"description": "OAuth grant id revoked by OAuth-authenticated logout"
|
|
4647
5275
|
}
|
|
4648
5276
|
},
|
|
4649
|
-
"required": ["revoked"
|
|
5277
|
+
"required": ["revoked"]
|
|
4650
5278
|
},
|
|
4651
5279
|
"sdkName": "cliLogout",
|
|
4652
|
-
"summary": "Revoke the current CLI
|
|
5280
|
+
"summary": "Revoke the current CLI OAuth session",
|
|
4653
5281
|
"tag": "CLI",
|
|
4654
5282
|
"tagCommand": "cli"
|
|
4655
5283
|
},
|
|
@@ -4657,7 +5285,7 @@ const operationManifest = [
|
|
|
4657
5285
|
"binaryResponse": false,
|
|
4658
5286
|
"bodyRequired": true,
|
|
4659
5287
|
"command": "poll-cli-login",
|
|
4660
|
-
"description": "Polls a CLI login session until the browser approval either succeeds,\nis denied, expires, or is polled too quickly. The
|
|
5288
|
+
"description": "Polls a CLI login session until the browser approval either succeeds,\nis denied, expires, or is polled too quickly. The OAuth token set is\ncreated only after approval and is returned exactly once.\n",
|
|
4661
5289
|
"hasJsonBody": true,
|
|
4662
5290
|
"method": "POST",
|
|
4663
5291
|
"operationId": "pollCliLogin",
|
|
@@ -4678,13 +5306,42 @@ const operationManifest = [
|
|
|
4678
5306
|
"properties": {
|
|
4679
5307
|
"api_key": {
|
|
4680
5308
|
"type": "string",
|
|
4681
|
-
"description": "
|
|
5309
|
+
"description": "Legacy alias for access_token. New CLI builds should persist access_token and refresh_token."
|
|
4682
5310
|
},
|
|
4683
5311
|
"key_id": {
|
|
5312
|
+
"type": "string",
|
|
5313
|
+
"format": "uuid",
|
|
5314
|
+
"description": "Legacy alias for oauth_grant_id"
|
|
5315
|
+
},
|
|
5316
|
+
"key_prefix": {
|
|
5317
|
+
"type": "string",
|
|
5318
|
+
"description": "Legacy display prefix derived from access_token"
|
|
5319
|
+
},
|
|
5320
|
+
"access_token": {
|
|
5321
|
+
"type": "string",
|
|
5322
|
+
"description": "OAuth access token for CLI API authentication"
|
|
5323
|
+
},
|
|
5324
|
+
"refresh_token": {
|
|
5325
|
+
"type": "string",
|
|
5326
|
+
"description": "OAuth refresh token used by the CLI to renew access"
|
|
5327
|
+
},
|
|
5328
|
+
"token_type": {
|
|
5329
|
+
"type": "string",
|
|
5330
|
+
"enum": ["Bearer"]
|
|
5331
|
+
},
|
|
5332
|
+
"expires_in": {
|
|
5333
|
+
"type": "integer",
|
|
5334
|
+
"description": "Seconds until access_token expires"
|
|
5335
|
+
},
|
|
5336
|
+
"auth_method": {
|
|
5337
|
+
"type": "string",
|
|
5338
|
+
"enum": ["oauth"]
|
|
5339
|
+
},
|
|
5340
|
+
"oauth_grant_id": {
|
|
4684
5341
|
"type": "string",
|
|
4685
5342
|
"format": "uuid"
|
|
4686
5343
|
},
|
|
4687
|
-
"
|
|
5344
|
+
"oauth_client_id": { "type": "string" },
|
|
4688
5345
|
"org_id": {
|
|
4689
5346
|
"type": "string",
|
|
4690
5347
|
"format": "uuid"
|
|
@@ -4695,6 +5352,13 @@ const operationManifest = [
|
|
|
4695
5352
|
"api_key",
|
|
4696
5353
|
"key_id",
|
|
4697
5354
|
"key_prefix",
|
|
5355
|
+
"access_token",
|
|
5356
|
+
"refresh_token",
|
|
5357
|
+
"token_type",
|
|
5358
|
+
"expires_in",
|
|
5359
|
+
"auth_method",
|
|
5360
|
+
"oauth_grant_id",
|
|
5361
|
+
"oauth_client_id",
|
|
4698
5362
|
"org_id",
|
|
4699
5363
|
"org_name"
|
|
4700
5364
|
]
|
|
@@ -4861,7 +5525,7 @@ const operationManifest = [
|
|
|
4861
5525
|
"type": "string",
|
|
4862
5526
|
"minLength": 1,
|
|
4863
5527
|
"maxLength": 80,
|
|
4864
|
-
"description": "Human-readable device name used for the created CLI
|
|
5528
|
+
"description": "Human-readable device name used for the created CLI OAuth grant"
|
|
4865
5529
|
},
|
|
4866
5530
|
"metadata": {
|
|
4867
5531
|
"type": "object",
|
|
@@ -4916,7 +5580,7 @@ const operationManifest = [
|
|
|
4916
5580
|
"binaryResponse": false,
|
|
4917
5581
|
"bodyRequired": true,
|
|
4918
5582
|
"command": "verify-cli-signup",
|
|
4919
|
-
"description": "Verifies the email code for a CLI signup session, creates the account,\nredeems the reserved signup code,
|
|
5583
|
+
"description": "Verifies the email code for a CLI signup session, creates the account,\nredeems the reserved signup code, creates an org-scoped OAuth CLI\nsession, and returns the token set exactly once. This endpoint does not\nrequire an API key.\n",
|
|
4920
5584
|
"hasJsonBody": true,
|
|
4921
5585
|
"method": "POST",
|
|
4922
5586
|
"operationId": "verifyCliSignup",
|
|
@@ -4942,24 +5606,49 @@ const operationManifest = [
|
|
|
4942
5606
|
"maxLength": 1024
|
|
4943
5607
|
}
|
|
4944
5608
|
},
|
|
4945
|
-
"required": [
|
|
4946
|
-
"signup_token",
|
|
4947
|
-
"verification_code",
|
|
4948
|
-
"password"
|
|
4949
|
-
]
|
|
5609
|
+
"required": ["signup_token", "verification_code"]
|
|
4950
5610
|
},
|
|
4951
5611
|
"responseSchema": {
|
|
4952
5612
|
"type": "object",
|
|
4953
5613
|
"properties": {
|
|
4954
5614
|
"api_key": {
|
|
4955
5615
|
"type": "string",
|
|
4956
|
-
"description": "
|
|
5616
|
+
"description": "Legacy alias for access_token. New CLI builds should persist access_token and refresh_token."
|
|
4957
5617
|
},
|
|
4958
5618
|
"key_id": {
|
|
5619
|
+
"type": "string",
|
|
5620
|
+
"format": "uuid",
|
|
5621
|
+
"description": "Legacy alias for oauth_grant_id"
|
|
5622
|
+
},
|
|
5623
|
+
"key_prefix": {
|
|
5624
|
+
"type": "string",
|
|
5625
|
+
"description": "Legacy display prefix derived from access_token"
|
|
5626
|
+
},
|
|
5627
|
+
"access_token": {
|
|
5628
|
+
"type": "string",
|
|
5629
|
+
"description": "OAuth access token for CLI API authentication"
|
|
5630
|
+
},
|
|
5631
|
+
"refresh_token": {
|
|
5632
|
+
"type": "string",
|
|
5633
|
+
"description": "OAuth refresh token used by the CLI to renew access"
|
|
5634
|
+
},
|
|
5635
|
+
"token_type": {
|
|
5636
|
+
"type": "string",
|
|
5637
|
+
"enum": ["Bearer"]
|
|
5638
|
+
},
|
|
5639
|
+
"expires_in": {
|
|
5640
|
+
"type": "integer",
|
|
5641
|
+
"description": "Seconds until access_token expires"
|
|
5642
|
+
},
|
|
5643
|
+
"auth_method": {
|
|
5644
|
+
"type": "string",
|
|
5645
|
+
"enum": ["oauth"]
|
|
5646
|
+
},
|
|
5647
|
+
"oauth_grant_id": {
|
|
4959
5648
|
"type": "string",
|
|
4960
5649
|
"format": "uuid"
|
|
4961
5650
|
},
|
|
4962
|
-
"
|
|
5651
|
+
"oauth_client_id": { "type": "string" },
|
|
4963
5652
|
"org_id": {
|
|
4964
5653
|
"type": "string",
|
|
4965
5654
|
"format": "uuid"
|
|
@@ -4970,12 +5659,19 @@ const operationManifest = [
|
|
|
4970
5659
|
"api_key",
|
|
4971
5660
|
"key_id",
|
|
4972
5661
|
"key_prefix",
|
|
5662
|
+
"access_token",
|
|
5663
|
+
"refresh_token",
|
|
5664
|
+
"token_type",
|
|
5665
|
+
"expires_in",
|
|
5666
|
+
"auth_method",
|
|
5667
|
+
"oauth_grant_id",
|
|
5668
|
+
"oauth_client_id",
|
|
4973
5669
|
"org_id",
|
|
4974
5670
|
"org_name"
|
|
4975
5671
|
]
|
|
4976
5672
|
},
|
|
4977
5673
|
"sdkName": "verifyCliSignup",
|
|
4978
|
-
"summary": "Verify CLI signup and create
|
|
5674
|
+
"summary": "Verify CLI signup and create OAuth session",
|
|
4979
5675
|
"tag": "CLI",
|
|
4980
5676
|
"tagCommand": "cli"
|
|
4981
5677
|
},
|
|
@@ -6669,7 +7365,7 @@ const operationManifest = [
|
|
|
6669
7365
|
"binaryResponse": false,
|
|
6670
7366
|
"bodyRequired": true,
|
|
6671
7367
|
"command": "create-function",
|
|
6672
|
-
"description": "Creates and deploys a new function. The handler must be a single\nESM module whose default export is an object with an async\n`fetch(request, env)` method (Workers-style).
|
|
7368
|
+
"description": "Creates and deploys a new function. The handler must be a single\nESM module whose default export is an object with an async\n`fetch(request, env)` method (Workers-style). Primitive signs\neach delivery and forwards the `Primitive-Signature` header to\nthe handler. Verify the raw request body with\n`PRIMITIVE_WEBHOOK_SECRET` before parsing JSON; after verification\nthe request body parses to an `email.received` event (see\n`EmailReceivedEvent` and the Webhook payload section for the full\nschema). Code is bundled before being uploaded; ship a single\nself-contained file rather than relying on external imports.\n\n**Code limits.** `code` is capped at 1 MiB UTF-8. `sourceMap`\n(optional) is capped at 5 MiB UTF-8, stored with each deployment\nattempt, and sent to the runtime so stack traces can resolve to\noriginal source files.\n\n**Auto-wiring.** On successful deploy, Primitive automatically\ncreates a webhook endpoint that delivers inbound mail to the\nfunction. There is nothing to configure on the Endpoints API\nfor this to work; the internal runtime URL is not returned by\nthe API and is not a customer-facing integration surface.\n\n**Secrets.** New functions ship with the managed secrets\n(`PRIMITIVE_WEBHOOK_SECRET`, `PRIMITIVE_API_KEY`,\n`PRIMITIVE_API_BASE_URL`) already bound. Add user-set secrets via\n`POST /functions/{id}/secrets`; secret writes only land in the\nrunning handler on the next redeploy.\n",
|
|
6673
7369
|
"hasJsonBody": true,
|
|
6674
7370
|
"method": "POST",
|
|
6675
7371
|
"operationId": "createFunction",
|
|
@@ -6717,17 +7413,12 @@ const operationManifest = [
|
|
|
6717
7413
|
"failed"
|
|
6718
7414
|
],
|
|
6719
7415
|
"description": "Lifecycle state of the latest deploy attempt:\n * `pending` — deploy in flight; the runtime has not yet\n confirmed the new bundle is live.\n * `deployed` — the running edge handler is the latest code.\n * `failed` — the most recent deploy attempt failed; the\n previously-live code (if any) is still running. The\n `deploy_error` field carries the error message.\n"
|
|
6720
|
-
},
|
|
6721
|
-
"gateway_url": {
|
|
6722
|
-
"type": "string",
|
|
6723
|
-
"format": "uri"
|
|
6724
7416
|
}
|
|
6725
7417
|
},
|
|
6726
7418
|
"required": [
|
|
6727
7419
|
"id",
|
|
6728
7420
|
"name",
|
|
6729
|
-
"deploy_status"
|
|
6730
|
-
"gateway_url"
|
|
7421
|
+
"deploy_status"
|
|
6731
7422
|
]
|
|
6732
7423
|
},
|
|
6733
7424
|
"sdkName": "createFunction",
|
|
@@ -6760,7 +7451,7 @@ const operationManifest = [
|
|
|
6760
7451
|
"key": {
|
|
6761
7452
|
"type": "string",
|
|
6762
7453
|
"pattern": "^[A-Z_][A-Z0-9_]*$",
|
|
6763
|
-
"description": "Uppercase letters, digits, and underscores. Must start with\na letter or underscore. System-managed keys (e.g.\nPRIMITIVE_WEBHOOK_SECRET) are reserved.\n"
|
|
7454
|
+
"description": "Uppercase letters, digits, and underscores. Must start with\na letter or underscore. System-managed keys (e.g.\nPRIMITIVE_WEBHOOK_SECRET, PRIMITIVE_API_KEY, and\nPRIMITIVE_API_BASE_URL) are reserved.\n"
|
|
6764
7455
|
},
|
|
6765
7456
|
"value": {
|
|
6766
7457
|
"type": "string",
|
|
@@ -6903,10 +7594,6 @@ const operationManifest = [
|
|
|
6903
7594
|
"type": ["string", "null"],
|
|
6904
7595
|
"format": "date-time"
|
|
6905
7596
|
},
|
|
6906
|
-
"gateway_url": {
|
|
6907
|
-
"type": "string",
|
|
6908
|
-
"format": "uri"
|
|
6909
|
-
},
|
|
6910
7597
|
"created_at": {
|
|
6911
7598
|
"type": "string",
|
|
6912
7599
|
"format": "date-time"
|
|
@@ -6921,7 +7608,6 @@ const operationManifest = [
|
|
|
6921
7608
|
"name",
|
|
6922
7609
|
"code",
|
|
6923
7610
|
"deploy_status",
|
|
6924
|
-
"gateway_url",
|
|
6925
7611
|
"created_at",
|
|
6926
7612
|
"updated_at"
|
|
6927
7613
|
]
|
|
@@ -7467,7 +8153,7 @@ const operationManifest = [
|
|
|
7467
8153
|
"binaryResponse": false,
|
|
7468
8154
|
"bodyRequired": false,
|
|
7469
8155
|
"command": "list-function-secrets",
|
|
7470
|
-
"description": "Returns metadata for every secret bound to the function, with\nmanaged entries (provisioned by Primitive) listed first and\nuser-set entries listed alphabetically after. **Values are\nnever returned.** Secret writes are write-only.\n\nManaged entries (e.g. `PRIMITIVE_WEBHOOK_SECRET`,\n`PRIMITIVE_API_KEY`) carry a
|
|
8156
|
+
"description": "Returns metadata for every secret bound to the function, with\nmanaged entries (provisioned by Primitive) listed first and\nuser-set entries listed alphabetically after. **Values are\nnever returned.** Secret writes are write-only.\n\nManaged entries (e.g. `PRIMITIVE_WEBHOOK_SECRET`,\n`PRIMITIVE_API_KEY`, `PRIMITIVE_API_BASE_URL`) carry a\n`description` instead of `created_at` / `updated_at`. They\ncannot be created, updated, or deleted via this API.\n",
|
|
7471
8157
|
"hasJsonBody": false,
|
|
7472
8158
|
"method": "GET",
|
|
7473
8159
|
"operationId": "listFunctionSecrets",
|
|
@@ -7523,7 +8209,7 @@ const operationManifest = [
|
|
|
7523
8209
|
"binaryResponse": false,
|
|
7524
8210
|
"bodyRequired": false,
|
|
7525
8211
|
"command": "list-functions",
|
|
7526
|
-
"description": "Returns every active (non-deleted) function in the org, newest\nfirst. Each entry carries
|
|
8212
|
+
"description": "Returns every active (non-deleted) function in the org, newest\nfirst. Each entry carries deploy status and timestamps. To\ninspect the source code or deploy errors, use `GET /functions/{id}`.\n",
|
|
7527
8213
|
"hasJsonBody": false,
|
|
7528
8214
|
"method": "GET",
|
|
7529
8215
|
"operationId": "listFunctions",
|
|
@@ -7560,11 +8246,6 @@ const operationManifest = [
|
|
|
7560
8246
|
"format": "date-time",
|
|
7561
8247
|
"description": "Timestamp of the most recent successful deploy. Null until the first deploy succeeds."
|
|
7562
8248
|
},
|
|
7563
|
-
"gateway_url": {
|
|
7564
|
-
"type": "string",
|
|
7565
|
-
"format": "uri",
|
|
7566
|
-
"description": "URL the platform's webhook delivery loop posts to in order\nto invoke the function. Reference only; not directly\ncallable from outside.\n"
|
|
7567
|
-
},
|
|
7568
8249
|
"created_at": {
|
|
7569
8250
|
"type": "string",
|
|
7570
8251
|
"format": "date-time"
|
|
@@ -7578,7 +8259,6 @@ const operationManifest = [
|
|
|
7578
8259
|
"id",
|
|
7579
8260
|
"name",
|
|
7580
8261
|
"deploy_status",
|
|
7581
|
-
"gateway_url",
|
|
7582
8262
|
"created_at",
|
|
7583
8263
|
"updated_at"
|
|
7584
8264
|
]
|
|
@@ -7807,10 +8487,6 @@ const operationManifest = [
|
|
|
7807
8487
|
"type": ["string", "null"],
|
|
7808
8488
|
"format": "date-time"
|
|
7809
8489
|
},
|
|
7810
|
-
"gateway_url": {
|
|
7811
|
-
"type": "string",
|
|
7812
|
-
"format": "uri"
|
|
7813
|
-
},
|
|
7814
8490
|
"created_at": {
|
|
7815
8491
|
"type": "string",
|
|
7816
8492
|
"format": "date-time"
|
|
@@ -7825,7 +8501,6 @@ const operationManifest = [
|
|
|
7825
8501
|
"name",
|
|
7826
8502
|
"code",
|
|
7827
8503
|
"deploy_status",
|
|
7828
|
-
"gateway_url",
|
|
7829
8504
|
"created_at",
|
|
7830
8505
|
"updated_at"
|
|
7831
8506
|
]
|