@major-tech/resource-client 0.2.47 → 0.2.49

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 (39) hide show
  1. package/bin/generate-clients.mjs +7 -3
  2. package/dist/clients/linear.d.ts +10 -0
  3. package/dist/clients/linear.d.ts.map +1 -0
  4. package/dist/clients/ringcentral.d.ts +111 -0
  5. package/dist/clients/ringcentral.d.ts.map +1 -0
  6. package/dist/clients/zohodesk.d.ts +13 -0
  7. package/dist/clients/zohodesk.d.ts.map +1 -0
  8. package/dist/clients/zohoprojects.d.ts +13 -0
  9. package/dist/clients/zohoprojects.d.ts.map +1 -0
  10. package/dist/index.cjs +314 -1
  11. package/dist/index.cjs.map +3 -3
  12. package/dist/index.d.ts +5 -1
  13. package/dist/index.d.ts.map +1 -1
  14. package/dist/index.js +314 -1
  15. package/dist/index.js.map +3 -3
  16. package/dist/payload-builders/from-extracted-params.d.ts.map +1 -1
  17. package/dist/payload-builders/index.d.ts +4 -0
  18. package/dist/payload-builders/index.d.ts.map +1 -1
  19. package/dist/payload-builders/linear.d.ts +7 -0
  20. package/dist/payload-builders/linear.d.ts.map +1 -0
  21. package/dist/payload-builders/ringcentral.d.ts +63 -0
  22. package/dist/payload-builders/ringcentral.d.ts.map +1 -0
  23. package/dist/payload-builders/zohodesk.d.ts +13 -0
  24. package/dist/payload-builders/zohodesk.d.ts.map +1 -0
  25. package/dist/payload-builders/zohoprojects.d.ts +13 -0
  26. package/dist/payload-builders/zohoprojects.d.ts.map +1 -0
  27. package/dist/schemas/api-linear.d.ts +9 -0
  28. package/dist/schemas/api-linear.d.ts.map +1 -0
  29. package/dist/schemas/api-ringcentral.d.ts +20 -0
  30. package/dist/schemas/api-ringcentral.d.ts.map +1 -0
  31. package/dist/schemas/api-zohodesk.d.ts +20 -0
  32. package/dist/schemas/api-zohodesk.d.ts.map +1 -0
  33. package/dist/schemas/api-zohoprojects.d.ts +20 -0
  34. package/dist/schemas/api-zohoprojects.d.ts.map +1 -0
  35. package/dist/schemas/index.d.ts +9 -1
  36. package/dist/schemas/index.d.ts.map +1 -1
  37. package/dist/schemas/response.d.ts +16 -0
  38. package/dist/schemas/response.d.ts.map +1 -1
  39. package/package.json +1 -1
@@ -10,7 +10,7 @@
10
10
  * npx @major-tech/resource-client list
11
11
  *
12
12
  * Modes: app (default) | tool
13
- * Types: postgresql | mssql | dynamodb | cosmosdb | snowflake | bigquery | neo4j | hubspot | googlesheets | outreach | custom | graphql | lambda | salesforce | s3 | slack | majorauth | googleanalytics | quickbooks | gong | dynamics
13
+ * Types: postgresql | mssql | dynamodb | cosmosdb | snowflake | bigquery | neo4j | hubspot | googlesheets | outreach | custom | graphql | lambda | salesforce | s3 | slack | majorauth | googleanalytics | quickbooks | gong | dynamics | linear | ringcentral | zohodesk | zohoprojects
14
14
  *
15
15
  * Examples:
16
16
  * npx @major-tech/resource-client add "abc-123" "orders-db" "postgresql" "Orders database" "app-123"
@@ -208,6 +208,10 @@ function getClientClass(type) {
208
208
  'quickbooks': 'QuickBooksResourceClient',
209
209
  'gong': 'GongResourceClient',
210
210
  'dynamics': 'DynamicsResourceClient',
211
+ 'linear': 'LinearResourceClient',
212
+ 'ringcentral': 'RingCentralResourceClient',
213
+ 'zohodesk': 'ZohoDeskResourceClient',
214
+ 'zohoprojects': 'ZohoProjectsResourceClient',
211
215
  };
212
216
  return typeMap[type] || 'PostgresResourceClient';
213
217
  }
@@ -266,7 +270,7 @@ function generateIndexFile(resources) {
266
270
  }
267
271
 
268
272
  function addResource(resourceId, name, type, description, applicationId, framework, mode) {
269
- const validTypes = ['postgresql', 'mssql', 'dynamodb', 'cosmosdb', 'snowflake', 'bigquery', 'neo4j', 'hubspot', 'googlesheets', 'outreach', 'custom', 'graphql', 'lambda', 'salesforce', 's3', 'slack', 'majorauth', 'googleanalytics', 'quickbooks', 'gong', 'dynamics'];
273
+ const validTypes = ['postgresql', 'mssql', 'dynamodb', 'cosmosdb', 'snowflake', 'bigquery', 'neo4j', 'hubspot', 'googlesheets', 'outreach', 'custom', 'graphql', 'lambda', 'salesforce', 's3', 'slack', 'majorauth', 'googleanalytics', 'quickbooks', 'gong', 'dynamics', 'linear', 'ringcentral', 'zohodesk', 'zohoprojects'];
270
274
  if (!validTypes.includes(type)) {
271
275
  console.error(`❌ Invalid type: ${type}`);
272
276
  console.error(` Valid types: ${validTypes.join(', ')}`);
@@ -421,7 +425,7 @@ function main() {
421
425
  console.log('\nModes: app (default) | tool');
422
426
  console.log(' app — requires <application_id>, reads MAJOR_API_BASE_URL');
423
427
  console.log(' tool — embeds toolId from tool.json at generation time, reads RESOURCE_API_URL');
424
- console.log('\nTypes: postgresql | mssql | dynamodb | cosmosdb | snowflake | bigquery | neo4j | hubspot | googlesheets | outreach | custom | graphql | lambda | salesforce | s3 | slack | majorauth | googleanalytics | quickbooks | gong | dynamics');
428
+ console.log('\nTypes: postgresql | mssql | dynamodb | cosmosdb | snowflake | bigquery | neo4j | hubspot | googlesheets | outreach | custom | graphql | lambda | salesforce | s3 | slack | majorauth | googleanalytics | quickbooks | gong | dynamics | linear | ringcentral | zohodesk | zohoprojects');
425
429
  return;
426
430
  }
427
431
 
@@ -0,0 +1,10 @@
1
+ import type { ApiInvokeResponse } from "../schemas";
2
+ import { BaseResourceClient } from "../base";
3
+ export declare class LinearResourceClient extends BaseResourceClient {
4
+ graphql(query: string, invocationKey: string, options?: {
5
+ variables?: Record<string, unknown>;
6
+ operationName?: string;
7
+ timeoutMs?: number;
8
+ }): Promise<ApiInvokeResponse>;
9
+ }
10
+ //# sourceMappingURL=linear.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"linear.d.ts","sourceRoot":"","sources":["../../src/clients/linear.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAG7C,qBAAa,oBAAqB,SAAQ,kBAAkB;IACpD,OAAO,CACX,KAAK,EAAE,MAAM,EACb,aAAa,EAAE,MAAM,EACrB,OAAO,GAAE;QACP,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACpC,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,SAAS,CAAC,EAAE,MAAM,CAAC;KACf,GACL,OAAO,CAAC,iBAAiB,CAAC;CAI9B"}
@@ -0,0 +1,111 @@
1
+ import type { HttpMethod, QueryParams, RingCentralInvokeResponse } from "../schemas";
2
+ import { BaseResourceClient } from "../base";
3
+ /**
4
+ * Client for interacting with RingCentral API resources.
5
+ *
6
+ * This client provides a simple interface for making authenticated requests
7
+ * to the RingCentral REST API. Authentication is handled automatically.
8
+ *
9
+ * @example
10
+ * ```typescript
11
+ * // List recent call log entries
12
+ * const calls = await client.listCallLog("list-calls", {
13
+ * dateFrom: "2024-01-01T00:00:00Z",
14
+ * perPage: 25,
15
+ * });
16
+ *
17
+ * // Send an SMS
18
+ * const sms = await client.sendSms("+15551234567", "+15559876543", "Hello!", "send-sms");
19
+ *
20
+ * // Generic API call
21
+ * const result = await client.invoke("GET", "/v1.0/account/~/extension", "list-ext");
22
+ * ```
23
+ */
24
+ export declare class RingCentralResourceClient extends BaseResourceClient {
25
+ /**
26
+ * Invoke a RingCentral API request
27
+ *
28
+ * @param method - HTTP method (GET, POST, PUT, PATCH, DELETE)
29
+ * @param path - RingCentral API path (e.g., "/v1.0/account/~/call-log")
30
+ * @param invocationKey - Unique key for this invocation (for tracking)
31
+ * @param options - Optional query params, body, and timeout
32
+ * @returns The API response with status and body
33
+ */
34
+ invoke(method: HttpMethod, path: string, invocationKey: string, options?: {
35
+ query?: QueryParams;
36
+ body?: {
37
+ type: "json";
38
+ value: unknown;
39
+ };
40
+ timeoutMs?: number;
41
+ }): Promise<RingCentralInvokeResponse>;
42
+ /**
43
+ * List call log entries
44
+ *
45
+ * @param invocationKey - Unique key for this invocation
46
+ * @param options - Optional filters (dateFrom, dateTo, direction, type, perPage, page)
47
+ * @returns Call log records
48
+ */
49
+ listCallLog(invocationKey: string, options?: {
50
+ dateFrom?: string;
51
+ dateTo?: string;
52
+ direction?: string;
53
+ type?: string;
54
+ perPage?: number;
55
+ page?: number;
56
+ }): Promise<RingCentralInvokeResponse>;
57
+ /**
58
+ * Get a specific call record by ID
59
+ *
60
+ * @param callRecordId - The call record ID
61
+ * @param invocationKey - Unique key for this invocation
62
+ * @returns The call record details
63
+ */
64
+ getCallRecord(callRecordId: string, invocationKey: string): Promise<RingCentralInvokeResponse>;
65
+ /**
66
+ * Send an SMS message
67
+ *
68
+ * @param from - Sender phone number
69
+ * @param to - Recipient phone number
70
+ * @param text - Message text
71
+ * @param invocationKey - Unique key for this invocation
72
+ * @returns The sent message details
73
+ */
74
+ sendSms(from: string, to: string, text: string, invocationKey: string): Promise<RingCentralInvokeResponse>;
75
+ /**
76
+ * List messages from the message store
77
+ *
78
+ * @param invocationKey - Unique key for this invocation
79
+ * @param options - Optional filters (messageType, dateFrom, dateTo, perPage, page)
80
+ * @returns Message records
81
+ */
82
+ listMessages(invocationKey: string, options?: {
83
+ messageType?: string;
84
+ dateFrom?: string;
85
+ dateTo?: string;
86
+ perPage?: number;
87
+ page?: number;
88
+ }): Promise<RingCentralInvokeResponse>;
89
+ /**
90
+ * List extensions on the account
91
+ *
92
+ * @param invocationKey - Unique key for this invocation
93
+ * @param options - Optional filters (type, status, perPage, page)
94
+ * @returns Extension records
95
+ */
96
+ listExtensions(invocationKey: string, options?: {
97
+ type?: string;
98
+ status?: string;
99
+ perPage?: number;
100
+ page?: number;
101
+ }): Promise<RingCentralInvokeResponse>;
102
+ /**
103
+ * Get a specific extension by ID
104
+ *
105
+ * @param extensionId - The extension ID
106
+ * @param invocationKey - Unique key for this invocation
107
+ * @returns The extension details
108
+ */
109
+ getExtension(extensionId: string, invocationKey: string): Promise<RingCentralInvokeResponse>;
110
+ }
111
+ //# sourceMappingURL=ringcentral.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ringcentral.d.ts","sourceRoot":"","sources":["../../src/clients/ringcentral.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,WAAW,EACX,yBAAyB,EAC1B,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAG7C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBAAa,yBAA0B,SAAQ,kBAAkB;IAC/D;;;;;;;;OAQG;IACG,MAAM,CACV,MAAM,EAAE,UAAU,EAClB,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,MAAM,EACrB,OAAO,GAAE;QACP,KAAK,CAAC,EAAE,WAAW,CAAC;QACpB,IAAI,CAAC,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,OAAO,CAAA;SAAE,CAAC;QACxC,SAAS,CAAC,EAAE,MAAM,CAAC;KACf,GACL,OAAO,CAAC,yBAAyB,CAAC;IAKrC;;;;;;OAMG;IACG,WAAW,CACf,aAAa,EAAE,MAAM,EACrB,OAAO,CAAC,EAAE;QACR,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,GACA,OAAO,CAAC,yBAAyB,CAAC;IAcrC;;;;;;OAMG;IACG,aAAa,CACjB,YAAY,EAAE,MAAM,EACpB,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,yBAAyB,CAAC;IAIrC;;;;;;;;OAQG;IACG,OAAO,CACX,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,yBAAyB,CAAC;IAarC;;;;;;OAMG;IACG,YAAY,CAChB,aAAa,EAAE,MAAM,EACrB,OAAO,CAAC,EAAE;QACR,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,GACA,OAAO,CAAC,yBAAyB,CAAC;IAarC;;;;;;OAMG;IACG,cAAc,CAClB,aAAa,EAAE,MAAM,EACrB,OAAO,CAAC,EAAE;QACR,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,GACA,OAAO,CAAC,yBAAyB,CAAC;IAYrC;;;;;;OAMG;IACG,YAAY,CAChB,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,yBAAyB,CAAC;CAGtC"}
@@ -0,0 +1,13 @@
1
+ import type { HttpMethod, QueryParams, ApiInvokeResponse } from "../schemas";
2
+ import { BaseResourceClient } from "../base";
3
+ export declare class ZohoDeskResourceClient extends BaseResourceClient {
4
+ invoke(method: HttpMethod, path: string, invocationKey: string, options?: {
5
+ query?: QueryParams;
6
+ body?: {
7
+ type: "json";
8
+ value: unknown;
9
+ };
10
+ timeoutMs?: number;
11
+ }): Promise<ApiInvokeResponse>;
12
+ }
13
+ //# sourceMappingURL=zohodesk.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zohodesk.d.ts","sourceRoot":"","sources":["../../src/clients/zohodesk.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,WAAW,EACX,iBAAiB,EAClB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAG7C,qBAAa,sBAAuB,SAAQ,kBAAkB;IACtD,MAAM,CACV,MAAM,EAAE,UAAU,EAClB,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,MAAM,EACrB,OAAO,GAAE;QACP,KAAK,CAAC,EAAE,WAAW,CAAC;QACpB,IAAI,CAAC,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,OAAO,CAAA;SAAE,CAAC;QACxC,SAAS,CAAC,EAAE,MAAM,CAAC;KACf,GACL,OAAO,CAAC,iBAAiB,CAAC;CAI9B"}
@@ -0,0 +1,13 @@
1
+ import type { HttpMethod, QueryParams, ApiInvokeResponse } from "../schemas";
2
+ import { BaseResourceClient } from "../base";
3
+ export declare class ZohoProjectsResourceClient extends BaseResourceClient {
4
+ invoke(method: HttpMethod, path: string, invocationKey: string, options?: {
5
+ query?: QueryParams;
6
+ body?: {
7
+ type: "json";
8
+ value: unknown;
9
+ };
10
+ timeoutMs?: number;
11
+ }): Promise<ApiInvokeResponse>;
12
+ }
13
+ //# sourceMappingURL=zohoprojects.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zohoprojects.d.ts","sourceRoot":"","sources":["../../src/clients/zohoprojects.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,WAAW,EACX,iBAAiB,EAClB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAG7C,qBAAa,0BAA2B,SAAQ,kBAAkB;IAC1D,MAAM,CACV,MAAM,EAAE,UAAU,EAClB,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,MAAM,EACrB,OAAO,GAAE;QACP,KAAK,CAAC,EAAE,WAAW,CAAC;QACpB,IAAI,CAAC,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,OAAO,CAAA;SAAE,CAAC;QACxC,SAAS,CAAC,EAAE,MAAM,CAAC;KACf,GACL,OAAO,CAAC,iBAAiB,CAAC;CAI9B"}
package/dist/index.cjs CHANGED
@@ -32,6 +32,7 @@ __export(index_exports, {
32
32
  GraphQLResourceClient: () => GraphQLResourceClient,
33
33
  HubSpotResourceClient: () => HubSpotResourceClient,
34
34
  LambdaResourceClient: () => LambdaResourceClient,
35
+ LinearResourceClient: () => LinearResourceClient,
35
36
  MajorAuthResourceClient: () => MajorAuthResourceClient,
36
37
  MssqlResourceClient: () => MssqlResourceClient,
37
38
  Neo4jResourceClient: () => Neo4jResourceClient,
@@ -39,10 +40,13 @@ __export(index_exports, {
39
40
  PostgresResourceClient: () => PostgresResourceClient,
40
41
  QuickBooksResourceClient: () => QuickBooksResourceClient,
41
42
  ResourceInvokeError: () => ResourceInvokeError,
43
+ RingCentralResourceClient: () => RingCentralResourceClient,
42
44
  S3ResourceClient: () => S3ResourceClient,
43
45
  SalesforceResourceClient: () => SalesforceResourceClient,
44
46
  SlackResourceClient: () => SlackResourceClient,
45
47
  SnowflakeResourceClient: () => SnowflakeResourceClient,
48
+ ZohoDeskResourceClient: () => ZohoDeskResourceClient,
49
+ ZohoProjectsResourceClient: () => ZohoProjectsResourceClient,
46
50
  buildAuthRevokeAccessPayload: () => buildAuthRevokeAccessPayload,
47
51
  buildAuthShareAccessPayload: () => buildAuthShareAccessPayload,
48
52
  buildBigQueryCreateTablePayload: () => buildBigQueryCreateTablePayload,
@@ -86,6 +90,7 @@ __export(index_exports, {
86
90
  buildGraphQLInvokePayload: () => buildGraphQLInvokePayload,
87
91
  buildHubSpotInvokePayload: () => buildHubSpotInvokePayload,
88
92
  buildLambdaInvokePayload: () => buildLambdaInvokePayload,
93
+ buildLinearGraphQLPayload: () => buildLinearGraphQLPayload,
89
94
  buildMssqlInvokePayload: () => buildMssqlInvokePayload,
90
95
  buildNeo4jInvokePayload: () => buildNeo4jInvokePayload,
91
96
  buildOutreachInvokePayload: () => buildOutreachInvokePayload,
@@ -93,6 +98,13 @@ __export(index_exports, {
93
98
  buildPostgresInvokePayload: () => buildPostgresInvokePayload,
94
99
  buildQuickBooksInvokePayload: () => buildQuickBooksInvokePayload,
95
100
  buildQuickBooksQueryPayload: () => buildQuickBooksQueryPayload,
101
+ buildRingCentralGetCallRecordPayload: () => buildRingCentralGetCallRecordPayload,
102
+ buildRingCentralGetExtensionPayload: () => buildRingCentralGetExtensionPayload,
103
+ buildRingCentralInvokePayload: () => buildRingCentralInvokePayload,
104
+ buildRingCentralListCallLogPayload: () => buildRingCentralListCallLogPayload,
105
+ buildRingCentralListExtensionsPayload: () => buildRingCentralListExtensionsPayload,
106
+ buildRingCentralListMessagesPayload: () => buildRingCentralListMessagesPayload,
107
+ buildRingCentralSendSmsPayload: () => buildRingCentralSendSmsPayload,
96
108
  buildS3InvokePayload: () => buildS3InvokePayload,
97
109
  buildSalesforceCreateRecordPayload: () => buildSalesforceCreateRecordPayload,
98
110
  buildSalesforceDeleteRecordPayload: () => buildSalesforceDeleteRecordPayload,
@@ -105,7 +117,9 @@ __export(index_exports, {
105
117
  buildSnowflakeCancelPayload: () => buildSnowflakeCancelPayload,
106
118
  buildSnowflakeExecutePayload: () => buildSnowflakeExecutePayload,
107
119
  buildSnowflakeInvokePayload: () => buildSnowflakeInvokePayload,
108
- buildSnowflakeStatusPayload: () => buildSnowflakeStatusPayload
120
+ buildSnowflakeStatusPayload: () => buildSnowflakeStatusPayload,
121
+ buildZohoDeskInvokePayload: () => buildZohoDeskInvokePayload,
122
+ buildZohoProjectsInvokePayload: () => buildZohoProjectsInvokePayload
109
123
  });
110
124
  module.exports = __toCommonJS(index_exports);
111
125
 
@@ -1716,6 +1730,244 @@ var DynamicsResourceClient = class extends BaseResourceClient {
1716
1730
  }
1717
1731
  };
1718
1732
 
1733
+ // src/payload-builders/linear.ts
1734
+ function buildLinearGraphQLPayload(query, options) {
1735
+ return {
1736
+ type: "api",
1737
+ subtype: "linear",
1738
+ query,
1739
+ variables: options?.variables,
1740
+ operationName: options?.operationName,
1741
+ timeoutMs: options?.timeoutMs ?? 3e4
1742
+ };
1743
+ }
1744
+
1745
+ // src/clients/linear.ts
1746
+ var LinearResourceClient = class extends BaseResourceClient {
1747
+ async graphql(query, invocationKey, options = {}) {
1748
+ const payload = buildLinearGraphQLPayload(query, options);
1749
+ return this.invokeRaw(payload, invocationKey);
1750
+ }
1751
+ };
1752
+
1753
+ // src/payload-builders/ringcentral.ts
1754
+ function buildRingCentralInvokePayload(method, path, options) {
1755
+ return {
1756
+ type: "api",
1757
+ subtype: "ringcentral",
1758
+ method,
1759
+ path,
1760
+ query: options?.query,
1761
+ body: options?.body,
1762
+ timeoutMs: options?.timeoutMs ?? 3e4
1763
+ };
1764
+ }
1765
+ function buildRingCentralListCallLogPayload(options) {
1766
+ const query = {};
1767
+ if (options?.dateFrom) query.dateFrom = options.dateFrom;
1768
+ if (options?.dateTo) query.dateTo = options.dateTo;
1769
+ if (options?.direction) query.direction = options.direction;
1770
+ if (options?.type) query.type = options.type;
1771
+ if (options?.perPage !== void 0) query.perPage = String(options.perPage);
1772
+ if (options?.page !== void 0) query.page = String(options.page);
1773
+ return buildRingCentralInvokePayload("GET", "/v1.0/account/~/call-log", {
1774
+ query: Object.keys(query).length > 0 ? query : void 0
1775
+ });
1776
+ }
1777
+ function buildRingCentralGetCallRecordPayload(callRecordId) {
1778
+ return buildRingCentralInvokePayload("GET", `/v1.0/account/~/call-log/${callRecordId}`);
1779
+ }
1780
+ function buildRingCentralSendSmsPayload(from, to, text) {
1781
+ return buildRingCentralInvokePayload("POST", "/v1.0/account/~/extension/~/sms", {
1782
+ body: {
1783
+ type: "json",
1784
+ value: {
1785
+ from: { phoneNumber: from },
1786
+ to: [{ phoneNumber: to }],
1787
+ text
1788
+ }
1789
+ }
1790
+ });
1791
+ }
1792
+ function buildRingCentralListMessagesPayload(options) {
1793
+ const query = {};
1794
+ if (options?.messageType) query.messageType = options.messageType;
1795
+ if (options?.dateFrom) query.dateFrom = options.dateFrom;
1796
+ if (options?.dateTo) query.dateTo = options.dateTo;
1797
+ if (options?.perPage !== void 0) query.perPage = String(options.perPage);
1798
+ if (options?.page !== void 0) query.page = String(options.page);
1799
+ return buildRingCentralInvokePayload("GET", "/v1.0/account/~/extension/~/message-store", {
1800
+ query: Object.keys(query).length > 0 ? query : void 0
1801
+ });
1802
+ }
1803
+ function buildRingCentralListExtensionsPayload(options) {
1804
+ const query = {};
1805
+ if (options?.type) query.type = options.type;
1806
+ if (options?.status) query.status = options.status;
1807
+ if (options?.perPage !== void 0) query.perPage = String(options.perPage);
1808
+ if (options?.page !== void 0) query.page = String(options.page);
1809
+ return buildRingCentralInvokePayload("GET", "/v1.0/account/~/extension", {
1810
+ query: Object.keys(query).length > 0 ? query : void 0
1811
+ });
1812
+ }
1813
+ function buildRingCentralGetExtensionPayload(extensionId) {
1814
+ return buildRingCentralInvokePayload("GET", `/v1.0/account/~/extension/${extensionId}`);
1815
+ }
1816
+
1817
+ // src/clients/ringcentral.ts
1818
+ var RingCentralResourceClient = class extends BaseResourceClient {
1819
+ /**
1820
+ * Invoke a RingCentral API request
1821
+ *
1822
+ * @param method - HTTP method (GET, POST, PUT, PATCH, DELETE)
1823
+ * @param path - RingCentral API path (e.g., "/v1.0/account/~/call-log")
1824
+ * @param invocationKey - Unique key for this invocation (for tracking)
1825
+ * @param options - Optional query params, body, and timeout
1826
+ * @returns The API response with status and body
1827
+ */
1828
+ async invoke(method, path, invocationKey, options = {}) {
1829
+ const payload = buildRingCentralInvokePayload(method, path, options);
1830
+ return this.invokeRaw(payload, invocationKey);
1831
+ }
1832
+ /**
1833
+ * List call log entries
1834
+ *
1835
+ * @param invocationKey - Unique key for this invocation
1836
+ * @param options - Optional filters (dateFrom, dateTo, direction, type, perPage, page)
1837
+ * @returns Call log records
1838
+ */
1839
+ async listCallLog(invocationKey, options) {
1840
+ const query = {};
1841
+ if (options?.dateFrom) query.dateFrom = options.dateFrom;
1842
+ if (options?.dateTo) query.dateTo = options.dateTo;
1843
+ if (options?.direction) query.direction = options.direction;
1844
+ if (options?.type) query.type = options.type;
1845
+ if (options?.perPage !== void 0) query.perPage = String(options.perPage);
1846
+ if (options?.page !== void 0) query.page = String(options.page);
1847
+ return this.invoke("GET", "/v1.0/account/~/call-log", invocationKey, {
1848
+ query: Object.keys(query).length > 0 ? query : void 0
1849
+ });
1850
+ }
1851
+ /**
1852
+ * Get a specific call record by ID
1853
+ *
1854
+ * @param callRecordId - The call record ID
1855
+ * @param invocationKey - Unique key for this invocation
1856
+ * @returns The call record details
1857
+ */
1858
+ async getCallRecord(callRecordId, invocationKey) {
1859
+ return this.invoke("GET", `/v1.0/account/~/call-log/${callRecordId}`, invocationKey);
1860
+ }
1861
+ /**
1862
+ * Send an SMS message
1863
+ *
1864
+ * @param from - Sender phone number
1865
+ * @param to - Recipient phone number
1866
+ * @param text - Message text
1867
+ * @param invocationKey - Unique key for this invocation
1868
+ * @returns The sent message details
1869
+ */
1870
+ async sendSms(from, to, text, invocationKey) {
1871
+ return this.invoke("POST", "/v1.0/account/~/extension/~/sms", invocationKey, {
1872
+ body: {
1873
+ type: "json",
1874
+ value: {
1875
+ from: { phoneNumber: from },
1876
+ to: [{ phoneNumber: to }],
1877
+ text
1878
+ }
1879
+ }
1880
+ });
1881
+ }
1882
+ /**
1883
+ * List messages from the message store
1884
+ *
1885
+ * @param invocationKey - Unique key for this invocation
1886
+ * @param options - Optional filters (messageType, dateFrom, dateTo, perPage, page)
1887
+ * @returns Message records
1888
+ */
1889
+ async listMessages(invocationKey, options) {
1890
+ const query = {};
1891
+ if (options?.messageType) query.messageType = options.messageType;
1892
+ if (options?.dateFrom) query.dateFrom = options.dateFrom;
1893
+ if (options?.dateTo) query.dateTo = options.dateTo;
1894
+ if (options?.perPage !== void 0) query.perPage = String(options.perPage);
1895
+ if (options?.page !== void 0) query.page = String(options.page);
1896
+ return this.invoke("GET", "/v1.0/account/~/extension/~/message-store", invocationKey, {
1897
+ query: Object.keys(query).length > 0 ? query : void 0
1898
+ });
1899
+ }
1900
+ /**
1901
+ * List extensions on the account
1902
+ *
1903
+ * @param invocationKey - Unique key for this invocation
1904
+ * @param options - Optional filters (type, status, perPage, page)
1905
+ * @returns Extension records
1906
+ */
1907
+ async listExtensions(invocationKey, options) {
1908
+ const query = {};
1909
+ if (options?.type) query.type = options.type;
1910
+ if (options?.status) query.status = options.status;
1911
+ if (options?.perPage !== void 0) query.perPage = String(options.perPage);
1912
+ if (options?.page !== void 0) query.page = String(options.page);
1913
+ return this.invoke("GET", "/v1.0/account/~/extension", invocationKey, {
1914
+ query: Object.keys(query).length > 0 ? query : void 0
1915
+ });
1916
+ }
1917
+ /**
1918
+ * Get a specific extension by ID
1919
+ *
1920
+ * @param extensionId - The extension ID
1921
+ * @param invocationKey - Unique key for this invocation
1922
+ * @returns The extension details
1923
+ */
1924
+ async getExtension(extensionId, invocationKey) {
1925
+ return this.invoke("GET", `/v1.0/account/~/extension/${extensionId}`, invocationKey);
1926
+ }
1927
+ };
1928
+
1929
+ // src/payload-builders/zohodesk.ts
1930
+ function buildZohoDeskInvokePayload(method, path, options) {
1931
+ return {
1932
+ type: "api",
1933
+ subtype: "zohodesk",
1934
+ method,
1935
+ path,
1936
+ query: options?.query,
1937
+ body: options?.body,
1938
+ timeoutMs: options?.timeoutMs ?? 3e4
1939
+ };
1940
+ }
1941
+
1942
+ // src/clients/zohodesk.ts
1943
+ var ZohoDeskResourceClient = class extends BaseResourceClient {
1944
+ async invoke(method, path, invocationKey, options = {}) {
1945
+ const payload = buildZohoDeskInvokePayload(method, path, options);
1946
+ return this.invokeRaw(payload, invocationKey);
1947
+ }
1948
+ };
1949
+
1950
+ // src/payload-builders/zohoprojects.ts
1951
+ function buildZohoProjectsInvokePayload(method, path, options) {
1952
+ return {
1953
+ type: "api",
1954
+ subtype: "zohoprojects",
1955
+ method,
1956
+ path,
1957
+ query: options?.query,
1958
+ body: options?.body,
1959
+ timeoutMs: options?.timeoutMs ?? 3e4
1960
+ };
1961
+ }
1962
+
1963
+ // src/clients/zohoprojects.ts
1964
+ var ZohoProjectsResourceClient = class extends BaseResourceClient {
1965
+ async invoke(method, path, invocationKey, options = {}) {
1966
+ const payload = buildZohoProjectsInvokePayload(method, path, options);
1967
+ return this.invokeRaw(payload, invocationKey);
1968
+ }
1969
+ };
1970
+
1719
1971
  // src/payload-builders/outreach.ts
1720
1972
  function buildOutreachInvokePayload(method, path, options) {
1721
1973
  return {
@@ -2156,6 +2408,67 @@ function buildPayloadFromExtractedParams(subtype, methodName, extractedParams) {
2156
2408
  const options = findParam(extractedParams, "Options");
2157
2409
  return buildDynamicsInvokePayload(method, path, options);
2158
2410
  }
2411
+ // =========================================================================
2412
+ // Linear
2413
+ // =========================================================================
2414
+ case "linear": {
2415
+ const query = findParam(extractedParams, "Query");
2416
+ const options = findParam(extractedParams, "Options");
2417
+ return buildLinearGraphQLPayload(query, options);
2418
+ }
2419
+ // =========================================================================
2420
+ // RingCentral
2421
+ // =========================================================================
2422
+ case "ringcentral": {
2423
+ if (methodName === "listCallLog") {
2424
+ const options2 = findParam(extractedParams, "Options");
2425
+ return buildRingCentralListCallLogPayload(options2);
2426
+ }
2427
+ if (methodName === "getCallRecord") {
2428
+ const callRecordId = findParam(extractedParams, "CallRecordId");
2429
+ return buildRingCentralGetCallRecordPayload(callRecordId);
2430
+ }
2431
+ if (methodName === "sendSms") {
2432
+ const from = findParam(extractedParams, "From");
2433
+ const to = findParam(extractedParams, "To");
2434
+ const text = findParam(extractedParams, "Text");
2435
+ return buildRingCentralSendSmsPayload(from, to, text);
2436
+ }
2437
+ if (methodName === "listMessages") {
2438
+ const options2 = findParam(extractedParams, "Options");
2439
+ return buildRingCentralListMessagesPayload(options2);
2440
+ }
2441
+ if (methodName === "listExtensions") {
2442
+ const options2 = findParam(extractedParams, "Options");
2443
+ return buildRingCentralListExtensionsPayload(options2);
2444
+ }
2445
+ if (methodName === "getExtension") {
2446
+ const extensionId = findParam(extractedParams, "ExtensionId");
2447
+ return buildRingCentralGetExtensionPayload(extensionId);
2448
+ }
2449
+ const method = findParam(extractedParams, "Method");
2450
+ const path = findParam(extractedParams, "Path");
2451
+ const options = findParam(extractedParams, "Options");
2452
+ return buildRingCentralInvokePayload(method, path, options);
2453
+ }
2454
+ // =========================================================================
2455
+ // Zoho Desk
2456
+ // =========================================================================
2457
+ case "zohodesk": {
2458
+ const method = findParam(extractedParams, "Method");
2459
+ const path = findParam(extractedParams, "Path");
2460
+ const options = findParam(extractedParams, "Options");
2461
+ return buildZohoDeskInvokePayload(method, path, options);
2462
+ }
2463
+ // =========================================================================
2464
+ // Zoho Projects
2465
+ // =========================================================================
2466
+ case "zohoprojects": {
2467
+ const method = findParam(extractedParams, "Method");
2468
+ const path = findParam(extractedParams, "Path");
2469
+ const options = findParam(extractedParams, "Options");
2470
+ return buildZohoProjectsInvokePayload(method, path, options);
2471
+ }
2159
2472
  default:
2160
2473
  throw new Error(`Unsupported resource subtype: ${subtype}`);
2161
2474
  }