@major-tech/resource-client 0.2.44 → 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.
@@ -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
13
+ * Types: postgresql | mssql | dynamodb | cosmosdb | snowflake | bigquery | neo4j | hubspot | googlesheets | outreach | custom | graphql | lambda | salesforce | s3 | slack | majorauth | googleanalytics | quickbooks | gong
14
14
  *
15
15
  * Examples:
16
16
  * npx @major-tech/resource-client add "abc-123" "orders-db" "postgresql" "Orders database" "app-123"
@@ -206,6 +206,7 @@ function getClientClass(type) {
206
206
  'googleanalytics': 'GoogleAnalyticsResourceClient',
207
207
  'graphql': 'GraphQLResourceClient',
208
208
  'quickbooks': 'QuickBooksResourceClient',
209
+ 'gong': 'GongResourceClient',
209
210
  };
210
211
  return typeMap[type] || 'PostgresResourceClient';
211
212
  }
@@ -264,7 +265,7 @@ function generateIndexFile(resources) {
264
265
  }
265
266
 
266
267
  function addResource(resourceId, name, type, description, applicationId, framework, mode) {
267
- const validTypes = ['postgresql', 'mssql', 'dynamodb', 'cosmosdb', 'snowflake', 'bigquery', 'neo4j', 'hubspot', 'googlesheets', 'outreach', 'custom', 'graphql', 'lambda', 'salesforce', 's3', 'slack', 'majorauth', 'googleanalytics', 'quickbooks'];
268
+ const validTypes = ['postgresql', 'mssql', 'dynamodb', 'cosmosdb', 'snowflake', 'bigquery', 'neo4j', 'hubspot', 'googlesheets', 'outreach', 'custom', 'graphql', 'lambda', 'salesforce', 's3', 'slack', 'majorauth', 'googleanalytics', 'quickbooks', 'gong'];
268
269
  if (!validTypes.includes(type)) {
269
270
  console.error(`❌ Invalid type: ${type}`);
270
271
  console.error(` Valid types: ${validTypes.join(', ')}`);
@@ -419,7 +420,7 @@ function main() {
419
420
  console.log('\nModes: app (default) | tool');
420
421
  console.log(' app — requires <application_id>, reads MAJOR_API_BASE_URL');
421
422
  console.log(' tool — embeds toolId from tool.json at generation time, reads RESOURCE_API_URL');
422
- console.log('\nTypes: postgresql | mssql | dynamodb | cosmosdb | snowflake | bigquery | neo4j | hubspot | googlesheets | outreach | custom | graphql | lambda | salesforce | s3 | slack | majorauth | googleanalytics | quickbooks');
423
+ console.log('\nTypes: postgresql | mssql | dynamodb | cosmosdb | snowflake | bigquery | neo4j | hubspot | googlesheets | outreach | custom | graphql | lambda | salesforce | s3 | slack | majorauth | googleanalytics | quickbooks | gong');
423
424
  return;
424
425
  }
425
426
 
@@ -0,0 +1,13 @@
1
+ import type { HttpMethod, QueryParams, ApiInvokeResponse } from "../schemas";
2
+ import { BaseResourceClient } from "../base";
3
+ export declare class GongResourceClient 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=gong.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gong.d.ts","sourceRoot":"","sources":["../../src/clients/gong.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,kBAAmB,SAAQ,kBAAkB;IAClD,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
@@ -25,6 +25,7 @@ __export(index_exports, {
25
25
  CosmosDBResourceClient: () => CosmosDBResourceClient,
26
26
  CustomApiResourceClient: () => CustomApiResourceClient,
27
27
  DynamoDBResourceClient: () => DynamoDBResourceClient,
28
+ GongResourceClient: () => GongResourceClient,
28
29
  GoogleAnalyticsResourceClient: () => GoogleAnalyticsResourceClient,
29
30
  GoogleSheetsResourceClient: () => GoogleSheetsResourceClient,
30
31
  GraphQLResourceClient: () => GraphQLResourceClient,
@@ -60,6 +61,7 @@ __export(index_exports, {
60
61
  buildCosmosDBUpsertPayload: () => buildCosmosDBUpsertPayload,
61
62
  buildCustomApiInvokePayload: () => buildCustomApiInvokePayload,
62
63
  buildDynamoDBInvokePayload: () => buildDynamoDBInvokePayload,
64
+ buildGongInvokePayload: () => buildGongInvokePayload,
63
65
  buildGoogleAnalyticsGetMetadataPayload: () => buildGoogleAnalyticsGetMetadataPayload,
64
66
  buildGoogleAnalyticsInvokePayload: () => buildGoogleAnalyticsInvokePayload,
65
67
  buildGoogleAnalyticsListAccountsPayload: () => buildGoogleAnalyticsListAccountsPayload,
@@ -1561,6 +1563,27 @@ var GraphQLResourceClient = class extends BaseResourceClient {
1561
1563
  }
1562
1564
  };
1563
1565
 
1566
+ // src/payload-builders/gong.ts
1567
+ function buildGongInvokePayload(method, path, options) {
1568
+ return {
1569
+ type: "api",
1570
+ subtype: "gong",
1571
+ method,
1572
+ path,
1573
+ query: options?.query,
1574
+ body: options?.body,
1575
+ timeoutMs: options?.timeoutMs ?? 3e4
1576
+ };
1577
+ }
1578
+
1579
+ // src/clients/gong.ts
1580
+ var GongResourceClient = class extends BaseResourceClient {
1581
+ async invoke(method, path, invocationKey, options = {}) {
1582
+ const payload = buildGongInvokePayload(method, path, options);
1583
+ return this.invokeRaw(payload, invocationKey);
1584
+ }
1585
+ };
1586
+
1564
1587
  // src/payload-builders/outreach.ts
1565
1588
  function buildOutreachInvokePayload(method, path, options) {
1566
1589
  return {
@@ -1782,6 +1805,15 @@ function buildPayloadFromExtractedParams(subtype, methodName, extractedParams) {
1782
1805
  return buildHubSpotInvokePayload(method, path, options);
1783
1806
  }
1784
1807
  // =========================================================================
1808
+ // Gong
1809
+ // =========================================================================
1810
+ case "gong": {
1811
+ const method = findParam(extractedParams, "Method");
1812
+ const path = findParam(extractedParams, "Path");
1813
+ const options = findParam(extractedParams, "Options");
1814
+ return buildGongInvokePayload(method, path, options);
1815
+ }
1816
+ // =========================================================================
1785
1817
  // Salesforce
1786
1818
  // =========================================================================
1787
1819
  case "salesforce": {