@contractspec/example.integration-stripe 3.7.19 → 3.7.21
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 +47 -46
- package/CHANGELOG.md +26 -0
- package/dist/browser/example.js +1 -1
- package/dist/browser/index.js +2 -2
- package/dist/browser/integration-stripe.feature.js +1 -1
- package/dist/example.d.ts +3 -2
- package/dist/example.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -2
- package/dist/integration-stripe.feature.js +1 -1
- package/dist/node/example.js +1 -1
- package/dist/node/index.js +2 -2
- package/dist/node/integration-stripe.feature.js +1 -1
- package/package.json +4 -4
- package/src/example.ts +16 -20
- package/src/index.ts +2 -0
- package/src/integration-stripe.feature.ts +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,46 +1,47 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
[
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
./
|
|
9
|
-
./
|
|
10
|
-
./
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
./
|
|
15
|
-
./
|
|
16
|
-
./
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
./
|
|
23
|
-
./
|
|
24
|
-
./
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
./
|
|
29
|
-
./
|
|
30
|
-
./
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
./
|
|
37
|
-
./
|
|
38
|
-
./
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
./
|
|
43
|
-
./
|
|
44
|
-
./
|
|
45
|
-
|
|
46
|
-
|
|
1
|
+
|
|
2
|
+
[0m[2m[35m$[0m [2m[1mcontractspec-bun-build prebuild[0m
|
|
3
|
+
[0m[2m[35m$[0m [2m[1mbun run build:bundle && bun run build:types[0m
|
|
4
|
+
[0m[2m[35m$[0m [2m[1mcontractspec-bun-build transpile[0m
|
|
5
|
+
[contractspec-bun-build] transpile target=bun root=src entries=10 noBundle=false
|
|
6
|
+
[32mBundled 10 modules in 31ms[0m
|
|
7
|
+
|
|
8
|
+
[34m./blueprint.js[0m 2.43 KB [2m(entry point)[0m
|
|
9
|
+
[34m./index.js[0m 8.22 KB [2m(entry point)[0m
|
|
10
|
+
[34m./tenant.js[0m 0.99 KB [2m(entry point)[0m
|
|
11
|
+
[34m./connection.sample.js[0m 2.12 KB [2m(entry point)[0m
|
|
12
|
+
[34mdocs/index.js[0m 1.41 KB [2m(entry point)[0m
|
|
13
|
+
[34mdocs/integration-stripe.docblock.js[0m 1.41 KB [2m(entry point)[0m
|
|
14
|
+
[34m./example.js[0m 0.68 KB [2m(entry point)[0m
|
|
15
|
+
[34m./integration-stripe.feature.js[0m 3.33 KB [2m(entry point)[0m
|
|
16
|
+
[34m./workflow.js[0m 1.1 KB [2m(entry point)[0m
|
|
17
|
+
[34m./integration.js[0m 1.73 KB [2m(entry point)[0m
|
|
18
|
+
|
|
19
|
+
[contractspec-bun-build] transpile target=node root=src entries=10 noBundle=false
|
|
20
|
+
[32mBundled 10 modules in 13ms[0m
|
|
21
|
+
|
|
22
|
+
[34m./blueprint.js[0m 2.42 KB [2m(entry point)[0m
|
|
23
|
+
[34m./index.js[0m 8.20 KB [2m(entry point)[0m
|
|
24
|
+
[34m./tenant.js[0m 0.98 KB [2m(entry point)[0m
|
|
25
|
+
[34m./connection.sample.js[0m 2.12 KB [2m(entry point)[0m
|
|
26
|
+
[34mdocs/index.js[0m 1.39 KB [2m(entry point)[0m
|
|
27
|
+
[34mdocs/integration-stripe.docblock.js[0m 1.39 KB [2m(entry point)[0m
|
|
28
|
+
[34m./example.js[0m 0.67 KB [2m(entry point)[0m
|
|
29
|
+
[34m./integration-stripe.feature.js[0m 3.32 KB [2m(entry point)[0m
|
|
30
|
+
[34m./workflow.js[0m 1.1 KB [2m(entry point)[0m
|
|
31
|
+
[34m./integration.js[0m 1.72 KB [2m(entry point)[0m
|
|
32
|
+
|
|
33
|
+
[contractspec-bun-build] transpile target=browser root=src entries=10 noBundle=false
|
|
34
|
+
[32mBundled 10 modules in 14ms[0m
|
|
35
|
+
|
|
36
|
+
[34m./blueprint.js[0m 2.42 KB [2m(entry point)[0m
|
|
37
|
+
[34m./index.js[0m 8.20 KB [2m(entry point)[0m
|
|
38
|
+
[34m./tenant.js[0m 0.98 KB [2m(entry point)[0m
|
|
39
|
+
[34m./connection.sample.js[0m 2.12 KB [2m(entry point)[0m
|
|
40
|
+
[34mdocs/index.js[0m 1.39 KB [2m(entry point)[0m
|
|
41
|
+
[34mdocs/integration-stripe.docblock.js[0m 1.39 KB [2m(entry point)[0m
|
|
42
|
+
[34m./example.js[0m 0.67 KB [2m(entry point)[0m
|
|
43
|
+
[34m./integration-stripe.feature.js[0m 3.32 KB [2m(entry point)[0m
|
|
44
|
+
[34m./workflow.js[0m 1.1 KB [2m(entry point)[0m
|
|
45
|
+
[34m./integration.js[0m 1.72 KB [2m(entry point)[0m
|
|
46
|
+
|
|
47
|
+
[0m[2m[35m$[0m [2m[1mcontractspec-bun-build types[0m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @contractspec/example.integration-stripe
|
|
2
2
|
|
|
3
|
+
## 3.7.21
|
|
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 Add FormSpec layout hints, semantic field rendering, and portable text/textarea input-group addons.
|
|
10
|
+
- Updated dependencies because of Add ThemeSpec light/dark modes and a design-system Tailwind bridge for CSS variables, presets, CSS text, and OKLCH color pass-through.
|
|
11
|
+
- Updated dependencies because of Add a canonical typed result system for ContractSpec success and failure propagation across operations, workflows, jobs, server adapters, MCP, GraphQL, and React clients.
|
|
12
|
+
- @contractspec/lib.contracts-integrations@3.8.13
|
|
13
|
+
- @contractspec/lib.contracts-spec@5.5.0
|
|
14
|
+
- @contractspec/lib.schema@3.7.14
|
|
15
|
+
|
|
16
|
+
## 3.7.20
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- chore: auto-bump internal dependents
|
|
21
|
+
- Updated dependencies because of Add a family-aware ContractSpec Adoption Engine, expand contract authoring targets across CLI and VS Code tooling, and refresh release-facing schema and policy artifacts for downstream workspaces.
|
|
22
|
+
- Updated dependencies because of chore: auto-bump internal dependents
|
|
23
|
+
- Updated dependencies because of Improve app-config, theme, and feature authoring with explicit validation APIs, first-class theme discovery and scaffolding, and key-based app-config generation across contracts, workspace tooling, and the CLI.
|
|
24
|
+
- Updated dependencies because of Refresh root, package, website, and LLM-facing docs so Connect, Builder, release capsules, and the current contracts-spec export surface stay aligned.
|
|
25
|
+
- Updated dependencies because of Persist canonical knowledge payload text during indexing and align the retrieval/query docs with the corrected behavior.
|
|
26
|
+
- @contractspec/lib.contracts-spec@5.4.0
|
|
27
|
+
- @contractspec/lib.contracts-integrations@3.8.12
|
|
28
|
+
|
|
3
29
|
## 3.7.19
|
|
4
30
|
|
|
5
31
|
### Patch Changes
|
package/dist/browser/example.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineExample as
|
|
1
|
+
import{defineExample as b}from"@contractspec/lib.contracts-spec/examples";var c=b({meta:{key:"examples.integration-stripe",version:"1.0.0",title:"Integration Stripe",description:"Integration example – Stripe Payments (blueprint + workflow + tenant config).",kind:"template",visibility:"experimental",stability:"experimental",owners:["@contractspec-core"],tags:["package","examples","integration-stripe"]},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["playground","specs"]},studio:{enabled:!1,installable:!1},mcp:{enabled:!1}},entrypoints:{packageName:"@contractspec/example.integration-stripe"}}),k=c;export{k as default,c as ExamplesIntegrationStripeExample};
|
package/dist/browser/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{OwnersEnum as
|
|
1
|
+
import{OwnersEnum as e,StabilityEnum as a,TagsEnum as i}from"@contractspec/lib.contracts-spec/ownership";import{defineWorkflow as p}from"@contractspec/lib.contracts-spec/workflow/spec";var t=p({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:[e.PlatformCore],tags:[i.Marketplace,"stripe"],stability:a.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 s}from"@contractspec/lib.contracts-spec/app-config/spec";import{OwnersEnum as d,StabilityEnum as v,TagsEnum as g}from"@contractspec/lib.contracts-spec/ownership";var c=s({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:v.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:t.meta.key,version:t.meta.version}},notes:"Install this blueprint and pair it with the Stripe integration connection to enable card collection."});import{defineIntegration as m}from"@contractspec/lib.contracts-integrations";import{OwnersEnum as x,StabilityEnum as y,TagsEnum as A}from"@contractspec/lib.contracts-spec/ownership";import{defineSchemaModel as r,ScalarTypeEnum as o}from"@contractspec/lib.schema";var u=r({name:"StripePaymentsIntegrationConfig",description:"Managed configuration required to connect a Stripe account.",fields:{accountId:{type:o.String_unsecure(),isOptional:!1},webhookEndpoint:{type:o.String_unsecure(),isOptional:!1}}}),I=r({name:"StripePaymentsIntegrationSecret",description:"Secret material stored out-of-band for the Stripe provider.",fields:{apiKey:{type:o.String_unsecure(),isOptional:!1},webhookSecret:{type:o.String_unsecure(),isOptional:!1}}}),n=m({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:[x.PlatformCore],tags:[A.Marketplace,"stripe","payments"],stability:y.Experimental},supportedModes:["managed","byok"],capabilities:{provides:[{key:"payments.psp",version:"1.0.0"}]},configSchema:{schema:u,example:{accountId:"acct_demo_artisan",webhookEndpoint:"https://pay.artisanos.dev/webhooks/stripe"}},secretSchema:{schema:I,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 J={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"};import{registerDocBlocks as f}from"@contractspec/lib.contracts-spec/docs";var C=[{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
|
|
2
2
|
- App blueprint enabling \`payments.psp\` capability.
|
|
3
3
|
- Workflow invoking Stripe operations (prepare → charge → confirm).
|
|
4
4
|
- Tenant app config binding workflow to an IntegrationConnection.
|
|
@@ -12,4 +12,4 @@ import{OwnersEnum as a,StabilityEnum as r,TagsEnum as i}from"@contractspec/lib.c
|
|
|
12
12
|
|
|
13
13
|
## Guardrails
|
|
14
14
|
- Never log secrets.
|
|
15
|
-
- Keep payment semantics spec-defined; gate breaking changes behind flags.`}];f(C);import{defineExample as L}from"@contractspec/lib.contracts-spec";var N=L({meta:{key:"integration-stripe",version:"1.0.0",title:"Integration
|
|
15
|
+
- Keep payment semantics spec-defined; gate breaking changes behind flags.`}];f(C);import{defineExample as L}from"@contractspec/lib.contracts-spec/examples";var N=L({meta:{key:"examples.integration-stripe",version:"1.0.0",title:"Integration Stripe",description:"Integration example – Stripe Payments (blueprint + workflow + tenant config).",kind:"template",visibility:"experimental",stability:"experimental",owners:["@contractspec-core"],tags:["package","examples","integration-stripe"]},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["playground","specs"]},studio:{enabled:!1,installable:!1},mcp:{enabled:!1}},entrypoints:{packageName:"@contractspec/example.integration-stripe"}}),D=N;import{defineFeature as P}from"@contractspec/lib.contracts-spec/features";var l=P({meta:{key:"integration-stripe",version:"1.0.0",title:"Stripe Payments Integration",description:"Stripe payments integration with blueprint, workflow, and tenant configuration",domain:"integration",owners:["@integration-team"],tags:["integration","stripe","payments"],stability:"experimental"},integrations:[{key:n.meta.key,version:n.meta.version}],workflows:[{key:t.meta.key,version:t.meta.version}],docs:["docs.examples.integration-stripe","docs.examples.integration-stripe.usage"]});var M={meta:{id:"tenant-config-artisan-stripe",tenantId:"artisan-co",appId:"artisan",blueprintName:"artisan.payments.stripe",blueprintVersion:"1.0.0",environment:"production",version:"1.0.0",status:"published",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()},integrations:[{slotId:"primary-payments",connectionId:"conn-stripe-live",scope:{workflows:["collectPayment"],operations:["payments.stripe.chargeCard"]}}],knowledge:[],locales:{defaultLocale:"en",enabledLocales:["en","fr"]},translationOverrides:{entries:[{key:"artisan.payments.appName",locale:"en",value:"Artisan Payments Portal"}]},branding:{appName:{en:"Artisan Payments Portal"},assets:[{type:"logo",url:"https://tenant.artisanos.dev/logo.png"},{type:"logo-dark",url:"https://tenant.artisanos.dev/logo-dark.png"}],colors:{primary:"#F97316",secondary:"#1F2937"},customDomain:"pay.artisanos.dev"},notes:"Stripe connection bound for production payments."};export{J as stripeLiveConnection,D as example,t as collectPaymentWorkflow,M as artisanStripeTenantConfig,c as artisanStripeBlueprint,n as StripePaymentsIntegrationSpec,l as IntegrationStripeFeature,N as ExamplesIntegrationStripeExample};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{OwnersEnum as z,StabilityEnum as A,TagsEnum as B}from"@contractspec/lib.contracts-spec/ownership";import{defineWorkflow as D}from"@contractspec/lib.contracts-spec/workflow/spec";var q=D({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:[z.PlatformCore],tags:[B.Marketplace,"stripe"],stability:A.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{defineIntegration as G}from"@contractspec/lib.contracts-integrations";import{OwnersEnum as H,StabilityEnum as J,TagsEnum as K}from"@contractspec/lib.contracts-spec/ownership";import{defineSchemaModel as x,ScalarTypeEnum as j}from"@contractspec/lib.schema";var L=x({name:"StripePaymentsIntegrationConfig",description:"Managed configuration required to connect a Stripe account.",fields:{accountId:{type:j.String_unsecure(),isOptional:!1},webhookEndpoint:{type:j.String_unsecure(),isOptional:!1}}}),N=x({name:"StripePaymentsIntegrationSecret",description:"Secret material stored out-of-band for the Stripe provider.",fields:{apiKey:{type:j.String_unsecure(),isOptional:!1},webhookSecret:{type:j.String_unsecure(),isOptional:!1}}}),v=G({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:[H.PlatformCore],tags:[K.Marketplace,"stripe","payments"],stability:J.Experimental},supportedModes:["managed","byok"],capabilities:{provides:[{key:"payments.psp",version:"1.0.0"}]},configSchema:{schema:L,example:{accountId:"acct_demo_artisan",webhookEndpoint:"https://pay.artisanos.dev/webhooks/stripe"}},secretSchema:{schema:N,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"]}});import{defineFeature as Q}from"@contractspec/lib.contracts-spec";var O=Q({meta:{key:"integration-stripe",version:"1.0.0",title:"Stripe Payments Integration",description:"Stripe payments integration with blueprint, workflow, and tenant configuration",domain:"integration",owners:["@integration-team"],tags:["integration","stripe","payments"],stability:"experimental"},integrations:[{key:v.meta.key,version:v.meta.version}],workflows:[{key:q.meta.key,version:q.meta.version}],docs:["docs.examples.integration-stripe","docs.examples.integration-stripe.usage"]});export{O as IntegrationStripeFeature};
|
|
1
|
+
import{OwnersEnum as z,StabilityEnum as A,TagsEnum as B}from"@contractspec/lib.contracts-spec/ownership";import{defineWorkflow as D}from"@contractspec/lib.contracts-spec/workflow/spec";var q=D({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:[z.PlatformCore],tags:[B.Marketplace,"stripe"],stability:A.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{defineIntegration as G}from"@contractspec/lib.contracts-integrations";import{OwnersEnum as H,StabilityEnum as J,TagsEnum as K}from"@contractspec/lib.contracts-spec/ownership";import{defineSchemaModel as x,ScalarTypeEnum as j}from"@contractspec/lib.schema";var L=x({name:"StripePaymentsIntegrationConfig",description:"Managed configuration required to connect a Stripe account.",fields:{accountId:{type:j.String_unsecure(),isOptional:!1},webhookEndpoint:{type:j.String_unsecure(),isOptional:!1}}}),N=x({name:"StripePaymentsIntegrationSecret",description:"Secret material stored out-of-band for the Stripe provider.",fields:{apiKey:{type:j.String_unsecure(),isOptional:!1},webhookSecret:{type:j.String_unsecure(),isOptional:!1}}}),v=G({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:[H.PlatformCore],tags:[K.Marketplace,"stripe","payments"],stability:J.Experimental},supportedModes:["managed","byok"],capabilities:{provides:[{key:"payments.psp",version:"1.0.0"}]},configSchema:{schema:L,example:{accountId:"acct_demo_artisan",webhookEndpoint:"https://pay.artisanos.dev/webhooks/stripe"}},secretSchema:{schema:N,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"]}});import{defineFeature as Q}from"@contractspec/lib.contracts-spec/features";var O=Q({meta:{key:"integration-stripe",version:"1.0.0",title:"Stripe Payments Integration",description:"Stripe payments integration with blueprint, workflow, and tenant configuration",domain:"integration",owners:["@integration-team"],tags:["integration","stripe","payments"],stability:"experimental"},integrations:[{key:v.meta.key,version:v.meta.version}],workflows:[{key:q.meta.key,version:q.meta.version}],docs:["docs.examples.integration-stripe","docs.examples.integration-stripe.usage"]});export{O as IntegrationStripeFeature};
|
package/dist/example.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
export default
|
|
1
|
+
declare const ExamplesIntegrationStripeExample: import("@contractspec/lib.contracts-spec").ExampleSpec;
|
|
2
|
+
export default ExamplesIntegrationStripeExample;
|
|
3
|
+
export { ExamplesIntegrationStripeExample };
|
package/dist/example.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{defineExample as
|
|
2
|
+
import{defineExample as b}from"@contractspec/lib.contracts-spec/examples";var c=b({meta:{key:"examples.integration-stripe",version:"1.0.0",title:"Integration Stripe",description:"Integration example \u2013 Stripe Payments (blueprint + workflow + tenant config).",kind:"template",visibility:"experimental",stability:"experimental",owners:["@contractspec-core"],tags:["package","examples","integration-stripe"]},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["playground","specs"]},studio:{enabled:!1,installable:!1},mcp:{enabled:!1}},entrypoints:{packageName:"@contractspec/example.integration-stripe"}}),k=c;export{k as default,c as ExamplesIntegrationStripeExample};
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{OwnersEnum as
|
|
2
|
+
import{OwnersEnum as e,StabilityEnum as a,TagsEnum as i}from"@contractspec/lib.contracts-spec/ownership";import{defineWorkflow as p}from"@contractspec/lib.contracts-spec/workflow/spec";var t=p({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:[e.PlatformCore],tags:[i.Marketplace,"stripe"],stability:a.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 s}from"@contractspec/lib.contracts-spec/app-config/spec";import{OwnersEnum as d,StabilityEnum as v,TagsEnum as g}from"@contractspec/lib.contracts-spec/ownership";var c=s({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:v.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:t.meta.key,version:t.meta.version}},notes:"Install this blueprint and pair it with the Stripe integration connection to enable card collection."});import{defineIntegration as m}from"@contractspec/lib.contracts-integrations";import{OwnersEnum as x,StabilityEnum as y,TagsEnum as A}from"@contractspec/lib.contracts-spec/ownership";import{defineSchemaModel as r,ScalarTypeEnum as o}from"@contractspec/lib.schema";var u=r({name:"StripePaymentsIntegrationConfig",description:"Managed configuration required to connect a Stripe account.",fields:{accountId:{type:o.String_unsecure(),isOptional:!1},webhookEndpoint:{type:o.String_unsecure(),isOptional:!1}}}),I=r({name:"StripePaymentsIntegrationSecret",description:"Secret material stored out-of-band for the Stripe provider.",fields:{apiKey:{type:o.String_unsecure(),isOptional:!1},webhookSecret:{type:o.String_unsecure(),isOptional:!1}}}),n=m({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:[x.PlatformCore],tags:[A.Marketplace,"stripe","payments"],stability:y.Experimental},supportedModes:["managed","byok"],capabilities:{provides:[{key:"payments.psp",version:"1.0.0"}]},configSchema:{schema:u,example:{accountId:"acct_demo_artisan",webhookEndpoint:"https://pay.artisanos.dev/webhooks/stripe"}},secretSchema:{schema:I,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 J={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"};import{registerDocBlocks as f}from"@contractspec/lib.contracts-spec/docs";var C=[{id:"docs.examples.integration-stripe",title:"Integration Example \u2014 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
|
|
3
3
|
- App blueprint enabling \`payments.psp\` capability.
|
|
4
4
|
- Workflow invoking Stripe operations (prepare \u2192 charge \u2192 confirm).
|
|
5
5
|
- Tenant app config binding workflow to an IntegrationConnection.
|
|
@@ -13,4 +13,4 @@ import{OwnersEnum as a,StabilityEnum as r,TagsEnum as i}from"@contractspec/lib.c
|
|
|
13
13
|
|
|
14
14
|
## Guardrails
|
|
15
15
|
- Never log secrets.
|
|
16
|
-
- Keep payment semantics spec-defined; gate breaking changes behind flags.`}];f(C);import{defineExample as L}from"@contractspec/lib.contracts-spec";var N=L({meta:{key:"integration-stripe",version:"1.0.0",title:"Integration
|
|
16
|
+
- Keep payment semantics spec-defined; gate breaking changes behind flags.`}];f(C);import{defineExample as L}from"@contractspec/lib.contracts-spec/examples";var N=L({meta:{key:"examples.integration-stripe",version:"1.0.0",title:"Integration Stripe",description:"Integration example \u2013 Stripe Payments (blueprint + workflow + tenant config).",kind:"template",visibility:"experimental",stability:"experimental",owners:["@contractspec-core"],tags:["package","examples","integration-stripe"]},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["playground","specs"]},studio:{enabled:!1,installable:!1},mcp:{enabled:!1}},entrypoints:{packageName:"@contractspec/example.integration-stripe"}}),D=N;import{defineFeature as P}from"@contractspec/lib.contracts-spec/features";var l=P({meta:{key:"integration-stripe",version:"1.0.0",title:"Stripe Payments Integration",description:"Stripe payments integration with blueprint, workflow, and tenant configuration",domain:"integration",owners:["@integration-team"],tags:["integration","stripe","payments"],stability:"experimental"},integrations:[{key:n.meta.key,version:n.meta.version}],workflows:[{key:t.meta.key,version:t.meta.version}],docs:["docs.examples.integration-stripe","docs.examples.integration-stripe.usage"]});var M={meta:{id:"tenant-config-artisan-stripe",tenantId:"artisan-co",appId:"artisan",blueprintName:"artisan.payments.stripe",blueprintVersion:"1.0.0",environment:"production",version:"1.0.0",status:"published",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()},integrations:[{slotId:"primary-payments",connectionId:"conn-stripe-live",scope:{workflows:["collectPayment"],operations:["payments.stripe.chargeCard"]}}],knowledge:[],locales:{defaultLocale:"en",enabledLocales:["en","fr"]},translationOverrides:{entries:[{key:"artisan.payments.appName",locale:"en",value:"Artisan Payments Portal"}]},branding:{appName:{en:"Artisan Payments Portal"},assets:[{type:"logo",url:"https://tenant.artisanos.dev/logo.png"},{type:"logo-dark",url:"https://tenant.artisanos.dev/logo-dark.png"}],colors:{primary:"#F97316",secondary:"#1F2937"},customDomain:"pay.artisanos.dev"},notes:"Stripe connection bound for production payments."};export{J as stripeLiveConnection,D as example,t as collectPaymentWorkflow,M as artisanStripeTenantConfig,c as artisanStripeBlueprint,n as StripePaymentsIntegrationSpec,l as IntegrationStripeFeature,N as ExamplesIntegrationStripeExample};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{OwnersEnum as z,StabilityEnum as A,TagsEnum as B}from"@contractspec/lib.contracts-spec/ownership";import{defineWorkflow as D}from"@contractspec/lib.contracts-spec/workflow/spec";var q=D({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:[z.PlatformCore],tags:[B.Marketplace,"stripe"],stability:A.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{defineIntegration as G}from"@contractspec/lib.contracts-integrations";import{OwnersEnum as H,StabilityEnum as J,TagsEnum as K}from"@contractspec/lib.contracts-spec/ownership";import{defineSchemaModel as x,ScalarTypeEnum as j}from"@contractspec/lib.schema";var L=x({name:"StripePaymentsIntegrationConfig",description:"Managed configuration required to connect a Stripe account.",fields:{accountId:{type:j.String_unsecure(),isOptional:!1},webhookEndpoint:{type:j.String_unsecure(),isOptional:!1}}}),N=x({name:"StripePaymentsIntegrationSecret",description:"Secret material stored out-of-band for the Stripe provider.",fields:{apiKey:{type:j.String_unsecure(),isOptional:!1},webhookSecret:{type:j.String_unsecure(),isOptional:!1}}}),v=G({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:[H.PlatformCore],tags:[K.Marketplace,"stripe","payments"],stability:J.Experimental},supportedModes:["managed","byok"],capabilities:{provides:[{key:"payments.psp",version:"1.0.0"}]},configSchema:{schema:L,example:{accountId:"acct_demo_artisan",webhookEndpoint:"https://pay.artisanos.dev/webhooks/stripe"}},secretSchema:{schema:N,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"]}});import{defineFeature as Q}from"@contractspec/lib.contracts-spec";var O=Q({meta:{key:"integration-stripe",version:"1.0.0",title:"Stripe Payments Integration",description:"Stripe payments integration with blueprint, workflow, and tenant configuration",domain:"integration",owners:["@integration-team"],tags:["integration","stripe","payments"],stability:"experimental"},integrations:[{key:v.meta.key,version:v.meta.version}],workflows:[{key:q.meta.key,version:q.meta.version}],docs:["docs.examples.integration-stripe","docs.examples.integration-stripe.usage"]});export{O as IntegrationStripeFeature};
|
|
2
|
+
import{OwnersEnum as z,StabilityEnum as A,TagsEnum as B}from"@contractspec/lib.contracts-spec/ownership";import{defineWorkflow as D}from"@contractspec/lib.contracts-spec/workflow/spec";var q=D({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:[z.PlatformCore],tags:[B.Marketplace,"stripe"],stability:A.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{defineIntegration as G}from"@contractspec/lib.contracts-integrations";import{OwnersEnum as H,StabilityEnum as J,TagsEnum as K}from"@contractspec/lib.contracts-spec/ownership";import{defineSchemaModel as x,ScalarTypeEnum as j}from"@contractspec/lib.schema";var L=x({name:"StripePaymentsIntegrationConfig",description:"Managed configuration required to connect a Stripe account.",fields:{accountId:{type:j.String_unsecure(),isOptional:!1},webhookEndpoint:{type:j.String_unsecure(),isOptional:!1}}}),N=x({name:"StripePaymentsIntegrationSecret",description:"Secret material stored out-of-band for the Stripe provider.",fields:{apiKey:{type:j.String_unsecure(),isOptional:!1},webhookSecret:{type:j.String_unsecure(),isOptional:!1}}}),v=G({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:[H.PlatformCore],tags:[K.Marketplace,"stripe","payments"],stability:J.Experimental},supportedModes:["managed","byok"],capabilities:{provides:[{key:"payments.psp",version:"1.0.0"}]},configSchema:{schema:L,example:{accountId:"acct_demo_artisan",webhookEndpoint:"https://pay.artisanos.dev/webhooks/stripe"}},secretSchema:{schema:N,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"]}});import{defineFeature as Q}from"@contractspec/lib.contracts-spec/features";var O=Q({meta:{key:"integration-stripe",version:"1.0.0",title:"Stripe Payments Integration",description:"Stripe payments integration with blueprint, workflow, and tenant configuration",domain:"integration",owners:["@integration-team"],tags:["integration","stripe","payments"],stability:"experimental"},integrations:[{key:v.meta.key,version:v.meta.version}],workflows:[{key:q.meta.key,version:q.meta.version}],docs:["docs.examples.integration-stripe","docs.examples.integration-stripe.usage"]});export{O as IntegrationStripeFeature};
|
package/dist/node/example.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineExample as
|
|
1
|
+
import{defineExample as b}from"@contractspec/lib.contracts-spec/examples";var c=b({meta:{key:"examples.integration-stripe",version:"1.0.0",title:"Integration Stripe",description:"Integration example – Stripe Payments (blueprint + workflow + tenant config).",kind:"template",visibility:"experimental",stability:"experimental",owners:["@contractspec-core"],tags:["package","examples","integration-stripe"]},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["playground","specs"]},studio:{enabled:!1,installable:!1},mcp:{enabled:!1}},entrypoints:{packageName:"@contractspec/example.integration-stripe"}}),k=c;export{k as default,c as ExamplesIntegrationStripeExample};
|
package/dist/node/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{OwnersEnum as
|
|
1
|
+
import{OwnersEnum as e,StabilityEnum as a,TagsEnum as i}from"@contractspec/lib.contracts-spec/ownership";import{defineWorkflow as p}from"@contractspec/lib.contracts-spec/workflow/spec";var t=p({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:[e.PlatformCore],tags:[i.Marketplace,"stripe"],stability:a.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 s}from"@contractspec/lib.contracts-spec/app-config/spec";import{OwnersEnum as d,StabilityEnum as v,TagsEnum as g}from"@contractspec/lib.contracts-spec/ownership";var c=s({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:v.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:t.meta.key,version:t.meta.version}},notes:"Install this blueprint and pair it with the Stripe integration connection to enable card collection."});import{defineIntegration as m}from"@contractspec/lib.contracts-integrations";import{OwnersEnum as x,StabilityEnum as y,TagsEnum as A}from"@contractspec/lib.contracts-spec/ownership";import{defineSchemaModel as r,ScalarTypeEnum as o}from"@contractspec/lib.schema";var u=r({name:"StripePaymentsIntegrationConfig",description:"Managed configuration required to connect a Stripe account.",fields:{accountId:{type:o.String_unsecure(),isOptional:!1},webhookEndpoint:{type:o.String_unsecure(),isOptional:!1}}}),I=r({name:"StripePaymentsIntegrationSecret",description:"Secret material stored out-of-band for the Stripe provider.",fields:{apiKey:{type:o.String_unsecure(),isOptional:!1},webhookSecret:{type:o.String_unsecure(),isOptional:!1}}}),n=m({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:[x.PlatformCore],tags:[A.Marketplace,"stripe","payments"],stability:y.Experimental},supportedModes:["managed","byok"],capabilities:{provides:[{key:"payments.psp",version:"1.0.0"}]},configSchema:{schema:u,example:{accountId:"acct_demo_artisan",webhookEndpoint:"https://pay.artisanos.dev/webhooks/stripe"}},secretSchema:{schema:I,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 J={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"};import{registerDocBlocks as f}from"@contractspec/lib.contracts-spec/docs";var C=[{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
|
|
2
2
|
- App blueprint enabling \`payments.psp\` capability.
|
|
3
3
|
- Workflow invoking Stripe operations (prepare → charge → confirm).
|
|
4
4
|
- Tenant app config binding workflow to an IntegrationConnection.
|
|
@@ -12,4 +12,4 @@ import{OwnersEnum as a,StabilityEnum as r,TagsEnum as i}from"@contractspec/lib.c
|
|
|
12
12
|
|
|
13
13
|
## Guardrails
|
|
14
14
|
- Never log secrets.
|
|
15
|
-
- Keep payment semantics spec-defined; gate breaking changes behind flags.`}];f(C);import{defineExample as L}from"@contractspec/lib.contracts-spec";var N=L({meta:{key:"integration-stripe",version:"1.0.0",title:"Integration
|
|
15
|
+
- Keep payment semantics spec-defined; gate breaking changes behind flags.`}];f(C);import{defineExample as L}from"@contractspec/lib.contracts-spec/examples";var N=L({meta:{key:"examples.integration-stripe",version:"1.0.0",title:"Integration Stripe",description:"Integration example – Stripe Payments (blueprint + workflow + tenant config).",kind:"template",visibility:"experimental",stability:"experimental",owners:["@contractspec-core"],tags:["package","examples","integration-stripe"]},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["playground","specs"]},studio:{enabled:!1,installable:!1},mcp:{enabled:!1}},entrypoints:{packageName:"@contractspec/example.integration-stripe"}}),D=N;import{defineFeature as P}from"@contractspec/lib.contracts-spec/features";var l=P({meta:{key:"integration-stripe",version:"1.0.0",title:"Stripe Payments Integration",description:"Stripe payments integration with blueprint, workflow, and tenant configuration",domain:"integration",owners:["@integration-team"],tags:["integration","stripe","payments"],stability:"experimental"},integrations:[{key:n.meta.key,version:n.meta.version}],workflows:[{key:t.meta.key,version:t.meta.version}],docs:["docs.examples.integration-stripe","docs.examples.integration-stripe.usage"]});var M={meta:{id:"tenant-config-artisan-stripe",tenantId:"artisan-co",appId:"artisan",blueprintName:"artisan.payments.stripe",blueprintVersion:"1.0.0",environment:"production",version:"1.0.0",status:"published",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()},integrations:[{slotId:"primary-payments",connectionId:"conn-stripe-live",scope:{workflows:["collectPayment"],operations:["payments.stripe.chargeCard"]}}],knowledge:[],locales:{defaultLocale:"en",enabledLocales:["en","fr"]},translationOverrides:{entries:[{key:"artisan.payments.appName",locale:"en",value:"Artisan Payments Portal"}]},branding:{appName:{en:"Artisan Payments Portal"},assets:[{type:"logo",url:"https://tenant.artisanos.dev/logo.png"},{type:"logo-dark",url:"https://tenant.artisanos.dev/logo-dark.png"}],colors:{primary:"#F97316",secondary:"#1F2937"},customDomain:"pay.artisanos.dev"},notes:"Stripe connection bound for production payments."};export{J as stripeLiveConnection,D as example,t as collectPaymentWorkflow,M as artisanStripeTenantConfig,c as artisanStripeBlueprint,n as StripePaymentsIntegrationSpec,l as IntegrationStripeFeature,N as ExamplesIntegrationStripeExample};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{OwnersEnum as z,StabilityEnum as A,TagsEnum as B}from"@contractspec/lib.contracts-spec/ownership";import{defineWorkflow as D}from"@contractspec/lib.contracts-spec/workflow/spec";var q=D({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:[z.PlatformCore],tags:[B.Marketplace,"stripe"],stability:A.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{defineIntegration as G}from"@contractspec/lib.contracts-integrations";import{OwnersEnum as H,StabilityEnum as J,TagsEnum as K}from"@contractspec/lib.contracts-spec/ownership";import{defineSchemaModel as x,ScalarTypeEnum as j}from"@contractspec/lib.schema";var L=x({name:"StripePaymentsIntegrationConfig",description:"Managed configuration required to connect a Stripe account.",fields:{accountId:{type:j.String_unsecure(),isOptional:!1},webhookEndpoint:{type:j.String_unsecure(),isOptional:!1}}}),N=x({name:"StripePaymentsIntegrationSecret",description:"Secret material stored out-of-band for the Stripe provider.",fields:{apiKey:{type:j.String_unsecure(),isOptional:!1},webhookSecret:{type:j.String_unsecure(),isOptional:!1}}}),v=G({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:[H.PlatformCore],tags:[K.Marketplace,"stripe","payments"],stability:J.Experimental},supportedModes:["managed","byok"],capabilities:{provides:[{key:"payments.psp",version:"1.0.0"}]},configSchema:{schema:L,example:{accountId:"acct_demo_artisan",webhookEndpoint:"https://pay.artisanos.dev/webhooks/stripe"}},secretSchema:{schema:N,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"]}});import{defineFeature as Q}from"@contractspec/lib.contracts-spec";var O=Q({meta:{key:"integration-stripe",version:"1.0.0",title:"Stripe Payments Integration",description:"Stripe payments integration with blueprint, workflow, and tenant configuration",domain:"integration",owners:["@integration-team"],tags:["integration","stripe","payments"],stability:"experimental"},integrations:[{key:v.meta.key,version:v.meta.version}],workflows:[{key:q.meta.key,version:q.meta.version}],docs:["docs.examples.integration-stripe","docs.examples.integration-stripe.usage"]});export{O as IntegrationStripeFeature};
|
|
1
|
+
import{OwnersEnum as z,StabilityEnum as A,TagsEnum as B}from"@contractspec/lib.contracts-spec/ownership";import{defineWorkflow as D}from"@contractspec/lib.contracts-spec/workflow/spec";var q=D({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:[z.PlatformCore],tags:[B.Marketplace,"stripe"],stability:A.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{defineIntegration as G}from"@contractspec/lib.contracts-integrations";import{OwnersEnum as H,StabilityEnum as J,TagsEnum as K}from"@contractspec/lib.contracts-spec/ownership";import{defineSchemaModel as x,ScalarTypeEnum as j}from"@contractspec/lib.schema";var L=x({name:"StripePaymentsIntegrationConfig",description:"Managed configuration required to connect a Stripe account.",fields:{accountId:{type:j.String_unsecure(),isOptional:!1},webhookEndpoint:{type:j.String_unsecure(),isOptional:!1}}}),N=x({name:"StripePaymentsIntegrationSecret",description:"Secret material stored out-of-band for the Stripe provider.",fields:{apiKey:{type:j.String_unsecure(),isOptional:!1},webhookSecret:{type:j.String_unsecure(),isOptional:!1}}}),v=G({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:[H.PlatformCore],tags:[K.Marketplace,"stripe","payments"],stability:J.Experimental},supportedModes:["managed","byok"],capabilities:{provides:[{key:"payments.psp",version:"1.0.0"}]},configSchema:{schema:L,example:{accountId:"acct_demo_artisan",webhookEndpoint:"https://pay.artisanos.dev/webhooks/stripe"}},secretSchema:{schema:N,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"]}});import{defineFeature as Q}from"@contractspec/lib.contracts-spec/features";var O=Q({meta:{key:"integration-stripe",version:"1.0.0",title:"Stripe Payments Integration",description:"Stripe payments integration with blueprint, workflow, and tenant configuration",domain:"integration",owners:["@integration-team"],tags:["integration","stripe","payments"],stability:"experimental"},integrations:[{key:v.meta.key,version:v.meta.version}],workflows:[{key:q.meta.key,version:q.meta.version}],docs:["docs.examples.integration-stripe","docs.examples.integration-stripe.usage"]});export{O as IntegrationStripeFeature};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contractspec/example.integration-stripe",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.21",
|
|
4
4
|
"description": "Integration example – Stripe Payments (blueprint + workflow + tenant config).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -93,13 +93,13 @@
|
|
|
93
93
|
},
|
|
94
94
|
"dependencies": {
|
|
95
95
|
"@contractspec/lib.schema": "3.7.14",
|
|
96
|
-
"@contractspec/lib.contracts-spec": "5.
|
|
97
|
-
"@contractspec/lib.contracts-integrations": "3.8.
|
|
96
|
+
"@contractspec/lib.contracts-spec": "5.5.0",
|
|
97
|
+
"@contractspec/lib.contracts-integrations": "3.8.13"
|
|
98
98
|
},
|
|
99
99
|
"devDependencies": {
|
|
100
100
|
"@contractspec/tool.typescript": "3.7.13",
|
|
101
101
|
"typescript": "^5.9.3",
|
|
102
|
-
"@contractspec/tool.bun": "3.7.
|
|
102
|
+
"@contractspec/tool.bun": "3.7.15"
|
|
103
103
|
},
|
|
104
104
|
"publishConfig": {
|
|
105
105
|
"access": "public",
|
package/src/example.ts
CHANGED
|
@@ -1,32 +1,28 @@
|
|
|
1
|
-
import { defineExample } from '@contractspec/lib.contracts-spec';
|
|
1
|
+
import { defineExample } from '@contractspec/lib.contracts-spec/examples';
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const ExamplesIntegrationStripeExample = defineExample({
|
|
4
4
|
meta: {
|
|
5
|
-
key: 'integration-stripe',
|
|
5
|
+
key: 'examples.integration-stripe',
|
|
6
6
|
version: '1.0.0',
|
|
7
|
-
title: 'Integration
|
|
7
|
+
title: 'Integration Stripe',
|
|
8
8
|
description:
|
|
9
|
-
'
|
|
10
|
-
kind: '
|
|
11
|
-
visibility: '
|
|
9
|
+
'Integration example – Stripe Payments (blueprint + workflow + tenant config).',
|
|
10
|
+
kind: 'template',
|
|
11
|
+
visibility: 'experimental',
|
|
12
12
|
stability: 'experimental',
|
|
13
|
-
owners: ['@
|
|
14
|
-
tags: ['
|
|
13
|
+
owners: ['@contractspec-core'],
|
|
14
|
+
tags: ['package', 'examples', 'integration-stripe'],
|
|
15
15
|
},
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
surfaces: {
|
|
17
|
+
templates: true,
|
|
18
|
+
sandbox: { enabled: true, modes: ['playground', 'specs'] },
|
|
19
|
+
studio: { enabled: false, installable: false },
|
|
20
|
+
mcp: { enabled: false },
|
|
19
21
|
},
|
|
20
22
|
entrypoints: {
|
|
21
23
|
packageName: '@contractspec/example.integration-stripe',
|
|
22
|
-
docs: './docs',
|
|
23
|
-
},
|
|
24
|
-
surfaces: {
|
|
25
|
-
templates: true,
|
|
26
|
-
sandbox: { enabled: true, modes: ['markdown', 'specs'] },
|
|
27
|
-
studio: { enabled: true, installable: true },
|
|
28
|
-
mcp: { enabled: true },
|
|
29
24
|
},
|
|
30
25
|
});
|
|
31
26
|
|
|
32
|
-
export default
|
|
27
|
+
export default ExamplesIntegrationStripeExample;
|
|
28
|
+
export { ExamplesIntegrationStripeExample };
|
package/src/index.ts
CHANGED