@lssm/example.integration-stripe 1.41.0 → 1.42.2

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.
@@ -0,0 +1,37 @@
1
+ $ tsdown
2
+ ℹ tsdown v0.18.3 powered by rolldown v1.0.0-beta.57
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.67 kB │ gzip: 0.73 kB
10
+ ℹ dist/docs/integration-stripe.docblock.js 1.58 kB │ gzip: 0.74 kB
11
+ ℹ dist/workflow.js 1.32 kB │ gzip: 0.56 kB
12
+ ℹ dist/tenant.js 1.28 kB │ gzip: 0.63 kB
13
+ ℹ dist/example.js 0.88 kB │ gzip: 0.47 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.67 kB │ gzip: 1.10 kB
18
+ ℹ dist/workflow.js.map 2.20 kB │ gzip: 0.84 kB
19
+ ℹ dist/tenant.js.map 2.19 kB │ gzip: 0.97 kB
20
+ ℹ dist/docs/integration-stripe.docblock.js.map 2.07 kB │ gzip: 0.93 kB
21
+ ℹ dist/example.js.map 1.24 kB │ gzip: 0.64 kB
22
+ ℹ dist/connection.sample.js.map 1.02 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/example.d.ts 1.11 kB │ gzip: 0.46 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.24 kB │ gzip: 0.17 kB
32
+ ℹ dist/tenant.d.ts 0.24 kB │ gzip: 0.17 kB
33
+ ℹ dist/workflow.d.ts 0.23 kB │ gzip: 0.17 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.41 kB
37
+ ✔ Build complete in 16501ms
@@ -1,19 +1,38 @@
1
- $ bun build:bundle && bun build:types
1
+ $ bun build:types && bun build:bundle
2
+ $ tsc --noEmit
2
3
  $ tsdown
3
- ℹ tsdown v0.17.4 powered by rolldown v1.0.0-beta.53
4
+ ℹ tsdown v0.18.3 powered by rolldown v1.0.0-beta.57
4
5
  ℹ config file: /home/runner/work/contractspec/contractspec/packages/examples/integration-stripe/tsdown.config.js
5
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
6
7
  ℹ target: esnext
7
8
  ℹ tsconfig: tsconfig.json
8
9
  ℹ Build start
9
- ℹ dist/docs/integration-stripe.docblock.js 1.36 kB │ gzip: 0.67 kB
10
- ℹ dist/blueprint.js 1.34 kB │ gzip: 0.62 kB
11
- ℹ dist/tenant.js 0.97 kB │ gzip: 0.52 kB
12
- ℹ dist/workflow.js 0.95 kB │ gzip: 0.47 kB
13
- ℹ dist/example.js 0.62 kB │ gzip: 0.37 kB
14
- ℹ dist/connection.sample.js 0.43 kB │ gzip: 0.28 kB
15
- ℹ dist/index.js 0.41 kB │ gzip: 0.20 kB
16
- ℹ dist/docs/index.js 0.04 kB │ gzip: 0.06 kB
17
- ℹ 8 files, total: 6.13 kB
18
- ✔ Build complete in 51ms
19
- $ tsc --noEmit
10
+ ℹ dist/blueprint.js 1.67 kB │ gzip: 0.73 kB
11
+ ℹ dist/docs/integration-stripe.docblock.js 1.58 kB │ gzip: 0.74 kB
12
+ ℹ dist/workflow.js 1.32 kB │ gzip: 0.56 kB
13
+ ℹ dist/tenant.js 1.28 kB │ gzip: 0.63 kB
14
+ ℹ dist/example.js 0.88 kB │ gzip: 0.47 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.67 kB │ gzip: 1.10 kB
19
+ ℹ dist/workflow.js.map 2.20 kB │ gzip: 0.84 kB
20
+ ℹ dist/tenant.js.map 2.19 kB │ gzip: 0.97 kB
21
+ ℹ dist/docs/integration-stripe.docblock.js.map 2.07 kB │ gzip: 0.93 kB
22
+ ℹ dist/example.js.map 1.24 kB │ gzip: 0.64 kB
23
+ ℹ dist/connection.sample.js.map 1.02 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/example.d.ts 1.11 kB │ gzip: 0.46 kB
30
+ ℹ dist/index.d.ts 0.39 kB │ gzip: 0.17 kB
31
+ ℹ dist/connection.sample.d.ts 0.28 kB │ gzip: 0.17 kB
32
+ ℹ dist/blueprint.d.ts 0.24 kB │ gzip: 0.17 kB
33
+ ℹ dist/tenant.d.ts 0.24 kB │ gzip: 0.17 kB
34
+ ℹ dist/workflow.d.ts 0.23 kB │ gzip: 0.17 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.41 kB
38
+ ✔ Build complete in 16807ms
package/CHANGELOG.md ADDED
@@ -0,0 +1,31 @@
1
+ # @lssm/example.integration-stripe
2
+
3
+ ## 1.42.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 1f9ac4c: fix
8
+ - Updated dependencies [1f9ac4c]
9
+ - @lssm/lib.contracts@1.42.2
10
+ - @lssm/lib.schema@1.42.2
11
+
12
+ ## 1.42.1
13
+
14
+ ### Patch Changes
15
+
16
+ - f043995: Fix release
17
+ - Updated dependencies [f043995]
18
+ - @lssm/lib.contracts@1.42.1
19
+ - @lssm/lib.schema@1.42.1
20
+
21
+ ## 1.42.0
22
+
23
+ ### Minor Changes
24
+
25
+ - 8eefd9c: initial release
26
+
27
+ ### Patch Changes
28
+
29
+ - Updated dependencies [8eefd9c]
30
+ - @lssm/lib.contracts@1.42.0
31
+ - @lssm/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 CHANGED
@@ -1,5 +1,8 @@
1
1
  ### Integration Example – Stripe Payments
2
2
 
3
+ Website: https://contractspec.lssm.tech/
4
+
5
+
3
6
  This example shows how to wire the `IntegrationSpec`/`TenantAppConfig` layers together to enable Stripe-backed payments for ArtisanOS.
4
7
 
5
8
  Files included:
@@ -0,0 +1,7 @@
1
+ import { AppBlueprintSpec } from "@lssm/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"}
package/dist/blueprint.js CHANGED
@@ -1 +1,66 @@
1
- import{OwnersEnum as e,StabilityEnum as t,TagsEnum as n}from"@lssm/lib.contracts/ownership";const r={meta:{name:`artisan.payments.stripe`,version:1,appId:`artisan`,title:`ArtisanOS Stripe Payments`,description:`Blueprint enabling card payments for ArtisanOS merchants via the Stripe integration.`,domain:`payments`,owners:[e.ProductArtisanos],tags:[n.Marketplace,`stripe`,`payments`],stability:t.Experimental},capabilities:{enabled:[{key:`payments.psp`,version:1}]},integrationSlots:[{slotId:`primary-payments`,requiredCategory:`payments`,allowedModes:[`managed`,`byok`],requiredCapabilities:[{key:`payments.psp`,version:1}],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:{name:`artisan.payments.catalog`,version:1},workflows:{collectPayment:{name:`artisan.payments.collectPayment`,version:1}},policies:[{name:`artisan.payments.default`,version:1}],notes:`Install this blueprint and pair it with the Stripe integration connection to enable card collection.`};export{r as artisanStripeBlueprint};
1
+ import { OwnersEnum, StabilityEnum, TagsEnum } from "@lssm/lib.contracts/ownership";
2
+
3
+ //#region src/blueprint.ts
4
+ const artisanStripeBlueprint = {
5
+ meta: {
6
+ key: "artisan.payments.stripe",
7
+ version: 1,
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
23
+ }] },
24
+ integrationSlots: [{
25
+ slotId: "primary-payments",
26
+ requiredCategory: "payments",
27
+ allowedModes: ["managed", "byok"],
28
+ requiredCapabilities: [{
29
+ key: "payments.psp",
30
+ version: 1
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
52
+ },
53
+ workflows: { collectPayment: {
54
+ key: "artisan.payments.collectPayment",
55
+ version: 1
56
+ } },
57
+ policies: [{
58
+ key: "artisan.payments.default",
59
+ version: 1
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":["artisanStripeBlueprint: AppBlueprintSpec"],"sources":["../src/blueprint.ts"],"sourcesContent":["import type { AppBlueprintSpec } from '@lssm/lib.contracts/app-config/spec';\nimport {\n OwnersEnum,\n StabilityEnum,\n TagsEnum,\n} from '@lssm/lib.contracts/ownership';\n\nexport const artisanStripeBlueprint: AppBlueprintSpec = {\n meta: {\n key: 'artisan.payments.stripe',\n version: 1,\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 }],\n },\n integrationSlots: [\n {\n slotId: 'primary-payments',\n requiredCategory: 'payments',\n allowedModes: ['managed', 'byok'],\n requiredCapabilities: [{ key: 'payments.psp', version: 1 }],\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,\n },\n workflows: {\n collectPayment: { key: 'artisan.payments.collectPayment', version: 1 },\n },\n policies: [{ key: 'artisan.payments.default', version: 1 }],\n notes:\n 'Install this blueprint and pair it with the Stripe integration connection to enable card collection.',\n};\n"],"mappings":";;;AAOA,MAAaA,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;EAAG,CAAC,EAC/C;CACD,kBAAkB,CAChB;EACE,QAAQ;EACR,kBAAkB;EAClB,cAAc,CAAC,WAAW,OAAO;EACjC,sBAAsB,CAAC;GAAE,KAAK;GAAgB,SAAS;GAAG,CAAC;EAC3D,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;EAAE,KAAK;EAAmC,SAAS;EAAG,EACvE;CACD,UAAU,CAAC;EAAE,KAAK;EAA4B,SAAS;EAAG,CAAC;CAC3D,OACE;CACH"}
@@ -0,0 +1,7 @@
1
+ import { IntegrationConnection } from "@lssm/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"}
@@ -1 +1,22 @@
1
- const e={meta:{id:`conn-stripe-live`,tenantId:`artisan-co`,integrationKey:`payments.stripe`,integrationVersion:1,label:`Stripe Production`,environment:`production`,createdAt:`2026-01-01T00:00:00.000Z`,updatedAt:`2026-01-01T00:00:00.000Z`},ownershipMode:`managed`,config:{accountId:`acct_xxx`},secretProvider:`vault`,secretRef:`vault://integrations/artisan-co/conn-stripe-live`,status:`connected`};export{e as stripeLiveConnection};
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":["stripeLiveConnection: IntegrationConnection"],"sources":["../src/connection.sample.ts"],"sourcesContent":["import type { IntegrationConnection } from '@lssm/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,MAAaA,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 { };
@@ -1 +1 @@
1
- import"./integration-stripe.docblock.js";
1
+ import "./integration-stripe.docblock.js";
@@ -0,0 +1 @@
1
+ export { };
@@ -1,15 +1,30 @@
1
- import{registerDocBlocks as e}from"@lssm/lib.contracts/docs";e([{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
- - App blueprint enabling \`payments.psp\` capability.
3
- - Workflow invoking Stripe operations (prepare → charge → confirm).
4
- - Tenant app config binding workflow to an IntegrationConnection.
1
+ import { registerDocBlocks } from "@lssm/lib.contracts/docs";
5
2
 
6
- ## Notes
7
- - Secrets live in secret providers; connection config is non-secret.
8
- - Use \`ctx.resolvedAppConfig\` in operation executors to access integrations, branding, and translations.`},{id:`docs.examples.integration-stripe.usage`,title:`Stripe Integration Example — Usage`,summary:`How to use the blueprint, workflow, and tenant config together.`,kind:`usage`,visibility:`public`,route:`/docs/examples/integration-stripe/usage`,tags:[`stripe`,`usage`],body:`## Usage
9
- 1) Register the blueprint + workflow + catalog in your registry.
10
- 2) Persist an IntegrationConnection (see connection sample).
11
- 3) Bind the tenant app config to the connection.
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
+ }]);
12
28
 
13
- ## Guardrails
14
- - Never log secrets.
15
- - Keep payment semantics spec-defined; gate breaking changes behind flags.`}]);
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 '@lssm/lib.contracts/docs';\nimport { registerDocBlocks } from '@lssm/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,34 @@
1
+ //#region src/example.d.ts
2
+ declare const example: {
3
+ readonly id: "integration-stripe";
4
+ readonly title: "Integration — Stripe Payments";
5
+ readonly summary: "Wire AppBlueprint + Workflow + TenantAppConfig to enable Stripe-backed payments (spec-first integration pattern).";
6
+ readonly tags: readonly ["stripe", "payments", "integration", "blueprint", "workflow"];
7
+ readonly kind: "integration";
8
+ readonly visibility: "public";
9
+ readonly docs: {
10
+ readonly rootDocId: "docs.examples.integration-stripe";
11
+ readonly usageDocId: "docs.examples.integration-stripe.usage";
12
+ };
13
+ readonly entrypoints: {
14
+ readonly packageName: "@lssm/example.integration-stripe";
15
+ readonly docs: "./docs";
16
+ };
17
+ readonly surfaces: {
18
+ readonly templates: true;
19
+ readonly sandbox: {
20
+ readonly enabled: true;
21
+ readonly modes: readonly ["markdown", "specs"];
22
+ };
23
+ readonly studio: {
24
+ readonly enabled: true;
25
+ readonly installable: true;
26
+ };
27
+ readonly mcp: {
28
+ readonly enabled: true;
29
+ };
30
+ };
31
+ };
32
+ //#endregion
33
+ export { example as default };
34
+ //# sourceMappingURL=example.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"example.d.ts","names":[],"sources":["../src/example.ts"],"sourcesContent":[],"mappings":";cAAM;EAAA,SAAA,EAsBI,EAAA,oBAAA"}
package/dist/example.js CHANGED
@@ -1 +1,40 @@
1
- var e={id:`integration-stripe`,title:`Integration — Stripe Payments`,summary:`Wire AppBlueprint + Workflow + TenantAppConfig to enable Stripe-backed payments (spec-first integration pattern).`,tags:[`stripe`,`payments`,`integration`,`blueprint`,`workflow`],kind:`integration`,visibility:`public`,docs:{rootDocId:`docs.examples.integration-stripe`,usageDocId:`docs.examples.integration-stripe.usage`},entrypoints:{packageName:`@lssm/example.integration-stripe`,docs:`./docs`},surfaces:{templates:!0,sandbox:{enabled:!0,modes:[`markdown`,`specs`]},studio:{enabled:!0,installable:!0},mcp:{enabled:!0}}};export{e as default};
1
+ //#region src/example.ts
2
+ const example = {
3
+ id: "integration-stripe",
4
+ title: "Integration — Stripe Payments",
5
+ summary: "Wire AppBlueprint + Workflow + TenantAppConfig to enable Stripe-backed payments (spec-first integration pattern).",
6
+ tags: [
7
+ "stripe",
8
+ "payments",
9
+ "integration",
10
+ "blueprint",
11
+ "workflow"
12
+ ],
13
+ kind: "integration",
14
+ visibility: "public",
15
+ docs: {
16
+ rootDocId: "docs.examples.integration-stripe",
17
+ usageDocId: "docs.examples.integration-stripe.usage"
18
+ },
19
+ entrypoints: {
20
+ packageName: "@lssm/example.integration-stripe",
21
+ docs: "./docs"
22
+ },
23
+ surfaces: {
24
+ templates: true,
25
+ sandbox: {
26
+ enabled: true,
27
+ modes: ["markdown", "specs"]
28
+ },
29
+ studio: {
30
+ enabled: true,
31
+ installable: true
32
+ },
33
+ mcp: { enabled: true }
34
+ }
35
+ };
36
+ var example_default = example;
37
+
38
+ //#endregion
39
+ export { example_default as default };
40
+ //# sourceMappingURL=example.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"example.js","names":[],"sources":["../src/example.ts"],"sourcesContent":["const example = {\n id: 'integration-stripe',\n title: 'Integration — Stripe Payments',\n summary:\n 'Wire AppBlueprint + Workflow + TenantAppConfig to enable Stripe-backed payments (spec-first integration pattern).',\n tags: ['stripe', 'payments', 'integration', 'blueprint', 'workflow'],\n kind: 'integration',\n visibility: 'public',\n docs: {\n rootDocId: 'docs.examples.integration-stripe',\n usageDocId: 'docs.examples.integration-stripe.usage',\n },\n entrypoints: {\n packageName: '@lssm/example.integration-stripe',\n docs: './docs',\n },\n surfaces: {\n templates: true,\n sandbox: { enabled: true, modes: ['markdown', 'specs'] },\n studio: { enabled: true, installable: true },\n mcp: { enabled: true },\n },\n} as const;\n\nexport default example;\n"],"mappings":";AAAA,MAAM,UAAU;CACd,IAAI;CACJ,OAAO;CACP,SACE;CACF,MAAM;EAAC;EAAU;EAAY;EAAe;EAAa;EAAW;CACpE,MAAM;CACN,YAAY;CACZ,MAAM;EACJ,WAAW;EACX,YAAY;EACb;CACD,aAAa;EACX,aAAa;EACb,MAAM;EACP;CACD,UAAU;EACR,WAAW;EACX,SAAS;GAAE,SAAS;GAAM,OAAO,CAAC,YAAY,QAAQ;GAAE;EACxD,QAAQ;GAAE,SAAS;GAAM,aAAa;GAAM;EAC5C,KAAK,EAAE,SAAS,MAAM;EACvB;CACF;AAED,sBAAe"}
@@ -0,0 +1,6 @@
1
+ import { artisanStripeBlueprint } from "./blueprint.js";
2
+ import { stripeLiveConnection } from "./connection.sample.js";
3
+ import example from "./example.js";
4
+ import { collectPaymentWorkflow } from "./workflow.js";
5
+ import { artisanStripeTenantConfig } from "./tenant.js";
6
+ export { artisanStripeBlueprint, artisanStripeTenantConfig, collectPaymentWorkflow, example, stripeLiveConnection };
package/dist/index.js CHANGED
@@ -1 +1,8 @@
1
- import{artisanStripeBlueprint as e}from"./blueprint.js";import{stripeLiveConnection as t}from"./connection.sample.js";import n from"./example.js";import{collectPaymentWorkflow as r}from"./workflow.js";import{artisanStripeTenantConfig as i}from"./tenant.js";import"./docs/index.js";export{e as artisanStripeBlueprint,i as artisanStripeTenantConfig,r as collectPaymentWorkflow,n as example,t as stripeLiveConnection};
1
+ import { artisanStripeBlueprint } from "./blueprint.js";
2
+ import { stripeLiveConnection } from "./connection.sample.js";
3
+ import example_default from "./example.js";
4
+ import { collectPaymentWorkflow } from "./workflow.js";
5
+ import { artisanStripeTenantConfig } from "./tenant.js";
6
+ import "./docs/index.js";
7
+
8
+ export { artisanStripeBlueprint, artisanStripeTenantConfig, collectPaymentWorkflow, example_default as example, stripeLiveConnection };
@@ -0,0 +1,7 @@
1
+ import { TenantAppConfig } from "@lssm/lib.contracts/app-config/spec";
2
+
3
+ //#region src/tenant.d.ts
4
+ declare const artisanStripeTenantConfig: TenantAppConfig;
5
+ //#endregion
6
+ export { artisanStripeTenantConfig };
7
+ //# sourceMappingURL=tenant.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tenant.d.ts","names":[],"sources":["../src/tenant.ts"],"sourcesContent":[],"mappings":";;;cAEa,2BAA2B"}
package/dist/tenant.js CHANGED
@@ -1 +1,53 @@
1
- const e={meta:{id:`tenant-config-artisan-stripe`,tenantId:`artisan-co`,appId:`artisan`,blueprintName:`artisan.payments.stripe`,blueprintVersion:1,environment:`production`,version:1,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{e as artisanStripeTenantConfig};
1
+ //#region src/tenant.ts
2
+ const artisanStripeTenantConfig = {
3
+ meta: {
4
+ id: "tenant-config-artisan-stripe",
5
+ tenantId: "artisan-co",
6
+ appId: "artisan",
7
+ blueprintName: "artisan.payments.stripe",
8
+ blueprintVersion: 1,
9
+ environment: "production",
10
+ version: 1,
11
+ status: "published",
12
+ createdAt: (/* @__PURE__ */ new Date()).toISOString(),
13
+ updatedAt: (/* @__PURE__ */ new Date()).toISOString()
14
+ },
15
+ integrations: [{
16
+ slotId: "primary-payments",
17
+ connectionId: "conn-stripe-live",
18
+ scope: {
19
+ workflows: ["collectPayment"],
20
+ operations: ["payments.stripe.chargeCard"]
21
+ }
22
+ }],
23
+ knowledge: [],
24
+ locales: {
25
+ defaultLocale: "en",
26
+ enabledLocales: ["en", "fr"]
27
+ },
28
+ translationOverrides: { entries: [{
29
+ key: "artisan.payments.appName",
30
+ locale: "en",
31
+ value: "Artisan Payments Portal"
32
+ }] },
33
+ branding: {
34
+ appName: { en: "Artisan Payments Portal" },
35
+ assets: [{
36
+ type: "logo",
37
+ url: "https://tenant.artisanos.dev/logo.png"
38
+ }, {
39
+ type: "logo-dark",
40
+ url: "https://tenant.artisanos.dev/logo-dark.png"
41
+ }],
42
+ colors: {
43
+ primary: "#F97316",
44
+ secondary: "#1F2937"
45
+ },
46
+ customDomain: "pay.artisanos.dev"
47
+ },
48
+ notes: "Stripe connection bound for production payments."
49
+ };
50
+
51
+ //#endregion
52
+ export { artisanStripeTenantConfig };
53
+ //# sourceMappingURL=tenant.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tenant.js","names":["artisanStripeTenantConfig: TenantAppConfig"],"sources":["../src/tenant.ts"],"sourcesContent":["import type { TenantAppConfig } from '@lssm/lib.contracts/app-config/spec';\n\nexport const artisanStripeTenantConfig: TenantAppConfig = {\n meta: {\n id: 'tenant-config-artisan-stripe',\n tenantId: 'artisan-co',\n appId: 'artisan',\n blueprintName: 'artisan.payments.stripe',\n blueprintVersion: 1,\n environment: 'production',\n version: 1,\n status: 'published',\n createdAt: new Date().toISOString(),\n updatedAt: new Date().toISOString(),\n },\n integrations: [\n {\n slotId: 'primary-payments',\n connectionId: 'conn-stripe-live',\n scope: {\n workflows: ['collectPayment'],\n operations: ['payments.stripe.chargeCard'],\n },\n },\n ],\n knowledge: [],\n locales: {\n defaultLocale: 'en',\n enabledLocales: ['en', 'fr'],\n },\n translationOverrides: {\n entries: [\n {\n key: 'artisan.payments.appName',\n locale: 'en',\n value: 'Artisan Payments Portal',\n },\n ],\n },\n branding: {\n appName: { en: 'Artisan Payments Portal' },\n assets: [\n { type: 'logo', url: 'https://tenant.artisanos.dev/logo.png' },\n { type: 'logo-dark', url: 'https://tenant.artisanos.dev/logo-dark.png' },\n ],\n colors: {\n primary: '#F97316',\n secondary: '#1F2937',\n },\n customDomain: 'pay.artisanos.dev',\n },\n notes: 'Stripe connection bound for production payments.',\n};\n"],"mappings":";AAEA,MAAaA,4BAA6C;CACxD,MAAM;EACJ,IAAI;EACJ,UAAU;EACV,OAAO;EACP,eAAe;EACf,kBAAkB;EAClB,aAAa;EACb,SAAS;EACT,QAAQ;EACR,4BAAW,IAAI,MAAM,EAAC,aAAa;EACnC,4BAAW,IAAI,MAAM,EAAC,aAAa;EACpC;CACD,cAAc,CACZ;EACE,QAAQ;EACR,cAAc;EACd,OAAO;GACL,WAAW,CAAC,iBAAiB;GAC7B,YAAY,CAAC,6BAA6B;GAC3C;EACF,CACF;CACD,WAAW,EAAE;CACb,SAAS;EACP,eAAe;EACf,gBAAgB,CAAC,MAAM,KAAK;EAC7B;CACD,sBAAsB,EACpB,SAAS,CACP;EACE,KAAK;EACL,QAAQ;EACR,OAAO;EACR,CACF,EACF;CACD,UAAU;EACR,SAAS,EAAE,IAAI,2BAA2B;EAC1C,QAAQ,CACN;GAAE,MAAM;GAAQ,KAAK;GAAyC,EAC9D;GAAE,MAAM;GAAa,KAAK;GAA8C,CACzE;EACD,QAAQ;GACN,SAAS;GACT,WAAW;GACZ;EACD,cAAc;EACf;CACD,OAAO;CACR"}
@@ -0,0 +1,7 @@
1
+ import { WorkflowSpec } from "@lssm/lib.contracts/workflow/spec";
2
+
3
+ //#region src/workflow.d.ts
4
+ declare const collectPaymentWorkflow: WorkflowSpec;
5
+ //#endregion
6
+ export { collectPaymentWorkflow };
7
+ //# sourceMappingURL=workflow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow.d.ts","names":[],"sources":["../src/workflow.ts"],"sourcesContent":[],"mappings":";;;cAOa,wBAAwB"}
package/dist/workflow.js CHANGED
@@ -1 +1,59 @@
1
- import{OwnersEnum as e,StabilityEnum as t,TagsEnum as n}from"@lssm/lib.contracts/ownership";const r={meta:{name:`artisan.payments.collectPayment`,version:1,title:`Collect Card Payment`,description:`Charge a customer using the tenant Stripe connection and record settlement details.`,domain:`payments`,owners:[e.ProductArtisanos],tags:[n.Marketplace,`stripe`],stability:t.Experimental},definition:{entryStepId:`prepare`,steps:[{id:`prepare`,type:`automation`,label:`Prepare charge parameters`,action:{operation:{name:`payments.prepareCharge`,version:1}}},{id:`charge`,type:`automation`,label:`Charge card via Stripe`,action:{operation:{name:`payments.stripe.chargeCard`,version:1}}},{id:`confirm`,type:`automation`,label:`Confirm settlement`,action:{operation:{name:`payments.recordSettlement`,version:1}}}],transitions:[{from:`prepare`,to:`charge`},{from:`charge`,to:`confirm`,condition:`output.success === true`}]}};export{r as collectPaymentWorkflow};
1
+ import { OwnersEnum, StabilityEnum, TagsEnum } from "@lssm/lib.contracts/ownership";
2
+
3
+ //#region src/workflow.ts
4
+ const collectPaymentWorkflow = {
5
+ meta: {
6
+ key: "artisan.payments.collectPayment",
7
+ version: 1,
8
+ title: "Collect Card Payment",
9
+ description: "Charge a customer using the tenant Stripe connection and record settlement details.",
10
+ domain: "payments",
11
+ owners: [OwnersEnum.PlatformCore],
12
+ tags: [TagsEnum.Marketplace, "stripe"],
13
+ stability: StabilityEnum.Experimental
14
+ },
15
+ definition: {
16
+ entryStepId: "prepare",
17
+ steps: [
18
+ {
19
+ id: "prepare",
20
+ type: "automation",
21
+ label: "Prepare charge parameters",
22
+ action: { operation: {
23
+ key: "payments.prepareCharge",
24
+ version: 1
25
+ } }
26
+ },
27
+ {
28
+ id: "charge",
29
+ type: "automation",
30
+ label: "Charge card via Stripe",
31
+ action: { operation: {
32
+ key: "payments.stripe.chargeCard",
33
+ version: 1
34
+ } }
35
+ },
36
+ {
37
+ id: "confirm",
38
+ type: "automation",
39
+ label: "Confirm settlement",
40
+ action: { operation: {
41
+ key: "payments.recordSettlement",
42
+ version: 1
43
+ } }
44
+ }
45
+ ],
46
+ transitions: [{
47
+ from: "prepare",
48
+ to: "charge"
49
+ }, {
50
+ from: "charge",
51
+ to: "confirm",
52
+ condition: "output.success === true"
53
+ }]
54
+ }
55
+ };
56
+
57
+ //#endregion
58
+ export { collectPaymentWorkflow };
59
+ //# sourceMappingURL=workflow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow.js","names":["collectPaymentWorkflow: WorkflowSpec"],"sources":["../src/workflow.ts"],"sourcesContent":["import type { WorkflowSpec } from '@lssm/lib.contracts/workflow/spec';\nimport {\n OwnersEnum,\n StabilityEnum,\n TagsEnum,\n} from '@lssm/lib.contracts/ownership';\n\nexport const collectPaymentWorkflow: WorkflowSpec = {\n meta: {\n key: 'artisan.payments.collectPayment',\n version: 1,\n title: 'Collect Card Payment',\n description:\n 'Charge a customer using the tenant Stripe connection and record settlement details.',\n domain: 'payments',\n owners: [OwnersEnum.PlatformCore],\n tags: [TagsEnum.Marketplace, 'stripe'],\n stability: StabilityEnum.Experimental,\n },\n definition: {\n entryStepId: 'prepare',\n steps: [\n {\n id: 'prepare',\n type: 'automation',\n label: 'Prepare charge parameters',\n action: {\n operation: { key: 'payments.prepareCharge', version: 1 },\n },\n },\n {\n id: 'charge',\n type: 'automation',\n label: 'Charge card via Stripe',\n action: {\n operation: { key: 'payments.stripe.chargeCard', version: 1 },\n },\n },\n {\n id: 'confirm',\n type: 'automation',\n label: 'Confirm settlement',\n action: {\n operation: { key: 'payments.recordSettlement', version: 1 },\n },\n },\n ],\n transitions: [\n { from: 'prepare', to: 'charge' },\n { from: 'charge', to: 'confirm', condition: 'output.success === true' },\n ],\n },\n};\n"],"mappings":";;;AAOA,MAAaA,yBAAuC;CAClD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,OAAO;EACP,aACE;EACF,QAAQ;EACR,QAAQ,CAAC,WAAW,aAAa;EACjC,MAAM,CAAC,SAAS,aAAa,SAAS;EACtC,WAAW,cAAc;EAC1B;CACD,YAAY;EACV,aAAa;EACb,OAAO;GACL;IACE,IAAI;IACJ,MAAM;IACN,OAAO;IACP,QAAQ,EACN,WAAW;KAAE,KAAK;KAA0B,SAAS;KAAG,EACzD;IACF;GACD;IACE,IAAI;IACJ,MAAM;IACN,OAAO;IACP,QAAQ,EACN,WAAW;KAAE,KAAK;KAA8B,SAAS;KAAG,EAC7D;IACF;GACD;IACE,IAAI;IACJ,MAAM;IACN,OAAO;IACP,QAAQ,EACN,WAAW;KAAE,KAAK;KAA6B,SAAS;KAAG,EAC5D;IACF;GACF;EACD,aAAa,CACX;GAAE,MAAM;GAAW,IAAI;GAAU,EACjC;GAAE,MAAM;GAAU,IAAI;GAAW,WAAW;GAA2B,CACxE;EACF;CACF"}