@ratio-mcp/shared 1.3.5 → 1.4.0
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.
- package/dist/constants.d.ts +3 -2
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +8 -3
- package/dist/constants.js.map +1 -1
- package/dist/scopes-data.d.ts +9 -6
- package/dist/scopes-data.d.ts.map +1 -1
- package/dist/scopes-data.js +350 -958
- package/dist/scopes-data.js.map +1 -1
- package/dist/types.d.ts +4 -4
- package/dist/types.d.ts.map +1 -1
- package/package.json +8 -9
package/dist/constants.d.ts
CHANGED
|
@@ -7,8 +7,9 @@ export declare const REQUIREMENTS_FILE: string;
|
|
|
7
7
|
export declare const OAUTH_BASE_PATH = "/api/v1/oauth";
|
|
8
8
|
export declare const DEVELOPER_API_BASE_PATH = "/api/developer";
|
|
9
9
|
export declare const DEFAULT_REDIRECT_URI = "http://localhost:3000/auth/callback";
|
|
10
|
+
export declare const HOOKDECK_API_KEY = "4qovzzf5c727ketigsif4fi9xljc5gw7xeouaxaxqevn23isrv";
|
|
10
11
|
export declare const DOCS_SERVER_NAME = "ratio-docs-server";
|
|
11
12
|
export declare const DOCS_SERVER_VERSION = "1.0.0";
|
|
12
|
-
export declare const DEV_SERVER_NAME = "
|
|
13
|
-
export declare const DEV_SERVER_VERSION = "1.
|
|
13
|
+
export declare const DEV_SERVER_NAME = "ratio-dev-server";
|
|
14
|
+
export declare const DEV_SERVER_VERSION = "1.0.0";
|
|
14
15
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -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,
|
|
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;AAM1E,eAAO,MAAM,gBAAgB,uDAAuD,CAAC;AAGrF,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://
|
|
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');
|
|
@@ -14,9 +14,14 @@ export const OAUTH_BASE_PATH = `/api/${RATIO_API_VERSION}/oauth`;
|
|
|
14
14
|
export const DEVELOPER_API_BASE_PATH = '/api/developer';
|
|
15
15
|
// ─── Default Redirect URI ────────────────────────────────────────
|
|
16
16
|
export const DEFAULT_REDIRECT_URI = 'http://localhost:3000/auth/callback';
|
|
17
|
+
// ─── Hookdeck ────────────────────────────────────────────────
|
|
18
|
+
// Internal team API key — ships with the package so all team members can use Hookdeck
|
|
19
|
+
// without needing their own account. For external distribution, remove this and
|
|
20
|
+
// require developers to provide their own key.
|
|
21
|
+
export const HOOKDECK_API_KEY = '4qovzzf5c727ketigsif4fi9xljc5gw7xeouaxaxqevn23isrv';
|
|
17
22
|
// ─── Server Names ────────────────────────────────────────────────
|
|
18
23
|
export const DOCS_SERVER_NAME = 'ratio-docs-server';
|
|
19
24
|
export const DOCS_SERVER_VERSION = '1.0.0';
|
|
20
|
-
export const DEV_SERVER_NAME = '
|
|
21
|
-
export const DEV_SERVER_VERSION = '1.
|
|
25
|
+
export const DEV_SERVER_NAME = 'ratio-dev-server';
|
|
26
|
+
export const DEV_SERVER_VERSION = '1.0.0';
|
|
22
27
|
//# sourceMappingURL=constants.js.map
|
package/dist/constants.js.map
CHANGED
|
@@ -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,
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;A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
* Static scopes data — sourced from GET /api/v1/scopes
|
|
4
|
-
*
|
|
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
|
|
6
|
+
* To refresh: fetch from the scopes API and regenerate this file.
|
|
8
7
|
*
|
|
9
|
-
* Last updated: 2026-
|
|
8
|
+
* Last updated: 2026-04-08
|
|
10
9
|
*/
|
|
11
|
-
export declare const PRIMARY_RESOURCES: readonly ["orders", "products", "customers", "inventory", "discounts", "
|
|
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
|
|
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;;;;;;;GAOG;AAMH,eAAO,MAAM,iBAAiB,0QAEpB,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAMjE,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CA8H1D,CAAC;AAMF,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,EAAE,CAgTzD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,GAAG,CAAC,MAAM,CAEvC,CAAC;AAEF;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAOpE;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,MAAM,EAAE,CAE1C"}
|