@trayio/cdk-runtime 5.22.0-unstable → 5.22.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.
@@ -40,7 +40,7 @@ describe('CompositeOperationExecution polling lifecycle branch', () => {
40
40
  const { client, registerCalls } = createFakePollingServiceClient();
41
41
  const handlerFunction = jest.fn();
42
42
  const handler = new CompositeOperationHandler_1.CompositeOperationHandler(handlerFunction);
43
- const execution = new CompositeOperationExecution_1.CompositeOperationExecution(noopHandlerInvocationFactory, handler, OperationHandler_1.OperationHandlerType.TriggerPollCreate, 'new_records_poll', client);
43
+ const execution = new CompositeOperationExecution_1.CompositeOperationExecution(noopHandlerInvocationFactory, handler, OperationHandler_1.OperationHandlerType.TriggerPollCreate, 'new_records', client);
44
44
  const input = {
45
45
  pollingInterval: { value: 15, unit: PollingTypes_1.PollingIntervalUnit.Minutes },
46
46
  maxFailureCount: 50,
@@ -54,7 +54,7 @@ describe('CompositeOperationExecution polling lifecycle branch', () => {
54
54
  expect(payload).toEqual({
55
55
  connectorName: 'salesforce',
56
56
  connectorVersion: '7.2.0',
57
- registeredHandlerName: 'new_records_poll',
57
+ registeredHandlerName: 'new_records',
58
58
  authenticationId: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
59
59
  organizationId: 'org-uuid',
60
60
  workspaceId: 'ws-uuid',
@@ -73,7 +73,7 @@ describe('CompositeOperationExecution polling lifecycle branch', () => {
73
73
  const { client, deregisterCalls } = createFakePollingServiceClient();
74
74
  const handlerFunction = jest.fn();
75
75
  const handler = new CompositeOperationHandler_1.CompositeOperationHandler(handlerFunction);
76
- const execution = new CompositeOperationExecution_1.CompositeOperationExecution(noopHandlerInvocationFactory, handler, OperationHandler_1.OperationHandlerType.TriggerPollDestroy, 'new_records_poll_destroy', client);
76
+ const execution = new CompositeOperationExecution_1.CompositeOperationExecution(noopHandlerInvocationFactory, handler, OperationHandler_1.OperationHandlerType.TriggerPollDestroy, 'new_records_destroy', client);
77
77
  const result = await execution.execute(fakePollingContext(), {});
78
78
  expect(result.isSuccess).toBe(true);
79
79
  expect(handlerFunction).not.toHaveBeenCalled();
@@ -82,7 +82,7 @@ describe('CompositeOperationExecution polling lifecycle branch', () => {
82
82
  expect(payload).toEqual({
83
83
  connectorName: 'salesforce',
84
84
  connectorVersion: '7.2.0',
85
- registeredHandlerName: 'new_records_poll_destroy',
85
+ registeredHandlerName: 'new_records_destroy',
86
86
  publicUrl: 'https://trigger.example.test/tab-123',
87
87
  preserveCursor: true,
88
88
  });
@@ -91,7 +91,7 @@ describe('CompositeOperationExecution polling lifecycle branch', () => {
91
91
  it('surfaces a consolidated failure listing every missing ctx field on register', async () => {
92
92
  const { client, registerCalls } = createFakePollingServiceClient();
93
93
  const handler = new CompositeOperationHandler_1.CompositeOperationHandler(jest.fn());
94
- const execution = new CompositeOperationExecution_1.CompositeOperationExecution(noopHandlerInvocationFactory, handler, OperationHandler_1.OperationHandlerType.TriggerPollCreate, 'new_records_poll', client);
94
+ const execution = new CompositeOperationExecution_1.CompositeOperationExecution(noopHandlerInvocationFactory, handler, OperationHandler_1.OperationHandlerType.TriggerPollCreate, 'new_records', client);
95
95
  const result = await execution.execute({}, {});
96
96
  expect(registerCalls).toHaveLength(0);
97
97
  expect(result.isFailure).toBe(true);
@@ -101,12 +101,13 @@ describe('CompositeOperationExecution polling lifecycle branch', () => {
101
101
  expect(error).toMatch(/ctx\.executionToken/);
102
102
  expect(error).toMatch(/ctx\.publicUrl/);
103
103
  });
104
- it('fails register when the auth/org/workspace/project ctx fields are missing', async () => {
104
+ it('fails register when org/workspace/project ctx fields are missing (auth is optional)', async () => {
105
105
  const { client, registerCalls } = createFakePollingServiceClient();
106
106
  const handler = new CompositeOperationHandler_1.CompositeOperationHandler(jest.fn());
107
- const execution = new CompositeOperationExecution_1.CompositeOperationExecution(noopHandlerInvocationFactory, handler, OperationHandler_1.OperationHandlerType.TriggerPollCreate, 'new_records_poll', client);
107
+ const execution = new CompositeOperationExecution_1.CompositeOperationExecution(noopHandlerInvocationFactory, handler, OperationHandler_1.OperationHandlerType.TriggerPollCreate, 'new_records', client);
108
108
  // Base polling ctx is present, but the identity fields the PS register
109
- // payload requires are not.
109
+ // payload requires are not. `ctx.auth.authId` is intentionally omitted
110
+ // to cover the "no auth" case.
110
111
  const incompleteCtx = {
111
112
  connectorName: 'x',
112
113
  connectorVersion: '1',
@@ -117,7 +118,7 @@ describe('CompositeOperationExecution polling lifecycle branch', () => {
117
118
  expect(registerCalls).toHaveLength(0);
118
119
  expect(result.isFailure).toBe(true);
119
120
  const error = result._tag === 'Failure' ? result.error.message : '';
120
- expect(error).toMatch(/ctx\.auth\.authId/);
121
+ expect(error).not.toMatch(/ctx\.auth\.authId/);
121
122
  expect(error).toMatch(/ctx\.organizationId/);
122
123
  expect(error).toMatch(/ctx\.workspaceId/);
123
124
  expect(error).toMatch(/ctx\.projectId/);
@@ -125,7 +126,7 @@ describe('CompositeOperationExecution polling lifecycle branch', () => {
125
126
  it('deregister does NOT require the register-only ctx fields', async () => {
126
127
  const { client, deregisterCalls } = createFakePollingServiceClient();
127
128
  const handler = new CompositeOperationHandler_1.CompositeOperationHandler(jest.fn());
128
- const execution = new CompositeOperationExecution_1.CompositeOperationExecution(noopHandlerInvocationFactory, handler, OperationHandler_1.OperationHandlerType.TriggerPollDestroy, 'new_records_poll_destroy', client);
129
+ const execution = new CompositeOperationExecution_1.CompositeOperationExecution(noopHandlerInvocationFactory, handler, OperationHandler_1.OperationHandlerType.TriggerPollDestroy, 'new_records_destroy', client);
129
130
  // Only the base four ctx fields; auth / org / workspace / project absent.
130
131
  const destroyOnlyCtx = {
131
132
  connectorName: 'x',
@@ -143,7 +144,7 @@ describe('CompositeOperationExecution polling lifecycle branch', () => {
143
144
  deregister: jest.fn(),
144
145
  };
145
146
  const handler = new CompositeOperationHandler_1.CompositeOperationHandler(jest.fn());
146
- const execution = new CompositeOperationExecution_1.CompositeOperationExecution(noopHandlerInvocationFactory, handler, OperationHandler_1.OperationHandlerType.TriggerPollCreate, 'new_records_poll', client);
147
+ const execution = new CompositeOperationExecution_1.CompositeOperationExecution(noopHandlerInvocationFactory, handler, OperationHandler_1.OperationHandlerType.TriggerPollCreate, 'new_records', client);
147
148
  const result = await execution.execute(fakePollingContext(), {});
148
149
  expect(result.isFailure).toBe(true);
149
150
  const message = result._tag === 'Failure' ? result.error.message : '';
@@ -1 +1 @@
1
- {"version":3,"file":"CompositeOperationExecutionPolling.d.ts","sourceRoot":"","sources":["../../../src/connector/operation/CompositeOperationExecutionPolling.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,oBAAoB,EACpB,uBAAuB,EAEvB,sBAAsB,EAEtB,oBAAoB,EAEpB,MAAM,sDAAsD,CAAC;AAC9D,OAAO,EAAE,yBAAyB,EAAE,MAAM,+DAA+D,CAAC;AAC1G,OAAO,EAAE,mBAAmB,EAAE,MAAM,kDAAkD,CAAC;AAEvF,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,iCAAiC,EAAE,MAAM,qCAAqC,CAAC;AAExF,MAAM,MAAM,6BAA6B,GAAG,mBAAmB,GAAG;IACjE,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B,CAAC;AAuEF,eAAO,MAAM,kBAAkB,gBACjB,oBAAoB,KAC/B,OAEqD,CAAC;AAoCzD;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,CACxC,IAAI,SAAS,oBAAoB,CAAC,OAAO,EAAE,OAAO,CAAC,EACnD,EAAE,EACF,GAAG,EACF,IAAI,EAAE;IACP,GAAG,EAAE,uBAAuB,CAAC,IAAI,CAAC,CAAC;IACnC,KAAK,EAAE,EAAE,CAAC;IACV,OAAO,EAAE,yBAAyB,CAAC,IAAI,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC;IAClD,wBAAwB,EAAE,iCAAiC,CAAC;IAC5D,yBAAyB,EAAE,CAAC,CAAC,EAAE,sBAAsB,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC;IACpE,cAAc,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,sBAAsB,CAAC,GAAG,CAAC,CAAC;CAC5D,GAAG,OAAO,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAC,CAiCvC;AAED,wBAAgB,8BAA8B,CAC7C,IAAI,SAAS,oBAAoB,CAAC,OAAO,EAAE,OAAO,CAAC,EAClD,IAAI,EAAE;IACP,GAAG,EAAE,uBAAuB,CAAC,IAAI,CAAC,CAAC;IACnC,WAAW,EACR,oBAAoB,CAAC,iBAAiB,GACtC,oBAAoB,CAAC,kBAAkB,CAAC;IAC3C,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,6BAA6B,CAAC;IAC5C,oBAAoB,EAAE,oBAAoB,CAAC;CAC3C,GAAG,OAAO,CAAC,IAAI,CAAC,CAiDhB"}
1
+ {"version":3,"file":"CompositeOperationExecutionPolling.d.ts","sourceRoot":"","sources":["../../../src/connector/operation/CompositeOperationExecutionPolling.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,oBAAoB,EACpB,uBAAuB,EAEvB,sBAAsB,EAEtB,oBAAoB,EAEpB,MAAM,sDAAsD,CAAC;AAC9D,OAAO,EAAE,yBAAyB,EAAE,MAAM,+DAA+D,CAAC;AAC1G,OAAO,EAAE,mBAAmB,EAAE,MAAM,kDAAkD,CAAC;AAEvF,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,iCAAiC,EAAE,MAAM,qCAAqC,CAAC;AAExF,MAAM,MAAM,6BAA6B,GAAG,mBAAmB,GAAG;IACjE,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B,CAAC;AAsEF,eAAO,MAAM,kBAAkB,gBACjB,oBAAoB,KAC/B,OAEqD,CAAC;AAoCzD;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,CACxC,IAAI,SAAS,oBAAoB,CAAC,OAAO,EAAE,OAAO,CAAC,EACnD,EAAE,EACF,GAAG,EACF,IAAI,EAAE;IACP,GAAG,EAAE,uBAAuB,CAAC,IAAI,CAAC,CAAC;IACnC,KAAK,EAAE,EAAE,CAAC;IACV,OAAO,EAAE,yBAAyB,CAAC,IAAI,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC;IAClD,wBAAwB,EAAE,iCAAiC,CAAC;IAC5D,yBAAyB,EAAE,CAAC,CAAC,EAAE,sBAAsB,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC;IACpE,cAAc,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,sBAAsB,CAAC,GAAG,CAAC,CAAC;CAC5D,GAAG,OAAO,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAC,CAiCvC;AAED,wBAAgB,8BAA8B,CAC7C,IAAI,SAAS,oBAAoB,CAAC,OAAO,EAAE,OAAO,CAAC,EAClD,IAAI,EAAE;IACP,GAAG,EAAE,uBAAuB,CAAC,IAAI,CAAC,CAAC;IACnC,WAAW,EACR,oBAAoB,CAAC,iBAAiB,GACtC,oBAAoB,CAAC,kBAAkB,CAAC;IAC3C,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,6BAA6B,CAAC;IAC5C,oBAAoB,EAAE,oBAAoB,CAAC;CAC3C,GAAG,OAAO,CAAC,IAAI,CAAC,CAiDhB"}
@@ -25,8 +25,6 @@ const requirePollingCtxFields = (ctx) => {
25
25
  const requirePollingRegisterCtxFields = (ctx) => {
26
26
  const base = requirePollingCtxFields(ctx);
27
27
  const missing = [];
28
- if (!ctx.auth?.authId)
29
- missing.push('ctx.auth.authId');
30
28
  if (!ctx.organizationId)
31
29
  missing.push('ctx.organizationId');
32
30
  if (!ctx.workspaceId)
@@ -38,7 +36,7 @@ const requirePollingRegisterCtxFields = (ctx) => {
38
36
  }
39
37
  return {
40
38
  ...base,
41
- authenticationId: ctx.auth.authId,
39
+ authenticationId: ctx.auth?.authId ?? null,
42
40
  organizationId: ctx.organizationId,
43
41
  workspaceId: ctx.workspaceId,
44
42
  projectId: ctx.projectId,
@@ -3,13 +3,8 @@ import { PollingInterval } from '@trayio/cdk-dsl/connector/operation/PollingType
3
3
  export type PollingServiceRegisterPayload = {
4
4
  connectorName: string;
5
5
  connectorVersion: string;
6
- /**
7
- * The registered handler name (e.g. `"new_records_poll"`). The client
8
- * normalizes to the canonical `_poll`-suffixed form before sending.
9
- */
10
6
  registeredHandlerName: string;
11
- /** Platform identity that the Polling Service keys the registration against. */
12
- authenticationId: string;
7
+ authenticationId: string | null;
13
8
  organizationId: string;
14
9
  workspaceId: string;
15
10
  projectId: string;
@@ -22,8 +17,9 @@ export type PollingServiceDeregisterPayload = {
22
17
  connectorName: string;
23
18
  connectorVersion: string;
24
19
  /**
25
- * The registered handler name (e.g. `"new_records_poll_destroy"`). The
26
- * client normalizes to the canonical `_poll`-suffixed form before sending.
20
+ * The registered handler name (e.g. `"new_records_destroy"`). The client
21
+ * normalizes destroy handler names to the canonical create name before
22
+ * sending.
27
23
  */
28
24
  registeredHandlerName: string;
29
25
  publicUrl: string;
@@ -1 +1 @@
1
- {"version":3,"file":"PollingServiceClient.d.ts","sourceRoot":"","sources":["../../../src/connector/polling/PollingServiceClient.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAE7D,OAAO,EAGN,eAAe,EAEf,MAAM,kDAAkD,CAAC;AA0B1D,MAAM,MAAM,6BAA6B,GAAG;IAC3C,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,qBAAqB,EAAE,MAAM,CAAC;IAC9B,gFAAgF;IAChF,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG;IAC7C,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,qBAAqB,EAAE,MAAM,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB;;;;;OAKG;IACH,cAAc,EAAE,OAAO,CAAC;CACxB,CAAC;AA4BF;;;;GAIG;AACH,qBAAa,oBAAoB;IACpB,OAAO,CAAC,UAAU;gBAAV,UAAU,EAAE,UAAU;IAEpC,QAAQ,CACb,OAAO,EAAE,6BAA6B,EACtC,cAAc,EAAE,MAAM,GACpB,OAAO,CAAC,IAAI,CAAC;IAwBV,UAAU,CACf,OAAO,EAAE,+BAA+B,EACxC,cAAc,EAAE,MAAM,GACpB,OAAO,CAAC,IAAI,CAAC;YAaF,QAAQ;CAgCtB"}
1
+ {"version":3,"file":"PollingServiceClient.d.ts","sourceRoot":"","sources":["../../../src/connector/polling/PollingServiceClient.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAE7D,OAAO,EAGN,eAAe,EAEf,MAAM,kDAAkD,CAAC;AAuB1D,MAAM,MAAM,6BAA6B,GAAG;IAC3C,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG;IAC7C,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,qBAAqB,EAAE,MAAM,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB;;;;;OAKG;IACH,cAAc,EAAE,OAAO,CAAC;CACxB,CAAC;AA4BF;;;;GAIG;AACH,qBAAa,oBAAoB;IACpB,OAAO,CAAC,UAAU;gBAAV,UAAU,EAAE,UAAU;IAEpC,QAAQ,CACb,OAAO,EAAE,6BAA6B,EACtC,cAAc,EAAE,MAAM,GACpB,OAAO,CAAC,IAAI,CAAC;IAwBV,UAAU,CACf,OAAO,EAAE,+BAA+B,EACxC,cAAc,EAAE,MAAM,GACpB,OAAO,CAAC,IAAI,CAAC;YAaF,QAAQ;CAgCtB"}
@@ -31,16 +31,16 @@ const PollingTypes_1 = require("@trayio/cdk-dsl/connector/operation/PollingTypes
31
31
  const POLLING_SERVICE_URL_ENV = 'TRAY_POLLING_SERVICE_URL';
32
32
  const EXECUTION_TOKEN_HEADER = 'X-Tray-Execution-Token';
33
33
  const TRIGGERS_REGISTER_PATH = '/triggers/register';
34
- const POLL_SUFFIX = '_poll';
35
- const POLL_DESTROY_SUFFIX = '_poll_destroy';
34
+ const POLL_DESTROY_SUFFIX = '_destroy';
36
35
  /**
37
- * PS keys register+deregister against the canonical `_poll`-suffixed
38
- * operation name. `_poll_destroy` handlers rewrite to the matching `_poll`
39
- * name so both sides of the lifecycle target the same PS record.
36
+ * PS keys register+deregister against the canonical polling trigger operation
37
+ * name (the TriggerPollCreate handler name). Destroy handlers rewrite to the
38
+ * matching create name so both sides of the lifecycle target the same PS
39
+ * record.
40
40
  */
41
41
  const toCanonicalPollOperationName = (registeredHandlerName) => {
42
42
  if (registeredHandlerName.endsWith(POLL_DESTROY_SUFFIX)) {
43
- return `${registeredHandlerName.slice(0, -POLL_DESTROY_SUFFIX.length)}${POLL_SUFFIX}`;
43
+ return registeredHandlerName.slice(0, -POLL_DESTROY_SUFFIX.length);
44
44
  }
45
45
  return registeredHandlerName;
46
46
  };
@@ -54,7 +54,7 @@ const createMockHttpClient = (capture) => ({
54
54
  const minimalRegister = (overrides = {}) => ({
55
55
  connectorName: 'x',
56
56
  connectorVersion: '1.0.0',
57
- registeredHandlerName: 'x_poll',
57
+ registeredHandlerName: 'x',
58
58
  authenticationId: 'auth-uuid',
59
59
  organizationId: 'org-id',
60
60
  workspaceId: 'ws-id',
@@ -83,7 +83,7 @@ describe('PollingServiceClient', () => {
83
83
  await client.register({
84
84
  connectorName: 'salesforce',
85
85
  connectorVersion: '7.2.0',
86
- registeredHandlerName: 'new_records_poll',
86
+ registeredHandlerName: 'new_records',
87
87
  authenticationId: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
88
88
  organizationId: 'org-uuid',
89
89
  workspaceId: 'ws-uuid',
@@ -107,7 +107,7 @@ describe('PollingServiceClient', () => {
107
107
  expect(call.body).toEqual({
108
108
  connectorName: 'salesforce',
109
109
  connectorVersion: '7.2.0',
110
- operationName: 'new_records_poll',
110
+ operationName: 'new_records',
111
111
  authenticationId: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
112
112
  organizationId: 'org-uuid',
113
113
  workspaceId: 'ws-uuid',
@@ -147,6 +147,13 @@ describe('PollingServiceClient', () => {
147
147
  initialCursor: null,
148
148
  });
149
149
  });
150
+ it('sends authenticationId as null on the wire when caller passes null', async () => {
151
+ const captured = [];
152
+ const client = new PollingServiceClient_1.PollingServiceClient(createMockHttpClient(captured));
153
+ await client.register(minimalRegister({ authenticationId: null }), 'tok');
154
+ const body = captured[0].body;
155
+ expect(body).toHaveProperty('authenticationId', null);
156
+ });
150
157
  it('trims trailing slashes from the PS base URL', async () => {
151
158
  process.env[ENV_VAR] = `${BASE_URL}/`;
152
159
  const captured = [];
@@ -182,7 +189,7 @@ describe('PollingServiceClient', () => {
182
189
  await client.deregister({
183
190
  connectorName: 'salesforce',
184
191
  connectorVersion: '7.2.0',
185
- registeredHandlerName: 'new_records_poll_destroy',
192
+ registeredHandlerName: 'new_records_destroy',
186
193
  publicUrl: 'https://trigger.example.test/abc',
187
194
  preserveCursor: true,
188
195
  }, 'exec-jwt-token');
@@ -196,22 +203,22 @@ describe('PollingServiceClient', () => {
196
203
  expect(call.body).toEqual({
197
204
  connectorName: 'salesforce',
198
205
  connectorVersion: '7.2.0',
199
- operationName: 'new_records_poll',
206
+ operationName: 'new_records',
200
207
  publicUrl: 'https://trigger.example.test/abc',
201
208
  preserveCursor: true,
202
209
  });
203
210
  });
204
- it('leaves an already-canonical _poll name unchanged', async () => {
211
+ it('leaves an already-canonical name unchanged', async () => {
205
212
  const captured = [];
206
213
  const client = new PollingServiceClient_1.PollingServiceClient(createMockHttpClient(captured));
207
214
  await client.deregister({
208
215
  connectorName: 'x',
209
216
  connectorVersion: '1.0.0',
210
- registeredHandlerName: 'x_poll',
217
+ registeredHandlerName: 'x',
211
218
  publicUrl: 'u',
212
219
  preserveCursor: false,
213
220
  }, 'tok');
214
- expect(captured[0].body.operationName).toBe('x_poll');
221
+ expect(captured[0].body.operationName).toBe('x');
215
222
  expect(captured[0].body.preserveCursor).toBe(false);
216
223
  });
217
224
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trayio/cdk-runtime",
3
- "version": "5.22.0-unstable",
3
+ "version": "5.22.0",
4
4
  "description": "A Runtime that executes connector operations defined using the CDK DSL",
5
5
  "exports": {
6
6
  "./*": "./dist/*.js"
@@ -14,10 +14,10 @@
14
14
  "node": ">=18.x"
15
15
  },
16
16
  "dependencies": {
17
- "@trayio/axios": "5.22.0-unstable",
18
- "@trayio/cdk-dsl": "5.22.0-unstable",
19
- "@trayio/express": "5.22.0-unstable",
20
- "@trayio/winston": "5.22.0-unstable",
17
+ "@trayio/axios": "5.22.0",
18
+ "@trayio/cdk-dsl": "5.22.0",
19
+ "@trayio/express": "5.22.0",
20
+ "@trayio/winston": "5.22.0",
21
21
  "mime": "3.0.0",
22
22
  "uuid": "9.0.0"
23
23
  },
@@ -34,6 +34,5 @@
34
34
  ],
35
35
  "devDependencies": {
36
36
  "just-permutations": "^2.2.1"
37
- },
38
- "stableVersion": "0.0.0"
37
+ }
39
38
  }