@fragment-dev/cli 2026.10.21 → 2026.10.22

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 (82) hide show
  1. package/README.md +10 -1
  2. package/dist/{chunk-6PRTPBP7.js → chunk-2ZOSYPMG.js} +1 -1
  3. package/dist/{chunk-RD6UER2I.js → chunk-3FYCTUQG.js} +2 -2
  4. package/dist/{chunk-DT372IG6.js → chunk-45ANXGMD.js} +1 -1
  5. package/dist/{chunk-VPEZW3DX.js → chunk-4OP66KOV.js} +1 -1
  6. package/dist/{chunk-M7BM6YC2.js → chunk-5SZAIV6H.js} +1 -1
  7. package/dist/{chunk-ZJ7HFBBE.js → chunk-5ZNQLL3D.js} +3 -3
  8. package/dist/{chunk-JLTK34AK.js → chunk-7IYYI4D4.js} +3 -3
  9. package/dist/{chunk-JFWJTOMI.js → chunk-7KZ7MRPS.js} +2 -2
  10. package/dist/{chunk-34NLRFFT.js → chunk-7UQY3FIG.js} +1 -1
  11. package/dist/{chunk-4AZDMO3F.js → chunk-AB4ADA3B.js} +2 -2
  12. package/dist/{chunk-RML6NQHP.js → chunk-AIYVYJL6.js} +1 -1
  13. package/dist/{chunk-N4AAJ2Q4.js → chunk-AQYXSJII.js} +2 -2
  14. package/dist/{chunk-TQANG7FZ.js → chunk-CXCEORCL.js} +1 -1
  15. package/dist/{chunk-3SJL7FRS.js → chunk-DQKSSCGB.js} +45 -23
  16. package/dist/{chunk-TLM4VKIC.js → chunk-E5P6XCQL.js} +2 -2
  17. package/dist/{chunk-3IA6BI6A.js → chunk-ELTMQLAC.js} +3 -3
  18. package/dist/{chunk-VF5ST64K.js → chunk-F6CAOP63.js} +4 -4
  19. package/dist/{chunk-IXRD6R7Y.js → chunk-GINWMSG5.js} +1 -1
  20. package/dist/{chunk-NJASXIBV.js → chunk-I55F4IDB.js} +2 -2
  21. package/dist/{chunk-NG62DBBN.js → chunk-JJIS2BD7.js} +5 -5
  22. package/dist/{chunk-UHOCZFNK.js → chunk-JMBVKYGC.js} +1 -1
  23. package/dist/{chunk-V7LKJBKQ.js → chunk-K5YIOBLH.js} +3 -1
  24. package/dist/{chunk-3JWLAXCA.js → chunk-KEPMDY7V.js} +2 -2
  25. package/dist/{chunk-QJEJBASA.js → chunk-KW44NTZ4.js} +14 -0
  26. package/dist/{chunk-HQUHJD7J.js → chunk-M3W6IZD4.js} +2 -2
  27. package/dist/{chunk-3SSYKK4L.js → chunk-MSTL4SGM.js} +2 -2
  28. package/dist/{chunk-F4DGB2QI.js → chunk-N2IUAYUD.js} +2 -2
  29. package/dist/{chunk-A5YYXU6L.js → chunk-ND7QZR7R.js} +2 -2
  30. package/dist/{chunk-OHVXM4BM.js → chunk-NZGPH74W.js} +4 -4
  31. package/dist/{chunk-2QR6NGWG.js → chunk-OXHLKGQ5.js} +7 -7
  32. package/dist/{chunk-SK7ZPCCV.js → chunk-TA4EEF7F.js} +1 -1
  33. package/dist/{chunk-LQY2CVHR.js → chunk-TK6OCIYG.js} +2 -2
  34. package/dist/{chunk-U2NUL7C3.js → chunk-TU4REKFK.js} +25 -25
  35. package/dist/{chunk-I466MTHZ.js → chunk-W7NFIOVK.js} +2 -2
  36. package/dist/{chunk-PKCA5M7U.js → chunk-WEMVG47S.js} +1 -1
  37. package/dist/{chunk-CLYW55VK.js → chunk-WSCCYKTK.js} +2 -2
  38. package/dist/{chunk-XNLWAWUO.js → chunk-WWLP4HPC.js} +2 -2
  39. package/dist/{chunk-6PQBSUOC.js → chunk-XL3PNDE7.js} +1 -1
  40. package/dist/{chunk-ZZFFRSK4.js → chunk-YJGBEX5B.js} +2 -2
  41. package/dist/{chunk-NJSYUXAC.js → chunk-Z6NR5CSS.js} +9 -12
  42. package/dist/{chunk-NYTFP5AV.js → chunk-ZA2L64JN.js} +1 -1
  43. package/dist/commands/add-ledger-entry.js +7 -7
  44. package/dist/commands/api-client/create.js +6 -6
  45. package/dist/commands/create-custom-link.js +7 -7
  46. package/dist/commands/create-ledger.js +7 -7
  47. package/dist/commands/delete-custom-txs.js +7 -7
  48. package/dist/commands/delete-ledger.js +7 -7
  49. package/dist/commands/delete-schema.js +7 -7
  50. package/dist/commands/gen-graphql.js +10 -10
  51. package/dist/commands/get-schema.js +8 -8
  52. package/dist/commands/init.js +5 -5
  53. package/dist/commands/login.js +7 -7
  54. package/dist/commands/migrate-ledger-entry.js +7 -7
  55. package/dist/commands/query/ledgerAccounts.js +7 -7
  56. package/dist/commands/query/ledgers.js +7 -7
  57. package/dist/commands/query/schema.js +7 -7
  58. package/dist/commands/query/schemas.js +7 -7
  59. package/dist/commands/reverse-ledger-entry.js +7 -7
  60. package/dist/commands/start.js +5 -5
  61. package/dist/commands/store-schema.js +7 -7
  62. package/dist/commands/token.js +7 -7
  63. package/dist/commands/update-ledger-account.js +7 -7
  64. package/dist/commands/update.js +6 -6
  65. package/dist/commands/verify-schema.js +11 -11
  66. package/dist/commands/version.js +5 -5
  67. package/dist/commands/workspace.js +7 -7
  68. package/dist/commands.js +41 -41
  69. package/dist/graphql.js +3 -3
  70. package/dist/index.js +41 -41
  71. package/dist/lib/auth.js +2 -2
  72. package/dist/lib/authenticatedCommand.js +6 -6
  73. package/dist/lib/baseCommand.js +4 -4
  74. package/dist/lib/browserAuth.js +1 -1
  75. package/dist/lib/constants.js +3 -3
  76. package/dist/lib/sdk.js +5 -1
  77. package/dist/utils/formatValidationErrors.js +2 -2
  78. package/dist/utils/schemaBackCompat.js +6 -6
  79. package/dist/utils/schemaValidation.js +5 -5
  80. package/dist/version.js +2 -2
  81. package/oclif.manifest.json +2 -2
  82. package/package.json +1 -1
package/README.md CHANGED
@@ -4,6 +4,15 @@
4
4
 
5
5
  # Commands
6
6
 
7
+ ## Browser login for new users
8
+
9
+ Run `fragment login --browser --mcp-url https://mcp.us-west-2.fragment.dev` to sign in and select a workspace.
10
+ New users complete existing dashboard onboarding before approving API-client creation.
11
+ The regional server URL is shared by browser login and MCP authentication.
12
+ The browser and CLI must run on the same machine; the dashboard remains hosted.
13
+ Use `--workspace <id>` to authorize an existing workspace directly, or `FRAGMENT_MCP_URL` to configure another region.
14
+ Credentials remain in the CLI credential directory. The browser opens the approved workspace after provisioning.
15
+
7
16
  <!-- commands -->
8
17
  * [`fragment add-ledger-entry`](#fragment-add-ledger-entry)
9
18
  * [`fragment api-client create`](#fragment-api-client-create)
@@ -391,7 +400,7 @@ FLAGS
391
400
  --oauth-url=<value> The OAuth URL from which to retrieve your auth token (ex:
392
401
  https://auth.fragment.dev/oauth2/token)
393
402
  --test If set, tests stored credentials only
394
- --workspace=<value> The Workspace id to authenticate against (required with --browser).
403
+ --workspace=<value> The Workspace id. Omit to select a workspace after browser login.
395
404
 
396
405
  DESCRIPTION
397
406
  Authenticate with FRAGMENT.
@@ -13,7 +13,7 @@ import {
13
13
  require_syntax,
14
14
  require_type,
15
15
  require_uri
16
- } from "./chunk-3IA6BI6A.js";
16
+ } from "./chunk-ELTMQLAC.js";
17
17
  import {
18
18
  require_color_convert,
19
19
  require_source
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  AuthenticatedCommand
3
- } from "./chunk-3JWLAXCA.js";
3
+ } from "./chunk-KEPMDY7V.js";
4
4
  import {
5
5
  require_lib
6
- } from "./chunk-3IA6BI6A.js";
6
+ } from "./chunk-ELTMQLAC.js";
7
7
  import {
8
8
  __toESM,
9
9
  init_cjs_shims
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  FragmentCommand
3
- } from "./chunk-3IA6BI6A.js";
3
+ } from "./chunk-ELTMQLAC.js";
4
4
  import {
5
5
  init_cjs_shims
6
6
  } from "./chunk-7GH3YGSC.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  AuthenticatedCommand
3
- } from "./chunk-3JWLAXCA.js";
3
+ } from "./chunk-KEPMDY7V.js";
4
4
  import {
5
5
  init_cjs_shims
6
6
  } from "./chunk-7GH3YGSC.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  FragmentCommand,
3
3
  require_lib
4
- } from "./chunk-3IA6BI6A.js";
4
+ } from "./chunk-ELTMQLAC.js";
5
5
  import {
6
6
  require_source
7
7
  } from "./chunk-QDAKBUNO.js";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  inquirer_default
3
- } from "./chunk-6PRTPBP7.js";
3
+ } from "./chunk-2ZOSYPMG.js";
4
4
  import {
5
5
  AuthenticatedCommand
6
- } from "./chunk-3JWLAXCA.js";
6
+ } from "./chunk-KEPMDY7V.js";
7
7
  import {
8
8
  require_lib
9
- } from "./chunk-3IA6BI6A.js";
9
+ } from "./chunk-ELTMQLAC.js";
10
10
  import {
11
11
  require_source
12
12
  } from "./chunk-QDAKBUNO.js";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  Schema,
3
3
  parseWithError
4
- } from "./chunk-JFWJTOMI.js";
4
+ } from "./chunk-7KZ7MRPS.js";
5
5
  import {
6
6
  formatValidationErrors
7
- } from "./chunk-SK7ZPCCV.js";
7
+ } from "./chunk-TA4EEF7F.js";
8
8
  import {
9
9
  BadRequestError
10
- } from "./chunk-V7LKJBKQ.js";
10
+ } from "./chunk-K5YIOBLH.js";
11
11
  import {
12
12
  init_cjs_shims
13
13
  } from "./chunk-7GH3YGSC.js";
@@ -22,7 +22,7 @@ import {
22
22
  getStructuralPath,
23
23
  getStructuralSubpaths,
24
24
  getSubpaths
25
- } from "./chunk-PKCA5M7U.js";
25
+ } from "./chunk-WEMVG47S.js";
26
26
  import {
27
27
  BadRequestError,
28
28
  CurrencyMatchInputSchema,
@@ -37,7 +37,7 @@ import {
37
37
  getStringParameters,
38
38
  safe,
39
39
  z
40
- } from "./chunk-V7LKJBKQ.js";
40
+ } from "./chunk-K5YIOBLH.js";
41
41
  import {
42
42
  __commonJS,
43
43
  __toESM,
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-L7ZGDLYU.js";
4
4
  import {
5
5
  FRAGMENT_VERSION_PATH
6
- } from "./chunk-TLM4VKIC.js";
6
+ } from "./chunk-E5P6XCQL.js";
7
7
  import {
8
8
  init_cjs_shims
9
9
  } from "./chunk-7GH3YGSC.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  AuthenticatedCommand
3
- } from "./chunk-3JWLAXCA.js";
3
+ } from "./chunk-KEPMDY7V.js";
4
4
  import {
5
5
  require_lib
6
- } from "./chunk-3IA6BI6A.js";
6
+ } from "./chunk-ELTMQLAC.js";
7
7
  import {
8
8
  require_source
9
9
  } from "./chunk-QDAKBUNO.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  FragmentCommand,
3
3
  require_lib
4
- } from "./chunk-3IA6BI6A.js";
4
+ } from "./chunk-ELTMQLAC.js";
5
5
  import {
6
6
  require_source
7
7
  } from "./chunk-QDAKBUNO.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  AuthenticatedCommand
3
- } from "./chunk-3JWLAXCA.js";
3
+ } from "./chunk-KEPMDY7V.js";
4
4
  import {
5
5
  require_lib
6
- } from "./chunk-3IA6BI6A.js";
6
+ } from "./chunk-ELTMQLAC.js";
7
7
  import {
8
8
  require_source
9
9
  } from "./chunk-QDAKBUNO.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  AuthenticatedCommand
3
- } from "./chunk-3JWLAXCA.js";
3
+ } from "./chunk-KEPMDY7V.js";
4
4
  import {
5
5
  init_cjs_shims
6
6
  } from "./chunk-7GH3YGSC.js";
@@ -8,27 +8,14 @@ import { createHash, randomBytes } from "node:crypto";
8
8
  import { createServer } from "node:http";
9
9
  var AUTH_TIMEOUT_MS = 5 * 60 * 1e3;
10
10
  var CLI_BOOTSTRAP_CLIENT_NAME = "Fragment CLI";
11
- var defaultBrowserAuthDeps = (log) => ({
12
- fetchFn: fetch,
13
- openBrowser: async (url) => {
14
- const open = (await import("./open-SJMVVA3H.js")).default;
15
- return open(url);
16
- },
17
- startLoopback: startLoopbackServer,
18
- log
19
- });
20
11
  var pkcePair = () => {
21
12
  const verifier = randomBytes(32).toString("base64url");
22
13
  const challenge = createHash("sha256").update(verifier).digest("base64url");
23
14
  return { verifier, challenge };
24
15
  };
25
16
  var trimSlash = (url) => url.replace(/\/$/, "");
26
- var mcpResourceUrl = (mcpBaseUrl, workspaceId) => `${trimSlash(mcpBaseUrl)}/mcp/w/${encodeURIComponent(workspaceId)}`;
27
- var protectedResourceMetadataUrl = (mcpBaseUrl, workspaceId) => `${trimSlash(
28
- mcpBaseUrl
29
- )}/.well-known/oauth-protected-resource/mcp/w/${encodeURIComponent(
30
- workspaceId
31
- )}`;
17
+ var mcpResourceUrl = (authBaseUrl, workspaceId) => `${trimSlash(authBaseUrl)}/mcp${workspaceId ? `/w/${encodeURIComponent(workspaceId)}` : ""}`;
18
+ var protectedResourceMetadataUrl = (authBaseUrl, workspaceId) => `${trimSlash(authBaseUrl)}/.well-known/oauth-protected-resource${workspaceId ? `/mcp/w/${encodeURIComponent(workspaceId)}` : ""}`;
32
19
  var jsonOk = async (response, what) => {
33
20
  if (!response.ok) {
34
21
  const body = await response.text().catch(() => "");
@@ -44,6 +31,7 @@ var startLoopbackServer = (expectedState) => new Promise((resolveServer) => {
44
31
  resolveCode = res;
45
32
  rejectCode = rej;
46
33
  });
34
+ let pendingResponse;
47
35
  const server = createServer((req, res) => {
48
36
  const url = new URL(req.url ?? "/", "http://127.0.0.1");
49
37
  if (url.pathname !== "/callback") {
@@ -67,7 +55,11 @@ var startLoopbackServer = (expectedState) => new Promise((resolveServer) => {
67
55
  rejectCode(new Error("callback missing code"));
68
56
  return;
69
57
  }
70
- res.writeHead(200, { "Content-Type": "text/html" }).end(errorPage("Authorized."));
58
+ if (pendingResponse) {
59
+ res.writeHead(409).end("Authorization already received.");
60
+ return;
61
+ }
62
+ pendingResponse = res;
71
63
  resolveCode(code);
72
64
  });
73
65
  server.listen(0, "127.0.0.1", () => {
@@ -90,14 +82,43 @@ var startLoopbackServer = (expectedState) => new Promise((resolveServer) => {
90
82
  }
91
83
  );
92
84
  }),
93
- close: () => server.close()
85
+ complete: (dashboardUrl) => {
86
+ if (dashboardUrl && new URL(dashboardUrl).protocol === "https:") {
87
+ pendingResponse?.writeHead(303, {
88
+ Location: dashboardUrl,
89
+ "Cache-Control": "no-store",
90
+ "Referrer-Policy": "no-referrer"
91
+ }).end();
92
+ } else {
93
+ pendingResponse?.writeHead(200, { "Content-Type": "text/html" }).end(errorPage("Authorized."));
94
+ }
95
+ },
96
+ close: () => {
97
+ if (pendingResponse && !pendingResponse.writableEnded) {
98
+ pendingResponse.writeHead(500, { "Content-Type": "text/html" }).end(
99
+ errorPage(
100
+ "Could not finish authorization. Check the CLI and try again."
101
+ )
102
+ );
103
+ }
104
+ server.close();
105
+ }
94
106
  });
95
107
  });
96
108
  });
97
- var provisionApiClient = async ({ mcpBaseUrl, workspaceId, clientName, role }, deps) => {
109
+ var defaultBrowserAuthDeps = (log) => ({
110
+ fetchFn: fetch,
111
+ openBrowser: async (url) => {
112
+ const open = (await import("./open-SJMVVA3H.js")).default;
113
+ return open(url);
114
+ },
115
+ startLoopback: startLoopbackServer,
116
+ log
117
+ });
118
+ var provisionApiClient = async ({ authBaseUrl, workspaceId, clientName, role }, deps) => {
98
119
  const { fetchFn, openBrowser, startLoopback, log } = deps;
99
120
  const resourceMetadata = await jsonOk(
100
- await fetchFn(protectedResourceMetadataUrl(mcpBaseUrl, workspaceId)),
121
+ await fetchFn(protectedResourceMetadataUrl(authBaseUrl, workspaceId)),
101
122
  "discovering authorization server"
102
123
  );
103
124
  const issuer = resourceMetadata.authorization_servers?.[0];
@@ -136,7 +157,7 @@ var provisionApiClient = async ({ mcpBaseUrl, workspaceId, clientName, role }, d
136
157
  state,
137
158
  code_challenge: challenge,
138
159
  code_challenge_method: "S256",
139
- resource: mcpResourceUrl(mcpBaseUrl, workspaceId),
160
+ resource: mcpResourceUrl(authBaseUrl, workspaceId),
140
161
  intent: "api_client"
141
162
  }).toString();
142
163
  log(
@@ -161,17 +182,18 @@ ${authorizeUrl.toString()}`
161
182
  );
162
183
  const authHeader = { Authorization: `Bearer ${token.access_token}` };
163
184
  const credentials = await jsonOk(
164
- await fetchFn(`${trimSlash(mcpBaseUrl)}/api-clients`, {
185
+ await fetchFn(`${trimSlash(authBaseUrl)}/api-clients`, {
165
186
  method: "POST",
166
187
  headers: { ...authHeader, "Content-Type": "application/json" },
167
188
  body: JSON.stringify({ name: clientName, ...role ? { role } : {} })
168
189
  }),
169
190
  "creating API client"
170
191
  );
171
- await fetchFn(`${trimSlash(mcpBaseUrl)}/mcp-clients/self`, {
192
+ await fetchFn(`${trimSlash(authBaseUrl)}/mcp-clients/self`, {
172
193
  method: "DELETE",
173
194
  headers: authHeader
174
195
  }).catch(() => void 0);
196
+ loopback.complete(token.dashboard_url);
175
197
  return credentials;
176
198
  } finally {
177
199
  loopback.close();
@@ -180,7 +202,7 @@ ${authorizeUrl.toString()}`
180
202
 
181
203
  export {
182
204
  AUTH_TIMEOUT_MS,
183
- defaultBrowserAuthDeps,
184
205
  startLoopbackServer,
206
+ defaultBrowserAuthDeps,
185
207
  provisionApiClient
186
208
  };
@@ -9,7 +9,7 @@ var FRAGMENT_HOME = process.env.FRAGMENT_PATH ?? `${homedir()}/.fragment`;
9
9
  var FRAGMENT_VERSION_PATH = `${FRAGMENT_HOME}/version.json`;
10
10
  var FRAGMENT_AUTH_PATH = `${FRAGMENT_HOME}/auth.json`;
11
11
  var FRAGMENT_ACCESS_TOKEN_PATH = `${FRAGMENT_HOME}/token.json`;
12
- var resolveMcpBaseUrl = (flag) => flag ?? process.env.FRAGMENT_MCP_URL;
12
+ var resolveAuthBaseUrl = (flag) => flag ?? process.env.FRAGMENT_MCP_URL;
13
13
  var DEV_POSTHOG_API_KEY = "phc_eHLtmjtSfHGfAMzmIxjgtwjp0SP8g1KrIbE1sM8jZVX";
14
14
  var PROD_POSTHOG_API_KEY = "phc_dMs2ythnUI9lm53ZM60NawtEw6TypZuYngHb4SKAnV9";
15
15
  var getPosthogApiKey = () => {
@@ -25,6 +25,6 @@ export {
25
25
  FRAGMENT_VERSION_PATH,
26
26
  FRAGMENT_AUTH_PATH,
27
27
  FRAGMENT_ACCESS_TOKEN_PATH,
28
- resolveMcpBaseUrl,
28
+ resolveAuthBaseUrl,
29
29
  getPosthogApiKey
30
30
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  readVersionFile,
3
3
  updateVersionFile
4
- } from "./chunk-34NLRFFT.js";
4
+ } from "./chunk-7UQY3FIG.js";
5
5
  import {
6
6
  parseJSON
7
7
  } from "./chunk-QZNZYG2G.js";
@@ -22,12 +22,12 @@ import {
22
22
  attemptToCacheToken,
23
23
  getToken,
24
24
  readUnexpiredAccessToken
25
- } from "./chunk-NYTFP5AV.js";
25
+ } from "./chunk-ZA2L64JN.js";
26
26
  import {
27
27
  FRAGMENT_AUTH_PATH,
28
28
  FRAGMENT_HOME,
29
29
  getPosthogApiKey
30
- } from "./chunk-TLM4VKIC.js";
30
+ } from "./chunk-E5P6XCQL.js";
31
31
  import {
32
32
  __commonJS,
33
33
  __require,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  validateSchemaStructure
3
- } from "./chunk-JLTK34AK.js";
3
+ } from "./chunk-7IYYI4D4.js";
4
4
  import {
5
5
  ChartOfAccounts,
6
6
  MIN_SCHEMA_LEDGER_ENTRY_DISABLED_DURATION_SECONDS,
@@ -13,17 +13,17 @@ import {
13
13
  parseWithError,
14
14
  stringify,
15
15
  z
16
- } from "./chunk-JFWJTOMI.js";
16
+ } from "./chunk-7KZ7MRPS.js";
17
17
  import {
18
18
  PaymentAccountingEventKey,
19
19
  VALID_LEDGER_ACCOUNT_STATUS_TRANSITIONS,
20
20
  getSchemaObjectParameters
21
- } from "./chunk-PKCA5M7U.js";
21
+ } from "./chunk-WEMVG47S.js";
22
22
  import {
23
23
  BadRequestError,
24
24
  InternalError,
25
25
  assert_default
26
- } from "./chunk-V7LKJBKQ.js";
26
+ } from "./chunk-K5YIOBLH.js";
27
27
  import {
28
28
  getParsedSchemaString,
29
29
  parseJSON
@@ -8,7 +8,7 @@ import {
8
8
  SYSTEM_PARAMETER_NAMES,
9
9
  getSchemaObjectParameters,
10
10
  getStructuralSubpaths
11
- } from "./chunk-PKCA5M7U.js";
11
+ } from "./chunk-WEMVG47S.js";
12
12
  import {
13
13
  require_source
14
14
  } from "./chunk-QDAKBUNO.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  AuthenticatedCommand
3
- } from "./chunk-3JWLAXCA.js";
3
+ } from "./chunk-KEPMDY7V.js";
4
4
  import {
5
5
  require_lib
6
- } from "./chunk-3IA6BI6A.js";
6
+ } from "./chunk-ELTMQLAC.js";
7
7
  import {
8
8
  require_source
9
9
  } from "./chunk-QDAKBUNO.js";
@@ -4,22 +4,22 @@ import {
4
4
  schemaToEntryDefinitions,
5
5
  schemaToPaymentDefinitions,
6
6
  validateOutputName
7
- } from "./chunk-IXRD6R7Y.js";
7
+ } from "./chunk-GINWMSG5.js";
8
8
  import {
9
9
  Schema,
10
10
  parseWithError
11
- } from "./chunk-JFWJTOMI.js";
11
+ } from "./chunk-7KZ7MRPS.js";
12
12
  import {
13
13
  formatValidationErrors,
14
14
  logValidationErrors
15
- } from "./chunk-SK7ZPCCV.js";
15
+ } from "./chunk-TA4EEF7F.js";
16
16
  import {
17
17
  BadRequestError
18
- } from "./chunk-V7LKJBKQ.js";
18
+ } from "./chunk-K5YIOBLH.js";
19
19
  import {
20
20
  FragmentCommand,
21
21
  require_lib
22
- } from "./chunk-3IA6BI6A.js";
22
+ } from "./chunk-ELTMQLAC.js";
23
23
  import {
24
24
  getParsedSchema
25
25
  } from "./chunk-QZNZYG2G.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  AuthenticatedCommand
3
- } from "./chunk-3JWLAXCA.js";
3
+ } from "./chunk-KEPMDY7V.js";
4
4
  import {
5
5
  require_source
6
6
  } from "./chunk-QDAKBUNO.js";
@@ -5516,7 +5516,9 @@ var codes = {
5516
5516
  missing_parameters: "payment_missing_parameters",
5517
5517
  unknown_parameters: "payment_unknown_parameters",
5518
5518
  reserved_parameters: "payment_reserved_parameters",
5519
- invalid_request: "payment_invalid_request"
5519
+ invalid_request: "payment_invalid_request",
5520
+ not_refundable: "payment_not_refundable",
5521
+ refund_amount_too_large: "payment_refund_amount_too_large"
5520
5522
  },
5521
5523
  payment_method: {
5522
5524
  invalid_id: "payment_method_invalid_id",
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  getSdk
3
- } from "./chunk-QJEJBASA.js";
3
+ } from "./chunk-KW44NTZ4.js";
4
4
  import {
5
5
  FragmentCommand,
6
6
  GraphQLClient,
7
7
  require_lib
8
- } from "./chunk-3IA6BI6A.js";
8
+ } from "./chunk-ELTMQLAC.js";
9
9
  import {
10
10
  colorizeJson
11
11
  } from "./chunk-QZNZYG2G.js";
@@ -996,6 +996,12 @@ var LinkType = /* @__PURE__ */ ((LinkType2) => {
996
996
  LinkType2["UnitLink"] = "UnitLink";
997
997
  return LinkType2;
998
998
  })(LinkType || {});
999
+ var PaymentAttemptStatus = /* @__PURE__ */ ((PaymentAttemptStatus2) => {
1000
+ PaymentAttemptStatus2["Failed"] = "failed";
1001
+ PaymentAttemptStatus2["Processing"] = "processing";
1002
+ PaymentAttemptStatus2["Succeeded"] = "succeeded";
1003
+ return PaymentAttemptStatus2;
1004
+ })(PaymentAttemptStatus || {});
999
1005
  var PaymentCurrencyCode = /* @__PURE__ */ ((PaymentCurrencyCode2) => {
1000
1006
  PaymentCurrencyCode2["Usd"] = "USD";
1001
1007
  return PaymentCurrencyCode2;
@@ -1013,6 +1019,12 @@ var PaymentMode = /* @__PURE__ */ ((PaymentMode2) => {
1013
1019
  PaymentMode2["Sandbox"] = "sandbox";
1014
1020
  return PaymentMode2;
1015
1021
  })(PaymentMode || {});
1022
+ var PaymentRefundStatus = /* @__PURE__ */ ((PaymentRefundStatus2) => {
1023
+ PaymentRefundStatus2["Failed"] = "failed";
1024
+ PaymentRefundStatus2["Processing"] = "processing";
1025
+ PaymentRefundStatus2["Settled"] = "settled";
1026
+ return PaymentRefundStatus2;
1027
+ })(PaymentRefundStatus || {});
1016
1028
  var PaymentStatus = /* @__PURE__ */ ((PaymentStatus2) => {
1017
1029
  PaymentStatus2["Accepted"] = "accepted";
1018
1030
  PaymentStatus2["NeedsPaymentMethod"] = "needs_payment_method";
@@ -1713,9 +1725,11 @@ export {
1713
1725
  LedgerMigrationStatus,
1714
1726
  LedgerTypes,
1715
1727
  LinkType,
1728
+ PaymentAttemptStatus,
1716
1729
  PaymentCurrencyCode,
1717
1730
  PaymentMethodSetupStatus,
1718
1731
  PaymentMode,
1732
+ PaymentRefundStatus,
1719
1733
  PaymentStatus,
1720
1734
  PostLinesAs,
1721
1735
  ReadBalanceConsistencyMode,
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  AuthenticatedCommand
3
- } from "./chunk-3JWLAXCA.js";
3
+ } from "./chunk-KEPMDY7V.js";
4
4
  import {
5
5
  require_lib
6
- } from "./chunk-3IA6BI6A.js";
6
+ } from "./chunk-ELTMQLAC.js";
7
7
  import {
8
8
  getParsedSchema
9
9
  } from "./chunk-QZNZYG2G.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  AuthenticatedCommand
3
- } from "./chunk-3JWLAXCA.js";
3
+ } from "./chunk-KEPMDY7V.js";
4
4
  import {
5
5
  require_lib
6
- } from "./chunk-3IA6BI6A.js";
6
+ } from "./chunk-ELTMQLAC.js";
7
7
  import {
8
8
  require_source
9
9
  } from "./chunk-QDAKBUNO.js";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  inquirer_default
3
- } from "./chunk-6PRTPBP7.js";
3
+ } from "./chunk-2ZOSYPMG.js";
4
4
  import {
5
5
  FragmentCommand,
6
6
  require_lib
7
- } from "./chunk-3IA6BI6A.js";
7
+ } from "./chunk-ELTMQLAC.js";
8
8
  import {
9
9
  require_source
10
10
  } from "./chunk-QDAKBUNO.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  AuthenticatedCommand
3
- } from "./chunk-3JWLAXCA.js";
3
+ } from "./chunk-KEPMDY7V.js";
4
4
  import {
5
5
  require_lib
6
- } from "./chunk-3IA6BI6A.js";
6
+ } from "./chunk-ELTMQLAC.js";
7
7
  import {
8
8
  require_source
9
9
  } from "./chunk-QDAKBUNO.js";
@@ -1,22 +1,22 @@
1
1
  import {
2
2
  BackCompatCheckError,
3
3
  verifySchemaAgainstFile
4
- } from "./chunk-VF5ST64K.js";
4
+ } from "./chunk-F6CAOP63.js";
5
5
  import {
6
6
  extractSchemaMetadata,
7
7
  isJsonParseError,
8
8
  validateSchemaStructure
9
- } from "./chunk-JLTK34AK.js";
9
+ } from "./chunk-7IYYI4D4.js";
10
10
  import {
11
11
  DEFAULT_SCHEMA_PATH
12
12
  } from "./chunk-A4BSWX5D.js";
13
13
  import {
14
14
  logValidationErrors
15
- } from "./chunk-SK7ZPCCV.js";
15
+ } from "./chunk-TA4EEF7F.js";
16
16
  import {
17
17
  FragmentCommand,
18
18
  require_lib
19
- } from "./chunk-3IA6BI6A.js";
19
+ } from "./chunk-ELTMQLAC.js";
20
20
  import {
21
21
  colorizeJson,
22
22
  emphasize,
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  defaultBrowserAuthDeps,
3
3
  provisionApiClient
4
- } from "./chunk-3SJL7FRS.js";
4
+ } from "./chunk-DQKSSCGB.js";
5
5
  import {
6
6
  FragmentCommand,
7
7
  require_lib
8
- } from "./chunk-3IA6BI6A.js";
8
+ } from "./chunk-ELTMQLAC.js";
9
9
  import {
10
- resolveMcpBaseUrl
11
- } from "./chunk-TLM4VKIC.js";
10
+ resolveAuthBaseUrl
11
+ } from "./chunk-E5P6XCQL.js";
12
12
  import {
13
13
  __toESM,
14
14
  init_cjs_shims
@@ -79,13 +79,13 @@ var ApiClientCreate = class _ApiClientCreate extends FragmentCommand {
79
79
  }
80
80
  async run() {
81
81
  const { flags } = await this.parse(_ApiClientCreate);
82
- const mcpBaseUrl = resolveMcpBaseUrl(flags["mcp-url"]);
83
- this.assert(mcpBaseUrl, {
82
+ const authBaseUrl = resolveAuthBaseUrl(flags["mcp-url"]);
83
+ this.assert(authBaseUrl, {
84
84
  message: "Must provide --mcp-url (or set FRAGMENT_MCP_URL), e.g. https://mcp.us-west-2.fragment.dev"
85
85
  });
86
86
  const result = await provisionApiClient(
87
87
  {
88
- mcpBaseUrl,
88
+ authBaseUrl,
89
89
  workspaceId: flags.workspace,
90
90
  clientName: flags.name,
91
91
  role: flags.role ? ROLE_KEYS[flags.role] : void 0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  BadRequestError
3
- } from "./chunk-V7LKJBKQ.js";
3
+ } from "./chunk-K5YIOBLH.js";
4
4
  import {
5
5
  require_source
6
6
  } from "./chunk-QDAKBUNO.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  AuthenticatedCommand
3
- } from "./chunk-3JWLAXCA.js";
3
+ } from "./chunk-KEPMDY7V.js";
4
4
  import {
5
5
  require_lib
6
- } from "./chunk-3IA6BI6A.js";
6
+ } from "./chunk-ELTMQLAC.js";
7
7
  import {
8
8
  __toESM,
9
9
  init_cjs_shims