@major-tech/resource-client 0.2.42 → 0.2.46

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 (281) hide show
  1. package/bin/generate-clients.mjs +4 -3
  2. package/dist/clients/gong.d.ts +13 -0
  3. package/dist/clients/gong.d.ts.map +1 -0
  4. package/dist/index.cjs +1984 -45
  5. package/dist/index.cjs.map +4 -4
  6. package/dist/index.d.ts +2 -1
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +1984 -29
  9. package/dist/index.js.map +7 -1
  10. package/dist/payload-builders/from-extracted-params.d.ts.map +1 -1
  11. package/dist/payload-builders/gong.d.ts +13 -0
  12. package/dist/payload-builders/gong.d.ts.map +1 -0
  13. package/dist/payload-builders/index.d.ts +1 -0
  14. package/dist/payload-builders/index.d.ts.map +1 -1
  15. package/dist/schemas/api-gong.d.ts +20 -0
  16. package/dist/schemas/api-gong.d.ts.map +1 -0
  17. package/dist/schemas/index.d.ts +3 -1
  18. package/dist/schemas/index.d.ts.map +1 -1
  19. package/dist/schemas/response.d.ts +4 -0
  20. package/dist/schemas/response.d.ts.map +1 -1
  21. package/package.json +1 -1
  22. package/dist/base.cjs +0 -78
  23. package/dist/base.cjs.map +0 -7
  24. package/dist/base.js +0 -52
  25. package/dist/base.js.map +0 -1
  26. package/dist/clients/api-custom.cjs +0 -36
  27. package/dist/clients/api-custom.cjs.map +0 -7
  28. package/dist/clients/api-custom.js +0 -9
  29. package/dist/clients/api-custom.js.map +0 -1
  30. package/dist/clients/api-graphql.cjs +0 -40
  31. package/dist/clients/api-graphql.cjs.map +0 -7
  32. package/dist/clients/api-graphql.js +0 -13
  33. package/dist/clients/api-graphql.js.map +0 -1
  34. package/dist/clients/auth.cjs +0 -49
  35. package/dist/clients/auth.cjs.map +0 -7
  36. package/dist/clients/auth.js +0 -22
  37. package/dist/clients/auth.js.map +0 -1
  38. package/dist/clients/bigquery.cjs +0 -104
  39. package/dist/clients/bigquery.cjs.map +0 -7
  40. package/dist/clients/bigquery.js +0 -77
  41. package/dist/clients/bigquery.js.map +0 -1
  42. package/dist/clients/cosmosdb.cjs +0 -119
  43. package/dist/clients/cosmosdb.cjs.map +0 -7
  44. package/dist/clients/cosmosdb.js +0 -92
  45. package/dist/clients/cosmosdb.js.map +0 -1
  46. package/dist/clients/dynamodb.cjs +0 -36
  47. package/dist/clients/dynamodb.cjs.map +0 -7
  48. package/dist/clients/dynamodb.js +0 -9
  49. package/dist/clients/dynamodb.js.map +0 -1
  50. package/dist/clients/google-analytics.cjs +0 -101
  51. package/dist/clients/google-analytics.cjs.map +0 -7
  52. package/dist/clients/google-analytics.js +0 -74
  53. package/dist/clients/google-analytics.js.map +0 -1
  54. package/dist/clients/googlesheets.cjs +0 -122
  55. package/dist/clients/googlesheets.cjs.map +0 -7
  56. package/dist/clients/googlesheets.js +0 -95
  57. package/dist/clients/googlesheets.js.map +0 -1
  58. package/dist/clients/hubspot.cjs +0 -36
  59. package/dist/clients/hubspot.cjs.map +0 -7
  60. package/dist/clients/hubspot.js +0 -9
  61. package/dist/clients/hubspot.js.map +0 -1
  62. package/dist/clients/lambda.cjs +0 -81
  63. package/dist/clients/lambda.cjs.map +0 -7
  64. package/dist/clients/lambda.js +0 -54
  65. package/dist/clients/lambda.js.map +0 -1
  66. package/dist/clients/mssql.cjs +0 -59
  67. package/dist/clients/mssql.cjs.map +0 -7
  68. package/dist/clients/mssql.js +0 -32
  69. package/dist/clients/mssql.js.map +0 -1
  70. package/dist/clients/neo4j.cjs +0 -57
  71. package/dist/clients/neo4j.cjs.map +0 -7
  72. package/dist/clients/neo4j.js +0 -30
  73. package/dist/clients/neo4j.js.map +0 -1
  74. package/dist/clients/outreach.cjs +0 -51
  75. package/dist/clients/outreach.cjs.map +0 -7
  76. package/dist/clients/outreach.js +0 -24
  77. package/dist/clients/outreach.js.map +0 -1
  78. package/dist/clients/postgres.cjs +0 -59
  79. package/dist/clients/postgres.cjs.map +0 -7
  80. package/dist/clients/postgres.js +0 -32
  81. package/dist/clients/postgres.js.map +0 -1
  82. package/dist/clients/quickbooks.cjs +0 -65
  83. package/dist/clients/quickbooks.cjs.map +0 -7
  84. package/dist/clients/quickbooks.js +0 -38
  85. package/dist/clients/quickbooks.js.map +0 -1
  86. package/dist/clients/s3.cjs +0 -36
  87. package/dist/clients/s3.cjs.map +0 -7
  88. package/dist/clients/s3.js +0 -9
  89. package/dist/clients/s3.js.map +0 -1
  90. package/dist/clients/salesforce.cjs +0 -131
  91. package/dist/clients/salesforce.cjs.map +0 -7
  92. package/dist/clients/salesforce.js +0 -144
  93. package/dist/clients/salesforce.js.map +0 -1
  94. package/dist/clients/slack.cjs +0 -66
  95. package/dist/clients/slack.cjs.map +0 -7
  96. package/dist/clients/slack.js +0 -39
  97. package/dist/clients/slack.js.map +0 -1
  98. package/dist/clients/snowflake.cjs +0 -69
  99. package/dist/clients/snowflake.cjs.map +0 -7
  100. package/dist/clients/snowflake.js +0 -42
  101. package/dist/clients/snowflake.js.map +0 -1
  102. package/dist/errors.cjs +0 -38
  103. package/dist/errors.cjs.map +0 -7
  104. package/dist/errors.js +0 -15
  105. package/dist/errors.js.map +0 -1
  106. package/dist/payload-builders/auth.cjs +0 -44
  107. package/dist/payload-builders/auth.cjs.map +0 -7
  108. package/dist/payload-builders/auth.js +0 -25
  109. package/dist/payload-builders/auth.js.map +0 -1
  110. package/dist/payload-builders/bigquery.cjs +0 -103
  111. package/dist/payload-builders/bigquery.cjs.map +0 -7
  112. package/dist/payload-builders/bigquery.js +0 -103
  113. package/dist/payload-builders/bigquery.js.map +0 -1
  114. package/dist/payload-builders/cosmosdb.cjs +0 -126
  115. package/dist/payload-builders/cosmosdb.cjs.map +0 -7
  116. package/dist/payload-builders/cosmosdb.js +0 -112
  117. package/dist/payload-builders/cosmosdb.js.map +0 -1
  118. package/dist/payload-builders/custom.cjs +0 -38
  119. package/dist/payload-builders/custom.cjs.map +0 -7
  120. package/dist/payload-builders/custom.js +0 -19
  121. package/dist/payload-builders/custom.js.map +0 -1
  122. package/dist/payload-builders/dynamodb.cjs +0 -34
  123. package/dist/payload-builders/dynamodb.cjs.map +0 -7
  124. package/dist/payload-builders/dynamodb.js +0 -14
  125. package/dist/payload-builders/dynamodb.js.map +0 -1
  126. package/dist/payload-builders/from-extracted-params.cjs +0 -442
  127. package/dist/payload-builders/from-extracted-params.cjs.map +0 -7
  128. package/dist/payload-builders/from-extracted-params.js +0 -444
  129. package/dist/payload-builders/from-extracted-params.js.map +0 -1
  130. package/dist/payload-builders/google-analytics.cjs +0 -106
  131. package/dist/payload-builders/google-analytics.cjs.map +0 -7
  132. package/dist/payload-builders/google-analytics.js +0 -90
  133. package/dist/payload-builders/google-analytics.js.map +0 -1
  134. package/dist/payload-builders/googlesheets.cjs +0 -106
  135. package/dist/payload-builders/googlesheets.cjs.map +0 -7
  136. package/dist/payload-builders/googlesheets.js +0 -115
  137. package/dist/payload-builders/googlesheets.js.map +0 -1
  138. package/dist/payload-builders/graphql.cjs +0 -37
  139. package/dist/payload-builders/graphql.cjs.map +0 -7
  140. package/dist/payload-builders/graphql.js +0 -17
  141. package/dist/payload-builders/graphql.js.map +0 -1
  142. package/dist/payload-builders/hubspot.cjs +0 -37
  143. package/dist/payload-builders/hubspot.cjs.map +0 -7
  144. package/dist/payload-builders/hubspot.js +0 -18
  145. package/dist/payload-builders/hubspot.js.map +0 -1
  146. package/dist/payload-builders/index.cjs +0 -101
  147. package/dist/payload-builders/index.cjs.map +0 -7
  148. package/dist/payload-builders/index.js +0 -41
  149. package/dist/payload-builders/index.js.map +0 -1
  150. package/dist/payload-builders/lambda.cjs +0 -35
  151. package/dist/payload-builders/lambda.cjs.map +0 -7
  152. package/dist/payload-builders/lambda.js +0 -16
  153. package/dist/payload-builders/lambda.js.map +0 -1
  154. package/dist/payload-builders/mssql.cjs +0 -35
  155. package/dist/payload-builders/mssql.cjs.map +0 -7
  156. package/dist/payload-builders/mssql.js +0 -16
  157. package/dist/payload-builders/mssql.js.map +0 -1
  158. package/dist/payload-builders/neo4j.cjs +0 -35
  159. package/dist/payload-builders/neo4j.cjs.map +0 -7
  160. package/dist/payload-builders/neo4j.js +0 -16
  161. package/dist/payload-builders/neo4j.js.map +0 -1
  162. package/dist/payload-builders/outreach.cjs +0 -37
  163. package/dist/payload-builders/outreach.cjs.map +0 -7
  164. package/dist/payload-builders/outreach.js +0 -18
  165. package/dist/payload-builders/outreach.js.map +0 -1
  166. package/dist/payload-builders/postgres.cjs +0 -35
  167. package/dist/payload-builders/postgres.cjs.map +0 -7
  168. package/dist/payload-builders/postgres.js +0 -16
  169. package/dist/payload-builders/postgres.js.map +0 -1
  170. package/dist/payload-builders/quickbooks.cjs +0 -45
  171. package/dist/payload-builders/quickbooks.cjs.map +0 -7
  172. package/dist/payload-builders/quickbooks.js +0 -18
  173. package/dist/payload-builders/quickbooks.js.map +0 -1
  174. package/dist/payload-builders/s3.cjs +0 -35
  175. package/dist/payload-builders/s3.cjs.map +0 -7
  176. package/dist/payload-builders/s3.js +0 -16
  177. package/dist/payload-builders/s3.js.map +0 -1
  178. package/dist/payload-builders/salesforce.cjs +0 -87
  179. package/dist/payload-builders/salesforce.cjs.map +0 -7
  180. package/dist/payload-builders/salesforce.js +0 -91
  181. package/dist/payload-builders/salesforce.js.map +0 -1
  182. package/dist/payload-builders/slack.cjs +0 -59
  183. package/dist/payload-builders/slack.cjs.map +0 -7
  184. package/dist/payload-builders/slack.js +0 -35
  185. package/dist/payload-builders/slack.js.map +0 -1
  186. package/dist/payload-builders/snowflake.cjs +0 -70
  187. package/dist/payload-builders/snowflake.cjs.map +0 -7
  188. package/dist/payload-builders/snowflake.js +0 -57
  189. package/dist/payload-builders/snowflake.js.map +0 -1
  190. package/dist/schemas/api-custom.cjs +0 -17
  191. package/dist/schemas/api-custom.cjs.map +0 -7
  192. package/dist/schemas/api-custom.js +0 -2
  193. package/dist/schemas/api-custom.js.map +0 -1
  194. package/dist/schemas/api-googlesheets.cjs +0 -17
  195. package/dist/schemas/api-googlesheets.cjs.map +0 -7
  196. package/dist/schemas/api-googlesheets.js +0 -2
  197. package/dist/schemas/api-googlesheets.js.map +0 -1
  198. package/dist/schemas/api-graphql.cjs +0 -17
  199. package/dist/schemas/api-graphql.cjs.map +0 -7
  200. package/dist/schemas/api-graphql.js +0 -2
  201. package/dist/schemas/api-graphql.js.map +0 -1
  202. package/dist/schemas/api-hubspot.cjs +0 -17
  203. package/dist/schemas/api-hubspot.cjs.map +0 -7
  204. package/dist/schemas/api-hubspot.js +0 -2
  205. package/dist/schemas/api-hubspot.js.map +0 -1
  206. package/dist/schemas/api-outreach.cjs +0 -17
  207. package/dist/schemas/api-outreach.cjs.map +0 -7
  208. package/dist/schemas/api-outreach.js +0 -2
  209. package/dist/schemas/api-outreach.js.map +0 -1
  210. package/dist/schemas/api-quickbooks.cjs +0 -17
  211. package/dist/schemas/api-quickbooks.cjs.map +0 -7
  212. package/dist/schemas/api-quickbooks.js +0 -2
  213. package/dist/schemas/api-quickbooks.js.map +0 -1
  214. package/dist/schemas/api-salesforce.cjs +0 -17
  215. package/dist/schemas/api-salesforce.cjs.map +0 -7
  216. package/dist/schemas/api-salesforce.js +0 -2
  217. package/dist/schemas/api-salesforce.js.map +0 -1
  218. package/dist/schemas/api-slack.cjs +0 -17
  219. package/dist/schemas/api-slack.cjs.map +0 -7
  220. package/dist/schemas/api-slack.js +0 -2
  221. package/dist/schemas/api-slack.js.map +0 -1
  222. package/dist/schemas/auth.cjs +0 -17
  223. package/dist/schemas/auth.cjs.map +0 -7
  224. package/dist/schemas/auth.js +0 -5
  225. package/dist/schemas/auth.js.map +0 -1
  226. package/dist/schemas/bigquery.cjs +0 -17
  227. package/dist/schemas/bigquery.cjs.map +0 -7
  228. package/dist/schemas/bigquery.js +0 -5
  229. package/dist/schemas/bigquery.js.map +0 -1
  230. package/dist/schemas/common.cjs +0 -17
  231. package/dist/schemas/common.cjs.map +0 -7
  232. package/dist/schemas/common.js +0 -2
  233. package/dist/schemas/common.js.map +0 -1
  234. package/dist/schemas/cosmosdb.cjs +0 -17
  235. package/dist/schemas/cosmosdb.cjs.map +0 -7
  236. package/dist/schemas/cosmosdb.js +0 -2
  237. package/dist/schemas/cosmosdb.js.map +0 -1
  238. package/dist/schemas/dynamodb.cjs +0 -17
  239. package/dist/schemas/dynamodb.cjs.map +0 -7
  240. package/dist/schemas/dynamodb.js +0 -2
  241. package/dist/schemas/dynamodb.js.map +0 -1
  242. package/dist/schemas/google-analytics.cjs +0 -17
  243. package/dist/schemas/google-analytics.cjs.map +0 -7
  244. package/dist/schemas/google-analytics.js +0 -2
  245. package/dist/schemas/google-analytics.js.map +0 -1
  246. package/dist/schemas/index.cjs +0 -40
  247. package/dist/schemas/index.cjs.map +0 -7
  248. package/dist/schemas/index.js +0 -24
  249. package/dist/schemas/index.js.map +0 -1
  250. package/dist/schemas/lambda.cjs +0 -17
  251. package/dist/schemas/lambda.cjs.map +0 -7
  252. package/dist/schemas/lambda.js +0 -2
  253. package/dist/schemas/lambda.js.map +0 -1
  254. package/dist/schemas/mssql.cjs +0 -17
  255. package/dist/schemas/mssql.cjs.map +0 -7
  256. package/dist/schemas/mssql.js +0 -2
  257. package/dist/schemas/mssql.js.map +0 -1
  258. package/dist/schemas/neo4j.cjs +0 -17
  259. package/dist/schemas/neo4j.cjs.map +0 -7
  260. package/dist/schemas/neo4j.js +0 -2
  261. package/dist/schemas/neo4j.js.map +0 -1
  262. package/dist/schemas/postgres.cjs +0 -17
  263. package/dist/schemas/postgres.cjs.map +0 -7
  264. package/dist/schemas/postgres.js +0 -2
  265. package/dist/schemas/postgres.js.map +0 -1
  266. package/dist/schemas/request.cjs +0 -17
  267. package/dist/schemas/request.cjs.map +0 -7
  268. package/dist/schemas/request.js +0 -2
  269. package/dist/schemas/request.js.map +0 -1
  270. package/dist/schemas/response.cjs +0 -17
  271. package/dist/schemas/response.cjs.map +0 -7
  272. package/dist/schemas/response.js +0 -2
  273. package/dist/schemas/response.js.map +0 -1
  274. package/dist/schemas/s3.cjs +0 -17
  275. package/dist/schemas/s3.cjs.map +0 -7
  276. package/dist/schemas/s3.js +0 -2
  277. package/dist/schemas/s3.js.map +0 -1
  278. package/dist/schemas/snowflake.cjs +0 -17
  279. package/dist/schemas/snowflake.cjs.map +0 -7
  280. package/dist/schemas/snowflake.js +0 -2
  281. package/dist/schemas/snowflake.js.map +0 -1
package/dist/base.cjs.map DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/base.ts"],
4
- "sourcesContent": ["import type {\n ResourceInvokePayload,\n InvokeResponse,\n InvokeRequest,\n} from \"./schemas\";\nimport { ResourceInvokeError } from \"./errors\";\n\nexport interface BaseClientConfig {\n baseUrl: string;\n majorJwtToken?: string;\n applicationId?: string; // For app mode\n toolId?: string; // For tool mode \u2014 mutually exclusive with applicationId\n resourceId: string;\n fetch?: typeof fetch;\n /**\n * Optional function to get additional headers (e.g. for auth)\n * Useful for Next.js Server Components where headers() must be called dynamically\n */\n getHeaders?: () => Promise<Record<string, string>> | Record<string, string>;\n}\n\nexport abstract class BaseResourceClient {\n protected readonly config: {\n baseUrl: string;\n majorJwtToken?: string;\n applicationId?: string;\n toolId?: string;\n resourceId: string;\n fetch: typeof fetch;\n getHeaders?: () => Promise<Record<string, string>> | Record<string, string>;\n };\n\n constructor(config: BaseClientConfig) {\n if (!config.applicationId && !config.toolId) {\n throw new Error(\"BaseResourceClient requires either applicationId or toolId\");\n }\n\n this.config = {\n baseUrl: config.baseUrl.replace(/\\/$/, \"\"),\n majorJwtToken: config.majorJwtToken,\n applicationId: config.applicationId,\n toolId: config.toolId,\n resourceId: config.resourceId,\n fetch: config.fetch || globalThis.fetch,\n getHeaders: config.getHeaders,\n };\n }\n\n protected async invokeRaw(\n payload: ResourceInvokePayload,\n invocationKey: string,\n ): Promise<InvokeResponse> {\n const entityType = this.config.toolId ? \"tools\" : \"apps\";\n const entityId = this.config.toolId || this.config.applicationId;\n const url = `${this.config.baseUrl}/internal/${entityType}/v1/${entityId}/resource/${this.config.resourceId}/invoke`;\n \n const body: InvokeRequest = {\n payload,\n invocationKey,\n };\n\n let headers: Record<string, string> = {\n \"Content-Type\": \"application/json\",\n };\n\n if (this.config.majorJwtToken) {\n headers[\"x-major-jwt\"] = this.config.majorJwtToken;\n }\n\n if (this.config.getHeaders) {\n const extraHeaders = await this.config.getHeaders();\n headers = { ...headers, ...extraHeaders };\n }\n\n try {\n const response = await this.config.fetch(url, {\n method: \"POST\",\n headers,\n credentials: \"include\",\n body: JSON.stringify(body),\n });\n\n const data = await response.json();\n return data as InvokeResponse;\n } catch (error) {\n const message = error instanceof Error ? error.message : String(error);\n throw new ResourceInvokeError(`Failed to invoke resource: ${message}`);\n }\n }\n}\n\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;AAKA;;;;;AAAA,oBAAoC;AAgB9B,MAAgB,mBAAkB;EAhBxC,OAgBwC;;;EACnB;EAUnB,YAAY,QAAwB;AAClC,QAAI,CAAC,OAAO,iBAAiB,CAAC,OAAO,QAAQ;AAC3C,YAAM,IAAI,MAAM,4DAA4D;IAC9E;AAEA,SAAK,SAAS;MACZ,SAAS,OAAO,QAAQ,QAAQ,OAAO,EAAE;MACzC,eAAe,OAAO;MACtB,eAAe,OAAO;MACtB,QAAQ,OAAO;MACf,YAAY,OAAO;MACnB,OAAO,OAAO,SAAS,WAAW;MAClC,YAAY,OAAO;;EAEvB;EAEU,MAAM,UACd,SACA,eAAqB;AAErB,UAAM,aAAa,KAAK,OAAO,SAAS,UAAU;AAClD,UAAM,WAAW,KAAK,OAAO,UAAU,KAAK,OAAO;AACnD,UAAM,MAAM,GAAG,KAAK,OAAO,OAAO,aAAa,UAAU,OAAO,QAAQ,aAAa,KAAK,OAAO,UAAU;AAE3G,UAAM,OAAsB;MAC1B;MACA;;AAGF,QAAI,UAAkC;MACpC,gBAAgB;;AAGlB,QAAI,KAAK,OAAO,eAAe;AAC7B,cAAQ,aAAa,IAAI,KAAK,OAAO;IACvC;AAEA,QAAI,KAAK,OAAO,YAAY;AAC1B,YAAM,eAAe,MAAM,KAAK,OAAO,WAAU;AACjD,gBAAU,EAAE,GAAG,SAAS,GAAG,aAAY;IACzC;AAEA,QAAI;AACF,YAAM,WAAW,MAAM,KAAK,OAAO,MAAM,KAAK;QAC5C,QAAQ;QACR;QACA,aAAa;QACb,MAAM,KAAK,UAAU,IAAI;OAC1B;AAED,YAAM,OAAO,MAAM,SAAS,KAAI;AAChC,aAAO;IACT,SAAS,OAAO;AACd,YAAM,UAAU,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;AACrE,YAAM,IAAI,kCAAoB,8BAA8B,OAAO,EAAE;IACvE;EACF;;",
6
- "names": []
7
- }
package/dist/base.js DELETED
@@ -1,52 +0,0 @@
1
- import { ResourceInvokeError } from "./errors";
2
- export class BaseResourceClient {
3
- config;
4
- constructor(config) {
5
- if (!config.applicationId && !config.toolId) {
6
- throw new Error("BaseResourceClient requires either applicationId or toolId");
7
- }
8
- this.config = {
9
- baseUrl: config.baseUrl.replace(/\/$/, ""),
10
- majorJwtToken: config.majorJwtToken,
11
- applicationId: config.applicationId,
12
- toolId: config.toolId,
13
- resourceId: config.resourceId,
14
- fetch: config.fetch || globalThis.fetch,
15
- getHeaders: config.getHeaders,
16
- };
17
- }
18
- async invokeRaw(payload, invocationKey) {
19
- const entityType = this.config.toolId ? "tools" : "apps";
20
- const entityId = this.config.toolId || this.config.applicationId;
21
- const url = `${this.config.baseUrl}/internal/${entityType}/v1/${entityId}/resource/${this.config.resourceId}/invoke`;
22
- const body = {
23
- payload,
24
- invocationKey,
25
- };
26
- let headers = {
27
- "Content-Type": "application/json",
28
- };
29
- if (this.config.majorJwtToken) {
30
- headers["x-major-jwt"] = this.config.majorJwtToken;
31
- }
32
- if (this.config.getHeaders) {
33
- const extraHeaders = await this.config.getHeaders();
34
- headers = { ...headers, ...extraHeaders };
35
- }
36
- try {
37
- const response = await this.config.fetch(url, {
38
- method: "POST",
39
- headers,
40
- credentials: "include",
41
- body: JSON.stringify(body),
42
- });
43
- const data = await response.json();
44
- return data;
45
- }
46
- catch (error) {
47
- const message = error instanceof Error ? error.message : String(error);
48
- throw new ResourceInvokeError(`Failed to invoke resource: ${message}`);
49
- }
50
- }
51
- }
52
- //# sourceMappingURL=base.js.map
package/dist/base.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"base.js","sourceRoot":"","sources":["../src/base.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAgB/C,MAAM,OAAgB,kBAAkB;IACnB,MAAM,CAQvB;IAEF,YAAY,MAAwB;QAClC,IAAI,CAAC,MAAM,CAAC,aAAa,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;YAC5C,MAAM,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAC;QAChF,CAAC;QAED,IAAI,CAAC,MAAM,GAAG;YACZ,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;YAC1C,aAAa,EAAE,MAAM,CAAC,aAAa;YACnC,aAAa,EAAE,MAAM,CAAC,aAAa;YACnC,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,UAAU,EAAE,MAAM,CAAC,UAAU;YAC7B,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,UAAU,CAAC,KAAK;YACvC,UAAU,EAAE,MAAM,CAAC,UAAU;SAC9B,CAAC;IACJ,CAAC;IAES,KAAK,CAAC,SAAS,CACvB,OAA8B,EAC9B,aAAqB;QAErB,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC;QACzD,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC;QACjE,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,aAAa,UAAU,OAAO,QAAQ,aAAa,IAAI,CAAC,MAAM,CAAC,UAAU,SAAS,CAAC;QAErH,MAAM,IAAI,GAAkB;YAC1B,OAAO;YACP,aAAa;SACd,CAAC;QAEF,IAAI,OAAO,GAA2B;YACpC,cAAc,EAAE,kBAAkB;SACnC,CAAC;QAEF,IAAI,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,CAAC;YAC9B,OAAO,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC;QACrD,CAAC;QAED,IAAI,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;YAC3B,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;YACpD,OAAO,GAAG,EAAE,GAAG,OAAO,EAAE,GAAG,YAAY,EAAE,CAAC;QAC5C,CAAC;QAED,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE;gBAC5C,MAAM,EAAE,MAAM;gBACd,OAAO;gBACP,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;aAC3B,CAAC,CAAC;YAEH,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;YACnC,OAAO,IAAsB,CAAC;QAChC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACvE,MAAM,IAAI,mBAAmB,CAAC,8BAA8B,OAAO,EAAE,CAAC,CAAC;QACzE,CAAC;IACH,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 api_custom_exports = {};
21
- __export(api_custom_exports, {
22
- CustomApiResourceClient: () => CustomApiResourceClient
23
- });
24
- module.exports = __toCommonJS(api_custom_exports);
25
- var import_base = require("../base");
26
- var import_custom = require("../payload-builders/custom");
27
- class CustomApiResourceClient extends import_base.BaseResourceClient {
28
- static {
29
- __name(this, "CustomApiResourceClient");
30
- }
31
- async invoke(method, path, invocationKey, options = {}) {
32
- const payload = (0, import_custom.buildCustomApiInvokePayload)(method, path, options);
33
- return this.invokeRaw(payload, invocationKey);
34
- }
35
- }
36
- //# sourceMappingURL=api-custom.cjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/clients/api-custom.ts"],
4
- "sourcesContent": ["import type {\n HttpMethod,\n QueryParams,\n BodyPayload,\n ApiInvokeResponse,\n} from \"../schemas\";\nimport { BaseResourceClient } from \"../base\";\nimport { buildCustomApiInvokePayload } from \"../payload-builders/custom\";\n\nexport class CustomApiResourceClient extends BaseResourceClient {\n async invoke(\n method: HttpMethod,\n path: string,\n invocationKey: string,\n options: {\n query?: QueryParams;\n headers?: Record<string, string>;\n body?: BodyPayload;\n timeoutMs?: number;\n } = {}\n ): Promise<ApiInvokeResponse> {\n const payload = buildCustomApiInvokePayload(method, path, options);\n return this.invokeRaw(payload, invocationKey) as Promise<ApiInvokeResponse>;\n }\n}\n\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;AAMA;;;;;AAAA,kBAAmC;AACnC,oBAA4C;AAEtC,MAAO,gCAAgC,+BAAkB;EAH/D,OAG+D;;;EAC7D,MAAM,OACJ,QACA,MACA,eACA,UAKI,CAAA,GAAE;AAEN,UAAM,cAAU,2CAA4B,QAAQ,MAAM,OAAO;AACjE,WAAO,KAAK,UAAU,SAAS,aAAa;EAC9C;;",
6
- "names": []
7
- }
@@ -1,9 +0,0 @@
1
- import { BaseResourceClient } from "../base";
2
- import { buildCustomApiInvokePayload } from "../payload-builders/custom";
3
- export class CustomApiResourceClient extends BaseResourceClient {
4
- async invoke(method, path, invocationKey, options = {}) {
5
- const payload = buildCustomApiInvokePayload(method, path, options);
6
- return this.invokeRaw(payload, invocationKey);
7
- }
8
- }
9
- //# sourceMappingURL=api-custom.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"api-custom.js","sourceRoot":"","sources":["../../src/clients/api-custom.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AAEzE,MAAM,OAAO,uBAAwB,SAAQ,kBAAkB;IAC7D,KAAK,CAAC,MAAM,CACV,MAAkB,EAClB,IAAY,EACZ,aAAqB,EACrB,UAKI,EAAE;QAEN,MAAM,OAAO,GAAG,2BAA2B,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;QACnE,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,aAAa,CAA+B,CAAC;IAC9E,CAAC;CACF"}
@@ -1,40 +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 api_graphql_exports = {};
21
- __export(api_graphql_exports, {
22
- GraphQLResourceClient: () => GraphQLResourceClient
23
- });
24
- module.exports = __toCommonJS(api_graphql_exports);
25
- var import_base = require("../base");
26
- var import_graphql = require("../payload-builders/graphql");
27
- class GraphQLResourceClient extends import_base.BaseResourceClient {
28
- static {
29
- __name(this, "GraphQLResourceClient");
30
- }
31
- async query(query, invocationKey, options = {}) {
32
- const payload = (0, import_graphql.buildGraphQLInvokePayload)(query, options);
33
- return this.invokeRaw(payload, invocationKey);
34
- }
35
- async mutate(mutation, invocationKey, options = {}) {
36
- const payload = (0, import_graphql.buildGraphQLInvokePayload)(mutation, options);
37
- return this.invokeRaw(payload, invocationKey);
38
- }
39
- }
40
- //# sourceMappingURL=api-graphql.cjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/clients/api-graphql.ts"],
4
- "sourcesContent": ["import type { ApiInvokeResponse } from \"../schemas\";\nimport { BaseResourceClient } from \"../base\";\nimport { buildGraphQLInvokePayload } from \"../payload-builders/graphql\";\n\nexport class GraphQLResourceClient extends BaseResourceClient {\n async query(\n query: string,\n invocationKey: string,\n options: {\n variables?: Record<string, unknown>;\n operationName?: string;\n headers?: Record<string, string>;\n timeoutMs?: number;\n } = {}\n ): Promise<ApiInvokeResponse> {\n const payload = buildGraphQLInvokePayload(query, options);\n return this.invokeRaw(payload, invocationKey) as Promise<ApiInvokeResponse>;\n }\n\n async mutate(\n mutation: string,\n invocationKey: string,\n options: {\n variables?: Record<string, unknown>;\n operationName?: string;\n headers?: Record<string, string>;\n timeoutMs?: number;\n } = {}\n ): Promise<ApiInvokeResponse> {\n const payload = buildGraphQLInvokePayload(mutation, options);\n return this.invokeRaw(payload, invocationKey) as Promise<ApiInvokeResponse>;\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;AACA;;;;;AAAA,kBAAmC;AACnC,qBAA0C;AAEpC,MAAO,8BAA8B,+BAAkB;EAH7D,OAG6D;;;EAC3D,MAAM,MACJ,OACA,eACA,UAKI,CAAA,GAAE;AAEN,UAAM,cAAU,0CAA0B,OAAO,OAAO;AACxD,WAAO,KAAK,UAAU,SAAS,aAAa;EAC9C;EAEA,MAAM,OACJ,UACA,eACA,UAKI,CAAA,GAAE;AAEN,UAAM,cAAU,0CAA0B,UAAU,OAAO;AAC3D,WAAO,KAAK,UAAU,SAAS,aAAa;EAC9C;;",
6
- "names": []
7
- }
@@ -1,13 +0,0 @@
1
- import { BaseResourceClient } from "../base";
2
- import { buildGraphQLInvokePayload } from "../payload-builders/graphql";
3
- export class GraphQLResourceClient extends BaseResourceClient {
4
- async query(query, invocationKey, options = {}) {
5
- const payload = buildGraphQLInvokePayload(query, options);
6
- return this.invokeRaw(payload, invocationKey);
7
- }
8
- async mutate(mutation, invocationKey, options = {}) {
9
- const payload = buildGraphQLInvokePayload(mutation, options);
10
- return this.invokeRaw(payload, invocationKey);
11
- }
12
- }
13
- //# sourceMappingURL=api-graphql.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"api-graphql.js","sourceRoot":"","sources":["../../src/clients/api-graphql.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAExE,MAAM,OAAO,qBAAsB,SAAQ,kBAAkB;IAC3D,KAAK,CAAC,KAAK,CACT,KAAa,EACb,aAAqB,EACrB,UAKI,EAAE;QAEN,MAAM,OAAO,GAAG,yBAAyB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QAC1D,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,aAAa,CAA+B,CAAC;IAC9E,CAAC;IAED,KAAK,CAAC,MAAM,CACV,QAAgB,EAChB,aAAqB,EACrB,UAKI,EAAE;QAEN,MAAM,OAAO,GAAG,yBAAyB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAC7D,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,aAAa,CAA+B,CAAC;IAC9E,CAAC;CACF"}
@@ -1,49 +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
- MajorAuthResourceClient: () => MajorAuthResourceClient
23
- });
24
- module.exports = __toCommonJS(auth_exports);
25
- var import_base = require("../base");
26
- var import_auth = require("../payload-builders/auth");
27
- class MajorAuthResourceClient extends import_base.BaseResourceClient {
28
- static {
29
- __name(this, "MajorAuthResourceClient");
30
- }
31
- /**
32
- * Grant a user view access to this application by email.
33
- * If the user doesn't have an account, one will be created.
34
- * If the user isn't a member of the organization, they will be invited.
35
- */
36
- async shareAccess(email, invocationKey) {
37
- const payload = (0, import_auth.buildAuthShareAccessPayload)(email);
38
- return this.invokeRaw(payload, invocationKey);
39
- }
40
- /**
41
- * Revoke a user's view access to this application by email.
42
- * Only removes app-level access; does not affect org membership or roles.
43
- */
44
- async revokeAccess(email, invocationKey) {
45
- const payload = (0, import_auth.buildAuthRevokeAccessPayload)(email);
46
- return this.invokeRaw(payload, invocationKey);
47
- }
48
- }
49
- //# sourceMappingURL=auth.cjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/clients/auth.ts"],
4
- "sourcesContent": ["import type { AuthInvokeResponse } from \"../schemas\";\nimport { BaseResourceClient } from \"../base\";\nimport { buildAuthShareAccessPayload, buildAuthRevokeAccessPayload } from \"../payload-builders/auth\";\n\nexport class MajorAuthResourceClient extends BaseResourceClient {\n /**\n * Grant a user view access to this application by email.\n * If the user doesn't have an account, one will be created.\n * If the user isn't a member of the organization, they will be invited.\n */\n async shareAccess(\n email: string,\n invocationKey: string,\n ): Promise<AuthInvokeResponse> {\n const payload = buildAuthShareAccessPayload(email);\n return this.invokeRaw(payload, invocationKey) as Promise<AuthInvokeResponse>;\n }\n\n /**\n * Revoke a user's view access to this application by email.\n * Only removes app-level access; does not affect org membership or roles.\n */\n async revokeAccess(\n email: string,\n invocationKey: string,\n ): Promise<AuthInvokeResponse> {\n const payload = buildAuthRevokeAccessPayload(email);\n return this.invokeRaw(payload, invocationKey) as Promise<AuthInvokeResponse>;\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;AACA;;;;;AAAA,kBAAmC;AACnC,kBAA0E;AAEpE,MAAO,gCAAgC,+BAAkB;EAH/D,OAG+D;;;;;;;;EAM7D,MAAM,YACJ,OACA,eAAqB;AAErB,UAAM,cAAU,yCAA4B,KAAK;AACjD,WAAO,KAAK,UAAU,SAAS,aAAa;EAC9C;;;;;EAMA,MAAM,aACJ,OACA,eAAqB;AAErB,UAAM,cAAU,0CAA6B,KAAK;AAClD,WAAO,KAAK,UAAU,SAAS,aAAa;EAC9C;;",
6
- "names": []
7
- }
@@ -1,22 +0,0 @@
1
- import { BaseResourceClient } from "../base";
2
- import { buildAuthShareAccessPayload, buildAuthRevokeAccessPayload } from "../payload-builders/auth";
3
- export class MajorAuthResourceClient extends BaseResourceClient {
4
- /**
5
- * Grant a user view access to this application by email.
6
- * If the user doesn't have an account, one will be created.
7
- * If the user isn't a member of the organization, they will be invited.
8
- */
9
- async shareAccess(email, invocationKey) {
10
- const payload = buildAuthShareAccessPayload(email);
11
- return this.invokeRaw(payload, invocationKey);
12
- }
13
- /**
14
- * Revoke a user's view access to this application by email.
15
- * Only removes app-level access; does not affect org membership or roles.
16
- */
17
- async revokeAccess(email, invocationKey) {
18
- const payload = buildAuthRevokeAccessPayload(email);
19
- return this.invokeRaw(payload, invocationKey);
20
- }
21
- }
22
- //# sourceMappingURL=auth.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/clients/auth.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,EAAE,2BAA2B,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC;AAErG,MAAM,OAAO,uBAAwB,SAAQ,kBAAkB;IAC7D;;;;OAIG;IACH,KAAK,CAAC,WAAW,CACf,KAAa,EACb,aAAqB;QAErB,MAAM,OAAO,GAAG,2BAA2B,CAAC,KAAK,CAAC,CAAC;QACnD,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,aAAa,CAAgC,CAAC;IAC/E,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,YAAY,CAChB,KAAa,EACb,aAAqB;QAErB,MAAM,OAAO,GAAG,4BAA4B,CAAC,KAAK,CAAC,CAAC;QACpD,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,aAAa,CAAgC,CAAC;IAC/E,CAAC;CACF"}
@@ -1,104 +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 bigquery_exports = {};
21
- __export(bigquery_exports, {
22
- BigQueryResourceClient: () => BigQueryResourceClient
23
- });
24
- module.exports = __toCommonJS(bigquery_exports);
25
- var import_base = require("../base");
26
- var import_bigquery = require("../payload-builders/bigquery");
27
- class BigQueryResourceClient extends import_base.BaseResourceClient {
28
- static {
29
- __name(this, "BigQueryResourceClient");
30
- }
31
- /**
32
- * Execute a SQL query
33
- * @param sql The SQL query to execute
34
- * @param params Optional query parameters (named parameters)
35
- * @param invocationKey Unique key for tracking this invocation
36
- * @param options Query options
37
- */
38
- async query(sql, params, invocationKey, options) {
39
- const payload = (0, import_bigquery.buildBigQueryQueryPayload)(sql, params, options);
40
- return this.invokeRaw(payload, invocationKey);
41
- }
42
- /**
43
- * List all datasets in the project
44
- * @param invocationKey Unique key for tracking this invocation
45
- * @param options List options
46
- */
47
- async listDatasets(invocationKey, options) {
48
- const payload = (0, import_bigquery.buildBigQueryListDatasetsPayload)(options);
49
- return this.invokeRaw(payload, invocationKey);
50
- }
51
- /**
52
- * List all tables in a dataset
53
- * @param datasetId The dataset ID
54
- * @param invocationKey Unique key for tracking this invocation
55
- * @param options List options
56
- */
57
- async listTables(datasetId, invocationKey, options) {
58
- const payload = (0, import_bigquery.buildBigQueryListTablesPayload)(datasetId, options);
59
- return this.invokeRaw(payload, invocationKey);
60
- }
61
- /**
62
- * Get table metadata and schema
63
- * @param datasetId The dataset ID
64
- * @param tableId The table ID
65
- * @param invocationKey Unique key for tracking this invocation
66
- */
67
- async getTable(datasetId, tableId, invocationKey) {
68
- const payload = (0, import_bigquery.buildBigQueryGetTablePayload)(datasetId, tableId);
69
- return this.invokeRaw(payload, invocationKey);
70
- }
71
- /**
72
- * Insert rows into a table (streaming insert)
73
- * @param datasetId The dataset ID
74
- * @param tableId The table ID
75
- * @param rows Array of rows to insert
76
- * @param invocationKey Unique key for tracking this invocation
77
- */
78
- async insertRows(datasetId, tableId, rows, invocationKey) {
79
- const payload = (0, import_bigquery.buildBigQueryInsertRowsPayload)(datasetId, tableId, rows);
80
- return this.invokeRaw(payload, invocationKey);
81
- }
82
- /**
83
- * Create a new table
84
- * @param datasetId The dataset ID
85
- * @param tableId The table ID
86
- * @param schema Table schema definition
87
- * @param invocationKey Unique key for tracking this invocation
88
- * @param options Table creation options
89
- */
90
- async createTable(datasetId, tableId, schema, invocationKey, options) {
91
- const payload = (0, import_bigquery.buildBigQueryCreateTablePayload)(datasetId, tableId, schema, options);
92
- return this.invokeRaw(payload, invocationKey);
93
- }
94
- /**
95
- * Raw invoke with a custom payload
96
- * @param payload The BigQuery payload
97
- * @param invocationKey Unique key for tracking this invocation
98
- */
99
- async invoke(payload, invocationKey) {
100
- const fullPayload = (0, import_bigquery.buildBigQueryInvokePayload)(payload);
101
- return this.invokeRaw(fullPayload, invocationKey);
102
- }
103
- }
104
- //# sourceMappingURL=bigquery.cjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/clients/bigquery.ts"],
4
- "sourcesContent": ["import type {\n BigQueryInvokeResponse,\n BigQueryTableSchema,\n DbBigQueryPayload,\n} from \"../schemas\";\nimport { BaseResourceClient } from \"../base\";\nimport {\n buildBigQueryQueryPayload,\n buildBigQueryListDatasetsPayload,\n buildBigQueryListTablesPayload,\n buildBigQueryGetTablePayload,\n buildBigQueryInsertRowsPayload,\n buildBigQueryCreateTablePayload,\n buildBigQueryInvokePayload,\n} from \"../payload-builders/bigquery\";\n\nexport interface BigQueryQueryOptions {\n timeoutMs?: number;\n maxResults?: number;\n}\n\nexport class BigQueryResourceClient extends BaseResourceClient {\n /**\n * Execute a SQL query\n * @param sql The SQL query to execute\n * @param params Optional query parameters (named parameters)\n * @param invocationKey Unique key for tracking this invocation\n * @param options Query options\n */\n async query(\n sql: string,\n params: Record<string, unknown> | undefined,\n invocationKey: string,\n options?: BigQueryQueryOptions\n ): Promise<BigQueryInvokeResponse> {\n const payload = buildBigQueryQueryPayload(sql, params, options);\n return this.invokeRaw(payload, invocationKey) as Promise<BigQueryInvokeResponse>;\n }\n\n /**\n * List all datasets in the project\n * @param invocationKey Unique key for tracking this invocation\n * @param options List options\n */\n async listDatasets(\n invocationKey: string,\n options?: { maxResults?: number }\n ): Promise<BigQueryInvokeResponse> {\n const payload = buildBigQueryListDatasetsPayload(options);\n return this.invokeRaw(payload, invocationKey) as Promise<BigQueryInvokeResponse>;\n }\n\n /**\n * List all tables in a dataset\n * @param datasetId The dataset ID\n * @param invocationKey Unique key for tracking this invocation\n * @param options List options\n */\n async listTables(\n datasetId: string,\n invocationKey: string,\n options?: { maxResults?: number }\n ): Promise<BigQueryInvokeResponse> {\n const payload = buildBigQueryListTablesPayload(datasetId, options);\n return this.invokeRaw(payload, invocationKey) as Promise<BigQueryInvokeResponse>;\n }\n\n /**\n * Get table metadata and schema\n * @param datasetId The dataset ID\n * @param tableId The table ID\n * @param invocationKey Unique key for tracking this invocation\n */\n async getTable(\n datasetId: string,\n tableId: string,\n invocationKey: string\n ): Promise<BigQueryInvokeResponse> {\n const payload = buildBigQueryGetTablePayload(datasetId, tableId);\n return this.invokeRaw(payload, invocationKey) as Promise<BigQueryInvokeResponse>;\n }\n\n /**\n * Insert rows into a table (streaming insert)\n * @param datasetId The dataset ID\n * @param tableId The table ID\n * @param rows Array of rows to insert\n * @param invocationKey Unique key for tracking this invocation\n */\n async insertRows(\n datasetId: string,\n tableId: string,\n rows: Record<string, unknown>[],\n invocationKey: string\n ): Promise<BigQueryInvokeResponse> {\n const payload = buildBigQueryInsertRowsPayload(datasetId, tableId, rows);\n return this.invokeRaw(payload, invocationKey) as Promise<BigQueryInvokeResponse>;\n }\n\n /**\n * Create a new table\n * @param datasetId The dataset ID\n * @param tableId The table ID\n * @param schema Table schema definition\n * @param invocationKey Unique key for tracking this invocation\n * @param options Table creation options\n */\n async createTable(\n datasetId: string,\n tableId: string,\n schema: BigQueryTableSchema,\n invocationKey: string,\n options?: { timeoutMs?: number }\n ): Promise<BigQueryInvokeResponse> {\n const payload = buildBigQueryCreateTablePayload(datasetId, tableId, schema, options);\n return this.invokeRaw(payload, invocationKey) as Promise<BigQueryInvokeResponse>;\n }\n\n /**\n * Raw invoke with a custom payload\n * @param payload The BigQuery payload\n * @param invocationKey Unique key for tracking this invocation\n */\n async invoke(\n payload: Omit<DbBigQueryPayload, \"type\" | \"subtype\">,\n invocationKey: string\n ): Promise<BigQueryInvokeResponse> {\n const fullPayload = buildBigQueryInvokePayload(payload);\n return this.invokeRaw(fullPayload, invocationKey) as Promise<BigQueryInvokeResponse>;\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;AAKA;;;;;AAAA,kBAAmC;AACnC,sBAQO;AAOD,MAAO,+BAA+B,+BAAkB;EAhB9D,OAgB8D;;;;;;;;;;EAQ5D,MAAM,MACJ,KACA,QACA,eACA,SAA8B;AAE9B,UAAM,cAAU,2CAA0B,KAAK,QAAQ,OAAO;AAC9D,WAAO,KAAK,UAAU,SAAS,aAAa;EAC9C;;;;;;EAOA,MAAM,aACJ,eACA,SAAiC;AAEjC,UAAM,cAAU,kDAAiC,OAAO;AACxD,WAAO,KAAK,UAAU,SAAS,aAAa;EAC9C;;;;;;;EAQA,MAAM,WACJ,WACA,eACA,SAAiC;AAEjC,UAAM,cAAU,gDAA+B,WAAW,OAAO;AACjE,WAAO,KAAK,UAAU,SAAS,aAAa;EAC9C;;;;;;;EAQA,MAAM,SACJ,WACA,SACA,eAAqB;AAErB,UAAM,cAAU,8CAA6B,WAAW,OAAO;AAC/D,WAAO,KAAK,UAAU,SAAS,aAAa;EAC9C;;;;;;;;EASA,MAAM,WACJ,WACA,SACA,MACA,eAAqB;AAErB,UAAM,cAAU,gDAA+B,WAAW,SAAS,IAAI;AACvE,WAAO,KAAK,UAAU,SAAS,aAAa;EAC9C;;;;;;;;;EAUA,MAAM,YACJ,WACA,SACA,QACA,eACA,SAAgC;AAEhC,UAAM,cAAU,iDAAgC,WAAW,SAAS,QAAQ,OAAO;AACnF,WAAO,KAAK,UAAU,SAAS,aAAa;EAC9C;;;;;;EAOA,MAAM,OACJ,SACA,eAAqB;AAErB,UAAM,kBAAc,4CAA2B,OAAO;AACtD,WAAO,KAAK,UAAU,aAAa,aAAa;EAClD;;",
6
- "names": []
7
- }
@@ -1,77 +0,0 @@
1
- import { BaseResourceClient } from "../base";
2
- import { buildBigQueryQueryPayload, buildBigQueryListDatasetsPayload, buildBigQueryListTablesPayload, buildBigQueryGetTablePayload, buildBigQueryInsertRowsPayload, buildBigQueryCreateTablePayload, buildBigQueryInvokePayload, } from "../payload-builders/bigquery";
3
- export class BigQueryResourceClient extends BaseResourceClient {
4
- /**
5
- * Execute a SQL query
6
- * @param sql The SQL query to execute
7
- * @param params Optional query parameters (named parameters)
8
- * @param invocationKey Unique key for tracking this invocation
9
- * @param options Query options
10
- */
11
- async query(sql, params, invocationKey, options) {
12
- const payload = buildBigQueryQueryPayload(sql, params, options);
13
- return this.invokeRaw(payload, invocationKey);
14
- }
15
- /**
16
- * List all datasets in the project
17
- * @param invocationKey Unique key for tracking this invocation
18
- * @param options List options
19
- */
20
- async listDatasets(invocationKey, options) {
21
- const payload = buildBigQueryListDatasetsPayload(options);
22
- return this.invokeRaw(payload, invocationKey);
23
- }
24
- /**
25
- * List all tables in a dataset
26
- * @param datasetId The dataset ID
27
- * @param invocationKey Unique key for tracking this invocation
28
- * @param options List options
29
- */
30
- async listTables(datasetId, invocationKey, options) {
31
- const payload = buildBigQueryListTablesPayload(datasetId, options);
32
- return this.invokeRaw(payload, invocationKey);
33
- }
34
- /**
35
- * Get table metadata and schema
36
- * @param datasetId The dataset ID
37
- * @param tableId The table ID
38
- * @param invocationKey Unique key for tracking this invocation
39
- */
40
- async getTable(datasetId, tableId, invocationKey) {
41
- const payload = buildBigQueryGetTablePayload(datasetId, tableId);
42
- return this.invokeRaw(payload, invocationKey);
43
- }
44
- /**
45
- * Insert rows into a table (streaming insert)
46
- * @param datasetId The dataset ID
47
- * @param tableId The table ID
48
- * @param rows Array of rows to insert
49
- * @param invocationKey Unique key for tracking this invocation
50
- */
51
- async insertRows(datasetId, tableId, rows, invocationKey) {
52
- const payload = buildBigQueryInsertRowsPayload(datasetId, tableId, rows);
53
- return this.invokeRaw(payload, invocationKey);
54
- }
55
- /**
56
- * Create a new table
57
- * @param datasetId The dataset ID
58
- * @param tableId The table ID
59
- * @param schema Table schema definition
60
- * @param invocationKey Unique key for tracking this invocation
61
- * @param options Table creation options
62
- */
63
- async createTable(datasetId, tableId, schema, invocationKey, options) {
64
- const payload = buildBigQueryCreateTablePayload(datasetId, tableId, schema, options);
65
- return this.invokeRaw(payload, invocationKey);
66
- }
67
- /**
68
- * Raw invoke with a custom payload
69
- * @param payload The BigQuery payload
70
- * @param invocationKey Unique key for tracking this invocation
71
- */
72
- async invoke(payload, invocationKey) {
73
- const fullPayload = buildBigQueryInvokePayload(payload);
74
- return this.invokeRaw(fullPayload, invocationKey);
75
- }
76
- }
77
- //# sourceMappingURL=bigquery.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bigquery.js","sourceRoot":"","sources":["../../src/clients/bigquery.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,EACL,yBAAyB,EACzB,gCAAgC,EAChC,8BAA8B,EAC9B,4BAA4B,EAC5B,8BAA8B,EAC9B,+BAA+B,EAC/B,0BAA0B,GAC3B,MAAM,8BAA8B,CAAC;AAOtC,MAAM,OAAO,sBAAuB,SAAQ,kBAAkB;IAC5D;;;;;;OAMG;IACH,KAAK,CAAC,KAAK,CACT,GAAW,EACX,MAA2C,EAC3C,aAAqB,EACrB,OAA8B;QAE9B,MAAM,OAAO,GAAG,yBAAyB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;QAChE,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,aAAa,CAAoC,CAAC;IACnF,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,YAAY,CAChB,aAAqB,EACrB,OAAiC;QAEjC,MAAM,OAAO,GAAG,gCAAgC,CAAC,OAAO,CAAC,CAAC;QAC1D,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,aAAa,CAAoC,CAAC;IACnF,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,UAAU,CACd,SAAiB,EACjB,aAAqB,EACrB,OAAiC;QAEjC,MAAM,OAAO,GAAG,8BAA8B,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QACnE,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,aAAa,CAAoC,CAAC;IACnF,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,QAAQ,CACZ,SAAiB,EACjB,OAAe,EACf,aAAqB;QAErB,MAAM,OAAO,GAAG,4BAA4B,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QACjE,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,aAAa,CAAoC,CAAC;IACnF,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,UAAU,CACd,SAAiB,EACjB,OAAe,EACf,IAA+B,EAC/B,aAAqB;QAErB,MAAM,OAAO,GAAG,8BAA8B,CAAC,SAAS,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;QACzE,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,aAAa,CAAoC,CAAC;IACnF,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,WAAW,CACf,SAAiB,EACjB,OAAe,EACf,MAA2B,EAC3B,aAAqB,EACrB,OAAgC;QAEhC,MAAM,OAAO,GAAG,+BAA+B,CAAC,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;QACrF,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,aAAa,CAAoC,CAAC;IACnF,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,MAAM,CACV,OAAoD,EACpD,aAAqB;QAErB,MAAM,WAAW,GAAG,0BAA0B,CAAC,OAAO,CAAC,CAAC;QACxD,OAAO,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,aAAa,CAAoC,CAAC;IACvF,CAAC;CACF"}
@@ -1,119 +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 cosmosdb_exports = {};
21
- __export(cosmosdb_exports, {
22
- CosmosDBResourceClient: () => CosmosDBResourceClient
23
- });
24
- module.exports = __toCommonJS(cosmosdb_exports);
25
- var import_base = require("../base");
26
- var import_cosmosdb = require("../payload-builders/cosmosdb");
27
- class CosmosDBResourceClient extends import_base.BaseResourceClient {
28
- static {
29
- __name(this, "CosmosDBResourceClient");
30
- }
31
- /**
32
- * Invoke a CosmosDB 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_cosmosdb.buildCosmosDBInvokePayload)(payload), invocationKey);
38
- }
39
- /**
40
- * Execute a SQL query against a container
41
- * @param container The container name
42
- * @param query The SQL query string
43
- * @param invocationKey Unique key for tracking this invocation
44
- * @param options Query options (parameters, partitionKey, pagination)
45
- */
46
- async query(container, query, invocationKey, options) {
47
- const payload = (0, import_cosmosdb.buildCosmosDBQueryPayload)(container, query, options);
48
- return this.invokeRaw(payload, invocationKey);
49
- }
50
- /**
51
- * Read a single document by ID
52
- * @param container The container name
53
- * @param id The document ID
54
- * @param invocationKey Unique key for tracking this invocation
55
- * @param options Additional options (partitionKey, timeoutMs)
56
- */
57
- async read(container, id, invocationKey, options) {
58
- const payload = (0, import_cosmosdb.buildCosmosDBReadPayload)(container, id, options);
59
- return this.invokeRaw(payload, invocationKey);
60
- }
61
- /**
62
- * Create a new document
63
- * @param container The container name
64
- * @param body The document body (must include id and partition key properties)
65
- * @param invocationKey Unique key for tracking this invocation
66
- * @param options Additional options (partitionKey, timeoutMs)
67
- */
68
- async create(container, body, invocationKey, options) {
69
- const payload = (0, import_cosmosdb.buildCosmosDBCreatePayload)(container, body, options);
70
- return this.invokeRaw(payload, invocationKey);
71
- }
72
- /**
73
- * Replace an existing document
74
- * @param container The container name
75
- * @param id The document ID
76
- * @param body The new document body
77
- * @param invocationKey Unique key for tracking this invocation
78
- * @param options Additional options (partitionKey, timeoutMs)
79
- */
80
- async replace(container, id, body, invocationKey, options) {
81
- const payload = (0, import_cosmosdb.buildCosmosDBReplacePayload)(container, id, body, options);
82
- return this.invokeRaw(payload, invocationKey);
83
- }
84
- /**
85
- * Upsert a document (insert or replace)
86
- * @param container The container name
87
- * @param body The document body (must include id and partition key properties)
88
- * @param invocationKey Unique key for tracking this invocation
89
- * @param options Additional options (partitionKey, timeoutMs)
90
- */
91
- async upsert(container, body, invocationKey, options) {
92
- const payload = (0, import_cosmosdb.buildCosmosDBUpsertPayload)(container, body, options);
93
- return this.invokeRaw(payload, invocationKey);
94
- }
95
- /**
96
- * Delete a document
97
- * @param container The container name
98
- * @param id The document ID
99
- * @param invocationKey Unique key for tracking this invocation
100
- * @param options Additional options (partitionKey, timeoutMs)
101
- */
102
- async delete(container, id, invocationKey, options) {
103
- const payload = (0, import_cosmosdb.buildCosmosDBDeletePayload)(container, id, options);
104
- return this.invokeRaw(payload, invocationKey);
105
- }
106
- /**
107
- * Patch a document with partial updates
108
- * @param container The container name
109
- * @param id The document ID
110
- * @param patchOperations Array of patch operations
111
- * @param invocationKey Unique key for tracking this invocation
112
- * @param options Additional options (partitionKey, condition, timeoutMs)
113
- */
114
- async patch(container, id, patchOperations, invocationKey, options) {
115
- const payload = (0, import_cosmosdb.buildCosmosDBPatchPayload)(container, id, patchOperations, options);
116
- return this.invokeRaw(payload, invocationKey);
117
- }
118
- }
119
- //# sourceMappingURL=cosmosdb.cjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/clients/cosmosdb.ts"],
4
- "sourcesContent": ["import type {\n DbCosmosDBPayload,\n CosmosValue,\n PartitionKey,\n CosmosQueryParameter,\n CosmosPatchOperation,\n CosmosQueryResult,\n CosmosReadResult,\n CosmosCreateResult,\n CosmosReplaceResult,\n CosmosUpsertResult,\n CosmosDeleteResult,\n CosmosPatchResult,\n DbCosmosDBResultGeneric,\n} from \"../schemas\";\nimport type { BaseInvokeSuccess, InvokeFailure } from \"../schemas/response\";\nimport { BaseResourceClient } from \"../base\";\nimport {\n buildCosmosDBInvokePayload,\n buildCosmosDBQueryPayload,\n buildCosmosDBReadPayload,\n buildCosmosDBCreatePayload,\n buildCosmosDBReplacePayload,\n buildCosmosDBUpsertPayload,\n buildCosmosDBDeletePayload,\n buildCosmosDBPatchPayload,\n} from \"../payload-builders/cosmosdb\";\n\nexport class CosmosDBResourceClient extends BaseResourceClient {\n /**\n * Invoke a CosmosDB 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<T = Record<string, unknown>>(\n payload: DbCosmosDBPayload,\n invocationKey: string\n ): Promise<BaseInvokeSuccess<DbCosmosDBResultGeneric<T>> | InvokeFailure> {\n return this.invokeRaw(buildCosmosDBInvokePayload(payload), invocationKey) as Promise<\n BaseInvokeSuccess<DbCosmosDBResultGeneric<T>> | InvokeFailure\n >;\n }\n\n /**\n * Execute a SQL query against a container\n * @param container The container name\n * @param query The SQL query string\n * @param invocationKey Unique key for tracking this invocation\n * @param options Query options (parameters, partitionKey, pagination)\n */\n async query<T = Record<string, unknown>>(\n container: string,\n query: string,\n invocationKey: string,\n options?: {\n parameters?: CosmosQueryParameter[];\n partitionKey?: PartitionKey;\n maxItemCount?: number;\n continuationToken?: string;\n timeoutMs?: number;\n }\n ): Promise<BaseInvokeSuccess<CosmosQueryResult<T>> | InvokeFailure> {\n const payload = buildCosmosDBQueryPayload(container, query, options);\n return this.invokeRaw(payload, invocationKey) as Promise<\n BaseInvokeSuccess<CosmosQueryResult<T>> | InvokeFailure\n >;\n }\n\n /**\n * Read a single document by ID\n * @param container The container name\n * @param id The document ID\n * @param invocationKey Unique key for tracking this invocation\n * @param options Additional options (partitionKey, timeoutMs)\n */\n async read<T = Record<string, unknown>>(\n container: string,\n id: string,\n invocationKey: string,\n options?: { partitionKey?: PartitionKey; timeoutMs?: number }\n ): Promise<BaseInvokeSuccess<CosmosReadResult<T>> | InvokeFailure> {\n const payload = buildCosmosDBReadPayload(container, id, options);\n return this.invokeRaw(payload, invocationKey) as Promise<\n BaseInvokeSuccess<CosmosReadResult<T>> | InvokeFailure\n >;\n }\n\n /**\n * Create a new document\n * @param container The container name\n * @param body The document body (must include id and partition key properties)\n * @param invocationKey Unique key for tracking this invocation\n * @param options Additional options (partitionKey, timeoutMs)\n */\n async create<T = Record<string, unknown>>(\n container: string,\n body: Record<string, CosmosValue>,\n invocationKey: string,\n options?: { partitionKey?: PartitionKey; timeoutMs?: number }\n ): Promise<BaseInvokeSuccess<CosmosCreateResult<T>> | InvokeFailure> {\n const payload = buildCosmosDBCreatePayload(container, body, options);\n return this.invokeRaw(payload, invocationKey) as Promise<\n BaseInvokeSuccess<CosmosCreateResult<T>> | InvokeFailure\n >;\n }\n\n /**\n * Replace an existing document\n * @param container The container name\n * @param id The document ID\n * @param body The new document body\n * @param invocationKey Unique key for tracking this invocation\n * @param options Additional options (partitionKey, timeoutMs)\n */\n async replace<T = Record<string, unknown>>(\n container: string,\n id: string,\n body: Record<string, CosmosValue>,\n invocationKey: string,\n options?: { partitionKey?: PartitionKey; timeoutMs?: number }\n ): Promise<BaseInvokeSuccess<CosmosReplaceResult<T>> | InvokeFailure> {\n const payload = buildCosmosDBReplacePayload(container, id, body, options);\n return this.invokeRaw(payload, invocationKey) as Promise<\n BaseInvokeSuccess<CosmosReplaceResult<T>> | InvokeFailure\n >;\n }\n\n /**\n * Upsert a document (insert or replace)\n * @param container The container name\n * @param body The document body (must include id and partition key properties)\n * @param invocationKey Unique key for tracking this invocation\n * @param options Additional options (partitionKey, timeoutMs)\n */\n async upsert<T = Record<string, unknown>>(\n container: string,\n body: Record<string, CosmosValue>,\n invocationKey: string,\n options?: { partitionKey?: PartitionKey; timeoutMs?: number }\n ): Promise<BaseInvokeSuccess<CosmosUpsertResult<T>> | InvokeFailure> {\n const payload = buildCosmosDBUpsertPayload(container, body, options);\n return this.invokeRaw(payload, invocationKey) as Promise<\n BaseInvokeSuccess<CosmosUpsertResult<T>> | InvokeFailure\n >;\n }\n\n /**\n * Delete a document\n * @param container The container name\n * @param id The document ID\n * @param invocationKey Unique key for tracking this invocation\n * @param options Additional options (partitionKey, timeoutMs)\n */\n async delete(\n container: string,\n id: string,\n invocationKey: string,\n options?: { partitionKey?: PartitionKey; timeoutMs?: number }\n ): Promise<BaseInvokeSuccess<CosmosDeleteResult> | InvokeFailure> {\n const payload = buildCosmosDBDeletePayload(container, id, options);\n return this.invokeRaw(payload, invocationKey) as Promise<\n BaseInvokeSuccess<CosmosDeleteResult> | InvokeFailure\n >;\n }\n\n /**\n * Patch a document with partial updates\n * @param container The container name\n * @param id The document ID\n * @param patchOperations Array of patch operations\n * @param invocationKey Unique key for tracking this invocation\n * @param options Additional options (partitionKey, condition, timeoutMs)\n */\n async patch<T = Record<string, unknown>>(\n container: string,\n id: string,\n patchOperations: CosmosPatchOperation[],\n invocationKey: string,\n options?: { partitionKey?: PartitionKey; condition?: string; timeoutMs?: number }\n ): Promise<BaseInvokeSuccess<CosmosPatchResult<T>> | InvokeFailure> {\n const payload = buildCosmosDBPatchPayload(container, id, patchOperations, options);\n return this.invokeRaw(payload, invocationKey) as Promise<\n BaseInvokeSuccess<CosmosPatchResult<T>> | InvokeFailure\n >;\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;AAgBA;;;;;AAAA,kBAAmC;AACnC,sBASO;AAED,MAAO,+BAA+B,+BAAkB;EAZ9D,OAY8D;;;;;;;;EAM5D,MAAM,OACJ,SACA,eAAqB;AAErB,WAAO,KAAK,cAAU,4CAA2B,OAAO,GAAG,aAAa;EAG1E;;;;;;;;EASA,MAAM,MACJ,WACA,OACA,eACA,SAMC;AAED,UAAM,cAAU,2CAA0B,WAAW,OAAO,OAAO;AACnE,WAAO,KAAK,UAAU,SAAS,aAAa;EAG9C;;;;;;;;EASA,MAAM,KACJ,WACA,IACA,eACA,SAA6D;AAE7D,UAAM,cAAU,0CAAyB,WAAW,IAAI,OAAO;AAC/D,WAAO,KAAK,UAAU,SAAS,aAAa;EAG9C;;;;;;;;EASA,MAAM,OACJ,WACA,MACA,eACA,SAA6D;AAE7D,UAAM,cAAU,4CAA2B,WAAW,MAAM,OAAO;AACnE,WAAO,KAAK,UAAU,SAAS,aAAa;EAG9C;;;;;;;;;EAUA,MAAM,QACJ,WACA,IACA,MACA,eACA,SAA6D;AAE7D,UAAM,cAAU,6CAA4B,WAAW,IAAI,MAAM,OAAO;AACxE,WAAO,KAAK,UAAU,SAAS,aAAa;EAG9C;;;;;;;;EASA,MAAM,OACJ,WACA,MACA,eACA,SAA6D;AAE7D,UAAM,cAAU,4CAA2B,WAAW,MAAM,OAAO;AACnE,WAAO,KAAK,UAAU,SAAS,aAAa;EAG9C;;;;;;;;EASA,MAAM,OACJ,WACA,IACA,eACA,SAA6D;AAE7D,UAAM,cAAU,4CAA2B,WAAW,IAAI,OAAO;AACjE,WAAO,KAAK,UAAU,SAAS,aAAa;EAG9C;;;;;;;;;EAUA,MAAM,MACJ,WACA,IACA,iBACA,eACA,SAAiF;AAEjF,UAAM,cAAU,2CAA0B,WAAW,IAAI,iBAAiB,OAAO;AACjF,WAAO,KAAK,UAAU,SAAS,aAAa;EAG9C;;",
6
- "names": []
7
- }