@keystrokehq/salesforce 0.0.11 → 0.0.15

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 (53) hide show
  1. package/dist/_official/index.d.mts +3 -7
  2. package/dist/_official/index.mjs +1 -1
  3. package/dist/accounts.d.mts +11 -27
  4. package/dist/accounts.mjs +1 -1
  5. package/dist/associations.d.mts +5 -12
  6. package/dist/associations.mjs +3 -3
  7. package/dist/campaign-members.d.mts +11 -27
  8. package/dist/campaign-members.mjs +1 -1
  9. package/dist/campaigns.d.mts +11 -27
  10. package/dist/campaigns.mjs +1 -1
  11. package/dist/cases.d.mts +11 -27
  12. package/dist/cases.mjs +1 -1
  13. package/dist/client.d.mts +1 -1
  14. package/dist/client.mjs +2 -2
  15. package/dist/connection.d.mts +1 -1
  16. package/dist/connection.mjs +1 -1
  17. package/dist/contacts.d.mts +11 -27
  18. package/dist/contacts.mjs +1 -1
  19. package/dist/dashboards.d.mts +7 -17
  20. package/dist/dashboards.mjs +2 -2
  21. package/dist/factory-BGHapzgT.mjs +8 -0
  22. package/dist/integration-BDDBjdNG.d.mts +30 -0
  23. package/dist/integration-BzLQsPf-.mjs +60 -0
  24. package/dist/leads.d.mts +11 -27
  25. package/dist/leads.mjs +1 -1
  26. package/dist/notes.d.mts +11 -27
  27. package/dist/notes.mjs +1 -1
  28. package/dist/objects.d.mts +5 -12
  29. package/dist/objects.mjs +2 -2
  30. package/dist/opportunities.d.mts +11 -27
  31. package/dist/opportunities.mjs +1 -1
  32. package/dist/opportunity-line-items.d.mts +11 -27
  33. package/dist/opportunity-line-items.mjs +1 -1
  34. package/dist/ownership.d.mts +3 -7
  35. package/dist/ownership.mjs +3 -3
  36. package/dist/reports.d.mts +9 -22
  37. package/dist/reports.mjs +2 -2
  38. package/dist/schemas/index.mjs +1 -1
  39. package/dist/{shared-P5lushwa.mjs → shared-CM1r3Nii.mjs} +2 -2
  40. package/dist/soql.d.mts +5 -12
  41. package/dist/soql.mjs +3 -3
  42. package/dist/tasks.d.mts +11 -27
  43. package/dist/tasks.mjs +1 -1
  44. package/dist/triggers.d.mts +4 -59
  45. package/dist/triggers.mjs +5 -5
  46. package/dist/users.d.mts +3 -7
  47. package/dist/users.mjs +2 -2
  48. package/package.json +5 -6
  49. package/dist/dist-Bbp6t-WQ.mjs +0 -74
  50. package/dist/factory-CxfYmb6l.mjs +0 -7
  51. package/dist/integration-B9QIZuPh.mjs +0 -331
  52. package/dist/integration-CN_7-2E5.d.mts +0 -61
  53. /package/dist/{common-wiFkMAq5.mjs → common-BUAhHMqn.mjs} +0 -0
package/dist/soql.d.mts CHANGED
@@ -1,6 +1,5 @@
1
- import * as _keystrokehq_core0 from "@keystrokehq/core";
2
1
  import { z } from "zod";
3
- import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
2
+ import * as _keystrokehq_core0 from "@keystrokehq/core";
4
3
 
5
4
  //#region src/soql.d.ts
6
5
  declare const runSoqlQuery: _keystrokehq_core0.Operation<z.ZodObject<{
@@ -16,13 +15,10 @@ declare const runSoqlQuery: _keystrokehq_core0.Operation<z.ZodObject<{
16
15
  url: z.ZodString;
17
16
  }, z.core.$strip>>;
18
17
  }, z.core.$catchall<z.ZodUnknown>>>;
19
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"salesforce", z.ZodObject<{
20
- SALESFORCE_ACCESS_TOKEN: z.ZodString;
21
- SALESFORCE_INSTANCE_URL: z.ZodURL;
22
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
18
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:salesforce", z.ZodObject<{
23
19
  SALESFORCE_ACCESS_TOKEN: z.ZodString;
24
20
  SALESFORCE_INSTANCE_URL: z.ZodURL;
25
- }, z.core.$strip>>[] | undefined>], undefined>;
21
+ }, z.core.$strip>>], undefined>;
26
22
  declare const queryMore: _keystrokehq_core0.Operation<z.ZodObject<{
27
23
  nextRecordsUrl: z.ZodString;
28
24
  }, z.core.$strip>, z.ZodObject<{
@@ -36,12 +32,9 @@ declare const queryMore: _keystrokehq_core0.Operation<z.ZodObject<{
36
32
  url: z.ZodString;
37
33
  }, z.core.$strip>>;
38
34
  }, z.core.$catchall<z.ZodUnknown>>>;
39
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"salesforce", z.ZodObject<{
40
- SALESFORCE_ACCESS_TOKEN: z.ZodString;
41
- SALESFORCE_INSTANCE_URL: z.ZodURL;
42
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
35
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:salesforce", z.ZodObject<{
43
36
  SALESFORCE_ACCESS_TOKEN: z.ZodString;
44
37
  SALESFORCE_INSTANCE_URL: z.ZodURL;
45
- }, z.core.$strip>>[] | undefined>], undefined>;
38
+ }, z.core.$strip>>], undefined>;
46
39
  //#endregion
47
40
  export { queryMore, runSoqlQuery };
package/dist/soql.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { createSalesforceClient } from "./client.mjs";
2
- import { o as salesforceQueryResultSchema } from "./common-wiFkMAq5.mjs";
3
- import { t as salesforceOperation } from "./factory-CxfYmb6l.mjs";
4
- import { a as normalizeSalesforceQueryResult } from "./shared-P5lushwa.mjs";
2
+ import { o as salesforceQueryResultSchema } from "./common-BUAhHMqn.mjs";
3
+ import { t as salesforceOperation } from "./factory-BGHapzgT.mjs";
4
+ import { a as normalizeSalesforceQueryResult } from "./shared-CM1r3Nii.mjs";
5
5
  import { z } from "zod";
6
6
 
7
7
  //#region src/soql.ts
package/dist/tasks.d.mts CHANGED
@@ -1,6 +1,5 @@
1
- import * as _keystrokehq_core0 from "@keystrokehq/core";
2
1
  import * as zod from "zod";
3
- import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
2
+ import * as _keystrokehq_core0 from "@keystrokehq/core";
4
3
  import * as zod_v4_core0 from "zod/v4/core";
5
4
 
6
5
  //#region src/tasks.d.ts
@@ -13,13 +12,10 @@ declare const getTask: _keystrokehq_core0.Operation<zod.ZodObject<{
13
12
  type: zod.ZodString;
14
13
  url: zod.ZodString;
15
14
  }, zod_v4_core0.$strip>>;
16
- }, zod_v4_core0.$catchall<zod.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"salesforce", zod.ZodObject<{
17
- SALESFORCE_ACCESS_TOKEN: zod.ZodString;
18
- SALESFORCE_INSTANCE_URL: zod.ZodURL;
19
- }, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
15
+ }, zod_v4_core0.$catchall<zod.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:salesforce", zod.ZodObject<{
20
16
  SALESFORCE_ACCESS_TOKEN: zod.ZodString;
21
17
  SALESFORCE_INSTANCE_URL: zod.ZodURL;
22
- }, zod_v4_core0.$strip>>[] | undefined>], undefined>;
18
+ }, zod_v4_core0.$strip>>], undefined>;
23
19
  declare const listTasks: _keystrokehq_core0.Operation<zod.ZodObject<{
24
20
  fields: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
25
21
  where: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber, zod.ZodBoolean, zod.ZodNull]>>>;
@@ -40,13 +36,10 @@ declare const listTasks: _keystrokehq_core0.Operation<zod.ZodObject<{
40
36
  url: zod.ZodString;
41
37
  }, zod_v4_core0.$strip>>;
42
38
  }, zod_v4_core0.$catchall<zod.ZodUnknown>>>;
43
- }, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"salesforce", zod.ZodObject<{
44
- SALESFORCE_ACCESS_TOKEN: zod.ZodString;
45
- SALESFORCE_INSTANCE_URL: zod.ZodURL;
46
- }, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
39
+ }, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:salesforce", zod.ZodObject<{
47
40
  SALESFORCE_ACCESS_TOKEN: zod.ZodString;
48
41
  SALESFORCE_INSTANCE_URL: zod.ZodURL;
49
- }, zod_v4_core0.$strip>>[] | undefined>], undefined>;
42
+ }, zod_v4_core0.$strip>>], undefined>;
50
43
  declare const createTask: _keystrokehq_core0.Operation<zod.ZodObject<{
51
44
  fields: zod.ZodRecord<zod.ZodString, zod.ZodUnknown>;
52
45
  returnFields: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
@@ -56,13 +49,10 @@ declare const createTask: _keystrokehq_core0.Operation<zod.ZodObject<{
56
49
  type: zod.ZodString;
57
50
  url: zod.ZodString;
58
51
  }, zod_v4_core0.$strip>>;
59
- }, zod_v4_core0.$catchall<zod.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"salesforce", zod.ZodObject<{
52
+ }, zod_v4_core0.$catchall<zod.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:salesforce", zod.ZodObject<{
60
53
  SALESFORCE_ACCESS_TOKEN: zod.ZodString;
61
54
  SALESFORCE_INSTANCE_URL: zod.ZodURL;
62
- }, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
63
- SALESFORCE_ACCESS_TOKEN: zod.ZodString;
64
- SALESFORCE_INSTANCE_URL: zod.ZodURL;
65
- }, zod_v4_core0.$strip>>[] | undefined>], undefined>;
55
+ }, zod_v4_core0.$strip>>], undefined>;
66
56
  declare const updateTask: _keystrokehq_core0.Operation<zod.ZodObject<{
67
57
  id: zod.ZodString;
68
58
  fields: zod.ZodRecord<zod.ZodString, zod.ZodUnknown>;
@@ -73,25 +63,19 @@ declare const updateTask: _keystrokehq_core0.Operation<zod.ZodObject<{
73
63
  type: zod.ZodString;
74
64
  url: zod.ZodString;
75
65
  }, zod_v4_core0.$strip>>;
76
- }, zod_v4_core0.$catchall<zod.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"salesforce", zod.ZodObject<{
77
- SALESFORCE_ACCESS_TOKEN: zod.ZodString;
78
- SALESFORCE_INSTANCE_URL: zod.ZodURL;
79
- }, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
66
+ }, zod_v4_core0.$catchall<zod.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:salesforce", zod.ZodObject<{
80
67
  SALESFORCE_ACCESS_TOKEN: zod.ZodString;
81
68
  SALESFORCE_INSTANCE_URL: zod.ZodURL;
82
- }, zod_v4_core0.$strip>>[] | undefined>], undefined>;
69
+ }, zod_v4_core0.$strip>>], undefined>;
83
70
  declare const deleteTask: _keystrokehq_core0.Operation<zod.ZodObject<{
84
71
  id: zod.ZodString;
85
72
  }, zod_v4_core0.$strip>, zod.ZodObject<{
86
73
  success: zod.ZodBoolean;
87
74
  id: zod.ZodOptional<zod.ZodString>;
88
75
  errors: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
89
- }, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"salesforce", zod.ZodObject<{
90
- SALESFORCE_ACCESS_TOKEN: zod.ZodString;
91
- SALESFORCE_INSTANCE_URL: zod.ZodURL;
92
- }, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
76
+ }, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:salesforce", zod.ZodObject<{
93
77
  SALESFORCE_ACCESS_TOKEN: zod.ZodString;
94
78
  SALESFORCE_INSTANCE_URL: zod.ZodURL;
95
- }, zod_v4_core0.$strip>>[] | undefined>], undefined>;
79
+ }, zod_v4_core0.$strip>>], undefined>;
96
80
  //#endregion
97
81
  export { createTask, deleteTask, getTask, listTasks, updateTask };
package/dist/tasks.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { n as createSalesforceCrudOperations } from "./shared-P5lushwa.mjs";
1
+ import { n as createSalesforceCrudOperations } from "./shared-CM1r3Nii.mjs";
2
2
 
3
3
  //#region src/tasks.ts
4
4
  const taskCrud = createSalesforceCrudOperations({
@@ -1,64 +1,9 @@
1
- import { n as salesforce } from "./integration-CN_7-2E5.mjs";
2
- import { BoundTrigger, Operation, TriggerBindOptions, TriggerManifest } from "@keystrokehq/core";
1
+ import { n as salesforce } from "./integration-BDDBjdNG.mjs";
3
2
  import { z } from "zod";
4
- import { PollingTriggerManifest, pollingTrigger } from "@keystrokehq/core/trigger";
5
- import { AnyCredentialSet, InferCredentialSetAuth } from "@keystrokehq/core/credential-set";
3
+ import { BoundTrigger } from "@keystrokehq/core";
4
+ import { IntegrationTriggerBindingOptions, createPollingTriggerBindingFactory } from "@keystrokehq/integration-authoring";
5
+ import { PollingTriggerManifest } from "@keystrokehq/core/trigger";
6
6
 
7
- //#region ../../packages/integration-authoring/dist/index.d.mts
8
- //#endregion
9
- //#region src/triggers/types.d.ts
10
- interface IntegrationTriggerMetadata {
11
- readonly id?: string;
12
- readonly description?: string;
13
- }
14
- interface IntegrationTriggerBindingOptions<TPayload, TOutput = TPayload, TRequest = undefined> extends IntegrationTriggerMetadata {
15
- readonly transform?: TriggerBindOptions<TPayload, TOutput, TRequest>['transform'];
16
- }
17
- type IntegrationTriggerBindingFactory<TAuthorPayload, TCredentialSets extends readonly AnyCredentialSet[] | undefined, TManifest extends TriggerManifest = TriggerManifest, TRuntimePayload = TAuthorPayload, TRequest = undefined> = <TOutput = TAuthorPayload>(options?: IntegrationTriggerBindingOptions<TAuthorPayload, TOutput, TRequest>) => BoundTrigger<TRuntimePayload, TCredentialSets, TManifest, TOutput, TRequest>; //#endregion
18
- //#region src/triggers/shared.d.ts
19
- type MappedPayloadFn<TPayload, TMappedPayload> = (payload: TPayload) => TMappedPayload | null; //#endregion
20
- //#region src/triggers/polling.d.ts
21
- type PollingPrimitiveConfig<TResponseSchema extends z.ZodTypeAny, TCredentialSets extends readonly AnyCredentialSet[] = readonly []> = Parameters<typeof pollingTrigger<TResponseSchema, TCredentialSets>>[0];
22
- /**
23
- * Authoring config for an integration polling trigger binding.
24
- *
25
- * Notes about the new core surface:
26
- * - Polling no longer supports any form of `idempotencyKey` (only webhook does).
27
- * - `filter` must be a pure Zod schema (no `.refine`, `.transform`, etc.).
28
- * - `mapPayload` curates the validated polling response into the friendlier
29
- * shape surfaced to authors. It is applied as a default `transform` at bind
30
- * time; authors can still pass their own `transform` to override or compose.
31
- */
32
- interface IntegrationPollingTriggerBindingConfig<TResponseSchema extends z.ZodTypeAny, TEvent = z.output<TResponseSchema>, TCredentialSets extends readonly AnyCredentialSet[] = readonly []> {
33
- readonly defaultId: string;
34
- readonly defaultDescription: string;
35
- readonly schedule: PollingPrimitiveConfig<TResponseSchema, TCredentialSets>['schedule'];
36
- readonly response: TResponseSchema;
37
- readonly poll: PollingPrimitiveConfig<TResponseSchema, TCredentialSets>['poll'];
38
- readonly credentialSets?: TCredentialSets;
39
- readonly filter?: z.ZodTypeAny;
40
- readonly mapPayload?: MappedPayloadFn<z.output<TResponseSchema>, TEvent>;
41
- }
42
- declare function createPollingTriggerBindingFactory<TResponseSchema extends z.ZodTypeAny, TEvent = z.output<TResponseSchema>, TCredentialSets extends readonly AnyCredentialSet[] = readonly []>(config: IntegrationPollingTriggerBindingConfig<TResponseSchema, TEvent, TCredentialSets>): IntegrationTriggerBindingFactory<TEvent, TCredentialSets, PollingTriggerManifest, z.output<TResponseSchema>>; //#endregion
43
- //#region src/triggers/webhook.d.ts
44
- /**
45
- * Authoring config for an integration webhook trigger binding.
46
- *
47
- * Notes about the new core surface:
48
- * - The platform owns the HTTP surface for `source: { type: 'custom' }` webhooks
49
- * and authenticates with a Keystroke-issued secret. There is no `path`,
50
- * `method`, `verify`, or `response` here anymore.
51
- * - `filter` must be a pure Zod schema (no `.refine`, `.transform`, etc.).
52
- * Use it to narrow the raw payload to the events this binding is interested
53
- * in. Filtering happens server-side before any VM hop.
54
- * - `idempotencyKey` is declarative (`IdempotencyKeyConfig`) — point it at a
55
- * payload path or a header. Function-style idempotency is no longer
56
- * supported.
57
- * - `mapPayload` curates the validated raw payload into the friendlier shape
58
- * surfaced to authors. It is applied as a default `transform` at bind time;
59
- * authors can still pass their own `transform` to override or compose.
60
- */
61
- //#endregion
62
7
  //#region src/triggers.d.ts
63
8
  type Schedule = Parameters<typeof createPollingTriggerBindingFactory>[0]['schedule'];
64
9
  type SalesforcePollingCredentialSets = readonly [typeof salesforce];
package/dist/triggers.mjs CHANGED
@@ -1,9 +1,9 @@
1
- import { t as salesforce } from "./integration-B9QIZuPh.mjs";
2
- import { n as createPollingTriggerBindingFactory } from "./dist-Bbp6t-WQ.mjs";
1
+ import { t as salesforce } from "./integration-BzLQsPf-.mjs";
3
2
  import { createSalesforceClient } from "./client.mjs";
4
- import { s as salesforceRecordSchema } from "./common-wiFkMAq5.mjs";
5
- import { a as normalizeSalesforceQueryResult } from "./shared-P5lushwa.mjs";
3
+ import { s as salesforceRecordSchema } from "./common-BUAhHMqn.mjs";
4
+ import { a as normalizeSalesforceQueryResult } from "./shared-CM1r3Nii.mjs";
6
5
  import { z } from "zod";
6
+ import { createPollingTriggerBindingFactory } from "@keystrokehq/integration-authoring";
7
7
 
8
8
  //#region src/triggers.ts
9
9
  const salesforcePollingResponseSchema = z.object({
@@ -87,7 +87,7 @@ function createSalesforcePollingBindingFactory(config) {
87
87
  response: salesforcePollingResponseSchema,
88
88
  filter: nonEmptyRecordsFilterSchema,
89
89
  poll: async (ctx) => {
90
- const credentials = ctx.credentials["salesforce"];
90
+ const credentials = ctx.credentials["keystroke:salesforce"];
91
91
  const client = createPollingClient(credentials);
92
92
  const query = buildSalesforcePollingQuery({
93
93
  objectName: config.objectName,
package/dist/users.d.mts CHANGED
@@ -1,14 +1,10 @@
1
- import * as _keystrokehq_core0 from "@keystrokehq/core";
2
1
  import { z } from "zod";
3
- import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
2
+ import * as _keystrokehq_core0 from "@keystrokehq/core";
4
3
 
5
4
  //#region src/users.d.ts
6
- declare const getCurrentUserInfo: _keystrokehq_core0.Operation<z.ZodObject<{}, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, readonly [_keystrokehq_core0.CredentialSet<"salesforce", z.ZodObject<{
7
- SALESFORCE_ACCESS_TOKEN: z.ZodString;
8
- SALESFORCE_INSTANCE_URL: z.ZodURL;
9
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
5
+ declare const getCurrentUserInfo: _keystrokehq_core0.Operation<z.ZodObject<{}, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:salesforce", z.ZodObject<{
10
6
  SALESFORCE_ACCESS_TOKEN: z.ZodString;
11
7
  SALESFORCE_INSTANCE_URL: z.ZodURL;
12
- }, z.core.$strip>>[] | undefined>], undefined>;
8
+ }, z.core.$strip>>], undefined>;
13
9
  //#endregion
14
10
  export { getCurrentUserInfo };
package/dist/users.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { createSalesforceClient } from "./client.mjs";
2
- import { r as salesforceGenericObjectSchema } from "./common-wiFkMAq5.mjs";
3
- import { t as salesforceOperation } from "./factory-CxfYmb6l.mjs";
2
+ import { r as salesforceGenericObjectSchema } from "./common-BUAhHMqn.mjs";
3
+ import { t as salesforceOperation } from "./factory-BGHapzgT.mjs";
4
4
  import { z } from "zod";
5
5
 
6
6
  //#region src/users.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keystrokehq/salesforce",
3
- "version": "0.0.11",
3
+ "version": "0.0.15",
4
4
  "private": false,
5
5
  "sideEffects": false,
6
6
  "type": "module",
@@ -112,21 +112,20 @@
112
112
  ],
113
113
  "dependencies": {
114
114
  "@jsforce/jsforce-node": "^3.10.14",
115
+ "@keystrokehq/integration-authoring": "^0.0.9",
115
116
  "zod": "^4.3.6"
116
117
  },
117
118
  "peerDependencies": {
118
- "@keystrokehq/core": ">=0.0.8 <0.1.0"
119
+ "@keystrokehq/core": ">=0.0.13 <0.1.0"
119
120
  },
120
121
  "devDependencies": {
121
122
  "@types/node": "^22.19.11",
122
123
  "tsdown": "^0.20.3",
123
124
  "typescript": "^5.9.3",
124
125
  "vitest": "^4.0.18",
125
- "@keystrokehq/core": "^0.0.12",
126
- "@keystrokehq/typescript-config": "0.0.0",
127
- "@keystrokehq/integration-authoring": "0.0.9",
126
+ "@keystrokehq/core": "^0.0.13",
128
127
  "@keystrokehq/test-utils": "0.0.0",
129
- "@keystrokehq/credential-connection": "1.0.0"
128
+ "@keystrokehq/typescript-config": "0.0.0"
130
129
  },
131
130
  "keywords": [
132
131
  "salesforce",
@@ -1,74 +0,0 @@
1
- import { Operation } from "@keystrokehq/core";
2
- import { z } from "zod";
3
- import { pollingTrigger } from "@keystrokehq/core/trigger";
4
-
5
- //#region ../../packages/integration-authoring/dist/index.mjs
6
- function isThenable(value) {
7
- return !!value && typeof value === "object" && "then" in value && typeof value.then === "function";
8
- }
9
- function createErrorNormalizingProxy(target, normalizeError, path = []) {
10
- return new Proxy(target, { get(obj, property, receiver) {
11
- const value = Reflect.get(obj, property, receiver);
12
- if (typeof value === "function") return (...args) => {
13
- try {
14
- const result = value.apply(obj, args);
15
- if (isThenable(result)) return result.then(void 0, (error) => {
16
- throw normalizeError(error, { methodPath: [...path, String(property)].join(".") });
17
- });
18
- return result;
19
- } catch (error) {
20
- throw normalizeError(error, { methodPath: [...path, String(property)].join(".") });
21
- }
22
- };
23
- if (value && typeof value === "object") return createErrorNormalizingProxy(value, normalizeError, [...path, String(property)]);
24
- return value;
25
- } });
26
- }
27
- const IntegrationConfigSchema = z.object({
28
- id: z.string().min(1),
29
- name: z.string().min(1),
30
- description: z.string().optional()
31
- });
32
- function resolveMetadata(metadata, defaults) {
33
- return {
34
- id: metadata?.id ?? defaults.defaultId,
35
- description: metadata?.description ?? defaults.defaultDescription
36
- };
37
- }
38
- function resolveAuthorPayload(payload, mapPayload) {
39
- if (!mapPayload) return payload;
40
- return mapPayload(payload);
41
- }
42
- function createIntegrationTriggerBindingFactory(config) {
43
- const bind = (options) => {
44
- const resolvedMetadata = resolveMetadata(options, config);
45
- const baseTrigger = config.createBaseTrigger(resolvedMetadata);
46
- const userTransform = options?.transform;
47
- return baseTrigger({ transform: userTransform || config.mapPayload ? (runtimePayload, request) => {
48
- const authorPayload = resolveAuthorPayload(runtimePayload, config.mapPayload);
49
- if (authorPayload === null) throw new Error(`Trigger "${resolvedMetadata.id}" mapPayload returned null after the trigger filter passed; tighten the trigger filter schema.`);
50
- if (!userTransform) return authorPayload;
51
- return userTransform(authorPayload, request);
52
- } : void 0 });
53
- };
54
- return Object.freeze(bind);
55
- }
56
- function createPollingTriggerBindingFactory(config) {
57
- return createIntegrationTriggerBindingFactory({
58
- defaultId: config.defaultId,
59
- defaultDescription: config.defaultDescription,
60
- mapPayload: config.mapPayload,
61
- createBaseTrigger: (metadata) => pollingTrigger({
62
- id: metadata.id,
63
- description: metadata.description,
64
- schedule: config.schedule,
65
- response: config.response,
66
- poll: config.poll,
67
- ...config.credentialSets ? { credentialSets: config.credentialSets } : {},
68
- ...config.filter ? { filter: config.filter } : {}
69
- })
70
- });
71
- }
72
-
73
- //#endregion
74
- export { createPollingTriggerBindingFactory as n, createErrorNormalizingProxy as t };
@@ -1,7 +0,0 @@
1
- import { o as createOfficialOperationFactory, t as salesforce } from "./integration-B9QIZuPh.mjs";
2
-
3
- //#region src/factory.ts
4
- const salesforceOperation = createOfficialOperationFactory(salesforce);
5
-
6
- //#endregion
7
- export { salesforceOperation as t };