@contractspec/example.integration-stripe 0.0.0-canary-20260113162409

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.
Files changed (45) hide show
  1. package/.turbo/turbo-build$colon$bundle.log +37 -0
  2. package/.turbo/turbo-build.log +38 -0
  3. package/CHANGELOG.md +302 -0
  4. package/LICENSE +21 -0
  5. package/README.md +29 -0
  6. package/dist/blueprint.d.ts +7 -0
  7. package/dist/blueprint.d.ts.map +1 -0
  8. package/dist/blueprint.js +66 -0
  9. package/dist/blueprint.js.map +1 -0
  10. package/dist/connection.sample.d.ts +7 -0
  11. package/dist/connection.sample.d.ts.map +1 -0
  12. package/dist/connection.sample.js +22 -0
  13. package/dist/connection.sample.js.map +1 -0
  14. package/dist/docs/index.d.ts +1 -0
  15. package/dist/docs/index.js +1 -0
  16. package/dist/docs/integration-stripe.docblock.d.ts +1 -0
  17. package/dist/docs/integration-stripe.docblock.js +30 -0
  18. package/dist/docs/integration-stripe.docblock.js.map +1 -0
  19. package/dist/example.d.ts +7 -0
  20. package/dist/example.d.ts.map +1 -0
  21. package/dist/example.js +47 -0
  22. package/dist/example.js.map +1 -0
  23. package/dist/index.d.ts +6 -0
  24. package/dist/index.js +8 -0
  25. package/dist/tenant.d.ts +7 -0
  26. package/dist/tenant.d.ts.map +1 -0
  27. package/dist/tenant.js +53 -0
  28. package/dist/tenant.js.map +1 -0
  29. package/dist/workflow.d.ts +7 -0
  30. package/dist/workflow.d.ts.map +1 -0
  31. package/dist/workflow.js +59 -0
  32. package/dist/workflow.js.map +1 -0
  33. package/package.json +63 -0
  34. package/src/blueprint.ts +62 -0
  35. package/src/connection.sample.ts +21 -0
  36. package/src/docs/index.ts +1 -0
  37. package/src/docs/integration-stripe.docblock.ts +28 -0
  38. package/src/example.ts +32 -0
  39. package/src/index.ts +6 -0
  40. package/src/tenant.ts +53 -0
  41. package/src/workflow.ts +53 -0
  42. package/translation.catalog.json +21 -0
  43. package/tsconfig.json +11 -0
  44. package/tsconfig.tsbuildinfo +1 -0
  45. package/tsdown.config.js +6 -0
@@ -0,0 +1,37 @@
1
+ $ tsdown
2
+ ℹ tsdown v0.19.0 powered by rolldown v1.0.0-beta.59
3
+ ℹ config file: /home/runner/work/contractspec/contractspec/packages/examples/integration-stripe/tsdown.config.js
4
+ ℹ entry: src/blueprint.ts, src/connection.sample.ts, src/example.ts, src/index.ts, src/tenant.ts, src/workflow.ts, src/docs/index.ts, src/docs/integration-stripe.docblock.ts
5
+ ℹ target: esnext
6
+ ℹ tsconfig: tsconfig.json
7
+ ℹ Build start
8
+ ℹ Cleaning 28 files
9
+ ℹ dist/blueprint.js 1.72 kB │ gzip: 0.73 kB
10
+ ℹ dist/docs/integration-stripe.docblock.js 1.59 kB │ gzip: 0.74 kB
11
+ ℹ dist/workflow.js 1.35 kB │ gzip: 0.57 kB
12
+ ℹ dist/tenant.js 1.29 kB │ gzip: 0.63 kB
13
+ ℹ dist/example.js 1.07 kB │ gzip: 0.55 kB
14
+ ℹ dist/connection.sample.js 0.60 kB │ gzip: 0.35 kB
15
+ ℹ dist/index.js 0.44 kB │ gzip: 0.20 kB
16
+ ℹ dist/docs/index.js 0.04 kB │ gzip: 0.06 kB
17
+ ℹ dist/blueprint.js.map 2.69 kB │ gzip: 1.10 kB
18
+ ℹ dist/workflow.js.map 2.20 kB │ gzip: 0.84 kB
19
+ ℹ dist/tenant.js.map 2.17 kB │ gzip: 0.98 kB
20
+ ℹ dist/docs/integration-stripe.docblock.js.map 2.09 kB │ gzip: 0.93 kB
21
+ ℹ dist/example.js.map 1.52 kB │ gzip: 0.74 kB
22
+ ℹ dist/connection.sample.js.map 0.98 kB │ gzip: 0.52 kB
23
+ ℹ dist/connection.sample.d.ts.map 0.15 kB │ gzip: 0.13 kB
24
+ ℹ dist/example.d.ts.map 0.14 kB │ gzip: 0.13 kB
25
+ ℹ dist/blueprint.d.ts.map 0.13 kB │ gzip: 0.12 kB
26
+ ℹ dist/workflow.d.ts.map 0.13 kB │ gzip: 0.12 kB
27
+ ℹ dist/tenant.d.ts.map 0.12 kB │ gzip: 0.12 kB
28
+ ℹ dist/index.d.ts 0.39 kB │ gzip: 0.17 kB
29
+ ℹ dist/connection.sample.d.ts 0.28 kB │ gzip: 0.17 kB
30
+ ℹ dist/blueprint.d.ts 0.25 kB │ gzip: 0.17 kB
31
+ ℹ dist/example.d.ts 0.25 kB │ gzip: 0.17 kB
32
+ ℹ dist/tenant.d.ts 0.25 kB │ gzip: 0.17 kB
33
+ ℹ dist/workflow.d.ts 0.24 kB │ gzip: 0.16 kB
34
+ ℹ dist/docs/index.d.ts 0.01 kB │ gzip: 0.03 kB
35
+ ℹ dist/docs/integration-stripe.docblock.d.ts 0.01 kB │ gzip: 0.03 kB
36
+ ℹ 27 files, total: 22.11 kB
37
+ ✔ Build complete in 21413ms
@@ -0,0 +1,38 @@
1
+ $ bun build:types && bun build:bundle
2
+ $ tsc --noEmit
3
+ $ tsdown
4
+ ℹ tsdown v0.19.0 powered by rolldown v1.0.0-beta.59
5
+ ℹ config file: /home/runner/work/contractspec/contractspec/packages/examples/integration-stripe/tsdown.config.js
6
+ ℹ entry: src/blueprint.ts, src/connection.sample.ts, src/example.ts, src/index.ts, src/tenant.ts, src/workflow.ts, src/docs/index.ts, src/docs/integration-stripe.docblock.ts
7
+ ℹ target: esnext
8
+ ℹ tsconfig: tsconfig.json
9
+ ℹ Build start
10
+ ℹ dist/blueprint.js 1.72 kB │ gzip: 0.73 kB
11
+ ℹ dist/docs/integration-stripe.docblock.js 1.59 kB │ gzip: 0.74 kB
12
+ ℹ dist/workflow.js 1.35 kB │ gzip: 0.57 kB
13
+ ℹ dist/tenant.js 1.29 kB │ gzip: 0.63 kB
14
+ ℹ dist/example.js 1.07 kB │ gzip: 0.55 kB
15
+ ℹ dist/connection.sample.js 0.60 kB │ gzip: 0.35 kB
16
+ ℹ dist/index.js 0.44 kB │ gzip: 0.20 kB
17
+ ℹ dist/docs/index.js 0.04 kB │ gzip: 0.06 kB
18
+ ℹ dist/blueprint.js.map 2.69 kB │ gzip: 1.10 kB
19
+ ℹ dist/workflow.js.map 2.20 kB │ gzip: 0.84 kB
20
+ ℹ dist/tenant.js.map 2.17 kB │ gzip: 0.98 kB
21
+ ℹ dist/docs/integration-stripe.docblock.js.map 2.09 kB │ gzip: 0.93 kB
22
+ ℹ dist/example.js.map 1.52 kB │ gzip: 0.74 kB
23
+ ℹ dist/connection.sample.js.map 0.98 kB │ gzip: 0.52 kB
24
+ ℹ dist/connection.sample.d.ts.map 0.15 kB │ gzip: 0.13 kB
25
+ ℹ dist/example.d.ts.map 0.14 kB │ gzip: 0.13 kB
26
+ ℹ dist/blueprint.d.ts.map 0.13 kB │ gzip: 0.12 kB
27
+ ℹ dist/workflow.d.ts.map 0.13 kB │ gzip: 0.12 kB
28
+ ℹ dist/tenant.d.ts.map 0.12 kB │ gzip: 0.12 kB
29
+ ℹ dist/index.d.ts 0.39 kB │ gzip: 0.17 kB
30
+ ℹ dist/connection.sample.d.ts 0.28 kB │ gzip: 0.17 kB
31
+ ℹ dist/blueprint.d.ts 0.25 kB │ gzip: 0.17 kB
32
+ ℹ dist/example.d.ts 0.25 kB │ gzip: 0.17 kB
33
+ ℹ dist/tenant.d.ts 0.25 kB │ gzip: 0.17 kB
34
+ ℹ dist/workflow.d.ts 0.24 kB │ gzip: 0.16 kB
35
+ ℹ dist/docs/index.d.ts 0.01 kB │ gzip: 0.03 kB
36
+ ℹ dist/docs/integration-stripe.docblock.d.ts 0.01 kB │ gzip: 0.03 kB
37
+ ℹ 27 files, total: 22.11 kB
38
+ ✔ Build complete in 23132ms
package/CHANGELOG.md ADDED
@@ -0,0 +1,302 @@
1
+ # @contractspec/example.integration-stripe
2
+
3
+ ## 0.0.0-canary-20260113162409
4
+
5
+ ### Minor Changes
6
+
7
+ - caf8701: feat: add cli vibe command to run workflow
8
+ - c69b849: feat: add api web services (mcp & website)
9
+ - 42b8d78: feat: add cli `contractspec vibe` workflow to simplify usage
10
+ - fd38e85: feat: auto-fix contractspec issues
11
+
12
+ ### Patch Changes
13
+
14
+ - e7ded36: feat: improve stability (adding ts-morph)
15
+ - c231a8b: test: improve workspace stability
16
+ - Updated dependencies [e7ded36]
17
+ - Updated dependencies [caf8701]
18
+ - Updated dependencies [c69b849]
19
+ - Updated dependencies [c231a8b]
20
+ - Updated dependencies [42b8d78]
21
+ - Updated dependencies [fd38e85]
22
+ - @contractspec/lib.contracts@0.0.0-canary-20260113162409
23
+ - @contractspec/lib.schema@0.0.0-canary-20260113162409
24
+
25
+ ## 1.46.2
26
+
27
+ ### Patch Changes
28
+
29
+ - 7e21625: feat: library services (landing page & api)
30
+ - Updated dependencies [7e21625]
31
+ - @contractspec/lib.contracts@1.46.2
32
+ - @contractspec/lib.schema@1.46.2
33
+
34
+ ## 1.46.1
35
+
36
+ ### Patch Changes
37
+
38
+ - 2d8a72b: fix: mcp for presentation
39
+ - Updated dependencies [2d8a72b]
40
+ - @contractspec/lib.contracts@1.46.1
41
+ - @contractspec/lib.schema@1.46.1
42
+
43
+ ## 1.46.0
44
+
45
+ ### Minor Changes
46
+
47
+ - 07cb19b: feat: feat: cleaude code & opencode integrations
48
+
49
+ ### Patch Changes
50
+
51
+ - Updated dependencies [07cb19b]
52
+ - @contractspec/lib.contracts@1.46.0
53
+ - @contractspec/lib.schema@1.46.0
54
+
55
+ ## 1.45.6
56
+
57
+ ### Patch Changes
58
+
59
+ - a913074: feat: improve ai agents rules management"
60
+ - Updated dependencies [a913074]
61
+ - @contractspec/lib.contracts@1.45.6
62
+ - @contractspec/lib.schema@1.45.6
63
+
64
+ ## 1.45.5
65
+
66
+ ### Patch Changes
67
+
68
+ - 9ddd7fa: feat: improve versioning
69
+ - Updated dependencies [9ddd7fa]
70
+ - @contractspec/lib.contracts@1.45.5
71
+ - @contractspec/lib.schema@1.45.5
72
+
73
+ ## 1.45.4
74
+
75
+ ### Patch Changes
76
+
77
+ - fix: github action
78
+ - Updated dependencies
79
+ - @contractspec/lib.contracts@1.45.4
80
+ - @contractspec/lib.schema@1.45.4
81
+
82
+ ## 1.45.3
83
+
84
+ ### Patch Changes
85
+
86
+ - e74ea9e: feat: version management
87
+ - Updated dependencies [e74ea9e]
88
+ - @contractspec/lib.contracts@1.45.3
89
+ - @contractspec/lib.schema@1.45.3
90
+
91
+ ## 1.45.2
92
+
93
+ ### Patch Changes
94
+
95
+ - 39ca241: code cleaning
96
+ - Updated dependencies [39ca241]
97
+ - @contractspec/lib.contracts@1.45.2
98
+ - @contractspec/lib.schema@1.45.2
99
+
100
+ ## 1.45.1
101
+
102
+ ### Patch Changes
103
+
104
+ - feat: improve app config and examples contracts
105
+ - Updated dependencies
106
+ - @contractspec/lib.contracts@1.45.1
107
+ - @contractspec/lib.schema@1.45.1
108
+
109
+ ## 1.45.0
110
+
111
+ ### Minor Changes
112
+
113
+ - e73ca1d: feat: improve app config and examples contracts
114
+ feat: Contract layers support (features, examples, app-configs)
115
+
116
+ ### New CLI Commands
117
+ - `contractspec list layers` - List all contract layers with filtering
118
+
119
+ ### Enhanced Commands
120
+ - `contractspec ci` - New `layers` check category validates features/examples/config
121
+ - `contractspec doctor` - New `layers` health checks
122
+ - `contractspec integrity` - Now shows layer statistics
123
+
124
+ ### New APIs
125
+ - `discoverLayers()` - Scan workspace for all layer files
126
+ - `scanExampleSource()` - Parse ExampleSpec from source code
127
+ - `isExampleFile()` - Check if file is an example spec
128
+
129
+ ### Patch Changes
130
+
131
+ - Updated dependencies [e73ca1d]
132
+ - @contractspec/lib.contracts@1.45.0
133
+ - @contractspec/lib.schema@1.45.0
134
+
135
+ ## 1.44.1
136
+
137
+ ### Patch Changes
138
+
139
+ - 3c594fb: fix
140
+ - Updated dependencies [3c594fb]
141
+ - @contractspec/lib.contracts@1.44.1
142
+ - @contractspec/lib.schema@1.44.1
143
+
144
+ ## 1.44.0
145
+
146
+ ### Minor Changes
147
+
148
+ - 5f3a868: chore: isolate branding to contractspec.io
149
+
150
+ ### Patch Changes
151
+
152
+ - Updated dependencies [5f3a868]
153
+ - @contractspec/lib.contracts@1.44.0
154
+ - @contractspec/lib.schema@1.44.0
155
+
156
+ ## 1.43.4
157
+
158
+ ### Patch Changes
159
+
160
+ - 9216062: fix: cross-platform compatibility
161
+ - Updated dependencies [9216062]
162
+ - @contractspec/lib.contracts@1.43.4
163
+ - @contractspec/lib.schema@1.43.3
164
+
165
+ ## 1.43.3
166
+
167
+ ### Patch Changes
168
+
169
+ - 24d9759: improve documentation
170
+ - Updated dependencies [24d9759]
171
+ - @contractspec/lib.contracts@1.43.3
172
+ - @contractspec/lib.schema@1.43.2
173
+
174
+ ## 1.43.2
175
+
176
+ ### Patch Changes
177
+
178
+ - e147271: fix: improve stability
179
+ - Updated dependencies [e147271]
180
+ - @contractspec/lib.contracts@1.43.2
181
+ - @contractspec/lib.schema@1.43.1
182
+
183
+ ## 1.43.1
184
+
185
+ ### Patch Changes
186
+
187
+ - Updated dependencies [f28fdad]
188
+ - @contractspec/lib.contracts@1.43.1
189
+
190
+ ## 1.43.0
191
+
192
+ ### Minor Changes
193
+
194
+ - 042d072: feat: schema declaration using json schema, including zod
195
+
196
+ ### Patch Changes
197
+
198
+ - Updated dependencies [042d072]
199
+ - @contractspec/lib.contracts@1.43.0
200
+ - @contractspec/lib.schema@1.43.0
201
+
202
+ ## 1.42.10
203
+
204
+ ### Patch Changes
205
+
206
+ - 1e6a0f1: fix: mcp server
207
+ - Updated dependencies [1e6a0f1]
208
+ - @contractspec/lib.contracts@1.42.10
209
+ - @contractspec/lib.schema@1.42.10
210
+
211
+ ## 1.42.9
212
+
213
+ ### Patch Changes
214
+
215
+ - 9281db7: fix ModelRegistry
216
+ - Updated dependencies [9281db7]
217
+ - @contractspec/lib.contracts@1.42.9
218
+ - @contractspec/lib.schema@1.42.9
219
+
220
+ ## 1.42.8
221
+
222
+ ### Patch Changes
223
+
224
+ - e07b5ac: fix
225
+ - Updated dependencies [e07b5ac]
226
+ - @contractspec/lib.contracts@1.42.8
227
+ - @contractspec/lib.schema@1.42.8
228
+
229
+ ## 1.42.7
230
+
231
+ ### Patch Changes
232
+
233
+ - e9b575d: fix release
234
+ - Updated dependencies [e9b575d]
235
+ - @contractspec/lib.contracts@1.42.7
236
+ - @contractspec/lib.schema@1.42.7
237
+
238
+ ## 1.42.6
239
+
240
+ ### Patch Changes
241
+
242
+ - 1500242: fix tooling
243
+ - Updated dependencies [1500242]
244
+ - @contractspec/lib.contracts@1.42.6
245
+ - @contractspec/lib.schema@1.42.6
246
+
247
+ ## 1.42.5
248
+
249
+ ### Patch Changes
250
+
251
+ - 1299719: fix vscode
252
+ - Updated dependencies [1299719]
253
+ - @contractspec/lib.contracts@1.42.5
254
+ - @contractspec/lib.schema@1.42.5
255
+
256
+ ## 1.42.4
257
+
258
+ ### Patch Changes
259
+
260
+ - ac28b99: fix: generate from openapi
261
+ - Updated dependencies [ac28b99]
262
+ - @contractspec/lib.contracts@1.42.4
263
+ - @contractspec/lib.schema@1.42.4
264
+
265
+ ## 1.42.3
266
+
267
+ ### Patch Changes
268
+
269
+ - 3f5d015: fix(tooling): cicd
270
+ - Updated dependencies [3f5d015]
271
+ - @contractspec/lib.contracts@1.42.3
272
+ - @contractspec/lib.schema@1.42.3
273
+
274
+ ## 1.42.2
275
+
276
+ ### Patch Changes
277
+
278
+ - 1f9ac4c: fix
279
+ - Updated dependencies [1f9ac4c]
280
+ - @contractspec/lib.contracts@1.42.2
281
+ - @contractspec/lib.schema@1.42.2
282
+
283
+ ## 1.42.1
284
+
285
+ ### Patch Changes
286
+
287
+ - f043995: Fix release
288
+ - Updated dependencies [f043995]
289
+ - @contractspec/lib.contracts@1.42.1
290
+ - @contractspec/lib.schema@1.42.1
291
+
292
+ ## 1.42.0
293
+
294
+ ### Minor Changes
295
+
296
+ - 8eefd9c: initial release
297
+
298
+ ### Patch Changes
299
+
300
+ - Updated dependencies [8eefd9c]
301
+ - @contractspec/lib.contracts@1.42.0
302
+ - @contractspec/lib.schema@1.42.0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Chaman Ventures, SASU
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,29 @@
1
+ ### Integration Example – Stripe Payments
2
+
3
+ Website: https://contractspec.io/
4
+
5
+
6
+ This example shows how to wire the `IntegrationSpec`/`TenantAppConfig` layers together to enable Stripe-backed payments for ArtisanOS.
7
+
8
+ Files included:
9
+
10
+ - `blueprint.ts` – declares the `AppBlueprintSpec` enabling the `payments.psp` capability and mapping the payment workflow.
11
+ - `workflow.ts` – minimal `WorkflowSpec` that invokes Stripe operations (`payments.stripe.chargeCard`).
12
+ - `tenant.ts` – tenant configuration binding the workflow to a concrete Stripe `IntegrationConnection`.
13
+ - `connection.sample.ts` – sample connection payload illustrating the data saved by the integrations service.
14
+ - `translation.catalog.json` *(optional)* – canonical strings referenced by `branding.appNameKey`.
15
+
16
+ When the workflow runner executes the `charge` step, the `WorkflowRunner` now surfaces the tenant `ResolvedAppConfig` (including integrations, branding, and translations) through `OperationExecutorContext.resolvedAppConfig`. An implementation of `opExecutor` can:
17
+
18
+ - Pull the connection via `context.integrations[0]` and ask a `secretProvider` for Stripe keys.
19
+ - Resolve tenant-specific branding via `context.branding` for emails or receipts.
20
+ - Resolve localized copy using `context.translationResolver` (if provided by the host).
21
+
22
+ Recommended next steps:
23
+
24
+ 1. Persist the sample connection through the integration CRUD contracts (`integrations.connection.create`).
25
+ 2. Register the blueprint + workflow + translation catalog in your registry.
26
+ 3. Use `registerIntegrationContracts` and `registerAppConfigContracts` to expose the connection, branding, and translation management operations.
27
+ 4. Implement the payment contract handlers to read `ctx.integrations`, fetch secrets through `ctx.secretProvider`, and execute Stripe calls.
28
+ 5. Render receipts or notifications by combining `ctx.branding` (logos/domain) and `ctx.translation.resolve(key, locale)` for localized copy.
29
+
@@ -0,0 +1,7 @@
1
+ import { AppBlueprintSpec } from "@contractspec/lib.contracts/app-config/spec";
2
+
3
+ //#region src/blueprint.d.ts
4
+ declare const artisanStripeBlueprint: AppBlueprintSpec;
5
+ //#endregion
6
+ export { artisanStripeBlueprint };
7
+ //# sourceMappingURL=blueprint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blueprint.d.ts","names":[],"sources":["../src/blueprint.ts"],"sourcesContent":[],"mappings":";;;cAOa,wBAAwB"}
@@ -0,0 +1,66 @@
1
+ import { OwnersEnum, StabilityEnum, TagsEnum } from "@contractspec/lib.contracts/ownership";
2
+
3
+ //#region src/blueprint.ts
4
+ const artisanStripeBlueprint = {
5
+ meta: {
6
+ key: "artisan.payments.stripe",
7
+ version: "1.0.0",
8
+ appId: "artisan",
9
+ title: "ArtisanOS Stripe Payments",
10
+ description: "Blueprint enabling card payments for ArtisanOS merchants via the Stripe integration.",
11
+ domain: "payments",
12
+ owners: [OwnersEnum.PlatformCore],
13
+ tags: [
14
+ TagsEnum.Marketplace,
15
+ "stripe",
16
+ "payments"
17
+ ],
18
+ stability: StabilityEnum.Experimental
19
+ },
20
+ capabilities: { enabled: [{
21
+ key: "payments.psp",
22
+ version: "1.0.0"
23
+ }] },
24
+ integrationSlots: [{
25
+ slotId: "primary-payments",
26
+ requiredCategory: "payments",
27
+ allowedModes: ["managed", "byok"],
28
+ requiredCapabilities: [{
29
+ key: "payments.psp",
30
+ version: "1.0.0"
31
+ }],
32
+ required: true,
33
+ description: "Primary card processor slot. Bind the tenant Stripe connection here."
34
+ }],
35
+ branding: {
36
+ appNameKey: "artisan.payments.appName",
37
+ assets: [{
38
+ type: "logo",
39
+ url: "https://cdn.artisanos.dev/branding/logo.png"
40
+ }, {
41
+ type: "favicon",
42
+ url: "https://cdn.artisanos.dev/branding/favicon.ico"
43
+ }],
44
+ colorTokens: {
45
+ primary: "colors.brand.primary",
46
+ secondary: "colors.brand.secondary"
47
+ }
48
+ },
49
+ translationCatalog: {
50
+ key: "artisan.payments.catalog",
51
+ version: "1.0.0"
52
+ },
53
+ workflows: { collectPayment: {
54
+ key: "artisan.payments.collectPayment",
55
+ version: "1.0.0"
56
+ } },
57
+ policies: [{
58
+ key: "artisan.payments.default",
59
+ version: "1.0.0"
60
+ }],
61
+ notes: "Install this blueprint and pair it with the Stripe integration connection to enable card collection."
62
+ };
63
+
64
+ //#endregion
65
+ export { artisanStripeBlueprint };
66
+ //# sourceMappingURL=blueprint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blueprint.js","names":[],"sources":["../src/blueprint.ts"],"sourcesContent":["import type { AppBlueprintSpec } from '@contractspec/lib.contracts/app-config/spec';\nimport {\n OwnersEnum,\n StabilityEnum,\n TagsEnum,\n} from '@contractspec/lib.contracts/ownership';\n\nexport const artisanStripeBlueprint: AppBlueprintSpec = {\n meta: {\n key: 'artisan.payments.stripe',\n version: '1.0.0',\n appId: 'artisan',\n title: 'ArtisanOS Stripe Payments',\n description:\n 'Blueprint enabling card payments for ArtisanOS merchants via the Stripe integration.',\n domain: 'payments',\n owners: [OwnersEnum.PlatformCore],\n tags: [TagsEnum.Marketplace, 'stripe', 'payments'],\n stability: StabilityEnum.Experimental,\n },\n capabilities: {\n enabled: [{ key: 'payments.psp', version: '1.0.0' }],\n },\n integrationSlots: [\n {\n slotId: 'primary-payments',\n requiredCategory: 'payments',\n allowedModes: ['managed', 'byok'],\n requiredCapabilities: [{ key: 'payments.psp', version: '1.0.0' }],\n required: true,\n description:\n 'Primary card processor slot. Bind the tenant Stripe connection here.',\n },\n ],\n branding: {\n appNameKey: 'artisan.payments.appName',\n assets: [\n { type: 'logo', url: 'https://cdn.artisanos.dev/branding/logo.png' },\n {\n type: 'favicon',\n url: 'https://cdn.artisanos.dev/branding/favicon.ico',\n },\n ],\n colorTokens: {\n primary: 'colors.brand.primary',\n secondary: 'colors.brand.secondary',\n },\n },\n translationCatalog: {\n key: 'artisan.payments.catalog',\n version: '1.0.0',\n },\n workflows: {\n collectPayment: {\n key: 'artisan.payments.collectPayment',\n version: '1.0.0',\n },\n },\n policies: [{ key: 'artisan.payments.default', version: '1.0.0' }],\n notes:\n 'Install this blueprint and pair it with the Stripe integration connection to enable card collection.',\n};\n"],"mappings":";;;AAOA,MAAa,yBAA2C;CACtD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,OAAO;EACP,aACE;EACF,QAAQ;EACR,QAAQ,CAAC,WAAW,aAAa;EACjC,MAAM;GAAC,SAAS;GAAa;GAAU;GAAW;EAClD,WAAW,cAAc;EAC1B;CACD,cAAc,EACZ,SAAS,CAAC;EAAE,KAAK;EAAgB,SAAS;EAAS,CAAC,EACrD;CACD,kBAAkB,CAChB;EACE,QAAQ;EACR,kBAAkB;EAClB,cAAc,CAAC,WAAW,OAAO;EACjC,sBAAsB,CAAC;GAAE,KAAK;GAAgB,SAAS;GAAS,CAAC;EACjE,UAAU;EACV,aACE;EACH,CACF;CACD,UAAU;EACR,YAAY;EACZ,QAAQ,CACN;GAAE,MAAM;GAAQ,KAAK;GAA+C,EACpE;GACE,MAAM;GACN,KAAK;GACN,CACF;EACD,aAAa;GACX,SAAS;GACT,WAAW;GACZ;EACF;CACD,oBAAoB;EAClB,KAAK;EACL,SAAS;EACV;CACD,WAAW,EACT,gBAAgB;EACd,KAAK;EACL,SAAS;EACV,EACF;CACD,UAAU,CAAC;EAAE,KAAK;EAA4B,SAAS;EAAS,CAAC;CACjE,OACE;CACH"}
@@ -0,0 +1,7 @@
1
+ import { IntegrationConnection } from "@contractspec/lib.contracts/integrations/connection";
2
+
3
+ //#region src/connection.sample.d.ts
4
+ declare const stripeLiveConnection: IntegrationConnection;
5
+ //#endregion
6
+ export { stripeLiveConnection };
7
+ //# sourceMappingURL=connection.sample.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connection.sample.d.ts","names":[],"sources":["../src/connection.sample.ts"],"sourcesContent":[],"mappings":";;;cAEa,sBAAsB"}
@@ -0,0 +1,22 @@
1
+ //#region src/connection.sample.ts
2
+ const stripeLiveConnection = {
3
+ meta: {
4
+ id: "conn-stripe-live",
5
+ tenantId: "artisan-co",
6
+ integrationKey: "payments.stripe",
7
+ integrationVersion: "1",
8
+ label: "Stripe Production",
9
+ environment: "production",
10
+ createdAt: "2026-01-01T00:00:00.000Z",
11
+ updatedAt: "2026-01-01T00:00:00.000Z"
12
+ },
13
+ ownershipMode: "managed",
14
+ config: { accountId: "acct_xxx" },
15
+ secretProvider: "vault",
16
+ secretRef: "vault://integrations/artisan-co/conn-stripe-live",
17
+ status: "connected"
18
+ };
19
+
20
+ //#endregion
21
+ export { stripeLiveConnection };
22
+ //# sourceMappingURL=connection.sample.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connection.sample.js","names":[],"sources":["../src/connection.sample.ts"],"sourcesContent":["import type { IntegrationConnection } from '@contractspec/lib.contracts/integrations/connection';\n\nexport const stripeLiveConnection: IntegrationConnection = {\n meta: {\n id: 'conn-stripe-live',\n tenantId: 'artisan-co',\n integrationKey: 'payments.stripe',\n integrationVersion: '1',\n label: 'Stripe Production',\n environment: 'production',\n createdAt: '2026-01-01T00:00:00.000Z',\n updatedAt: '2026-01-01T00:00:00.000Z',\n },\n ownershipMode: 'managed',\n config: {\n accountId: 'acct_xxx',\n },\n secretProvider: 'vault',\n secretRef: 'vault://integrations/artisan-co/conn-stripe-live',\n status: 'connected',\n};\n"],"mappings":";AAEA,MAAa,uBAA8C;CACzD,MAAM;EACJ,IAAI;EACJ,UAAU;EACV,gBAAgB;EAChB,oBAAoB;EACpB,OAAO;EACP,aAAa;EACb,WAAW;EACX,WAAW;EACZ;CACD,eAAe;CACf,QAAQ,EACN,WAAW,YACZ;CACD,gBAAgB;CAChB,WAAW;CACX,QAAQ;CACT"}
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1 @@
1
+ import "./integration-stripe.docblock.js";
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,30 @@
1
+ import { registerDocBlocks } from "@contractspec/lib.contracts/docs";
2
+
3
+ //#region src/docs/integration-stripe.docblock.ts
4
+ registerDocBlocks([{
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: [
12
+ "stripe",
13
+ "payments",
14
+ "integrations",
15
+ "example"
16
+ ],
17
+ body: `## Included\n- App blueprint enabling \`payments.psp\` capability.\n- Workflow invoking Stripe operations (prepare → charge → confirm).\n- Tenant app config binding workflow to an IntegrationConnection.\n\n## Notes\n- Secrets live in secret providers; connection config is non-secret.\n- Use \`ctx.resolvedAppConfig\` in operation executors to access integrations, branding, and translations.`
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
+ }]);
28
+
29
+ //#endregion
30
+ //# sourceMappingURL=integration-stripe.docblock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integration-stripe.docblock.js","names":[],"sources":["../../src/docs/integration-stripe.docblock.ts"],"sourcesContent":["import type { DocBlock } from '@contractspec/lib.contracts/docs';\nimport { registerDocBlocks } from '@contractspec/lib.contracts/docs';\n\nconst blocks: DocBlock[] = [\n {\n id: 'docs.examples.integration-stripe',\n title: 'Integration Example — Stripe Payments',\n summary:\n 'How to wire IntegrationSpec/TenantAppConfig + blueprint + workflow to enable Stripe-backed payments.',\n kind: 'reference',\n visibility: 'public',\n route: '/docs/examples/integration-stripe',\n tags: ['stripe', 'payments', 'integrations', 'example'],\n body: `## Included\\n- App blueprint enabling \\`payments.psp\\` capability.\\n- Workflow invoking Stripe operations (prepare → charge → confirm).\\n- Tenant app config binding workflow to an IntegrationConnection.\\n\\n## Notes\\n- Secrets live in secret providers; connection config is non-secret.\\n- Use \\`ctx.resolvedAppConfig\\` in operation executors to access integrations, branding, and translations.`,\n },\n {\n id: 'docs.examples.integration-stripe.usage',\n title: 'Stripe Integration Example — Usage',\n summary: 'How to use the blueprint, workflow, and tenant config together.',\n kind: 'usage',\n visibility: 'public',\n route: '/docs/examples/integration-stripe/usage',\n tags: ['stripe', 'usage'],\n 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.`,\n },\n];\n\nregisterDocBlocks(blocks);\n"],"mappings":";;;AA2BA,kBAxB2B,CACzB;CACE,IAAI;CACJ,OAAO;CACP,SACE;CACF,MAAM;CACN,YAAY;CACZ,OAAO;CACP,MAAM;EAAC;EAAU;EAAY;EAAgB;EAAU;CACvD,MAAM;CACP,EACD;CACE,IAAI;CACJ,OAAO;CACP,SAAS;CACT,MAAM;CACN,YAAY;CACZ,OAAO;CACP,MAAM,CAAC,UAAU,QAAQ;CACzB,MAAM;CACP,CACF,CAEwB"}
@@ -0,0 +1,7 @@
1
+ import * as _contractspec_lib_contracts0 from "@contractspec/lib.contracts";
2
+
3
+ //#region src/example.d.ts
4
+ declare const example: _contractspec_lib_contracts0.ExampleSpec;
5
+ //#endregion
6
+ export { example as default };
7
+ //# sourceMappingURL=example.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"example.d.ts","names":[],"sources":["../src/example.ts"],"sourcesContent":[],"mappings":";;;cAEM,SA2BJ,4BAAA,CA3BW"}
@@ -0,0 +1,47 @@
1
+ import { defineExample } from "@contractspec/lib.contracts";
2
+
3
+ //#region src/example.ts
4
+ const example = defineExample({
5
+ meta: {
6
+ key: "integration-stripe",
7
+ version: "1.0.0",
8
+ title: "Integration — 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: [
15
+ "stripe",
16
+ "payments",
17
+ "integration",
18
+ "blueprint",
19
+ "workflow"
20
+ ]
21
+ },
22
+ docs: {
23
+ rootDocId: "docs.examples.integration-stripe",
24
+ usageDocId: "docs.examples.integration-stripe.usage"
25
+ },
26
+ entrypoints: {
27
+ packageName: "@contractspec/example.integration-stripe",
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
+ }
42
+ });
43
+ var example_default = example;
44
+
45
+ //#endregion
46
+ export { example_default as default };
47
+ //# sourceMappingURL=example.js.map