@contractspec/example.integration-stripe 1.57.0 → 1.58.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/.turbo/turbo-build.log +40 -42
- package/.turbo/turbo-prebuild.log +1 -0
- package/CHANGELOG.md +13 -0
- package/dist/blueprint.d.ts +2 -6
- package/dist/blueprint.d.ts.map +1 -1
- package/dist/blueprint.js +61 -65
- package/dist/browser/blueprint.js +61 -0
- package/dist/browser/connection.sample.js +23 -0
- package/dist/browser/docs/index.js +39 -0
- package/dist/browser/docs/integration-stripe.docblock.js +39 -0
- package/dist/browser/example.js +33 -0
- package/dist/browser/index.js +261 -0
- package/dist/browser/tenant.js +55 -0
- package/dist/browser/workflow.js +54 -0
- package/dist/connection.sample.d.ts +2 -6
- package/dist/connection.sample.d.ts.map +1 -1
- package/dist/connection.sample.js +23 -21
- package/dist/docs/index.d.ts +2 -1
- package/dist/docs/index.d.ts.map +1 -0
- package/dist/docs/index.js +40 -1
- package/dist/docs/integration-stripe.docblock.d.ts +2 -1
- package/dist/docs/integration-stripe.docblock.d.ts.map +1 -0
- package/dist/docs/integration-stripe.docblock.js +37 -27
- package/dist/example.d.ts +2 -6
- package/dist/example.d.ts.map +1 -1
- package/dist/example.js +32 -44
- package/dist/index.d.ts +7 -6
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +262 -8
- package/dist/node/blueprint.js +61 -0
- package/dist/node/connection.sample.js +23 -0
- package/dist/node/docs/index.js +39 -0
- package/dist/node/docs/integration-stripe.docblock.js +39 -0
- package/dist/node/example.js +33 -0
- package/dist/node/index.js +261 -0
- package/dist/node/tenant.js +55 -0
- package/dist/node/workflow.js +54 -0
- package/dist/tenant.d.ts +2 -6
- package/dist/tenant.d.ts.map +1 -1
- package/dist/tenant.js +55 -52
- package/dist/workflow.d.ts +2 -6
- package/dist/workflow.d.ts.map +1 -1
- package/dist/workflow.js +54 -58
- package/package.json +85 -30
- package/tsdown.config.js +1 -2
- package/.turbo/turbo-build$colon$bundle.log +0 -42
- package/dist/blueprint.js.map +0 -1
- package/dist/connection.sample.js.map +0 -1
- package/dist/docs/integration-stripe.docblock.js.map +0 -1
- package/dist/example.js.map +0 -1
- package/dist/tenant.js.map +0 -1
- package/dist/workflow.js.map +0 -1
- package/tsconfig.tsbuildinfo +0 -1
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
// src/blueprint.ts
|
|
2
|
+
import {
|
|
3
|
+
OwnersEnum,
|
|
4
|
+
StabilityEnum,
|
|
5
|
+
TagsEnum
|
|
6
|
+
} from "@contractspec/lib.contracts/ownership";
|
|
7
|
+
var artisanStripeBlueprint = {
|
|
8
|
+
meta: {
|
|
9
|
+
key: "artisan.payments.stripe",
|
|
10
|
+
version: "1.0.0",
|
|
11
|
+
appId: "artisan",
|
|
12
|
+
title: "ArtisanOS Stripe Payments",
|
|
13
|
+
description: "Blueprint enabling card payments for ArtisanOS merchants via the Stripe integration.",
|
|
14
|
+
domain: "payments",
|
|
15
|
+
owners: [OwnersEnum.PlatformCore],
|
|
16
|
+
tags: [TagsEnum.Marketplace, "stripe", "payments"],
|
|
17
|
+
stability: StabilityEnum.Experimental
|
|
18
|
+
},
|
|
19
|
+
capabilities: {
|
|
20
|
+
enabled: [{ key: "payments.psp", version: "1.0.0" }]
|
|
21
|
+
},
|
|
22
|
+
integrationSlots: [
|
|
23
|
+
{
|
|
24
|
+
slotId: "primary-payments",
|
|
25
|
+
requiredCategory: "payments",
|
|
26
|
+
allowedModes: ["managed", "byok"],
|
|
27
|
+
requiredCapabilities: [{ key: "payments.psp", version: "1.0.0" }],
|
|
28
|
+
required: true,
|
|
29
|
+
description: "Primary card processor slot. Bind the tenant Stripe connection here."
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
branding: {
|
|
33
|
+
appNameKey: "artisan.payments.appName",
|
|
34
|
+
assets: [
|
|
35
|
+
{ type: "logo", url: "https://cdn.artisanos.dev/branding/logo.png" },
|
|
36
|
+
{
|
|
37
|
+
type: "favicon",
|
|
38
|
+
url: "https://cdn.artisanos.dev/branding/favicon.ico"
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
colorTokens: {
|
|
42
|
+
primary: "colors.brand.primary",
|
|
43
|
+
secondary: "colors.brand.secondary"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
translationCatalog: {
|
|
47
|
+
key: "artisan.payments.catalog",
|
|
48
|
+
version: "1.0.0"
|
|
49
|
+
},
|
|
50
|
+
workflows: {
|
|
51
|
+
collectPayment: {
|
|
52
|
+
key: "artisan.payments.collectPayment",
|
|
53
|
+
version: "1.0.0"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
policies: [{ key: "artisan.payments.default", version: "1.0.0" }],
|
|
57
|
+
notes: "Install this blueprint and pair it with the Stripe integration connection to enable card collection."
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
// src/connection.sample.ts
|
|
61
|
+
var stripeLiveConnection = {
|
|
62
|
+
meta: {
|
|
63
|
+
id: "conn-stripe-live",
|
|
64
|
+
tenantId: "artisan-co",
|
|
65
|
+
integrationKey: "payments.stripe",
|
|
66
|
+
integrationVersion: "1",
|
|
67
|
+
label: "Stripe Production",
|
|
68
|
+
environment: "production",
|
|
69
|
+
createdAt: "2026-01-01T00:00:00.000Z",
|
|
70
|
+
updatedAt: "2026-01-01T00:00:00.000Z"
|
|
71
|
+
},
|
|
72
|
+
ownershipMode: "managed",
|
|
73
|
+
config: {
|
|
74
|
+
accountId: "acct_xxx"
|
|
75
|
+
},
|
|
76
|
+
secretProvider: "vault",
|
|
77
|
+
secretRef: "vault://integrations/artisan-co/conn-stripe-live",
|
|
78
|
+
status: "connected"
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
// src/docs/integration-stripe.docblock.ts
|
|
82
|
+
import { registerDocBlocks } from "@contractspec/lib.contracts/docs";
|
|
83
|
+
var blocks = [
|
|
84
|
+
{
|
|
85
|
+
id: "docs.examples.integration-stripe",
|
|
86
|
+
title: "Integration Example — Stripe Payments",
|
|
87
|
+
summary: "How to wire IntegrationSpec/TenantAppConfig + blueprint + workflow to enable Stripe-backed payments.",
|
|
88
|
+
kind: "reference",
|
|
89
|
+
visibility: "public",
|
|
90
|
+
route: "/docs/examples/integration-stripe",
|
|
91
|
+
tags: ["stripe", "payments", "integrations", "example"],
|
|
92
|
+
body: `## Included
|
|
93
|
+
- App blueprint enabling \`payments.psp\` capability.
|
|
94
|
+
- Workflow invoking Stripe operations (prepare → charge → confirm).
|
|
95
|
+
- Tenant app config binding workflow to an IntegrationConnection.
|
|
96
|
+
|
|
97
|
+
## Notes
|
|
98
|
+
- Secrets live in secret providers; connection config is non-secret.
|
|
99
|
+
- Use \`ctx.resolvedAppConfig\` in operation executors to access integrations, branding, and translations.`
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
id: "docs.examples.integration-stripe.usage",
|
|
103
|
+
title: "Stripe Integration Example — Usage",
|
|
104
|
+
summary: "How to use the blueprint, workflow, and tenant config together.",
|
|
105
|
+
kind: "usage",
|
|
106
|
+
visibility: "public",
|
|
107
|
+
route: "/docs/examples/integration-stripe/usage",
|
|
108
|
+
tags: ["stripe", "usage"],
|
|
109
|
+
body: `## Usage
|
|
110
|
+
1) Register the blueprint + workflow + catalog in your registry.
|
|
111
|
+
2) Persist an IntegrationConnection (see connection sample).
|
|
112
|
+
3) Bind the tenant app config to the connection.
|
|
113
|
+
|
|
114
|
+
## Guardrails
|
|
115
|
+
- Never log secrets.
|
|
116
|
+
- Keep payment semantics spec-defined; gate breaking changes behind flags.`
|
|
117
|
+
}
|
|
118
|
+
];
|
|
119
|
+
registerDocBlocks(blocks);
|
|
120
|
+
// src/example.ts
|
|
121
|
+
import { defineExample } from "@contractspec/lib.contracts";
|
|
122
|
+
var example = defineExample({
|
|
123
|
+
meta: {
|
|
124
|
+
key: "integration-stripe",
|
|
125
|
+
version: "1.0.0",
|
|
126
|
+
title: "Integration — Stripe Payments",
|
|
127
|
+
description: "Wire AppBlueprint + Workflow + TenantAppConfig to enable Stripe-backed payments (spec-first integration pattern).",
|
|
128
|
+
kind: "integration",
|
|
129
|
+
visibility: "public",
|
|
130
|
+
stability: "experimental",
|
|
131
|
+
owners: ["@platform.core"],
|
|
132
|
+
tags: ["stripe", "payments", "integration", "blueprint", "workflow"]
|
|
133
|
+
},
|
|
134
|
+
docs: {
|
|
135
|
+
rootDocId: "docs.examples.integration-stripe",
|
|
136
|
+
usageDocId: "docs.examples.integration-stripe.usage"
|
|
137
|
+
},
|
|
138
|
+
entrypoints: {
|
|
139
|
+
packageName: "@contractspec/example.integration-stripe",
|
|
140
|
+
docs: "./docs"
|
|
141
|
+
},
|
|
142
|
+
surfaces: {
|
|
143
|
+
templates: true,
|
|
144
|
+
sandbox: { enabled: true, modes: ["markdown", "specs"] },
|
|
145
|
+
studio: { enabled: true, installable: true },
|
|
146
|
+
mcp: { enabled: true }
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
var example_default = example;
|
|
150
|
+
|
|
151
|
+
// src/workflow.ts
|
|
152
|
+
import {
|
|
153
|
+
OwnersEnum as OwnersEnum2,
|
|
154
|
+
StabilityEnum as StabilityEnum2,
|
|
155
|
+
TagsEnum as TagsEnum2
|
|
156
|
+
} from "@contractspec/lib.contracts/ownership";
|
|
157
|
+
var collectPaymentWorkflow = {
|
|
158
|
+
meta: {
|
|
159
|
+
key: "artisan.payments.collectPayment",
|
|
160
|
+
version: "1.0.0",
|
|
161
|
+
title: "Collect Card Payment",
|
|
162
|
+
description: "Charge a customer using the tenant Stripe connection and record settlement details.",
|
|
163
|
+
domain: "payments",
|
|
164
|
+
owners: [OwnersEnum2.PlatformCore],
|
|
165
|
+
tags: [TagsEnum2.Marketplace, "stripe"],
|
|
166
|
+
stability: StabilityEnum2.Experimental
|
|
167
|
+
},
|
|
168
|
+
definition: {
|
|
169
|
+
entryStepId: "prepare",
|
|
170
|
+
steps: [
|
|
171
|
+
{
|
|
172
|
+
id: "prepare",
|
|
173
|
+
type: "automation",
|
|
174
|
+
label: "Prepare charge parameters",
|
|
175
|
+
action: {
|
|
176
|
+
operation: { key: "payments.prepareCharge", version: "1.0.0" }
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
id: "charge",
|
|
181
|
+
type: "automation",
|
|
182
|
+
label: "Charge card via Stripe",
|
|
183
|
+
action: {
|
|
184
|
+
operation: { key: "payments.stripe.chargeCard", version: "1.0.0" }
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
id: "confirm",
|
|
189
|
+
type: "automation",
|
|
190
|
+
label: "Confirm settlement",
|
|
191
|
+
action: {
|
|
192
|
+
operation: { key: "payments.recordSettlement", version: "1.0.0" }
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
],
|
|
196
|
+
transitions: [
|
|
197
|
+
{ from: "prepare", to: "charge" },
|
|
198
|
+
{ from: "charge", to: "confirm", condition: "output.success === true" }
|
|
199
|
+
]
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
// src/tenant.ts
|
|
204
|
+
var artisanStripeTenantConfig = {
|
|
205
|
+
meta: {
|
|
206
|
+
id: "tenant-config-artisan-stripe",
|
|
207
|
+
tenantId: "artisan-co",
|
|
208
|
+
appId: "artisan",
|
|
209
|
+
blueprintName: "artisan.payments.stripe",
|
|
210
|
+
blueprintVersion: "1.0.0",
|
|
211
|
+
environment: "production",
|
|
212
|
+
version: "1.0.0",
|
|
213
|
+
status: "published",
|
|
214
|
+
createdAt: new Date().toISOString(),
|
|
215
|
+
updatedAt: new Date().toISOString()
|
|
216
|
+
},
|
|
217
|
+
integrations: [
|
|
218
|
+
{
|
|
219
|
+
slotId: "primary-payments",
|
|
220
|
+
connectionId: "conn-stripe-live",
|
|
221
|
+
scope: {
|
|
222
|
+
workflows: ["collectPayment"],
|
|
223
|
+
operations: ["payments.stripe.chargeCard"]
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
],
|
|
227
|
+
knowledge: [],
|
|
228
|
+
locales: {
|
|
229
|
+
defaultLocale: "en",
|
|
230
|
+
enabledLocales: ["en", "fr"]
|
|
231
|
+
},
|
|
232
|
+
translationOverrides: {
|
|
233
|
+
entries: [
|
|
234
|
+
{
|
|
235
|
+
key: "artisan.payments.appName",
|
|
236
|
+
locale: "en",
|
|
237
|
+
value: "Artisan Payments Portal"
|
|
238
|
+
}
|
|
239
|
+
]
|
|
240
|
+
},
|
|
241
|
+
branding: {
|
|
242
|
+
appName: { en: "Artisan Payments Portal" },
|
|
243
|
+
assets: [
|
|
244
|
+
{ type: "logo", url: "https://tenant.artisanos.dev/logo.png" },
|
|
245
|
+
{ type: "logo-dark", url: "https://tenant.artisanos.dev/logo-dark.png" }
|
|
246
|
+
],
|
|
247
|
+
colors: {
|
|
248
|
+
primary: "#F97316",
|
|
249
|
+
secondary: "#1F2937"
|
|
250
|
+
},
|
|
251
|
+
customDomain: "pay.artisanos.dev"
|
|
252
|
+
},
|
|
253
|
+
notes: "Stripe connection bound for production payments."
|
|
254
|
+
};
|
|
255
|
+
export {
|
|
256
|
+
stripeLiveConnection,
|
|
257
|
+
example_default as example,
|
|
258
|
+
collectPaymentWorkflow,
|
|
259
|
+
artisanStripeTenantConfig,
|
|
260
|
+
artisanStripeBlueprint
|
|
261
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// src/tenant.ts
|
|
2
|
+
var artisanStripeTenantConfig = {
|
|
3
|
+
meta: {
|
|
4
|
+
id: "tenant-config-artisan-stripe",
|
|
5
|
+
tenantId: "artisan-co",
|
|
6
|
+
appId: "artisan",
|
|
7
|
+
blueprintName: "artisan.payments.stripe",
|
|
8
|
+
blueprintVersion: "1.0.0",
|
|
9
|
+
environment: "production",
|
|
10
|
+
version: "1.0.0",
|
|
11
|
+
status: "published",
|
|
12
|
+
createdAt: new Date().toISOString(),
|
|
13
|
+
updatedAt: new Date().toISOString()
|
|
14
|
+
},
|
|
15
|
+
integrations: [
|
|
16
|
+
{
|
|
17
|
+
slotId: "primary-payments",
|
|
18
|
+
connectionId: "conn-stripe-live",
|
|
19
|
+
scope: {
|
|
20
|
+
workflows: ["collectPayment"],
|
|
21
|
+
operations: ["payments.stripe.chargeCard"]
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
knowledge: [],
|
|
26
|
+
locales: {
|
|
27
|
+
defaultLocale: "en",
|
|
28
|
+
enabledLocales: ["en", "fr"]
|
|
29
|
+
},
|
|
30
|
+
translationOverrides: {
|
|
31
|
+
entries: [
|
|
32
|
+
{
|
|
33
|
+
key: "artisan.payments.appName",
|
|
34
|
+
locale: "en",
|
|
35
|
+
value: "Artisan Payments Portal"
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
branding: {
|
|
40
|
+
appName: { en: "Artisan Payments Portal" },
|
|
41
|
+
assets: [
|
|
42
|
+
{ type: "logo", url: "https://tenant.artisanos.dev/logo.png" },
|
|
43
|
+
{ type: "logo-dark", url: "https://tenant.artisanos.dev/logo-dark.png" }
|
|
44
|
+
],
|
|
45
|
+
colors: {
|
|
46
|
+
primary: "#F97316",
|
|
47
|
+
secondary: "#1F2937"
|
|
48
|
+
},
|
|
49
|
+
customDomain: "pay.artisanos.dev"
|
|
50
|
+
},
|
|
51
|
+
notes: "Stripe connection bound for production payments."
|
|
52
|
+
};
|
|
53
|
+
export {
|
|
54
|
+
artisanStripeTenantConfig
|
|
55
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// src/workflow.ts
|
|
2
|
+
import {
|
|
3
|
+
OwnersEnum,
|
|
4
|
+
StabilityEnum,
|
|
5
|
+
TagsEnum
|
|
6
|
+
} from "@contractspec/lib.contracts/ownership";
|
|
7
|
+
var collectPaymentWorkflow = {
|
|
8
|
+
meta: {
|
|
9
|
+
key: "artisan.payments.collectPayment",
|
|
10
|
+
version: "1.0.0",
|
|
11
|
+
title: "Collect Card Payment",
|
|
12
|
+
description: "Charge a customer using the tenant Stripe connection and record settlement details.",
|
|
13
|
+
domain: "payments",
|
|
14
|
+
owners: [OwnersEnum.PlatformCore],
|
|
15
|
+
tags: [TagsEnum.Marketplace, "stripe"],
|
|
16
|
+
stability: StabilityEnum.Experimental
|
|
17
|
+
},
|
|
18
|
+
definition: {
|
|
19
|
+
entryStepId: "prepare",
|
|
20
|
+
steps: [
|
|
21
|
+
{
|
|
22
|
+
id: "prepare",
|
|
23
|
+
type: "automation",
|
|
24
|
+
label: "Prepare charge parameters",
|
|
25
|
+
action: {
|
|
26
|
+
operation: { key: "payments.prepareCharge", version: "1.0.0" }
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
id: "charge",
|
|
31
|
+
type: "automation",
|
|
32
|
+
label: "Charge card via Stripe",
|
|
33
|
+
action: {
|
|
34
|
+
operation: { key: "payments.stripe.chargeCard", version: "1.0.0" }
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
id: "confirm",
|
|
39
|
+
type: "automation",
|
|
40
|
+
label: "Confirm settlement",
|
|
41
|
+
action: {
|
|
42
|
+
operation: { key: "payments.recordSettlement", version: "1.0.0" }
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
transitions: [
|
|
47
|
+
{ from: "prepare", to: "charge" },
|
|
48
|
+
{ from: "charge", to: "confirm", condition: "output.success === true" }
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
export {
|
|
53
|
+
collectPaymentWorkflow
|
|
54
|
+
};
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import { IntegrationConnection } from
|
|
2
|
-
|
|
3
|
-
//#region src/connection.sample.d.ts
|
|
4
|
-
declare const stripeLiveConnection: IntegrationConnection;
|
|
5
|
-
//#endregion
|
|
6
|
-
export { stripeLiveConnection };
|
|
1
|
+
import type { IntegrationConnection } from '@contractspec/lib.contracts/integrations/connection';
|
|
2
|
+
export declare const stripeLiveConnection: IntegrationConnection;
|
|
7
3
|
//# sourceMappingURL=connection.sample.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection.sample.d.ts","
|
|
1
|
+
{"version":3,"file":"connection.sample.d.ts","sourceRoot":"","sources":["../src/connection.sample.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qDAAqD,CAAC;AAEjG,eAAO,MAAM,oBAAoB,EAAE,qBAkBlC,CAAC"}
|
|
@@ -1,22 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
// @bun
|
|
2
|
+
// src/connection.sample.ts
|
|
3
|
+
var stripeLiveConnection = {
|
|
4
|
+
meta: {
|
|
5
|
+
id: "conn-stripe-live",
|
|
6
|
+
tenantId: "artisan-co",
|
|
7
|
+
integrationKey: "payments.stripe",
|
|
8
|
+
integrationVersion: "1",
|
|
9
|
+
label: "Stripe Production",
|
|
10
|
+
environment: "production",
|
|
11
|
+
createdAt: "2026-01-01T00:00:00.000Z",
|
|
12
|
+
updatedAt: "2026-01-01T00:00:00.000Z"
|
|
13
|
+
},
|
|
14
|
+
ownershipMode: "managed",
|
|
15
|
+
config: {
|
|
16
|
+
accountId: "acct_xxx"
|
|
17
|
+
},
|
|
18
|
+
secretProvider: "vault",
|
|
19
|
+
secretRef: "vault://integrations/artisan-co/conn-stripe-live",
|
|
20
|
+
status: "connected"
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
stripeLiveConnection
|
|
18
24
|
};
|
|
19
|
-
|
|
20
|
-
//#endregion
|
|
21
|
-
export { stripeLiveConnection };
|
|
22
|
-
//# sourceMappingURL=connection.sample.js.map
|
package/dist/docs/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import './integration-stripe.docblock';
|
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/docs/index.ts"],"names":[],"mappings":"AAAA,OAAO,+BAA+B,CAAC"}
|
package/dist/docs/index.js
CHANGED
|
@@ -1 +1,40 @@
|
|
|
1
|
-
|
|
1
|
+
// @bun
|
|
2
|
+
// src/docs/integration-stripe.docblock.ts
|
|
3
|
+
import { registerDocBlocks } from "@contractspec/lib.contracts/docs";
|
|
4
|
+
var blocks = [
|
|
5
|
+
{
|
|
6
|
+
id: "docs.examples.integration-stripe",
|
|
7
|
+
title: "Integration Example \u2014 Stripe Payments",
|
|
8
|
+
summary: "How to wire IntegrationSpec/TenantAppConfig + blueprint + workflow to enable Stripe-backed payments.",
|
|
9
|
+
kind: "reference",
|
|
10
|
+
visibility: "public",
|
|
11
|
+
route: "/docs/examples/integration-stripe",
|
|
12
|
+
tags: ["stripe", "payments", "integrations", "example"],
|
|
13
|
+
body: `## Included
|
|
14
|
+
- App blueprint enabling \`payments.psp\` capability.
|
|
15
|
+
- Workflow invoking Stripe operations (prepare \u2192 charge \u2192 confirm).
|
|
16
|
+
- Tenant app config binding workflow to an IntegrationConnection.
|
|
17
|
+
|
|
18
|
+
## Notes
|
|
19
|
+
- Secrets live in secret providers; connection config is non-secret.
|
|
20
|
+
- Use \`ctx.resolvedAppConfig\` in operation executors to access integrations, branding, and translations.`
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
id: "docs.examples.integration-stripe.usage",
|
|
24
|
+
title: "Stripe Integration Example \u2014 Usage",
|
|
25
|
+
summary: "How to use the blueprint, workflow, and tenant config together.",
|
|
26
|
+
kind: "usage",
|
|
27
|
+
visibility: "public",
|
|
28
|
+
route: "/docs/examples/integration-stripe/usage",
|
|
29
|
+
tags: ["stripe", "usage"],
|
|
30
|
+
body: `## Usage
|
|
31
|
+
1) Register the blueprint + workflow + catalog in your registry.
|
|
32
|
+
2) Persist an IntegrationConnection (see connection sample).
|
|
33
|
+
3) Bind the tenant app config to the connection.
|
|
34
|
+
|
|
35
|
+
## Guardrails
|
|
36
|
+
- Never log secrets.
|
|
37
|
+
- Keep payment semantics spec-defined; gate breaking changes behind flags.`
|
|
38
|
+
}
|
|
39
|
+
];
|
|
40
|
+
registerDocBlocks(blocks);
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export {};
|
|
2
|
+
//# sourceMappingURL=integration-stripe.docblock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integration-stripe.docblock.d.ts","sourceRoot":"","sources":["../../src/docs/integration-stripe.docblock.ts"],"names":[],"mappings":""}
|
|
@@ -1,30 +1,40 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// src/docs/integration-stripe.docblock.ts
|
|
1
3
|
import { registerDocBlocks } from "@contractspec/lib.contracts/docs";
|
|
4
|
+
var blocks = [
|
|
5
|
+
{
|
|
6
|
+
id: "docs.examples.integration-stripe",
|
|
7
|
+
title: "Integration Example \u2014 Stripe Payments",
|
|
8
|
+
summary: "How to wire IntegrationSpec/TenantAppConfig + blueprint + workflow to enable Stripe-backed payments.",
|
|
9
|
+
kind: "reference",
|
|
10
|
+
visibility: "public",
|
|
11
|
+
route: "/docs/examples/integration-stripe",
|
|
12
|
+
tags: ["stripe", "payments", "integrations", "example"],
|
|
13
|
+
body: `## Included
|
|
14
|
+
- App blueprint enabling \`payments.psp\` capability.
|
|
15
|
+
- Workflow invoking Stripe operations (prepare \u2192 charge \u2192 confirm).
|
|
16
|
+
- Tenant app config binding workflow to an IntegrationConnection.
|
|
2
17
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
id: "docs.examples.integration-stripe.usage",
|
|
20
|
-
title: "Stripe Integration Example — Usage",
|
|
21
|
-
summary: "How to use the blueprint, workflow, and tenant config together.",
|
|
22
|
-
kind: "usage",
|
|
23
|
-
visibility: "public",
|
|
24
|
-
route: "/docs/examples/integration-stripe/usage",
|
|
25
|
-
tags: ["stripe", "usage"],
|
|
26
|
-
body: `## Usage\n1) Register the blueprint + workflow + catalog in your registry.\n2) Persist an IntegrationConnection (see connection sample).\n3) Bind the tenant app config to the connection.\n\n## Guardrails\n- Never log secrets.\n- Keep payment semantics spec-defined; gate breaking changes behind flags.`
|
|
27
|
-
}]);
|
|
18
|
+
## Notes
|
|
19
|
+
- Secrets live in secret providers; connection config is non-secret.
|
|
20
|
+
- Use \`ctx.resolvedAppConfig\` in operation executors to access integrations, branding, and translations.`
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
id: "docs.examples.integration-stripe.usage",
|
|
24
|
+
title: "Stripe Integration Example \u2014 Usage",
|
|
25
|
+
summary: "How to use the blueprint, workflow, and tenant config together.",
|
|
26
|
+
kind: "usage",
|
|
27
|
+
visibility: "public",
|
|
28
|
+
route: "/docs/examples/integration-stripe/usage",
|
|
29
|
+
tags: ["stripe", "usage"],
|
|
30
|
+
body: `## Usage
|
|
31
|
+
1) Register the blueprint + workflow + catalog in your registry.
|
|
32
|
+
2) Persist an IntegrationConnection (see connection sample).
|
|
33
|
+
3) Bind the tenant app config to the connection.
|
|
28
34
|
|
|
29
|
-
|
|
30
|
-
|
|
35
|
+
## Guardrails
|
|
36
|
+
- Never log secrets.
|
|
37
|
+
- Keep payment semantics spec-defined; gate breaking changes behind flags.`
|
|
38
|
+
}
|
|
39
|
+
];
|
|
40
|
+
registerDocBlocks(blocks);
|
package/dist/example.d.ts
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
//#region src/example.d.ts
|
|
4
|
-
declare const example: _contractspec_lib_contracts0.ExampleSpec;
|
|
5
|
-
//#endregion
|
|
6
|
-
export { example as default };
|
|
1
|
+
declare const example: import("@contractspec/lib.contracts").ExampleSpec;
|
|
2
|
+
export default example;
|
|
7
3
|
//# sourceMappingURL=example.d.ts.map
|
package/dist/example.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"example.d.ts","
|
|
1
|
+
{"version":3,"file":"example.d.ts","sourceRoot":"","sources":["../src/example.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,OAAO,mDA2BX,CAAC;AAEH,eAAe,OAAO,CAAC"}
|
package/dist/example.js
CHANGED
|
@@ -1,46 +1,34 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// src/example.ts
|
|
1
3
|
import { defineExample } from "@contractspec/lib.contracts";
|
|
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
|
-
docs: "./docs"
|
|
29
|
-
},
|
|
30
|
-
surfaces: {
|
|
31
|
-
templates: true,
|
|
32
|
-
sandbox: {
|
|
33
|
-
enabled: true,
|
|
34
|
-
modes: ["markdown", "specs"]
|
|
35
|
-
},
|
|
36
|
-
studio: {
|
|
37
|
-
enabled: true,
|
|
38
|
-
installable: true
|
|
39
|
-
},
|
|
40
|
-
mcp: { enabled: true }
|
|
41
|
-
}
|
|
4
|
+
var example = defineExample({
|
|
5
|
+
meta: {
|
|
6
|
+
key: "integration-stripe",
|
|
7
|
+
version: "1.0.0",
|
|
8
|
+
title: "Integration \u2014 Stripe Payments",
|
|
9
|
+
description: "Wire AppBlueprint + Workflow + TenantAppConfig to enable Stripe-backed payments (spec-first integration pattern).",
|
|
10
|
+
kind: "integration",
|
|
11
|
+
visibility: "public",
|
|
12
|
+
stability: "experimental",
|
|
13
|
+
owners: ["@platform.core"],
|
|
14
|
+
tags: ["stripe", "payments", "integration", "blueprint", "workflow"]
|
|
15
|
+
},
|
|
16
|
+
docs: {
|
|
17
|
+
rootDocId: "docs.examples.integration-stripe",
|
|
18
|
+
usageDocId: "docs.examples.integration-stripe.usage"
|
|
19
|
+
},
|
|
20
|
+
entrypoints: {
|
|
21
|
+
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
|
+
}
|
|
42
30
|
});
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
31
|
+
var example_default = example;
|
|
32
|
+
export {
|
|
33
|
+
example_default as default
|
|
34
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
export * from './blueprint';
|
|
2
|
+
export * from './workflow';
|
|
3
|
+
export * from './tenant';
|
|
4
|
+
export * from './connection.sample';
|
|
5
|
+
export { default as example } from './example';
|
|
6
|
+
import './docs';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|