@primitivedotdev/sdk 0.26.1 → 0.27.1
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/README.md +2 -2
- package/dist/api/index.d.ts +5 -3
- package/dist/api/index.js +4 -406
- package/dist/{api-CnUa6o4r.js → api-CZIBnM4Q.js} +118 -92
- package/dist/contract/index.d.ts +2 -2
- package/dist/contract/index.js +1 -1
- package/dist/{errors-x91I_yEt.js → errors-BPJGp9I6.js} +1 -1
- package/dist/{errors-C53fe686.d.ts → errors-T_0JE528.d.ts} +1 -1
- package/dist/{index-BbEVpN5e.d.ts → index-9Rqocr-c.d.ts} +87 -75
- package/dist/{index-Dbx9udpX.d.ts → index-EQZK4vWT.d.ts} +2 -2
- package/dist/index.d.ts +4 -4
- package/dist/index.js +3 -3
- package/dist/openapi/index.d.ts +1 -52
- package/dist/openapi/index.js +2 -8
- package/dist/operations.generated-BJERV_56.d.ts +53 -0
- package/dist/operations.generated-T3exFpgJ.js +7632 -0
- package/dist/parser/index.d.ts +1 -1
- package/dist/parser/index.js +1 -1
- package/dist/webhook/index.d.ts +3 -3
- package/dist/webhook/index.js +2 -2
- package/dist/{webhook-DJkfUnFZ.js → webhook-Bra-g1q8.js} +1 -1
- package/package.json +9 -69
- package/bin/run.js +0 -20
- package/dist/api/generated/client/client.gen.js +0 -235
- package/dist/api/generated/client/index.js +0 -6
- package/dist/api/generated/client/types.gen.js +0 -2
- package/dist/api/generated/client/utils.gen.js +0 -228
- package/dist/api/generated/client.gen.js +0 -3
- package/dist/api/generated/core/auth.gen.js +0 -14
- package/dist/api/generated/core/bodySerializer.gen.js +0 -57
- package/dist/api/generated/core/params.gen.js +0 -100
- package/dist/api/generated/core/pathSerializer.gen.js +0 -106
- package/dist/api/generated/core/queryKeySerializer.gen.js +0 -92
- package/dist/api/generated/core/serverSentEvents.gen.js +0 -132
- package/dist/api/generated/core/types.gen.js +0 -2
- package/dist/api/generated/core/utils.gen.js +0 -87
- package/dist/api/generated/index.js +0 -2
- package/dist/api/generated/sdk.gen.js +0 -878
- package/dist/api/generated/types.gen.js +0 -2
- package/dist/api/verify-signature.js +0 -198
- package/dist/oclif/api-command.js +0 -755
- package/dist/oclif/auth.js +0 -223
- package/dist/oclif/commands/emails-latest.js +0 -185
- package/dist/oclif/commands/emails-poll.js +0 -121
- package/dist/oclif/commands/emails-wait.js +0 -171
- package/dist/oclif/commands/emails-watch.js +0 -165
- package/dist/oclif/commands/functions-deploy.js +0 -124
- package/dist/oclif/commands/functions-init.js +0 -256
- package/dist/oclif/commands/functions-redeploy.js +0 -113
- package/dist/oclif/commands/functions-set-secret.js +0 -213
- package/dist/oclif/commands/login.js +0 -237
- package/dist/oclif/commands/logout.js +0 -88
- package/dist/oclif/commands/send.js +0 -222
- package/dist/oclif/commands/whoami.js +0 -95
- package/dist/oclif/fish-completion.js +0 -87
- package/dist/oclif/index.js +0 -167
- package/dist/oclif/lint/raw-send-mail-fetch.js +0 -98
- package/dist/openapi/openapi.generated.js +0 -5754
- package/dist/openapi/operations.generated.js +0 -4626
- package/dist/parser/address-parser.js +0 -129
- package/dist/types.generated.js +0 -7
- package/dist/types.js +0 -53
- package/dist/webhook/errors.js +0 -224
- package/dist/webhook/received-email.js +0 -82
- package/oclif.manifest.json +0 -4380
- /package/dist/{address-parser-BYn8oW5r.js → address-parser-CQbFjgRC.js} +0 -0
- /package/dist/{types-9vXGZjPd.d.ts → types-Nslo1CU0.d.ts} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { N as WebhookEvent, j as ValidateEmailAuthResult, l as EmailAuth, u as EmailReceivedEvent } from "./types-
|
|
2
|
-
import { m as ReceivedEmail, u as WebhookValidationError } from "./errors-
|
|
1
|
+
import { N as WebhookEvent, j as ValidateEmailAuthResult, l as EmailAuth, u as EmailReceivedEvent } from "./types-Nslo1CU0.js";
|
|
2
|
+
import { m as ReceivedEmail, u as WebhookValidationError } from "./errors-T_0JE528.js";
|
|
3
3
|
|
|
4
4
|
//#region src/validation.d.ts
|
|
5
5
|
interface ValidationSuccess<T> {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { _ as
|
|
3
|
-
import { _ as
|
|
4
|
-
import { A as VerifyOptions, C as signStandardWebhooksPayload, D as PRIMITIVE_CONFIRMED_HEADER, E as LEGACY_SIGNATURE_HEADER, F as VerifyDownloadTokenResult, I as generateDownloadToken, L as verifyDownloadToken, M as verifyWebhookSignature, N as GenerateDownloadTokenOptions, O as PRIMITIVE_SIGNATURE_HEADER, P as VerifyDownloadTokenOptions, R as safeValidateEmailReceivedEvent, S as StandardWebhooksVerifyOptions, T as LEGACY_CONFIRMED_HEADER, _ as emailReceivedEventJsonSchema, a as confirmedHeaders, b as STANDARD_WEBHOOK_TIMESTAMP_HEADER, c as handleWebhook, d as isRawIncluded, f as parseWebhookEvent, g as validateEmailAuth, h as WEBHOOK_VERSION, i as WebhookHeaders, j as signWebhookPayload, k as SignResult, l as isDownloadExpired, m as verifyRawEmailDownload, n as HandleWebhookOptions, o as decodeRawEmail, p as receive, r as ReceiveRequestOptions, s as getDownloadTimeRemaining, t as DecodeRawEmailOptions, u as isEmailReceivedEvent, v as STANDARD_WEBHOOK_ID_HEADER, w as verifyStandardWebhooksSignature, x as StandardWebhooksSignResult, y as STANDARD_WEBHOOK_SIGNATURE_HEADER, z as validateEmailReceivedEvent } from "./index-
|
|
1
|
+
import { c as SendThreadInput, i as ReplyInput, l as client, n as PrimitiveClient, o as SendInput, r as PrimitiveClientOptions, s as SendResult, t as ForwardInput, u as createPrimitiveClient, v as PrimitiveApiError } from "./index-9Rqocr-c.js";
|
|
2
|
+
import { A as UnknownEvent, C as ParsedDataFailed, D as RawContentDownloadOnly, E as RawContent, M as WebhookAttachment, N as WebhookEvent, O as RawContentInline, S as ParsedDataComplete, T as ParsedStatus, _ as ForwardResultInline, a as DmarcPolicy, b as KnownWebhookEvent, c as EmailAnalysis, d as EventType, f as ForwardAnalysis, g as ForwardResultAttachmentSkipped, h as ForwardResultAttachmentAnalyzed, i as DkimSignature, j as ValidateEmailAuthResult, k as SpfResult, l as EmailAuth, m as ForwardResult, n as AuthVerdict, o as DmarcResult, p as ForwardOriginalSender, r as DkimResult, s as EmailAddress, t as AuthConfidence, u as EmailReceivedEvent, v as ForwardVerdict, w as ParsedError, x as ParsedData, y as ForwardVerification } from "./types-Nslo1CU0.js";
|
|
3
|
+
import { _ as buildForwardSubject, a as RawEmailDecodeErrorCode, b as normalizeReceivedEmail, c as WebhookPayloadError, d as WebhookValidationErrorCode, f as WebhookVerificationError, g as ReceivedEmailThread, h as ReceivedEmailAddress, i as RawEmailDecodeError, l as WebhookPayloadErrorCode, m as ReceivedEmail, n as PrimitiveWebhookError, o as VERIFICATION_ERRORS, p as WebhookVerificationErrorCode, r as RAW_EMAIL_ERRORS, s as WebhookErrorCode, t as PAYLOAD_ERRORS, u as WebhookValidationError, v as buildReplySubject, x as parseHeaderAddress, y as formatAddress } from "./errors-T_0JE528.js";
|
|
4
|
+
import { A as VerifyOptions, C as signStandardWebhooksPayload, D as PRIMITIVE_CONFIRMED_HEADER, E as LEGACY_SIGNATURE_HEADER, F as VerifyDownloadTokenResult, I as generateDownloadToken, L as verifyDownloadToken, M as verifyWebhookSignature, N as GenerateDownloadTokenOptions, O as PRIMITIVE_SIGNATURE_HEADER, P as VerifyDownloadTokenOptions, R as safeValidateEmailReceivedEvent, S as StandardWebhooksVerifyOptions, T as LEGACY_CONFIRMED_HEADER, _ as emailReceivedEventJsonSchema, a as confirmedHeaders, b as STANDARD_WEBHOOK_TIMESTAMP_HEADER, c as handleWebhook, d as isRawIncluded, f as parseWebhookEvent, g as validateEmailAuth, h as WEBHOOK_VERSION, i as WebhookHeaders, j as signWebhookPayload, k as SignResult, l as isDownloadExpired, m as verifyRawEmailDownload, n as HandleWebhookOptions, o as decodeRawEmail, p as receive, r as ReceiveRequestOptions, s as getDownloadTimeRemaining, t as DecodeRawEmailOptions, u as isEmailReceivedEvent, v as STANDARD_WEBHOOK_ID_HEADER, w as verifyStandardWebhooksSignature, x as StandardWebhooksSignResult, y as STANDARD_WEBHOOK_SIGNATURE_HEADER, z as validateEmailReceivedEvent } from "./index-EQZK4vWT.js";
|
|
5
5
|
|
|
6
6
|
//#region src/index.d.ts
|
|
7
7
|
declare const primitive: {
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as
|
|
3
|
-
import { A as PRIMITIVE_CONFIRMED_HEADER, C as STANDARD_WEBHOOK_ID_HEADER, D as verifyStandardWebhooksSignature, E as signStandardWebhooksPayload, F as verifyDownloadToken, I as safeValidateEmailReceivedEvent, L as validateEmailReceivedEvent, M as signWebhookPayload, N as verifyWebhookSignature, O as LEGACY_CONFIRMED_HEADER, P as generateDownloadToken, S as emailReceivedEventJsonSchema, T as STANDARD_WEBHOOK_TIMESTAMP_HEADER, _ as DmarcResult, a as isDownloadExpired, b as ParsedStatus, c as parseWebhookEvent, d as WEBHOOK_VERSION, f as validateEmailAuth, g as DmarcPolicy, h as DkimResult, i as handleWebhook, j as PRIMITIVE_SIGNATURE_HEADER, k as LEGACY_SIGNATURE_HEADER, l as receive, m as AuthVerdict, n as decodeRawEmail, o as isEmailReceivedEvent, p as AuthConfidence, r as getDownloadTimeRemaining, s as isRawIncluded, t as confirmedHeaders, u as verifyRawEmailDownload, v as EventType, w as STANDARD_WEBHOOK_SIGNATURE_HEADER, x as SpfResult, y as ForwardVerdict } from "./webhook-
|
|
1
|
+
import { l as PrimitiveApiError, n as client, r as createPrimitiveClient, t as PrimitiveClient } from "./api-CZIBnM4Q.js";
|
|
2
|
+
import { a as VERIFICATION_ERRORS, c as WebhookVerificationError, d as formatAddress, f as normalizeReceivedEmail, i as RawEmailDecodeError, l as buildForwardSubject, n as PrimitiveWebhookError, o as WebhookPayloadError, p as parseHeaderAddress, r as RAW_EMAIL_ERRORS, s as WebhookValidationError, t as PAYLOAD_ERRORS, u as buildReplySubject } from "./errors-BPJGp9I6.js";
|
|
3
|
+
import { A as PRIMITIVE_CONFIRMED_HEADER, C as STANDARD_WEBHOOK_ID_HEADER, D as verifyStandardWebhooksSignature, E as signStandardWebhooksPayload, F as verifyDownloadToken, I as safeValidateEmailReceivedEvent, L as validateEmailReceivedEvent, M as signWebhookPayload, N as verifyWebhookSignature, O as LEGACY_CONFIRMED_HEADER, P as generateDownloadToken, S as emailReceivedEventJsonSchema, T as STANDARD_WEBHOOK_TIMESTAMP_HEADER, _ as DmarcResult, a as isDownloadExpired, b as ParsedStatus, c as parseWebhookEvent, d as WEBHOOK_VERSION, f as validateEmailAuth, g as DmarcPolicy, h as DkimResult, i as handleWebhook, j as PRIMITIVE_SIGNATURE_HEADER, k as LEGACY_SIGNATURE_HEADER, l as receive, m as AuthVerdict, n as decodeRawEmail, o as isEmailReceivedEvent, p as AuthConfidence, r as getDownloadTimeRemaining, s as isRawIncluded, t as confirmedHeaders, u as verifyRawEmailDownload, v as EventType, w as STANDARD_WEBHOOK_SIGNATURE_HEADER, x as SpfResult, y as ForwardVerdict } from "./webhook-Bra-g1q8.js";
|
|
4
4
|
//#region src/index.ts
|
|
5
5
|
const primitive = {
|
|
6
6
|
client,
|
package/dist/openapi/index.d.ts
CHANGED
|
@@ -1,53 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* OpenAPI document for the Primitive API.
|
|
4
|
-
*
|
|
5
|
-
* AUTO-GENERATED - DO NOT EDIT
|
|
6
|
-
* Run `pnpm generate:openapi` to regenerate.
|
|
7
|
-
*/
|
|
8
|
-
declare const openapiDocument: Record<string, unknown>;
|
|
9
|
-
//#endregion
|
|
10
|
-
//#region src/openapi/operations.generated.d.ts
|
|
11
|
-
/**
|
|
12
|
-
* Generated operation metadata for the Primitive API CLI and SDK tooling.
|
|
13
|
-
*
|
|
14
|
-
* AUTO-GENERATED - DO NOT EDIT
|
|
15
|
-
* Run `pnpm generate:openapi` to regenerate.
|
|
16
|
-
*/
|
|
17
|
-
type PrimitiveParameterManifest = {
|
|
18
|
-
description: string | null;
|
|
19
|
-
enum: string[] | null;
|
|
20
|
-
name: string;
|
|
21
|
-
required: boolean;
|
|
22
|
-
type: string;
|
|
23
|
-
};
|
|
24
|
-
type PrimitiveOperationManifest = {
|
|
25
|
-
binaryResponse: boolean;
|
|
26
|
-
bodyRequired: boolean;
|
|
27
|
-
command: string;
|
|
28
|
-
description: string | null;
|
|
29
|
-
hasJsonBody: boolean;
|
|
30
|
-
method: string;
|
|
31
|
-
operationId: string;
|
|
32
|
-
path: string;
|
|
33
|
-
pathParams: PrimitiveParameterManifest[];
|
|
34
|
-
queryParams: PrimitiveParameterManifest[];
|
|
35
|
-
/**
|
|
36
|
-
* Resolved JSON Schema for the request body when `hasJsonBody` is
|
|
37
|
-
* true. `$ref`s into the OpenAPI components are inlined.
|
|
38
|
-
*/
|
|
39
|
-
requestSchema: Record<string, unknown> | null;
|
|
40
|
-
/**
|
|
41
|
-
* Resolved JSON Schema for the 200/201 response body's `data`
|
|
42
|
-
* envelope contents. Same shape as `requestSchema`: `$ref`s
|
|
43
|
-
* inlined. Null on operations without a 200/201 JSON response.
|
|
44
|
-
*/
|
|
45
|
-
responseSchema: Record<string, unknown> | null;
|
|
46
|
-
sdkName: string;
|
|
47
|
-
summary: string | null;
|
|
48
|
-
tag: string;
|
|
49
|
-
tagCommand: string;
|
|
50
|
-
};
|
|
51
|
-
declare const operationManifest: PrimitiveOperationManifest[];
|
|
52
|
-
//#endregion
|
|
1
|
+
import { i as openapiDocument, n as PrimitiveParameterManifest, r as operationManifest, t as PrimitiveOperationManifest } from "../operations.generated-BJERV_56.js";
|
|
53
2
|
export { type PrimitiveOperationManifest, type PrimitiveParameterManifest, openapiDocument, operationManifest };
|
package/dist/openapi/index.js
CHANGED
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* Use this subpath when you need the canonical Primitive API specification,
|
|
5
|
-
* for example to serve it from another application.
|
|
6
|
-
*/
|
|
7
|
-
export { openapiDocument } from "./openapi.generated.js";
|
|
8
|
-
export { operationManifest, } from "./operations.generated.js";
|
|
1
|
+
import { n as openapiDocument, t as operationManifest } from "../operations.generated-T3exFpgJ.js";
|
|
2
|
+
export { openapiDocument, operationManifest };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
//#region ../packages/api-core/src/openapi/openapi.generated.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* OpenAPI document for the Primitive API.
|
|
4
|
+
*
|
|
5
|
+
* AUTO-GENERATED - DO NOT EDIT
|
|
6
|
+
* Run `pnpm generate:openapi` to regenerate.
|
|
7
|
+
*/
|
|
8
|
+
declare const openapiDocument: Record<string, unknown>;
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region ../packages/api-core/src/openapi/operations.generated.d.ts
|
|
11
|
+
/**
|
|
12
|
+
* Generated operation metadata for the Primitive API CLI and SDK tooling.
|
|
13
|
+
*
|
|
14
|
+
* AUTO-GENERATED - DO NOT EDIT
|
|
15
|
+
* Run `pnpm generate:openapi` to regenerate.
|
|
16
|
+
*/
|
|
17
|
+
type PrimitiveParameterManifest = {
|
|
18
|
+
description: string | null;
|
|
19
|
+
enum: string[] | null;
|
|
20
|
+
name: string;
|
|
21
|
+
required: boolean;
|
|
22
|
+
type: string;
|
|
23
|
+
};
|
|
24
|
+
type PrimitiveOperationManifest = {
|
|
25
|
+
binaryResponse: boolean;
|
|
26
|
+
bodyRequired: boolean;
|
|
27
|
+
command: string;
|
|
28
|
+
description: string | null;
|
|
29
|
+
hasJsonBody: boolean;
|
|
30
|
+
method: string;
|
|
31
|
+
operationId: string;
|
|
32
|
+
path: string;
|
|
33
|
+
pathParams: PrimitiveParameterManifest[];
|
|
34
|
+
queryParams: PrimitiveParameterManifest[];
|
|
35
|
+
/**
|
|
36
|
+
* Resolved JSON Schema for the request body when `hasJsonBody` is
|
|
37
|
+
* true. `$ref`s into the OpenAPI components are inlined.
|
|
38
|
+
*/
|
|
39
|
+
requestSchema: Record<string, unknown> | null;
|
|
40
|
+
/**
|
|
41
|
+
* Resolved JSON Schema for the 200/201 response body's `data`
|
|
42
|
+
* envelope contents. Same shape as `requestSchema`: `$ref`s
|
|
43
|
+
* inlined. Null on operations without a 200/201 JSON response.
|
|
44
|
+
*/
|
|
45
|
+
responseSchema: Record<string, unknown> | null;
|
|
46
|
+
sdkName: string;
|
|
47
|
+
summary: string | null;
|
|
48
|
+
tag: string;
|
|
49
|
+
tagCommand: string;
|
|
50
|
+
};
|
|
51
|
+
declare const operationManifest: PrimitiveOperationManifest[];
|
|
52
|
+
//#endregion
|
|
53
|
+
export { openapiDocument as i, PrimitiveParameterManifest as n, operationManifest as r, PrimitiveOperationManifest as t };
|