@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
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,43 +1,41 @@
|
|
|
1
|
-
$ bun
|
|
2
|
-
$
|
|
3
|
-
$
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
[34mℹ[39m target: [34mesnext[39m
|
|
8
|
-
[34mℹ[39m tsconfig: [34mtsconfig.json[39m
|
|
9
|
-
[34mℹ[39m Build start
|
|
10
|
-
[34mℹ[39m [2mdist/[22m[1mblueprint.js[22m [2m1.72 kB[22m [2m│ gzip: 0.73 kB[22m
|
|
11
|
-
[34mℹ[39m [2mdist/[22m[1mdocs/integration-stripe.docblock.js[22m [2m1.59 kB[22m [2m│ gzip: 0.74 kB[22m
|
|
12
|
-
[34mℹ[39m [2mdist/[22m[1mworkflow.js[22m [2m1.35 kB[22m [2m│ gzip: 0.57 kB[22m
|
|
13
|
-
[34mℹ[39m [2mdist/[22m[1mtenant.js[22m [2m1.29 kB[22m [2m│ gzip: 0.63 kB[22m
|
|
14
|
-
[34mℹ[39m [2mdist/[22m[1mexample.js[22m [2m1.03 kB[22m [2m│ gzip: 0.54 kB[22m
|
|
15
|
-
[34mℹ[39m [2mdist/[22m[1mconnection.sample.js[22m [2m0.60 kB[22m [2m│ gzip: 0.35 kB[22m
|
|
16
|
-
[34mℹ[39m [2mdist/[22m[1mindex.js[22m [2m0.41 kB[22m [2m│ gzip: 0.19 kB[22m
|
|
17
|
-
[34mℹ[39m [2mdist/[22m[1mdocs/index.js[22m [2m0.04 kB[22m [2m│ gzip: 0.06 kB[22m
|
|
18
|
-
[34mℹ[39m [2mdist/[22mblueprint.js.map [2m2.69 kB[22m [2m│ gzip: 1.10 kB[22m
|
|
19
|
-
[34mℹ[39m [2mdist/[22mworkflow.js.map [2m2.20 kB[22m [2m│ gzip: 0.84 kB[22m
|
|
20
|
-
[34mℹ[39m [2mdist/[22mtenant.js.map [2m2.17 kB[22m [2m│ gzip: 0.98 kB[22m
|
|
21
|
-
[34mℹ[39m [2mdist/[22mdocs/integration-stripe.docblock.js.map [2m2.09 kB[22m [2m│ gzip: 0.93 kB[22m
|
|
22
|
-
[34mℹ[39m [2mdist/[22mexample.js.map [2m1.51 kB[22m [2m│ gzip: 0.73 kB[22m
|
|
23
|
-
[34mℹ[39m [2mdist/[22mconnection.sample.js.map [2m0.98 kB[22m [2m│ gzip: 0.52 kB[22m
|
|
24
|
-
[34mℹ[39m [2mdist/[22mconnection.sample.d.ts.map [2m0.14 kB[22m [2m│ gzip: 0.13 kB[22m
|
|
25
|
-
[34mℹ[39m [2mdist/[22mexample.d.ts.map [2m0.13 kB[22m [2m│ gzip: 0.13 kB[22m
|
|
26
|
-
[34mℹ[39m [2mdist/[22mblueprint.d.ts.map [2m0.12 kB[22m [2m│ gzip: 0.12 kB[22m
|
|
27
|
-
[34mℹ[39m [2mdist/[22mworkflow.d.ts.map [2m0.12 kB[22m [2m│ gzip: 0.12 kB[22m
|
|
28
|
-
[34mℹ[39m [2mdist/[22mtenant.d.ts.map [2m0.11 kB[22m [2m│ gzip: 0.12 kB[22m
|
|
29
|
-
[34mℹ[39m [2mdist/[22m[32m[1mindex.d.ts[22m[39m [2m0.39 kB[22m [2m│ gzip: 0.17 kB[22m
|
|
30
|
-
[34mℹ[39m [2mdist/[22m[32m[1mconnection.sample.d.ts[22m[39m [2m0.28 kB[22m [2m│ gzip: 0.17 kB[22m
|
|
31
|
-
[34mℹ[39m [2mdist/[22m[32m[1mblueprint.d.ts[22m[39m [2m0.25 kB[22m [2m│ gzip: 0.17 kB[22m
|
|
32
|
-
[34mℹ[39m [2mdist/[22m[32m[1mexample.d.ts[22m[39m [2m0.25 kB[22m [2m│ gzip: 0.17 kB[22m
|
|
33
|
-
[34mℹ[39m [2mdist/[22m[32m[1mtenant.d.ts[22m[39m [2m0.25 kB[22m [2m│ gzip: 0.17 kB[22m
|
|
34
|
-
[34mℹ[39m [2mdist/[22m[32m[1mworkflow.d.ts[22m[39m [2m0.24 kB[22m [2m│ gzip: 0.16 kB[22m
|
|
35
|
-
[34mℹ[39m [2mdist/[22m[32m[1mdocs/index.d.ts[22m[39m [2m0.01 kB[22m [2m│ gzip: 0.03 kB[22m
|
|
36
|
-
[34mℹ[39m [2mdist/[22m[32m[1mdocs/integration-stripe.docblock.d.ts[22m[39m [2m0.01 kB[22m [2m│ gzip: 0.03 kB[22m
|
|
37
|
-
[34mℹ[39m 27 files, total: 21.99 kB
|
|
38
|
-
[33m[PLUGIN_TIMINGS] Warning:[0m Your build spent significant time in plugins. Here is a breakdown:
|
|
39
|
-
- rolldown-plugin-dts:generate (55%)
|
|
40
|
-
- tsdown:external (43%)
|
|
41
|
-
See https://rolldown.rs/options/checks#plugintimings for more details.
|
|
1
|
+
$ contractspec-bun-build prebuild
|
|
2
|
+
$ bun run prebuild && bun run build:bundle && bun run build:types
|
|
3
|
+
$ contractspec-bun-build prebuild
|
|
4
|
+
$ contractspec-bun-build transpile
|
|
5
|
+
[contractspec-bun-build] transpile target=bun root=src entries=8
|
|
6
|
+
Bundled 8 modules in 36ms
|
|
42
7
|
|
|
43
|
-
|
|
8
|
+
./blueprint.js 1.77 KB (entry point)
|
|
9
|
+
./index.js 7.69 KB (entry point)
|
|
10
|
+
./connection.sample.js 0.58 KB (entry point)
|
|
11
|
+
docs/index.js 1.59 KB (entry point)
|
|
12
|
+
docs/integration-stripe.docblock.js 1.59 KB (entry point)
|
|
13
|
+
./example.js 1.0 KB (entry point)
|
|
14
|
+
./tenant.js 1.34 KB (entry point)
|
|
15
|
+
./workflow.js 1.41 KB (entry point)
|
|
16
|
+
|
|
17
|
+
[contractspec-bun-build] transpile target=node root=src entries=8
|
|
18
|
+
Bundled 8 modules in 26ms
|
|
19
|
+
|
|
20
|
+
./blueprint.js 1.76 KB (entry point)
|
|
21
|
+
./index.js 7.66 KB (entry point)
|
|
22
|
+
./connection.sample.js 0.57 KB (entry point)
|
|
23
|
+
docs/index.js 1.57 KB (entry point)
|
|
24
|
+
docs/integration-stripe.docblock.js 1.57 KB (entry point)
|
|
25
|
+
./example.js 1.0 KB (entry point)
|
|
26
|
+
./tenant.js 1.33 KB (entry point)
|
|
27
|
+
./workflow.js 1.40 KB (entry point)
|
|
28
|
+
|
|
29
|
+
[contractspec-bun-build] transpile target=browser root=src entries=8
|
|
30
|
+
Bundled 8 modules in 16ms
|
|
31
|
+
|
|
32
|
+
./blueprint.js 1.76 KB (entry point)
|
|
33
|
+
./index.js 7.66 KB (entry point)
|
|
34
|
+
./connection.sample.js 0.57 KB (entry point)
|
|
35
|
+
docs/index.js 1.57 KB (entry point)
|
|
36
|
+
docs/integration-stripe.docblock.js 1.57 KB (entry point)
|
|
37
|
+
./example.js 1.0 KB (entry point)
|
|
38
|
+
./tenant.js 1.33 KB (entry point)
|
|
39
|
+
./workflow.js 1.40 KB (entry point)
|
|
40
|
+
|
|
41
|
+
$ contractspec-bun-build types
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
$ contractspec-bun-build prebuild
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @contractspec/example.integration-stripe
|
|
2
2
|
|
|
3
|
+
## 1.58.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- d1f0fd0: chore: Migrate non-app package builds from tsdown to shared Bun tooling, add `@contractspec/tool.bun`, and standardize `prebuild`/`build`/`typecheck` with platform-aware exports and `tsc` declaration emission into `dist`.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [d1f0fd0]
|
|
12
|
+
- Updated dependencies [4355a9e]
|
|
13
|
+
- @contractspec/lib.contracts@1.58.0
|
|
14
|
+
- @contractspec/lib.schema@1.58.0
|
|
15
|
+
|
|
3
16
|
## 1.57.0
|
|
4
17
|
|
|
5
18
|
### Minor Changes
|
package/dist/blueprint.d.ts
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import { AppBlueprintSpec } from
|
|
2
|
-
|
|
3
|
-
//#region src/blueprint.d.ts
|
|
4
|
-
declare const artisanStripeBlueprint: AppBlueprintSpec;
|
|
5
|
-
//#endregion
|
|
6
|
-
export { artisanStripeBlueprint };
|
|
1
|
+
import type { AppBlueprintSpec } from '@contractspec/lib.contracts/app-config/spec';
|
|
2
|
+
export declare const artisanStripeBlueprint: AppBlueprintSpec;
|
|
7
3
|
//# sourceMappingURL=blueprint.d.ts.map
|
package/dist/blueprint.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blueprint.d.ts","
|
|
1
|
+
{"version":3,"file":"blueprint.d.ts","sourceRoot":"","sources":["../src/blueprint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6CAA6C,CAAC;AAOpF,eAAO,MAAM,sBAAsB,EAAE,gBAsDpC,CAAC"}
|
package/dist/blueprint.js
CHANGED
|
@@ -1,66 +1,62 @@
|
|
|
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
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
1
|
+
// @bun
|
|
2
|
+
// src/blueprint.ts
|
|
3
|
+
import {
|
|
4
|
+
OwnersEnum,
|
|
5
|
+
StabilityEnum,
|
|
6
|
+
TagsEnum
|
|
7
|
+
} from "@contractspec/lib.contracts/ownership";
|
|
8
|
+
var artisanStripeBlueprint = {
|
|
9
|
+
meta: {
|
|
10
|
+
key: "artisan.payments.stripe",
|
|
11
|
+
version: "1.0.0",
|
|
12
|
+
appId: "artisan",
|
|
13
|
+
title: "ArtisanOS Stripe Payments",
|
|
14
|
+
description: "Blueprint enabling card payments for ArtisanOS merchants via the Stripe integration.",
|
|
15
|
+
domain: "payments",
|
|
16
|
+
owners: [OwnersEnum.PlatformCore],
|
|
17
|
+
tags: [TagsEnum.Marketplace, "stripe", "payments"],
|
|
18
|
+
stability: StabilityEnum.Experimental
|
|
19
|
+
},
|
|
20
|
+
capabilities: {
|
|
21
|
+
enabled: [{ key: "payments.psp", version: "1.0.0" }]
|
|
22
|
+
},
|
|
23
|
+
integrationSlots: [
|
|
24
|
+
{
|
|
25
|
+
slotId: "primary-payments",
|
|
26
|
+
requiredCategory: "payments",
|
|
27
|
+
allowedModes: ["managed", "byok"],
|
|
28
|
+
requiredCapabilities: [{ key: "payments.psp", version: "1.0.0" }],
|
|
29
|
+
required: true,
|
|
30
|
+
description: "Primary card processor slot. Bind the tenant Stripe connection here."
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
branding: {
|
|
34
|
+
appNameKey: "artisan.payments.appName",
|
|
35
|
+
assets: [
|
|
36
|
+
{ type: "logo", url: "https://cdn.artisanos.dev/branding/logo.png" },
|
|
37
|
+
{
|
|
38
|
+
type: "favicon",
|
|
39
|
+
url: "https://cdn.artisanos.dev/branding/favicon.ico"
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
colorTokens: {
|
|
43
|
+
primary: "colors.brand.primary",
|
|
44
|
+
secondary: "colors.brand.secondary"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
translationCatalog: {
|
|
48
|
+
key: "artisan.payments.catalog",
|
|
49
|
+
version: "1.0.0"
|
|
50
|
+
},
|
|
51
|
+
workflows: {
|
|
52
|
+
collectPayment: {
|
|
53
|
+
key: "artisan.payments.collectPayment",
|
|
54
|
+
version: "1.0.0"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
policies: [{ key: "artisan.payments.default", version: "1.0.0" }],
|
|
58
|
+
notes: "Install this blueprint and pair it with the Stripe integration connection to enable card collection."
|
|
59
|
+
};
|
|
60
|
+
export {
|
|
61
|
+
artisanStripeBlueprint
|
|
62
62
|
};
|
|
63
|
-
|
|
64
|
-
//#endregion
|
|
65
|
-
export { artisanStripeBlueprint };
|
|
66
|
-
//# sourceMappingURL=blueprint.js.map
|
|
@@ -0,0 +1,61 @@
|
|
|
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
|
+
export {
|
|
60
|
+
artisanStripeBlueprint
|
|
61
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// src/connection.sample.ts
|
|
2
|
+
var 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: {
|
|
15
|
+
accountId: "acct_xxx"
|
|
16
|
+
},
|
|
17
|
+
secretProvider: "vault",
|
|
18
|
+
secretRef: "vault://integrations/artisan-co/conn-stripe-live",
|
|
19
|
+
status: "connected"
|
|
20
|
+
};
|
|
21
|
+
export {
|
|
22
|
+
stripeLiveConnection
|
|
23
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// src/docs/integration-stripe.docblock.ts
|
|
2
|
+
import { registerDocBlocks } from "@contractspec/lib.contracts/docs";
|
|
3
|
+
var blocks = [
|
|
4
|
+
{
|
|
5
|
+
id: "docs.examples.integration-stripe",
|
|
6
|
+
title: "Integration Example — Stripe Payments",
|
|
7
|
+
summary: "How to wire IntegrationSpec/TenantAppConfig + blueprint + workflow to enable Stripe-backed payments.",
|
|
8
|
+
kind: "reference",
|
|
9
|
+
visibility: "public",
|
|
10
|
+
route: "/docs/examples/integration-stripe",
|
|
11
|
+
tags: ["stripe", "payments", "integrations", "example"],
|
|
12
|
+
body: `## Included
|
|
13
|
+
- App blueprint enabling \`payments.psp\` capability.
|
|
14
|
+
- Workflow invoking Stripe operations (prepare → charge → confirm).
|
|
15
|
+
- Tenant app config binding workflow to an IntegrationConnection.
|
|
16
|
+
|
|
17
|
+
## Notes
|
|
18
|
+
- Secrets live in secret providers; connection config is non-secret.
|
|
19
|
+
- Use \`ctx.resolvedAppConfig\` in operation executors to access integrations, branding, and translations.`
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
id: "docs.examples.integration-stripe.usage",
|
|
23
|
+
title: "Stripe Integration Example — Usage",
|
|
24
|
+
summary: "How to use the blueprint, workflow, and tenant config together.",
|
|
25
|
+
kind: "usage",
|
|
26
|
+
visibility: "public",
|
|
27
|
+
route: "/docs/examples/integration-stripe/usage",
|
|
28
|
+
tags: ["stripe", "usage"],
|
|
29
|
+
body: `## Usage
|
|
30
|
+
1) Register the blueprint + workflow + catalog in your registry.
|
|
31
|
+
2) Persist an IntegrationConnection (see connection sample).
|
|
32
|
+
3) Bind the tenant app config to the connection.
|
|
33
|
+
|
|
34
|
+
## Guardrails
|
|
35
|
+
- Never log secrets.
|
|
36
|
+
- Keep payment semantics spec-defined; gate breaking changes behind flags.`
|
|
37
|
+
}
|
|
38
|
+
];
|
|
39
|
+
registerDocBlocks(blocks);
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// src/docs/integration-stripe.docblock.ts
|
|
2
|
+
import { registerDocBlocks } from "@contractspec/lib.contracts/docs";
|
|
3
|
+
var blocks = [
|
|
4
|
+
{
|
|
5
|
+
id: "docs.examples.integration-stripe",
|
|
6
|
+
title: "Integration Example — Stripe Payments",
|
|
7
|
+
summary: "How to wire IntegrationSpec/TenantAppConfig + blueprint + workflow to enable Stripe-backed payments.",
|
|
8
|
+
kind: "reference",
|
|
9
|
+
visibility: "public",
|
|
10
|
+
route: "/docs/examples/integration-stripe",
|
|
11
|
+
tags: ["stripe", "payments", "integrations", "example"],
|
|
12
|
+
body: `## Included
|
|
13
|
+
- App blueprint enabling \`payments.psp\` capability.
|
|
14
|
+
- Workflow invoking Stripe operations (prepare → charge → confirm).
|
|
15
|
+
- Tenant app config binding workflow to an IntegrationConnection.
|
|
16
|
+
|
|
17
|
+
## Notes
|
|
18
|
+
- Secrets live in secret providers; connection config is non-secret.
|
|
19
|
+
- Use \`ctx.resolvedAppConfig\` in operation executors to access integrations, branding, and translations.`
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
id: "docs.examples.integration-stripe.usage",
|
|
23
|
+
title: "Stripe Integration Example — Usage",
|
|
24
|
+
summary: "How to use the blueprint, workflow, and tenant config together.",
|
|
25
|
+
kind: "usage",
|
|
26
|
+
visibility: "public",
|
|
27
|
+
route: "/docs/examples/integration-stripe/usage",
|
|
28
|
+
tags: ["stripe", "usage"],
|
|
29
|
+
body: `## Usage
|
|
30
|
+
1) Register the blueprint + workflow + catalog in your registry.
|
|
31
|
+
2) Persist an IntegrationConnection (see connection sample).
|
|
32
|
+
3) Bind the tenant app config to the connection.
|
|
33
|
+
|
|
34
|
+
## Guardrails
|
|
35
|
+
- Never log secrets.
|
|
36
|
+
- Keep payment semantics spec-defined; gate breaking changes behind flags.`
|
|
37
|
+
}
|
|
38
|
+
];
|
|
39
|
+
registerDocBlocks(blocks);
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// src/example.ts
|
|
2
|
+
import { defineExample } from "@contractspec/lib.contracts";
|
|
3
|
+
var example = defineExample({
|
|
4
|
+
meta: {
|
|
5
|
+
key: "integration-stripe",
|
|
6
|
+
version: "1.0.0",
|
|
7
|
+
title: "Integration — Stripe Payments",
|
|
8
|
+
description: "Wire AppBlueprint + Workflow + TenantAppConfig to enable Stripe-backed payments (spec-first integration pattern).",
|
|
9
|
+
kind: "integration",
|
|
10
|
+
visibility: "public",
|
|
11
|
+
stability: "experimental",
|
|
12
|
+
owners: ["@platform.core"],
|
|
13
|
+
tags: ["stripe", "payments", "integration", "blueprint", "workflow"]
|
|
14
|
+
},
|
|
15
|
+
docs: {
|
|
16
|
+
rootDocId: "docs.examples.integration-stripe",
|
|
17
|
+
usageDocId: "docs.examples.integration-stripe.usage"
|
|
18
|
+
},
|
|
19
|
+
entrypoints: {
|
|
20
|
+
packageName: "@contractspec/example.integration-stripe",
|
|
21
|
+
docs: "./docs"
|
|
22
|
+
},
|
|
23
|
+
surfaces: {
|
|
24
|
+
templates: true,
|
|
25
|
+
sandbox: { enabled: true, modes: ["markdown", "specs"] },
|
|
26
|
+
studio: { enabled: true, installable: true },
|
|
27
|
+
mcp: { enabled: true }
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
var example_default = example;
|
|
31
|
+
export {
|
|
32
|
+
example_default as default
|
|
33
|
+
};
|