@ratio-mcp/shared 1.3.6 → 1.4.1

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.
@@ -9,6 +9,6 @@ export declare const DEVELOPER_API_BASE_PATH = "/api/developer";
9
9
  export declare const DEFAULT_REDIRECT_URI = "http://localhost:3000/auth/callback";
10
10
  export declare const DOCS_SERVER_NAME = "ratio-docs-server";
11
11
  export declare const DOCS_SERVER_VERSION = "1.0.0";
12
- export declare const DEV_SERVER_NAME = "app-builder";
13
- export declare const DEV_SERVER_VERSION = "1.3.6";
12
+ export declare const DEV_SERVER_NAME = "ratio-dev-server";
13
+ export declare const DEV_SERVER_VERSION = "1.0.0";
14
14
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,kBAAkB,QAAgE,CAAC;AAChG,eAAO,MAAM,iBAAiB,OAAO,CAAC;AACtC,eAAO,MAAM,6BAA6B,QAA4E,CAAC;AAGvH,eAAO,MAAM,SAAS,QAA+B,CAAC;AACtD,eAAO,MAAM,WAAW,QAAiC,CAAC;AAC1D,eAAO,MAAM,iBAAiB,QAAuC,CAAC;AAGtE,eAAO,MAAM,eAAe,kBAAoC,CAAC;AAGjE,eAAO,MAAM,uBAAuB,mBAAmB,CAAC;AAGxD,eAAO,MAAM,oBAAoB,wCAAwC,CAAC;AAG1E,eAAO,MAAM,gBAAgB,sBAAsB,CAAC;AACpD,eAAO,MAAM,mBAAmB,UAAU,CAAC;AAC3C,eAAO,MAAM,eAAe,gBAAgB,CAAC;AAC7C,eAAO,MAAM,kBAAkB,UAAU,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,kBAAkB,QAAgE,CAAC;AAChG,eAAO,MAAM,iBAAiB,OAAO,CAAC;AACtC,eAAO,MAAM,6BAA6B,QAAsF,CAAC;AAGjI,eAAO,MAAM,SAAS,QAA+B,CAAC;AACtD,eAAO,MAAM,WAAW,QAAiC,CAAC;AAC1D,eAAO,MAAM,iBAAiB,QAAuC,CAAC;AAGtE,eAAO,MAAM,eAAe,kBAAoC,CAAC;AAGjE,eAAO,MAAM,uBAAuB,mBAAmB,CAAC;AAGxD,eAAO,MAAM,oBAAoB,wCAAwC,CAAC;AAG1E,eAAO,MAAM,gBAAgB,sBAAsB,CAAC;AACpD,eAAO,MAAM,mBAAmB,UAAU,CAAC;AAC3C,eAAO,MAAM,eAAe,qBAAqB,CAAC;AAClD,eAAO,MAAM,kBAAkB,UAAU,CAAC"}
package/dist/constants.js CHANGED
@@ -3,7 +3,7 @@ import { homedir } from 'os';
3
3
  // ─── API Base URLs (from env vars, with defaults for dev) ───────
4
4
  export const RATIO_API_BASE_URL = process.env.RATIO_API_BASE_URL || 'https://gkx.gokwik.co/aes';
5
5
  export const RATIO_API_VERSION = 'v1';
6
- export const RATIO_DEVELOPER_DASHBOARD_URL = process.env.RATIO_DEVELOPER_DASHBOARD_URL || 'https://adm-apps.gokwik.co';
6
+ export const RATIO_DEVELOPER_DASHBOARD_URL = process.env.RATIO_DEVELOPER_DASHBOARD_URL || 'https://dev-developers.dev.gokwik.in';
7
7
  // ─── Persistent Store ────────────────────────────────────────────
8
8
  export const STORE_DIR = join(homedir(), '.ratio-v2');
9
9
  export const TOKENS_FILE = join(STORE_DIR, 'tokens.json');
@@ -17,6 +17,6 @@ export const DEFAULT_REDIRECT_URI = 'http://localhost:3000/auth/callback';
17
17
  // ─── Server Names ────────────────────────────────────────────────
18
18
  export const DOCS_SERVER_NAME = 'ratio-docs-server';
19
19
  export const DOCS_SERVER_VERSION = '1.0.0';
20
- export const DEV_SERVER_NAME = 'app-builder';
21
- export const DEV_SERVER_VERSION = '1.3.6';
20
+ export const DEV_SERVER_NAME = 'ratio-dev-server';
21
+ export const DEV_SERVER_VERSION = '1.0.0';
22
22
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAE7B,mEAAmE;AACnE,MAAM,CAAC,MAAM,kBAAkB,GAAG,OAAO,CAAC,GAAG,CAAC,kBAAkB,IAAI,2BAA2B,CAAC;AAChG,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC;AACtC,MAAM,CAAC,MAAM,6BAA6B,GAAG,OAAO,CAAC,GAAG,CAAC,6BAA6B,IAAI,4BAA4B,CAAC;AAEvH,oEAAoE;AACpE,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,EAAE,EAAE,WAAW,CAAC,CAAC;AACtD,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;AAC1D,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;AAEtE,oEAAoE;AACpE,MAAM,CAAC,MAAM,eAAe,GAAG,QAAQ,iBAAiB,QAAQ,CAAC;AAEjE,oEAAoE;AACpE,MAAM,CAAC,MAAM,uBAAuB,GAAG,gBAAgB,CAAC;AAExD,oEAAoE;AACpE,MAAM,CAAC,MAAM,oBAAoB,GAAG,qCAAqC,CAAC;AAE1E,oEAAoE;AACpE,MAAM,CAAC,MAAM,gBAAgB,GAAG,mBAAmB,CAAC;AACpD,MAAM,CAAC,MAAM,mBAAmB,GAAG,OAAO,CAAC;AAC3C,MAAM,CAAC,MAAM,eAAe,GAAG,aAAa,CAAC;AAC7C,MAAM,CAAC,MAAM,kBAAkB,GAAG,OAAO,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAE7B,mEAAmE;AACnE,MAAM,CAAC,MAAM,kBAAkB,GAAG,OAAO,CAAC,GAAG,CAAC,kBAAkB,IAAI,2BAA2B,CAAC;AAChG,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC;AACtC,MAAM,CAAC,MAAM,6BAA6B,GAAG,OAAO,CAAC,GAAG,CAAC,6BAA6B,IAAI,sCAAsC,CAAC;AAEjI,oEAAoE;AACpE,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,EAAE,EAAE,WAAW,CAAC,CAAC;AACtD,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;AAC1D,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;AAEtE,oEAAoE;AACpE,MAAM,CAAC,MAAM,eAAe,GAAG,QAAQ,iBAAiB,QAAQ,CAAC;AAEjE,oEAAoE;AACpE,MAAM,CAAC,MAAM,uBAAuB,GAAG,gBAAgB,CAAC;AAExD,oEAAoE;AACpE,MAAM,CAAC,MAAM,oBAAoB,GAAG,qCAAqC,CAAC;AAE1E,oEAAoE;AACpE,MAAM,CAAC,MAAM,gBAAgB,GAAG,mBAAmB,CAAC;AACpD,MAAM,CAAC,MAAM,mBAAmB,GAAG,OAAO,CAAC;AAC3C,MAAM,CAAC,MAAM,eAAe,GAAG,kBAAkB,CAAC;AAClD,MAAM,CAAC,MAAM,kBAAkB,GAAG,OAAO,CAAC"}
@@ -1,14 +1,13 @@
1
1
  import type { ApiScope, ResourceMeta } from './types.js';
2
2
  /**
3
- * Static scopes data — sourced from GET /api/v1/scopes
4
- * Enriched with LLM-friendly descriptions, use_cases, and pairing hints
5
- * so the LLM can intelligently suggest scopes based on app descriptions.
3
+ * Static scopes data — sourced from GET /api/v1/scopes (real platform data).
4
+ * Contains all 147 scopes across 78 resources exactly as they exist in the platform.
6
5
  *
7
- * To refresh base data: fetch from ${RATIO_API_BASE_URL}/api/v1/scopes
6
+ * To refresh: fetch from the scopes API and regenerate this file.
8
7
  *
9
- * Last updated: 2026-03-18
8
+ * Last updated: 2026-04-08
10
9
  */
11
- export declare const PRIMARY_RESOURCES: readonly ["orders", "products", "customers", "inventory", "discounts", "payments", "shipping", "fulfillments", "draft_orders", "returns", "gift_cards", "analytics", "channels", "content", "files", "locations", "themes", "markets", "reports", "locales", "publications", "settings", "webhooks", "apps"];
10
+ export declare const PRIMARY_RESOURCES: readonly ["orders", "products", "customers", "inventory", "discounts", "fulfillments", "draft_orders", "returns", "shipping", "gift_cards", "analytics", "channels", "content", "files", "locations", "themes", "markets", "reports", "locales", "publications", "apps"];
12
11
  export type PrimaryResource = (typeof PRIMARY_RESOURCES)[number];
13
12
  export declare const RESOURCE_METADATA: Record<string, ResourceMeta>;
14
13
  export declare const SCOPES_BY_RESOURCE: Record<string, ApiScope[]>;
@@ -20,4 +19,8 @@ export declare const ALL_SCOPE_CODES: Set<string>;
20
19
  * Look up which resource a scope code belongs to.
21
20
  */
22
21
  export declare function getResourceForScope(code: string): string | undefined;
22
+ /**
23
+ * Get all resource names (all 78).
24
+ */
25
+ export declare function getAllResources(): string[];
23
26
  //# sourceMappingURL=scopes-data.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"scopes-data.d.ts","sourceRoot":"","sources":["../src/scopes-data.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAEzD;;;;;;;;GAQG;AAIH,eAAO,MAAM,iBAAiB,8SAyBpB,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAMjE,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAmT1D,C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