@primitivedotdev/sdk 0.3.0 → 0.4.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/dist/api/generated/sdk.gen.js +7 -4
- package/dist/api/index.d.ts +50 -5
- package/dist/oclif/api-command.js +72 -8
- package/dist/openapi/index.d.ts +1 -0
- package/dist/openapi/openapi.generated.js +74 -3
- package/dist/openapi/operations.generated.js +41 -2
- package/oclif.manifest.json +15 -3
- package/package.json +1 -1
|
@@ -188,8 +188,10 @@ export const downloadAttachments = (options) => (options.client ?? client).get({
|
|
|
188
188
|
* Replay email webhooks
|
|
189
189
|
*
|
|
190
190
|
* Re-delivers the webhook payload for this email to all active
|
|
191
|
-
* endpoints matching the email's domain.
|
|
192
|
-
*
|
|
191
|
+
* endpoints matching the email's domain. Rate limited per-email
|
|
192
|
+
* (short cooldown between successive replays of the same email)
|
|
193
|
+
* and per-org (burst + sustained windows), sharing an org-wide
|
|
194
|
+
* budget with delivery replays.
|
|
193
195
|
*
|
|
194
196
|
*/
|
|
195
197
|
export const replayEmailWebhooks = (options) => (options.client ?? client).post({
|
|
@@ -333,8 +335,9 @@ export const listDeliveries = (options) => (options?.client ?? client).get({
|
|
|
333
335
|
*
|
|
334
336
|
* Re-sends the stored webhook payload from a previous delivery attempt.
|
|
335
337
|
* If the original endpoint is still active, it is targeted. If the
|
|
336
|
-
* original endpoint was deleted, the
|
|
337
|
-
* Deactivated endpoints cannot be replayed to.
|
|
338
|
+
* original endpoint was deleted, the oldest active endpoint is used.
|
|
339
|
+
* Deactivated endpoints cannot be replayed to. Rate limited per-org,
|
|
340
|
+
* sharing an org-wide budget with email replays.
|
|
338
341
|
*
|
|
339
342
|
*/
|
|
340
343
|
export const replayDelivery = (options) => (options.client ?? client).post({
|
package/dist/api/index.d.ts
CHANGED
|
@@ -348,8 +348,30 @@ type PaginationMeta = {
|
|
|
348
348
|
type ErrorResponse = {
|
|
349
349
|
success: boolean;
|
|
350
350
|
error: {
|
|
351
|
-
code: 'unauthorized' | 'forbidden' | 'not_found' | 'validation_error' | 'rate_limit_exceeded' | 'internal_error';
|
|
351
|
+
code: 'unauthorized' | 'forbidden' | 'not_found' | 'validation_error' | 'rate_limit_exceeded' | 'internal_error' | 'conflict' | 'mx_conflict';
|
|
352
352
|
message: string;
|
|
353
|
+
/**
|
|
354
|
+
* Optional structured data that callers can inspect to recover
|
|
355
|
+
* from the error. The fields present depend on `code`. Additional
|
|
356
|
+
* keys may be added over time without a major-version bump.
|
|
357
|
+
*
|
|
358
|
+
*/
|
|
359
|
+
details?: {
|
|
360
|
+
/**
|
|
361
|
+
* Present when `code == mx_conflict`.
|
|
362
|
+
*/
|
|
363
|
+
mx_conflict?: {
|
|
364
|
+
/**
|
|
365
|
+
* Human-readable name of the detected mailbox provider (e.g. "Google Workspace").
|
|
366
|
+
*/
|
|
367
|
+
provider_name: string;
|
|
368
|
+
/**
|
|
369
|
+
* Subdomain to try instead (e.g. "mail" for `mail.example.com`).
|
|
370
|
+
*/
|
|
371
|
+
suggested_subdomain: string;
|
|
372
|
+
};
|
|
373
|
+
[key: string]: unknown;
|
|
374
|
+
};
|
|
353
375
|
};
|
|
354
376
|
};
|
|
355
377
|
type Account = {
|
|
@@ -866,6 +888,18 @@ type AddDomainErrors = {
|
|
|
866
888
|
* Invalid or missing API key
|
|
867
889
|
*/
|
|
868
890
|
401: ErrorResponse;
|
|
891
|
+
/**
|
|
892
|
+
* Domain claim conflicts with existing state. Two error codes
|
|
893
|
+
* are possible:
|
|
894
|
+
* * `mx_conflict`: the domain's current MX records point at
|
|
895
|
+
* another mailbox provider. The response includes
|
|
896
|
+
* `error.details.mx_conflict` with the detected provider
|
|
897
|
+
* and a suggested subdomain.
|
|
898
|
+
* * `conflict`: the domain is already claimed by another
|
|
899
|
+
* org, or a pending claim exists for another user.
|
|
900
|
+
*
|
|
901
|
+
*/
|
|
902
|
+
409: ErrorResponse;
|
|
869
903
|
};
|
|
870
904
|
type AddDomainError = AddDomainErrors[keyof AddDomainErrors];
|
|
871
905
|
type AddDomainResponses = {
|
|
@@ -1213,6 +1247,10 @@ type ReplayEmailWebhooksErrors = {
|
|
|
1213
1247
|
* Resource not found
|
|
1214
1248
|
*/
|
|
1215
1249
|
404: ErrorResponse;
|
|
1250
|
+
/**
|
|
1251
|
+
* Rate limit exceeded
|
|
1252
|
+
*/
|
|
1253
|
+
429: ErrorResponse;
|
|
1216
1254
|
};
|
|
1217
1255
|
type ReplayEmailWebhooksError = ReplayEmailWebhooksErrors[keyof ReplayEmailWebhooksErrors];
|
|
1218
1256
|
type ReplayEmailWebhooksResponses = {
|
|
@@ -1584,6 +1622,10 @@ type ReplayDeliveryErrors = {
|
|
|
1584
1622
|
* Resource not found
|
|
1585
1623
|
*/
|
|
1586
1624
|
404: ErrorResponse;
|
|
1625
|
+
/**
|
|
1626
|
+
* Rate limit exceeded
|
|
1627
|
+
*/
|
|
1628
|
+
429: ErrorResponse;
|
|
1587
1629
|
};
|
|
1588
1630
|
type ReplayDeliveryError = ReplayDeliveryErrors[keyof ReplayDeliveryErrors];
|
|
1589
1631
|
type ReplayDeliveryResponses = {
|
|
@@ -1720,8 +1762,10 @@ declare const downloadAttachments: <ThrowOnError extends boolean = false>(option
|
|
|
1720
1762
|
* Replay email webhooks
|
|
1721
1763
|
*
|
|
1722
1764
|
* Re-delivers the webhook payload for this email to all active
|
|
1723
|
-
* endpoints matching the email's domain.
|
|
1724
|
-
*
|
|
1765
|
+
* endpoints matching the email's domain. Rate limited per-email
|
|
1766
|
+
* (short cooldown between successive replays of the same email)
|
|
1767
|
+
* and per-org (burst + sustained windows), sharing an org-wide
|
|
1768
|
+
* budget with delivery replays.
|
|
1725
1769
|
*
|
|
1726
1770
|
*/
|
|
1727
1771
|
declare const replayEmailWebhooks: <ThrowOnError extends boolean = false>(options: Options$1<ReplayEmailWebhooksData, ThrowOnError>) => RequestResult<ReplayEmailWebhooksResponses, ReplayEmailWebhooksErrors, ThrowOnError, "fields">;
|
|
@@ -1805,8 +1849,9 @@ declare const listDeliveries: <ThrowOnError extends boolean = false>(options?: O
|
|
|
1805
1849
|
*
|
|
1806
1850
|
* Re-sends the stored webhook payload from a previous delivery attempt.
|
|
1807
1851
|
* If the original endpoint is still active, it is targeted. If the
|
|
1808
|
-
* original endpoint was deleted, the
|
|
1809
|
-
* Deactivated endpoints cannot be replayed to.
|
|
1852
|
+
* original endpoint was deleted, the oldest active endpoint is used.
|
|
1853
|
+
* Deactivated endpoints cannot be replayed to. Rate limited per-org,
|
|
1854
|
+
* sharing an org-wide budget with email replays.
|
|
1810
1855
|
*
|
|
1811
1856
|
*/
|
|
1812
1857
|
declare const replayDelivery: <ThrowOnError extends boolean = false>(options: Options$1<ReplayDeliveryData, ThrowOnError>) => RequestResult<ReplayDeliveryResponses, ReplayDeliveryErrors, ThrowOnError, "fields">;
|
|
@@ -7,7 +7,7 @@ function flagName(parameterName) {
|
|
|
7
7
|
function flagDescription(parameter) {
|
|
8
8
|
return parameter.description ?? parameter.name;
|
|
9
9
|
}
|
|
10
|
-
function flagForParameter(parameter) {
|
|
10
|
+
export function flagForParameter(parameter) {
|
|
11
11
|
const common = {
|
|
12
12
|
description: flagDescription(parameter),
|
|
13
13
|
required: parameter.required,
|
|
@@ -18,6 +18,9 @@ function flagForParameter(parameter) {
|
|
|
18
18
|
if (parameter.type === "integer") {
|
|
19
19
|
return Flags.integer(common);
|
|
20
20
|
}
|
|
21
|
+
if (parameter.enum && parameter.enum.length > 0) {
|
|
22
|
+
return Flags.string({ ...common, options: parameter.enum });
|
|
23
|
+
}
|
|
21
24
|
return Flags.string(common);
|
|
22
25
|
}
|
|
23
26
|
function coerceParameterValue(parameter, value) {
|
|
@@ -41,20 +44,82 @@ function coerceParameterValue(parameter, value) {
|
|
|
41
44
|
}
|
|
42
45
|
throw new Errors.CLIError(`Unsupported flag value for --${parameter.name}`);
|
|
43
46
|
}
|
|
44
|
-
function
|
|
47
|
+
function cliError(message) {
|
|
48
|
+
return new Errors.CLIError(message, { exit: 1 });
|
|
49
|
+
}
|
|
50
|
+
function parseJson(source, flagLabel) {
|
|
51
|
+
try {
|
|
52
|
+
return JSON.parse(source);
|
|
53
|
+
}
|
|
54
|
+
catch (error) {
|
|
55
|
+
const detail = error instanceof Error ? error.message : String(error);
|
|
56
|
+
throw cliError(`${flagLabel} is not valid JSON: ${detail}`);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
export function readJsonBody(flags) {
|
|
45
60
|
const bodyFile = flags["body-file"];
|
|
46
61
|
const body = flags.body;
|
|
47
62
|
if (bodyFile && body) {
|
|
48
|
-
throw
|
|
63
|
+
throw cliError("Use either --body or --body-file, not both");
|
|
49
64
|
}
|
|
50
65
|
if (typeof bodyFile === "string") {
|
|
51
|
-
|
|
66
|
+
let contents;
|
|
67
|
+
try {
|
|
68
|
+
contents = readFileSync(bodyFile, "utf8");
|
|
69
|
+
}
|
|
70
|
+
catch (error) {
|
|
71
|
+
const detail = error instanceof Error ? error.message : String(error);
|
|
72
|
+
throw cliError(`Could not read --body-file ${bodyFile}: ${detail}`);
|
|
73
|
+
}
|
|
74
|
+
return parseJson(contents, `--body-file ${bodyFile}`);
|
|
52
75
|
}
|
|
53
76
|
if (typeof body === "string") {
|
|
54
|
-
return
|
|
77
|
+
return parseJson(body, "--body");
|
|
55
78
|
}
|
|
56
79
|
return undefined;
|
|
57
80
|
}
|
|
81
|
+
export function extractErrorPayload(raw) {
|
|
82
|
+
if (raw &&
|
|
83
|
+
typeof raw === "object" &&
|
|
84
|
+
!(raw instanceof Error) &&
|
|
85
|
+
"error" in raw) {
|
|
86
|
+
const inner = raw.error;
|
|
87
|
+
if (inner !== null && inner !== undefined) {
|
|
88
|
+
return inner;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return raw;
|
|
92
|
+
}
|
|
93
|
+
function extractCauseDetails(cause) {
|
|
94
|
+
const details = {};
|
|
95
|
+
let code;
|
|
96
|
+
if (!cause || typeof cause !== "object") {
|
|
97
|
+
return { details };
|
|
98
|
+
}
|
|
99
|
+
for (const [key, value] of Object.entries(cause)) {
|
|
100
|
+
if (typeof value === "string" || typeof value === "number") {
|
|
101
|
+
details[key] = value;
|
|
102
|
+
if (key === "code" && typeof value === "string") {
|
|
103
|
+
code = value;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return { code, details };
|
|
108
|
+
}
|
|
109
|
+
export function formatErrorPayload(payload) {
|
|
110
|
+
if (payload instanceof Error) {
|
|
111
|
+
const { code, details } = extractCauseDetails(payload.cause);
|
|
112
|
+
const body = {
|
|
113
|
+
code: code ?? "client_error",
|
|
114
|
+
message: payload.message || payload.name || String(payload),
|
|
115
|
+
};
|
|
116
|
+
if (Object.keys(details).length > 0) {
|
|
117
|
+
body.cause = details;
|
|
118
|
+
}
|
|
119
|
+
return JSON.stringify(body, null, 2);
|
|
120
|
+
}
|
|
121
|
+
return JSON.stringify(payload, null, 2);
|
|
122
|
+
}
|
|
58
123
|
function buildFlags(operation) {
|
|
59
124
|
const flags = {
|
|
60
125
|
"api-key": Flags.string({
|
|
@@ -125,9 +190,8 @@ export function createOperationCommand(operation) {
|
|
|
125
190
|
responseStyle: "fields",
|
|
126
191
|
});
|
|
127
192
|
if (result.error) {
|
|
128
|
-
const
|
|
129
|
-
|
|
130
|
-
process.stderr.write(`${JSON.stringify(errorPayload, null, 2)}\n`);
|
|
193
|
+
const errorPayload = extractErrorPayload(result.error);
|
|
194
|
+
process.stderr.write(`${formatErrorPayload(errorPayload)}\n`);
|
|
131
195
|
process.exitCode = 1;
|
|
132
196
|
return;
|
|
133
197
|
}
|
package/dist/openapi/index.d.ts
CHANGED
|
@@ -355,6 +355,44 @@ export const openapiDocument = {
|
|
|
355
355
|
},
|
|
356
356
|
"401": {
|
|
357
357
|
"$ref": "#/components/responses/Unauthorized"
|
|
358
|
+
},
|
|
359
|
+
"409": {
|
|
360
|
+
"description": "Domain claim conflicts with existing state. Two error codes\nare possible:\n * `mx_conflict`: the domain's current MX records point at\n another mailbox provider. The response includes\n `error.details.mx_conflict` with the detected provider\n and a suggested subdomain.\n * `conflict`: the domain is already claimed by another\n org, or a pending claim exists for another user.\n",
|
|
361
|
+
"content": {
|
|
362
|
+
"application/json": {
|
|
363
|
+
"schema": {
|
|
364
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
365
|
+
},
|
|
366
|
+
"examples": {
|
|
367
|
+
"mx_conflict": {
|
|
368
|
+
"summary": "Domain has MX records on another provider",
|
|
369
|
+
"value": {
|
|
370
|
+
"success": false,
|
|
371
|
+
"error": {
|
|
372
|
+
"code": "mx_conflict",
|
|
373
|
+
"message": "Domain is currently receiving mail via another provider",
|
|
374
|
+
"details": {
|
|
375
|
+
"mx_conflict": {
|
|
376
|
+
"provider_name": "Google Workspace",
|
|
377
|
+
"suggested_subdomain": "mail"
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
},
|
|
383
|
+
"already_claimed": {
|
|
384
|
+
"summary": "Domain already claimed by another org",
|
|
385
|
+
"value": {
|
|
386
|
+
"success": false,
|
|
387
|
+
"error": {
|
|
388
|
+
"code": "conflict",
|
|
389
|
+
"message": "Domain is already claimed by another organization"
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
}
|
|
358
396
|
}
|
|
359
397
|
}
|
|
360
398
|
}
|
|
@@ -809,7 +847,7 @@ export const openapiDocument = {
|
|
|
809
847
|
"post": {
|
|
810
848
|
"operationId": "replayEmailWebhooks",
|
|
811
849
|
"summary": "Replay email webhooks",
|
|
812
|
-
"description": "Re-delivers the webhook payload for this email to all active\nendpoints matching the email's domain.
|
|
850
|
+
"description": "Re-delivers the webhook payload for this email to all active\nendpoints matching the email's domain. Rate limited per-email\n(short cooldown between successive replays of the same email)\nand per-org (burst + sustained windows), sharing an org-wide\nbudget with delivery replays.\n",
|
|
813
851
|
"tags": [
|
|
814
852
|
"Emails"
|
|
815
853
|
],
|
|
@@ -844,6 +882,9 @@ export const openapiDocument = {
|
|
|
844
882
|
},
|
|
845
883
|
"404": {
|
|
846
884
|
"$ref": "#/components/responses/NotFound"
|
|
885
|
+
},
|
|
886
|
+
"429": {
|
|
887
|
+
"$ref": "#/components/responses/RateLimited"
|
|
847
888
|
}
|
|
848
889
|
}
|
|
849
890
|
}
|
|
@@ -1345,7 +1386,7 @@ export const openapiDocument = {
|
|
|
1345
1386
|
"post": {
|
|
1346
1387
|
"operationId": "replayDelivery",
|
|
1347
1388
|
"summary": "Replay a webhook delivery",
|
|
1348
|
-
"description": "Re-sends the stored webhook payload from a previous delivery attempt.\nIf the original endpoint is still active, it is targeted. If the\noriginal endpoint was deleted, the
|
|
1389
|
+
"description": "Re-sends the stored webhook payload from a previous delivery attempt.\nIf the original endpoint is still active, it is targeted. If the\noriginal endpoint was deleted, the oldest active endpoint is used.\nDeactivated endpoints cannot be replayed to. Rate limited per-org,\nsharing an org-wide budget with email replays.\n",
|
|
1349
1390
|
"tags": [
|
|
1350
1391
|
"Webhook Deliveries"
|
|
1351
1392
|
],
|
|
@@ -1380,6 +1421,9 @@ export const openapiDocument = {
|
|
|
1380
1421
|
},
|
|
1381
1422
|
"404": {
|
|
1382
1423
|
"$ref": "#/components/responses/NotFound"
|
|
1424
|
+
},
|
|
1425
|
+
"429": {
|
|
1426
|
+
"$ref": "#/components/responses/RateLimited"
|
|
1383
1427
|
}
|
|
1384
1428
|
}
|
|
1385
1429
|
}
|
|
@@ -1613,11 +1657,38 @@ export const openapiDocument = {
|
|
|
1613
1657
|
"not_found",
|
|
1614
1658
|
"validation_error",
|
|
1615
1659
|
"rate_limit_exceeded",
|
|
1616
|
-
"internal_error"
|
|
1660
|
+
"internal_error",
|
|
1661
|
+
"conflict",
|
|
1662
|
+
"mx_conflict"
|
|
1617
1663
|
]
|
|
1618
1664
|
},
|
|
1619
1665
|
"message": {
|
|
1620
1666
|
"type": "string"
|
|
1667
|
+
},
|
|
1668
|
+
"details": {
|
|
1669
|
+
"type": "object",
|
|
1670
|
+
"description": "Optional structured data that callers can inspect to recover\nfrom the error. The fields present depend on `code`. Additional\nkeys may be added over time without a major-version bump.\n",
|
|
1671
|
+
"additionalProperties": true,
|
|
1672
|
+
"properties": {
|
|
1673
|
+
"mx_conflict": {
|
|
1674
|
+
"type": "object",
|
|
1675
|
+
"description": "Present when `code == mx_conflict`.",
|
|
1676
|
+
"required": [
|
|
1677
|
+
"provider_name",
|
|
1678
|
+
"suggested_subdomain"
|
|
1679
|
+
],
|
|
1680
|
+
"properties": {
|
|
1681
|
+
"provider_name": {
|
|
1682
|
+
"type": "string",
|
|
1683
|
+
"description": "Human-readable name of the detected mailbox provider (e.g. \"Google Workspace\")."
|
|
1684
|
+
},
|
|
1685
|
+
"suggested_subdomain": {
|
|
1686
|
+
"type": "string",
|
|
1687
|
+
"description": "Subdomain to try instead (e.g. \"mail\" for `mail.example.com`)."
|
|
1688
|
+
}
|
|
1689
|
+
}
|
|
1690
|
+
}
|
|
1691
|
+
}
|
|
1621
1692
|
}
|
|
1622
1693
|
},
|
|
1623
1694
|
"required": [
|
|
@@ -113,6 +113,7 @@ export const operationManifest = [
|
|
|
113
113
|
"pathParams": [
|
|
114
114
|
{
|
|
115
115
|
"description": "Resource UUID",
|
|
116
|
+
"enum": null,
|
|
116
117
|
"name": "id",
|
|
117
118
|
"required": true,
|
|
118
119
|
"type": "string"
|
|
@@ -152,6 +153,7 @@ export const operationManifest = [
|
|
|
152
153
|
"pathParams": [
|
|
153
154
|
{
|
|
154
155
|
"description": "Resource UUID",
|
|
156
|
+
"enum": null,
|
|
155
157
|
"name": "id",
|
|
156
158
|
"required": true,
|
|
157
159
|
"type": "string"
|
|
@@ -175,6 +177,7 @@ export const operationManifest = [
|
|
|
175
177
|
"pathParams": [
|
|
176
178
|
{
|
|
177
179
|
"description": "Resource UUID",
|
|
180
|
+
"enum": null,
|
|
178
181
|
"name": "id",
|
|
179
182
|
"required": true,
|
|
180
183
|
"type": "string"
|
|
@@ -198,6 +201,7 @@ export const operationManifest = [
|
|
|
198
201
|
"pathParams": [
|
|
199
202
|
{
|
|
200
203
|
"description": "Resource UUID",
|
|
204
|
+
"enum": null,
|
|
201
205
|
"name": "id",
|
|
202
206
|
"required": true,
|
|
203
207
|
"type": "string"
|
|
@@ -221,6 +225,7 @@ export const operationManifest = [
|
|
|
221
225
|
"pathParams": [
|
|
222
226
|
{
|
|
223
227
|
"description": "Resource UUID",
|
|
228
|
+
"enum": null,
|
|
224
229
|
"name": "id",
|
|
225
230
|
"required": true,
|
|
226
231
|
"type": "string"
|
|
@@ -229,6 +234,7 @@ export const operationManifest = [
|
|
|
229
234
|
"queryParams": [
|
|
230
235
|
{
|
|
231
236
|
"description": "Signed download token from webhook payload",
|
|
237
|
+
"enum": null,
|
|
232
238
|
"name": "token",
|
|
233
239
|
"required": false,
|
|
234
240
|
"type": "string"
|
|
@@ -251,6 +257,7 @@ export const operationManifest = [
|
|
|
251
257
|
"pathParams": [
|
|
252
258
|
{
|
|
253
259
|
"description": "Resource UUID",
|
|
260
|
+
"enum": null,
|
|
254
261
|
"name": "id",
|
|
255
262
|
"required": true,
|
|
256
263
|
"type": "string"
|
|
@@ -259,6 +266,7 @@ export const operationManifest = [
|
|
|
259
266
|
"queryParams": [
|
|
260
267
|
{
|
|
261
268
|
"description": "Signed download token from webhook payload",
|
|
269
|
+
"enum": null,
|
|
262
270
|
"name": "token",
|
|
263
271
|
"required": false,
|
|
264
272
|
"type": "string"
|
|
@@ -281,6 +289,7 @@ export const operationManifest = [
|
|
|
281
289
|
"pathParams": [
|
|
282
290
|
{
|
|
283
291
|
"description": "Resource UUID",
|
|
292
|
+
"enum": null,
|
|
284
293
|
"name": "id",
|
|
285
294
|
"required": true,
|
|
286
295
|
"type": "string"
|
|
@@ -305,42 +314,54 @@ export const operationManifest = [
|
|
|
305
314
|
"queryParams": [
|
|
306
315
|
{
|
|
307
316
|
"description": "Pagination cursor from a previous response's `meta.cursor` field.\nFormat: `{ISO-datetime}|{id}`\n",
|
|
317
|
+
"enum": null,
|
|
308
318
|
"name": "cursor",
|
|
309
319
|
"required": false,
|
|
310
320
|
"type": "string"
|
|
311
321
|
},
|
|
312
322
|
{
|
|
313
323
|
"description": "Number of results per page",
|
|
324
|
+
"enum": null,
|
|
314
325
|
"name": "limit",
|
|
315
326
|
"required": false,
|
|
316
327
|
"type": "integer"
|
|
317
328
|
},
|
|
318
329
|
{
|
|
319
330
|
"description": "Filter by domain ID",
|
|
331
|
+
"enum": null,
|
|
320
332
|
"name": "domain_id",
|
|
321
333
|
"required": false,
|
|
322
334
|
"type": "string"
|
|
323
335
|
},
|
|
324
336
|
{
|
|
325
337
|
"description": "Filter by email status",
|
|
338
|
+
"enum": [
|
|
339
|
+
"pending",
|
|
340
|
+
"accepted",
|
|
341
|
+
"completed",
|
|
342
|
+
"rejected"
|
|
343
|
+
],
|
|
326
344
|
"name": "status",
|
|
327
345
|
"required": false,
|
|
328
346
|
"type": "string"
|
|
329
347
|
},
|
|
330
348
|
{
|
|
331
349
|
"description": "Search subject, sender, and recipient (case-insensitive)",
|
|
350
|
+
"enum": null,
|
|
332
351
|
"name": "search",
|
|
333
352
|
"required": false,
|
|
334
353
|
"type": "string"
|
|
335
354
|
},
|
|
336
355
|
{
|
|
337
356
|
"description": "Filter emails created on or after this timestamp",
|
|
357
|
+
"enum": null,
|
|
338
358
|
"name": "date_from",
|
|
339
359
|
"required": false,
|
|
340
360
|
"type": "string"
|
|
341
361
|
},
|
|
342
362
|
{
|
|
343
363
|
"description": "Filter emails created on or before this timestamp",
|
|
364
|
+
"enum": null,
|
|
344
365
|
"name": "date_to",
|
|
345
366
|
"required": false,
|
|
346
367
|
"type": "string"
|
|
@@ -355,7 +376,7 @@ export const operationManifest = [
|
|
|
355
376
|
"binaryResponse": false,
|
|
356
377
|
"bodyRequired": false,
|
|
357
378
|
"command": "replay-email-webhooks",
|
|
358
|
-
"description": "Re-delivers the webhook payload for this email to all active\nendpoints matching the email's domain.
|
|
379
|
+
"description": "Re-delivers the webhook payload for this email to all active\nendpoints matching the email's domain. Rate limited per-email\n(short cooldown between successive replays of the same email)\nand per-org (burst + sustained windows), sharing an org-wide\nbudget with delivery replays.\n",
|
|
359
380
|
"hasJsonBody": false,
|
|
360
381
|
"method": "POST",
|
|
361
382
|
"operationId": "replayEmailWebhooks",
|
|
@@ -363,6 +384,7 @@ export const operationManifest = [
|
|
|
363
384
|
"pathParams": [
|
|
364
385
|
{
|
|
365
386
|
"description": "Resource UUID",
|
|
387
|
+
"enum": null,
|
|
366
388
|
"name": "id",
|
|
367
389
|
"required": true,
|
|
368
390
|
"type": "string"
|
|
@@ -402,6 +424,7 @@ export const operationManifest = [
|
|
|
402
424
|
"pathParams": [
|
|
403
425
|
{
|
|
404
426
|
"description": "Resource UUID",
|
|
427
|
+
"enum": null,
|
|
405
428
|
"name": "id",
|
|
406
429
|
"required": true,
|
|
407
430
|
"type": "string"
|
|
@@ -441,6 +464,7 @@ export const operationManifest = [
|
|
|
441
464
|
"pathParams": [
|
|
442
465
|
{
|
|
443
466
|
"description": "Resource UUID",
|
|
467
|
+
"enum": null,
|
|
444
468
|
"name": "id",
|
|
445
469
|
"required": true,
|
|
446
470
|
"type": "string"
|
|
@@ -464,6 +488,7 @@ export const operationManifest = [
|
|
|
464
488
|
"pathParams": [
|
|
465
489
|
{
|
|
466
490
|
"description": "Resource UUID",
|
|
491
|
+
"enum": null,
|
|
467
492
|
"name": "id",
|
|
468
493
|
"required": true,
|
|
469
494
|
"type": "string"
|
|
@@ -503,6 +528,7 @@ export const operationManifest = [
|
|
|
503
528
|
"pathParams": [
|
|
504
529
|
{
|
|
505
530
|
"description": "Resource UUID",
|
|
531
|
+
"enum": null,
|
|
506
532
|
"name": "id",
|
|
507
533
|
"required": true,
|
|
508
534
|
"type": "string"
|
|
@@ -542,6 +568,7 @@ export const operationManifest = [
|
|
|
542
568
|
"pathParams": [
|
|
543
569
|
{
|
|
544
570
|
"description": "Resource UUID",
|
|
571
|
+
"enum": null,
|
|
545
572
|
"name": "id",
|
|
546
573
|
"required": true,
|
|
547
574
|
"type": "string"
|
|
@@ -566,36 +593,47 @@ export const operationManifest = [
|
|
|
566
593
|
"queryParams": [
|
|
567
594
|
{
|
|
568
595
|
"description": "Pagination cursor from a previous response's `meta.cursor` field.\nFormat: `{ISO-datetime}|{id}`\n",
|
|
596
|
+
"enum": null,
|
|
569
597
|
"name": "cursor",
|
|
570
598
|
"required": false,
|
|
571
599
|
"type": "string"
|
|
572
600
|
},
|
|
573
601
|
{
|
|
574
602
|
"description": "Number of results per page",
|
|
603
|
+
"enum": null,
|
|
575
604
|
"name": "limit",
|
|
576
605
|
"required": false,
|
|
577
606
|
"type": "integer"
|
|
578
607
|
},
|
|
579
608
|
{
|
|
580
609
|
"description": "Filter by email ID",
|
|
610
|
+
"enum": null,
|
|
581
611
|
"name": "email_id",
|
|
582
612
|
"required": false,
|
|
583
613
|
"type": "string"
|
|
584
614
|
},
|
|
585
615
|
{
|
|
586
616
|
"description": "Filter by delivery status",
|
|
617
|
+
"enum": [
|
|
618
|
+
"pending",
|
|
619
|
+
"delivered",
|
|
620
|
+
"header_confirmed",
|
|
621
|
+
"failed"
|
|
622
|
+
],
|
|
587
623
|
"name": "status",
|
|
588
624
|
"required": false,
|
|
589
625
|
"type": "string"
|
|
590
626
|
},
|
|
591
627
|
{
|
|
592
628
|
"description": "Filter deliveries created on or after this timestamp",
|
|
629
|
+
"enum": null,
|
|
593
630
|
"name": "date_from",
|
|
594
631
|
"required": false,
|
|
595
632
|
"type": "string"
|
|
596
633
|
},
|
|
597
634
|
{
|
|
598
635
|
"description": "Filter deliveries created on or before this timestamp",
|
|
636
|
+
"enum": null,
|
|
599
637
|
"name": "date_to",
|
|
600
638
|
"required": false,
|
|
601
639
|
"type": "string"
|
|
@@ -610,7 +648,7 @@ export const operationManifest = [
|
|
|
610
648
|
"binaryResponse": false,
|
|
611
649
|
"bodyRequired": false,
|
|
612
650
|
"command": "replay-delivery",
|
|
613
|
-
"description": "Re-sends the stored webhook payload from a previous delivery attempt.\nIf the original endpoint is still active, it is targeted. If the\noriginal endpoint was deleted, the
|
|
651
|
+
"description": "Re-sends the stored webhook payload from a previous delivery attempt.\nIf the original endpoint is still active, it is targeted. If the\noriginal endpoint was deleted, the oldest active endpoint is used.\nDeactivated endpoints cannot be replayed to. Rate limited per-org,\nsharing an org-wide budget with email replays.\n",
|
|
614
652
|
"hasJsonBody": false,
|
|
615
653
|
"method": "POST",
|
|
616
654
|
"operationId": "replayDelivery",
|
|
@@ -618,6 +656,7 @@ export const operationManifest = [
|
|
|
618
656
|
"pathParams": [
|
|
619
657
|
{
|
|
620
658
|
"description": "Delivery ID (numeric)",
|
|
659
|
+
"enum": null,
|
|
621
660
|
"name": "id",
|
|
622
661
|
"required": true,
|
|
623
662
|
"type": "string"
|
package/oclif.manifest.json
CHANGED
|
@@ -669,6 +669,12 @@
|
|
|
669
669
|
"required": false,
|
|
670
670
|
"hasDynamicHelp": false,
|
|
671
671
|
"multiple": false,
|
|
672
|
+
"options": [
|
|
673
|
+
"pending",
|
|
674
|
+
"accepted",
|
|
675
|
+
"completed",
|
|
676
|
+
"rejected"
|
|
677
|
+
],
|
|
672
678
|
"type": "option"
|
|
673
679
|
},
|
|
674
680
|
"search": {
|
|
@@ -709,7 +715,7 @@
|
|
|
709
715
|
"emails:replay-email-webhooks": {
|
|
710
716
|
"aliases": [],
|
|
711
717
|
"args": {},
|
|
712
|
-
"description": "Re-delivers the webhook payload for this email to all active\nendpoints matching the email's domain.
|
|
718
|
+
"description": "Re-delivers the webhook payload for this email to all active\nendpoints matching the email's domain. Rate limited per-email\n(short cooldown between successive replays of the same email)\nand per-org (burst + sustained windows), sharing an org-wide\nbudget with delivery replays.\n",
|
|
713
719
|
"flags": {
|
|
714
720
|
"api-key": {
|
|
715
721
|
"description": "Primitive API key (defaults to PRIMITIVE_API_KEY)",
|
|
@@ -1181,6 +1187,12 @@
|
|
|
1181
1187
|
"required": false,
|
|
1182
1188
|
"hasDynamicHelp": false,
|
|
1183
1189
|
"multiple": false,
|
|
1190
|
+
"options": [
|
|
1191
|
+
"pending",
|
|
1192
|
+
"delivered",
|
|
1193
|
+
"header_confirmed",
|
|
1194
|
+
"failed"
|
|
1195
|
+
],
|
|
1184
1196
|
"type": "option"
|
|
1185
1197
|
},
|
|
1186
1198
|
"date-from": {
|
|
@@ -1213,7 +1225,7 @@
|
|
|
1213
1225
|
"webhook-deliveries:replay-delivery": {
|
|
1214
1226
|
"aliases": [],
|
|
1215
1227
|
"args": {},
|
|
1216
|
-
"description": "Re-sends the stored webhook payload from a previous delivery attempt.\nIf the original endpoint is still active, it is targeted. If the\noriginal endpoint was deleted, the
|
|
1228
|
+
"description": "Re-sends the stored webhook payload from a previous delivery attempt.\nIf the original endpoint is still active, it is targeted. If the\noriginal endpoint was deleted, the oldest active endpoint is used.\nDeactivated endpoints cannot be replayed to. Rate limited per-org,\nsharing an org-wide budget with email replays.\n",
|
|
1217
1229
|
"flags": {
|
|
1218
1230
|
"api-key": {
|
|
1219
1231
|
"description": "Primitive API key (defaults to PRIMITIVE_API_KEY)",
|
|
@@ -1251,5 +1263,5 @@
|
|
|
1251
1263
|
"enableJsonFlag": false
|
|
1252
1264
|
}
|
|
1253
1265
|
},
|
|
1254
|
-
"version": "0.
|
|
1266
|
+
"version": "0.4.0"
|
|
1255
1267
|
}
|