@shipfox/api-triggers 4.0.0 → 6.0.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 +4 -4
- package/CHANGELOG.md +65 -0
- package/README.md +23 -3
- package/dist/core/dispatch-integration-event.d.ts +2 -0
- package/dist/core/dispatch-integration-event.d.ts.map +1 -1
- package/dist/core/dispatch-integration-event.js +9 -5
- package/dist/core/dispatch-integration-event.js.map +1 -1
- package/dist/core/drain-cron-schedules.d.ts +2 -0
- package/dist/core/drain-cron-schedules.d.ts.map +1 -1
- package/dist/core/drain-cron-schedules.js +1 -0
- package/dist/core/drain-cron-schedules.js.map +1 -1
- package/dist/core/fire-cron.d.ts +6 -2
- package/dist/core/fire-cron.d.ts.map +1 -1
- package/dist/core/fire-cron.js +8 -5
- package/dist/core/fire-cron.js.map +1 -1
- package/dist/core/fire-manual.d.ts +6 -2
- package/dist/core/fire-manual.d.ts.map +1 -1
- package/dist/core/fire-manual.js +8 -4
- package/dist/core/fire-manual.js.map +1 -1
- package/dist/core/route-event-to-job-listeners.d.ts +2 -0
- package/dist/core/route-event-to-job-listeners.d.ts.map +1 -1
- package/dist/core/route-event-to-job-listeners.js +2 -3
- package/dist/core/route-event-to-job-listeners.js.map +1 -1
- package/dist/core/workflows-client.d.ts +69 -0
- package/dist/core/workflows-client.d.ts.map +1 -0
- package/dist/core/workflows-client.js +20 -0
- package/dist/core/workflows-client.js.map +1 -0
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +52 -50
- package/dist/index.js.map +1 -1
- package/dist/presentation/index.d.ts +2 -2
- package/dist/presentation/index.d.ts.map +1 -1
- package/dist/presentation/index.js +2 -2
- package/dist/presentation/index.js.map +1 -1
- package/dist/presentation/routes/fire-manual.d.ts +2 -1
- package/dist/presentation/routes/fire-manual.d.ts.map +1 -1
- package/dist/presentation/routes/fire-manual.js +61 -58
- package/dist/presentation/routes/fire-manual.js.map +1 -1
- package/dist/presentation/routes/index.d.ts +2 -1
- package/dist/presentation/routes/index.d.ts.map +1 -1
- package/dist/presentation/routes/index.js +23 -21
- package/dist/presentation/routes/index.js.map +1 -1
- package/dist/presentation/subscribers/index.d.ts +1 -1
- package/dist/presentation/subscribers/index.d.ts.map +1 -1
- package/dist/presentation/subscribers/index.js +1 -1
- package/dist/presentation/subscribers/index.js.map +1 -1
- package/dist/presentation/subscribers/on-integration-event-received.d.ts +2 -1
- package/dist/presentation/subscribers/on-integration-event-received.d.ts.map +1 -1
- package/dist/presentation/subscribers/on-integration-event-received.js +16 -13
- package/dist/presentation/subscribers/on-integration-event-received.js.map +1 -1
- package/dist/temporal/activities/drain-cron-batch.d.ts +2 -1
- package/dist/temporal/activities/drain-cron-batch.d.ts.map +1 -1
- package/dist/temporal/activities/drain-cron-batch.js +2 -1
- package/dist/temporal/activities/drain-cron-batch.js.map +1 -1
- package/dist/temporal/activities/index.d.ts +4 -3
- package/dist/temporal/activities/index.d.ts.map +1 -1
- package/dist/temporal/activities/index.js +2 -2
- package/dist/temporal/activities/index.js.map +1 -1
- package/dist/tsconfig.test.tsbuildinfo +1 -1
- package/package.json +27 -35
- package/src/core/dispatch-integration-event.history-failure.test.ts +11 -6
- package/src/core/dispatch-integration-event.test.ts +50 -36
- package/src/core/dispatch-integration-event.ts +8 -5
- package/src/core/drain-cron-schedules.test.ts +30 -29
- package/src/core/drain-cron-schedules.ts +3 -0
- package/src/core/fire-cron.test.ts +35 -24
- package/src/core/fire-cron.ts +9 -7
- package/src/core/fire-manual.test.ts +19 -22
- package/src/core/fire-manual.ts +9 -6
- package/src/core/record-trigger-history.test.ts +3 -5
- package/src/core/route-event-to-job-listeners.test.ts +5 -4
- package/src/core/route-event-to-job-listeners.ts +5 -4
- package/src/core/workflows-client.test.ts +73 -0
- package/src/core/workflows-client.ts +32 -0
- package/src/index.ts +49 -42
- package/src/presentation/index.ts +2 -2
- package/src/presentation/routes/fire-manual.test.ts +14 -30
- package/src/presentation/routes/fire-manual.ts +62 -54
- package/src/presentation/routes/index.ts +18 -15
- package/src/presentation/subscribers/index.ts +1 -1
- package/src/presentation/subscribers/on-integration-event-received.test.ts +6 -3
- package/src/presentation/subscribers/on-integration-event-received.ts +20 -16
- package/src/temporal/activities/drain-cron-batch.ts +5 -1
- package/src/temporal/activities/index.ts +3 -2
- package/tsconfig.build.tsbuildinfo +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/presentation/routes/index.ts"],"sourcesContent":["import {AUTH_USER} from '@shipfox/api-auth-context';\nimport type {RouteGroup} from '@shipfox/node-fastify';\nimport {
|
|
1
|
+
{"version":3,"sources":["../../../src/presentation/routes/index.ts"],"sourcesContent":["import {AUTH_USER} from '@shipfox/api-auth-context';\nimport type {WorkflowsModuleClient} from '@shipfox/api-workflows-dto/inter-module';\nimport type {RouteGroup} from '@shipfox/node-fastify';\nimport {createFireManualTriggerRoute} from './fire-manual.js';\nimport {getTriggerEventRoute} from './get-trigger-event.js';\nimport {listTriggerEventFacetsRoute} from './list-trigger-event-facets.js';\nimport {listTriggerEventsRoute} from './list-trigger-events.js';\n\nexport function createTriggerRoutes(workflows: WorkflowsModuleClient): RouteGroup[] {\n return [\n {\n prefix: '/workflow-definitions',\n auth: AUTH_USER,\n routes: [createFireManualTriggerRoute(workflows)],\n },\n {\n // The static /facets path is matched ahead of the /:id detail route by Fastify's\n // radix router, so registration order does not affect resolution.\n prefix: '/trigger-events',\n auth: AUTH_USER,\n routes: [listTriggerEventFacetsRoute, listTriggerEventsRoute, getTriggerEventRoute],\n },\n ];\n}\n"],"names":["AUTH_USER","createFireManualTriggerRoute","getTriggerEventRoute","listTriggerEventFacetsRoute","listTriggerEventsRoute","createTriggerRoutes","workflows","prefix","auth","routes"],"mappings":"AAAA,SAAQA,SAAS,QAAO,4BAA4B;AAGpD,SAAQC,4BAA4B,QAAO,mBAAmB;AAC9D,SAAQC,oBAAoB,QAAO,yBAAyB;AAC5D,SAAQC,2BAA2B,QAAO,iCAAiC;AAC3E,SAAQC,sBAAsB,QAAO,2BAA2B;AAEhE,OAAO,SAASC,oBAAoBC,SAAgC;IAClE,OAAO;QACL;YACEC,QAAQ;YACRC,MAAMR;YACNS,QAAQ;gBAACR,6BAA6BK;aAAW;QACnD;QACA;YACE,iFAAiF;YACjF,kEAAkE;YAClEC,QAAQ;YACRC,MAAMR;YACNS,QAAQ;gBAACN;gBAA6BC;gBAAwBF;aAAqB;QACrF;KACD;AACH"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { onDefinitionDeleted } from './on-definition-deleted.js';
|
|
2
2
|
export { onDefinitionResolved } from './on-definition-resolved.js';
|
|
3
|
-
export {
|
|
3
|
+
export { createOnIntegrationEventReceived } from './on-integration-event-received.js';
|
|
4
4
|
export { onJobActivated } from './on-job-activated.js';
|
|
5
5
|
export { onJobTerminated } from './on-job-terminated.js';
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/presentation/subscribers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,mBAAmB,EAAC,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAC,oBAAoB,EAAC,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/presentation/subscribers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,mBAAmB,EAAC,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAC,oBAAoB,EAAC,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAC,gCAAgC,EAAC,MAAM,oCAAoC,CAAC;AACpF,OAAO,EAAC,cAAc,EAAC,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAC,eAAe,EAAC,MAAM,wBAAwB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { onDefinitionDeleted } from './on-definition-deleted.js';
|
|
2
2
|
export { onDefinitionResolved } from './on-definition-resolved.js';
|
|
3
|
-
export {
|
|
3
|
+
export { createOnIntegrationEventReceived } from './on-integration-event-received.js';
|
|
4
4
|
export { onJobActivated } from './on-job-activated.js';
|
|
5
5
|
export { onJobTerminated } from './on-job-terminated.js';
|
|
6
6
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/presentation/subscribers/index.ts"],"sourcesContent":["export {onDefinitionDeleted} from './on-definition-deleted.js';\nexport {onDefinitionResolved} from './on-definition-resolved.js';\nexport {
|
|
1
|
+
{"version":3,"sources":["../../../src/presentation/subscribers/index.ts"],"sourcesContent":["export {onDefinitionDeleted} from './on-definition-deleted.js';\nexport {onDefinitionResolved} from './on-definition-resolved.js';\nexport {createOnIntegrationEventReceived} from './on-integration-event-received.js';\nexport {onJobActivated} from './on-job-activated.js';\nexport {onJobTerminated} from './on-job-terminated.js';\n"],"names":["onDefinitionDeleted","onDefinitionResolved","createOnIntegrationEventReceived","onJobActivated","onJobTerminated"],"mappings":"AAAA,SAAQA,mBAAmB,QAAO,6BAA6B;AAC/D,SAAQC,oBAAoB,QAAO,8BAA8B;AACjE,SAAQC,gCAAgC,QAAO,qCAAqC;AACpF,SAAQC,cAAc,QAAO,wBAAwB;AACrD,SAAQC,eAAe,QAAO,yBAAyB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { IntegrationEventReceivedEvent } from '@shipfox/api-integration-core-dto';
|
|
2
|
+
import type { WorkflowsModuleClient } from '@shipfox/api-workflows-dto/inter-module';
|
|
2
3
|
import type { DomainEvent } from '@shipfox/node-outbox';
|
|
3
|
-
export declare function
|
|
4
|
+
export declare function createOnIntegrationEventReceived(workflows: WorkflowsModuleClient): (envelope: IntegrationEventReceivedEvent, event: DomainEvent<IntegrationEventReceivedEvent>) => Promise<void>;
|
|
4
5
|
//# sourceMappingURL=on-integration-event-received.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"on-integration-event-received.d.ts","sourceRoot":"","sources":["../../../src/presentation/subscribers/on-integration-event-received.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,6BAA6B,EAAC,MAAM,mCAAmC,CAAC;AACrF,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,sBAAsB,CAAC;AAGtD,
|
|
1
|
+
{"version":3,"file":"on-integration-event-received.d.ts","sourceRoot":"","sources":["../../../src/presentation/subscribers/on-integration-event-received.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,6BAA6B,EAAC,MAAM,mCAAmC,CAAC;AACrF,OAAO,KAAK,EAAC,qBAAqB,EAAC,MAAM,yCAAyC,CAAC;AACnF,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,sBAAsB,CAAC;AAGtD,wBAAgB,gCAAgC,CAAC,SAAS,EAAE,qBAAqB,IAE7E,UAAU,6BAA6B,EACvC,OAAO,WAAW,CAAC,6BAA6B,CAAC,KAChD,OAAO,CAAC,IAAI,CAAC,CAejB"}
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import { dispatchIntegrationEvent } from '#core/dispatch-integration-event.js';
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
2
|
+
export function createOnIntegrationEventReceived(workflows) {
|
|
3
|
+
return async function onIntegrationEventReceived(envelope, event) {
|
|
4
|
+
await dispatchIntegrationEvent({
|
|
5
|
+
workflows,
|
|
6
|
+
eventRef: event.id,
|
|
7
|
+
workspaceId: envelope.workspaceId,
|
|
8
|
+
provider: envelope.provider,
|
|
9
|
+
source: envelope.source,
|
|
10
|
+
event: envelope.event,
|
|
11
|
+
deliveryId: envelope.deliveryId,
|
|
12
|
+
connectionId: envelope.connectionId,
|
|
13
|
+
connectionName: envelope.connectionName ?? null,
|
|
14
|
+
payload: envelope.payload,
|
|
15
|
+
receivedAt: new Date(envelope.receivedAt)
|
|
16
|
+
});
|
|
17
|
+
};
|
|
15
18
|
}
|
|
16
19
|
|
|
17
20
|
//# sourceMappingURL=on-integration-event-received.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/presentation/subscribers/on-integration-event-received.ts"],"sourcesContent":["import type {IntegrationEventReceivedEvent} from '@shipfox/api-integration-core-dto';\nimport type {DomainEvent} from '@shipfox/node-outbox';\nimport {dispatchIntegrationEvent} from '#core/dispatch-integration-event.js';\n\nexport async function onIntegrationEventReceived(\n
|
|
1
|
+
{"version":3,"sources":["../../../src/presentation/subscribers/on-integration-event-received.ts"],"sourcesContent":["import type {IntegrationEventReceivedEvent} from '@shipfox/api-integration-core-dto';\nimport type {WorkflowsModuleClient} from '@shipfox/api-workflows-dto/inter-module';\nimport type {DomainEvent} from '@shipfox/node-outbox';\nimport {dispatchIntegrationEvent} from '#core/dispatch-integration-event.js';\n\nexport function createOnIntegrationEventReceived(workflows: WorkflowsModuleClient) {\n return async function onIntegrationEventReceived(\n envelope: IntegrationEventReceivedEvent,\n event: DomainEvent<IntegrationEventReceivedEvent>,\n ): Promise<void> {\n await dispatchIntegrationEvent({\n workflows,\n eventRef: event.id,\n workspaceId: envelope.workspaceId,\n provider: envelope.provider,\n source: envelope.source,\n event: envelope.event,\n deliveryId: envelope.deliveryId,\n connectionId: envelope.connectionId,\n connectionName: envelope.connectionName ?? null,\n payload: envelope.payload,\n receivedAt: new Date(envelope.receivedAt),\n });\n };\n}\n"],"names":["dispatchIntegrationEvent","createOnIntegrationEventReceived","workflows","onIntegrationEventReceived","envelope","event","eventRef","id","workspaceId","provider","source","deliveryId","connectionId","connectionName","payload","receivedAt","Date"],"mappings":"AAGA,SAAQA,wBAAwB,QAAO,sCAAsC;AAE7E,OAAO,SAASC,iCAAiCC,SAAgC;IAC/E,OAAO,eAAeC,2BACpBC,QAAuC,EACvCC,KAAiD;QAEjD,MAAML,yBAAyB;YAC7BE;YACAI,UAAUD,MAAME,EAAE;YAClBC,aAAaJ,SAASI,WAAW;YACjCC,UAAUL,SAASK,QAAQ;YAC3BC,QAAQN,SAASM,MAAM;YACvBL,OAAOD,SAASC,KAAK;YACrBM,YAAYP,SAASO,UAAU;YAC/BC,cAAcR,SAASQ,YAAY;YACnCC,gBAAgBT,SAASS,cAAc,IAAI;YAC3CC,SAASV,SAASU,OAAO;YACzBC,YAAY,IAAIC,KAAKZ,SAASW,UAAU;QAC1C;IACF;AACF"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import type { WorkflowsModuleClient } from '@shipfox/api-workflows-dto/inter-module';
|
|
1
2
|
import { type CronDrainSummary } from '#core/drain-cron-schedules.js';
|
|
2
|
-
export declare function drainCronBatchActivity(): Promise<CronDrainSummary>;
|
|
3
|
+
export declare function drainCronBatchActivity(workflows: WorkflowsModuleClient): Promise<CronDrainSummary>;
|
|
3
4
|
export declare function readCronFanoutActivity(): Promise<number>;
|
|
4
5
|
//# sourceMappingURL=drain-cron-batch.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drain-cron-batch.d.ts","sourceRoot":"","sources":["../../../src/temporal/activities/drain-cron-batch.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"drain-cron-batch.d.ts","sourceRoot":"","sources":["../../../src/temporal/activities/drain-cron-batch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,qBAAqB,EAAC,MAAM,yCAAyC,CAAC;AAGnF,OAAO,EAAC,KAAK,gBAAgB,EAAwB,MAAM,+BAA+B,CAAC;AAE3F,wBAAsB,sBAAsB,CAC1C,SAAS,EAAE,qBAAqB,GAC/B,OAAO,CAAC,gBAAgB,CAAC,CAQ3B;AAMD,wBAAgB,sBAAsB,IAAI,OAAO,CAAC,MAAM,CAAC,CAExD"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Context } from '@temporalio/activity';
|
|
2
2
|
import { config } from '#config.js';
|
|
3
3
|
import { drainDueCronSchedules } from '#core/drain-cron-schedules.js';
|
|
4
|
-
export async function drainCronBatchActivity() {
|
|
4
|
+
export async function drainCronBatchActivity(workflows) {
|
|
5
5
|
const ctx = Context.current();
|
|
6
6
|
return await drainDueCronSchedules({
|
|
7
|
+
workflows,
|
|
7
8
|
batchSize: config.TRIGGER_CRON_CLAIM_BATCH,
|
|
8
9
|
jitterWindowSeconds: config.TRIGGER_CRON_JITTER_WINDOW_SECONDS,
|
|
9
10
|
onScheduleProcessed: ()=>ctx.heartbeat()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/temporal/activities/drain-cron-batch.ts"],"sourcesContent":["import {Context} from '@temporalio/activity';\nimport {config} from '#config.js';\nimport {type CronDrainSummary, drainDueCronSchedules} from '#core/drain-cron-schedules.js';\n\nexport async function drainCronBatchActivity(): Promise<CronDrainSummary> {\n const ctx = Context.current();\n return await drainDueCronSchedules({\n batchSize: config.TRIGGER_CRON_CLAIM_BATCH,\n jitterWindowSeconds: config.TRIGGER_CRON_JITTER_WINDOW_SECONDS,\n onScheduleProcessed: () => ctx.heartbeat(),\n });\n}\n\n// Read at runtime rather than baked into the cron workflow's start args: a start arg\n// would freeze fanout at first launch (a restart re-skips the already-running workflow),\n// so an activity read lets a config change take effect on the next tick after a worker\n// restart, consistent with how TRIGGER_CRON_CLAIM_BATCH is read in the drain activity.\nexport function readCronFanoutActivity(): Promise<number> {\n return Promise.resolve(config.TRIGGER_CRON_FANOUT);\n}\n"],"names":["Context","config","drainDueCronSchedules","drainCronBatchActivity","ctx","current","batchSize","TRIGGER_CRON_CLAIM_BATCH","jitterWindowSeconds","TRIGGER_CRON_JITTER_WINDOW_SECONDS","onScheduleProcessed","heartbeat","readCronFanoutActivity","Promise","resolve","TRIGGER_CRON_FANOUT"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/temporal/activities/drain-cron-batch.ts"],"sourcesContent":["import type {WorkflowsModuleClient} from '@shipfox/api-workflows-dto/inter-module';\nimport {Context} from '@temporalio/activity';\nimport {config} from '#config.js';\nimport {type CronDrainSummary, drainDueCronSchedules} from '#core/drain-cron-schedules.js';\n\nexport async function drainCronBatchActivity(\n workflows: WorkflowsModuleClient,\n): Promise<CronDrainSummary> {\n const ctx = Context.current();\n return await drainDueCronSchedules({\n workflows,\n batchSize: config.TRIGGER_CRON_CLAIM_BATCH,\n jitterWindowSeconds: config.TRIGGER_CRON_JITTER_WINDOW_SECONDS,\n onScheduleProcessed: () => ctx.heartbeat(),\n });\n}\n\n// Read at runtime rather than baked into the cron workflow's start args: a start arg\n// would freeze fanout at first launch (a restart re-skips the already-running workflow),\n// so an activity read lets a config change take effect on the next tick after a worker\n// restart, consistent with how TRIGGER_CRON_CLAIM_BATCH is read in the drain activity.\nexport function readCronFanoutActivity(): Promise<number> {\n return Promise.resolve(config.TRIGGER_CRON_FANOUT);\n}\n"],"names":["Context","config","drainDueCronSchedules","drainCronBatchActivity","workflows","ctx","current","batchSize","TRIGGER_CRON_CLAIM_BATCH","jitterWindowSeconds","TRIGGER_CRON_JITTER_WINDOW_SECONDS","onScheduleProcessed","heartbeat","readCronFanoutActivity","Promise","resolve","TRIGGER_CRON_FANOUT"],"mappings":"AACA,SAAQA,OAAO,QAAO,uBAAuB;AAC7C,SAAQC,MAAM,QAAO,aAAa;AAClC,SAA+BC,qBAAqB,QAAO,gCAAgC;AAE3F,OAAO,eAAeC,uBACpBC,SAAgC;IAEhC,MAAMC,MAAML,QAAQM,OAAO;IAC3B,OAAO,MAAMJ,sBAAsB;QACjCE;QACAG,WAAWN,OAAOO,wBAAwB;QAC1CC,qBAAqBR,OAAOS,kCAAkC;QAC9DC,qBAAqB,IAAMN,IAAIO,SAAS;IAC1C;AACF;AAEA,qFAAqF;AACrF,yFAAyF;AACzF,uFAAuF;AACvF,uFAAuF;AACvF,OAAO,SAASC;IACd,OAAOC,QAAQC,OAAO,CAACd,OAAOe,mBAAmB;AACnD"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { WorkflowsModuleClient } from '@shipfox/api-workflows-dto/inter-module';
|
|
2
|
+
import { readCronFanoutActivity } from './drain-cron-batch.js';
|
|
2
3
|
import { pruneTriggerEventsActivity } from './prune-trigger-events.js';
|
|
3
4
|
export declare function createTriggersMaintenanceActivities(): {
|
|
4
5
|
pruneTriggerEventsActivity: typeof pruneTriggerEventsActivity;
|
|
5
6
|
};
|
|
6
|
-
export declare function createTriggersCronActivities(): {
|
|
7
|
-
drainCronBatchActivity:
|
|
7
|
+
export declare function createTriggersCronActivities(workflows: WorkflowsModuleClient): {
|
|
8
|
+
drainCronBatchActivity: () => Promise<import("../../core/drain-cron-schedules.js").CronDrainSummary>;
|
|
8
9
|
readCronFanoutActivity: typeof readCronFanoutActivity;
|
|
9
10
|
};
|
|
10
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/temporal/activities/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/temporal/activities/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,qBAAqB,EAAC,MAAM,yCAAyC,CAAC;AACnF,OAAO,EAAyB,sBAAsB,EAAC,MAAM,uBAAuB,CAAC;AACrF,OAAO,EAAC,0BAA0B,EAAC,MAAM,2BAA2B,CAAC;AAErE,wBAAgB,mCAAmC;;EAIlD;AAED,wBAAgB,4BAA4B,CAAC,SAAS,EAAE,qBAAqB;;;EAK5E"}
|
|
@@ -5,9 +5,9 @@ export function createTriggersMaintenanceActivities() {
|
|
|
5
5
|
pruneTriggerEventsActivity
|
|
6
6
|
};
|
|
7
7
|
}
|
|
8
|
-
export function createTriggersCronActivities() {
|
|
8
|
+
export function createTriggersCronActivities(workflows) {
|
|
9
9
|
return {
|
|
10
|
-
drainCronBatchActivity,
|
|
10
|
+
drainCronBatchActivity: ()=>drainCronBatchActivity(workflows),
|
|
11
11
|
readCronFanoutActivity
|
|
12
12
|
};
|
|
13
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/temporal/activities/index.ts"],"sourcesContent":["import {drainCronBatchActivity, readCronFanoutActivity} from './drain-cron-batch.js';\nimport {pruneTriggerEventsActivity} from './prune-trigger-events.js';\n\nexport function createTriggersMaintenanceActivities() {\n return {\n pruneTriggerEventsActivity,\n };\n}\n\nexport function createTriggersCronActivities() {\n return {\n drainCronBatchActivity,\n readCronFanoutActivity,\n };\n}\n"],"names":["drainCronBatchActivity","readCronFanoutActivity","pruneTriggerEventsActivity","createTriggersMaintenanceActivities","createTriggersCronActivities"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/temporal/activities/index.ts"],"sourcesContent":["import type {WorkflowsModuleClient} from '@shipfox/api-workflows-dto/inter-module';\nimport {drainCronBatchActivity, readCronFanoutActivity} from './drain-cron-batch.js';\nimport {pruneTriggerEventsActivity} from './prune-trigger-events.js';\n\nexport function createTriggersMaintenanceActivities() {\n return {\n pruneTriggerEventsActivity,\n };\n}\n\nexport function createTriggersCronActivities(workflows: WorkflowsModuleClient) {\n return {\n drainCronBatchActivity: () => drainCronBatchActivity(workflows),\n readCronFanoutActivity,\n };\n}\n"],"names":["drainCronBatchActivity","readCronFanoutActivity","pruneTriggerEventsActivity","createTriggersMaintenanceActivities","createTriggersCronActivities","workflows"],"mappings":"AACA,SAAQA,sBAAsB,EAAEC,sBAAsB,QAAO,wBAAwB;AACrF,SAAQC,0BAA0B,QAAO,4BAA4B;AAErE,OAAO,SAASC;IACd,OAAO;QACLD;IACF;AACF;AAEA,OAAO,SAASE,6BAA6BC,SAAgC;IAC3E,OAAO;QACLL,wBAAwB,IAAMA,uBAAuBK;QACrDJ;IACF;AACF"}
|