@keystrokehq/salesforce 0.0.10 → 0.0.11

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 (52) hide show
  1. package/dist/_official/index.d.mts +2 -2
  2. package/dist/_official/index.mjs +1 -1
  3. package/dist/accounts.d.mts +6 -6
  4. package/dist/accounts.mjs +1 -1
  5. package/dist/associations.d.mts +3 -3
  6. package/dist/associations.mjs +3 -3
  7. package/dist/campaign-members.d.mts +6 -6
  8. package/dist/campaign-members.mjs +1 -1
  9. package/dist/campaigns.d.mts +6 -6
  10. package/dist/campaigns.mjs +1 -1
  11. package/dist/cases.d.mts +6 -6
  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 +6 -6
  18. package/dist/contacts.mjs +1 -1
  19. package/dist/dashboards.d.mts +4 -4
  20. package/dist/dashboards.mjs +2 -2
  21. package/dist/dist-Bbp6t-WQ.mjs +74 -0
  22. package/dist/factory-CxfYmb6l.mjs +7 -0
  23. package/dist/integration-B9QIZuPh.mjs +331 -0
  24. package/dist/{integration-B4z5pRJ7.d.mts → integration-CN_7-2E5.d.mts} +3 -4
  25. package/dist/leads.d.mts +6 -6
  26. package/dist/leads.mjs +1 -1
  27. package/dist/notes.d.mts +6 -6
  28. package/dist/notes.mjs +1 -1
  29. package/dist/objects.d.mts +3 -3
  30. package/dist/objects.mjs +2 -2
  31. package/dist/opportunities.d.mts +6 -6
  32. package/dist/opportunities.mjs +1 -1
  33. package/dist/opportunity-line-items.d.mts +6 -6
  34. package/dist/opportunity-line-items.mjs +1 -1
  35. package/dist/ownership.d.mts +2 -2
  36. package/dist/ownership.mjs +3 -3
  37. package/dist/reports.d.mts +5 -5
  38. package/dist/reports.mjs +2 -2
  39. package/dist/schemas/index.mjs +1 -1
  40. package/dist/{shared-Cp54E0DL.mjs → shared-P5lushwa.mjs} +2 -2
  41. package/dist/soql.d.mts +3 -3
  42. package/dist/soql.mjs +3 -3
  43. package/dist/tasks.d.mts +6 -6
  44. package/dist/tasks.mjs +1 -1
  45. package/dist/triggers.d.mts +59 -4
  46. package/dist/triggers.mjs +5 -5
  47. package/dist/users.d.mts +2 -2
  48. package/dist/users.mjs +2 -2
  49. package/package.json +5 -5
  50. package/dist/factory-Dt72AT6c.mjs +0 -8
  51. package/dist/integration-DFFhYLhB.mjs +0 -131
  52. /package/dist/{common-BUAhHMqn.mjs → common-wiFkMAq5.mjs} +0 -0
@@ -0,0 +1,331 @@
1
+ import { CredentialSet, Operation } from "@keystrokehq/core";
2
+ import { z } from "zod";
3
+
4
+ //#region ../../packages/integration-authoring/dist/official/runtime.mjs
5
+ const REGISTRY_KEY = "__ks_official_integration_metadata_registry";
6
+ function getRegistry() {
7
+ const globalStore = globalThis;
8
+ if (!globalStore[REGISTRY_KEY]) globalStore[REGISTRY_KEY] = /* @__PURE__ */ new WeakMap();
9
+ return globalStore[REGISTRY_KEY];
10
+ }
11
+ function registerOfficialOperation(operation, metadata) {
12
+ getRegistry().set(operation, Object.freeze({ ...metadata }));
13
+ }
14
+
15
+ //#endregion
16
+ //#region ../../packages/integration-authoring/dist/official/index.mjs
17
+ const OFFICIAL_CREDENTIAL_SET_ID_PREFIX = "keystroke:";
18
+ function officialCredentialSetId(id) {
19
+ return `${OFFICIAL_CREDENTIAL_SET_ID_PREFIX}${id}`;
20
+ }
21
+ function stripOfficialCredentialSetIdPrefix(id) {
22
+ return id.startsWith(OFFICIAL_CREDENTIAL_SET_ID_PREFIX) ? id.slice(10) : id;
23
+ }
24
+ /**
25
+ * Creates a factory for Keystroke-official integration operations.
26
+ *
27
+ * It keeps the same flat `run(input, credentials)` ergonomics as the generic
28
+ * operation factory, while registering official metadata for builder/runtime
29
+ * operation metadata.
30
+ */
31
+ function createOfficialOperationFactory(credentialSet) {
32
+ const integrationId = stripOfficialCredentialSetIdPrefix(credentialSet.id);
33
+ return (config) => {
34
+ const wrappedRun = async (input, ctx) => {
35
+ const creds = ctx.credentials[credentialSet.id];
36
+ return config.run(input, creds);
37
+ };
38
+ const operation = new Operation({
39
+ id: config.id,
40
+ name: config.name,
41
+ description: config.description,
42
+ input: config.input,
43
+ output: config.output,
44
+ credentialSets: [credentialSet],
45
+ ...config.tags !== void 0 ? { tags: config.tags } : {},
46
+ ...config.needsApproval !== void 0 ? { needsApproval: config.needsApproval } : {},
47
+ ...config.requiredOAuthScopes !== void 0 ? { requiredOAuthScopes: config.requiredOAuthScopes } : {},
48
+ ...config.retries !== void 0 ? { retries: config.retries } : {},
49
+ ...config.timeout !== void 0 ? { timeout: config.timeout } : {},
50
+ ...config.maxDurationMs !== void 0 ? { maxDurationMs: config.maxDurationMs } : {},
51
+ run: wrappedRun
52
+ });
53
+ registerOfficialOperation(operation, { integrationId });
54
+ return operation;
55
+ };
56
+ }
57
+ /**
58
+ * Creates an official integration bundle from a single config object.
59
+ *
60
+ * - Creates the public `CredentialSet` internally.
61
+ * - Accepts optional `internal` fields for Keystroke-owned platform credentials.
62
+ */
63
+ function defineOfficialIntegration(config) {
64
+ const internalCredentialSets = config.internal ?? {};
65
+ const allInternalCredentialSets = [
66
+ ...internalCredentialSets.providerApp ? [internalCredentialSets.providerApp] : [],
67
+ ...internalCredentialSets.providerAppVariants ?? [],
68
+ ...internalCredentialSets.webhookVerification ? [internalCredentialSets.webhookVerification] : [],
69
+ ...internalCredentialSets.other ?? []
70
+ ];
71
+ const credentialSet = new CredentialSet({
72
+ id: config.id,
73
+ name: config.name,
74
+ description: config.description,
75
+ auth: config.auth,
76
+ ...config.connections ? { connections: config.connections } : {},
77
+ ...config.proxy ? { proxy: config.proxy } : {},
78
+ ...config.needsRawSecret === true ? { needsRawSecret: true } : {}
79
+ });
80
+ return Object.freeze({
81
+ integration: {
82
+ id: config.id,
83
+ name: config.name,
84
+ ...config.description !== void 0 ? { description: config.description } : {},
85
+ auth: config.auth,
86
+ ...config.proxy ? { proxy: config.proxy } : {},
87
+ ...config.needsRawSecret === true ? { needsRawSecret: true } : {},
88
+ ...config.connections ? { connections: config.connections } : {}
89
+ },
90
+ credentialSet,
91
+ internalCredentialSets,
92
+ allInternalCredentialSets
93
+ });
94
+ }
95
+
96
+ //#endregion
97
+ //#region src/_official/provider-app.ts
98
+ const salesforceAppCredentialSet = new CredentialSet({
99
+ id: officialCredentialSetId("salesforce-app"),
100
+ exposure: "platform-only",
101
+ name: "Salesforce Connected App",
102
+ auth: z.object({
103
+ clientId: z.string().min(1),
104
+ clientSecret: z.string().min(1)
105
+ })
106
+ });
107
+ const salesforceOfficialProviderSeed = {
108
+ provider: "salesforce",
109
+ appRef: "salesforce-platform",
110
+ displayName: "Salesforce Platform",
111
+ credentialSetName: "Keystroke Salesforce Platform App",
112
+ envShape: {
113
+ KEYSTROKE_OFFICIAL_SALESFORCE_CLIENT_ID: z.string().optional(),
114
+ KEYSTROKE_OFFICIAL_SALESFORCE_CLIENT_SECRET: z.string().optional(),
115
+ KEYSTROKE_OFFICIAL_SALESFORCE_ENVIRONMENT: z.enum(["production", "sandbox"]).optional(),
116
+ KEYSTROKE_OFFICIAL_SALESFORCE_LOGIN_BASE_URL: z.string().url().optional()
117
+ },
118
+ requiredEnvKeys: ["KEYSTROKE_OFFICIAL_SALESFORCE_CLIENT_ID", "KEYSTROKE_OFFICIAL_SALESFORCE_CLIENT_SECRET"],
119
+ externalAppIdEnvKey: "KEYSTROKE_OFFICIAL_SALESFORCE_CLIENT_ID",
120
+ buildCredentials: (env) => ({
121
+ clientId: env.KEYSTROKE_OFFICIAL_SALESFORCE_CLIENT_ID,
122
+ clientSecret: env.KEYSTROKE_OFFICIAL_SALESFORCE_CLIENT_SECRET
123
+ }),
124
+ buildMetadata: (env) => env.KEYSTROKE_OFFICIAL_SALESFORCE_ENVIRONMENT || env.KEYSTROKE_OFFICIAL_SALESFORCE_LOGIN_BASE_URL ? {
125
+ ...env.KEYSTROKE_OFFICIAL_SALESFORCE_ENVIRONMENT ? { environment: env.KEYSTROKE_OFFICIAL_SALESFORCE_ENVIRONMENT } : {},
126
+ ...env.KEYSTROKE_OFFICIAL_SALESFORCE_LOGIN_BASE_URL ? { loginBaseUrl: env.KEYSTROKE_OFFICIAL_SALESFORCE_LOGIN_BASE_URL } : {}
127
+ } : void 0
128
+ };
129
+
130
+ //#endregion
131
+ //#region ../../packages/credential-connection/dist/defaults-YE9AvLIc.mjs
132
+ /**
133
+ * Shared OAuth 2.0 token-response plumbing.
134
+ *
135
+ * `parseOAuthTokenResponse` handles the two common wire formats (JSON and
136
+ * form-urlencoded, the latter used by GitHub unless you explicitly ask for
137
+ * JSON). `normalizeOAuthTokens` pulls the standard fields out of the parsed
138
+ * body in both the flat form and Slack's nested `authed_user.access_token`
139
+ * form. These helpers are exposed so integration authors overriding
140
+ * `exchangeCode` / `refreshToken` do not have to re-implement them.
141
+ */
142
+ var TokenExchangeError = class extends Error {
143
+ httpStatus;
144
+ constructor(httpStatus) {
145
+ super(`Token exchange failed: HTTP ${httpStatus}`);
146
+ this.name = "TokenExchangeError";
147
+ this.httpStatus = httpStatus;
148
+ }
149
+ };
150
+ async function parseOAuthTokenResponse(response) {
151
+ const contentType = response.headers.get("content-type")?.toLowerCase() ?? "";
152
+ if (contentType.includes("application/json")) return await response.json();
153
+ const text = await response.text();
154
+ if (!text.trim()) return {};
155
+ if (contentType.includes("application/x-www-form-urlencoded") || text.includes("=")) {
156
+ const params = new URLSearchParams(text);
157
+ return Object.fromEntries(params.entries());
158
+ }
159
+ throw new Error(`Unsupported OAuth token response content type: ${contentType || "unknown"}`);
160
+ }
161
+ function normalizeOAuthTokens(tokenData) {
162
+ const authedUser = tokenData.authed_user;
163
+ const rawAccessToken = tokenData.access_token ?? authedUser?.access_token;
164
+ const rawRefreshToken = tokenData.refresh_token;
165
+ const rawExpiresIn = tokenData.expires_in;
166
+ const rawInstanceUrl = tokenData.instance_url;
167
+ return {
168
+ accessToken: typeof rawAccessToken === "string" ? rawAccessToken : void 0,
169
+ refreshToken: typeof rawRefreshToken === "string" ? rawRefreshToken : void 0,
170
+ expiresIn: typeof rawExpiresIn === "number" ? rawExpiresIn : typeof rawExpiresIn === "string" ? Number(rawExpiresIn) || void 0 : void 0,
171
+ instanceUrl: typeof rawInstanceUrl === "string" ? rawInstanceUrl : void 0
172
+ };
173
+ }
174
+ function buildAuthUrl(ctx) {
175
+ const { oauthClient, redirectUri, state, connection } = ctx;
176
+ const scopes = ctx.requestedScopes ?? connection.scopes;
177
+ const url = new URL(connection.authUrl);
178
+ url.searchParams.set("client_id", oauthClient.clientId);
179
+ url.searchParams.set("scope", scopes.join(" "));
180
+ url.searchParams.set("redirect_uri", redirectUri);
181
+ url.searchParams.set("state", state);
182
+ url.searchParams.set("response_type", "code");
183
+ return url.toString();
184
+ }
185
+ async function exchangeToken(params) {
186
+ const response = await fetch(params.tokenUrl, {
187
+ method: "POST",
188
+ headers: {
189
+ Accept: "application/json",
190
+ "Content-Type": "application/x-www-form-urlencoded"
191
+ },
192
+ body: params.body
193
+ });
194
+ if (!response.ok) throw new TokenExchangeError(response.status);
195
+ const raw = await parseOAuthTokenResponse(response);
196
+ const { accessToken, refreshToken, expiresIn, instanceUrl } = normalizeOAuthTokens(raw);
197
+ if (!accessToken) throw new Error("No access token in response");
198
+ return {
199
+ accessToken,
200
+ refreshToken,
201
+ expiresIn,
202
+ instanceUrl,
203
+ raw
204
+ };
205
+ }
206
+ async function exchangeCode(ctx) {
207
+ const { oauthClient, code, redirectUri, connection } = ctx;
208
+ if (!code) throw new Error("Missing authorization code");
209
+ return exchangeToken({
210
+ tokenUrl: connection.tokenUrl,
211
+ body: new URLSearchParams({
212
+ code,
213
+ client_id: oauthClient.clientId,
214
+ client_secret: oauthClient.clientSecret,
215
+ redirect_uri: redirectUri,
216
+ grant_type: "authorization_code"
217
+ })
218
+ });
219
+ }
220
+ async function refreshToken(ctx) {
221
+ const { oauthClient, refreshToken, connection } = ctx;
222
+ return exchangeToken({
223
+ tokenUrl: connection.tokenUrl,
224
+ body: new URLSearchParams({
225
+ grant_type: "refresh_token",
226
+ refresh_token: refreshToken,
227
+ client_id: oauthClient.clientId,
228
+ client_secret: oauthClient.clientSecret
229
+ })
230
+ });
231
+ }
232
+ const oauthDefaults = {
233
+ buildAuthUrl,
234
+ exchangeCode,
235
+ exchangeToken,
236
+ refreshToken
237
+ };
238
+
239
+ //#endregion
240
+ //#region src/oauth-connection.ts
241
+ function getMetadataValue(metadata, key) {
242
+ if (!metadata || typeof metadata !== "object" || !(key in metadata)) return;
243
+ const value = metadata[key];
244
+ if (typeof value === "string" || typeof value === "boolean") return value;
245
+ }
246
+ function resolveSalesforceLoginBaseUrl(metadata) {
247
+ const explicitBaseUrl = getMetadataValue(metadata, "loginBaseUrl");
248
+ if (typeof explicitBaseUrl === "string" && explicitBaseUrl.length > 0) return explicitBaseUrl;
249
+ if (getMetadataValue(metadata, "environment") === "sandbox") return "https://test.salesforce.com";
250
+ if (getMetadataValue(metadata, "sandbox") === true) return "https://test.salesforce.com";
251
+ return "https://login.salesforce.com";
252
+ }
253
+ function buildSalesforceUrl(metadata, path) {
254
+ return new URL(path, resolveSalesforceLoginBaseUrl(metadata)).toString();
255
+ }
256
+ const salesforceOAuthConnection = {
257
+ kind: "oauth",
258
+ tokenType: "refreshable",
259
+ authUrl: "https://login.salesforce.com/services/oauth2/authorize",
260
+ tokenUrl: "https://login.salesforce.com/services/oauth2/token",
261
+ revokeUrl: null,
262
+ scopes: [
263
+ "api",
264
+ "refresh_token",
265
+ "offline_access"
266
+ ],
267
+ vault: {
268
+ accessToken: "SALESFORCE_ACCESS_TOKEN",
269
+ instanceUrl: "SALESFORCE_INSTANCE_URL"
270
+ },
271
+ buildAuthUrl({ oauthClient, redirectUri, state, connection, requestedScopes }) {
272
+ const scopes = requestedScopes ?? connection.scopes;
273
+ const url = new URL(buildSalesforceUrl(oauthClient.metadata, "/services/oauth2/authorize"));
274
+ url.searchParams.set("client_id", oauthClient.clientId);
275
+ url.searchParams.set("scope", scopes.join(" "));
276
+ url.searchParams.set("redirect_uri", redirectUri);
277
+ url.searchParams.set("state", state);
278
+ url.searchParams.set("response_type", "code");
279
+ return url.toString();
280
+ },
281
+ async exchangeCode({ oauthClient, code, redirectUri }) {
282
+ if (!code) throw new Error("Missing authorization code");
283
+ return oauthDefaults.exchangeToken({
284
+ tokenUrl: buildSalesforceUrl(oauthClient.metadata, "/services/oauth2/token"),
285
+ body: new URLSearchParams({
286
+ code,
287
+ client_id: oauthClient.clientId,
288
+ client_secret: oauthClient.clientSecret,
289
+ redirect_uri: redirectUri,
290
+ grant_type: "authorization_code"
291
+ })
292
+ });
293
+ },
294
+ async refreshToken({ oauthClient, refreshToken }) {
295
+ return oauthDefaults.exchangeToken({
296
+ tokenUrl: buildSalesforceUrl(oauthClient.metadata, "/services/oauth2/token"),
297
+ body: new URLSearchParams({
298
+ grant_type: "refresh_token",
299
+ refresh_token: refreshToken,
300
+ client_id: oauthClient.clientId,
301
+ client_secret: oauthClient.clientSecret
302
+ })
303
+ });
304
+ }
305
+ };
306
+
307
+ //#endregion
308
+ //#region src/integration.ts
309
+ const salesforceAuthSchema = z.object({
310
+ SALESFORCE_ACCESS_TOKEN: z.string().min(1),
311
+ SALESFORCE_INSTANCE_URL: z.url()
312
+ });
313
+ const salesforceOfficialIntegration = {
314
+ id: "salesforce",
315
+ name: "Salesforce",
316
+ description: "Salesforce CRM and platform automation",
317
+ auth: salesforceAuthSchema,
318
+ proxy: { hosts: ["*.salesforce.com", "*.force.com"] },
319
+ connections: [{
320
+ id: "oauth",
321
+ ...salesforceOAuthConnection
322
+ }]
323
+ };
324
+ const salesforceBundle = defineOfficialIntegration({
325
+ ...salesforceOfficialIntegration,
326
+ internal: { providerApp: salesforceAppCredentialSet }
327
+ });
328
+ const salesforce = salesforceBundle.credentialSet;
329
+
330
+ //#endregion
331
+ export { salesforceOfficialProviderSeed as a, salesforceAppCredentialSet as i, salesforceBundle as n, createOfficialOperationFactory as o, salesforceOfficialIntegration as r, salesforce as t };
@@ -1,6 +1,5 @@
1
- import * as _keystrokehq_integration_authoring_official0 from "@keystrokehq/integration-authoring/official";
2
- import { z } from "zod";
3
1
  import * as _keystrokehq_core0 from "@keystrokehq/core";
2
+ import { z } from "zod";
4
3
  import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
5
4
  import { InferCredentialSetAuth } from "@keystrokehq/core/credential-set";
6
5
 
@@ -46,11 +45,11 @@ declare const salesforceOfficialIntegration: {
46
45
  id: string;
47
46
  }[];
48
47
  };
49
- declare const salesforceBundle: _keystrokehq_integration_authoring_official0.OfficialIntegrationBundle<"salesforce", z.ZodObject<{
48
+ declare const salesforceBundle: undefined<"salesforce", z.ZodObject<{
50
49
  SALESFORCE_ACCESS_TOKEN: z.ZodString;
51
50
  SALESFORCE_INSTANCE_URL: z.ZodURL;
52
51
  }, z.core.$strip>>;
53
- declare const salesforce: _keystrokehq_core0.CredentialSet<"keystroke:salesforce", z.ZodObject<{
52
+ declare const salesforce: _keystrokehq_core0.CredentialSet<"salesforce", z.ZodObject<{
54
53
  SALESFORCE_ACCESS_TOKEN: z.ZodString;
55
54
  SALESFORCE_INSTANCE_URL: z.ZodURL;
56
55
  }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
package/dist/leads.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import * as zod from "zod";
2
1
  import * as _keystrokehq_core0 from "@keystrokehq/core";
2
+ import * as zod from "zod";
3
3
  import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
4
4
  import * as zod_v4_core0 from "zod/v4/core";
5
5
 
@@ -13,7 +13,7 @@ declare const getLead: _keystrokehq_core0.Operation<zod.ZodObject<{
13
13
  type: zod.ZodString;
14
14
  url: zod.ZodString;
15
15
  }, zod_v4_core0.$strip>>;
16
- }, zod_v4_core0.$catchall<zod.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:salesforce", zod.ZodObject<{
16
+ }, zod_v4_core0.$catchall<zod.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"salesforce", zod.ZodObject<{
17
17
  SALESFORCE_ACCESS_TOKEN: zod.ZodString;
18
18
  SALESFORCE_INSTANCE_URL: zod.ZodURL;
19
19
  }, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
@@ -40,7 +40,7 @@ declare const listLeads: _keystrokehq_core0.Operation<zod.ZodObject<{
40
40
  url: zod.ZodString;
41
41
  }, zod_v4_core0.$strip>>;
42
42
  }, zod_v4_core0.$catchall<zod.ZodUnknown>>>;
43
- }, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:salesforce", zod.ZodObject<{
43
+ }, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"salesforce", zod.ZodObject<{
44
44
  SALESFORCE_ACCESS_TOKEN: zod.ZodString;
45
45
  SALESFORCE_INSTANCE_URL: zod.ZodURL;
46
46
  }, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
@@ -56,7 +56,7 @@ declare const createLead: _keystrokehq_core0.Operation<zod.ZodObject<{
56
56
  type: zod.ZodString;
57
57
  url: zod.ZodString;
58
58
  }, zod_v4_core0.$strip>>;
59
- }, zod_v4_core0.$catchall<zod.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:salesforce", zod.ZodObject<{
59
+ }, zod_v4_core0.$catchall<zod.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"salesforce", zod.ZodObject<{
60
60
  SALESFORCE_ACCESS_TOKEN: zod.ZodString;
61
61
  SALESFORCE_INSTANCE_URL: zod.ZodURL;
62
62
  }, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
@@ -73,7 +73,7 @@ declare const updateLead: _keystrokehq_core0.Operation<zod.ZodObject<{
73
73
  type: zod.ZodString;
74
74
  url: zod.ZodString;
75
75
  }, zod_v4_core0.$strip>>;
76
- }, zod_v4_core0.$catchall<zod.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:salesforce", zod.ZodObject<{
76
+ }, zod_v4_core0.$catchall<zod.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"salesforce", zod.ZodObject<{
77
77
  SALESFORCE_ACCESS_TOKEN: zod.ZodString;
78
78
  SALESFORCE_INSTANCE_URL: zod.ZodURL;
79
79
  }, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
@@ -86,7 +86,7 @@ declare const deleteLead: _keystrokehq_core0.Operation<zod.ZodObject<{
86
86
  success: zod.ZodBoolean;
87
87
  id: zod.ZodOptional<zod.ZodString>;
88
88
  errors: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
89
- }, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:salesforce", zod.ZodObject<{
89
+ }, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"salesforce", zod.ZodObject<{
90
90
  SALESFORCE_ACCESS_TOKEN: zod.ZodString;
91
91
  SALESFORCE_INSTANCE_URL: zod.ZodURL;
92
92
  }, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
package/dist/leads.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { n as createSalesforceCrudOperations } from "./shared-Cp54E0DL.mjs";
1
+ import { n as createSalesforceCrudOperations } from "./shared-P5lushwa.mjs";
2
2
 
3
3
  //#region src/leads.ts
4
4
  const leadCrud = createSalesforceCrudOperations({
package/dist/notes.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import * as zod from "zod";
2
1
  import * as _keystrokehq_core0 from "@keystrokehq/core";
2
+ import * as zod from "zod";
3
3
  import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
4
4
  import * as zod_v4_core0 from "zod/v4/core";
5
5
 
@@ -13,7 +13,7 @@ declare const getNote: _keystrokehq_core0.Operation<zod.ZodObject<{
13
13
  type: zod.ZodString;
14
14
  url: zod.ZodString;
15
15
  }, zod_v4_core0.$strip>>;
16
- }, zod_v4_core0.$catchall<zod.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:salesforce", zod.ZodObject<{
16
+ }, zod_v4_core0.$catchall<zod.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"salesforce", zod.ZodObject<{
17
17
  SALESFORCE_ACCESS_TOKEN: zod.ZodString;
18
18
  SALESFORCE_INSTANCE_URL: zod.ZodURL;
19
19
  }, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
@@ -40,7 +40,7 @@ declare const listNotes: _keystrokehq_core0.Operation<zod.ZodObject<{
40
40
  url: zod.ZodString;
41
41
  }, zod_v4_core0.$strip>>;
42
42
  }, zod_v4_core0.$catchall<zod.ZodUnknown>>>;
43
- }, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:salesforce", zod.ZodObject<{
43
+ }, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"salesforce", zod.ZodObject<{
44
44
  SALESFORCE_ACCESS_TOKEN: zod.ZodString;
45
45
  SALESFORCE_INSTANCE_URL: zod.ZodURL;
46
46
  }, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
@@ -56,7 +56,7 @@ declare const createNote: _keystrokehq_core0.Operation<zod.ZodObject<{
56
56
  type: zod.ZodString;
57
57
  url: zod.ZodString;
58
58
  }, zod_v4_core0.$strip>>;
59
- }, zod_v4_core0.$catchall<zod.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:salesforce", zod.ZodObject<{
59
+ }, zod_v4_core0.$catchall<zod.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"salesforce", zod.ZodObject<{
60
60
  SALESFORCE_ACCESS_TOKEN: zod.ZodString;
61
61
  SALESFORCE_INSTANCE_URL: zod.ZodURL;
62
62
  }, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
@@ -73,7 +73,7 @@ declare const updateNote: _keystrokehq_core0.Operation<zod.ZodObject<{
73
73
  type: zod.ZodString;
74
74
  url: zod.ZodString;
75
75
  }, zod_v4_core0.$strip>>;
76
- }, zod_v4_core0.$catchall<zod.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:salesforce", zod.ZodObject<{
76
+ }, zod_v4_core0.$catchall<zod.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"salesforce", zod.ZodObject<{
77
77
  SALESFORCE_ACCESS_TOKEN: zod.ZodString;
78
78
  SALESFORCE_INSTANCE_URL: zod.ZodURL;
79
79
  }, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
@@ -86,7 +86,7 @@ declare const deleteNote: _keystrokehq_core0.Operation<zod.ZodObject<{
86
86
  success: zod.ZodBoolean;
87
87
  id: zod.ZodOptional<zod.ZodString>;
88
88
  errors: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
89
- }, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:salesforce", zod.ZodObject<{
89
+ }, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"salesforce", zod.ZodObject<{
90
90
  SALESFORCE_ACCESS_TOKEN: zod.ZodString;
91
91
  SALESFORCE_INSTANCE_URL: zod.ZodURL;
92
92
  }, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
package/dist/notes.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { n as createSalesforceCrudOperations } from "./shared-Cp54E0DL.mjs";
1
+ import { n as createSalesforceCrudOperations } from "./shared-P5lushwa.mjs";
2
2
 
3
3
  //#region src/notes.ts
4
4
  const noteCrud = createSalesforceCrudOperations({
@@ -1,9 +1,9 @@
1
- import { z } from "zod";
2
1
  import * as _keystrokehq_core0 from "@keystrokehq/core";
2
+ import { z } from "zod";
3
3
  import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
4
4
 
5
5
  //#region src/objects.d.ts
6
- declare const listObjects: _keystrokehq_core0.Operation<z.ZodObject<{}, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:salesforce", z.ZodObject<{
6
+ declare const listObjects: _keystrokehq_core0.Operation<z.ZodObject<{}, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, readonly [_keystrokehq_core0.CredentialSet<"salesforce", z.ZodObject<{
7
7
  SALESFORCE_ACCESS_TOKEN: z.ZodString;
8
8
  SALESFORCE_INSTANCE_URL: z.ZodURL;
9
9
  }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
@@ -12,7 +12,7 @@ declare const listObjects: _keystrokehq_core0.Operation<z.ZodObject<{}, z.core.$
12
12
  }, z.core.$strip>>[] | undefined>], undefined>;
13
13
  declare const describeObject: _keystrokehq_core0.Operation<z.ZodObject<{
14
14
  objectName: z.ZodString;
15
- }, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:salesforce", z.ZodObject<{
15
+ }, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, readonly [_keystrokehq_core0.CredentialSet<"salesforce", z.ZodObject<{
16
16
  SALESFORCE_ACCESS_TOKEN: z.ZodString;
17
17
  SALESFORCE_INSTANCE_URL: z.ZodURL;
18
18
  }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
package/dist/objects.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { createSalesforceClient } from "./client.mjs";
2
- import { r as salesforceGenericObjectSchema } from "./common-BUAhHMqn.mjs";
3
- import { t as salesforceOperation } from "./factory-Dt72AT6c.mjs";
2
+ import { r as salesforceGenericObjectSchema } from "./common-wiFkMAq5.mjs";
3
+ import { t as salesforceOperation } from "./factory-CxfYmb6l.mjs";
4
4
  import { z } from "zod";
5
5
 
6
6
  //#region src/objects.ts
@@ -1,5 +1,5 @@
1
- import * as zod from "zod";
2
1
  import * as _keystrokehq_core0 from "@keystrokehq/core";
2
+ import * as zod from "zod";
3
3
  import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
4
4
  import * as zod_v4_core0 from "zod/v4/core";
5
5
 
@@ -13,7 +13,7 @@ declare const getOpportunity: _keystrokehq_core0.Operation<zod.ZodObject<{
13
13
  type: zod.ZodString;
14
14
  url: zod.ZodString;
15
15
  }, zod_v4_core0.$strip>>;
16
- }, zod_v4_core0.$catchall<zod.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:salesforce", zod.ZodObject<{
16
+ }, zod_v4_core0.$catchall<zod.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"salesforce", zod.ZodObject<{
17
17
  SALESFORCE_ACCESS_TOKEN: zod.ZodString;
18
18
  SALESFORCE_INSTANCE_URL: zod.ZodURL;
19
19
  }, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
@@ -40,7 +40,7 @@ declare const listOpportunities: _keystrokehq_core0.Operation<zod.ZodObject<{
40
40
  url: zod.ZodString;
41
41
  }, zod_v4_core0.$strip>>;
42
42
  }, zod_v4_core0.$catchall<zod.ZodUnknown>>>;
43
- }, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:salesforce", zod.ZodObject<{
43
+ }, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"salesforce", zod.ZodObject<{
44
44
  SALESFORCE_ACCESS_TOKEN: zod.ZodString;
45
45
  SALESFORCE_INSTANCE_URL: zod.ZodURL;
46
46
  }, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
@@ -56,7 +56,7 @@ declare const createOpportunity: _keystrokehq_core0.Operation<zod.ZodObject<{
56
56
  type: zod.ZodString;
57
57
  url: zod.ZodString;
58
58
  }, zod_v4_core0.$strip>>;
59
- }, zod_v4_core0.$catchall<zod.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:salesforce", zod.ZodObject<{
59
+ }, zod_v4_core0.$catchall<zod.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"salesforce", zod.ZodObject<{
60
60
  SALESFORCE_ACCESS_TOKEN: zod.ZodString;
61
61
  SALESFORCE_INSTANCE_URL: zod.ZodURL;
62
62
  }, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
@@ -73,7 +73,7 @@ declare const updateOpportunity: _keystrokehq_core0.Operation<zod.ZodObject<{
73
73
  type: zod.ZodString;
74
74
  url: zod.ZodString;
75
75
  }, zod_v4_core0.$strip>>;
76
- }, zod_v4_core0.$catchall<zod.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:salesforce", zod.ZodObject<{
76
+ }, zod_v4_core0.$catchall<zod.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"salesforce", zod.ZodObject<{
77
77
  SALESFORCE_ACCESS_TOKEN: zod.ZodString;
78
78
  SALESFORCE_INSTANCE_URL: zod.ZodURL;
79
79
  }, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
@@ -86,7 +86,7 @@ declare const deleteOpportunity: _keystrokehq_core0.Operation<zod.ZodObject<{
86
86
  success: zod.ZodBoolean;
87
87
  id: zod.ZodOptional<zod.ZodString>;
88
88
  errors: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
89
- }, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:salesforce", zod.ZodObject<{
89
+ }, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"salesforce", zod.ZodObject<{
90
90
  SALESFORCE_ACCESS_TOKEN: zod.ZodString;
91
91
  SALESFORCE_INSTANCE_URL: zod.ZodURL;
92
92
  }, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
@@ -1,4 +1,4 @@
1
- import { n as createSalesforceCrudOperations } from "./shared-Cp54E0DL.mjs";
1
+ import { n as createSalesforceCrudOperations } from "./shared-P5lushwa.mjs";
2
2
 
3
3
  //#region src/opportunities.ts
4
4
  const opportunityCrud = createSalesforceCrudOperations({
@@ -1,5 +1,5 @@
1
- import * as zod from "zod";
2
1
  import * as _keystrokehq_core0 from "@keystrokehq/core";
2
+ import * as zod from "zod";
3
3
  import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
4
4
  import * as zod_v4_core0 from "zod/v4/core";
5
5
 
@@ -13,7 +13,7 @@ declare const getOpportunityLineItem: _keystrokehq_core0.Operation<zod.ZodObject
13
13
  type: zod.ZodString;
14
14
  url: zod.ZodString;
15
15
  }, zod_v4_core0.$strip>>;
16
- }, zod_v4_core0.$catchall<zod.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:salesforce", zod.ZodObject<{
16
+ }, zod_v4_core0.$catchall<zod.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"salesforce", zod.ZodObject<{
17
17
  SALESFORCE_ACCESS_TOKEN: zod.ZodString;
18
18
  SALESFORCE_INSTANCE_URL: zod.ZodURL;
19
19
  }, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
@@ -40,7 +40,7 @@ declare const listOpportunityLineItems: _keystrokehq_core0.Operation<zod.ZodObje
40
40
  url: zod.ZodString;
41
41
  }, zod_v4_core0.$strip>>;
42
42
  }, zod_v4_core0.$catchall<zod.ZodUnknown>>>;
43
- }, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:salesforce", zod.ZodObject<{
43
+ }, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"salesforce", zod.ZodObject<{
44
44
  SALESFORCE_ACCESS_TOKEN: zod.ZodString;
45
45
  SALESFORCE_INSTANCE_URL: zod.ZodURL;
46
46
  }, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
@@ -56,7 +56,7 @@ declare const createOpportunityLineItem: _keystrokehq_core0.Operation<zod.ZodObj
56
56
  type: zod.ZodString;
57
57
  url: zod.ZodString;
58
58
  }, zod_v4_core0.$strip>>;
59
- }, zod_v4_core0.$catchall<zod.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:salesforce", zod.ZodObject<{
59
+ }, zod_v4_core0.$catchall<zod.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"salesforce", zod.ZodObject<{
60
60
  SALESFORCE_ACCESS_TOKEN: zod.ZodString;
61
61
  SALESFORCE_INSTANCE_URL: zod.ZodURL;
62
62
  }, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
@@ -73,7 +73,7 @@ declare const updateOpportunityLineItem: _keystrokehq_core0.Operation<zod.ZodObj
73
73
  type: zod.ZodString;
74
74
  url: zod.ZodString;
75
75
  }, zod_v4_core0.$strip>>;
76
- }, zod_v4_core0.$catchall<zod.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:salesforce", zod.ZodObject<{
76
+ }, zod_v4_core0.$catchall<zod.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"salesforce", zod.ZodObject<{
77
77
  SALESFORCE_ACCESS_TOKEN: zod.ZodString;
78
78
  SALESFORCE_INSTANCE_URL: zod.ZodURL;
79
79
  }, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
@@ -86,7 +86,7 @@ declare const deleteOpportunityLineItem: _keystrokehq_core0.Operation<zod.ZodObj
86
86
  success: zod.ZodBoolean;
87
87
  id: zod.ZodOptional<zod.ZodString>;
88
88
  errors: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
89
- }, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:salesforce", zod.ZodObject<{
89
+ }, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"salesforce", zod.ZodObject<{
90
90
  SALESFORCE_ACCESS_TOKEN: zod.ZodString;
91
91
  SALESFORCE_INSTANCE_URL: zod.ZodURL;
92
92
  }, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
@@ -1,4 +1,4 @@
1
- import { n as createSalesforceCrudOperations } from "./shared-Cp54E0DL.mjs";
1
+ import { n as createSalesforceCrudOperations } from "./shared-P5lushwa.mjs";
2
2
 
3
3
  //#region src/opportunity-line-items.ts
4
4
  const opportunityLineItemCrud = createSalesforceCrudOperations({
@@ -1,5 +1,5 @@
1
- import { z } from "zod";
2
1
  import * as _keystrokehq_core0 from "@keystrokehq/core";
2
+ import { z } from "zod";
3
3
  import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
4
4
 
5
5
  //#region src/ownership.d.ts
@@ -14,7 +14,7 @@ declare const transferRecordOwnership: _keystrokehq_core0.Operation<z.ZodObject<
14
14
  type: z.ZodString;
15
15
  url: z.ZodString;
16
16
  }, z.core.$strip>>;
17
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:salesforce", z.ZodObject<{
17
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"salesforce", z.ZodObject<{
18
18
  SALESFORCE_ACCESS_TOKEN: z.ZodString;
19
19
  SALESFORCE_INSTANCE_URL: z.ZodURL;
20
20
  }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
@@ -1,7 +1,7 @@
1
1
  import { createSalesforceClient } from "./client.mjs";
2
- import { i as salesforceIdSchema, s as salesforceRecordSchema } from "./common-BUAhHMqn.mjs";
3
- import { t as salesforceOperation } from "./factory-Dt72AT6c.mjs";
4
- import { a as normalizeSalesforceQueryResult, i as getSelectFields, o as salesforceFieldListSchema, r as ensureMutationSuccess, t as buildSelectQuery } from "./shared-Cp54E0DL.mjs";
2
+ import { i as salesforceIdSchema, s as salesforceRecordSchema } from "./common-wiFkMAq5.mjs";
3
+ import { t as salesforceOperation } from "./factory-CxfYmb6l.mjs";
4
+ import { a as normalizeSalesforceQueryResult, i as getSelectFields, o as salesforceFieldListSchema, r as ensureMutationSuccess, t as buildSelectQuery } from "./shared-P5lushwa.mjs";
5
5
  import { z } from "zod";
6
6
 
7
7
  //#region src/ownership.ts