@major-tech/resource-client 0.2.40 → 0.2.44

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 (270) hide show
  1. package/dist/clients/slack.d.ts +21 -0
  2. package/dist/clients/slack.d.ts.map +1 -1
  3. package/dist/index.cjs +1952 -45
  4. package/dist/index.cjs.map +4 -4
  5. package/dist/index.js +1952 -29
  6. package/dist/index.js.map +7 -1
  7. package/dist/payload-builders/from-extracted-params.d.ts.map +1 -1
  8. package/dist/payload-builders/slack.d.ts +11 -0
  9. package/dist/payload-builders/slack.d.ts.map +1 -1
  10. package/package.json +1 -1
  11. package/dist/base.cjs +0 -78
  12. package/dist/base.cjs.map +0 -7
  13. package/dist/base.js +0 -52
  14. package/dist/base.js.map +0 -1
  15. package/dist/clients/api-custom.cjs +0 -36
  16. package/dist/clients/api-custom.cjs.map +0 -7
  17. package/dist/clients/api-custom.js +0 -9
  18. package/dist/clients/api-custom.js.map +0 -1
  19. package/dist/clients/api-graphql.cjs +0 -40
  20. package/dist/clients/api-graphql.cjs.map +0 -7
  21. package/dist/clients/api-graphql.js +0 -13
  22. package/dist/clients/api-graphql.js.map +0 -1
  23. package/dist/clients/auth.cjs +0 -49
  24. package/dist/clients/auth.cjs.map +0 -7
  25. package/dist/clients/auth.js +0 -22
  26. package/dist/clients/auth.js.map +0 -1
  27. package/dist/clients/bigquery.cjs +0 -104
  28. package/dist/clients/bigquery.cjs.map +0 -7
  29. package/dist/clients/bigquery.js +0 -77
  30. package/dist/clients/bigquery.js.map +0 -1
  31. package/dist/clients/cosmosdb.cjs +0 -119
  32. package/dist/clients/cosmosdb.cjs.map +0 -7
  33. package/dist/clients/cosmosdb.js +0 -92
  34. package/dist/clients/cosmosdb.js.map +0 -1
  35. package/dist/clients/dynamodb.cjs +0 -36
  36. package/dist/clients/dynamodb.cjs.map +0 -7
  37. package/dist/clients/dynamodb.js +0 -9
  38. package/dist/clients/dynamodb.js.map +0 -1
  39. package/dist/clients/google-analytics.cjs +0 -101
  40. package/dist/clients/google-analytics.cjs.map +0 -7
  41. package/dist/clients/google-analytics.js +0 -74
  42. package/dist/clients/google-analytics.js.map +0 -1
  43. package/dist/clients/googlesheets.cjs +0 -122
  44. package/dist/clients/googlesheets.cjs.map +0 -7
  45. package/dist/clients/googlesheets.js +0 -95
  46. package/dist/clients/googlesheets.js.map +0 -1
  47. package/dist/clients/hubspot.cjs +0 -36
  48. package/dist/clients/hubspot.cjs.map +0 -7
  49. package/dist/clients/hubspot.js +0 -9
  50. package/dist/clients/hubspot.js.map +0 -1
  51. package/dist/clients/lambda.cjs +0 -81
  52. package/dist/clients/lambda.cjs.map +0 -7
  53. package/dist/clients/lambda.js +0 -54
  54. package/dist/clients/lambda.js.map +0 -1
  55. package/dist/clients/mssql.cjs +0 -59
  56. package/dist/clients/mssql.cjs.map +0 -7
  57. package/dist/clients/mssql.js +0 -32
  58. package/dist/clients/mssql.js.map +0 -1
  59. package/dist/clients/neo4j.cjs +0 -57
  60. package/dist/clients/neo4j.cjs.map +0 -7
  61. package/dist/clients/neo4j.js +0 -30
  62. package/dist/clients/neo4j.js.map +0 -1
  63. package/dist/clients/outreach.cjs +0 -51
  64. package/dist/clients/outreach.cjs.map +0 -7
  65. package/dist/clients/outreach.js +0 -24
  66. package/dist/clients/outreach.js.map +0 -1
  67. package/dist/clients/postgres.cjs +0 -59
  68. package/dist/clients/postgres.cjs.map +0 -7
  69. package/dist/clients/postgres.js +0 -32
  70. package/dist/clients/postgres.js.map +0 -1
  71. package/dist/clients/quickbooks.cjs +0 -65
  72. package/dist/clients/quickbooks.cjs.map +0 -7
  73. package/dist/clients/quickbooks.js +0 -38
  74. package/dist/clients/quickbooks.js.map +0 -1
  75. package/dist/clients/s3.cjs +0 -36
  76. package/dist/clients/s3.cjs.map +0 -7
  77. package/dist/clients/s3.js +0 -9
  78. package/dist/clients/s3.js.map +0 -1
  79. package/dist/clients/salesforce.cjs +0 -131
  80. package/dist/clients/salesforce.cjs.map +0 -7
  81. package/dist/clients/salesforce.js +0 -144
  82. package/dist/clients/salesforce.js.map +0 -1
  83. package/dist/clients/slack.cjs +0 -36
  84. package/dist/clients/slack.cjs.map +0 -7
  85. package/dist/clients/slack.js +0 -9
  86. package/dist/clients/slack.js.map +0 -1
  87. package/dist/clients/snowflake.cjs +0 -69
  88. package/dist/clients/snowflake.cjs.map +0 -7
  89. package/dist/clients/snowflake.js +0 -42
  90. package/dist/clients/snowflake.js.map +0 -1
  91. package/dist/errors.cjs +0 -38
  92. package/dist/errors.cjs.map +0 -7
  93. package/dist/errors.js +0 -15
  94. package/dist/errors.js.map +0 -1
  95. package/dist/payload-builders/auth.cjs +0 -44
  96. package/dist/payload-builders/auth.cjs.map +0 -7
  97. package/dist/payload-builders/auth.js +0 -25
  98. package/dist/payload-builders/auth.js.map +0 -1
  99. package/dist/payload-builders/bigquery.cjs +0 -103
  100. package/dist/payload-builders/bigquery.cjs.map +0 -7
  101. package/dist/payload-builders/bigquery.js +0 -103
  102. package/dist/payload-builders/bigquery.js.map +0 -1
  103. package/dist/payload-builders/cosmosdb.cjs +0 -126
  104. package/dist/payload-builders/cosmosdb.cjs.map +0 -7
  105. package/dist/payload-builders/cosmosdb.js +0 -112
  106. package/dist/payload-builders/cosmosdb.js.map +0 -1
  107. package/dist/payload-builders/custom.cjs +0 -38
  108. package/dist/payload-builders/custom.cjs.map +0 -7
  109. package/dist/payload-builders/custom.js +0 -19
  110. package/dist/payload-builders/custom.js.map +0 -1
  111. package/dist/payload-builders/dynamodb.cjs +0 -34
  112. package/dist/payload-builders/dynamodb.cjs.map +0 -7
  113. package/dist/payload-builders/dynamodb.js +0 -14
  114. package/dist/payload-builders/dynamodb.js.map +0 -1
  115. package/dist/payload-builders/from-extracted-params.cjs +0 -430
  116. package/dist/payload-builders/from-extracted-params.cjs.map +0 -7
  117. package/dist/payload-builders/from-extracted-params.js +0 -431
  118. package/dist/payload-builders/from-extracted-params.js.map +0 -1
  119. package/dist/payload-builders/google-analytics.cjs +0 -106
  120. package/dist/payload-builders/google-analytics.cjs.map +0 -7
  121. package/dist/payload-builders/google-analytics.js +0 -90
  122. package/dist/payload-builders/google-analytics.js.map +0 -1
  123. package/dist/payload-builders/googlesheets.cjs +0 -106
  124. package/dist/payload-builders/googlesheets.cjs.map +0 -7
  125. package/dist/payload-builders/googlesheets.js +0 -115
  126. package/dist/payload-builders/googlesheets.js.map +0 -1
  127. package/dist/payload-builders/graphql.cjs +0 -37
  128. package/dist/payload-builders/graphql.cjs.map +0 -7
  129. package/dist/payload-builders/graphql.js +0 -17
  130. package/dist/payload-builders/graphql.js.map +0 -1
  131. package/dist/payload-builders/hubspot.cjs +0 -37
  132. package/dist/payload-builders/hubspot.cjs.map +0 -7
  133. package/dist/payload-builders/hubspot.js +0 -18
  134. package/dist/payload-builders/hubspot.js.map +0 -1
  135. package/dist/payload-builders/index.cjs +0 -101
  136. package/dist/payload-builders/index.cjs.map +0 -7
  137. package/dist/payload-builders/index.js +0 -41
  138. package/dist/payload-builders/index.js.map +0 -1
  139. package/dist/payload-builders/lambda.cjs +0 -35
  140. package/dist/payload-builders/lambda.cjs.map +0 -7
  141. package/dist/payload-builders/lambda.js +0 -16
  142. package/dist/payload-builders/lambda.js.map +0 -1
  143. package/dist/payload-builders/mssql.cjs +0 -35
  144. package/dist/payload-builders/mssql.cjs.map +0 -7
  145. package/dist/payload-builders/mssql.js +0 -16
  146. package/dist/payload-builders/mssql.js.map +0 -1
  147. package/dist/payload-builders/neo4j.cjs +0 -35
  148. package/dist/payload-builders/neo4j.cjs.map +0 -7
  149. package/dist/payload-builders/neo4j.js +0 -16
  150. package/dist/payload-builders/neo4j.js.map +0 -1
  151. package/dist/payload-builders/outreach.cjs +0 -37
  152. package/dist/payload-builders/outreach.cjs.map +0 -7
  153. package/dist/payload-builders/outreach.js +0 -18
  154. package/dist/payload-builders/outreach.js.map +0 -1
  155. package/dist/payload-builders/postgres.cjs +0 -35
  156. package/dist/payload-builders/postgres.cjs.map +0 -7
  157. package/dist/payload-builders/postgres.js +0 -16
  158. package/dist/payload-builders/postgres.js.map +0 -1
  159. package/dist/payload-builders/quickbooks.cjs +0 -45
  160. package/dist/payload-builders/quickbooks.cjs.map +0 -7
  161. package/dist/payload-builders/quickbooks.js +0 -18
  162. package/dist/payload-builders/quickbooks.js.map +0 -1
  163. package/dist/payload-builders/s3.cjs +0 -35
  164. package/dist/payload-builders/s3.cjs.map +0 -7
  165. package/dist/payload-builders/s3.js +0 -16
  166. package/dist/payload-builders/s3.js.map +0 -1
  167. package/dist/payload-builders/salesforce.cjs +0 -87
  168. package/dist/payload-builders/salesforce.cjs.map +0 -7
  169. package/dist/payload-builders/salesforce.js +0 -91
  170. package/dist/payload-builders/salesforce.js.map +0 -1
  171. package/dist/payload-builders/slack.cjs +0 -35
  172. package/dist/payload-builders/slack.cjs.map +0 -7
  173. package/dist/payload-builders/slack.js +0 -15
  174. package/dist/payload-builders/slack.js.map +0 -1
  175. package/dist/payload-builders/snowflake.cjs +0 -70
  176. package/dist/payload-builders/snowflake.cjs.map +0 -7
  177. package/dist/payload-builders/snowflake.js +0 -57
  178. package/dist/payload-builders/snowflake.js.map +0 -1
  179. package/dist/schemas/api-custom.cjs +0 -17
  180. package/dist/schemas/api-custom.cjs.map +0 -7
  181. package/dist/schemas/api-custom.js +0 -2
  182. package/dist/schemas/api-custom.js.map +0 -1
  183. package/dist/schemas/api-googlesheets.cjs +0 -17
  184. package/dist/schemas/api-googlesheets.cjs.map +0 -7
  185. package/dist/schemas/api-googlesheets.js +0 -2
  186. package/dist/schemas/api-googlesheets.js.map +0 -1
  187. package/dist/schemas/api-graphql.cjs +0 -17
  188. package/dist/schemas/api-graphql.cjs.map +0 -7
  189. package/dist/schemas/api-graphql.js +0 -2
  190. package/dist/schemas/api-graphql.js.map +0 -1
  191. package/dist/schemas/api-hubspot.cjs +0 -17
  192. package/dist/schemas/api-hubspot.cjs.map +0 -7
  193. package/dist/schemas/api-hubspot.js +0 -2
  194. package/dist/schemas/api-hubspot.js.map +0 -1
  195. package/dist/schemas/api-outreach.cjs +0 -17
  196. package/dist/schemas/api-outreach.cjs.map +0 -7
  197. package/dist/schemas/api-outreach.js +0 -2
  198. package/dist/schemas/api-outreach.js.map +0 -1
  199. package/dist/schemas/api-quickbooks.cjs +0 -17
  200. package/dist/schemas/api-quickbooks.cjs.map +0 -7
  201. package/dist/schemas/api-quickbooks.js +0 -2
  202. package/dist/schemas/api-quickbooks.js.map +0 -1
  203. package/dist/schemas/api-salesforce.cjs +0 -17
  204. package/dist/schemas/api-salesforce.cjs.map +0 -7
  205. package/dist/schemas/api-salesforce.js +0 -2
  206. package/dist/schemas/api-salesforce.js.map +0 -1
  207. package/dist/schemas/api-slack.cjs +0 -17
  208. package/dist/schemas/api-slack.cjs.map +0 -7
  209. package/dist/schemas/api-slack.js +0 -2
  210. package/dist/schemas/api-slack.js.map +0 -1
  211. package/dist/schemas/auth.cjs +0 -17
  212. package/dist/schemas/auth.cjs.map +0 -7
  213. package/dist/schemas/auth.js +0 -5
  214. package/dist/schemas/auth.js.map +0 -1
  215. package/dist/schemas/bigquery.cjs +0 -17
  216. package/dist/schemas/bigquery.cjs.map +0 -7
  217. package/dist/schemas/bigquery.js +0 -5
  218. package/dist/schemas/bigquery.js.map +0 -1
  219. package/dist/schemas/common.cjs +0 -17
  220. package/dist/schemas/common.cjs.map +0 -7
  221. package/dist/schemas/common.js +0 -2
  222. package/dist/schemas/common.js.map +0 -1
  223. package/dist/schemas/cosmosdb.cjs +0 -17
  224. package/dist/schemas/cosmosdb.cjs.map +0 -7
  225. package/dist/schemas/cosmosdb.js +0 -2
  226. package/dist/schemas/cosmosdb.js.map +0 -1
  227. package/dist/schemas/dynamodb.cjs +0 -17
  228. package/dist/schemas/dynamodb.cjs.map +0 -7
  229. package/dist/schemas/dynamodb.js +0 -2
  230. package/dist/schemas/dynamodb.js.map +0 -1
  231. package/dist/schemas/google-analytics.cjs +0 -17
  232. package/dist/schemas/google-analytics.cjs.map +0 -7
  233. package/dist/schemas/google-analytics.js +0 -2
  234. package/dist/schemas/google-analytics.js.map +0 -1
  235. package/dist/schemas/index.cjs +0 -40
  236. package/dist/schemas/index.cjs.map +0 -7
  237. package/dist/schemas/index.js +0 -24
  238. package/dist/schemas/index.js.map +0 -1
  239. package/dist/schemas/lambda.cjs +0 -17
  240. package/dist/schemas/lambda.cjs.map +0 -7
  241. package/dist/schemas/lambda.js +0 -2
  242. package/dist/schemas/lambda.js.map +0 -1
  243. package/dist/schemas/mssql.cjs +0 -17
  244. package/dist/schemas/mssql.cjs.map +0 -7
  245. package/dist/schemas/mssql.js +0 -2
  246. package/dist/schemas/mssql.js.map +0 -1
  247. package/dist/schemas/neo4j.cjs +0 -17
  248. package/dist/schemas/neo4j.cjs.map +0 -7
  249. package/dist/schemas/neo4j.js +0 -2
  250. package/dist/schemas/neo4j.js.map +0 -1
  251. package/dist/schemas/postgres.cjs +0 -17
  252. package/dist/schemas/postgres.cjs.map +0 -7
  253. package/dist/schemas/postgres.js +0 -2
  254. package/dist/schemas/postgres.js.map +0 -1
  255. package/dist/schemas/request.cjs +0 -17
  256. package/dist/schemas/request.cjs.map +0 -7
  257. package/dist/schemas/request.js +0 -2
  258. package/dist/schemas/request.js.map +0 -1
  259. package/dist/schemas/response.cjs +0 -17
  260. package/dist/schemas/response.cjs.map +0 -7
  261. package/dist/schemas/response.js +0 -2
  262. package/dist/schemas/response.js.map +0 -1
  263. package/dist/schemas/s3.cjs +0 -17
  264. package/dist/schemas/s3.cjs.map +0 -7
  265. package/dist/schemas/s3.js +0 -2
  266. package/dist/schemas/s3.js.map +0 -1
  267. package/dist/schemas/snowflake.cjs +0 -17
  268. package/dist/schemas/snowflake.cjs.map +0 -7
  269. package/dist/schemas/snowflake.js +0 -2
  270. package/dist/schemas/snowflake.js.map +0 -1
@@ -1,131 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
- var salesforce_exports = {};
21
- __export(salesforce_exports, {
22
- SalesforceResourceClient: () => SalesforceResourceClient
23
- });
24
- module.exports = __toCommonJS(salesforce_exports);
25
- var import_base = require("../base");
26
- var import_salesforce = require("../payload-builders/salesforce");
27
- class SalesforceResourceClient extends import_base.BaseResourceClient {
28
- static {
29
- __name(this, "SalesforceResourceClient");
30
- }
31
- /**
32
- * Invoke a Salesforce API request
33
- *
34
- * @param method - HTTP method (GET, POST, PATCH, DELETE)
35
- * @param path - Salesforce API path (e.g., "/services/data/v63.0/query")
36
- * @param invocationKey - Unique key for this invocation (for tracking)
37
- * @param options - Optional query params, body, and timeout
38
- * @returns The API response with status and body
39
- */
40
- async invoke(method, path, invocationKey, options = {}) {
41
- const payload = (0, import_salesforce.buildSalesforceInvokePayload)(method, path, options);
42
- return this.invokeRaw(payload, invocationKey);
43
- }
44
- /**
45
- * Execute a SOQL query
46
- *
47
- * @param query - SOQL query string
48
- * @param invocationKey - Unique key for this invocation
49
- * @param options - Optional timeout
50
- * @returns Query results
51
- *
52
- * @example
53
- * ```typescript
54
- * const result = await client.query(
55
- * "SELECT Id, Name, CreatedDate FROM Account WHERE CreatedDate > 2024-01-01T00:00:00Z",
56
- * "recent-accounts"
57
- * );
58
- * ```
59
- */
60
- async query(query, invocationKey, options = {}) {
61
- return this.invoke("GET", "/services/data/v63.0/query", invocationKey, {
62
- query: { q: [query] },
63
- timeoutMs: options.timeoutMs
64
- });
65
- }
66
- /**
67
- * Get a single record by ID
68
- *
69
- * @param objectType - Salesforce object type (e.g., "Account", "Contact")
70
- * @param recordId - The record ID
71
- * @param invocationKey - Unique key for this invocation
72
- * @param options - Optional fields to retrieve and timeout
73
- * @returns The record data
74
- */
75
- async getRecord(objectType, recordId, invocationKey, options = {}) {
76
- const query = {};
77
- if (options.fields && options.fields.length > 0) {
78
- query.fields = [options.fields.join(",")];
79
- }
80
- return this.invoke("GET", `/services/data/v63.0/sobjects/${objectType}/${recordId}`, invocationKey, { query: Object.keys(query).length > 0 ? query : void 0, timeoutMs: options.timeoutMs });
81
- }
82
- /**
83
- * Create a new record
84
- *
85
- * @param objectType - Salesforce object type (e.g., "Account", "Contact")
86
- * @param data - Record data
87
- * @param invocationKey - Unique key for this invocation
88
- * @param options - Optional timeout
89
- * @returns The created record ID
90
- */
91
- async createRecord(objectType, data, invocationKey, options = {}) {
92
- return this.invoke("POST", `/services/data/v63.0/sobjects/${objectType}`, invocationKey, { body: { type: "json", value: data }, timeoutMs: options.timeoutMs });
93
- }
94
- /**
95
- * Update an existing record
96
- *
97
- * @param objectType - Salesforce object type (e.g., "Account", "Contact")
98
- * @param recordId - The record ID to update
99
- * @param data - Fields to update
100
- * @param invocationKey - Unique key for this invocation
101
- * @param options - Optional timeout
102
- * @returns Empty response on success
103
- */
104
- async updateRecord(objectType, recordId, data, invocationKey, options = {}) {
105
- return this.invoke("PATCH", `/services/data/v63.0/sobjects/${objectType}/${recordId}`, invocationKey, { body: { type: "json", value: data }, timeoutMs: options.timeoutMs });
106
- }
107
- /**
108
- * Delete a record
109
- *
110
- * @param objectType - Salesforce object type (e.g., "Account", "Contact")
111
- * @param recordId - The record ID to delete
112
- * @param invocationKey - Unique key for this invocation
113
- * @param options - Optional timeout
114
- * @returns Empty response on success
115
- */
116
- async deleteRecord(objectType, recordId, invocationKey, options = {}) {
117
- return this.invoke("DELETE", `/services/data/v63.0/sobjects/${objectType}/${recordId}`, invocationKey, { timeoutMs: options.timeoutMs });
118
- }
119
- /**
120
- * Describe an object to get its metadata
121
- *
122
- * @param objectType - Salesforce object type (e.g., "Account", "Contact")
123
- * @param invocationKey - Unique key for this invocation
124
- * @param options - Optional timeout
125
- * @returns Object metadata including fields, relationships, etc.
126
- */
127
- async describeObject(objectType, invocationKey, options = {}) {
128
- return this.invoke("GET", `/services/data/v63.0/sobjects/${objectType}/describe`, invocationKey, { timeoutMs: options.timeoutMs });
129
- }
130
- }
131
- //# sourceMappingURL=salesforce.cjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/clients/salesforce.ts"],
4
- "sourcesContent": ["import type {\n HttpMethod,\n QueryParams,\n ApiInvokeResponse,\n} from \"../schemas\";\nimport { BaseResourceClient } from \"../base\";\nimport { buildSalesforceInvokePayload } from \"../payload-builders/salesforce\";\n\n/**\n * Client for interacting with Salesforce API resources.\n *\n * This client provides a simple interface for making authenticated requests\n * to the Salesforce REST API. Authentication is handled automatically.\n *\n * @example\n * ```typescript\n * // Query accounts using SOQL\n * const result = await client.invoke(\n * \"GET\",\n * \"/services/data/v63.0/query\",\n * \"query-accounts\",\n * { query: { q: [\"SELECT Id, Name FROM Account LIMIT 10\"] } }\n * );\n *\n * // Get a specific account\n * const account = await client.invoke(\n * \"GET\",\n * \"/services/data/v63.0/sobjects/Account/001xx000003ABCDEF\",\n * \"get-account\"\n * );\n *\n * // Create a new account\n * const newAccount = await client.invoke(\n * \"POST\",\n * \"/services/data/v63.0/sobjects/Account\",\n * \"create-account\",\n * { body: { type: \"json\", value: { Name: \"Acme Corp\" } } }\n * );\n *\n * // Update an account\n * await client.invoke(\n * \"PATCH\",\n * \"/services/data/v63.0/sobjects/Account/001xx000003ABCDEF\",\n * \"update-account\",\n * { body: { type: \"json\", value: { Name: \"Updated Name\" } } }\n * );\n * ```\n */\nexport class SalesforceResourceClient extends BaseResourceClient {\n /**\n * Invoke a Salesforce API request\n *\n * @param method - HTTP method (GET, POST, PATCH, DELETE)\n * @param path - Salesforce API path (e.g., \"/services/data/v63.0/query\")\n * @param invocationKey - Unique key for this invocation (for tracking)\n * @param options - Optional query params, body, and timeout\n * @returns The API response with status and body\n */\n async invoke(\n method: HttpMethod,\n path: string,\n invocationKey: string,\n options: {\n query?: QueryParams;\n body?: { type: \"json\"; value: unknown };\n timeoutMs?: number;\n } = {}\n ): Promise<ApiInvokeResponse> {\n const payload = buildSalesforceInvokePayload(method, path, options);\n return this.invokeRaw(payload, invocationKey) as Promise<ApiInvokeResponse>;\n }\n\n /**\n * Execute a SOQL query\n *\n * @param query - SOQL query string\n * @param invocationKey - Unique key for this invocation\n * @param options - Optional timeout\n * @returns Query results\n *\n * @example\n * ```typescript\n * const result = await client.query(\n * \"SELECT Id, Name, CreatedDate FROM Account WHERE CreatedDate > 2024-01-01T00:00:00Z\",\n * \"recent-accounts\"\n * );\n * ```\n */\n async query(\n query: string,\n invocationKey: string,\n options: { timeoutMs?: number } = {}\n ): Promise<ApiInvokeResponse> {\n return this.invoke(\"GET\", \"/services/data/v63.0/query\", invocationKey, {\n query: { q: [query] },\n timeoutMs: options.timeoutMs,\n });\n }\n\n /**\n * Get a single record by ID\n *\n * @param objectType - Salesforce object type (e.g., \"Account\", \"Contact\")\n * @param recordId - The record ID\n * @param invocationKey - Unique key for this invocation\n * @param options - Optional fields to retrieve and timeout\n * @returns The record data\n */\n async getRecord(\n objectType: string,\n recordId: string,\n invocationKey: string,\n options: { fields?: string[]; timeoutMs?: number } = {}\n ): Promise<ApiInvokeResponse> {\n const query: QueryParams = {};\n if (options.fields && options.fields.length > 0) {\n query.fields = [options.fields.join(\",\")];\n }\n\n return this.invoke(\n \"GET\",\n `/services/data/v63.0/sobjects/${objectType}/${recordId}`,\n invocationKey,\n { query: Object.keys(query).length > 0 ? query : undefined, timeoutMs: options.timeoutMs }\n );\n }\n\n /**\n * Create a new record\n *\n * @param objectType - Salesforce object type (e.g., \"Account\", \"Contact\")\n * @param data - Record data\n * @param invocationKey - Unique key for this invocation\n * @param options - Optional timeout\n * @returns The created record ID\n */\n async createRecord(\n objectType: string,\n data: Record<string, unknown>,\n invocationKey: string,\n options: { timeoutMs?: number } = {}\n ): Promise<ApiInvokeResponse> {\n return this.invoke(\n \"POST\",\n `/services/data/v63.0/sobjects/${objectType}`,\n invocationKey,\n { body: { type: \"json\", value: data }, timeoutMs: options.timeoutMs }\n );\n }\n\n /**\n * Update an existing record\n *\n * @param objectType - Salesforce object type (e.g., \"Account\", \"Contact\")\n * @param recordId - The record ID to update\n * @param data - Fields to update\n * @param invocationKey - Unique key for this invocation\n * @param options - Optional timeout\n * @returns Empty response on success\n */\n async updateRecord(\n objectType: string,\n recordId: string,\n data: Record<string, unknown>,\n invocationKey: string,\n options: { timeoutMs?: number } = {}\n ): Promise<ApiInvokeResponse> {\n return this.invoke(\n \"PATCH\",\n `/services/data/v63.0/sobjects/${objectType}/${recordId}`,\n invocationKey,\n { body: { type: \"json\", value: data }, timeoutMs: options.timeoutMs }\n );\n }\n\n /**\n * Delete a record\n *\n * @param objectType - Salesforce object type (e.g., \"Account\", \"Contact\")\n * @param recordId - The record ID to delete\n * @param invocationKey - Unique key for this invocation\n * @param options - Optional timeout\n * @returns Empty response on success\n */\n async deleteRecord(\n objectType: string,\n recordId: string,\n invocationKey: string,\n options: { timeoutMs?: number } = {}\n ): Promise<ApiInvokeResponse> {\n return this.invoke(\n \"DELETE\",\n `/services/data/v63.0/sobjects/${objectType}/${recordId}`,\n invocationKey,\n { timeoutMs: options.timeoutMs }\n );\n }\n\n /**\n * Describe an object to get its metadata\n *\n * @param objectType - Salesforce object type (e.g., \"Account\", \"Contact\")\n * @param invocationKey - Unique key for this invocation\n * @param options - Optional timeout\n * @returns Object metadata including fields, relationships, etc.\n */\n async describeObject(\n objectType: string,\n invocationKey: string,\n options: { timeoutMs?: number } = {}\n ): Promise<ApiInvokeResponse> {\n return this.invoke(\n \"GET\",\n `/services/data/v63.0/sobjects/${objectType}/describe`,\n invocationKey,\n { timeoutMs: options.timeoutMs }\n );\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;AAKA;;;;;AAAA,kBAAmC;AACnC,wBAA6C;AA0CvC,MAAO,iCAAiC,+BAAkB;EA3ChE,OA2CgE;;;;;;;;;;;;EAU9D,MAAM,OACJ,QACA,MACA,eACA,UAII,CAAA,GAAE;AAEN,UAAM,cAAU,gDAA6B,QAAQ,MAAM,OAAO;AAClE,WAAO,KAAK,UAAU,SAAS,aAAa;EAC9C;;;;;;;;;;;;;;;;;EAkBA,MAAM,MACJ,OACA,eACA,UAAkC,CAAA,GAAE;AAEpC,WAAO,KAAK,OAAO,OAAO,8BAA8B,eAAe;MACrE,OAAO,EAAE,GAAG,CAAC,KAAK,EAAC;MACnB,WAAW,QAAQ;KACpB;EACH;;;;;;;;;;EAWA,MAAM,UACJ,YACA,UACA,eACA,UAAqD,CAAA,GAAE;AAEvD,UAAM,QAAqB,CAAA;AAC3B,QAAI,QAAQ,UAAU,QAAQ,OAAO,SAAS,GAAG;AAC/C,YAAM,SAAS,CAAC,QAAQ,OAAO,KAAK,GAAG,CAAC;IAC1C;AAEA,WAAO,KAAK,OACV,OACA,iCAAiC,UAAU,IAAI,QAAQ,IACvD,eACA,EAAE,OAAO,OAAO,KAAK,KAAK,EAAE,SAAS,IAAI,QAAQ,QAAW,WAAW,QAAQ,UAAS,CAAE;EAE9F;;;;;;;;;;EAWA,MAAM,aACJ,YACA,MACA,eACA,UAAkC,CAAA,GAAE;AAEpC,WAAO,KAAK,OACV,QACA,iCAAiC,UAAU,IAC3C,eACA,EAAE,MAAM,EAAE,MAAM,QAAQ,OAAO,KAAI,GAAI,WAAW,QAAQ,UAAS,CAAE;EAEzE;;;;;;;;;;;EAYA,MAAM,aACJ,YACA,UACA,MACA,eACA,UAAkC,CAAA,GAAE;AAEpC,WAAO,KAAK,OACV,SACA,iCAAiC,UAAU,IAAI,QAAQ,IACvD,eACA,EAAE,MAAM,EAAE,MAAM,QAAQ,OAAO,KAAI,GAAI,WAAW,QAAQ,UAAS,CAAE;EAEzE;;;;;;;;;;EAWA,MAAM,aACJ,YACA,UACA,eACA,UAAkC,CAAA,GAAE;AAEpC,WAAO,KAAK,OACV,UACA,iCAAiC,UAAU,IAAI,QAAQ,IACvD,eACA,EAAE,WAAW,QAAQ,UAAS,CAAE;EAEpC;;;;;;;;;EAUA,MAAM,eACJ,YACA,eACA,UAAkC,CAAA,GAAE;AAEpC,WAAO,KAAK,OACV,OACA,iCAAiC,UAAU,aAC3C,eACA,EAAE,WAAW,QAAQ,UAAS,CAAE;EAEpC;;",
6
- "names": []
7
- }
@@ -1,144 +0,0 @@
1
- import { BaseResourceClient } from "../base";
2
- import { buildSalesforceInvokePayload } from "../payload-builders/salesforce";
3
- /**
4
- * Client for interacting with Salesforce API resources.
5
- *
6
- * This client provides a simple interface for making authenticated requests
7
- * to the Salesforce REST API. Authentication is handled automatically.
8
- *
9
- * @example
10
- * ```typescript
11
- * // Query accounts using SOQL
12
- * const result = await client.invoke(
13
- * "GET",
14
- * "/services/data/v63.0/query",
15
- * "query-accounts",
16
- * { query: { q: ["SELECT Id, Name FROM Account LIMIT 10"] } }
17
- * );
18
- *
19
- * // Get a specific account
20
- * const account = await client.invoke(
21
- * "GET",
22
- * "/services/data/v63.0/sobjects/Account/001xx000003ABCDEF",
23
- * "get-account"
24
- * );
25
- *
26
- * // Create a new account
27
- * const newAccount = await client.invoke(
28
- * "POST",
29
- * "/services/data/v63.0/sobjects/Account",
30
- * "create-account",
31
- * { body: { type: "json", value: { Name: "Acme Corp" } } }
32
- * );
33
- *
34
- * // Update an account
35
- * await client.invoke(
36
- * "PATCH",
37
- * "/services/data/v63.0/sobjects/Account/001xx000003ABCDEF",
38
- * "update-account",
39
- * { body: { type: "json", value: { Name: "Updated Name" } } }
40
- * );
41
- * ```
42
- */
43
- export class SalesforceResourceClient extends BaseResourceClient {
44
- /**
45
- * Invoke a Salesforce API request
46
- *
47
- * @param method - HTTP method (GET, POST, PATCH, DELETE)
48
- * @param path - Salesforce API path (e.g., "/services/data/v63.0/query")
49
- * @param invocationKey - Unique key for this invocation (for tracking)
50
- * @param options - Optional query params, body, and timeout
51
- * @returns The API response with status and body
52
- */
53
- async invoke(method, path, invocationKey, options = {}) {
54
- const payload = buildSalesforceInvokePayload(method, path, options);
55
- return this.invokeRaw(payload, invocationKey);
56
- }
57
- /**
58
- * Execute a SOQL query
59
- *
60
- * @param query - SOQL query string
61
- * @param invocationKey - Unique key for this invocation
62
- * @param options - Optional timeout
63
- * @returns Query results
64
- *
65
- * @example
66
- * ```typescript
67
- * const result = await client.query(
68
- * "SELECT Id, Name, CreatedDate FROM Account WHERE CreatedDate > 2024-01-01T00:00:00Z",
69
- * "recent-accounts"
70
- * );
71
- * ```
72
- */
73
- async query(query, invocationKey, options = {}) {
74
- return this.invoke("GET", "/services/data/v63.0/query", invocationKey, {
75
- query: { q: [query] },
76
- timeoutMs: options.timeoutMs,
77
- });
78
- }
79
- /**
80
- * Get a single record by ID
81
- *
82
- * @param objectType - Salesforce object type (e.g., "Account", "Contact")
83
- * @param recordId - The record ID
84
- * @param invocationKey - Unique key for this invocation
85
- * @param options - Optional fields to retrieve and timeout
86
- * @returns The record data
87
- */
88
- async getRecord(objectType, recordId, invocationKey, options = {}) {
89
- const query = {};
90
- if (options.fields && options.fields.length > 0) {
91
- query.fields = [options.fields.join(",")];
92
- }
93
- return this.invoke("GET", `/services/data/v63.0/sobjects/${objectType}/${recordId}`, invocationKey, { query: Object.keys(query).length > 0 ? query : undefined, timeoutMs: options.timeoutMs });
94
- }
95
- /**
96
- * Create a new record
97
- *
98
- * @param objectType - Salesforce object type (e.g., "Account", "Contact")
99
- * @param data - Record data
100
- * @param invocationKey - Unique key for this invocation
101
- * @param options - Optional timeout
102
- * @returns The created record ID
103
- */
104
- async createRecord(objectType, data, invocationKey, options = {}) {
105
- return this.invoke("POST", `/services/data/v63.0/sobjects/${objectType}`, invocationKey, { body: { type: "json", value: data }, timeoutMs: options.timeoutMs });
106
- }
107
- /**
108
- * Update an existing record
109
- *
110
- * @param objectType - Salesforce object type (e.g., "Account", "Contact")
111
- * @param recordId - The record ID to update
112
- * @param data - Fields to update
113
- * @param invocationKey - Unique key for this invocation
114
- * @param options - Optional timeout
115
- * @returns Empty response on success
116
- */
117
- async updateRecord(objectType, recordId, data, invocationKey, options = {}) {
118
- return this.invoke("PATCH", `/services/data/v63.0/sobjects/${objectType}/${recordId}`, invocationKey, { body: { type: "json", value: data }, timeoutMs: options.timeoutMs });
119
- }
120
- /**
121
- * Delete a record
122
- *
123
- * @param objectType - Salesforce object type (e.g., "Account", "Contact")
124
- * @param recordId - The record ID to delete
125
- * @param invocationKey - Unique key for this invocation
126
- * @param options - Optional timeout
127
- * @returns Empty response on success
128
- */
129
- async deleteRecord(objectType, recordId, invocationKey, options = {}) {
130
- return this.invoke("DELETE", `/services/data/v63.0/sobjects/${objectType}/${recordId}`, invocationKey, { timeoutMs: options.timeoutMs });
131
- }
132
- /**
133
- * Describe an object to get its metadata
134
- *
135
- * @param objectType - Salesforce object type (e.g., "Account", "Contact")
136
- * @param invocationKey - Unique key for this invocation
137
- * @param options - Optional timeout
138
- * @returns Object metadata including fields, relationships, etc.
139
- */
140
- async describeObject(objectType, invocationKey, options = {}) {
141
- return this.invoke("GET", `/services/data/v63.0/sobjects/${objectType}/describe`, invocationKey, { timeoutMs: options.timeoutMs });
142
- }
143
- }
144
- //# sourceMappingURL=salesforce.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"salesforce.js","sourceRoot":"","sources":["../../src/clients/salesforce.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAE9E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,MAAM,OAAO,wBAAyB,SAAQ,kBAAkB;IAC9D;;;;;;;;OAQG;IACH,KAAK,CAAC,MAAM,CACV,MAAkB,EAClB,IAAY,EACZ,aAAqB,EACrB,UAII,EAAE;QAEN,MAAM,OAAO,GAAG,4BAA4B,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;QACpE,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,aAAa,CAA+B,CAAC;IAC9E,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,KAAK,CAAC,KAAK,CACT,KAAa,EACb,aAAqB,EACrB,UAAkC,EAAE;QAEpC,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,4BAA4B,EAAE,aAAa,EAAE;YACrE,KAAK,EAAE,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE;YACrB,SAAS,EAAE,OAAO,CAAC,SAAS;SAC7B,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,SAAS,CACb,UAAkB,EAClB,QAAgB,EAChB,aAAqB,EACrB,UAAqD,EAAE;QAEvD,MAAM,KAAK,GAAgB,EAAE,CAAC;QAC9B,IAAI,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAChD,KAAK,CAAC,MAAM,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;QAC5C,CAAC;QAED,OAAO,IAAI,CAAC,MAAM,CAChB,KAAK,EACL,iCAAiC,UAAU,IAAI,QAAQ,EAAE,EACzD,aAAa,EACb,EAAE,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,EAAE,CAC3F,CAAC;IACJ,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,YAAY,CAChB,UAAkB,EAClB,IAA6B,EAC7B,aAAqB,EACrB,UAAkC,EAAE;QAEpC,OAAO,IAAI,CAAC,MAAM,CAChB,MAAM,EACN,iCAAiC,UAAU,EAAE,EAC7C,aAAa,EACb,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,EAAE,CACtE,CAAC;IACJ,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,YAAY,CAChB,UAAkB,EAClB,QAAgB,EAChB,IAA6B,EAC7B,aAAqB,EACrB,UAAkC,EAAE;QAEpC,OAAO,IAAI,CAAC,MAAM,CAChB,OAAO,EACP,iCAAiC,UAAU,IAAI,QAAQ,EAAE,EACzD,aAAa,EACb,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,EAAE,CACtE,CAAC;IACJ,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,YAAY,CAChB,UAAkB,EAClB,QAAgB,EAChB,aAAqB,EACrB,UAAkC,EAAE;QAEpC,OAAO,IAAI,CAAC,MAAM,CAChB,QAAQ,EACR,iCAAiC,UAAU,IAAI,QAAQ,EAAE,EACzD,aAAa,EACb,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,EAAE,CACjC,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,cAAc,CAClB,UAAkB,EAClB,aAAqB,EACrB,UAAkC,EAAE;QAEpC,OAAO,IAAI,CAAC,MAAM,CAChB,KAAK,EACL,iCAAiC,UAAU,WAAW,EACtD,aAAa,EACb,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,EAAE,CACjC,CAAC;IACJ,CAAC;CACF"}
@@ -1,36 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
- var slack_exports = {};
21
- __export(slack_exports, {
22
- SlackResourceClient: () => SlackResourceClient
23
- });
24
- module.exports = __toCommonJS(slack_exports);
25
- var import_base = require("../base");
26
- var import_slack = require("../payload-builders/slack");
27
- class SlackResourceClient extends import_base.BaseResourceClient {
28
- static {
29
- __name(this, "SlackResourceClient");
30
- }
31
- async invoke(method, invocationKey, options = {}) {
32
- const payload = (0, import_slack.buildSlackInvokePayload)(method, options);
33
- return this.invokeRaw(payload, invocationKey);
34
- }
35
- }
36
- //# sourceMappingURL=slack.cjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/clients/slack.ts"],
4
- "sourcesContent": ["import type { ApiInvokeResponse } from \"../schemas\";\nimport { BaseResourceClient } from \"../base\";\nimport { buildSlackInvokePayload } from \"../payload-builders/slack\";\n\nexport class SlackResourceClient extends BaseResourceClient {\n async invoke(\n method: string,\n invocationKey: string,\n options: {\n body?: Record<string, unknown>;\n timeoutMs?: number;\n } = {}\n ): Promise<ApiInvokeResponse> {\n const payload = buildSlackInvokePayload(method, options);\n return this.invokeRaw(payload, invocationKey) as Promise<ApiInvokeResponse>;\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;AACA;;;;;AAAA,kBAAmC;AACnC,mBAAwC;AAElC,MAAO,4BAA4B,+BAAkB;EAH3D,OAG2D;;;EACzD,MAAM,OACJ,QACA,eACA,UAGI,CAAA,GAAE;AAEN,UAAM,cAAU,sCAAwB,QAAQ,OAAO;AACvD,WAAO,KAAK,UAAU,SAAS,aAAa;EAC9C;;",
6
- "names": []
7
- }
@@ -1,9 +0,0 @@
1
- import { BaseResourceClient } from "../base";
2
- import { buildSlackInvokePayload } from "../payload-builders/slack";
3
- export class SlackResourceClient extends BaseResourceClient {
4
- async invoke(method, invocationKey, options = {}) {
5
- const payload = buildSlackInvokePayload(method, options);
6
- return this.invokeRaw(payload, invocationKey);
7
- }
8
- }
9
- //# sourceMappingURL=slack.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"slack.js","sourceRoot":"","sources":["../../src/clients/slack.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,MAAM,OAAO,mBAAoB,SAAQ,kBAAkB;IACzD,KAAK,CAAC,MAAM,CACV,MAAc,EACd,aAAqB,EACrB,UAGI,EAAE;QAEN,MAAM,OAAO,GAAG,uBAAuB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACzD,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,aAAa,CAA+B,CAAC;IAC9E,CAAC;CACF"}
@@ -1,69 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
- var snowflake_exports = {};
21
- __export(snowflake_exports, {
22
- SnowflakeResourceClient: () => SnowflakeResourceClient
23
- });
24
- module.exports = __toCommonJS(snowflake_exports);
25
- var import_base = require("../base");
26
- var import_snowflake = require("../payload-builders/snowflake");
27
- class SnowflakeResourceClient extends import_base.BaseResourceClient {
28
- static {
29
- __name(this, "SnowflakeResourceClient");
30
- }
31
- /**
32
- * Invoke a Snowflake operation with a raw payload
33
- * @param payload The complete operation payload
34
- * @param invocationKey Unique key for tracking this invocation
35
- */
36
- async invoke(payload, invocationKey) {
37
- return this.invokeRaw((0, import_snowflake.buildSnowflakeInvokePayload)(payload), invocationKey);
38
- }
39
- /**
40
- * Execute a SQL statement
41
- * @param statement The SQL statement to execute
42
- * @param invocationKey Unique key for tracking this invocation
43
- * @param options Execution options (bindings, database overrides, async, etc.)
44
- */
45
- async execute(statement, invocationKey, options = {}) {
46
- const payload = (0, import_snowflake.buildSnowflakeExecutePayload)(statement, options);
47
- return this.invokeRaw(payload, invocationKey);
48
- }
49
- /**
50
- * Get status or results of a statement
51
- * @param statementHandle The statement handle from execute operation
52
- * @param invocationKey Unique key for tracking this invocation
53
- * @param options Status options (partition for paginated results)
54
- */
55
- async status(statementHandle, invocationKey, options = {}) {
56
- const payload = (0, import_snowflake.buildSnowflakeStatusPayload)(statementHandle, options);
57
- return this.invokeRaw(payload, invocationKey);
58
- }
59
- /**
60
- * Cancel a running statement
61
- * @param statementHandle The statement handle to cancel
62
- * @param invocationKey Unique key for tracking this invocation
63
- */
64
- async cancel(statementHandle, invocationKey) {
65
- const payload = (0, import_snowflake.buildSnowflakeCancelPayload)(statementHandle);
66
- return this.invokeRaw(payload, invocationKey);
67
- }
68
- }
69
- //# sourceMappingURL=snowflake.cjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/clients/snowflake.ts"],
4
- "sourcesContent": ["import type {\n DbSnowflakePayload,\n DbSnowflakeResult,\n SnowflakeBindingValue,\n SnowflakeSessionParameters,\n} from \"../schemas\";\nimport type { BaseInvokeSuccess, InvokeFailure } from \"../schemas/response\";\nimport { BaseResourceClient } from \"../base\";\nimport {\n buildSnowflakeInvokePayload,\n buildSnowflakeExecutePayload,\n buildSnowflakeStatusPayload,\n buildSnowflakeCancelPayload,\n} from \"../payload-builders/snowflake\";\n\n/**\n * Response type for Snowflake operations\n */\nexport type SnowflakeInvokeResponse =\n | BaseInvokeSuccess<DbSnowflakeResult>\n | InvokeFailure;\n\n/**\n * Options for execute operation\n */\nexport interface SnowflakeExecuteOptions {\n /** Parameter bindings */\n bindings?: Record<string, SnowflakeBindingValue>;\n /** Override default database */\n database?: string;\n /** Override default schema */\n schema?: string;\n /** Override default warehouse */\n warehouse?: string;\n /** Override default role */\n role?: string;\n /** Timeout in seconds (0 = max timeout of 604800s / 7 days) */\n timeout?: number;\n /** Execute asynchronously - returns statementHandle immediately */\n async?: boolean;\n /** Session parameters for this execution */\n parameters?: SnowflakeSessionParameters;\n /** Return SQL NULL as string \"null\" instead of JSON null */\n nullable?: boolean;\n /** Request ID for idempotency (auto-generated if not provided) */\n requestId?: string;\n}\n\n/**\n * Options for status operation\n */\nexport interface SnowflakeStatusOptions {\n /** For paginated results - retrieve specific partition (0-indexed) */\n partition?: number;\n}\n\nexport class SnowflakeResourceClient extends BaseResourceClient {\n /**\n * Invoke a Snowflake operation with a raw payload\n * @param payload The complete operation payload\n * @param invocationKey Unique key for tracking this invocation\n */\n async invoke(\n payload: DbSnowflakePayload,\n invocationKey: string\n ): Promise<SnowflakeInvokeResponse> {\n return this.invokeRaw(buildSnowflakeInvokePayload(payload), invocationKey) as Promise<SnowflakeInvokeResponse>;\n }\n\n /**\n * Execute a SQL statement\n * @param statement The SQL statement to execute\n * @param invocationKey Unique key for tracking this invocation\n * @param options Execution options (bindings, database overrides, async, etc.)\n */\n async execute(\n statement: string,\n invocationKey: string,\n options: SnowflakeExecuteOptions = {}\n ): Promise<SnowflakeInvokeResponse> {\n const payload = buildSnowflakeExecutePayload(statement, options);\n return this.invokeRaw(payload, invocationKey) as Promise<SnowflakeInvokeResponse>;\n }\n\n /**\n * Get status or results of a statement\n * @param statementHandle The statement handle from execute operation\n * @param invocationKey Unique key for tracking this invocation\n * @param options Status options (partition for paginated results)\n */\n async status(\n statementHandle: string,\n invocationKey: string,\n options: SnowflakeStatusOptions = {}\n ): Promise<SnowflakeInvokeResponse> {\n const payload = buildSnowflakeStatusPayload(statementHandle, options);\n return this.invokeRaw(payload, invocationKey) as Promise<SnowflakeInvokeResponse>;\n }\n\n /**\n * Cancel a running statement\n * @param statementHandle The statement handle to cancel\n * @param invocationKey Unique key for tracking this invocation\n */\n async cancel(\n statementHandle: string,\n invocationKey: string\n ): Promise<SnowflakeInvokeResponse> {\n const payload = buildSnowflakeCancelPayload(statementHandle);\n return this.invokeRaw(payload, invocationKey) as Promise<SnowflakeInvokeResponse>;\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;AAOA;;;;;AAAA,kBAAmC;AACnC,uBAKO;AA2CD,MAAO,gCAAgC,+BAAkB;EAjD/D,OAiD+D;;;;;;;;EAM7D,MAAM,OACJ,SACA,eAAqB;AAErB,WAAO,KAAK,cAAU,8CAA4B,OAAO,GAAG,aAAa;EAC3E;;;;;;;EAQA,MAAM,QACJ,WACA,eACA,UAAmC,CAAA,GAAE;AAErC,UAAM,cAAU,+CAA6B,WAAW,OAAO;AAC/D,WAAO,KAAK,UAAU,SAAS,aAAa;EAC9C;;;;;;;EAQA,MAAM,OACJ,iBACA,eACA,UAAkC,CAAA,GAAE;AAEpC,UAAM,cAAU,8CAA4B,iBAAiB,OAAO;AACpE,WAAO,KAAK,UAAU,SAAS,aAAa;EAC9C;;;;;;EAOA,MAAM,OACJ,iBACA,eAAqB;AAErB,UAAM,cAAU,8CAA4B,eAAe;AAC3D,WAAO,KAAK,UAAU,SAAS,aAAa;EAC9C;;",
6
- "names": []
7
- }
@@ -1,42 +0,0 @@
1
- import { BaseResourceClient } from "../base";
2
- import { buildSnowflakeInvokePayload, buildSnowflakeExecutePayload, buildSnowflakeStatusPayload, buildSnowflakeCancelPayload, } from "../payload-builders/snowflake";
3
- export class SnowflakeResourceClient extends BaseResourceClient {
4
- /**
5
- * Invoke a Snowflake operation with a raw payload
6
- * @param payload The complete operation payload
7
- * @param invocationKey Unique key for tracking this invocation
8
- */
9
- async invoke(payload, invocationKey) {
10
- return this.invokeRaw(buildSnowflakeInvokePayload(payload), invocationKey);
11
- }
12
- /**
13
- * Execute a SQL statement
14
- * @param statement The SQL statement to execute
15
- * @param invocationKey Unique key for tracking this invocation
16
- * @param options Execution options (bindings, database overrides, async, etc.)
17
- */
18
- async execute(statement, invocationKey, options = {}) {
19
- const payload = buildSnowflakeExecutePayload(statement, options);
20
- return this.invokeRaw(payload, invocationKey);
21
- }
22
- /**
23
- * Get status or results of a statement
24
- * @param statementHandle The statement handle from execute operation
25
- * @param invocationKey Unique key for tracking this invocation
26
- * @param options Status options (partition for paginated results)
27
- */
28
- async status(statementHandle, invocationKey, options = {}) {
29
- const payload = buildSnowflakeStatusPayload(statementHandle, options);
30
- return this.invokeRaw(payload, invocationKey);
31
- }
32
- /**
33
- * Cancel a running statement
34
- * @param statementHandle The statement handle to cancel
35
- * @param invocationKey Unique key for tracking this invocation
36
- */
37
- async cancel(statementHandle, invocationKey) {
38
- const payload = buildSnowflakeCancelPayload(statementHandle);
39
- return this.invokeRaw(payload, invocationKey);
40
- }
41
- }
42
- //# sourceMappingURL=snowflake.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"snowflake.js","sourceRoot":"","sources":["../../src/clients/snowflake.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,EAC5B,2BAA2B,EAC3B,2BAA2B,GAC5B,MAAM,+BAA+B,CAAC;AA2CvC,MAAM,OAAO,uBAAwB,SAAQ,kBAAkB;IAC7D;;;;OAIG;IACH,KAAK,CAAC,MAAM,CACV,OAA2B,EAC3B,aAAqB;QAErB,OAAO,IAAI,CAAC,SAAS,CAAC,2BAA2B,CAAC,OAAO,CAAC,EAAE,aAAa,CAAqC,CAAC;IACjH,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,OAAO,CACX,SAAiB,EACjB,aAAqB,EACrB,UAAmC,EAAE;QAErC,MAAM,OAAO,GAAG,4BAA4B,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QACjE,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,aAAa,CAAqC,CAAC;IACpF,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,MAAM,CACV,eAAuB,EACvB,aAAqB,EACrB,UAAkC,EAAE;QAEpC,MAAM,OAAO,GAAG,2BAA2B,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC;QACtE,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,aAAa,CAAqC,CAAC;IACpF,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,MAAM,CACV,eAAuB,EACvB,aAAqB;QAErB,MAAM,OAAO,GAAG,2BAA2B,CAAC,eAAe,CAAC,CAAC;QAC7D,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,aAAa,CAAqC,CAAC;IACpF,CAAC;CACF"}
package/dist/errors.cjs DELETED
@@ -1,38 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
- var errors_exports = {};
21
- __export(errors_exports, {
22
- ResourceInvokeError: () => ResourceInvokeError
23
- });
24
- module.exports = __toCommonJS(errors_exports);
25
- class ResourceInvokeError extends Error {
26
- static {
27
- __name(this, "ResourceInvokeError");
28
- }
29
- httpStatus;
30
- requestId;
31
- constructor(message, httpStatus, requestId) {
32
- super(message);
33
- this.name = "ResourceInvokeError";
34
- this.httpStatus = httpStatus;
35
- this.requestId = requestId;
36
- }
37
- }
38
- //# sourceMappingURL=errors.cjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/errors.ts"],
4
- "sourcesContent": ["/**\n * Error thrown when resource invocation fails\n * Contains the error message and optional HTTP status code\n */\nexport class ResourceInvokeError extends Error {\n readonly httpStatus?: number;\n readonly requestId?: string;\n\n constructor(\n message: string,\n httpStatus?: number,\n requestId?: string\n ) {\n super(message);\n this.name = \"ResourceInvokeError\";\n this.httpStatus = httpStatus;\n this.requestId = requestId;\n }\n}\n\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;;;;;AAIM,MAAO,4BAA4B,MAAK;EAJ9C,OAI8C;;;EACnC;EACA;EAET,YACE,SACA,YACA,WAAkB;AAElB,UAAM,OAAO;AACb,SAAK,OAAO;AACZ,SAAK,aAAa;AAClB,SAAK,YAAY;EACnB;;",
6
- "names": []
7
- }
package/dist/errors.js DELETED
@@ -1,15 +0,0 @@
1
- /**
2
- * Error thrown when resource invocation fails
3
- * Contains the error message and optional HTTP status code
4
- */
5
- export class ResourceInvokeError extends Error {
6
- httpStatus;
7
- requestId;
8
- constructor(message, httpStatus, requestId) {
9
- super(message);
10
- this.name = "ResourceInvokeError";
11
- this.httpStatus = httpStatus;
12
- this.requestId = requestId;
13
- }
14
- }
15
- //# sourceMappingURL=errors.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,OAAO,mBAAoB,SAAQ,KAAK;IACnC,UAAU,CAAU;IACpB,SAAS,CAAU;IAE5B,YACE,OAAe,EACf,UAAmB,EACnB,SAAkB;QAElB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;QAClC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;CACF"}
@@ -1,44 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
- var auth_exports = {};
21
- __export(auth_exports, {
22
- buildAuthRevokeAccessPayload: () => buildAuthRevokeAccessPayload,
23
- buildAuthShareAccessPayload: () => buildAuthShareAccessPayload
24
- });
25
- module.exports = __toCommonJS(auth_exports);
26
- function buildAuthShareAccessPayload(email) {
27
- return {
28
- type: "auth",
29
- subtype: "majorauth",
30
- action: "share",
31
- email
32
- };
33
- }
34
- __name(buildAuthShareAccessPayload, "buildAuthShareAccessPayload");
35
- function buildAuthRevokeAccessPayload(email) {
36
- return {
37
- type: "auth",
38
- subtype: "majorauth",
39
- action: "revoke",
40
- email
41
- };
42
- }
43
- __name(buildAuthRevokeAccessPayload, "buildAuthRevokeAccessPayload");
44
- //# sourceMappingURL=auth.cjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/payload-builders/auth.ts"],
4
- "sourcesContent": ["import type { AuthPayload } from \"../schemas\";\n\n/**\n * Build a payload to share (grant) application access for a user by email.\n * @param email Email address of the user to grant access\n */\nexport function buildAuthShareAccessPayload(email: string): AuthPayload {\n return {\n type: \"auth\",\n subtype: \"majorauth\",\n action: \"share\",\n email,\n };\n}\n\n/**\n * Build a payload to revoke application access for a user by email.\n * @param email Email address of the user to revoke access from\n */\nexport function buildAuthRevokeAccessPayload(email: string): AuthPayload {\n return {\n type: \"auth\",\n subtype: \"majorauth\",\n action: \"revoke\",\n email,\n };\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;AAEA;;;;;;AAIM,SAAU,4BAA4B,OAAa;AACvD,SAAO;IACL,MAAM;IACN,SAAS;IACT,QAAQ;IACR;;AAEJ;AAPgB;AAaV,SAAU,6BAA6B,OAAa;AACxD,SAAO;IACL,MAAM;IACN,SAAS;IACT,QAAQ;IACR;;AAEJ;AAPgB;",
6
- "names": []
7
- }
@@ -1,25 +0,0 @@
1
- /**
2
- * Build a payload to share (grant) application access for a user by email.
3
- * @param email Email address of the user to grant access
4
- */
5
- export function buildAuthShareAccessPayload(email) {
6
- return {
7
- type: "auth",
8
- subtype: "majorauth",
9
- action: "share",
10
- email,
11
- };
12
- }
13
- /**
14
- * Build a payload to revoke application access for a user by email.
15
- * @param email Email address of the user to revoke access from
16
- */
17
- export function buildAuthRevokeAccessPayload(email) {
18
- return {
19
- type: "auth",
20
- subtype: "majorauth",
21
- action: "revoke",
22
- email,
23
- };
24
- }
25
- //# sourceMappingURL=auth.js.map