@contractspec/example.integration-stripe 3.7.17 → 3.7.18
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/.turbo/turbo-build.log +33 -33
- package/CHANGELOG.md +12 -0
- package/dist/blueprint.js +1 -114
- package/dist/browser/blueprint.js +1 -114
- package/dist/browser/connection.sample.js +1 -99
- package/dist/browser/docs/index.js +3 -27
- package/dist/browser/docs/integration-stripe.docblock.js +3 -27
- package/dist/browser/example.js +1 -33
- package/dist/browser/index.js +3 -359
- package/dist/browser/integration-stripe.feature.js +1 -162
- package/dist/browser/integration.js +1 -78
- package/dist/browser/tenant.js +1 -55
- package/dist/browser/workflow.js +1 -55
- package/dist/connection.sample.js +1 -99
- package/dist/docs/index.js +3 -27
- package/dist/docs/integration-stripe.docblock.js +3 -27
- package/dist/example.js +1 -33
- package/dist/index.js +3 -359
- package/dist/integration-stripe.feature.js +1 -162
- package/dist/integration.js +1 -78
- package/dist/node/blueprint.js +1 -114
- package/dist/node/connection.sample.js +1 -99
- package/dist/node/docs/index.js +3 -27
- package/dist/node/docs/integration-stripe.docblock.js +3 -27
- package/dist/node/example.js +1 -33
- package/dist/node/index.js +3 -359
- package/dist/node/integration-stripe.feature.js +1 -162
- package/dist/node/integration.js +1 -78
- package/dist/node/tenant.js +1 -55
- package/dist/node/workflow.js +1 -55
- package/dist/tenant.js +1 -55
- package/dist/workflow.js +1 -55
- package/package.json +6 -6
package/.turbo/turbo-build.log
CHANGED
|
@@ -2,45 +2,45 @@ $ contractspec-bun-build prebuild
|
|
|
2
2
|
$ bun run build:bundle && bun run build:types
|
|
3
3
|
$ contractspec-bun-build transpile
|
|
4
4
|
[contractspec-bun-build] transpile target=bun root=src entries=10 noBundle=false
|
|
5
|
-
Bundled 10 modules in
|
|
5
|
+
Bundled 10 modules in 38ms
|
|
6
6
|
|
|
7
|
-
./blueprint.js
|
|
8
|
-
./index.js
|
|
9
|
-
./tenant.js
|
|
10
|
-
./connection.sample.js 2.
|
|
11
|
-
docs/index.js 1.
|
|
12
|
-
docs/integration-stripe.docblock.js 1.
|
|
13
|
-
./example.js
|
|
14
|
-
./integration-stripe.feature.js
|
|
15
|
-
./workflow.js 1.
|
|
16
|
-
./integration.js
|
|
7
|
+
./blueprint.js 2.43 KB (entry point)
|
|
8
|
+
./index.js 8.33 KB (entry point)
|
|
9
|
+
./tenant.js 0.99 KB (entry point)
|
|
10
|
+
./connection.sample.js 2.12 KB (entry point)
|
|
11
|
+
docs/index.js 1.41 KB (entry point)
|
|
12
|
+
docs/integration-stripe.docblock.js 1.41 KB (entry point)
|
|
13
|
+
./example.js 0.79 KB (entry point)
|
|
14
|
+
./integration-stripe.feature.js 3.32 KB (entry point)
|
|
15
|
+
./workflow.js 1.1 KB (entry point)
|
|
16
|
+
./integration.js 1.73 KB (entry point)
|
|
17
17
|
|
|
18
18
|
[contractspec-bun-build] transpile target=node root=src entries=10 noBundle=false
|
|
19
|
-
Bundled 10 modules in
|
|
19
|
+
Bundled 10 modules in 31ms
|
|
20
20
|
|
|
21
|
-
./blueprint.js
|
|
22
|
-
./index.js
|
|
23
|
-
./tenant.js
|
|
24
|
-
./connection.sample.js 2.
|
|
25
|
-
docs/index.js 1.
|
|
26
|
-
docs/integration-stripe.docblock.js 1.
|
|
27
|
-
./example.js
|
|
28
|
-
./integration-stripe.feature.js
|
|
29
|
-
./workflow.js 1.
|
|
30
|
-
./integration.js
|
|
21
|
+
./blueprint.js 2.42 KB (entry point)
|
|
22
|
+
./index.js 8.30 KB (entry point)
|
|
23
|
+
./tenant.js 0.98 KB (entry point)
|
|
24
|
+
./connection.sample.js 2.12 KB (entry point)
|
|
25
|
+
docs/index.js 1.39 KB (entry point)
|
|
26
|
+
docs/integration-stripe.docblock.js 1.39 KB (entry point)
|
|
27
|
+
./example.js 0.78 KB (entry point)
|
|
28
|
+
./integration-stripe.feature.js 3.31 KB (entry point)
|
|
29
|
+
./workflow.js 1.1 KB (entry point)
|
|
30
|
+
./integration.js 1.72 KB (entry point)
|
|
31
31
|
|
|
32
32
|
[contractspec-bun-build] transpile target=browser root=src entries=10 noBundle=false
|
|
33
|
-
Bundled 10 modules in
|
|
33
|
+
Bundled 10 modules in 27ms
|
|
34
34
|
|
|
35
|
-
./blueprint.js
|
|
36
|
-
./index.js
|
|
37
|
-
./tenant.js
|
|
38
|
-
./connection.sample.js 2.
|
|
39
|
-
docs/index.js 1.
|
|
40
|
-
docs/integration-stripe.docblock.js 1.
|
|
41
|
-
./example.js
|
|
42
|
-
./integration-stripe.feature.js
|
|
43
|
-
./workflow.js 1.
|
|
44
|
-
./integration.js
|
|
35
|
+
./blueprint.js 2.42 KB (entry point)
|
|
36
|
+
./index.js 8.30 KB (entry point)
|
|
37
|
+
./tenant.js 0.98 KB (entry point)
|
|
38
|
+
./connection.sample.js 2.12 KB (entry point)
|
|
39
|
+
docs/index.js 1.39 KB (entry point)
|
|
40
|
+
docs/integration-stripe.docblock.js 1.39 KB (entry point)
|
|
41
|
+
./example.js 0.78 KB (entry point)
|
|
42
|
+
./integration-stripe.feature.js 3.31 KB (entry point)
|
|
43
|
+
./workflow.js 1.1 KB (entry point)
|
|
44
|
+
./integration.js 1.72 KB (entry point)
|
|
45
45
|
|
|
46
46
|
$ contractspec-bun-build types
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @contractspec/example.integration-stripe
|
|
2
2
|
|
|
3
|
+
## 3.7.18
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- chore: auto-bump internal dependents
|
|
8
|
+
- Updated dependencies because of chore: auto-bump internal dependents
|
|
9
|
+
- Updated dependencies because of Introduce the Builder v3 control plane as a governed authoring layer over external execution providers.
|
|
10
|
+
- Updated dependencies because of Implement ContractSpec Connect as a first-class spec, runtime, and CLI workflow.
|
|
11
|
+
- @contractspec/lib.contracts-integrations@3.8.10
|
|
12
|
+
- @contractspec/lib.contracts-spec@5.2.0
|
|
13
|
+
- @contractspec/lib.schema@3.7.14
|
|
14
|
+
|
|
3
15
|
## 3.7.17
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/blueprint.js
CHANGED
|
@@ -1,115 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
OwnersEnum,
|
|
5
|
-
StabilityEnum,
|
|
6
|
-
TagsEnum
|
|
7
|
-
} from "@contractspec/lib.contracts-spec/ownership";
|
|
8
|
-
import { defineWorkflow } from "@contractspec/lib.contracts-spec/workflow/spec";
|
|
9
|
-
var collectPaymentWorkflow = defineWorkflow({
|
|
10
|
-
meta: {
|
|
11
|
-
key: "integration-stripe.workflow.payment",
|
|
12
|
-
version: "1.0.0",
|
|
13
|
-
title: "Collect Card Payment",
|
|
14
|
-
description: "Charge a customer using the tenant Stripe connection and record settlement details.",
|
|
15
|
-
domain: "payments",
|
|
16
|
-
owners: [OwnersEnum.PlatformCore],
|
|
17
|
-
tags: [TagsEnum.Marketplace, "stripe"],
|
|
18
|
-
stability: StabilityEnum.Experimental
|
|
19
|
-
},
|
|
20
|
-
definition: {
|
|
21
|
-
entryStepId: "prepare",
|
|
22
|
-
steps: [
|
|
23
|
-
{
|
|
24
|
-
id: "prepare",
|
|
25
|
-
type: "automation",
|
|
26
|
-
label: "Prepare charge parameters",
|
|
27
|
-
action: {
|
|
28
|
-
operation: { key: "payments.prepareCharge", version: "1.0.0" }
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
id: "charge",
|
|
33
|
-
type: "automation",
|
|
34
|
-
label: "Charge card via Stripe",
|
|
35
|
-
action: {
|
|
36
|
-
operation: { key: "payments.stripe.chargeCard", version: "1.0.0" }
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
id: "confirm",
|
|
41
|
-
type: "automation",
|
|
42
|
-
label: "Confirm settlement",
|
|
43
|
-
action: {
|
|
44
|
-
operation: { key: "payments.recordSettlement", version: "1.0.0" }
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
],
|
|
48
|
-
transitions: [
|
|
49
|
-
{ from: "prepare", to: "charge" },
|
|
50
|
-
{ from: "charge", to: "confirm", condition: "output.success === true" }
|
|
51
|
-
]
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
// src/blueprint.ts
|
|
56
|
-
import { defineAppConfig } from "@contractspec/lib.contracts-spec/app-config/spec";
|
|
57
|
-
import {
|
|
58
|
-
OwnersEnum as OwnersEnum2,
|
|
59
|
-
StabilityEnum as StabilityEnum2,
|
|
60
|
-
TagsEnum as TagsEnum2
|
|
61
|
-
} from "@contractspec/lib.contracts-spec/ownership";
|
|
62
|
-
var artisanStripeBlueprint = defineAppConfig({
|
|
63
|
-
meta: {
|
|
64
|
-
key: "artisan.payments.stripe",
|
|
65
|
-
version: "1.0.0",
|
|
66
|
-
appId: "artisan",
|
|
67
|
-
title: "ArtisanOS Stripe Payments",
|
|
68
|
-
description: "Blueprint enabling card payments for ArtisanOS merchants via the Stripe integration.",
|
|
69
|
-
domain: "payments",
|
|
70
|
-
owners: [OwnersEnum2.PlatformCore],
|
|
71
|
-
tags: [TagsEnum2.Marketplace, "stripe", "payments"],
|
|
72
|
-
stability: StabilityEnum2.Experimental
|
|
73
|
-
},
|
|
74
|
-
capabilities: {
|
|
75
|
-
enabled: [{ key: "payments.psp", version: "1.0.0" }]
|
|
76
|
-
},
|
|
77
|
-
integrationSlots: [
|
|
78
|
-
{
|
|
79
|
-
slotId: "primary-payments",
|
|
80
|
-
requiredCategory: "payments",
|
|
81
|
-
allowedModes: ["managed", "byok"],
|
|
82
|
-
requiredCapabilities: [{ key: "payments.psp", version: "1.0.0" }],
|
|
83
|
-
required: true,
|
|
84
|
-
description: "Primary card processor slot. Bind the tenant Stripe connection here."
|
|
85
|
-
}
|
|
86
|
-
],
|
|
87
|
-
branding: {
|
|
88
|
-
appNameKey: "artisan.payments.appName",
|
|
89
|
-
assets: [
|
|
90
|
-
{ type: "logo", url: "https://cdn.artisanos.dev/branding/logo.png" },
|
|
91
|
-
{
|
|
92
|
-
type: "favicon",
|
|
93
|
-
url: "https://cdn.artisanos.dev/branding/favicon.ico"
|
|
94
|
-
}
|
|
95
|
-
],
|
|
96
|
-
colorTokens: {
|
|
97
|
-
primary: "colors.brand.primary",
|
|
98
|
-
secondary: "colors.brand.secondary"
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
translationCatalog: {
|
|
102
|
-
key: "artisan.payments.catalog",
|
|
103
|
-
version: "1.0.0"
|
|
104
|
-
},
|
|
105
|
-
workflows: {
|
|
106
|
-
collectPayment: {
|
|
107
|
-
key: collectPaymentWorkflow.meta.key,
|
|
108
|
-
version: collectPaymentWorkflow.meta.version
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
|
-
notes: "Install this blueprint and pair it with the Stripe integration connection to enable card collection."
|
|
112
|
-
});
|
|
113
|
-
export {
|
|
114
|
-
artisanStripeBlueprint
|
|
115
|
-
};
|
|
2
|
+
import{OwnersEnum as q,StabilityEnum as v,TagsEnum as x}from"@contractspec/lib.contracts-spec/ownership";import{defineWorkflow as z}from"@contractspec/lib.contracts-spec/workflow/spec";var j=z({meta:{key:"integration-stripe.workflow.payment",version:"1.0.0",title:"Collect Card Payment",description:"Charge a customer using the tenant Stripe connection and record settlement details.",domain:"payments",owners:[q.PlatformCore],tags:[x.Marketplace,"stripe"],stability:v.Experimental},definition:{entryStepId:"prepare",steps:[{id:"prepare",type:"automation",label:"Prepare charge parameters",action:{operation:{key:"payments.prepareCharge",version:"1.0.0"}}},{id:"charge",type:"automation",label:"Charge card via Stripe",action:{operation:{key:"payments.stripe.chargeCard",version:"1.0.0"}}},{id:"confirm",type:"automation",label:"Confirm settlement",action:{operation:{key:"payments.recordSettlement",version:"1.0.0"}}}],transitions:[{from:"prepare",to:"charge"},{from:"charge",to:"confirm",condition:"output.success === true"}]}});import{defineAppConfig as B}from"@contractspec/lib.contracts-spec/app-config/spec";import{OwnersEnum as D,StabilityEnum as F,TagsEnum as G}from"@contractspec/lib.contracts-spec/ownership";var N=B({meta:{key:"artisan.payments.stripe",version:"1.0.0",appId:"artisan",title:"ArtisanOS Stripe Payments",description:"Blueprint enabling card payments for ArtisanOS merchants via the Stripe integration.",domain:"payments",owners:[D.PlatformCore],tags:[G.Marketplace,"stripe","payments"],stability:F.Experimental},capabilities:{enabled:[{key:"payments.psp",version:"1.0.0"}]},integrationSlots:[{slotId:"primary-payments",requiredCategory:"payments",allowedModes:["managed","byok"],requiredCapabilities:[{key:"payments.psp",version:"1.0.0"}],required:!0,description:"Primary card processor slot. Bind the tenant Stripe connection here."}],branding:{appNameKey:"artisan.payments.appName",assets:[{type:"logo",url:"https://cdn.artisanos.dev/branding/logo.png"},{type:"favicon",url:"https://cdn.artisanos.dev/branding/favicon.ico"}],colorTokens:{primary:"colors.brand.primary",secondary:"colors.brand.secondary"}},translationCatalog:{key:"artisan.payments.catalog",version:"1.0.0"},workflows:{collectPayment:{key:j.meta.key,version:j.meta.version}},notes:"Install this blueprint and pair it with the Stripe integration connection to enable card collection."});export{N as artisanStripeBlueprint};
|
|
@@ -1,114 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
OwnersEnum,
|
|
4
|
-
StabilityEnum,
|
|
5
|
-
TagsEnum
|
|
6
|
-
} from "@contractspec/lib.contracts-spec/ownership";
|
|
7
|
-
import { defineWorkflow } from "@contractspec/lib.contracts-spec/workflow/spec";
|
|
8
|
-
var collectPaymentWorkflow = defineWorkflow({
|
|
9
|
-
meta: {
|
|
10
|
-
key: "integration-stripe.workflow.payment",
|
|
11
|
-
version: "1.0.0",
|
|
12
|
-
title: "Collect Card Payment",
|
|
13
|
-
description: "Charge a customer using the tenant Stripe connection and record settlement details.",
|
|
14
|
-
domain: "payments",
|
|
15
|
-
owners: [OwnersEnum.PlatformCore],
|
|
16
|
-
tags: [TagsEnum.Marketplace, "stripe"],
|
|
17
|
-
stability: StabilityEnum.Experimental
|
|
18
|
-
},
|
|
19
|
-
definition: {
|
|
20
|
-
entryStepId: "prepare",
|
|
21
|
-
steps: [
|
|
22
|
-
{
|
|
23
|
-
id: "prepare",
|
|
24
|
-
type: "automation",
|
|
25
|
-
label: "Prepare charge parameters",
|
|
26
|
-
action: {
|
|
27
|
-
operation: { key: "payments.prepareCharge", version: "1.0.0" }
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
id: "charge",
|
|
32
|
-
type: "automation",
|
|
33
|
-
label: "Charge card via Stripe",
|
|
34
|
-
action: {
|
|
35
|
-
operation: { key: "payments.stripe.chargeCard", version: "1.0.0" }
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
id: "confirm",
|
|
40
|
-
type: "automation",
|
|
41
|
-
label: "Confirm settlement",
|
|
42
|
-
action: {
|
|
43
|
-
operation: { key: "payments.recordSettlement", version: "1.0.0" }
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
],
|
|
47
|
-
transitions: [
|
|
48
|
-
{ from: "prepare", to: "charge" },
|
|
49
|
-
{ from: "charge", to: "confirm", condition: "output.success === true" }
|
|
50
|
-
]
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
// src/blueprint.ts
|
|
55
|
-
import { defineAppConfig } from "@contractspec/lib.contracts-spec/app-config/spec";
|
|
56
|
-
import {
|
|
57
|
-
OwnersEnum as OwnersEnum2,
|
|
58
|
-
StabilityEnum as StabilityEnum2,
|
|
59
|
-
TagsEnum as TagsEnum2
|
|
60
|
-
} from "@contractspec/lib.contracts-spec/ownership";
|
|
61
|
-
var artisanStripeBlueprint = defineAppConfig({
|
|
62
|
-
meta: {
|
|
63
|
-
key: "artisan.payments.stripe",
|
|
64
|
-
version: "1.0.0",
|
|
65
|
-
appId: "artisan",
|
|
66
|
-
title: "ArtisanOS Stripe Payments",
|
|
67
|
-
description: "Blueprint enabling card payments for ArtisanOS merchants via the Stripe integration.",
|
|
68
|
-
domain: "payments",
|
|
69
|
-
owners: [OwnersEnum2.PlatformCore],
|
|
70
|
-
tags: [TagsEnum2.Marketplace, "stripe", "payments"],
|
|
71
|
-
stability: StabilityEnum2.Experimental
|
|
72
|
-
},
|
|
73
|
-
capabilities: {
|
|
74
|
-
enabled: [{ key: "payments.psp", version: "1.0.0" }]
|
|
75
|
-
},
|
|
76
|
-
integrationSlots: [
|
|
77
|
-
{
|
|
78
|
-
slotId: "primary-payments",
|
|
79
|
-
requiredCategory: "payments",
|
|
80
|
-
allowedModes: ["managed", "byok"],
|
|
81
|
-
requiredCapabilities: [{ key: "payments.psp", version: "1.0.0" }],
|
|
82
|
-
required: true,
|
|
83
|
-
description: "Primary card processor slot. Bind the tenant Stripe connection here."
|
|
84
|
-
}
|
|
85
|
-
],
|
|
86
|
-
branding: {
|
|
87
|
-
appNameKey: "artisan.payments.appName",
|
|
88
|
-
assets: [
|
|
89
|
-
{ type: "logo", url: "https://cdn.artisanos.dev/branding/logo.png" },
|
|
90
|
-
{
|
|
91
|
-
type: "favicon",
|
|
92
|
-
url: "https://cdn.artisanos.dev/branding/favicon.ico"
|
|
93
|
-
}
|
|
94
|
-
],
|
|
95
|
-
colorTokens: {
|
|
96
|
-
primary: "colors.brand.primary",
|
|
97
|
-
secondary: "colors.brand.secondary"
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
|
-
translationCatalog: {
|
|
101
|
-
key: "artisan.payments.catalog",
|
|
102
|
-
version: "1.0.0"
|
|
103
|
-
},
|
|
104
|
-
workflows: {
|
|
105
|
-
collectPayment: {
|
|
106
|
-
key: collectPaymentWorkflow.meta.key,
|
|
107
|
-
version: collectPaymentWorkflow.meta.version
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
notes: "Install this blueprint and pair it with the Stripe integration connection to enable card collection."
|
|
111
|
-
});
|
|
112
|
-
export {
|
|
113
|
-
artisanStripeBlueprint
|
|
114
|
-
};
|
|
1
|
+
import{OwnersEnum as q,StabilityEnum as v,TagsEnum as x}from"@contractspec/lib.contracts-spec/ownership";import{defineWorkflow as z}from"@contractspec/lib.contracts-spec/workflow/spec";var j=z({meta:{key:"integration-stripe.workflow.payment",version:"1.0.0",title:"Collect Card Payment",description:"Charge a customer using the tenant Stripe connection and record settlement details.",domain:"payments",owners:[q.PlatformCore],tags:[x.Marketplace,"stripe"],stability:v.Experimental},definition:{entryStepId:"prepare",steps:[{id:"prepare",type:"automation",label:"Prepare charge parameters",action:{operation:{key:"payments.prepareCharge",version:"1.0.0"}}},{id:"charge",type:"automation",label:"Charge card via Stripe",action:{operation:{key:"payments.stripe.chargeCard",version:"1.0.0"}}},{id:"confirm",type:"automation",label:"Confirm settlement",action:{operation:{key:"payments.recordSettlement",version:"1.0.0"}}}],transitions:[{from:"prepare",to:"charge"},{from:"charge",to:"confirm",condition:"output.success === true"}]}});import{defineAppConfig as B}from"@contractspec/lib.contracts-spec/app-config/spec";import{OwnersEnum as D,StabilityEnum as F,TagsEnum as G}from"@contractspec/lib.contracts-spec/ownership";var N=B({meta:{key:"artisan.payments.stripe",version:"1.0.0",appId:"artisan",title:"ArtisanOS Stripe Payments",description:"Blueprint enabling card payments for ArtisanOS merchants via the Stripe integration.",domain:"payments",owners:[D.PlatformCore],tags:[G.Marketplace,"stripe","payments"],stability:F.Experimental},capabilities:{enabled:[{key:"payments.psp",version:"1.0.0"}]},integrationSlots:[{slotId:"primary-payments",requiredCategory:"payments",allowedModes:["managed","byok"],requiredCapabilities:[{key:"payments.psp",version:"1.0.0"}],required:!0,description:"Primary card processor slot. Bind the tenant Stripe connection here."}],branding:{appNameKey:"artisan.payments.appName",assets:[{type:"logo",url:"https://cdn.artisanos.dev/branding/logo.png"},{type:"favicon",url:"https://cdn.artisanos.dev/branding/favicon.ico"}],colorTokens:{primary:"colors.brand.primary",secondary:"colors.brand.secondary"}},translationCatalog:{key:"artisan.payments.catalog",version:"1.0.0"},workflows:{collectPayment:{key:j.meta.key,version:j.meta.version}},notes:"Install this blueprint and pair it with the Stripe integration connection to enable card collection."});export{N as artisanStripeBlueprint};
|
|
@@ -1,99 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { defineIntegration } from "@contractspec/lib.contracts-integrations";
|
|
3
|
-
import {
|
|
4
|
-
OwnersEnum,
|
|
5
|
-
StabilityEnum,
|
|
6
|
-
TagsEnum
|
|
7
|
-
} from "@contractspec/lib.contracts-spec/ownership";
|
|
8
|
-
import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
|
|
9
|
-
var StripeConfigModel = defineSchemaModel({
|
|
10
|
-
name: "StripePaymentsIntegrationConfig",
|
|
11
|
-
description: "Managed configuration required to connect a Stripe account.",
|
|
12
|
-
fields: {
|
|
13
|
-
accountId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
14
|
-
webhookEndpoint: {
|
|
15
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
16
|
-
isOptional: false
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
var StripeSecretModel = defineSchemaModel({
|
|
21
|
-
name: "StripePaymentsIntegrationSecret",
|
|
22
|
-
description: "Secret material stored out-of-band for the Stripe provider.",
|
|
23
|
-
fields: {
|
|
24
|
-
apiKey: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
25
|
-
webhookSecret: {
|
|
26
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
27
|
-
isOptional: false
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
var StripePaymentsIntegrationSpec = defineIntegration({
|
|
32
|
-
meta: {
|
|
33
|
-
key: "integration-stripe.integration.psp",
|
|
34
|
-
version: "1.0.0",
|
|
35
|
-
title: "Stripe Payments Integration",
|
|
36
|
-
description: "Integration contract for managed or BYOK Stripe card processing.",
|
|
37
|
-
domain: "payments",
|
|
38
|
-
category: "payments",
|
|
39
|
-
owners: [OwnersEnum.PlatformCore],
|
|
40
|
-
tags: [TagsEnum.Marketplace, "stripe", "payments"],
|
|
41
|
-
stability: StabilityEnum.Experimental
|
|
42
|
-
},
|
|
43
|
-
supportedModes: ["managed", "byok"],
|
|
44
|
-
capabilities: {
|
|
45
|
-
provides: [{ key: "payments.psp", version: "1.0.0" }]
|
|
46
|
-
},
|
|
47
|
-
configSchema: {
|
|
48
|
-
schema: StripeConfigModel,
|
|
49
|
-
example: {
|
|
50
|
-
accountId: "acct_demo_artisan",
|
|
51
|
-
webhookEndpoint: "https://pay.artisanos.dev/webhooks/stripe"
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
secretSchema: {
|
|
55
|
-
schema: StripeSecretModel,
|
|
56
|
-
example: {
|
|
57
|
-
apiKey: "sk_live_redacted",
|
|
58
|
-
webhookSecret: "whsec_redacted"
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
healthCheck: {
|
|
62
|
-
method: "ping",
|
|
63
|
-
timeoutMs: 5000
|
|
64
|
-
},
|
|
65
|
-
docsUrl: "https://docs.stripe.com",
|
|
66
|
-
constraints: {
|
|
67
|
-
rateLimit: {
|
|
68
|
-
rpm: 1000
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
byokSetup: {
|
|
72
|
-
setupInstructions: "Create a restricted API key and webhook endpoint, then bind the secret reference to the tenant connection.",
|
|
73
|
-
requiredScopes: ["charges:write", "customers:read", "webhooks:write"]
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
// src/connection.sample.ts
|
|
78
|
-
var stripeLiveConnection = {
|
|
79
|
-
meta: {
|
|
80
|
-
id: "conn-stripe-live",
|
|
81
|
-
tenantId: "artisan-co",
|
|
82
|
-
integrationKey: StripePaymentsIntegrationSpec.meta.key,
|
|
83
|
-
integrationVersion: StripePaymentsIntegrationSpec.meta.version,
|
|
84
|
-
label: "Stripe Production",
|
|
85
|
-
environment: "production",
|
|
86
|
-
createdAt: "2026-01-01T00:00:00.000Z",
|
|
87
|
-
updatedAt: "2026-01-01T00:00:00.000Z"
|
|
88
|
-
},
|
|
89
|
-
ownershipMode: "managed",
|
|
90
|
-
config: {
|
|
91
|
-
accountId: "acct_xxx"
|
|
92
|
-
},
|
|
93
|
-
secretProvider: "vault",
|
|
94
|
-
secretRef: "vault://integrations/artisan-co/conn-stripe-live",
|
|
95
|
-
status: "connected"
|
|
96
|
-
};
|
|
97
|
-
export {
|
|
98
|
-
stripeLiveConnection
|
|
99
|
-
};
|
|
1
|
+
import{defineIntegration as i}from"@contractspec/lib.contracts-integrations";import{OwnersEnum as e,StabilityEnum as r,TagsEnum as a}from"@contractspec/lib.contracts-spec/ownership";import{defineSchemaModel as o,ScalarTypeEnum as t}from"@contractspec/lib.schema";var s=o({name:"StripePaymentsIntegrationConfig",description:"Managed configuration required to connect a Stripe account.",fields:{accountId:{type:t.String_unsecure(),isOptional:!1},webhookEndpoint:{type:t.String_unsecure(),isOptional:!1}}}),c=o({name:"StripePaymentsIntegrationSecret",description:"Secret material stored out-of-band for the Stripe provider.",fields:{apiKey:{type:t.String_unsecure(),isOptional:!1},webhookSecret:{type:t.String_unsecure(),isOptional:!1}}}),n=i({meta:{key:"integration-stripe.integration.psp",version:"1.0.0",title:"Stripe Payments Integration",description:"Integration contract for managed or BYOK Stripe card processing.",domain:"payments",category:"payments",owners:[e.PlatformCore],tags:[a.Marketplace,"stripe","payments"],stability:r.Experimental},supportedModes:["managed","byok"],capabilities:{provides:[{key:"payments.psp",version:"1.0.0"}]},configSchema:{schema:s,example:{accountId:"acct_demo_artisan",webhookEndpoint:"https://pay.artisanos.dev/webhooks/stripe"}},secretSchema:{schema:c,example:{apiKey:"sk_live_redacted",webhookSecret:"whsec_redacted"}},healthCheck:{method:"ping",timeoutMs:5000},docsUrl:"https://docs.stripe.com",constraints:{rateLimit:{rpm:1000}},byokSetup:{setupInstructions:"Create a restricted API key and webhook endpoint, then bind the secret reference to the tenant connection.",requiredScopes:["charges:write","customers:read","webhooks:write"]}});var I={meta:{id:"conn-stripe-live",tenantId:"artisan-co",integrationKey:n.meta.key,integrationVersion:n.meta.version,label:"Stripe Production",environment:"production",createdAt:"2026-01-01T00:00:00.000Z",updatedAt:"2026-01-01T00:00:00.000Z"},ownershipMode:"managed",config:{accountId:"acct_xxx"},secretProvider:"vault",secretRef:"vault://integrations/artisan-co/conn-stripe-live",status:"connected"};export{I as stripeLiveConnection};
|
|
@@ -1,39 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
import { registerDocBlocks } from "@contractspec/lib.contracts-spec/docs";
|
|
3
|
-
var blocks = [
|
|
4
|
-
{
|
|
5
|
-
id: "docs.examples.integration-stripe",
|
|
6
|
-
title: "Integration Example — Stripe Payments",
|
|
7
|
-
summary: "How to wire IntegrationSpec/TenantAppConfig + blueprint + workflow to enable Stripe-backed payments.",
|
|
8
|
-
kind: "reference",
|
|
9
|
-
visibility: "public",
|
|
10
|
-
route: "/docs/examples/integration-stripe",
|
|
11
|
-
tags: ["stripe", "payments", "integrations", "example"],
|
|
12
|
-
body: `## Included
|
|
1
|
+
import{registerDocBlocks as m}from"@contractspec/lib.contracts-spec/docs";var f=[{id:"docs.examples.integration-stripe",title:"Integration Example — Stripe Payments",summary:"How to wire IntegrationSpec/TenantAppConfig + blueprint + workflow to enable Stripe-backed payments.",kind:"reference",visibility:"public",route:"/docs/examples/integration-stripe",tags:["stripe","payments","integrations","example"],body:`## Included
|
|
13
2
|
- App blueprint enabling \`payments.psp\` capability.
|
|
14
3
|
- Workflow invoking Stripe operations (prepare → charge → confirm).
|
|
15
4
|
- Tenant app config binding workflow to an IntegrationConnection.
|
|
16
5
|
|
|
17
6
|
## Notes
|
|
18
7
|
- Secrets live in secret providers; connection config is non-secret.
|
|
19
|
-
- Use \`ctx.resolvedAppConfig\` in operation executors to access integrations, branding, and translations.`
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
id: "docs.examples.integration-stripe.usage",
|
|
23
|
-
title: "Stripe Integration Example — Usage",
|
|
24
|
-
summary: "How to use the blueprint, workflow, and tenant config together.",
|
|
25
|
-
kind: "usage",
|
|
26
|
-
visibility: "public",
|
|
27
|
-
route: "/docs/examples/integration-stripe/usage",
|
|
28
|
-
tags: ["stripe", "usage"],
|
|
29
|
-
body: `## Usage
|
|
8
|
+
- Use \`ctx.resolvedAppConfig\` in operation executors to access integrations, branding, and translations.`},{id:"docs.examples.integration-stripe.usage",title:"Stripe Integration Example — Usage",summary:"How to use the blueprint, workflow, and tenant config together.",kind:"usage",visibility:"public",route:"/docs/examples/integration-stripe/usage",tags:["stripe","usage"],body:`## Usage
|
|
30
9
|
1) Register the blueprint + workflow + catalog in your registry.
|
|
31
10
|
2) Persist an IntegrationConnection (see connection sample).
|
|
32
11
|
3) Bind the tenant app config to the connection.
|
|
33
12
|
|
|
34
13
|
## Guardrails
|
|
35
14
|
- Never log secrets.
|
|
36
|
-
- Keep payment semantics spec-defined; gate breaking changes behind flags.`
|
|
37
|
-
}
|
|
38
|
-
];
|
|
39
|
-
registerDocBlocks(blocks);
|
|
15
|
+
- Keep payment semantics spec-defined; gate breaking changes behind flags.`}];m(f);
|
|
@@ -1,39 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
import { registerDocBlocks } from "@contractspec/lib.contracts-spec/docs";
|
|
3
|
-
var blocks = [
|
|
4
|
-
{
|
|
5
|
-
id: "docs.examples.integration-stripe",
|
|
6
|
-
title: "Integration Example — Stripe Payments",
|
|
7
|
-
summary: "How to wire IntegrationSpec/TenantAppConfig + blueprint + workflow to enable Stripe-backed payments.",
|
|
8
|
-
kind: "reference",
|
|
9
|
-
visibility: "public",
|
|
10
|
-
route: "/docs/examples/integration-stripe",
|
|
11
|
-
tags: ["stripe", "payments", "integrations", "example"],
|
|
12
|
-
body: `## Included
|
|
1
|
+
import{registerDocBlocks as f}from"@contractspec/lib.contracts-spec/docs";var h=[{id:"docs.examples.integration-stripe",title:"Integration Example — Stripe Payments",summary:"How to wire IntegrationSpec/TenantAppConfig + blueprint + workflow to enable Stripe-backed payments.",kind:"reference",visibility:"public",route:"/docs/examples/integration-stripe",tags:["stripe","payments","integrations","example"],body:`## Included
|
|
13
2
|
- App blueprint enabling \`payments.psp\` capability.
|
|
14
3
|
- Workflow invoking Stripe operations (prepare → charge → confirm).
|
|
15
4
|
- Tenant app config binding workflow to an IntegrationConnection.
|
|
16
5
|
|
|
17
6
|
## Notes
|
|
18
7
|
- Secrets live in secret providers; connection config is non-secret.
|
|
19
|
-
- Use \`ctx.resolvedAppConfig\` in operation executors to access integrations, branding, and translations.`
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
id: "docs.examples.integration-stripe.usage",
|
|
23
|
-
title: "Stripe Integration Example — Usage",
|
|
24
|
-
summary: "How to use the blueprint, workflow, and tenant config together.",
|
|
25
|
-
kind: "usage",
|
|
26
|
-
visibility: "public",
|
|
27
|
-
route: "/docs/examples/integration-stripe/usage",
|
|
28
|
-
tags: ["stripe", "usage"],
|
|
29
|
-
body: `## Usage
|
|
8
|
+
- Use \`ctx.resolvedAppConfig\` in operation executors to access integrations, branding, and translations.`},{id:"docs.examples.integration-stripe.usage",title:"Stripe Integration Example — Usage",summary:"How to use the blueprint, workflow, and tenant config together.",kind:"usage",visibility:"public",route:"/docs/examples/integration-stripe/usage",tags:["stripe","usage"],body:`## Usage
|
|
30
9
|
1) Register the blueprint + workflow + catalog in your registry.
|
|
31
10
|
2) Persist an IntegrationConnection (see connection sample).
|
|
32
11
|
3) Bind the tenant app config to the connection.
|
|
33
12
|
|
|
34
13
|
## Guardrails
|
|
35
14
|
- Never log secrets.
|
|
36
|
-
- Keep payment semantics spec-defined; gate breaking changes behind flags.`
|
|
37
|
-
}
|
|
38
|
-
];
|
|
39
|
-
registerDocBlocks(blocks);
|
|
15
|
+
- Keep payment semantics spec-defined; gate breaking changes behind flags.`}];f(h);
|
package/dist/browser/example.js
CHANGED
|
@@ -1,33 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { defineExample } from "@contractspec/lib.contracts-spec";
|
|
3
|
-
var example = defineExample({
|
|
4
|
-
meta: {
|
|
5
|
-
key: "integration-stripe",
|
|
6
|
-
version: "1.0.0",
|
|
7
|
-
title: "Integration — Stripe Payments",
|
|
8
|
-
description: "Wire AppBlueprint + Workflow + TenantAppConfig to enable Stripe-backed payments (spec-first integration pattern).",
|
|
9
|
-
kind: "integration",
|
|
10
|
-
visibility: "public",
|
|
11
|
-
stability: "experimental",
|
|
12
|
-
owners: ["@platform.core"],
|
|
13
|
-
tags: ["stripe", "payments", "integration", "blueprint", "workflow"]
|
|
14
|
-
},
|
|
15
|
-
docs: {
|
|
16
|
-
rootDocId: "docs.examples.integration-stripe",
|
|
17
|
-
usageDocId: "docs.examples.integration-stripe.usage"
|
|
18
|
-
},
|
|
19
|
-
entrypoints: {
|
|
20
|
-
packageName: "@contractspec/example.integration-stripe",
|
|
21
|
-
docs: "./docs"
|
|
22
|
-
},
|
|
23
|
-
surfaces: {
|
|
24
|
-
templates: true,
|
|
25
|
-
sandbox: { enabled: true, modes: ["markdown", "specs"] },
|
|
26
|
-
studio: { enabled: true, installable: true },
|
|
27
|
-
mcp: { enabled: true }
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
var example_default = example;
|
|
31
|
-
export {
|
|
32
|
-
example_default as default
|
|
33
|
-
};
|
|
1
|
+
import{defineExample as g}from"@contractspec/lib.contracts-spec";var h=g({meta:{key:"integration-stripe",version:"1.0.0",title:"Integration — Stripe Payments",description:"Wire AppBlueprint + Workflow + TenantAppConfig to enable Stripe-backed payments (spec-first integration pattern).",kind:"integration",visibility:"public",stability:"experimental",owners:["@platform.core"],tags:["stripe","payments","integration","blueprint","workflow"]},docs:{rootDocId:"docs.examples.integration-stripe",usageDocId:"docs.examples.integration-stripe.usage"},entrypoints:{packageName:"@contractspec/example.integration-stripe",docs:"./docs"},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["markdown","specs"]},studio:{enabled:!0,installable:!0},mcp:{enabled:!0}}}),q=h;export{q as default};
|