@major-tech/resource-client 0.2.48 → 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.
@@ -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 | linear | ringcentral
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"
@@ -210,6 +210,8 @@ function getClientClass(type) {
210
210
  'dynamics': 'DynamicsResourceClient',
211
211
  'linear': 'LinearResourceClient',
212
212
  'ringcentral': 'RingCentralResourceClient',
213
+ 'zohodesk': 'ZohoDeskResourceClient',
214
+ 'zohoprojects': 'ZohoProjectsResourceClient',
213
215
  };
214
216
  return typeMap[type] || 'PostgresResourceClient';
215
217
  }
@@ -268,7 +270,7 @@ function generateIndexFile(resources) {
268
270
  }
269
271
 
270
272
  function addResource(resourceId, name, type, description, applicationId, framework, mode) {
271
- 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'];
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'];
272
274
  if (!validTypes.includes(type)) {
273
275
  console.error(`❌ Invalid type: ${type}`);
274
276
  console.error(` Valid types: ${validTypes.join(', ')}`);
@@ -423,7 +425,7 @@ function main() {
423
425
  console.log('\nModes: app (default) | tool');
424
426
  console.log(' app — requires <application_id>, reads MAJOR_API_BASE_URL');
425
427
  console.log(' tool — embeds toolId from tool.json at generation time, reads RESOURCE_API_URL');
426
- 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');
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');
427
429
  return;
428
430
  }
429
431
 
@@ -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
@@ -45,6 +45,8 @@ __export(index_exports, {
45
45
  SalesforceResourceClient: () => SalesforceResourceClient,
46
46
  SlackResourceClient: () => SlackResourceClient,
47
47
  SnowflakeResourceClient: () => SnowflakeResourceClient,
48
+ ZohoDeskResourceClient: () => ZohoDeskResourceClient,
49
+ ZohoProjectsResourceClient: () => ZohoProjectsResourceClient,
48
50
  buildAuthRevokeAccessPayload: () => buildAuthRevokeAccessPayload,
49
51
  buildAuthShareAccessPayload: () => buildAuthShareAccessPayload,
50
52
  buildBigQueryCreateTablePayload: () => buildBigQueryCreateTablePayload,
@@ -115,7 +117,9 @@ __export(index_exports, {
115
117
  buildSnowflakeCancelPayload: () => buildSnowflakeCancelPayload,
116
118
  buildSnowflakeExecutePayload: () => buildSnowflakeExecutePayload,
117
119
  buildSnowflakeInvokePayload: () => buildSnowflakeInvokePayload,
118
- buildSnowflakeStatusPayload: () => buildSnowflakeStatusPayload
120
+ buildSnowflakeStatusPayload: () => buildSnowflakeStatusPayload,
121
+ buildZohoDeskInvokePayload: () => buildZohoDeskInvokePayload,
122
+ buildZohoProjectsInvokePayload: () => buildZohoProjectsInvokePayload
119
123
  });
120
124
  module.exports = __toCommonJS(index_exports);
121
125
 
@@ -1922,6 +1926,48 @@ var RingCentralResourceClient = class extends BaseResourceClient {
1922
1926
  }
1923
1927
  };
1924
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
+
1925
1971
  // src/payload-builders/outreach.ts
1926
1972
  function buildOutreachInvokePayload(method, path, options) {
1927
1973
  return {
@@ -2405,6 +2451,24 @@ function buildPayloadFromExtractedParams(subtype, methodName, extractedParams) {
2405
2451
  const options = findParam(extractedParams, "Options");
2406
2452
  return buildRingCentralInvokePayload(method, path, options);
2407
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
+ }
2408
2472
  default:
2409
2473
  throw new Error(`Unsupported resource subtype: ${subtype}`);
2410
2474
  }