primitive 1.13.2 → 1.14.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 +6 -6
- package/dist/oclif/index.js +49 -130
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -99,12 +99,12 @@ cat challenge.json | primitive payments pay
|
|
|
99
99
|
primitive payments create-email-challenge --from payee@your-domain.example \
|
|
100
100
|
--to payer@their-domain.example --amount 10000 --network base-sepolia
|
|
101
101
|
# Payer (recommended): pay the email challenge in one step. Signs the challenge
|
|
102
|
-
# locally with your wallet key AND sends the signed interaction.json
|
|
103
|
-
#
|
|
104
|
-
#
|
|
105
|
-
#
|
|
106
|
-
#
|
|
107
|
-
# attachment; pass --body to customize it.
|
|
102
|
+
# locally with your wallet key AND sends the signed interaction.json, so you
|
|
103
|
+
# skip the manual sign-then-send dance. --in-reply-to is the inbound challenge
|
|
104
|
+
# email you received; it is fetched to address the payment to the payee, with
|
|
105
|
+
# From defaulting to the payer it was sent to. The send is not threaded under
|
|
106
|
+
# the challenge (the payment associates by interaction_id). The message carries
|
|
107
|
+
# a short default note alongside the attachment; pass --body to customize it.
|
|
108
108
|
primitive payments pay-email --challenge-file challenge.json \
|
|
109
109
|
--in-reply-to <inbound-challenge-email-id> --wait
|
|
110
110
|
|
package/dist/oclif/index.js
CHANGED
|
@@ -8974,56 +8974,25 @@ const openapiDocument = {
|
|
|
8974
8974
|
"consecutive_fails"
|
|
8975
8975
|
]
|
|
8976
8976
|
},
|
|
8977
|
-
"
|
|
8977
|
+
"CreateEndpointInput": {
|
|
8978
8978
|
"type": "object",
|
|
8979
8979
|
"additionalProperties": false,
|
|
8980
8980
|
"properties": {
|
|
8981
8981
|
"kind": {
|
|
8982
8982
|
"type": "string",
|
|
8983
|
-
"enum": ["http"],
|
|
8983
|
+
"enum": ["http", "function"],
|
|
8984
8984
|
"default": "http",
|
|
8985
|
-
"description": "
|
|
8985
|
+
"description": "http: deliver to a webhook URL (provide url). function: invoke a Primitive Function (provide function_id, omit url)."
|
|
8986
8986
|
},
|
|
8987
8987
|
"url": {
|
|
8988
8988
|
"type": "string",
|
|
8989
8989
|
"minLength": 1,
|
|
8990
|
-
"description": "The webhook URL to deliver events to."
|
|
8991
|
-
},
|
|
8992
|
-
"enabled": {
|
|
8993
|
-
"type": "boolean",
|
|
8994
|
-
"default": true,
|
|
8995
|
-
"description": "Whether the endpoint is active"
|
|
8996
|
-
},
|
|
8997
|
-
"domain_id": {
|
|
8998
|
-
"type": ["string", "null"],
|
|
8999
|
-
"format": "uuid",
|
|
9000
|
-
"description": "Restrict to emails from a specific domain"
|
|
9001
|
-
},
|
|
9002
|
-
"rules": {
|
|
9003
|
-
"type": "object",
|
|
9004
|
-
"description": "Endpoint-specific filtering rules"
|
|
9005
|
-
},
|
|
9006
|
-
"is_route_target": {
|
|
9007
|
-
"type": "boolean",
|
|
9008
|
-
"default": false,
|
|
9009
|
-
"description": "Create this endpoint as a route-target: reachable only via an\nexplicit recipient route, never a domain's default destination, and\nexempt from the one-endpoint-per-domain rule.\n"
|
|
9010
|
-
}
|
|
9011
|
-
},
|
|
9012
|
-
"required": ["url"]
|
|
9013
|
-
},
|
|
9014
|
-
"CreateFunctionEndpointInput": {
|
|
9015
|
-
"type": "object",
|
|
9016
|
-
"additionalProperties": false,
|
|
9017
|
-
"properties": {
|
|
9018
|
-
"kind": {
|
|
9019
|
-
"type": "string",
|
|
9020
|
-
"enum": ["function"],
|
|
9021
|
-
"description": "Invoke a Primitive Function."
|
|
8990
|
+
"description": "The webhook URL to deliver events to. Required when kind is http; omit for function endpoints."
|
|
9022
8991
|
},
|
|
9023
8992
|
"function_id": {
|
|
9024
8993
|
"type": "string",
|
|
9025
8994
|
"format": "uuid",
|
|
9026
|
-
"description": "The Function to invoke."
|
|
8995
|
+
"description": "The Function to invoke. Required when kind is function."
|
|
9027
8996
|
},
|
|
9028
8997
|
"enabled": {
|
|
9029
8998
|
"type": "boolean",
|
|
@@ -9044,17 +9013,6 @@ const openapiDocument = {
|
|
|
9044
9013
|
"default": false,
|
|
9045
9014
|
"description": "Create this endpoint as a route-target: reachable only via an\nexplicit recipient route, never a domain's default destination, and\nexempt from the one-endpoint-per-domain rule.\n"
|
|
9046
9015
|
}
|
|
9047
|
-
},
|
|
9048
|
-
"required": ["kind", "function_id"]
|
|
9049
|
-
},
|
|
9050
|
-
"CreateEndpointInput": {
|
|
9051
|
-
"oneOf": [{ "$ref": "#/components/schemas/CreateHttpEndpointInput" }, { "$ref": "#/components/schemas/CreateFunctionEndpointInput" }],
|
|
9052
|
-
"discriminator": {
|
|
9053
|
-
"propertyName": "kind",
|
|
9054
|
-
"mapping": {
|
|
9055
|
-
"http": "#/components/schemas/CreateHttpEndpointInput",
|
|
9056
|
-
"function": "#/components/schemas/CreateFunctionEndpointInput"
|
|
9057
|
-
}
|
|
9058
9016
|
}
|
|
9059
9017
|
},
|
|
9060
9018
|
"UpdateEndpointInput": {
|
|
@@ -13369,83 +13327,43 @@ const operationManifest = [
|
|
|
13369
13327
|
"pathParams": [],
|
|
13370
13328
|
"queryParams": [],
|
|
13371
13329
|
"requestSchema": {
|
|
13372
|
-
"
|
|
13373
|
-
|
|
13374
|
-
|
|
13375
|
-
"
|
|
13376
|
-
"
|
|
13377
|
-
|
|
13378
|
-
|
|
13379
|
-
|
|
13380
|
-
"description": "Deliver to a webhook URL."
|
|
13381
|
-
},
|
|
13382
|
-
"url": {
|
|
13383
|
-
"type": "string",
|
|
13384
|
-
"minLength": 1,
|
|
13385
|
-
"description": "The webhook URL to deliver events to."
|
|
13386
|
-
},
|
|
13387
|
-
"enabled": {
|
|
13388
|
-
"type": "boolean",
|
|
13389
|
-
"default": true,
|
|
13390
|
-
"description": "Whether the endpoint is active"
|
|
13391
|
-
},
|
|
13392
|
-
"domain_id": {
|
|
13393
|
-
"type": ["string", "null"],
|
|
13394
|
-
"format": "uuid",
|
|
13395
|
-
"description": "Restrict to emails from a specific domain"
|
|
13396
|
-
},
|
|
13397
|
-
"rules": {
|
|
13398
|
-
"type": "object",
|
|
13399
|
-
"description": "Endpoint-specific filtering rules"
|
|
13400
|
-
},
|
|
13401
|
-
"is_route_target": {
|
|
13402
|
-
"type": "boolean",
|
|
13403
|
-
"default": false,
|
|
13404
|
-
"description": "Create this endpoint as a route-target: reachable only via an\nexplicit recipient route, never a domain's default destination, and\nexempt from the one-endpoint-per-domain rule.\n"
|
|
13405
|
-
}
|
|
13330
|
+
"type": "object",
|
|
13331
|
+
"additionalProperties": false,
|
|
13332
|
+
"properties": {
|
|
13333
|
+
"kind": {
|
|
13334
|
+
"type": "string",
|
|
13335
|
+
"enum": ["http", "function"],
|
|
13336
|
+
"default": "http",
|
|
13337
|
+
"description": "http: deliver to a webhook URL (provide url). function: invoke a Primitive Function (provide function_id, omit url)."
|
|
13406
13338
|
},
|
|
13407
|
-
"
|
|
13408
|
-
|
|
13409
|
-
|
|
13410
|
-
|
|
13411
|
-
"properties": {
|
|
13412
|
-
"kind": {
|
|
13413
|
-
"type": "string",
|
|
13414
|
-
"enum": ["function"],
|
|
13415
|
-
"description": "Invoke a Primitive Function."
|
|
13416
|
-
},
|
|
13417
|
-
"function_id": {
|
|
13418
|
-
"type": "string",
|
|
13419
|
-
"format": "uuid",
|
|
13420
|
-
"description": "The Function to invoke."
|
|
13421
|
-
},
|
|
13422
|
-
"enabled": {
|
|
13423
|
-
"type": "boolean",
|
|
13424
|
-
"default": true,
|
|
13425
|
-
"description": "Whether the endpoint is active"
|
|
13426
|
-
},
|
|
13427
|
-
"domain_id": {
|
|
13428
|
-
"type": ["string", "null"],
|
|
13429
|
-
"format": "uuid",
|
|
13430
|
-
"description": "Restrict to emails from a specific domain"
|
|
13431
|
-
},
|
|
13432
|
-
"rules": {
|
|
13433
|
-
"type": "object",
|
|
13434
|
-
"description": "Endpoint-specific filtering rules"
|
|
13435
|
-
},
|
|
13436
|
-
"is_route_target": {
|
|
13437
|
-
"type": "boolean",
|
|
13438
|
-
"default": false,
|
|
13439
|
-
"description": "Create this endpoint as a route-target: reachable only via an\nexplicit recipient route, never a domain's default destination, and\nexempt from the one-endpoint-per-domain rule.\n"
|
|
13440
|
-
}
|
|
13339
|
+
"url": {
|
|
13340
|
+
"type": "string",
|
|
13341
|
+
"minLength": 1,
|
|
13342
|
+
"description": "The webhook URL to deliver events to. Required when kind is http; omit for function endpoints."
|
|
13441
13343
|
},
|
|
13442
|
-
"
|
|
13443
|
-
|
|
13444
|
-
|
|
13445
|
-
|
|
13446
|
-
|
|
13447
|
-
|
|
13448
|
-
"
|
|
13344
|
+
"function_id": {
|
|
13345
|
+
"type": "string",
|
|
13346
|
+
"format": "uuid",
|
|
13347
|
+
"description": "The Function to invoke. Required when kind is function."
|
|
13348
|
+
},
|
|
13349
|
+
"enabled": {
|
|
13350
|
+
"type": "boolean",
|
|
13351
|
+
"default": true,
|
|
13352
|
+
"description": "Whether the endpoint is active"
|
|
13353
|
+
},
|
|
13354
|
+
"domain_id": {
|
|
13355
|
+
"type": ["string", "null"],
|
|
13356
|
+
"format": "uuid",
|
|
13357
|
+
"description": "Restrict to emails from a specific domain"
|
|
13358
|
+
},
|
|
13359
|
+
"rules": {
|
|
13360
|
+
"type": "object",
|
|
13361
|
+
"description": "Endpoint-specific filtering rules"
|
|
13362
|
+
},
|
|
13363
|
+
"is_route_target": {
|
|
13364
|
+
"type": "boolean",
|
|
13365
|
+
"default": false,
|
|
13366
|
+
"description": "Create this endpoint as a route-target: reachable only via an\nexplicit recipient route, never a domain's default destination, and\nexempt from the one-endpoint-per-domain rule.\n"
|
|
13449
13367
|
}
|
|
13450
13368
|
}
|
|
13451
13369
|
},
|
|
@@ -23864,8 +23782,8 @@ const PRIMITIVE_TEAM_AUTHOR = {
|
|
|
23864
23782
|
name: "Primitive Team",
|
|
23865
23783
|
url: "https://primitive.dev"
|
|
23866
23784
|
};
|
|
23867
|
-
const SDK_VERSION_RANGE = "^1.
|
|
23868
|
-
const CLI_VERSION_RANGE = "^1.
|
|
23785
|
+
const SDK_VERSION_RANGE = "^1.14.0";
|
|
23786
|
+
const CLI_VERSION_RANGE = "^1.14.0";
|
|
23869
23787
|
const ESBUILD_VERSION_RANGE = "^0.27.0";
|
|
23870
23788
|
function renderHandler() {
|
|
23871
23789
|
return `// env.PRIMITIVE_API_KEY, env.PRIMITIVE_WEBHOOK_SECRET, and
|
|
@@ -28326,10 +28244,12 @@ var PaymentsPayEmailCommand = class PaymentsPayEmailCommand extends Command {
|
|
|
28326
28244
|
signed bytes as a portable artifact without sending.
|
|
28327
28245
|
|
|
28328
28246
|
--in-reply-to is the id of the inbound challenge email you received. It is
|
|
28329
|
-
fetched to derive the recipient (the payee, from the inbound's sender)
|
|
28330
|
-
From (you, the payer, from the inbound's recipient)
|
|
28331
|
-
|
|
28332
|
-
|
|
28247
|
+
fetched to derive the recipient (the payee, from the inbound's sender) and the
|
|
28248
|
+
From (you, the payer, from the inbound's recipient). The outgoing send does
|
|
28249
|
+
NOT thread under the challenge: threading would trigger the send endpoint's
|
|
28250
|
+
parent-thread dedup and the payment would never settle. The interaction
|
|
28251
|
+
associates by interaction_id instead. Pass --from only to override the derived
|
|
28252
|
+
payer From.
|
|
28333
28253
|
|
|
28334
28254
|
Provide the challenge inline with --challenge, from a file with
|
|
28335
28255
|
--challenge-file, or piped on stdin.`;
|
|
@@ -28362,7 +28282,7 @@ var PaymentsPayEmailCommand = class PaymentsPayEmailCommand extends Command {
|
|
|
28362
28282
|
exclusive: ["challenge"]
|
|
28363
28283
|
}),
|
|
28364
28284
|
"in-reply-to": Flags.string({
|
|
28365
|
-
description: "Id of the inbound challenge email you received. It is fetched to derive the payee recipient
|
|
28285
|
+
description: "Id of the inbound challenge email you received. It is fetched to derive the payee recipient and the payer From. The outgoing send is not threaded under the challenge; the payment associates by interaction_id.",
|
|
28366
28286
|
required: true
|
|
28367
28287
|
}),
|
|
28368
28288
|
from: Flags.string({ description: "Optional From header override. Defaults to the inbound's recipient (the payer the challenge was addressed to)." }),
|
|
@@ -28441,7 +28361,6 @@ var PaymentsPayEmailCommand = class PaymentsPayEmailCommand extends Command {
|
|
|
28441
28361
|
subject: DEFAULT_SUBJECT,
|
|
28442
28362
|
body_text: flags.body?.trim() ? flags.body : DEFAULT_BODY_TEXT,
|
|
28443
28363
|
attachments: [interactionAttachment(built)],
|
|
28444
|
-
...inbound.message_id ? { in_reply_to: inbound.message_id } : {},
|
|
28445
28364
|
...flags.wait !== void 0 ? { wait: flags.wait } : {}
|
|
28446
28365
|
},
|
|
28447
28366
|
client: apiClient.client,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "primitive",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.14.0",
|
|
4
4
|
"description": "Official Primitive CLI: deploy Primitive Functions, send and inspect mail, manage endpoints, all from the terminal. Wraps the @primitivedotdev/sdk runtime client with one-shot commands.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|