@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.
Files changed (67) hide show
  1. package/README.md +2 -2
  2. package/dist/api/index.d.ts +5 -3
  3. package/dist/api/index.js +4 -406
  4. package/dist/{api-CnUa6o4r.js → api-CZIBnM4Q.js} +118 -92
  5. package/dist/contract/index.d.ts +2 -2
  6. package/dist/contract/index.js +1 -1
  7. package/dist/{errors-x91I_yEt.js → errors-BPJGp9I6.js} +1 -1
  8. package/dist/{errors-C53fe686.d.ts → errors-T_0JE528.d.ts} +1 -1
  9. package/dist/{index-BbEVpN5e.d.ts → index-9Rqocr-c.d.ts} +87 -75
  10. package/dist/{index-Dbx9udpX.d.ts → index-EQZK4vWT.d.ts} +2 -2
  11. package/dist/index.d.ts +4 -4
  12. package/dist/index.js +3 -3
  13. package/dist/openapi/index.d.ts +1 -52
  14. package/dist/openapi/index.js +2 -8
  15. package/dist/operations.generated-BJERV_56.d.ts +53 -0
  16. package/dist/operations.generated-T3exFpgJ.js +7632 -0
  17. package/dist/parser/index.d.ts +1 -1
  18. package/dist/parser/index.js +1 -1
  19. package/dist/webhook/index.d.ts +3 -3
  20. package/dist/webhook/index.js +2 -2
  21. package/dist/{webhook-DJkfUnFZ.js → webhook-Bra-g1q8.js} +1 -1
  22. package/package.json +9 -69
  23. package/bin/run.js +0 -20
  24. package/dist/api/generated/client/client.gen.js +0 -235
  25. package/dist/api/generated/client/index.js +0 -6
  26. package/dist/api/generated/client/types.gen.js +0 -2
  27. package/dist/api/generated/client/utils.gen.js +0 -228
  28. package/dist/api/generated/client.gen.js +0 -3
  29. package/dist/api/generated/core/auth.gen.js +0 -14
  30. package/dist/api/generated/core/bodySerializer.gen.js +0 -57
  31. package/dist/api/generated/core/params.gen.js +0 -100
  32. package/dist/api/generated/core/pathSerializer.gen.js +0 -106
  33. package/dist/api/generated/core/queryKeySerializer.gen.js +0 -92
  34. package/dist/api/generated/core/serverSentEvents.gen.js +0 -132
  35. package/dist/api/generated/core/types.gen.js +0 -2
  36. package/dist/api/generated/core/utils.gen.js +0 -87
  37. package/dist/api/generated/index.js +0 -2
  38. package/dist/api/generated/sdk.gen.js +0 -878
  39. package/dist/api/generated/types.gen.js +0 -2
  40. package/dist/api/verify-signature.js +0 -198
  41. package/dist/oclif/api-command.js +0 -755
  42. package/dist/oclif/auth.js +0 -223
  43. package/dist/oclif/commands/emails-latest.js +0 -185
  44. package/dist/oclif/commands/emails-poll.js +0 -121
  45. package/dist/oclif/commands/emails-wait.js +0 -171
  46. package/dist/oclif/commands/emails-watch.js +0 -165
  47. package/dist/oclif/commands/functions-deploy.js +0 -124
  48. package/dist/oclif/commands/functions-init.js +0 -256
  49. package/dist/oclif/commands/functions-redeploy.js +0 -113
  50. package/dist/oclif/commands/functions-set-secret.js +0 -213
  51. package/dist/oclif/commands/login.js +0 -237
  52. package/dist/oclif/commands/logout.js +0 -88
  53. package/dist/oclif/commands/send.js +0 -222
  54. package/dist/oclif/commands/whoami.js +0 -95
  55. package/dist/oclif/fish-completion.js +0 -87
  56. package/dist/oclif/index.js +0 -167
  57. package/dist/oclif/lint/raw-send-mail-fetch.js +0 -98
  58. package/dist/openapi/openapi.generated.js +0 -5754
  59. package/dist/openapi/operations.generated.js +0 -4626
  60. package/dist/parser/address-parser.js +0 -129
  61. package/dist/types.generated.js +0 -7
  62. package/dist/types.js +0 -53
  63. package/dist/webhook/errors.js +0 -224
  64. package/dist/webhook/received-email.js +0 -82
  65. package/oclif.manifest.json +0 -4380
  66. /package/dist/{address-parser-BYn8oW5r.js → address-parser-CQbFjgRC.js} +0 -0
  67. /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-9vXGZjPd.js";
2
- import { m as ReceivedEmail, u as WebhookValidationError } from "./errors-C53fe686.js";
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 { 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-9vXGZjPd.js";
2
- 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-C53fe686.js";
3
- import { _ as createPrimitiveClient, c as PrimitiveClient, f as SendInput, h as client, l as PrimitiveClientOptions, m as SendThreadInput, o as PrimitiveApiError, p as SendResult, r as ForwardInput, u as ReplyInput } from "./index-BbEVpN5e.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-Dbx9udpX.js";
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 { 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-x91I_yEt.js";
2
- import { a as PrimitiveClient, c as createPrimitiveClient, i as PrimitiveApiError, o as client } from "./api-CnUa6o4r.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-DJkfUnFZ.js";
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,
@@ -1,53 +1,2 @@
1
- //#region 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 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 };
@@ -1,8 +1,2 @@
1
- /**
2
- * OpenAPI distribution module.
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 };