@contractspec/example.openbanking-powens 3.7.7 → 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.
@@ -2,26 +2,30 @@ $ contractspec-bun-build prebuild
2
2
  $ bun run prebuild && bun run build:bundle && bun run build:types
3
3
  $ contractspec-bun-build prebuild
4
4
  $ contractspec-bun-build transpile
5
- [contractspec-bun-build] transpile target=bun root=src entries=7 noBundle=false
6
- Bundled 7 modules in 15ms
5
+ [contractspec-bun-build] transpile target=bun root=src entries=9 noBundle=false
6
+ Bundled 9 modules in 15ms
7
7
 
8
- docs/index.js 1.58 KB (entry point)
9
- ./index.js 8.80 KB (entry point)
10
- docs/openbanking-powens.docblock.js 1.58 KB (entry point)
11
- ./example.js 1.0 KB (entry point)
12
- handlers/oauth-callback.js 2.26 KB (entry point)
13
- handlers/webhook-handler.js 3.22 KB (entry point)
14
- ./openbanking-powens.feature.js 0.72 KB (entry point)
8
+ docs/index.js 1.58 KB (entry point)
9
+ ./index.js 10.38 KB (entry point)
10
+ ./openbanking-powens.feature.js 0.72 KB (entry point)
11
+ docs/openbanking-powens.docblock.js 1.58 KB (entry point)
12
+ ./example.js 1.0 KB (entry point)
13
+ handlers/oauth-callback.js 2.26 KB (entry point)
14
+ handlers/webhook-handler.js 3.22 KB (entry point)
15
+ jobs/index.js 1.60 KB (entry point)
16
+ jobs/powens-sync-dispatch.job.js 1.60 KB (entry point)
15
17
 
16
- [contractspec-bun-build] transpile target=node root=src entries=7 noBundle=false
17
- Bundled 7 modules in 27ms
18
+ [contractspec-bun-build] transpile target=node root=src entries=9 noBundle=false
19
+ Bundled 9 modules in 31ms
18
20
 
19
- docs/index.js 1.56 KB (entry point)
20
- ./index.js 8.78 KB (entry point)
21
- docs/openbanking-powens.docblock.js 1.56 KB (entry point)
22
- ./example.js 1.0 KB (entry point)
23
- handlers/oauth-callback.js 2.26 KB (entry point)
24
- handlers/webhook-handler.js 3.21 KB (entry point)
25
- ./openbanking-powens.feature.js 0.72 KB (entry point)
21
+ docs/index.js 1.56 KB (entry point)
22
+ ./index.js 10.36 KB (entry point)
23
+ ./openbanking-powens.feature.js 0.72 KB (entry point)
24
+ docs/openbanking-powens.docblock.js 1.56 KB (entry point)
25
+ ./example.js 1.0 KB (entry point)
26
+ handlers/oauth-callback.js 2.26 KB (entry point)
27
+ handlers/webhook-handler.js 3.21 KB (entry point)
28
+ jobs/index.js 1.59 KB (entry point)
29
+ jobs/powens-sync-dispatch.job.js 1.59 KB (entry point)
26
30
 
27
31
  $ contractspec-bun-build types
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @contractspec/example.openbanking-powens
2
2
 
3
+ ## 3.7.10
4
+
5
+ ### Patch Changes
6
+
7
+ - 1a44cb6: feat: improve examples to increase coverage of Contracts type
8
+ - Updated dependencies [1a44cb6]
9
+ - @contractspec/integration.providers-impls@3.8.2
10
+ - @contractspec/lib.contracts-spec@4.1.2
11
+
12
+ ## 3.7.9
13
+
14
+ ### Patch Changes
15
+
16
+ - fix: release
17
+ - Updated dependencies
18
+ - @contractspec/integration.providers-impls@3.8.1
19
+ - @contractspec/lib.contracts-spec@4.1.1
20
+
3
21
  ## 3.7.6
4
22
 
5
23
  ### Patch Changes
@@ -383,6 +401,7 @@
383
401
  - 7f3203a: fix: make workspace test runs resilient when packages have no tests
384
402
 
385
403
  Updates package test scripts to pass cleanly when no matching test files exist:
404
+
386
405
  - Uses `bun test --pass-with-no-tests` in Bun-based packages that currently ship without test files.
387
406
  - Uses `jest --passWithNoTests` for the UI kit web package.
388
407
  - Adds `.vscode-test.mjs` for `vscode-contractspec` so VS Code extension test runs have an explicit config and stop failing on missing default configuration.
@@ -717,14 +736,17 @@
717
736
  feat: Contract layers support (features, examples, app-configs)
718
737
 
719
738
  ### New CLI Commands
739
+
720
740
  - `contractspec list layers` - List all contract layers with filtering
721
741
 
722
742
  ### Enhanced Commands
743
+
723
744
  - `contractspec ci` - New `layers` check category validates features/examples/config
724
745
  - `contractspec doctor` - New `layers` health checks
725
746
  - `contractspec integrity` - Now shows layer statistics
726
747
 
727
748
  ### New APIs
749
+
728
750
  - `discoverLayers()` - Scan workspace for all layer files
729
751
  - `scanExampleSource()` - Parse ExampleSpec from source code
730
752
  - `isExampleFile()` - Check if file is an example spec
package/README.md CHANGED
@@ -8,10 +8,10 @@ Website: https://contractspec.io
8
8
 
9
9
  - OAuth callback handler pattern for open banking.
10
10
  - Webhook handler for asynchronous bank event ingestion.
11
+ - Canonical `job` export via `PowensSyncDispatchJob`.
11
12
  - Provider integration via contracts-integrations.
12
13
  - `src/docs/` contains docblocks and documentation-facing exports.
13
14
  - `src/handlers/` contains handlers or demo adapters wired to contract surfaces.
14
- - `src/docs/` contains docblocks and documentation-facing exports.
15
15
 
16
16
  ## Running Locally
17
17
 
@@ -31,6 +31,7 @@ Use `@contractspec/example.openbanking-powens` as a reference implementation, or
31
31
  - `src/example.ts` is the runnable example entrypoint.
32
32
  - `src/handlers/` contains handlers or demo adapters wired to contract surfaces.
33
33
  - `src/index.ts` is the root public barrel and package entrypoint.
34
+ - `src/jobs/` contains the exported Powens dispatch job spec.
34
35
  - `src/openbanking-powens.feature.ts` defines a feature entrypoint.
35
36
 
36
37
  ## Public Entry Points
@@ -41,7 +42,10 @@ Use `@contractspec/example.openbanking-powens` as a reference implementation, or
41
42
  - Export `./example` resolves through `./src/example.ts`.
42
43
  - Export `./handlers/oauth-callback` resolves through `./src/handlers/oauth-callback.ts`.
43
44
  - Export `./handlers/webhook-handler` resolves through `./src/handlers/webhook-handler.ts`.
45
+ - Export `./jobs` resolves through `./src/jobs/index.ts`.
46
+ - Export `./jobs/powens-sync-dispatch.job` resolves through `./src/jobs/powens-sync-dispatch.job.ts`.
44
47
  - Export `./openbanking-powens.feature` resolves through `./src/openbanking-powens.feature.ts`.
48
+ - The package publishes 8 total export subpaths; keep docs aligned with `package.json`.
45
49
 
46
50
  ## Local Commands
47
51
 
@@ -0,0 +1 @@
1
+ export {};
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export { default as example } from './example';
2
2
  export * from './handlers/oauth-callback';
3
3
  export * from './handlers/webhook-handler';
4
+ export * from './jobs';
4
5
  export * from './openbanking-powens.feature';
5
6
  import './docs';
package/dist/index.js CHANGED
@@ -223,6 +223,47 @@ var fakeTelemetryLogger = {
223
223
  record: async (_payload) => {}
224
224
  };
225
225
 
226
+ // src/jobs/powens-sync-dispatch.job.ts
227
+ import { defineJob } from "@contractspec/lib.contracts-spec/jobs/spec";
228
+ import {
229
+ OwnersEnum,
230
+ StabilityEnum
231
+ } from "@contractspec/lib.contracts-spec/ownership";
232
+ import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
233
+ var PowensSyncDispatchPayloadModel = defineSchemaModel({
234
+ name: "PowensSyncDispatchPayload",
235
+ description: "Payload enqueued from Powens OAuth callbacks or webhooks before dispatching sync workflows.",
236
+ fields: {
237
+ tenantId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
238
+ connectionId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
239
+ eventType: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
240
+ userUuid: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
241
+ accountUuid: { type: ScalarTypeEnum.String_unsecure(), isOptional: true }
242
+ }
243
+ });
244
+ var PowensSyncDispatchJob = defineJob({
245
+ meta: {
246
+ key: "openbanking-powens.job.sync-dispatch",
247
+ version: "1.0.0",
248
+ title: "Powens Sync Dispatch Job",
249
+ description: "Queues the canonical open banking sync workflows after Powens callbacks and webhooks are verified.",
250
+ domain: "open-banking",
251
+ owners: [OwnersEnum.PlatformFinance],
252
+ tags: ["openbanking", "powens", "job", "webhook"],
253
+ stability: StabilityEnum.Experimental
254
+ },
255
+ payload: {
256
+ schema: PowensSyncDispatchPayloadModel
257
+ },
258
+ retry: {
259
+ maxRetries: 5,
260
+ initialBackoffMs: 30000,
261
+ maxBackoffMs: 300000,
262
+ multiplier: 2,
263
+ jitter: true
264
+ },
265
+ timeoutMs: 60000
266
+ });
226
267
  // src/openbanking-powens.feature.ts
227
268
  import { defineFeature } from "@contractspec/lib.contracts-spec";
228
269
  var OpenbankingPowensFeature = defineFeature({
@@ -248,5 +289,6 @@ export {
248
289
  powensWebhookHandler,
249
290
  powensOAuthCallbackHandler,
250
291
  example_default as example,
292
+ PowensSyncDispatchJob,
251
293
  OpenbankingPowensFeature
252
294
  };
@@ -0,0 +1 @@
1
+ export * from './powens-sync-dispatch.job';
@@ -0,0 +1,45 @@
1
+ // @bun
2
+ // src/jobs/powens-sync-dispatch.job.ts
3
+ import { defineJob } from "@contractspec/lib.contracts-spec/jobs/spec";
4
+ import {
5
+ OwnersEnum,
6
+ StabilityEnum
7
+ } from "@contractspec/lib.contracts-spec/ownership";
8
+ import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
9
+ var PowensSyncDispatchPayloadModel = defineSchemaModel({
10
+ name: "PowensSyncDispatchPayload",
11
+ description: "Payload enqueued from Powens OAuth callbacks or webhooks before dispatching sync workflows.",
12
+ fields: {
13
+ tenantId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
14
+ connectionId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
15
+ eventType: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
16
+ userUuid: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
17
+ accountUuid: { type: ScalarTypeEnum.String_unsecure(), isOptional: true }
18
+ }
19
+ });
20
+ var PowensSyncDispatchJob = defineJob({
21
+ meta: {
22
+ key: "openbanking-powens.job.sync-dispatch",
23
+ version: "1.0.0",
24
+ title: "Powens Sync Dispatch Job",
25
+ description: "Queues the canonical open banking sync workflows after Powens callbacks and webhooks are verified.",
26
+ domain: "open-banking",
27
+ owners: [OwnersEnum.PlatformFinance],
28
+ tags: ["openbanking", "powens", "job", "webhook"],
29
+ stability: StabilityEnum.Experimental
30
+ },
31
+ payload: {
32
+ schema: PowensSyncDispatchPayloadModel
33
+ },
34
+ retry: {
35
+ maxRetries: 5,
36
+ initialBackoffMs: 30000,
37
+ maxBackoffMs: 300000,
38
+ multiplier: 2,
39
+ jitter: true
40
+ },
41
+ timeoutMs: 60000
42
+ });
43
+ export {
44
+ PowensSyncDispatchJob
45
+ };
@@ -0,0 +1 @@
1
+ export declare const PowensSyncDispatchJob: import("@contractspec/lib.contracts-spec/jobs/spec").JobSpec;
@@ -0,0 +1,45 @@
1
+ // @bun
2
+ // src/jobs/powens-sync-dispatch.job.ts
3
+ import { defineJob } from "@contractspec/lib.contracts-spec/jobs/spec";
4
+ import {
5
+ OwnersEnum,
6
+ StabilityEnum
7
+ } from "@contractspec/lib.contracts-spec/ownership";
8
+ import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
9
+ var PowensSyncDispatchPayloadModel = defineSchemaModel({
10
+ name: "PowensSyncDispatchPayload",
11
+ description: "Payload enqueued from Powens OAuth callbacks or webhooks before dispatching sync workflows.",
12
+ fields: {
13
+ tenantId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
14
+ connectionId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
15
+ eventType: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
16
+ userUuid: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
17
+ accountUuid: { type: ScalarTypeEnum.String_unsecure(), isOptional: true }
18
+ }
19
+ });
20
+ var PowensSyncDispatchJob = defineJob({
21
+ meta: {
22
+ key: "openbanking-powens.job.sync-dispatch",
23
+ version: "1.0.0",
24
+ title: "Powens Sync Dispatch Job",
25
+ description: "Queues the canonical open banking sync workflows after Powens callbacks and webhooks are verified.",
26
+ domain: "open-banking",
27
+ owners: [OwnersEnum.PlatformFinance],
28
+ tags: ["openbanking", "powens", "job", "webhook"],
29
+ stability: StabilityEnum.Experimental
30
+ },
31
+ payload: {
32
+ schema: PowensSyncDispatchPayloadModel
33
+ },
34
+ retry: {
35
+ maxRetries: 5,
36
+ initialBackoffMs: 30000,
37
+ maxBackoffMs: 300000,
38
+ multiplier: 2,
39
+ jitter: true
40
+ },
41
+ timeoutMs: 60000
42
+ });
43
+ export {
44
+ PowensSyncDispatchJob
45
+ };
@@ -222,6 +222,47 @@ var fakeTelemetryLogger = {
222
222
  record: async (_payload) => {}
223
223
  };
224
224
 
225
+ // src/jobs/powens-sync-dispatch.job.ts
226
+ import { defineJob } from "@contractspec/lib.contracts-spec/jobs/spec";
227
+ import {
228
+ OwnersEnum,
229
+ StabilityEnum
230
+ } from "@contractspec/lib.contracts-spec/ownership";
231
+ import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
232
+ var PowensSyncDispatchPayloadModel = defineSchemaModel({
233
+ name: "PowensSyncDispatchPayload",
234
+ description: "Payload enqueued from Powens OAuth callbacks or webhooks before dispatching sync workflows.",
235
+ fields: {
236
+ tenantId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
237
+ connectionId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
238
+ eventType: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
239
+ userUuid: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
240
+ accountUuid: { type: ScalarTypeEnum.String_unsecure(), isOptional: true }
241
+ }
242
+ });
243
+ var PowensSyncDispatchJob = defineJob({
244
+ meta: {
245
+ key: "openbanking-powens.job.sync-dispatch",
246
+ version: "1.0.0",
247
+ title: "Powens Sync Dispatch Job",
248
+ description: "Queues the canonical open banking sync workflows after Powens callbacks and webhooks are verified.",
249
+ domain: "open-banking",
250
+ owners: [OwnersEnum.PlatformFinance],
251
+ tags: ["openbanking", "powens", "job", "webhook"],
252
+ stability: StabilityEnum.Experimental
253
+ },
254
+ payload: {
255
+ schema: PowensSyncDispatchPayloadModel
256
+ },
257
+ retry: {
258
+ maxRetries: 5,
259
+ initialBackoffMs: 30000,
260
+ maxBackoffMs: 300000,
261
+ multiplier: 2,
262
+ jitter: true
263
+ },
264
+ timeoutMs: 60000
265
+ });
225
266
  // src/openbanking-powens.feature.ts
226
267
  import { defineFeature } from "@contractspec/lib.contracts-spec";
227
268
  var OpenbankingPowensFeature = defineFeature({
@@ -247,5 +288,6 @@ export {
247
288
  powensWebhookHandler,
248
289
  powensOAuthCallbackHandler,
249
290
  example_default as example,
291
+ PowensSyncDispatchJob,
250
292
  OpenbankingPowensFeature
251
293
  };
@@ -0,0 +1,44 @@
1
+ // src/jobs/powens-sync-dispatch.job.ts
2
+ import { defineJob } from "@contractspec/lib.contracts-spec/jobs/spec";
3
+ import {
4
+ OwnersEnum,
5
+ StabilityEnum
6
+ } from "@contractspec/lib.contracts-spec/ownership";
7
+ import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
8
+ var PowensSyncDispatchPayloadModel = defineSchemaModel({
9
+ name: "PowensSyncDispatchPayload",
10
+ description: "Payload enqueued from Powens OAuth callbacks or webhooks before dispatching sync workflows.",
11
+ fields: {
12
+ tenantId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
13
+ connectionId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
14
+ eventType: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
15
+ userUuid: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
16
+ accountUuid: { type: ScalarTypeEnum.String_unsecure(), isOptional: true }
17
+ }
18
+ });
19
+ var PowensSyncDispatchJob = defineJob({
20
+ meta: {
21
+ key: "openbanking-powens.job.sync-dispatch",
22
+ version: "1.0.0",
23
+ title: "Powens Sync Dispatch Job",
24
+ description: "Queues the canonical open banking sync workflows after Powens callbacks and webhooks are verified.",
25
+ domain: "open-banking",
26
+ owners: [OwnersEnum.PlatformFinance],
27
+ tags: ["openbanking", "powens", "job", "webhook"],
28
+ stability: StabilityEnum.Experimental
29
+ },
30
+ payload: {
31
+ schema: PowensSyncDispatchPayloadModel
32
+ },
33
+ retry: {
34
+ maxRetries: 5,
35
+ initialBackoffMs: 30000,
36
+ maxBackoffMs: 300000,
37
+ multiplier: 2,
38
+ jitter: true
39
+ },
40
+ timeoutMs: 60000
41
+ });
42
+ export {
43
+ PowensSyncDispatchJob
44
+ };
@@ -0,0 +1,44 @@
1
+ // src/jobs/powens-sync-dispatch.job.ts
2
+ import { defineJob } from "@contractspec/lib.contracts-spec/jobs/spec";
3
+ import {
4
+ OwnersEnum,
5
+ StabilityEnum
6
+ } from "@contractspec/lib.contracts-spec/ownership";
7
+ import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
8
+ var PowensSyncDispatchPayloadModel = defineSchemaModel({
9
+ name: "PowensSyncDispatchPayload",
10
+ description: "Payload enqueued from Powens OAuth callbacks or webhooks before dispatching sync workflows.",
11
+ fields: {
12
+ tenantId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
13
+ connectionId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
14
+ eventType: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
15
+ userUuid: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
16
+ accountUuid: { type: ScalarTypeEnum.String_unsecure(), isOptional: true }
17
+ }
18
+ });
19
+ var PowensSyncDispatchJob = defineJob({
20
+ meta: {
21
+ key: "openbanking-powens.job.sync-dispatch",
22
+ version: "1.0.0",
23
+ title: "Powens Sync Dispatch Job",
24
+ description: "Queues the canonical open banking sync workflows after Powens callbacks and webhooks are verified.",
25
+ domain: "open-banking",
26
+ owners: [OwnersEnum.PlatformFinance],
27
+ tags: ["openbanking", "powens", "job", "webhook"],
28
+ stability: StabilityEnum.Experimental
29
+ },
30
+ payload: {
31
+ schema: PowensSyncDispatchPayloadModel
32
+ },
33
+ retry: {
34
+ maxRetries: 5,
35
+ initialBackoffMs: 30000,
36
+ maxBackoffMs: 300000,
37
+ multiplier: 2,
38
+ jitter: true
39
+ },
40
+ timeoutMs: 60000
41
+ });
42
+ export {
43
+ PowensSyncDispatchJob
44
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contractspec/example.openbanking-powens",
3
- "version": "3.7.7",
3
+ "version": "3.7.10",
4
4
  "description": "OpenBanking Powens example: OAuth callback + webhook handler patterns (provider + workflows).",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",
@@ -41,6 +41,18 @@
41
41
  "node": "./dist/node/handlers/webhook-handler.js",
42
42
  "default": "./dist/handlers/webhook-handler.js"
43
43
  },
44
+ "./jobs": {
45
+ "types": "./dist/jobs/index.d.ts",
46
+ "bun": "./dist/jobs/index.js",
47
+ "node": "./dist/node/jobs/index.js",
48
+ "default": "./dist/jobs/index.js"
49
+ },
50
+ "./jobs/powens-sync-dispatch.job": {
51
+ "types": "./dist/jobs/powens-sync-dispatch.job.d.ts",
52
+ "bun": "./dist/jobs/powens-sync-dispatch.job.js",
53
+ "node": "./dist/node/jobs/powens-sync-dispatch.job.js",
54
+ "default": "./dist/jobs/powens-sync-dispatch.job.js"
55
+ },
44
56
  "./openbanking-powens.feature": {
45
57
  "types": "./dist/openbanking-powens.feature.d.ts",
46
58
  "bun": "./dist/openbanking-powens.feature.js",
@@ -64,13 +76,13 @@
64
76
  "typecheck": "tsc --noEmit"
65
77
  },
66
78
  "dependencies": {
67
- "@contractspec/integration.providers-impls": "3.7.7",
68
- "@contractspec/lib.contracts-spec": "4.0.0"
79
+ "@contractspec/integration.providers-impls": "3.8.2",
80
+ "@contractspec/lib.contracts-spec": "4.1.2"
69
81
  },
70
82
  "devDependencies": {
71
- "@contractspec/tool.typescript": "3.7.6",
83
+ "@contractspec/tool.typescript": "3.7.8",
72
84
  "typescript": "^5.9.3",
73
- "@contractspec/tool.bun": "3.7.6"
85
+ "@contractspec/tool.bun": "3.7.8"
74
86
  },
75
87
  "publishConfig": {
76
88
  "access": "public",
@@ -111,6 +123,18 @@
111
123
  "node": "./dist/node/handlers/webhook-handler.js",
112
124
  "default": "./dist/handlers/webhook-handler.js"
113
125
  },
126
+ "./jobs": {
127
+ "types": "./dist/jobs/index.d.ts",
128
+ "bun": "./dist/jobs/index.js",
129
+ "node": "./dist/node/jobs/index.js",
130
+ "default": "./dist/jobs/index.js"
131
+ },
132
+ "./jobs/powens-sync-dispatch.job": {
133
+ "types": "./dist/jobs/powens-sync-dispatch.job.d.ts",
134
+ "bun": "./dist/jobs/powens-sync-dispatch.job.js",
135
+ "node": "./dist/node/jobs/powens-sync-dispatch.job.js",
136
+ "default": "./dist/jobs/powens-sync-dispatch.job.js"
137
+ },
114
138
  "./openbanking-powens.feature": {
115
139
  "types": "./dist/openbanking-powens.feature.d.ts",
116
140
  "bun": "./dist/openbanking-powens.feature.js",
@@ -0,0 +1,12 @@
1
+ import { describe, expect, test } from 'bun:test';
2
+ import { OpenbankingPowensFeature, PowensSyncDispatchJob } from './index';
3
+
4
+ describe('@contractspec/example.openbanking-powens', () => {
5
+ test('exports the canonical job spec', () => {
6
+ expect(PowensSyncDispatchJob.meta.key).toBe(
7
+ 'openbanking-powens.job.sync-dispatch'
8
+ );
9
+ expect(PowensSyncDispatchJob.timeoutMs).toBe(60_000);
10
+ expect(OpenbankingPowensFeature.meta.key).toBe('openbanking-powens');
11
+ });
12
+ });
package/src/index.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export { default as example } from './example';
2
2
  export * from './handlers/oauth-callback';
3
3
  export * from './handlers/webhook-handler';
4
+ export * from './jobs';
4
5
  export * from './openbanking-powens.feature';
5
6
  import './docs';
@@ -0,0 +1 @@
1
+ export * from './powens-sync-dispatch.job';
@@ -0,0 +1,44 @@
1
+ import { defineJob } from '@contractspec/lib.contracts-spec/jobs/spec';
2
+ import {
3
+ OwnersEnum,
4
+ StabilityEnum,
5
+ } from '@contractspec/lib.contracts-spec/ownership';
6
+ import { defineSchemaModel, ScalarTypeEnum } from '@contractspec/lib.schema';
7
+
8
+ const PowensSyncDispatchPayloadModel = defineSchemaModel({
9
+ name: 'PowensSyncDispatchPayload',
10
+ description:
11
+ 'Payload enqueued from Powens OAuth callbacks or webhooks before dispatching sync workflows.',
12
+ fields: {
13
+ tenantId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
14
+ connectionId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
15
+ eventType: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
16
+ userUuid: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
17
+ accountUuid: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
18
+ },
19
+ });
20
+
21
+ export const PowensSyncDispatchJob = defineJob({
22
+ meta: {
23
+ key: 'openbanking-powens.job.sync-dispatch',
24
+ version: '1.0.0',
25
+ title: 'Powens Sync Dispatch Job',
26
+ description:
27
+ 'Queues the canonical open banking sync workflows after Powens callbacks and webhooks are verified.',
28
+ domain: 'open-banking',
29
+ owners: [OwnersEnum.PlatformFinance],
30
+ tags: ['openbanking', 'powens', 'job', 'webhook'],
31
+ stability: StabilityEnum.Experimental,
32
+ },
33
+ payload: {
34
+ schema: PowensSyncDispatchPayloadModel,
35
+ },
36
+ retry: {
37
+ maxRetries: 5,
38
+ initialBackoffMs: 30_000,
39
+ maxBackoffMs: 300_000,
40
+ multiplier: 2,
41
+ jitter: true,
42
+ },
43
+ timeoutMs: 60_000,
44
+ });