@contractspec/example.integration-stripe 3.7.6 → 3.7.10

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 (41) hide show
  1. package/.turbo/turbo-build.log +36 -33
  2. package/AGENTS.md +44 -21
  3. package/CHANGELOG.md +24 -0
  4. package/README.md +66 -19
  5. package/dist/blueprint.d.ts +1 -2
  6. package/dist/blueprint.js +62 -9
  7. package/dist/browser/blueprint.js +62 -9
  8. package/dist/browser/connection.sample.js +78 -2
  9. package/dist/browser/index.js +168 -83
  10. package/dist/browser/integration-stripe.feature.js +139 -3
  11. package/dist/browser/integration.js +78 -0
  12. package/dist/browser/workflow.js +4 -3
  13. package/dist/connection.sample.js +78 -2
  14. package/dist/contracts.test.d.ts +1 -0
  15. package/dist/index.d.ts +4 -3
  16. package/dist/index.js +168 -83
  17. package/dist/integration-stripe.feature.js +139 -3
  18. package/dist/integration.d.ts +1 -0
  19. package/dist/integration.js +79 -0
  20. package/dist/node/blueprint.js +62 -9
  21. package/dist/node/connection.sample.js +78 -2
  22. package/dist/node/index.js +168 -83
  23. package/dist/node/integration-stripe.feature.js +139 -3
  24. package/dist/node/integration.js +78 -0
  25. package/dist/node/workflow.js +4 -3
  26. package/dist/workflow.d.ts +1 -2
  27. package/dist/workflow.js +4 -3
  28. package/package.json +22 -8
  29. package/src/blueprint.ts +59 -59
  30. package/src/connection.sample.ts +18 -17
  31. package/src/contracts.test.ts +34 -0
  32. package/src/docs/integration-stripe.docblock.ts +21 -21
  33. package/src/example.ts +26 -26
  34. package/src/index.ts +4 -3
  35. package/src/integration-stripe.feature.ts +29 -21
  36. package/src/integration.ts +79 -0
  37. package/src/tenant.ts +49 -49
  38. package/src/workflow.ts +50 -50
  39. package/translation.catalog.json +18 -19
  40. package/tsconfig.json +7 -9
  41. package/tsdown.config.js +1 -1
package/src/workflow.ts CHANGED
@@ -1,53 +1,53 @@
1
- import type { WorkflowSpec } from '@contractspec/lib.contracts-spec/workflow/spec';
2
1
  import {
3
- OwnersEnum,
4
- StabilityEnum,
5
- TagsEnum,
2
+ OwnersEnum,
3
+ StabilityEnum,
4
+ TagsEnum,
6
5
  } from '@contractspec/lib.contracts-spec/ownership';
6
+ import { defineWorkflow } from '@contractspec/lib.contracts-spec/workflow';
7
7
 
8
- export const collectPaymentWorkflow: WorkflowSpec = {
9
- meta: {
10
- key: 'artisan.payments.collectPayment',
11
- version: '1.0.0',
12
- title: 'Collect Card Payment',
13
- description:
14
- 'Charge a customer using the tenant Stripe connection and record settlement details.',
15
- domain: 'payments',
16
- owners: [OwnersEnum.PlatformCore],
17
- tags: [TagsEnum.Marketplace, 'stripe'],
18
- stability: StabilityEnum.Experimental,
19
- },
20
- definition: {
21
- entryStepId: 'prepare',
22
- steps: [
23
- {
24
- id: 'prepare',
25
- type: 'automation',
26
- label: 'Prepare charge parameters',
27
- action: {
28
- operation: { key: 'payments.prepareCharge', version: '1.0.0' },
29
- },
30
- },
31
- {
32
- id: 'charge',
33
- type: 'automation',
34
- label: 'Charge card via Stripe',
35
- action: {
36
- operation: { key: 'payments.stripe.chargeCard', version: '1.0.0' },
37
- },
38
- },
39
- {
40
- id: 'confirm',
41
- type: 'automation',
42
- label: 'Confirm settlement',
43
- action: {
44
- operation: { key: 'payments.recordSettlement', version: '1.0.0' },
45
- },
46
- },
47
- ],
48
- transitions: [
49
- { from: 'prepare', to: 'charge' },
50
- { from: 'charge', to: 'confirm', condition: 'output.success === true' },
51
- ],
52
- },
53
- };
8
+ export const collectPaymentWorkflow = defineWorkflow({
9
+ meta: {
10
+ key: 'integration-stripe.workflow.payment',
11
+ version: '1.0.0',
12
+ title: 'Collect Card Payment',
13
+ description:
14
+ 'Charge a customer using the tenant Stripe connection and record settlement details.',
15
+ domain: 'payments',
16
+ owners: [OwnersEnum.PlatformCore],
17
+ tags: [TagsEnum.Marketplace, 'stripe'],
18
+ stability: StabilityEnum.Experimental,
19
+ },
20
+ definition: {
21
+ entryStepId: 'prepare',
22
+ steps: [
23
+ {
24
+ id: 'prepare',
25
+ type: 'automation',
26
+ label: 'Prepare charge parameters',
27
+ action: {
28
+ operation: { key: 'payments.prepareCharge', version: '1.0.0' },
29
+ },
30
+ },
31
+ {
32
+ id: 'charge',
33
+ type: 'automation',
34
+ label: 'Charge card via Stripe',
35
+ action: {
36
+ operation: { key: 'payments.stripe.chargeCard', version: '1.0.0' },
37
+ },
38
+ },
39
+ {
40
+ id: 'confirm',
41
+ type: 'automation',
42
+ label: 'Confirm settlement',
43
+ action: {
44
+ operation: { key: 'payments.recordSettlement', version: '1.0.0' },
45
+ },
46
+ },
47
+ ],
48
+ transitions: [
49
+ { from: 'prepare', to: 'charge' },
50
+ { from: 'charge', to: 'confirm', condition: 'output.success === true' },
51
+ ],
52
+ },
53
+ });
@@ -1,21 +1,20 @@
1
1
  {
2
- "meta": {
3
- "name": "artisan.payments.catalog",
4
- "version": 1
5
- },
6
- "defaultLocale": "en",
7
- "supportedLocales": ["en", "fr"],
8
- "entries": [
9
- {
10
- "key": "artisan.payments.appName",
11
- "locale": "en",
12
- "value": "Artisan Payments Portal"
13
- },
14
- {
15
- "key": "artisan.payments.appName",
16
- "locale": "fr",
17
- "value": "Portail de paiement Artisan"
18
- }
19
- ]
2
+ "meta": {
3
+ "name": "artisan.payments.catalog",
4
+ "version": 1
5
+ },
6
+ "defaultLocale": "en",
7
+ "supportedLocales": ["en", "fr"],
8
+ "entries": [
9
+ {
10
+ "key": "artisan.payments.appName",
11
+ "locale": "en",
12
+ "value": "Artisan Payments Portal"
13
+ },
14
+ {
15
+ "key": "artisan.payments.appName",
16
+ "locale": "fr",
17
+ "value": "Portail de paiement Artisan"
18
+ }
19
+ ]
20
20
  }
21
-
package/tsconfig.json CHANGED
@@ -1,11 +1,9 @@
1
1
  {
2
- "extends": "@contractspec/tool.typescript/react-library.json",
3
- "include": ["src"],
4
- "exclude": ["node_modules", "dist"],
5
- "compilerOptions": {
6
- "rootDir": "src",
7
- "outDir": "dist"
8
- }
2
+ "extends": "@contractspec/tool.typescript/react-library.json",
3
+ "include": ["src"],
4
+ "exclude": ["node_modules", "dist"],
5
+ "compilerOptions": {
6
+ "rootDir": "src",
7
+ "outDir": "dist"
8
+ }
9
9
  }
10
-
11
-
package/tsdown.config.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineConfig, moduleLibrary } from '@contractspec/tool.bun';
2
2
 
3
3
  export default defineConfig(() => ({
4
- ...moduleLibrary,
4
+ ...moduleLibrary,
5
5
  }));