@primitivedotdev/sdk 1.26.0 → 1.27.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/README.md +58 -1
- package/dist/api/index.d.ts +3 -3
- package/dist/api/index.js +4 -4
- package/dist/{api-BXlPoOdE.js → api-D4xf448r.js} +506 -3
- package/dist/contract/index.d.ts +1 -1
- package/dist/contract/index.js +2 -1
- package/dist/{errors-BgI9FKHK.d.ts → errors-CCJX3I_T.d.ts} +11 -5
- package/dist/{index-fS1gVNuX.d.ts → index-DCLGz6IH.d.ts} +5 -37
- package/dist/{index-BGyYkqRn.d.ts → index-DwP3ul-y.d.ts} +175 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/openapi/index.js +1 -1
- package/dist/{operations.generated-CPcHOHgd.js → operations.generated-CoVn-Rb6.js} +236 -4
- package/dist/parser/address.js +1 -1
- package/dist/parser/index.js +1 -1
- package/dist/payloads/index.js +1 -1
- package/dist/{webhook-BtyuJtUF.js → trust-DBOnyTHV.js} +671 -2147
- package/dist/webhook/index.d.ts +2 -2
- package/dist/webhook/index.js +2 -2
- package/dist/webhook-B72YFapb.js +2132 -0
- package/package.json +3 -3
- package/dist/errors-Bo0f7eId.js +0 -673
- /package/dist/{address-parser-C2JJzLdA.js → address-parser-BxXv4vx0.js} +0 -0
- /package/dist/{payloads-BfJAtqW9.js → payloads-BMngnJlE.js} +0 -0
|
@@ -2372,6 +2372,22 @@ const openapiDocument = {
|
|
|
2372
2372
|
"format": "date-time"
|
|
2373
2373
|
},
|
|
2374
2374
|
"description": "Inclusive upper bound on `created_at`."
|
|
2375
|
+
},
|
|
2376
|
+
{
|
|
2377
|
+
"name": "q",
|
|
2378
|
+
"in": "query",
|
|
2379
|
+
"schema": { "type": "string" },
|
|
2380
|
+
"description": "Literal case-insensitive substring filter over the\nsubject, the retained plain-text body, the sender, and\nthe To, CC and BCC recipients of each send. Matched\nverbatim: `%`, `_` and `\\` are ordinary characters and\ndo not act as wildcards, so a search for `10%` finds the\nliteral string `10%` rather than everything beginning\n`10`.\n\nLeading and trailing whitespace is trimmed, and the\nresult must be 3 to 500 UTF-16 code units. The\nthree-character minimum is the search index's: a shorter\npattern cannot be answered from the index and would scan\nthe whole mailbox, so it is rejected rather than served\nas a request that times out.\n\nThose bounds are deliberately NOT declared as\n`minLength`/`maxLength`. Both count Unicode code points\non the value as sent, while the server trims first and\ncounts UTF-16 code units, and the two disagree in both\ndirections: two astral characters are 2 code points but\n4 code units, so a declared minimum would reject a query\nthe server accepts, and `\"<499 chars> \"` is 500 code\npoints before trimming and 499 after, so a declared\nmaximum would reject another. Declaring a bound the\nserver does not enforce is worse than declaring none,\nbecause the client refuses locally and the caller never\nlearns why. The server validates; a violation is a `400`.\n\nRecipients are matched one address at a time rather than\nagainst the serialized recipient list, so a query\ncontaining a quote, comma or bracket matches only where\nthat character occurs inside an address. Bodies are\nsearched only where the plain-text body was retained;\nHTML-only bodies are not searched.\n\nNot served by every deployment. Where sent-mail search\nis not enabled the endpoint answers `503` with code\n`sent_mail_search_unavailable`, which callers should\ntreat as a capability answer and fall back on rather\nthan as an outage.\n"
|
|
2381
|
+
},
|
|
2382
|
+
{
|
|
2383
|
+
"name": "from",
|
|
2384
|
+
"in": "query",
|
|
2385
|
+
"schema": {
|
|
2386
|
+
"type": "string",
|
|
2387
|
+
"format": "email",
|
|
2388
|
+
"maxLength": 320
|
|
2389
|
+
},
|
|
2390
|
+
"description": "Exact case-insensitive sender mailbox filter. Returns\nonly sends whose from address equals this value; it is\nnot a substring match, so a partial mailbox matches\nnothing. Use `q` to search sender text loosely.\nCombines with every other filter, and unlike `q` it is\nserved by every deployment.\n"
|
|
2375
2391
|
}
|
|
2376
2392
|
],
|
|
2377
2393
|
"responses": {
|
|
@@ -2386,7 +2402,20 @@ const openapiDocument = {
|
|
|
2386
2402
|
}] } } }
|
|
2387
2403
|
},
|
|
2388
2404
|
"400": { "$ref": "#/components/responses/ValidationError" },
|
|
2389
|
-
"401": { "$ref": "#/components/responses/Unauthorized" }
|
|
2405
|
+
"401": { "$ref": "#/components/responses/Unauthorized" },
|
|
2406
|
+
"503": {
|
|
2407
|
+
"description": "Sent-mail text search is not enabled in this deployment,\nso `q` cannot be served. A capability answer, not an\noutage: it will not clear on retry, and the same request\nwithout `q` succeeds. Fall back to whatever local\nmatching the caller has. Distinguished from the generic\n503 by its `sent_mail_search_unavailable` code.\n",
|
|
2408
|
+
"content": { "application/json": {
|
|
2409
|
+
"schema": { "$ref": "#/components/schemas/ErrorResponse" },
|
|
2410
|
+
"example": {
|
|
2411
|
+
"success": false,
|
|
2412
|
+
"error": {
|
|
2413
|
+
"code": "sent_mail_search_unavailable",
|
|
2414
|
+
"message": "Sent-mail text search (`q`) is not enabled in this environment."
|
|
2415
|
+
}
|
|
2416
|
+
}
|
|
2417
|
+
} }
|
|
2418
|
+
}
|
|
2390
2419
|
}
|
|
2391
2420
|
} },
|
|
2392
2421
|
"/sent-emails/{id}": {
|
|
@@ -8638,14 +8667,16 @@ const openapiDocument = {
|
|
|
8638
8667
|
"oneOf": [
|
|
8639
8668
|
{ "$ref": "#/components/schemas/CompleteWebhookHttpInput" },
|
|
8640
8669
|
{ "$ref": "#/components/schemas/CompleteWebhookExecInput" },
|
|
8641
|
-
{ "$ref": "#/components/schemas/CompleteWebhookStdoutInput" }
|
|
8670
|
+
{ "$ref": "#/components/schemas/CompleteWebhookStdoutInput" },
|
|
8671
|
+
{ "$ref": "#/components/schemas/CompleteWebhookSdkInput" }
|
|
8642
8672
|
],
|
|
8643
8673
|
"discriminator": {
|
|
8644
8674
|
"propertyName": "mode",
|
|
8645
8675
|
"mapping": {
|
|
8646
8676
|
"http": "#/components/schemas/CompleteWebhookHttpInput",
|
|
8647
8677
|
"exec": "#/components/schemas/CompleteWebhookExecInput",
|
|
8648
|
-
"stdout": "#/components/schemas/CompleteWebhookStdoutInput"
|
|
8678
|
+
"stdout": "#/components/schemas/CompleteWebhookStdoutInput",
|
|
8679
|
+
"sdk": "#/components/schemas/CompleteWebhookSdkInput"
|
|
8649
8680
|
}
|
|
8650
8681
|
}
|
|
8651
8682
|
},
|
|
@@ -8799,6 +8830,49 @@ const openapiDocument = {
|
|
|
8799
8830
|
],
|
|
8800
8831
|
"additionalProperties": false
|
|
8801
8832
|
},
|
|
8833
|
+
"CompleteWebhookSdkInput": {
|
|
8834
|
+
"type": "object",
|
|
8835
|
+
"properties": {
|
|
8836
|
+
"queue_id": {
|
|
8837
|
+
"type": "string",
|
|
8838
|
+
"format": "uuid",
|
|
8839
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
8840
|
+
},
|
|
8841
|
+
"delivery_id": {
|
|
8842
|
+
"type": "string",
|
|
8843
|
+
"format": "uuid",
|
|
8844
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
8845
|
+
},
|
|
8846
|
+
"lease_token": {
|
|
8847
|
+
"type": "string",
|
|
8848
|
+
"format": "uuid",
|
|
8849
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
8850
|
+
},
|
|
8851
|
+
"duration_ms": {
|
|
8852
|
+
"type": "integer",
|
|
8853
|
+
"minimum": 0,
|
|
8854
|
+
"maximum": 3e4
|
|
8855
|
+
},
|
|
8856
|
+
"mode": {
|
|
8857
|
+
"type": "string",
|
|
8858
|
+
"enum": ["sdk"]
|
|
8859
|
+
},
|
|
8860
|
+
"accepted": { "type": "boolean" },
|
|
8861
|
+
"transport_error": {
|
|
8862
|
+
"type": "string",
|
|
8863
|
+
"enum": ["timeout", "io"]
|
|
8864
|
+
}
|
|
8865
|
+
},
|
|
8866
|
+
"required": [
|
|
8867
|
+
"queue_id",
|
|
8868
|
+
"delivery_id",
|
|
8869
|
+
"lease_token",
|
|
8870
|
+
"duration_ms",
|
|
8871
|
+
"mode",
|
|
8872
|
+
"accepted"
|
|
8873
|
+
],
|
|
8874
|
+
"additionalProperties": false
|
|
8875
|
+
},
|
|
8802
8876
|
"CompleteWebhookResponse": {
|
|
8803
8877
|
"type": "object",
|
|
8804
8878
|
"properties": {
|
|
@@ -8832,6 +8906,31 @@ const openapiDocument = {
|
|
|
8832
8906
|
"Endpoint": {
|
|
8833
8907
|
"type": "object",
|
|
8834
8908
|
"properties": {
|
|
8909
|
+
"receiver_capabilities": {
|
|
8910
|
+
"type": "object",
|
|
8911
|
+
"properties": {
|
|
8912
|
+
"completion_modes": {
|
|
8913
|
+
"type": "array",
|
|
8914
|
+
"items": {
|
|
8915
|
+
"type": "string",
|
|
8916
|
+
"enum": [
|
|
8917
|
+
"http",
|
|
8918
|
+
"exec",
|
|
8919
|
+
"stdout",
|
|
8920
|
+
"sdk"
|
|
8921
|
+
]
|
|
8922
|
+
}
|
|
8923
|
+
},
|
|
8924
|
+
"stream_protocols": {
|
|
8925
|
+
"type": "array",
|
|
8926
|
+
"items": {
|
|
8927
|
+
"type": "string",
|
|
8928
|
+
"enum": ["primitive.events.v1"]
|
|
8929
|
+
}
|
|
8930
|
+
}
|
|
8931
|
+
},
|
|
8932
|
+
"required": ["completion_modes", "stream_protocols"]
|
|
8933
|
+
},
|
|
8835
8934
|
"id": {
|
|
8836
8935
|
"type": "string",
|
|
8837
8936
|
"format": "uuid"
|
|
@@ -15141,6 +15240,49 @@ const operationManifest = [
|
|
|
15141
15240
|
"write_succeeded"
|
|
15142
15241
|
],
|
|
15143
15242
|
"additionalProperties": false
|
|
15243
|
+
},
|
|
15244
|
+
{
|
|
15245
|
+
"type": "object",
|
|
15246
|
+
"properties": {
|
|
15247
|
+
"queue_id": {
|
|
15248
|
+
"type": "string",
|
|
15249
|
+
"format": "uuid",
|
|
15250
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
15251
|
+
},
|
|
15252
|
+
"delivery_id": {
|
|
15253
|
+
"type": "string",
|
|
15254
|
+
"format": "uuid",
|
|
15255
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
15256
|
+
},
|
|
15257
|
+
"lease_token": {
|
|
15258
|
+
"type": "string",
|
|
15259
|
+
"format": "uuid",
|
|
15260
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
15261
|
+
},
|
|
15262
|
+
"duration_ms": {
|
|
15263
|
+
"type": "integer",
|
|
15264
|
+
"minimum": 0,
|
|
15265
|
+
"maximum": 3e4
|
|
15266
|
+
},
|
|
15267
|
+
"mode": {
|
|
15268
|
+
"type": "string",
|
|
15269
|
+
"enum": ["sdk"]
|
|
15270
|
+
},
|
|
15271
|
+
"accepted": { "type": "boolean" },
|
|
15272
|
+
"transport_error": {
|
|
15273
|
+
"type": "string",
|
|
15274
|
+
"enum": ["timeout", "io"]
|
|
15275
|
+
}
|
|
15276
|
+
},
|
|
15277
|
+
"required": [
|
|
15278
|
+
"queue_id",
|
|
15279
|
+
"delivery_id",
|
|
15280
|
+
"lease_token",
|
|
15281
|
+
"duration_ms",
|
|
15282
|
+
"mode",
|
|
15283
|
+
"accepted"
|
|
15284
|
+
],
|
|
15285
|
+
"additionalProperties": false
|
|
15144
15286
|
}
|
|
15145
15287
|
],
|
|
15146
15288
|
"discriminator": {
|
|
@@ -15148,7 +15290,8 @@ const operationManifest = [
|
|
|
15148
15290
|
"mapping": {
|
|
15149
15291
|
"http": "#/components/schemas/CompleteWebhookHttpInput",
|
|
15150
15292
|
"exec": "#/components/schemas/CompleteWebhookExecInput",
|
|
15151
|
-
"stdout": "#/components/schemas/CompleteWebhookStdoutInput"
|
|
15293
|
+
"stdout": "#/components/schemas/CompleteWebhookStdoutInput",
|
|
15294
|
+
"sdk": "#/components/schemas/CompleteWebhookSdkInput"
|
|
15152
15295
|
}
|
|
15153
15296
|
}
|
|
15154
15297
|
},
|
|
@@ -15259,6 +15402,31 @@ const operationManifest = [
|
|
|
15259
15402
|
"responseSchema": {
|
|
15260
15403
|
"type": "object",
|
|
15261
15404
|
"properties": {
|
|
15405
|
+
"receiver_capabilities": {
|
|
15406
|
+
"type": "object",
|
|
15407
|
+
"properties": {
|
|
15408
|
+
"completion_modes": {
|
|
15409
|
+
"type": "array",
|
|
15410
|
+
"items": {
|
|
15411
|
+
"type": "string",
|
|
15412
|
+
"enum": [
|
|
15413
|
+
"http",
|
|
15414
|
+
"exec",
|
|
15415
|
+
"stdout",
|
|
15416
|
+
"sdk"
|
|
15417
|
+
]
|
|
15418
|
+
}
|
|
15419
|
+
},
|
|
15420
|
+
"stream_protocols": {
|
|
15421
|
+
"type": "array",
|
|
15422
|
+
"items": {
|
|
15423
|
+
"type": "string",
|
|
15424
|
+
"enum": ["primitive.events.v1"]
|
|
15425
|
+
}
|
|
15426
|
+
}
|
|
15427
|
+
},
|
|
15428
|
+
"required": ["completion_modes", "stream_protocols"]
|
|
15429
|
+
},
|
|
15262
15430
|
"id": {
|
|
15263
15431
|
"type": "string",
|
|
15264
15432
|
"format": "uuid"
|
|
@@ -15410,6 +15578,31 @@ const operationManifest = [
|
|
|
15410
15578
|
"items": {
|
|
15411
15579
|
"type": "object",
|
|
15412
15580
|
"properties": {
|
|
15581
|
+
"receiver_capabilities": {
|
|
15582
|
+
"type": "object",
|
|
15583
|
+
"properties": {
|
|
15584
|
+
"completion_modes": {
|
|
15585
|
+
"type": "array",
|
|
15586
|
+
"items": {
|
|
15587
|
+
"type": "string",
|
|
15588
|
+
"enum": [
|
|
15589
|
+
"http",
|
|
15590
|
+
"exec",
|
|
15591
|
+
"stdout",
|
|
15592
|
+
"sdk"
|
|
15593
|
+
]
|
|
15594
|
+
}
|
|
15595
|
+
},
|
|
15596
|
+
"stream_protocols": {
|
|
15597
|
+
"type": "array",
|
|
15598
|
+
"items": {
|
|
15599
|
+
"type": "string",
|
|
15600
|
+
"enum": ["primitive.events.v1"]
|
|
15601
|
+
}
|
|
15602
|
+
}
|
|
15603
|
+
},
|
|
15604
|
+
"required": ["completion_modes", "stream_protocols"]
|
|
15605
|
+
},
|
|
15413
15606
|
"id": {
|
|
15414
15607
|
"type": "string",
|
|
15415
15608
|
"format": "uuid"
|
|
@@ -15851,6 +16044,31 @@ const operationManifest = [
|
|
|
15851
16044
|
"responseSchema": {
|
|
15852
16045
|
"type": "object",
|
|
15853
16046
|
"properties": {
|
|
16047
|
+
"receiver_capabilities": {
|
|
16048
|
+
"type": "object",
|
|
16049
|
+
"properties": {
|
|
16050
|
+
"completion_modes": {
|
|
16051
|
+
"type": "array",
|
|
16052
|
+
"items": {
|
|
16053
|
+
"type": "string",
|
|
16054
|
+
"enum": [
|
|
16055
|
+
"http",
|
|
16056
|
+
"exec",
|
|
16057
|
+
"stdout",
|
|
16058
|
+
"sdk"
|
|
16059
|
+
]
|
|
16060
|
+
}
|
|
16061
|
+
},
|
|
16062
|
+
"stream_protocols": {
|
|
16063
|
+
"type": "array",
|
|
16064
|
+
"items": {
|
|
16065
|
+
"type": "string",
|
|
16066
|
+
"enum": ["primitive.events.v1"]
|
|
16067
|
+
}
|
|
16068
|
+
}
|
|
16069
|
+
},
|
|
16070
|
+
"required": ["completion_modes", "stream_protocols"]
|
|
16071
|
+
},
|
|
15854
16072
|
"id": {
|
|
15855
16073
|
"type": "string",
|
|
15856
16074
|
"format": "uuid"
|
|
@@ -22176,6 +22394,20 @@ const operationManifest = [
|
|
|
22176
22394
|
"name": "date_to",
|
|
22177
22395
|
"required": false,
|
|
22178
22396
|
"type": "string"
|
|
22397
|
+
},
|
|
22398
|
+
{
|
|
22399
|
+
"description": "Literal case-insensitive substring filter over the\nsubject, the retained plain-text body, the sender, and\nthe To, CC and BCC recipients of each send. Matched\nverbatim: `%`, `_` and `\\` are ordinary characters and\ndo not act as wildcards, so a search for `10%` finds the\nliteral string `10%` rather than everything beginning\n`10`.\n\nLeading and trailing whitespace is trimmed, and the\nresult must be 3 to 500 UTF-16 code units. The\nthree-character minimum is the search index's: a shorter\npattern cannot be answered from the index and would scan\nthe whole mailbox, so it is rejected rather than served\nas a request that times out.\n\nThose bounds are deliberately NOT declared as\n`minLength`/`maxLength`. Both count Unicode code points\non the value as sent, while the server trims first and\ncounts UTF-16 code units, and the two disagree in both\ndirections: two astral characters are 2 code points but\n4 code units, so a declared minimum would reject a query\nthe server accepts, and `\"<499 chars> \"` is 500 code\npoints before trimming and 499 after, so a declared\nmaximum would reject another. Declaring a bound the\nserver does not enforce is worse than declaring none,\nbecause the client refuses locally and the caller never\nlearns why. The server validates; a violation is a `400`.\n\nRecipients are matched one address at a time rather than\nagainst the serialized recipient list, so a query\ncontaining a quote, comma or bracket matches only where\nthat character occurs inside an address. Bodies are\nsearched only where the plain-text body was retained;\nHTML-only bodies are not searched.\n\nNot served by every deployment. Where sent-mail search\nis not enabled the endpoint answers `503` with code\n`sent_mail_search_unavailable`, which callers should\ntreat as a capability answer and fall back on rather\nthan as an outage.\n",
|
|
22400
|
+
"enum": null,
|
|
22401
|
+
"name": "q",
|
|
22402
|
+
"required": false,
|
|
22403
|
+
"type": "string"
|
|
22404
|
+
},
|
|
22405
|
+
{
|
|
22406
|
+
"description": "Exact case-insensitive sender mailbox filter. Returns\nonly sends whose from address equals this value; it is\nnot a substring match, so a partial mailbox matches\nnothing. Use `q` to search sender text loosely.\nCombines with every other filter, and unlike `q` it is\nserved by every deployment.\n",
|
|
22407
|
+
"enum": null,
|
|
22408
|
+
"name": "from",
|
|
22409
|
+
"required": false,
|
|
22410
|
+
"type": "string"
|
|
22179
22411
|
}
|
|
22180
22412
|
],
|
|
22181
22413
|
"requestSchema": null,
|
package/dist/parser/address.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as parseFromHeaderLoose, t as parseFromHeader } from "../address-parser-
|
|
1
|
+
import { n as parseFromHeaderLoose, t as parseFromHeader } from "../address-parser-BxXv4vx0.js";
|
|
2
2
|
export { parseFromHeader, parseFromHeaderLoose };
|
package/dist/parser/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as parseFromHeaderLoose, t as parseFromHeader } from "../address-parser-
|
|
1
|
+
import { n as parseFromHeaderLoose, t as parseFromHeader } from "../address-parser-BxXv4vx0.js";
|
|
2
2
|
import { createHash } from "node:crypto";
|
|
3
3
|
import { createGzip } from "node:zlib";
|
|
4
4
|
import { pack } from "tar-stream";
|
package/dist/payloads/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as pushFile, i as pushBytes, n as fetchManifest, r as pullFile, t as encodeManifest } from "../payloads-
|
|
1
|
+
import { a as pushFile, i as pushBytes, n as fetchManifest, r as pullFile, t as encodeManifest } from "../payloads-BMngnJlE.js";
|
|
2
2
|
export { encodeManifest, fetchManifest, pullFile, pushBytes, pushFile };
|