@settlemint/sdk-cli 0.7.0-prbe45660 → 0.7.0-prca66344

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 (3) hide show
  1. package/dist/cli.js +976 -1003
  2. package/dist/cli.js.map +47 -47
  3. package/package.json +3 -3
package/dist/cli.js CHANGED
@@ -197427,7 +197427,7 @@ ${Bt.cyan(Yt)}
197427
197427
  code: "ENOENT"
197428
197428
  }), getPathInfo = (e9, t7) => {
197429
197429
  var r6 = t7.colon || or;
197430
- var i6 = e9.match(/\//) || nr && e9.match(/\\/) ? [""] : [...nr ? [process.cwd()] : [], ...(t7.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.KQQtjeFTgU:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin").split(r6)];
197430
+ var i6 = e9.match(/\//) || nr && e9.match(/\\/) ? [""] : [...nr ? [process.cwd()] : [], ...(t7.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.494n7TPHtk:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin").split(r6)];
197431
197431
  var n6 = nr ? t7.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
197432
197432
  var a5 = nr ? n6.split(r6) : [""];
197433
197433
  if (nr) {
@@ -200564,7 +200564,7 @@ ${whileRunning(e9)}`;
200564
200564
  };
200565
200565
  ni = Object.assign(async function _main() {
200566
200566
  var e9 = new Cli({
200567
- binaryVersion: "0.7.0-prbe45660",
200567
+ binaryVersion: "0.7.0-prca66344",
200568
200568
  binaryLabel: "gql.tada CLI",
200569
200569
  binaryName: "gql.tada"
200570
200570
  });
@@ -218401,7 +218401,7 @@ var require_lib4 = __commonJS((exports, module) => {
218401
218401
  var rRel = new RegExp(`^\\.${rSlash.source}`);
218402
218402
  var getNotFoundError2 = (cmd2) => Object.assign(new Error(`not found: ${cmd2}`), { code: "ENOENT" });
218403
218403
  var getPathInfo2 = (cmd2, {
218404
- path: optPath = "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.KQQtjeFTgU:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",
218404
+ path: optPath = "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.494n7TPHtk:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",
218405
218405
  pathExt: optPathExt = process.env.PATHEXT,
218406
218406
  delimiter: optDelimiter = delimiter
218407
218407
  }) => {
@@ -218605,7 +218605,7 @@ var require_lib5 = __commonJS((exports, module) => {
218605
218605
  let pathToInitial;
218606
218606
  try {
218607
218607
  pathToInitial = which.sync(initialCmd, {
218608
- path: options.env && findInObject(options.env, "PATH") || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.KQQtjeFTgU:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",
218608
+ path: options.env && findInObject(options.env, "PATH") || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.494n7TPHtk:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",
218609
218609
  pathext: options.env && findInObject(options.env, "PATHEXT") || process.env.PATHEXT
218610
218610
  }).toLowerCase();
218611
218611
  } catch (err) {
@@ -219322,7 +219322,7 @@ var require_lib6 = __commonJS((exports, module) => {
219322
219322
  var rRel = new RegExp(`^\\.${rSlash.source}`);
219323
219323
  var getNotFoundError2 = (cmd2) => Object.assign(new Error(`not found: ${cmd2}`), { code: "ENOENT" });
219324
219324
  var getPathInfo2 = (cmd2, {
219325
- path: optPath = "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.KQQtjeFTgU:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",
219325
+ path: optPath = "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.494n7TPHtk:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",
219326
219326
  pathExt: optPathExt = process.env.PATHEXT,
219327
219327
  delimiter: optDelimiter = delimiter
219328
219328
  }) => {
@@ -235213,7 +235213,7 @@ var require_which2 = __commonJS((exports, module) => {
235213
235213
  const colon = opt2.colon || COLON;
235214
235214
  const pathEnv = cmd2.match(/\//) || isWindows2 && cmd2.match(/\\/) ? [""] : [
235215
235215
  ...isWindows2 ? [process.cwd()] : [],
235216
- ...(opt2.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.KQQtjeFTgU:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin").split(colon)
235216
+ ...(opt2.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.494n7TPHtk:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin").split(colon)
235217
235217
  ];
235218
235218
  const pathExtExe = isWindows2 ? opt2.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
235219
235219
  const pathExt = isWindows2 ? pathExtExe.split(colon) : [""];
@@ -267675,7 +267675,10 @@ var cancel = (msg) => {
267675
267675
  var ApplicationAccessTokenSchema = z3.string().regex(/^sm_aat_.*$/);
267676
267676
  var PersonalAccessTokenSchema = z3.string().regex(/^sm_pat_.*$/);
267677
267677
  var AccessTokenSchema = z3.string().regex(/^sm_pat_.*|sm_aat_.*$/);
267678
- var UniqueNameSchema = z3.string().regex(/^[a-z0-9-]+$/);
267678
+ var IdSchema = z3.union([
267679
+ z3.string().uuid(),
267680
+ z3.string().regex(/^[0-9a-fA-F]{24}$/)
267681
+ ]);
267679
267682
  var UrlSchema = z3.string().url();
267680
267683
  var UrlPathSchema = z3.string().regex(/^\/(?:[a-zA-Z0-9-_]+(?:\/[a-zA-Z0-9-_]+)*\/?)?$/, {
267681
267684
  message: "Invalid URL path format. Must start with '/' and can contain letters, numbers, hyphens, and underscores."
@@ -267685,33 +267688,33 @@ var DotEnvSchema = z3.object({
267685
267688
  SETTLEMINT_INSTANCE: UrlSchema.default("https://console.settlemint.com"),
267686
267689
  SETTLEMINT_ACCESS_TOKEN: ApplicationAccessTokenSchema.optional(),
267687
267690
  SETTLEMINT_PERSONAL_ACCESS_TOKEN: PersonalAccessTokenSchema.optional(),
267688
- SETTLEMINT_WORKSPACE: UniqueNameSchema.optional(),
267689
- SETTLEMINT_APPLICATION: UniqueNameSchema.optional(),
267690
- SETTLEMINT_BLOCKCHAIN_NETWORK: UniqueNameSchema.optional(),
267691
- SETTLEMINT_BLOCKCHAIN_NODE: UniqueNameSchema.optional(),
267692
- SETTLEMINT_LOAD_BALANCER: UniqueNameSchema.optional(),
267693
- SETTLEMINT_HASURA: UniqueNameSchema.optional(),
267691
+ SETTLEMINT_WORKSPACE: IdSchema.optional(),
267692
+ SETTLEMINT_APPLICATION: IdSchema.optional(),
267693
+ SETTLEMINT_BLOCKCHAIN_NETWORK: IdSchema.optional(),
267694
+ SETTLEMINT_BLOCKCHAIN_NODE: IdSchema.optional(),
267695
+ SETTLEMINT_LOAD_BALANCER: IdSchema.optional(),
267696
+ SETTLEMINT_HASURA: IdSchema.optional(),
267694
267697
  SETTLEMINT_HASURA_ENDPOINT: UrlSchema.optional(),
267695
267698
  SETTLEMINT_HASURA_ADMIN_SECRET: z3.string().optional(),
267696
267699
  SETTLEMINT_HASURA_DATABASE_URL: z3.string().optional(),
267697
- SETTLEMINT_THEGRAPH: UniqueNameSchema.optional(),
267700
+ SETTLEMINT_THEGRAPH: IdSchema.optional(),
267698
267701
  SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS: z3.preprocess((value4) => tryParseJson(value4, []), z3.array(UrlSchema).optional()),
267699
267702
  SETTLEMINT_THEGRAPH_SUBGRAPH_NAME: z3.string().optional(),
267700
- SETTLEMINT_PORTAL: UniqueNameSchema.optional(),
267703
+ SETTLEMINT_PORTAL: IdSchema.optional(),
267701
267704
  SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT: UrlSchema.optional(),
267702
267705
  SETTLEMINT_PORTAL_REST_ENDPOINT: UrlSchema.optional(),
267703
- SETTLEMINT_HD_PRIVATE_KEY: UniqueNameSchema.optional(),
267704
- SETTLEMINT_MINIO: UniqueNameSchema.optional(),
267706
+ SETTLEMINT_HD_PRIVATE_KEY: z3.string().optional(),
267707
+ SETTLEMINT_MINIO: IdSchema.optional(),
267705
267708
  SETTLEMINT_MINIO_ENDPOINT: UrlSchema.optional(),
267706
267709
  SETTLEMINT_MINIO_ACCESS_KEY: z3.string().optional(),
267707
267710
  SETTLEMINT_MINIO_SECRET_KEY: z3.string().optional(),
267708
- SETTLEMINT_IPFS: UniqueNameSchema.optional(),
267711
+ SETTLEMINT_IPFS: IdSchema.optional(),
267709
267712
  SETTLEMINT_IPFS_API_ENDPOINT: UrlSchema.optional(),
267710
267713
  SETTLEMINT_IPFS_PINNING_ENDPOINT: UrlSchema.optional(),
267711
267714
  SETTLEMINT_IPFS_GATEWAY_ENDPOINT: UrlSchema.optional(),
267712
- SETTLEMINT_CUSTOM_DEPLOYMENT: UniqueNameSchema.optional(),
267715
+ SETTLEMINT_CUSTOM_DEPLOYMENT: IdSchema.optional(),
267713
267716
  SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT: UrlSchema.optional(),
267714
- SETTLEMINT_BLOCKSCOUT: UniqueNameSchema.optional(),
267717
+ SETTLEMINT_BLOCKSCOUT: IdSchema.optional(),
267715
267718
  SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT: UrlSchema.optional(),
267716
267719
  SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT: UrlSchema.optional(),
267717
267720
  SETTLEMINT_NEW_PROJECT_NAME: z3.string().optional(),
@@ -267719,10 +267722,6 @@ var DotEnvSchema = z3.object({
267719
267722
  SETTLEMINT_SMART_CONTRACT_DEPLOYMENT_ID: z3.string().optional()
267720
267723
  });
267721
267724
  var DotEnvSchemaPartial = DotEnvSchema.partial();
267722
- var IdSchema = z3.union([
267723
- z3.string().uuid(),
267724
- z3.string().regex(/^[0-9a-fA-F]{24}$/)
267725
- ]);
267726
267725
  function validate(schema, value4) {
267727
267726
  try {
267728
267727
  return schema.parse(value4);
@@ -269973,7 +269972,10 @@ function tryParseJson2(value4, defaultValue = null) {
269973
269972
  return defaultValue;
269974
269973
  }
269975
269974
  }
269976
- var UniqueNameSchema2 = z3.string().regex(/^[a-z0-9-]+$/);
269975
+ var IdSchema2 = z3.union([
269976
+ z3.string().uuid(),
269977
+ z3.string().regex(/^[0-9a-fA-F]{24}$/)
269978
+ ]);
269977
269979
  var UrlSchema2 = z3.string().url();
269978
269980
  var UrlPathSchema2 = z3.string().regex(/^\/(?:[a-zA-Z0-9-_]+(?:\/[a-zA-Z0-9-_]+)*\/?)?$/, {
269979
269981
  message: "Invalid URL path format. Must start with '/' and can contain letters, numbers, hyphens, and underscores."
@@ -269983,33 +269985,33 @@ var DotEnvSchema2 = z3.object({
269983
269985
  SETTLEMINT_INSTANCE: UrlSchema2.default("https://console.settlemint.com"),
269984
269986
  SETTLEMINT_ACCESS_TOKEN: ApplicationAccessTokenSchema2.optional(),
269985
269987
  SETTLEMINT_PERSONAL_ACCESS_TOKEN: PersonalAccessTokenSchema2.optional(),
269986
- SETTLEMINT_WORKSPACE: UniqueNameSchema2.optional(),
269987
- SETTLEMINT_APPLICATION: UniqueNameSchema2.optional(),
269988
- SETTLEMINT_BLOCKCHAIN_NETWORK: UniqueNameSchema2.optional(),
269989
- SETTLEMINT_BLOCKCHAIN_NODE: UniqueNameSchema2.optional(),
269990
- SETTLEMINT_LOAD_BALANCER: UniqueNameSchema2.optional(),
269991
- SETTLEMINT_HASURA: UniqueNameSchema2.optional(),
269988
+ SETTLEMINT_WORKSPACE: IdSchema2.optional(),
269989
+ SETTLEMINT_APPLICATION: IdSchema2.optional(),
269990
+ SETTLEMINT_BLOCKCHAIN_NETWORK: IdSchema2.optional(),
269991
+ SETTLEMINT_BLOCKCHAIN_NODE: IdSchema2.optional(),
269992
+ SETTLEMINT_LOAD_BALANCER: IdSchema2.optional(),
269993
+ SETTLEMINT_HASURA: IdSchema2.optional(),
269992
269994
  SETTLEMINT_HASURA_ENDPOINT: UrlSchema2.optional(),
269993
269995
  SETTLEMINT_HASURA_ADMIN_SECRET: z3.string().optional(),
269994
269996
  SETTLEMINT_HASURA_DATABASE_URL: z3.string().optional(),
269995
- SETTLEMINT_THEGRAPH: UniqueNameSchema2.optional(),
269997
+ SETTLEMINT_THEGRAPH: IdSchema2.optional(),
269996
269998
  SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS: z3.preprocess((value4) => tryParseJson2(value4, []), z3.array(UrlSchema2).optional()),
269997
269999
  SETTLEMINT_THEGRAPH_SUBGRAPH_NAME: z3.string().optional(),
269998
- SETTLEMINT_PORTAL: UniqueNameSchema2.optional(),
270000
+ SETTLEMINT_PORTAL: IdSchema2.optional(),
269999
270001
  SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT: UrlSchema2.optional(),
270000
270002
  SETTLEMINT_PORTAL_REST_ENDPOINT: UrlSchema2.optional(),
270001
- SETTLEMINT_HD_PRIVATE_KEY: UniqueNameSchema2.optional(),
270002
- SETTLEMINT_MINIO: UniqueNameSchema2.optional(),
270003
+ SETTLEMINT_HD_PRIVATE_KEY: z3.string().optional(),
270004
+ SETTLEMINT_MINIO: IdSchema2.optional(),
270003
270005
  SETTLEMINT_MINIO_ENDPOINT: UrlSchema2.optional(),
270004
270006
  SETTLEMINT_MINIO_ACCESS_KEY: z3.string().optional(),
270005
270007
  SETTLEMINT_MINIO_SECRET_KEY: z3.string().optional(),
270006
- SETTLEMINT_IPFS: UniqueNameSchema2.optional(),
270008
+ SETTLEMINT_IPFS: IdSchema2.optional(),
270007
270009
  SETTLEMINT_IPFS_API_ENDPOINT: UrlSchema2.optional(),
270008
270010
  SETTLEMINT_IPFS_PINNING_ENDPOINT: UrlSchema2.optional(),
270009
270011
  SETTLEMINT_IPFS_GATEWAY_ENDPOINT: UrlSchema2.optional(),
270010
- SETTLEMINT_CUSTOM_DEPLOYMENT: UniqueNameSchema2.optional(),
270012
+ SETTLEMINT_CUSTOM_DEPLOYMENT: IdSchema2.optional(),
270011
270013
  SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT: UrlSchema2.optional(),
270012
- SETTLEMINT_BLOCKSCOUT: UniqueNameSchema2.optional(),
270014
+ SETTLEMINT_BLOCKSCOUT: IdSchema2.optional(),
270013
270015
  SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT: UrlSchema2.optional(),
270014
270016
  SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT: UrlSchema2.optional(),
270015
270017
  SETTLEMINT_NEW_PROJECT_NAME: z3.string().optional(),
@@ -270017,10 +270019,6 @@ var DotEnvSchema2 = z3.object({
270017
270019
  SETTLEMINT_SMART_CONTRACT_DEPLOYMENT_ID: z3.string().optional()
270018
270020
  });
270019
270021
  var DotEnvSchemaPartial2 = DotEnvSchema2.partial();
270020
- var IdSchema2 = z3.union([
270021
- z3.string().uuid(),
270022
- z3.string().regex(/^[0-9a-fA-F]{24}$/)
270023
- ]);
270024
270022
  function validate2(schema, value4) {
270025
270023
  try {
270026
270024
  return schema.parse(value4);
@@ -270629,7 +270627,10 @@ function tryParseJson3(value4, defaultValue = null) {
270629
270627
  return defaultValue;
270630
270628
  }
270631
270629
  }
270632
- var UniqueNameSchema3 = z3.string().regex(/^[a-z0-9-]+$/);
270630
+ var IdSchema3 = z3.union([
270631
+ z3.string().uuid(),
270632
+ z3.string().regex(/^[0-9a-fA-F]{24}$/)
270633
+ ]);
270633
270634
  var UrlSchema3 = z3.string().url();
270634
270635
  var UrlPathSchema3 = z3.string().regex(/^\/(?:[a-zA-Z0-9-_]+(?:\/[a-zA-Z0-9-_]+)*\/?)?$/, {
270635
270636
  message: "Invalid URL path format. Must start with '/' and can contain letters, numbers, hyphens, and underscores."
@@ -270639,33 +270640,33 @@ var DotEnvSchema3 = z3.object({
270639
270640
  SETTLEMINT_INSTANCE: UrlSchema3.default("https://console.settlemint.com"),
270640
270641
  SETTLEMINT_ACCESS_TOKEN: ApplicationAccessTokenSchema3.optional(),
270641
270642
  SETTLEMINT_PERSONAL_ACCESS_TOKEN: PersonalAccessTokenSchema3.optional(),
270642
- SETTLEMINT_WORKSPACE: UniqueNameSchema3.optional(),
270643
- SETTLEMINT_APPLICATION: UniqueNameSchema3.optional(),
270644
- SETTLEMINT_BLOCKCHAIN_NETWORK: UniqueNameSchema3.optional(),
270645
- SETTLEMINT_BLOCKCHAIN_NODE: UniqueNameSchema3.optional(),
270646
- SETTLEMINT_LOAD_BALANCER: UniqueNameSchema3.optional(),
270647
- SETTLEMINT_HASURA: UniqueNameSchema3.optional(),
270643
+ SETTLEMINT_WORKSPACE: IdSchema3.optional(),
270644
+ SETTLEMINT_APPLICATION: IdSchema3.optional(),
270645
+ SETTLEMINT_BLOCKCHAIN_NETWORK: IdSchema3.optional(),
270646
+ SETTLEMINT_BLOCKCHAIN_NODE: IdSchema3.optional(),
270647
+ SETTLEMINT_LOAD_BALANCER: IdSchema3.optional(),
270648
+ SETTLEMINT_HASURA: IdSchema3.optional(),
270648
270649
  SETTLEMINT_HASURA_ENDPOINT: UrlSchema3.optional(),
270649
270650
  SETTLEMINT_HASURA_ADMIN_SECRET: z3.string().optional(),
270650
270651
  SETTLEMINT_HASURA_DATABASE_URL: z3.string().optional(),
270651
- SETTLEMINT_THEGRAPH: UniqueNameSchema3.optional(),
270652
+ SETTLEMINT_THEGRAPH: IdSchema3.optional(),
270652
270653
  SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS: z3.preprocess((value4) => tryParseJson3(value4, []), z3.array(UrlSchema3).optional()),
270653
270654
  SETTLEMINT_THEGRAPH_SUBGRAPH_NAME: z3.string().optional(),
270654
- SETTLEMINT_PORTAL: UniqueNameSchema3.optional(),
270655
+ SETTLEMINT_PORTAL: IdSchema3.optional(),
270655
270656
  SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT: UrlSchema3.optional(),
270656
270657
  SETTLEMINT_PORTAL_REST_ENDPOINT: UrlSchema3.optional(),
270657
- SETTLEMINT_HD_PRIVATE_KEY: UniqueNameSchema3.optional(),
270658
- SETTLEMINT_MINIO: UniqueNameSchema3.optional(),
270658
+ SETTLEMINT_HD_PRIVATE_KEY: z3.string().optional(),
270659
+ SETTLEMINT_MINIO: IdSchema3.optional(),
270659
270660
  SETTLEMINT_MINIO_ENDPOINT: UrlSchema3.optional(),
270660
270661
  SETTLEMINT_MINIO_ACCESS_KEY: z3.string().optional(),
270661
270662
  SETTLEMINT_MINIO_SECRET_KEY: z3.string().optional(),
270662
- SETTLEMINT_IPFS: UniqueNameSchema3.optional(),
270663
+ SETTLEMINT_IPFS: IdSchema3.optional(),
270663
270664
  SETTLEMINT_IPFS_API_ENDPOINT: UrlSchema3.optional(),
270664
270665
  SETTLEMINT_IPFS_PINNING_ENDPOINT: UrlSchema3.optional(),
270665
270666
  SETTLEMINT_IPFS_GATEWAY_ENDPOINT: UrlSchema3.optional(),
270666
- SETTLEMINT_CUSTOM_DEPLOYMENT: UniqueNameSchema3.optional(),
270667
+ SETTLEMINT_CUSTOM_DEPLOYMENT: IdSchema3.optional(),
270667
270668
  SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT: UrlSchema3.optional(),
270668
- SETTLEMINT_BLOCKSCOUT: UniqueNameSchema3.optional(),
270669
+ SETTLEMINT_BLOCKSCOUT: IdSchema3.optional(),
270669
270670
  SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT: UrlSchema3.optional(),
270670
270671
  SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT: UrlSchema3.optional(),
270671
270672
  SETTLEMINT_NEW_PROJECT_NAME: z3.string().optional(),
@@ -270673,10 +270674,6 @@ var DotEnvSchema3 = z3.object({
270673
270674
  SETTLEMINT_SMART_CONTRACT_DEPLOYMENT_ID: z3.string().optional()
270674
270675
  });
270675
270676
  var DotEnvSchemaPartial3 = DotEnvSchema3.partial();
270676
- var IdSchema3 = z3.union([
270677
- z3.string().uuid(),
270678
- z3.string().regex(/^[0-9a-fA-F]{24}$/)
270679
- ]);
270680
270677
  function validate3(schema, value4) {
270681
270678
  try {
270682
270679
  return schema.parse(value4);
@@ -271281,256 +271278,95 @@ var t7 = initGraphQLTada();
271281
271278
 
271282
271279
  // ../js/dist/settlemint.mjs
271283
271280
  var graphql = initGraphQLTada();
271281
+ var createApplicationAccessToken = graphql(`
271282
+ mutation CreateApplicationAccessToken($applicationId: ID!, $blockchainNetworkScope: BlockchainNetworkScopeInputType!, $blockchainNodeScope: BlockchainNodeScopeInputType!, $customDeploymentScope: CustomDeploymentScopeInputType!, $insightsScope: InsightsScopeInputType!, $integrationScope: IntegrationScopeInputType!, $loadBalancerScope: LoadBalancerScopeInputType!, $middlewareScope: MiddlewareScopeInputType!, $name: String!, $privateKeyScope: PrivateKeyScopeInputType!, $smartContractSetScope: SmartContractSetScopeInputType!, $storageScope: StorageScopeInputType!, $validityPeriod: AccessTokenValidityPeriod!) {
271283
+ createApplicationAccessToken(applicationId: $applicationId, blockchainNetworkScope: $blockchainNetworkScope, blockchainNodeScope: $blockchainNodeScope, customDeploymentScope: $customDeploymentScope, insightsScope: $insightsScope, integrationScope: $integrationScope, loadBalancerScope: $loadBalancerScope, middlewareScope: $middlewareScope, name: $name, privateKeyScope: $privateKeyScope, smartContractSetScope: $smartContractSetScope, storageScope: $storageScope, validityPeriod: $validityPeriod) {
271284
+ token
271285
+ }
271286
+ }
271287
+ `, []);
271288
+ var applicationAccessTokenCreate = (gqlClient, options) => {
271289
+ return async (args) => {
271290
+ validate3(IdSchema3, args.applicationId);
271291
+ const { createApplicationAccessToken: applicationAccessToken } = await gqlClient.request(createApplicationAccessToken, args);
271292
+ if (!applicationAccessToken.token) {
271293
+ throw new Error("Failed to create application access token");
271294
+ }
271295
+ return applicationAccessToken.token;
271296
+ };
271297
+ };
271284
271298
  var ApplicationFragment = graphql(`
271285
271299
  fragment Application on Application {
271286
271300
  id
271287
- uniqueName
271288
271301
  name
271289
- workspace {
271290
- id
271291
- uniqueName
271292
- }
271302
+ workspace { id }
271293
271303
  }
271294
271304
  `);
271295
- var WorkspaceFragment = graphql(`
271296
- fragment Workspace on Workspace {
271297
- id
271298
- uniqueName
271299
- name
271305
+ var listApplications = graphql(`
271306
+ query ListApplications($workspaceId: ID!) {
271307
+ workspace (workspaceId: $workspaceId) {
271300
271308
  applications {
271301
271309
  ...Application
271302
271310
  }
271303
271311
  }
271304
- `, [ApplicationFragment]);
271305
- var getWorkspacesAndApplications = graphql(`
271306
- query getWorkspacesAndApplications {
271307
- workspaces {
271308
- ...Workspace
271309
- applications {
271310
- ...Application
271311
- }
271312
- childWorkspaces {
271313
- ...Workspace
271314
- }
271315
- }
271316
- }
271317
- `, [WorkspaceFragment, ApplicationFragment]);
271318
- var getWorkspace = graphql(`
271319
- query getWorkspace($uniqueName: String!) {
271320
- workspaceByUniqueName(uniqueName: $uniqueName) {
271321
- ...Workspace
271322
- applications {
271323
- ...Application
271324
- }
271325
- }
271326
- }
271327
- `, [WorkspaceFragment, ApplicationFragment]);
271328
- var createWorkspace = graphql(`
271329
- mutation CreateWorkspace(
271330
- $addressLine1: String
271331
- $addressLine2: String
271332
- $city: String
271333
- $companyName: String
271334
- $country: String
271335
- $name: String!
271336
- $parentId: String
271337
- $paymentMethodId: String
271338
- $postalCode: String
271339
- $taxIdType: String
271340
- $taxIdValue: String
271341
- ) {
271342
- createWorkspace(
271343
- addressLine1: $addressLine1
271344
- addressLine2: $addressLine2
271345
- city: $city
271346
- companyName: $companyName
271347
- country: $country
271348
- name: $name
271349
- parentId: $parentId
271350
- paymentMethodId: $paymentMethodId
271351
- postalCode: $postalCode
271352
- taxIdType: $taxIdType
271353
- taxIdValue: $taxIdValue
271354
- ) {
271355
- ...Workspace
271356
- applications {
271357
- ...Application
271358
- }
271359
- }
271360
- }
271361
- `, [WorkspaceFragment, ApplicationFragment]);
271362
- var deleteWorkspace = graphql(`
271363
- mutation deleteWorkspace($id: ID!) {
271364
- deleteWorkspace(workspaceId: $id) {
271365
- ...Workspace
271366
- applications {
271367
- ...Application
271368
- }
271369
- }
271370
- }
271371
- `, [WorkspaceFragment, ApplicationFragment]);
271372
- var addCredits = graphql(`
271373
- mutation addCredits($workspaceId: String!, $amount: Float!) {
271374
- addCredits(workspaceId: $workspaceId, amount: $amount)
271375
- }
271376
- `);
271377
- var workspaceList = (gqlClient, options) => {
271378
- return async () => {
271379
- const { workspaces } = await gqlClient.request(getWorkspacesAndApplications);
271380
- const allWorkspaces = workspaces.reduce((acc, workspace) => {
271381
- acc.push(workspace);
271382
- if (workspace.childWorkspaces) {
271383
- acc.push(...workspace.childWorkspaces);
271384
- }
271385
- return acc;
271386
- }, []);
271387
- return allWorkspaces.sort((a8, b4) => a8.name.localeCompare(b4.name));
271388
- };
271389
- };
271390
- var workspaceRead = (gqlClient, options) => {
271391
- return async (workspaceUniqueName) => {
271392
- const { workspaceByUniqueName } = await gqlClient.request(getWorkspace, { uniqueName: workspaceUniqueName });
271393
- return workspaceByUniqueName;
271394
- };
271395
- };
271396
- var workspaceCreate = (gqlClient, options) => {
271397
- return async (createWorkspaceArgs) => {
271398
- const { createWorkspace: workspace } = await gqlClient.request(createWorkspace, createWorkspaceArgs);
271399
- return workspace;
271400
- };
271401
- };
271402
- var workspaceDelete = (gqlClient, options) => {
271403
- return async (workspaceUniqueName) => {
271404
- const workspaceToDelete = await workspaceRead(gqlClient, options)(workspaceUniqueName);
271405
- const { deleteWorkspace: workspace } = await gqlClient.request(deleteWorkspace, { id: workspaceToDelete.id });
271406
- return workspace;
271407
- };
271408
- };
271409
- var workspaceAddCredits = (gqlClient, options) => {
271410
- return async (workspaceId, amount) => {
271411
- const id = validate3(IdSchema3, workspaceId);
271412
- if (amount <= 0) {
271413
- throw new Error("Credit amount must be a positive number");
271414
- }
271415
- const { addCredits: result } = await gqlClient.request(addCredits, { workspaceId: id, amount });
271416
- return result;
271417
- };
271418
- };
271419
- var listApplications = graphql(`
271420
- query ListApplications($workspaceUniqueName: String!) {
271421
- workspaceByUniqueName(uniqueName: $workspaceUniqueName) {
271422
- applications {
271423
- ...Application
271424
- }
271425
- }
271426
- }
271312
+ }
271427
271313
  `, [ApplicationFragment]);
271428
271314
  var readApplication = graphql(`
271429
- query ReadApplication($applicationUniqueName: String!) {
271430
- applicationByUniqueName(uniqueName: $applicationUniqueName) {
271431
- ...Application
271432
- }
271315
+ query ReadApplication($id: ID!) {
271316
+ application(applicationId: $id) {
271317
+ ...Application
271433
271318
  }
271319
+ }
271434
271320
  `, [ApplicationFragment]);
271435
271321
  var createApplication = graphql(`
271436
- mutation CreateApplication($name: String!, $workspaceId: ID!) {
271437
- createApplication(name: $name, workspaceId: $workspaceId) {
271438
- ...Application
271439
- }
271322
+ mutation CreateApplication(
271323
+ $name: String!
271324
+ $workspaceId: ID!
271325
+ ) {
271326
+ createApplication(
271327
+ name: $name
271328
+ workspaceId: $workspaceId
271329
+ ) {
271330
+ ...Application
271440
271331
  }
271332
+ }
271441
271333
  `, [ApplicationFragment]);
271442
271334
  var deleteApplication = graphql(`
271443
- mutation DeleteApplication($id: ID!) {
271444
- deleteApplication(id: $id) {
271445
- ...Application
271446
- }
271335
+ mutation DeleteApplication($id: ID!) {
271336
+ deleteApplication(id: $id) {
271337
+ ...Application
271447
271338
  }
271339
+ }
271448
271340
  `, [ApplicationFragment]);
271449
271341
  var applicationList = (gqlClient, options) => {
271450
- return async (workspaceUniqueName) => {
271342
+ return async (workspaceId) => {
271343
+ const id = validate3(IdSchema3, workspaceId);
271451
271344
  const {
271452
- workspaceByUniqueName: { applications }
271453
- } = await gqlClient.request(listApplications, { workspaceUniqueName });
271345
+ workspace: { applications }
271346
+ } = await gqlClient.request(listApplications, { workspaceId: id });
271454
271347
  return applications;
271455
271348
  };
271456
271349
  };
271457
271350
  var applicationRead = (gqlClient, options) => {
271458
- return async (applicationUniqueName) => {
271459
- const { applicationByUniqueName: application } = await gqlClient.request(readApplication, {
271460
- applicationUniqueName
271461
- });
271351
+ return async (applicationId) => {
271352
+ const id = validate3(IdSchema3, applicationId);
271353
+ const { application } = await gqlClient.request(readApplication, { id });
271462
271354
  return application;
271463
271355
  };
271464
271356
  };
271465
271357
  var applicationCreate = (gqlClient, options) => {
271466
271358
  return async (args) => {
271467
- const { workspaceUniqueName, ...otherArgs } = args;
271468
- const workspace = await workspaceRead(gqlClient, options)(workspaceUniqueName);
271469
- const { createApplication: application } = await gqlClient.request(createApplication, {
271470
- ...otherArgs,
271471
- workspaceId: workspace.id
271472
- });
271359
+ const { createApplication: application } = await gqlClient.request(createApplication, args);
271473
271360
  return application;
271474
271361
  };
271475
271362
  };
271476
271363
  var applicationDelete = (gqlClient, options) => {
271477
- return async (applicationUniqueName) => {
271478
- const applicationToDelete = await applicationRead(gqlClient, options)(applicationUniqueName);
271479
- const { deleteApplication: application } = await gqlClient.request(deleteApplication, {
271480
- id: applicationToDelete.id
271481
- });
271364
+ return async (applicationId) => {
271365
+ const id = validate3(IdSchema3, applicationId);
271366
+ const { deleteApplication: application } = await gqlClient.request(deleteApplication, { id });
271482
271367
  return application;
271483
271368
  };
271484
271369
  };
271485
- var createApplicationAccessToken = graphql(`
271486
- mutation CreateApplicationAccessToken(
271487
- $applicationId: ID!,
271488
- $blockchainNetworkScope: BlockchainNetworkScopeInputType!,
271489
- $blockchainNodeScope: BlockchainNodeScopeInputType!,
271490
- $customDeploymentScope: CustomDeploymentScopeInputType!,
271491
- $insightsScope: InsightsScopeInputType!,
271492
- $integrationScope: IntegrationScopeInputType!,
271493
- $loadBalancerScope: LoadBalancerScopeInputType!,
271494
- $middlewareScope: MiddlewareScopeInputType!,
271495
- $name: String!,
271496
- $privateKeyScope: PrivateKeyScopeInputType!,
271497
- $smartContractSetScope: SmartContractSetScopeInputType!,
271498
- $storageScope: StorageScopeInputType!,
271499
- $validityPeriod: AccessTokenValidityPeriod!
271500
- ) {
271501
- createApplicationAccessToken(
271502
- applicationId: $applicationId,
271503
- blockchainNetworkScope: $blockchainNetworkScope,
271504
- blockchainNodeScope: $blockchainNodeScope,
271505
- customDeploymentScope: $customDeploymentScope,
271506
- insightsScope: $insightsScope,
271507
- integrationScope: $integrationScope,
271508
- loadBalancerScope: $loadBalancerScope,
271509
- middlewareScope: $middlewareScope,
271510
- name: $name,
271511
- privateKeyScope: $privateKeyScope,
271512
- smartContractSetScope: $smartContractSetScope,
271513
- storageScope: $storageScope,
271514
- validityPeriod: $validityPeriod
271515
- ) {
271516
- token
271517
- }
271518
- }
271519
- `, []);
271520
- var applicationAccessTokenCreate = (gqlClient, options) => {
271521
- return async (args) => {
271522
- const { applicationUniqueName, ...otherArgs } = args;
271523
- const application = await applicationRead(gqlClient, options)(applicationUniqueName);
271524
- const { createApplicationAccessToken: applicationAccessToken } = await gqlClient.request(createApplicationAccessToken, {
271525
- ...otherArgs,
271526
- applicationId: application.id
271527
- });
271528
- if (!applicationAccessToken.token) {
271529
- throw new Error("Failed to create application access token");
271530
- }
271531
- return applicationAccessToken.token;
271532
- };
271533
- };
271534
271370
  function setClusterServiceDefaults(args) {
271535
271371
  return {
271536
271372
  ...args,
@@ -271557,34 +271393,31 @@ var BlockchainNetworkFragment = graphql(`
271557
271393
  fragment BlockchainNetwork on BlockchainNetwork {
271558
271394
  __typename
271559
271395
  id
271560
- uniqueName
271561
271396
  name
271562
271397
  status
271563
271398
  blockchainNodes {
271564
271399
  ... on BlockchainNode {
271565
271400
  id
271566
271401
  name
271567
- uniqueName
271568
271402
  }
271569
271403
  }
271570
271404
  }
271571
271405
  `);
271572
271406
  var getBlockchainNetworks = graphql(`
271573
- query getBlockchainNetworks($applicationUniqueName: String!) {
271574
- blockchainNetworksByUniqueName(applicationUniqueName: $applicationUniqueName) {
271575
- items {
271576
- ...BlockchainNetwork
271577
- }
271578
- }
271407
+ query getBlockchainNetworks($id: ID!) {
271408
+ blockchainNetworks(applicationId: $id) {
271409
+ items {
271410
+ ...BlockchainNetwork
271579
271411
  }
271580
- `, [BlockchainNetworkFragment]);
271412
+ }
271413
+ }`, [BlockchainNetworkFragment]);
271581
271414
  var getBlockchainNetwork = graphql(`
271582
- query getBlockchainNetwork($uniqueName: String!) {
271583
- blockchainNetworkByUniqueName(uniqueName: $uniqueName) {
271584
- ...BlockchainNetwork
271585
- }
271415
+ query getBlockchainNetwork($id: ID!) {
271416
+ blockchainNetwork(entityId: $id) {
271417
+ ...BlockchainNetwork
271586
271418
  }
271587
- `, [BlockchainNetworkFragment]);
271419
+ }
271420
+ `, [BlockchainNetworkFragment]);
271588
271421
  var createBlockchainNetwork = graphql(`
271589
271422
  mutation createBlockchainNetwork(
271590
271423
  $applicationId: ID!
@@ -271645,67 +271478,65 @@ var createBlockchainNetwork = graphql(`
271645
271478
  ...BlockchainNetwork
271646
271479
  }
271647
271480
  }
271648
- `, [BlockchainNetworkFragment]);
271481
+ `, [BlockchainNetworkFragment]);
271649
271482
  var deleteBlockchainNetwork = graphql(`
271650
- mutation deleteBlockchainNetwork($uniqueName: String!) {
271651
- deleteBlockchainNetworkByUniqueName(uniqueName: $uniqueName) {
271483
+ mutation deleteBlockchainNetwork($blockchainNetworkId: ID!) {
271484
+ deleteBlockchainNetwork(entityId: $blockchainNetworkId) {
271652
271485
  ...BlockchainNetwork
271653
271486
  }
271654
271487
  }
271655
- `, [BlockchainNetworkFragment]);
271488
+ `, [BlockchainNetworkFragment]);
271656
271489
  var restartBlockchainNetwork = graphql(`
271657
- mutation RestartBlockchainNetwork($uniqueName: String!) {
271658
- restartBlockchainNetworkByUniqueName(uniqueName: $uniqueName) {
271490
+ mutation RestartBlockchainNetwork($id: ID!) {
271491
+ restartBlockchainNetwork(entityId: $id) {
271659
271492
  ...BlockchainNetwork
271660
271493
  }
271661
271494
  }
271662
- `, [BlockchainNetworkFragment]);
271495
+ `, [BlockchainNetworkFragment]);
271663
271496
  var blockchainNetworkList = (gqlClient, options) => {
271664
- return async (applicationUniqueName) => {
271497
+ return async (applicationId) => {
271498
+ const id = validate3(IdSchema3, applicationId);
271665
271499
  const {
271666
- blockchainNetworksByUniqueName: { items }
271667
- } = await gqlClient.request(getBlockchainNetworks, { applicationUniqueName });
271500
+ blockchainNetworks: { items }
271501
+ } = await gqlClient.request(getBlockchainNetworks, { id });
271668
271502
  return items;
271669
271503
  };
271670
271504
  };
271671
271505
  var blockchainNetworkRead = (gqlClient, options) => {
271672
- return async (blockchainNetworkUniqueName) => {
271673
- const { blockchainNetworkByUniqueName } = await gqlClient.request(getBlockchainNetwork, {
271674
- uniqueName: blockchainNetworkUniqueName
271675
- });
271676
- return blockchainNetworkByUniqueName;
271506
+ return async (blockchainNetworkId) => {
271507
+ const id = validate3(IdSchema3, blockchainNetworkId);
271508
+ const { blockchainNetwork } = await gqlClient.request(getBlockchainNetwork, { id });
271509
+ return blockchainNetwork;
271677
271510
  };
271678
271511
  };
271679
271512
  var blockchainNetworkCreate = (gqlClient, options) => {
271680
271513
  return async (args) => {
271681
- const { applicationUniqueName, ...otherArgs } = args;
271682
- const application = await applicationRead(gqlClient, options)(applicationUniqueName);
271683
- const blockchainNetworkArgs = setNetworkDefaults(otherArgs);
271684
- const { createBlockchainNetwork: blockchainNetwork } = await gqlClient.request(createBlockchainNetwork, {
271685
- ...blockchainNetworkArgs,
271686
- applicationId: application.id
271687
- });
271514
+ const blockchainNetworkArgs = setNetworkDefaults(args);
271515
+ validate3(IdSchema3, blockchainNetworkArgs.applicationId);
271516
+ const { createBlockchainNetwork: blockchainNetwork } = await gqlClient.request(createBlockchainNetwork, blockchainNetworkArgs);
271688
271517
  return blockchainNetwork;
271689
271518
  };
271690
271519
  };
271691
271520
  var blockchainNetworkDelete = (gqlClient, options) => {
271692
- return async (blockchainNetworkUniqueName) => {
271693
- const { deleteBlockchainNetworkByUniqueName: blockchainNetwork } = await gqlClient.request(deleteBlockchainNetwork, {
271694
- uniqueName: blockchainNetworkUniqueName
271521
+ return async (networkId) => {
271522
+ const id = validate3(IdSchema3, networkId);
271523
+ const { deleteBlockchainNetwork: blockchainNetwork } = await gqlClient.request(deleteBlockchainNetwork, {
271524
+ blockchainNetworkId: id
271695
271525
  });
271696
271526
  return blockchainNetwork;
271697
271527
  };
271698
271528
  };
271699
- var blockchainNetworkRestart = (gqlClient, _options) => async (blockchainNetworkUniqueName) => {
271700
- const { restartBlockchainNetworkByUniqueName: blockchainNetwork } = await gqlClient.request(restartBlockchainNetwork, { uniqueName: blockchainNetworkUniqueName });
271529
+ var blockchainNetworkRestart = (gqlClient, _options) => async (networkId) => {
271530
+ const id = validate3(IdSchema3, networkId);
271531
+ const { restartBlockchainNetwork: blockchainNetwork } = await gqlClient.request(restartBlockchainNetwork, { id });
271701
271532
  return blockchainNetwork;
271702
271533
  };
271703
271534
  var BlockchainNodeFragment = graphql(`
271704
271535
  fragment BlockchainNode on BlockchainNode {
271705
271536
  __typename
271706
271537
  id
271707
- uniqueName
271708
271538
  name
271539
+ uniqueName
271709
271540
  status
271710
271541
  endpoints {
271711
271542
  id
@@ -271721,7 +271552,6 @@ var BlockchainNodeFragment = graphql(`
271721
271552
  ... on AbstractClusterService {
271722
271553
  id
271723
271554
  name
271724
- uniqueName
271725
271555
  }
271726
271556
  }
271727
271557
  privateKeys {
@@ -271735,96 +271565,86 @@ var BlockchainNodeFragment = graphql(`
271735
271565
  }
271736
271566
  `);
271737
271567
  var getBlockchainNodes = graphql(`
271738
- query getBlockchainNodes($applicationUniqueName: String!) {
271739
- blockchainNodesByUniqueName(applicationUniqueName: $applicationUniqueName) {
271740
- items {
271741
- ...BlockchainNode
271742
- }
271743
- }
271744
- }
271745
- `, [BlockchainNodeFragment]);
271568
+ query getBlockchainNodes($id: ID!) {
271569
+ blockchainNodes(applicationId: $id) {
271570
+ items {
271571
+ ...BlockchainNode
271572
+ }
271573
+ }
271574
+ }`, [BlockchainNodeFragment]);
271746
271575
  var getBlockchainNode = graphql(`
271747
- query getBlockchainNode($uniqueName: String!) {
271748
- blockchainNodeByUniqueName(uniqueName: $uniqueName) {
271749
- ...BlockchainNode
271750
- }
271751
- }
271752
- `, [BlockchainNodeFragment]);
271576
+ query getBlockchainNode($id: ID!) {
271577
+ blockchainNode(entityId: $id) {
271578
+ ...BlockchainNode
271579
+ }
271580
+ }
271581
+ `, [BlockchainNodeFragment]);
271753
271582
  var createBlockchainNode = graphql(`
271754
- mutation createBlockchainNode(
271755
- $applicationId: ID!
271756
- $blockchainNetworkId: ID!
271757
- $name: String!
271758
- $provider: String!
271759
- $region: String!
271760
- $size: ClusterServiceSize
271761
- $type: ClusterServiceType
271762
- $nodeType: NodeType
271763
- $keyMaterial: ID
271583
+ mutation createBlockchainNode(
271584
+ $applicationId: ID!
271585
+ $blockchainNetworkId: ID!
271586
+ $name: String!
271587
+ $provider: String!
271588
+ $region: String!
271589
+ $size: ClusterServiceSize
271590
+ $type: ClusterServiceType
271591
+ $nodeType: NodeType
271592
+ $keyMaterial: ID
271593
+ ) {
271594
+ createBlockchainNode(
271595
+ applicationId: $applicationId
271596
+ blockchainNetworkId: $blockchainNetworkId
271597
+ name: $name
271598
+ provider: $provider
271599
+ region: $region
271600
+ size: $size
271601
+ type: $type
271602
+ nodeType: $nodeType
271603
+ keyMaterial: $keyMaterial
271764
271604
  ) {
271765
- createBlockchainNode(
271766
- applicationId: $applicationId
271767
- blockchainNetworkId: $blockchainNetworkId
271768
- name: $name
271769
- provider: $provider
271770
- region: $region
271771
- size: $size
271772
- type: $type
271773
- nodeType: $nodeType
271774
- keyMaterial: $keyMaterial
271775
- ) {
271776
- ...BlockchainNode
271777
- }
271778
- }
271779
- `, [BlockchainNodeFragment]);
271605
+ ...BlockchainNode
271606
+ }
271607
+ }
271608
+ `, [BlockchainNodeFragment]);
271780
271609
  var restartBlockchainNode = graphql(`
271781
- mutation RestartBlockchainNode($uniqueName: String!) {
271782
- restartBlockchainNodeByUniqueName(uniqueName: $uniqueName) {
271783
- ...BlockchainNode
271784
- }
271610
+ mutation RestartBlockchainNode($id: ID!) {
271611
+ restartBlockchainNode(entityId: $id) {
271612
+ ...BlockchainNode
271785
271613
  }
271786
- `, [BlockchainNodeFragment]);
271614
+ }
271615
+ `, [BlockchainNodeFragment]);
271787
271616
  var blockchainNodeList = (gqlClient, options) => {
271788
- return async (applicationUniqueName) => {
271617
+ return async (applicationId) => {
271618
+ const id = validate3(IdSchema3, applicationId);
271789
271619
  const {
271790
- blockchainNodesByUniqueName: { items }
271791
- } = await gqlClient.request(getBlockchainNodes, { applicationUniqueName });
271620
+ blockchainNodes: { items }
271621
+ } = await gqlClient.request(getBlockchainNodes, { id });
271792
271622
  return items;
271793
271623
  };
271794
271624
  };
271795
271625
  var blockchainNodeRead = (gqlClient, options) => {
271796
- return async (blockchainNodeUniqueName) => {
271797
- const { blockchainNodeByUniqueName } = await gqlClient.request(getBlockchainNode, {
271798
- uniqueName: blockchainNodeUniqueName
271799
- });
271800
- return blockchainNodeByUniqueName;
271626
+ return async (blockchainNodeId) => {
271627
+ const id = validate3(IdSchema3, blockchainNodeId);
271628
+ const { blockchainNode } = await gqlClient.request(getBlockchainNode, { id });
271629
+ return blockchainNode;
271801
271630
  };
271802
271631
  };
271803
271632
  var blockchainNodeCreate = (gqlClient, options) => {
271804
271633
  return async (args) => {
271805
- const { applicationUniqueName, blockchainNetworkUniqueName, ...otherArgs } = args;
271806
- const [application, blockchainNetwork] = await Promise.all([
271807
- applicationRead(gqlClient, options)(applicationUniqueName),
271808
- blockchainNetworkRead(gqlClient, options)(blockchainNetworkUniqueName)
271809
- ]);
271810
- const { createBlockchainNode: blockchainNode } = await gqlClient.request(createBlockchainNode, {
271811
- ...otherArgs,
271812
- applicationId: application.id,
271813
- blockchainNetworkId: blockchainNetwork.id
271814
- });
271634
+ validate3(IdSchema3, args.applicationId);
271635
+ validate3(IdSchema3, args.blockchainNetworkId);
271636
+ const { createBlockchainNode: blockchainNode } = await gqlClient.request(createBlockchainNode, args);
271815
271637
  return blockchainNode;
271816
271638
  };
271817
271639
  };
271818
- var blockchainNodeRestart = (gqlClient, _options) => async (blockchainNodeUniqueName) => {
271819
- const { restartBlockchainNodeByUniqueName: blockchainNode } = await gqlClient.request(restartBlockchainNode, {
271820
- uniqueName: blockchainNodeUniqueName
271821
- });
271640
+ var blockchainNodeRestart = (gqlClient, _options) => async (nodeId) => {
271641
+ const id = validate3(IdSchema3, nodeId);
271642
+ const { restartBlockchainNode: blockchainNode } = await gqlClient.request(restartBlockchainNode, { id });
271822
271643
  return blockchainNode;
271823
271644
  };
271824
271645
  var CustomDeploymentFragment = graphql(`
271825
271646
  fragment CustomDeployment on CustomDeployment {
271826
271647
  id
271827
- uniqueName
271828
271648
  name
271829
271649
  status
271830
271650
  endpoints {
@@ -271840,141 +271660,112 @@ var CustomDeploymentFragment = graphql(`
271840
271660
  }
271841
271661
  `);
271842
271662
  var getCustomDeployments = graphql(`
271843
- query getCustomDeployments($applicationUniqueName: String!) {
271844
- customDeploymentsByUniqueName(applicationUniqueName: $applicationUniqueName) {
271845
- items {
271846
- ...CustomDeployment
271847
- }
271848
- }
271663
+ query getCustomDeployments($id: ID!) {
271664
+ customDeployments(applicationId: $id) {
271665
+ items {
271666
+ ...CustomDeployment
271849
271667
  }
271850
- `, [CustomDeploymentFragment]);
271668
+ }
271669
+ }`, [CustomDeploymentFragment]);
271851
271670
  var getCustomDeployment = graphql(`
271852
- query getCustomDeployment($uniqueName: String!) {
271853
- customDeploymentByUniqueName(uniqueName: $uniqueName) {
271854
- ...CustomDeployment
271855
- }
271856
- }
271857
- `, [CustomDeploymentFragment]);
271671
+ query getCustomDeployment($id: ID!) {
271672
+ customDeployment(entityId: $id) {
271673
+ ...CustomDeployment
271674
+ }
271675
+ }
271676
+ `, [CustomDeploymentFragment]);
271858
271677
  var editCustomDeployment = graphql(`
271859
- mutation EditCustomDeployment($uniqueName: String!, $imageTag: String) {
271860
- editCustomDeploymentByUniqueName(uniqueName: $uniqueName, imageTag: $imageTag) {
271861
- ...CustomDeployment
271862
- }
271863
- }
271864
- `, [CustomDeploymentFragment]);
271678
+ mutation EditCustomDeployment($entityId: ID!, $imageTag: String) {
271679
+ editCustomDeployment(entityId: $entityId, imageTag: $imageTag) {
271680
+ ...CustomDeployment
271681
+ }
271682
+ }
271683
+ `, [CustomDeploymentFragment]);
271865
271684
  var createCustomDeployment = graphql(`
271866
- mutation CreateCustomDeployment(
271867
- $applicationId: ID!
271868
- $name: String!
271869
- $imageTag: String!
271870
- $imageName: String!
271871
- $imageRepository: String!
271872
- $environmentVariables: JSON
271873
- $port: Int!
271874
- $provider: String!
271875
- $region: String!
271876
- ) {
271877
- createCustomDeployment(
271878
- applicationId: $applicationId
271879
- name: $name
271880
- imageTag: $imageTag
271881
- imageName: $imageName
271882
- imageRepository: $imageRepository
271883
- port: $port
271884
- environmentVariables: $environmentVariables
271885
- provider: $provider
271886
- region: $region
271887
- ) {
271888
- ...CustomDeployment
271889
- }
271890
- }
271891
- `, [CustomDeploymentFragment]);
271685
+ mutation CreateCustomDeployment(
271686
+ $applicationId: ID!,
271687
+ $name: String!,
271688
+ $imageTag: String!,
271689
+ $imageName: String!,
271690
+ $imageRepository: String!,
271691
+ $environmentVariables: JSON,
271692
+ $port: Int!,
271693
+ $provider: String!,
271694
+ $region: String!
271695
+ ) {
271696
+ createCustomDeployment(
271697
+ applicationId: $applicationId,
271698
+ name: $name,
271699
+ imageTag: $imageTag,
271700
+ imageName: $imageName,
271701
+ imageRepository: $imageRepository,
271702
+ port: $port,
271703
+ environmentVariables: $environmentVariables,
271704
+ provider: $provider,
271705
+ region: $region
271706
+ ) {
271707
+ ...CustomDeployment
271708
+ }
271709
+ }
271710
+ `, [CustomDeploymentFragment]);
271892
271711
  var restartCustomDeployment = graphql(`
271893
- mutation RestartCustomDeployment($uniqueName: String!) {
271894
- restartCustomDeploymentByUniqueName(uniqueName: $uniqueName) {
271895
- ...CustomDeployment
271896
- }
271712
+ mutation RestartCustomDeployment($id: ID!) {
271713
+ restartCustomDeployment(entityId: $id) {
271714
+ ...CustomDeployment
271897
271715
  }
271898
- `, [CustomDeploymentFragment]);
271716
+ }
271717
+ `, [CustomDeploymentFragment]);
271899
271718
  var customdeploymentList = (gqlClient, options) => {
271900
- return async (applicationUniqueName) => {
271719
+ return async (applicationId) => {
271720
+ const id = validate3(IdSchema3, applicationId);
271901
271721
  const {
271902
- customDeploymentsByUniqueName: { items }
271903
- } = await gqlClient.request(getCustomDeployments, { applicationUniqueName });
271722
+ customDeployments: { items }
271723
+ } = await gqlClient.request(getCustomDeployments, { id });
271904
271724
  return items;
271905
271725
  };
271906
271726
  };
271907
271727
  var customdeploymentRead = (gqlClient, options) => {
271908
- return async (customDeploymentUniqueName) => {
271909
- const { customDeploymentByUniqueName: customDeployment } = await gqlClient.request(getCustomDeployment, {
271910
- uniqueName: customDeploymentUniqueName
271911
- });
271728
+ return async (customdeploymentId) => {
271729
+ const id = validate3(IdSchema3, customdeploymentId);
271730
+ const { customDeployment } = await gqlClient.request(getCustomDeployment, { id });
271912
271731
  return customDeployment;
271913
271732
  };
271914
271733
  };
271915
271734
  var customdeploymentUpdate = (gqlClient, options) => {
271916
- return async (customDeploymentUniqueName, imageTag) => {
271917
- const { editCustomDeploymentByUniqueName: cd } = await gqlClient.request(editCustomDeployment, {
271918
- uniqueName: customDeploymentUniqueName,
271919
- imageTag
271920
- });
271735
+ return async (customdeploymentId, imageTag) => {
271736
+ const id = validate3(IdSchema3, customdeploymentId);
271737
+ const { editCustomDeployment: cd } = await gqlClient.request(editCustomDeployment, { entityId: id, imageTag });
271921
271738
  return cd;
271922
271739
  };
271923
271740
  };
271924
271741
  var customdeploymentCreate = (gqlClient, options) => {
271925
271742
  return async (args) => {
271926
- const { applicationUniqueName, ...otherArgs } = args;
271927
- const application = await applicationRead(gqlClient, options)(applicationUniqueName);
271928
- const { createCustomDeployment: customDeployment } = await gqlClient.request(createCustomDeployment, {
271929
- ...otherArgs,
271930
- applicationId: application.id
271931
- });
271743
+ validate3(IdSchema3, args.applicationId);
271744
+ const { createCustomDeployment: customDeployment } = await gqlClient.request(createCustomDeployment, args);
271932
271745
  return customDeployment;
271933
271746
  };
271934
271747
  };
271935
- var customDeploymentRestart = (gqlClient, _options) => async (customDeploymentUniqueName) => {
271936
- const { restartCustomDeploymentByUniqueName: customDeployment } = await gqlClient.request(restartCustomDeployment, {
271937
- uniqueName: customDeploymentUniqueName
271938
- });
271748
+ var customDeploymentRestart = (gqlClient, _options) => async (deploymentId) => {
271749
+ const id = validate3(IdSchema3, deploymentId);
271750
+ const { restartCustomDeployment: customDeployment } = await gqlClient.request(restartCustomDeployment, { id });
271939
271751
  return customDeployment;
271940
271752
  };
271941
271753
  var getFoundryEnvConfig = graphql(`
271942
- query GetFoundryEnvConfig($blockchainNodeUniqueName: String!) {
271943
- foundryEnvConfigByUniqueName(blockchainNodeUniqueName: $blockchainNodeUniqueName)
271944
- }
271945
- `);
271946
- var getEnv = (gqlClient, _options) => {
271947
- return async (blockchainNodeUniqueName) => {
271948
- const { foundryEnvConfigByUniqueName } = await gqlClient.request(getFoundryEnvConfig, { blockchainNodeUniqueName });
271949
- return foundryEnvConfigByUniqueName;
271950
- };
271951
- };
271952
- var LoadBalancerFragment = graphql(`
271953
- fragment LoadBalancer on LoadBalancer {
271954
- id
271955
- uniqueName
271754
+ query getFoundryEnvConfig($blockchainNodeId: String!) {
271755
+ foundryEnvConfig(blockchainNodeId: $blockchainNodeId)
271956
271756
  }
271957
271757
  `);
271958
- var getLoadBalancer = graphql(`
271959
- query GetLoadBalancer($uniqueName: String!) {
271960
- loadBalancerByUniqueName(uniqueName: $uniqueName) {
271961
- ...LoadBalancer
271962
- }
271963
- }
271964
- `, [LoadBalancerFragment]);
271965
- var loadBalancerRead = (gqlClient, options) => {
271966
- return async (loadBalancerUniqueName) => {
271967
- const { loadBalancerByUniqueName: loadBalancer } = await gqlClient.request(getLoadBalancer, {
271968
- uniqueName: loadBalancerUniqueName
271969
- });
271970
- return loadBalancer;
271758
+ function getEnv(gqlClient, options) {
271759
+ return async (blockchainNodeId) => {
271760
+ validate3(IdSchema3, blockchainNodeId);
271761
+ const { foundryEnvConfig } = await gqlClient.request(getFoundryEnvConfig, { blockchainNodeId });
271762
+ return foundryEnvConfig;
271971
271763
  };
271972
- };
271764
+ }
271973
271765
  var InsightsFragment = graphql(`
271974
271766
  fragment Insights on Insights {
271975
271767
  __typename
271976
271768
  id
271977
- uniqueName
271978
271769
  name
271979
271770
  status
271980
271771
  insightsCategory
@@ -271991,97 +271782,86 @@ var InsightsFragment = graphql(`
271991
271782
  }
271992
271783
  `);
271993
271784
  var getInsights = graphql(`
271994
- query GetInsights($applicationUniqueName: String!) {
271995
- insightsListByUniqueName(applicationUniqueName: $applicationUniqueName) {
271996
- items {
271997
- ...Insights
271998
- }
271999
- }
271785
+ query getInsights($id: ID!) {
271786
+ insightsList(applicationId: $id) {
271787
+ items {
271788
+ ...Insights
272000
271789
  }
272001
- `, [InsightsFragment]);
271790
+ }
271791
+ }`, [InsightsFragment]);
272002
271792
  var getInsight = graphql(`
272003
- query GetInsight($uniqueName: String!) {
272004
- insightsByUniqueName(uniqueName: $uniqueName) {
272005
- ...Insights
272006
- }
272007
- }
272008
- `, [InsightsFragment]);
271793
+ query getInsights($id: ID!) {
271794
+ insights(entityId: $id) {
271795
+ ...Insights
271796
+ }
271797
+ }
271798
+ `, [InsightsFragment]);
272009
271799
  var createInsights = graphql(`
272010
- mutation CreateInsights(
272011
- $applicationId: ID!
272012
- $name: String!
272013
- $insightsCategory: InsightsCategory!
272014
- $provider: String!
272015
- $region: String!
272016
- $size: ClusterServiceSize
272017
- $type: ClusterServiceType
272018
- $blockchainNode: ID
272019
- $loadBalancer: ID
271800
+ mutation createInsights(
271801
+ $applicationId: ID!
271802
+ $name: String!
271803
+ $insightsCategory: InsightsCategory!
271804
+ $provider: String!
271805
+ $region: String!
271806
+ $size: ClusterServiceSize
271807
+ $type: ClusterServiceType
271808
+ $blockchainNode: ID
271809
+ $loadBalancer: ID
271810
+ ) {
271811
+ createInsights(
271812
+ applicationId: $applicationId
271813
+ name: $name
271814
+ insightsCategory: $insightsCategory
271815
+ provider: $provider
271816
+ region: $region
271817
+ size: $size
271818
+ type: $type
271819
+ blockchainNode: $blockchainNode
271820
+ loadBalancer: $loadBalancer
272020
271821
  ) {
272021
- createInsights(
272022
- applicationId: $applicationId
272023
- name: $name
272024
- insightsCategory: $insightsCategory
272025
- provider: $provider
272026
- region: $region
272027
- size: $size
272028
- type: $type
272029
- blockchainNode: $blockchainNode
272030
- loadBalancer: $loadBalancer
272031
- ) {
272032
- ...Insights
272033
- }
272034
- }
272035
- `, [InsightsFragment]);
271822
+ ...Insights
271823
+ }
271824
+ }
271825
+ `, [InsightsFragment]);
272036
271826
  var restartInsights = graphql(`
272037
- mutation RestartInsights($uniqueName: String!) {
272038
- restartInsightsByUniqueName(uniqueName: $uniqueName) {
272039
- ...Insights
272040
- }
271827
+ mutation RestartInsights($id: ID!) {
271828
+ restartInsights(entityId: $id) {
271829
+ ...Insights
272041
271830
  }
272042
- `, [InsightsFragment]);
271831
+ }
271832
+ `, [InsightsFragment]);
272043
271833
  var insightsList = (gqlClient, options) => {
272044
- return async (applicationUniqueName) => {
271834
+ return async (applicationId) => {
271835
+ const id = validate3(IdSchema3, applicationId);
272045
271836
  const {
272046
- insightsListByUniqueName: { items }
272047
- } = await gqlClient.request(getInsights, { applicationUniqueName });
271837
+ insightsList: { items }
271838
+ } = await gqlClient.request(getInsights, { id });
272048
271839
  return items;
272049
271840
  };
272050
271841
  };
272051
271842
  var insightsRead = (gqlClient, options) => {
272052
- return async (insightsUniqueName) => {
272053
- const { insightsByUniqueName: insights } = await gqlClient.request(getInsight, { uniqueName: insightsUniqueName });
271843
+ return async (insightsId) => {
271844
+ const id = validate3(IdSchema3, insightsId);
271845
+ const { insights } = await gqlClient.request(getInsight, { id });
272054
271846
  return insights;
272055
271847
  };
272056
271848
  };
272057
271849
  var insightsCreate = (gqlClient, options) => {
272058
271850
  return async (args) => {
272059
- const { applicationUniqueName, blockchainNodeUniqueName, loadBalancerUniqueName, ...otherArgs } = args;
272060
- const [application, blockchainNode, loadBalancer] = await Promise.all([
272061
- applicationRead(gqlClient, options)(applicationUniqueName),
272062
- blockchainNodeUniqueName ? blockchainNodeRead(gqlClient, options)(blockchainNodeUniqueName) : Promise.resolve(undefined),
272063
- loadBalancerUniqueName ? loadBalancerRead(gqlClient, options)(loadBalancerUniqueName) : Promise.resolve(undefined)
272064
- ]);
272065
- const { createInsights: insights } = await gqlClient.request(createInsights, {
272066
- ...otherArgs,
272067
- applicationId: application.id,
272068
- blockchainNode: blockchainNode?.id,
272069
- loadBalancer: loadBalancer?.id
272070
- });
271851
+ validate3(IdSchema3, args.applicationId);
271852
+ const { createInsights: insights } = await gqlClient.request(createInsights, args);
272071
271853
  return insights;
272072
271854
  };
272073
271855
  };
272074
- var insightsRestart = (gqlClient, _options) => async (insightsUniqueName) => {
272075
- const { restartInsightsByUniqueName: insights } = await gqlClient.request(restartInsights, {
272076
- uniqueName: insightsUniqueName
272077
- });
271856
+ var insightsRestart = (gqlClient, _options) => async (insightsId) => {
271857
+ const id = validate3(IdSchema3, insightsId);
271858
+ const { restartInsights: insights } = await gqlClient.request(restartInsights, { id });
272078
271859
  return insights;
272079
271860
  };
272080
271861
  var IntegrationFragment = graphql(`
272081
271862
  fragment Integration on Integration {
272082
271863
  __typename
272083
271864
  id
272084
- uniqueName
272085
271865
  name
272086
271866
  status
272087
271867
  integrationType
@@ -272098,184 +271878,82 @@ var IntegrationFragment = graphql(`
272098
271878
  }
272099
271879
  `);
272100
271880
  var getIntegrations = graphql(`
272101
- query GetIntegrations($applicationUniqueName: String!) {
272102
- integrationsByUniqueName(applicationUniqueName: $applicationUniqueName) {
272103
- items {
272104
- ...Integration
272105
- }
272106
- }
271881
+ query getIntegrations($id: ID!) {
271882
+ integrations(applicationId: $id) {
271883
+ items {
271884
+ ...Integration
272107
271885
  }
272108
- `, [IntegrationFragment]);
271886
+ }
271887
+ }`, [IntegrationFragment]);
272109
271888
  var getIntegration = graphql(`
272110
- query GetIntegration($uniqueName: String!) {
272111
- integrationByUniqueName(uniqueName: $uniqueName) {
272112
- ...Integration
272113
- }
272114
- }
272115
- `, [IntegrationFragment]);
271889
+ query getIntegration($id: ID!) {
271890
+ integration(entityId: $id) {
271891
+ ...Integration
271892
+ }
271893
+ }
271894
+ `, [IntegrationFragment]);
272116
271895
  var createIntegration = graphql(`
272117
- mutation CreateIntegration(
272118
- $applicationId: ID!
272119
- $name: String!
272120
- $integrationType: IntegrationType!
272121
- $provider: String!
272122
- $region: String!
272123
- $size: ClusterServiceSize
272124
- $type: ClusterServiceType
271896
+ mutation createIntegration(
271897
+ $applicationId: ID!
271898
+ $name: String!
271899
+ $integrationType: IntegrationType!
271900
+ $provider: String!
271901
+ $region: String!
271902
+ $size: ClusterServiceSize
271903
+ $type: ClusterServiceType
271904
+ ) {
271905
+ createIntegration(
271906
+ applicationId: $applicationId
271907
+ name: $name
271908
+ integrationType: $integrationType
271909
+ provider: $provider
271910
+ region: $region
271911
+ size: $size
271912
+ type: $type
272125
271913
  ) {
272126
- createIntegration(
272127
- applicationId: $applicationId
272128
- name: $name
272129
- integrationType: $integrationType
272130
- provider: $provider
272131
- region: $region
272132
- size: $size
272133
- type: $type
272134
- ) {
272135
- ...Integration
272136
- }
272137
- }
272138
- `, [IntegrationFragment]);
271914
+ ...Integration
271915
+ }
271916
+ }
271917
+ `, [IntegrationFragment]);
272139
271918
  var restartIntegrationTool = graphql(`
272140
- mutation RestartIntegrationTool($uniqueName: String!) {
272141
- restartIntegrationByUniqueName(uniqueName: $uniqueName) {
272142
- ...Integration
272143
- }
271919
+ mutation RestartIntegrationTool($id: ID!) {
271920
+ restartIntegration(entityId: $id) {
271921
+ ...Integration
272144
271922
  }
272145
- `, [IntegrationFragment]);
271923
+ }
271924
+ `, [IntegrationFragment]);
272146
271925
  var integrationToolList = (gqlClient, options) => {
272147
- return async (applicationUniqueName) => {
271926
+ return async (applicationId) => {
271927
+ const id = validate3(IdSchema3, applicationId);
272148
271928
  const {
272149
- integrationsByUniqueName: { items }
272150
- } = await gqlClient.request(getIntegrations, { applicationUniqueName });
271929
+ integrations: { items }
271930
+ } = await gqlClient.request(getIntegrations, { id });
272151
271931
  return items;
272152
271932
  };
272153
271933
  };
272154
271934
  var integrationToolRead = (gqlClient, options) => {
272155
- return async (integrationUniqueName) => {
272156
- const { integrationByUniqueName } = await gqlClient.request(getIntegration, { uniqueName: integrationUniqueName });
272157
- return integrationByUniqueName;
271935
+ return async (integrationId) => {
271936
+ const id = validate3(IdSchema3, integrationId);
271937
+ const { integration } = await gqlClient.request(getIntegration, { id });
271938
+ return integration;
272158
271939
  };
272159
271940
  };
272160
271941
  var integrationToolCreate = (gqlClient, options) => {
272161
271942
  return async (args) => {
272162
- const { applicationUniqueName, ...otherArgs } = args;
272163
- const application = await applicationRead(gqlClient, options)(applicationUniqueName);
272164
- const { createIntegration: integration } = await gqlClient.request(createIntegration, {
272165
- ...otherArgs,
272166
- applicationId: application.id
272167
- });
271943
+ validate3(IdSchema3, args.applicationId);
271944
+ const { createIntegration: integration } = await gqlClient.request(createIntegration, args);
272168
271945
  return integration;
272169
271946
  };
272170
271947
  };
272171
- var integrationToolRestart = (gqlClient, _options) => async (integrationUniqueName) => {
272172
- const { restartIntegrationByUniqueName: integration } = await gqlClient.request(restartIntegrationTool, {
272173
- uniqueName: integrationUniqueName
272174
- });
271948
+ var integrationToolRestart = (gqlClient, _options) => async (toolId) => {
271949
+ const id = validate3(IdSchema3, toolId);
271950
+ const { restartIntegration: integration } = await gqlClient.request(restartIntegrationTool, { id });
272175
271951
  return integration;
272176
271952
  };
272177
- var StorageFragment = graphql(`
272178
- fragment Storage on Storage {
272179
- __typename
272180
- id
272181
- uniqueName
272182
- name
272183
- status
272184
- storageProtocol
272185
- endpoints {
272186
- id
272187
- label
272188
- displayValue
272189
- }
272190
- credentials {
272191
- id
272192
- label
272193
- displayValue
272194
- }
272195
- }
272196
- `);
272197
- var getStorages = graphql(`
272198
- query GetStorages($applicationUniqueName: String!) {
272199
- storagesByUniqueName(applicationUniqueName: $applicationUniqueName) {
272200
- items {
272201
- ...Storage
272202
- }
272203
- }
272204
- }
272205
- `, [StorageFragment]);
272206
- var getStorage = graphql(`
272207
- query GetStorage($uniqueName: String!) {
272208
- storageByUniqueName(uniqueName: $uniqueName) {
272209
- ...Storage
272210
- }
272211
- }
272212
- `, [StorageFragment]);
272213
- var createStorage = graphql(`
272214
- mutation CreateStorage(
272215
- $applicationId: ID!
272216
- $name: String!
272217
- $storageProtocol: StorageProtocol!
272218
- $provider: String!
272219
- $region: String!
272220
- $size: ClusterServiceSize
272221
- $type: ClusterServiceType
272222
- ) {
272223
- createStorage(
272224
- applicationId: $applicationId
272225
- name: $name
272226
- storageProtocol: $storageProtocol
272227
- provider: $provider
272228
- region: $region
272229
- size: $size
272230
- type: $type
272231
- ) {
272232
- ...Storage
272233
- }
272234
- }
272235
- `, [StorageFragment]);
272236
- var restartStorage = graphql(`
272237
- mutation RestartStorage($uniqueName: String!) {
272238
- restartStorageByUniqueName(uniqueName: $uniqueName) {
272239
- ...Storage
272240
- }
272241
- }
272242
- `, [StorageFragment]);
272243
- var storageList = (gqlClient, options) => {
272244
- return async (applicationUniqueName) => {
272245
- const {
272246
- storagesByUniqueName: { items }
272247
- } = await gqlClient.request(getStorages, { applicationUniqueName });
272248
- return items;
272249
- };
272250
- };
272251
- var storageRead = (gqlClient, options) => {
272252
- return async (storageUniqueName) => {
272253
- const { storageByUniqueName: storage } = await gqlClient.request(getStorage, { uniqueName: storageUniqueName });
272254
- return storage;
272255
- };
272256
- };
272257
- var storageCreate = (gqlClient, options) => {
272258
- return async (args) => {
272259
- const { applicationUniqueName, ...otherArgs } = args;
272260
- const application = await applicationRead(gqlClient, options)(applicationUniqueName);
272261
- const { createStorage: storage } = await gqlClient.request(createStorage, {
272262
- ...otherArgs,
272263
- applicationId: application.id
272264
- });
272265
- return storage;
272266
- };
272267
- };
272268
- var storageRestart = (gqlClient, _options) => async (storageUniqueName) => {
272269
- const { restartStorageByUniqueName: storage } = await gqlClient.request(restartStorage, {
272270
- uniqueName: storageUniqueName
272271
- });
272272
- return storage;
272273
- };
272274
271953
  var MiddlewareFragment = graphql(`
272275
271954
  fragment Middleware on Middleware {
272276
271955
  __typename
272277
271956
  id
272278
- uniqueName
272279
271957
  name
272280
271958
  status
272281
271959
  interface
@@ -272304,196 +271982,489 @@ var MiddlewareFragment = graphql(`
272304
271982
  }
272305
271983
  `);
272306
271984
  var getMiddlewares = graphql(`
272307
- query GetMiddlewares($applicationUniqueName: String!, $noCache: Boolean = false) {
272308
- middlewaresByUniqueName(applicationUniqueName: $applicationUniqueName) {
272309
- items {
272310
- ...Middleware
272311
- }
272312
- }
271985
+ query getMiddlewares($id: ID!, $noCache: Boolean = false) {
271986
+ middlewares(applicationId: $id) {
271987
+ items {
271988
+ ...Middleware
272313
271989
  }
272314
- `, [MiddlewareFragment]);
271990
+ }
271991
+ }`, [MiddlewareFragment]);
272315
271992
  var getMiddleware = graphql(`
272316
- query GetMiddleware($uniqueName: String!, $noCache: Boolean = true) {
272317
- middlewareByUniqueName(uniqueName: $uniqueName) {
272318
- ...Middleware
272319
- }
272320
- }
272321
- `, [MiddlewareFragment]);
271993
+ query getMiddleware($id: ID!, $noCache: Boolean = true) {
271994
+ middleware(entityId: $id) {
271995
+ ...Middleware
271996
+ }
271997
+ }
271998
+ `, [MiddlewareFragment]);
272322
271999
  var createMiddleware = graphql(`
272323
- mutation CreateMiddleware(
272324
- $applicationId: ID!
272325
- $name: String!
272326
- $provider: String!
272327
- $region: String!
272328
- $size: ClusterServiceSize
272329
- $type: ClusterServiceType
272330
- $interface: MiddlewareType!
272331
- $storageId: ID
272332
- $blockchainNodeId: ID
272333
- $loadBalancerId: ID
272334
- $abis: [SmartContractPortalMiddlewareAbiInputDto!]
272335
- $includePredeployedAbis: [String!]
272336
- $noCache: Boolean = false
272000
+ mutation createMiddleware(
272001
+ $applicationId: ID!
272002
+ $name: String!
272003
+ $provider: String!
272004
+ $region: String!
272005
+ $size: ClusterServiceSize
272006
+ $type: ClusterServiceType
272007
+ $interface: MiddlewareType!
272008
+ $storageId: ID
272009
+ $smartContractSetId: ID
272010
+ $blockchainNodeId: ID
272011
+ $loadBalancerId: ID
272012
+ $abis: [SmartContractPortalMiddlewareAbiInputDto!]
272013
+ $includePredeployedAbis: [String!]
272014
+ $noCache: Boolean = false
272015
+ ) {
272016
+ createMiddleware(
272017
+ applicationId: $applicationId
272018
+ name: $name
272019
+ provider: $provider
272020
+ region: $region
272021
+ size: $size
272022
+ type: $type
272023
+ interface: $interface
272024
+ storageId: $storageId
272025
+ smartContractSetId: $smartContractSetId
272026
+ blockchainNodeId: $blockchainNodeId
272027
+ loadBalancerId: $loadBalancerId
272028
+ abis: $abis
272029
+ includePredeployedAbis: $includePredeployedAbis
272337
272030
  ) {
272338
- createMiddleware(
272339
- applicationId: $applicationId
272340
- name: $name
272341
- provider: $provider
272342
- region: $region
272343
- size: $size
272344
- type: $type
272345
- interface: $interface
272346
- storageId: $storageId
272347
- blockchainNodeId: $blockchainNodeId
272348
- loadBalancerId: $loadBalancerId
272349
- abis: $abis
272350
- includePredeployedAbis: $includePredeployedAbis
272351
- ) {
272352
- ...Middleware
272353
- }
272354
- }
272355
- `, [MiddlewareFragment]);
272031
+ ...Middleware
272032
+ }
272033
+ }
272034
+ `, [MiddlewareFragment]);
272356
272035
  var restartMiddleware = graphql(`
272357
- mutation RestartMiddleware($uniqueName: String!, $noCache: Boolean = false) {
272358
- restartMiddlewareByUniqueName(uniqueName: $uniqueName) {
272359
- ...Middleware
272360
- }
272036
+ mutation RestartMiddleware($id: ID!, $noCache: Boolean = false) {
272037
+ restartMiddleware(entityId: $id) {
272038
+ ...Middleware
272361
272039
  }
272362
- `, [MiddlewareFragment]);
272040
+ }
272041
+ `, [MiddlewareFragment]);
272363
272042
  var middlewareList = (gqlClient, options) => {
272364
- return async (applicationUniqueName) => {
272043
+ return async (applicationId) => {
272044
+ const id = validate3(IdSchema3, applicationId);
272365
272045
  const {
272366
- middlewaresByUniqueName: { items }
272367
- } = await gqlClient.request(getMiddlewares, { applicationUniqueName });
272046
+ middlewares: { items }
272047
+ } = await gqlClient.request(getMiddlewares, { id });
272368
272048
  return items;
272369
272049
  };
272370
272050
  };
272371
272051
  var middlewareRead = (gqlClient, options) => {
272372
- return async (middlewareUniqueName) => {
272373
- const { middlewareByUniqueName: middleware } = await gqlClient.request(getMiddleware, {
272374
- uniqueName: middlewareUniqueName
272375
- });
272052
+ return async (middlewareId) => {
272053
+ const id = validate3(IdSchema3, middlewareId);
272054
+ const { middleware } = await gqlClient.request(getMiddleware, { id });
272376
272055
  return middleware;
272377
272056
  };
272378
272057
  };
272379
272058
  var middlewareCreate = (gqlClient, options) => {
272380
272059
  return async (args) => {
272381
- const { applicationUniqueName, blockchainNodeUniqueName, loadBalancerUniqueName, storageUniqueName, ...otherArgs } = args;
272382
- const [application, blockchainNode, loadBalancer, storage] = await Promise.all([
272383
- applicationRead(gqlClient, options)(applicationUniqueName),
272384
- blockchainNodeUniqueName ? blockchainNodeRead(gqlClient, options)(blockchainNodeUniqueName) : Promise.resolve(undefined),
272385
- loadBalancerUniqueName ? loadBalancerRead(gqlClient, options)(loadBalancerUniqueName) : Promise.resolve(undefined),
272386
- storageUniqueName ? storageRead(gqlClient, options)(storageUniqueName) : Promise.resolve(undefined)
272387
- ]);
272388
- const { createMiddleware: middleware } = await gqlClient.request(createMiddleware, {
272389
- ...otherArgs,
272390
- applicationId: application.id,
272391
- blockchainNodeId: blockchainNode?.id,
272392
- loadBalancerId: loadBalancer?.id,
272393
- storageId: storage?.id
272394
- });
272060
+ validate3(IdSchema3, args.applicationId);
272061
+ const { createMiddleware: middleware } = await gqlClient.request(createMiddleware, args);
272395
272062
  return middleware;
272396
272063
  };
272397
272064
  };
272398
- var middlewareRestart = (gqlClient, _options) => async (middlewareUniqueName) => {
272399
- const { restartMiddlewareByUniqueName: middleware } = await gqlClient.request(restartMiddleware, {
272400
- uniqueName: middlewareUniqueName
272401
- });
272065
+ var middlewareRestart = (gqlClient, _options) => async (middlewareId) => {
272066
+ const id = validate3(IdSchema3, middlewareId);
272067
+ const { restartMiddleware: middleware } = await gqlClient.request(restartMiddleware, { id });
272402
272068
  return middleware;
272403
272069
  };
272404
272070
  var PrivateKeyFragment = graphql(`
272405
272071
  fragment PrivateKey on PrivateKey {
272406
272072
  __typename
272407
272073
  id
272408
- uniqueName
272409
272074
  name
272075
+ uniqueName
272410
272076
  privateKeyType
272411
272077
  status
272412
272078
  }
272413
272079
  `);
272414
272080
  var getPrivateKeys = graphql(`
272415
- query GetPrivateKeys($applicationUniqueName: String!) {
272416
- privateKeysByUniqueName(applicationUniqueName: $applicationUniqueName) {
272417
- items {
272418
- ...PrivateKey
272419
- }
272420
- }
272081
+ query getPrivateKeys($id: ID!) {
272082
+ privateKeys(applicationId: $id) {
272083
+ items {
272084
+ ...PrivateKey
272421
272085
  }
272422
- `, [PrivateKeyFragment]);
272086
+ }
272087
+ }`, [PrivateKeyFragment]);
272423
272088
  var getPrivateKey = graphql(`
272424
- query GetPrivateKey($uniqueName: String!) {
272425
- privateKeyByUniqueName(uniqueName: $uniqueName) {
272426
- ...PrivateKey
272427
- }
272428
- }
272429
- `, [PrivateKeyFragment]);
272089
+ query getPrivateKey($id: ID!) {
272090
+ privateKey(entityId: $id) {
272091
+ ...PrivateKey
272092
+ }
272093
+ }
272094
+ `, [PrivateKeyFragment]);
272430
272095
  var createPrivateKey = graphql(`
272431
- mutation CreatePrivateKey(
272432
- $applicationId: ID!
272433
- $name: String!
272434
- $privateKeyType: PrivateKeyType!
272435
- $provider: String!
272436
- $region: String!
272437
- $size: ClusterServiceSize
272438
- $type: ClusterServiceType
272439
- $blockchainNodes: [ID!]
272096
+ mutation CreatePrivateKey(
272097
+ $applicationId: ID!,
272098
+ $name: String!,
272099
+ $privateKeyType: PrivateKeyType!,
272100
+ $provider: String!
272101
+ $region: String!
272102
+ $size: ClusterServiceSize
272103
+ $type: ClusterServiceType
272104
+ $blockchainNodes: [ID!]
272105
+ ) {
272106
+ createPrivateKey(
272107
+ applicationId: $applicationId,
272108
+ name: $name,
272109
+ privateKeyType: $privateKeyType,
272110
+ provider: $provider,
272111
+ region: $region
272112
+ size: $size
272113
+ type: $type
272114
+ blockchainNodes: $blockchainNodes
272440
272115
  ) {
272441
- createPrivateKey(
272442
- applicationId: $applicationId
272443
- name: $name
272444
- privateKeyType: $privateKeyType
272445
- provider: $provider
272446
- region: $region
272447
- size: $size
272448
- type: $type
272449
- blockchainNodes: $blockchainNodes
272450
- ) {
272451
- ...PrivateKey
272452
- }
272453
- }
272454
- `, [PrivateKeyFragment]);
272116
+ ...PrivateKey
272117
+ }
272118
+ }
272119
+ `, [PrivateKeyFragment]);
272455
272120
  var restartPrivateKey = graphql(`
272456
- mutation RestartPrivateKey($uniqueName: String!) {
272457
- restartPrivateKeyByUniqueName(uniqueName: $uniqueName) {
272458
- ...PrivateKey
272459
- }
272121
+ mutation RestartPrivateKey($id: ID!) {
272122
+ restartPrivateKey(entityId: $id) {
272123
+ ...PrivateKey
272460
272124
  }
272461
- `, [PrivateKeyFragment]);
272125
+ }
272126
+ `, [PrivateKeyFragment]);
272462
272127
  var privateKeyList = (gqlClient, options) => {
272463
- return async (applicationUniqueName) => {
272128
+ return async (applicationId) => {
272129
+ const id = validate3(IdSchema3, applicationId);
272464
272130
  const {
272465
- privateKeysByUniqueName: { items }
272466
- } = await gqlClient.request(getPrivateKeys, { applicationUniqueName });
272131
+ privateKeys: { items }
272132
+ } = await gqlClient.request(getPrivateKeys, { id });
272467
272133
  return items;
272468
272134
  };
272469
272135
  };
272470
272136
  var privatekeyRead = (gqlClient, options) => {
272471
- return async (privateKeyUniqueName) => {
272472
- const { privateKeyByUniqueName: privateKey } = await gqlClient.request(getPrivateKey, {
272473
- uniqueName: privateKeyUniqueName
272474
- });
272137
+ return async (privatekeyId) => {
272138
+ const id = validate3(IdSchema3, privatekeyId);
272139
+ const { privateKey } = await gqlClient.request(getPrivateKey, { id });
272475
272140
  return privateKey;
272476
272141
  };
272477
272142
  };
272478
272143
  var privateKeyCreate = (gqlClient, options) => {
272479
272144
  return async (args) => {
272480
- const { applicationUniqueName, blockchainNodeUniqueNames, ...otherArgs } = args;
272481
- const application = await applicationRead(gqlClient, options)(applicationUniqueName);
272482
- const blockchainNodes = blockchainNodeUniqueNames ? await Promise.all(blockchainNodeUniqueNames.map((uniqueName) => blockchainNodeRead(gqlClient, options)(uniqueName))) : [];
272483
- const { createPrivateKey: privateKey } = await gqlClient.request(createPrivateKey, {
272484
- ...otherArgs,
272485
- applicationId: application.id,
272486
- blockchainNodes: blockchainNodes.map((node) => node?.id)
272487
- });
272145
+ validate3(IdSchema3, args.applicationId);
272146
+ const { createPrivateKey: privateKey } = await gqlClient.request(createPrivateKey, args);
272488
272147
  return privateKey;
272489
272148
  };
272490
272149
  };
272491
- var privateKeyRestart = (gqlClient, _options) => async (privateKeyUniqueName) => {
272492
- const { restartPrivateKeyByUniqueName: privateKey } = await gqlClient.request(restartPrivateKey, {
272493
- uniqueName: privateKeyUniqueName
272494
- });
272150
+ var privateKeyRestart = (gqlClient, _options) => async (keyId) => {
272151
+ const id = validate3(IdSchema3, keyId);
272152
+ const { restartPrivateKey: privateKey } = await gqlClient.request(restartPrivateKey, { id });
272495
272153
  return privateKey;
272496
272154
  };
272155
+ var SmartContractSetFragment = graphql(`
272156
+ fragment SmartContractSet on SmartContractSet {
272157
+ __typename
272158
+ id
272159
+ name
272160
+ application {
272161
+ id
272162
+ }
272163
+ status
272164
+ useCase
272165
+ user {
272166
+ id
272167
+ firstname
272168
+ lastname
272169
+ }
272170
+ }
272171
+ `);
272172
+ var getSmartContractSets = graphql(`
272173
+ query getSmartContractSets($id: ID!) {
272174
+ smartContractSets(applicationId: $id) {
272175
+ items {
272176
+ ...SmartContractSet
272177
+ }
272178
+ }
272179
+ }`, [SmartContractSetFragment]);
272180
+ var getSmartContractSet = graphql(`
272181
+ query getSmartContractSet($id: ID!) {
272182
+ smartContractSet(entityId: $id) {
272183
+ ...SmartContractSet
272184
+ }
272185
+ }`, [SmartContractSetFragment]);
272186
+ var createSmartContractSet = graphql(`
272187
+ mutation CreateSmartContractSet(
272188
+ $applicationId: ID!
272189
+ $name: String!
272190
+ $blockchainNodeId: ID!
272191
+ $useCase: String!
272192
+ $userId: ID
272193
+ $provider: String!
272194
+ $region: String!
272195
+ $size: ClusterServiceSize
272196
+ $type: ClusterServiceType
272197
+ ) {
272198
+ createSmartContractSet(
272199
+ applicationId: $applicationId,
272200
+ name: $name,
272201
+ blockchainNodeId: $blockchainNodeId
272202
+ useCase: $useCase
272203
+ userId: $userId
272204
+ provider: $provider,
272205
+ region: $region
272206
+ size: $size
272207
+ type: $type
272208
+ ) {
272209
+ ...SmartContractSet
272210
+ }
272211
+ }`, [SmartContractSetFragment]);
272212
+ var restartSmartContractSet = graphql(`
272213
+ mutation RestartSmartContractSet($entityId: ID!) {
272214
+ restartSmartContractSet(entityId: $entityId) {
272215
+ ...SmartContractSet
272216
+ }
272217
+ }`, [SmartContractSetFragment]);
272218
+ var smartContractSetList = (gqlClient, options) => {
272219
+ return async (applicationId) => {
272220
+ const id = validate3(IdSchema3, applicationId);
272221
+ const {
272222
+ smartContractSets: { items }
272223
+ } = await gqlClient.request(getSmartContractSets, { id });
272224
+ return items;
272225
+ };
272226
+ };
272227
+ var smartContractSetRead = (gqlClient, options) => {
272228
+ return async (smartContractSetId) => {
272229
+ const id = validate3(IdSchema3, smartContractSetId);
272230
+ const { smartContractSet } = await gqlClient.request(getSmartContractSet, { id });
272231
+ return smartContractSet;
272232
+ };
272233
+ };
272234
+ var smartContractSetCreate = (gqlClient, options) => {
272235
+ return async (args) => {
272236
+ validate3(IdSchema3, args.applicationId);
272237
+ validate3(IdSchema3, args.blockchainNodeId);
272238
+ if (typeof args.userId === "string") {
272239
+ validate3(IdSchema3, args.userId);
272240
+ }
272241
+ const { createSmartContractSet: smartContractSet } = await gqlClient.request(createSmartContractSet, args);
272242
+ return smartContractSet;
272243
+ };
272244
+ };
272245
+ var smartContractSetRestart = (gqlClient, _options) => async (smartContractSetId) => {
272246
+ const id = validate3(IdSchema3, smartContractSetId);
272247
+ const { restartSmartContractSet: smartContractSet } = await gqlClient.request(restartSmartContractSet, {
272248
+ entityId: id
272249
+ });
272250
+ return smartContractSet;
272251
+ };
272252
+ var StorageFragment = graphql(`
272253
+ fragment Storage on Storage {
272254
+ __typename
272255
+ id
272256
+ name
272257
+ status
272258
+ storageProtocol
272259
+ endpoints {
272260
+ id
272261
+ label
272262
+ displayValue
272263
+ }
272264
+ credentials {
272265
+ id
272266
+ label
272267
+ displayValue
272268
+ }
272269
+ }
272270
+ `);
272271
+ var getStorages = graphql(`
272272
+ query getStorages($id: ID!) {
272273
+ storages(applicationId: $id) {
272274
+ items {
272275
+ ...Storage
272276
+ }
272277
+ }
272278
+ }`, [StorageFragment]);
272279
+ var getStorage = graphql(`
272280
+ query getStorage($id: ID!) {
272281
+ storage(entityId: $id) {
272282
+ ...Storage
272283
+ }
272284
+ }
272285
+ `, [StorageFragment]);
272286
+ var createStorage = graphql(`
272287
+ mutation CreateStorage(
272288
+ $applicationId: ID!,
272289
+ $name: String!,
272290
+ $storageProtocol: StorageProtocol!,
272291
+ $provider: String!,
272292
+ $region: String!,
272293
+ $size: ClusterServiceSize
272294
+ $type: ClusterServiceType
272295
+ ) {
272296
+ createStorage(
272297
+ applicationId: $applicationId,
272298
+ name: $name,
272299
+ storageProtocol: $storageProtocol,
272300
+ provider: $provider,
272301
+ region: $region,
272302
+ size: $size,
272303
+ type: $type
272304
+ ) {
272305
+ ...Storage
272306
+ }
272307
+ }
272308
+ `, [StorageFragment]);
272309
+ var restartStorage = graphql(`
272310
+ mutation RestartStorage($id: ID!) {
272311
+ restartStorage(entityId: $id) {
272312
+ ...Storage
272313
+ }
272314
+ }
272315
+ `, [StorageFragment]);
272316
+ var storageList = (gqlClient, options) => {
272317
+ return async (applicationId) => {
272318
+ const id = validate3(IdSchema3, applicationId);
272319
+ const {
272320
+ storages: { items }
272321
+ } = await gqlClient.request(getStorages, { id });
272322
+ return items;
272323
+ };
272324
+ };
272325
+ var storageRead = (gqlClient, options) => {
272326
+ return async (storageId) => {
272327
+ const id = validate3(IdSchema3, storageId);
272328
+ const { storage } = await gqlClient.request(getStorage, { id });
272329
+ return storage;
272330
+ };
272331
+ };
272332
+ var storageCreate = (gqlClient, options) => {
272333
+ return async (args) => {
272334
+ validate3(IdSchema3, args.applicationId);
272335
+ const { createStorage: storage } = await gqlClient.request(createStorage, args);
272336
+ return storage;
272337
+ };
272338
+ };
272339
+ var storageRestart = (gqlClient, _options) => async (storageId) => {
272340
+ const id = validate3(IdSchema3, storageId);
272341
+ const { restartStorage: storage } = await gqlClient.request(restartStorage, { id });
272342
+ return storage;
272343
+ };
272344
+ var WorkspaceFragment = graphql(`
272345
+ fragment Workspace on Workspace {
272346
+ id
272347
+ name
272348
+ applications {
272349
+ ...Application
272350
+ }
272351
+ }
272352
+ `, [ApplicationFragment]);
272353
+ var getWorkspacesAndApplications = graphql(`
272354
+ query getWorkspacesAndApplications {
272355
+ workspaces {
272356
+ ...Workspace
272357
+ applications {
272358
+ ...Application
272359
+ }
272360
+ childWorkspaces {
272361
+ ...Workspace
272362
+ }
272363
+ }
272364
+ }
272365
+ `, [WorkspaceFragment, ApplicationFragment]);
272366
+ var getWorkspace = graphql(`
272367
+ query getWorkspace($id: ID!) {
272368
+ workspace(workspaceId: $id) {
272369
+ ...Workspace
272370
+ applications {
272371
+ ...Application
272372
+ }
272373
+ }
272374
+ }
272375
+ `, [WorkspaceFragment, ApplicationFragment]);
272376
+ var createWorkspace = graphql(`
272377
+ mutation CreateWorkspace(
272378
+ $addressLine1: String
272379
+ $addressLine2: String
272380
+ $city: String
272381
+ $companyName: String
272382
+ $country: String
272383
+ $name: String!
272384
+ $parentId: String
272385
+ $paymentMethodId: String
272386
+ $postalCode: String
272387
+ $taxIdType: String
272388
+ $taxIdValue: String
272389
+ ) {
272390
+ createWorkspace(
272391
+ addressLine1: $addressLine1
272392
+ addressLine2: $addressLine2
272393
+ city: $city
272394
+ companyName: $companyName
272395
+ country: $country
272396
+ name: $name
272397
+ parentId: $parentId
272398
+ paymentMethodId: $paymentMethodId
272399
+ postalCode: $postalCode
272400
+ taxIdType: $taxIdType
272401
+ taxIdValue: $taxIdValue
272402
+ ) {
272403
+ ...Workspace
272404
+ applications {
272405
+ ...Application
272406
+ }
272407
+ }
272408
+ }
272409
+ `, [WorkspaceFragment, ApplicationFragment]);
272410
+ var deleteWorkspace = graphql(`
272411
+ mutation deleteWorkspace($id: ID!) {
272412
+ deleteWorkspace(workspaceId: $id) {
272413
+ ...Workspace
272414
+ applications {
272415
+ ...Application
272416
+ }
272417
+ }
272418
+ }
272419
+ `, [WorkspaceFragment, ApplicationFragment]);
272420
+ var addCredits = graphql(`
272421
+ mutation addCredits($workspaceId: String!, $amount: Float!) {
272422
+ addCredits(workspaceId: $workspaceId, amount: $amount)
272423
+ }
272424
+ `);
272425
+ var workspaceList = (gqlClient, options) => {
272426
+ return async () => {
272427
+ const { workspaces } = await gqlClient.request(getWorkspacesAndApplications);
272428
+ const allWorkspaces = workspaces.reduce((acc, workspace) => {
272429
+ acc.push(workspace);
272430
+ if (workspace.childWorkspaces) {
272431
+ acc.push(...workspace.childWorkspaces);
272432
+ }
272433
+ return acc;
272434
+ }, []);
272435
+ return allWorkspaces.sort((a8, b4) => a8.name.localeCompare(b4.name));
272436
+ };
272437
+ };
272438
+ var workspaceRead = (gqlClient, options) => {
272439
+ return async (workspaceId) => {
272440
+ const id = validate3(IdSchema3, workspaceId);
272441
+ const { workspace } = await gqlClient.request(getWorkspace, { id });
272442
+ return workspace;
272443
+ };
272444
+ };
272445
+ var workspaceCreate = (gqlClient, options) => {
272446
+ return async (createWorkspaceArgs) => {
272447
+ const { createWorkspace: workspace } = await gqlClient.request(createWorkspace, createWorkspaceArgs);
272448
+ return workspace;
272449
+ };
272450
+ };
272451
+ var workspaceDelete = (gqlClient, options) => {
272452
+ return async (workspaceId) => {
272453
+ const id = validate3(IdSchema3, workspaceId);
272454
+ const { deleteWorkspace: workspace } = await gqlClient.request(deleteWorkspace, { id });
272455
+ return workspace;
272456
+ };
272457
+ };
272458
+ var workspaceAddCredits = (gqlClient, options) => {
272459
+ return async (workspaceId, amount) => {
272460
+ const id = validate3(IdSchema3, workspaceId);
272461
+ if (amount <= 0) {
272462
+ throw new Error("Credit amount must be a positive number");
272463
+ }
272464
+ const { addCredits: result } = await gqlClient.request(addCredits, { workspaceId: id, amount });
272465
+ return result;
272466
+ };
272467
+ };
272497
272468
  var ClientOptionsSchema = z3.object({
272498
272469
  accessToken: AccessTokenSchema3,
272499
272470
  instance: UrlSchema3
@@ -272595,6 +272566,12 @@ function createSettleMintClient(options) {
272595
272566
  update: customdeploymentUpdate(gqlClient, options),
272596
272567
  restart: customDeploymentRestart(gqlClient, options)
272597
272568
  },
272569
+ smartContractSet: {
272570
+ list: smartContractSetList(gqlClient, options),
272571
+ read: smartContractSetRead(gqlClient, options),
272572
+ create: smartContractSetCreate(gqlClient, options),
272573
+ restart: smartContractSetRestart(gqlClient, options)
272574
+ },
272598
272575
  foundry: {
272599
272576
  env: getEnv(gqlClient, options)
272600
272577
  },
@@ -272799,7 +272776,7 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
272799
272776
  }
272800
272777
  });
272801
272778
  const aat = await settlemint.applicationAccessToken.create({
272802
- applicationUniqueName: application.uniqueName,
272779
+ applicationId: application.id,
272803
272780
  name: name2,
272804
272781
  blockchainNetworkScope: {
272805
272782
  type: "ALL",
@@ -272864,7 +272841,7 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
272864
272841
 
272865
272842
  // src/commands/connect/application.prompt.ts
272866
272843
  async function applicationPrompt(env2, applications, accept) {
272867
- const defaultApplication = applications.find((application2) => application2.uniqueName === env2.SETTLEMINT_APPLICATION);
272844
+ const defaultApplication = applications.find((application2) => application2.id === env2.SETTLEMINT_APPLICATION);
272868
272845
  const defaultPossible = accept && defaultApplication;
272869
272846
  if (defaultPossible) {
272870
272847
  return defaultApplication;
@@ -272891,7 +272868,7 @@ async function blockchainNodePrompt(env2, nodes, accept) {
272891
272868
  if (nodes.length === 0) {
272892
272869
  return;
272893
272870
  }
272894
- const defaultNode = nodes.find((node2) => node2.uniqueName === env2.SETTLEMINT_BLOCKCHAIN_NODE) ?? (nodes.length === 1 ? nodes[0] : undefined);
272871
+ const defaultNode = nodes.find((node2) => node2.id === env2.SETTLEMINT_BLOCKCHAIN_NODE) ?? (nodes.length === 1 ? nodes[0] : undefined);
272895
272872
  const defaultPossible = accept;
272896
272873
  if (defaultPossible) {
272897
272874
  return defaultNode;
@@ -272919,7 +272896,7 @@ async function blockscoutPrompt(env2, insights, accept) {
272919
272896
  if (possible.length === 0) {
272920
272897
  return;
272921
272898
  }
272922
- const defaultBlockscout = insights.find((insight) => insight.uniqueName === env2.SETTLEMINT_BLOCKSCOUT) ?? (insights.length === 1 ? insights[0] : undefined);
272899
+ const defaultBlockscout = insights.find((insight) => insight.id === env2.SETTLEMINT_BLOCKSCOUT) ?? (insights.length === 1 ? insights[0] : undefined);
272923
272900
  const defaultPossible = accept;
272924
272901
  if (defaultPossible) {
272925
272902
  return defaultBlockscout;
@@ -272946,7 +272923,7 @@ async function customDeploymentPrompt(env2, customDeployments, accept) {
272946
272923
  if (customDeployments.length === 0) {
272947
272924
  return;
272948
272925
  }
272949
- const defaultCustomDeployment = customDeployments.find((customDeployment) => customDeployment.uniqueName === env2.SETTLEMINT_CUSTOM_DEPLOYMENT) ?? (customDeployments.length === 1 ? customDeployments[0] : undefined);
272926
+ const defaultCustomDeployment = customDeployments.find((customDeployment) => customDeployment.id === env2.SETTLEMINT_CUSTOM_DEPLOYMENT) ?? (customDeployments.length === 1 ? customDeployments[0] : undefined);
272950
272927
  const defaultPossible = accept;
272951
272928
  if (defaultPossible) {
272952
272929
  return defaultCustomDeployment;
@@ -272974,7 +272951,7 @@ async function hasuraPrompt(env2, integrations, accept) {
272974
272951
  if (possible.length === 0) {
272975
272952
  return;
272976
272953
  }
272977
- const defaultIntegration = possible.find((integration) => integration.uniqueName === env2.SETTLEMINT_HASURA) ?? (possible.length === 1 ? possible[0] : undefined);
272954
+ const defaultIntegration = possible.find((integration) => integration.id === env2.SETTLEMINT_HASURA) ?? (possible.length === 1 ? possible[0] : undefined);
272978
272955
  const defaultPossible = accept;
272979
272956
  if (defaultPossible) {
272980
272957
  return defaultIntegration;
@@ -273053,7 +273030,7 @@ async function ipfsPrompt(env2, storages, accept) {
273053
273030
  if (possible.length === 0) {
273054
273031
  return;
273055
273032
  }
273056
- const defaultStorage = possible.find((storage) => storage.uniqueName === env2.SETTLEMINT_IPFS) ?? (possible.length === 1 ? possible[0] : undefined);
273033
+ const defaultStorage = possible.find((storage) => storage.id === env2.SETTLEMINT_IPFS) ?? (possible.length === 1 ? possible[0] : undefined);
273057
273034
  const defaultPossible = accept;
273058
273035
  if (defaultPossible) {
273059
273036
  return defaultStorage;
@@ -273081,7 +273058,7 @@ async function minioPrompt(env2, storages, accept) {
273081
273058
  if (possible.length === 0) {
273082
273059
  return;
273083
273060
  }
273084
- const defaultStorage = possible.find((storage) => storage.uniqueName === env2.SETTLEMINT_MINIO) ?? (possible.length === 1 ? possible[0] : undefined);
273061
+ const defaultStorage = possible.find((storage) => storage.id === env2.SETTLEMINT_MINIO) ?? (possible.length === 1 ? possible[0] : undefined);
273085
273062
  const defaultPossible = accept;
273086
273063
  if (defaultPossible) {
273087
273064
  return defaultStorage;
@@ -273109,7 +273086,7 @@ async function portalPrompt(env2, middlewares, accept) {
273109
273086
  if (possible.length === 0) {
273110
273087
  return;
273111
273088
  }
273112
- const defaultMiddleware = possible.find((middleware2) => middleware2.uniqueName === env2.SETTLEMINT_PORTAL) ?? (possible.length === 1 ? possible[0] : undefined);
273089
+ const defaultMiddleware = possible.find((middleware2) => middleware2.id === env2.SETTLEMINT_PORTAL) ?? (possible.length === 1 ? possible[0] : undefined);
273113
273090
  const defaultPossible = accept;
273114
273091
  if (defaultPossible) {
273115
273092
  return defaultMiddleware;
@@ -273176,7 +273153,7 @@ async function theGraphPrompt(env2, middlewares, accept) {
273176
273153
  if (possible.length === 0) {
273177
273154
  return;
273178
273155
  }
273179
- const defaultMiddleware = possible.find((middleware2) => middleware2.uniqueName === env2.SETTLEMINT_THEGRAPH) ?? (possible.length === 1 ? possible[0] : undefined);
273156
+ const defaultMiddleware = possible.find((middleware2) => middleware2.id === env2.SETTLEMINT_THEGRAPH) ?? (possible.length === 1 ? possible[0] : undefined);
273180
273157
  const defaultPossible = accept;
273181
273158
  if (defaultPossible) {
273182
273159
  return defaultMiddleware;
@@ -273200,7 +273177,7 @@ async function theGraphPrompt(env2, middlewares, accept) {
273200
273177
 
273201
273178
  // src/commands/connect/workspace.prompt.ts
273202
273179
  async function workspacePrompt(env2, workspaces, accept) {
273203
- const defaultWorkspace = workspaces.find((workspace2) => workspace2.uniqueName === env2.SETTLEMINT_WORKSPACE);
273180
+ const defaultWorkspace = workspaces.find((workspace2) => workspace2.id === env2.SETTLEMINT_WORKSPACE);
273204
273181
  const defaultPossible = accept && defaultWorkspace;
273205
273182
  if (defaultPossible) {
273206
273183
  return defaultWorkspace;
@@ -273255,23 +273232,23 @@ function connectCommand() {
273255
273232
  await writeEnvSpinner(!!prod, {
273256
273233
  SETTLEMINT_ACCESS_TOKEN: aatToken,
273257
273234
  SETTLEMINT_INSTANCE: instance,
273258
- SETTLEMINT_WORKSPACE: workspace.uniqueName,
273259
- SETTLEMINT_APPLICATION: application.uniqueName,
273260
- SETTLEMINT_BLOCKCHAIN_NETWORK: blockchainNode?.blockchainNetwork?.uniqueName,
273261
- SETTLEMINT_BLOCKCHAIN_NODE: blockchainNode?.uniqueName,
273262
- SETTLEMINT_HASURA: hasura?.uniqueName,
273235
+ SETTLEMINT_WORKSPACE: workspace.id,
273236
+ SETTLEMINT_APPLICATION: application.id,
273237
+ SETTLEMINT_BLOCKCHAIN_NETWORK: blockchainNode?.blockchainNetwork?.id,
273238
+ SETTLEMINT_BLOCKCHAIN_NODE: blockchainNode?.id,
273239
+ SETTLEMINT_HASURA: hasura?.id,
273263
273240
  ...getHasuraEndpoints(hasura),
273264
- SETTLEMINT_THEGRAPH: thegraph?.uniqueName,
273241
+ SETTLEMINT_THEGRAPH: thegraph?.id,
273265
273242
  ...await getGraphEndpoint(thegraph, env2),
273266
273243
  ...getPortalEndpoints(portal),
273267
273244
  SETTLEMINT_HD_PRIVATE_KEY: hdPrivateKey?.uniqueName,
273268
- SETTLEMINT_MINIO: minio?.uniqueName,
273245
+ SETTLEMINT_MINIO: minio?.id,
273269
273246
  ...getMinioEndpoints(minio),
273270
- SETTLEMINT_IPFS: ipfs?.uniqueName,
273247
+ SETTLEMINT_IPFS: ipfs?.id,
273271
273248
  ...getIpfsEndpoints(ipfs),
273272
- SETTLEMINT_CUSTOM_DEPLOYMENT: cDeployment?.uniqueName,
273249
+ SETTLEMINT_CUSTOM_DEPLOYMENT: cDeployment?.id,
273273
273250
  SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT: cDeployment?.endpoints.find((endpoint) => endpoint.id.includes("internal"))?.displayValue,
273274
- SETTLEMINT_BLOCKSCOUT: blockscout?.uniqueName,
273251
+ SETTLEMINT_BLOCKSCOUT: blockscout?.id,
273275
273252
  ...getBlockscoutEndpoints(blockscout)
273276
273253
  });
273277
273254
  outro("Connected to SettleMint");
@@ -273281,7 +273258,7 @@ function connectCommand() {
273281
273258
  var package_default = {
273282
273259
  name: "@settlemint/sdk-cli",
273283
273260
  description: "SettleMint SDK, integrate SettleMint into your application with ease.",
273284
- version: "0.7.0-prbe45660",
273261
+ version: "0.7.0-prca66344",
273285
273262
  type: "module",
273286
273263
  private: false,
273287
273264
  license: "FSL-1.1-MIT",
@@ -273332,8 +273309,8 @@ var package_default = {
273332
273309
  "@inquirer/input": "4.1.0",
273333
273310
  "@inquirer/password": "4.0.3",
273334
273311
  "@inquirer/select": "4.0.3",
273335
- "@settlemint/sdk-js": "0.7.0-prbe45660",
273336
- "@settlemint/sdk-utils": "0.7.0-prbe45660",
273312
+ "@settlemint/sdk-js": "0.7.0-prca66344",
273313
+ "@settlemint/sdk-utils": "0.7.0-prca66344",
273337
273314
  "get-tsconfig": "4.8.1",
273338
273315
  giget: "1.2.3"
273339
273316
  },
@@ -274330,6 +274307,7 @@ var SETTLEMINT_CLIENT_MAP = {
274330
274307
  "blockchain node": "blockchainNode",
274331
274308
  "custom deployment": "customDeployment",
274332
274309
  "private key": "privateKey",
274310
+ "smart contract set": "smartContractSet",
274333
274311
  middleware: "middleware",
274334
274312
  "integration tool": "integrationTool",
274335
274313
  storage: "storage",
@@ -274341,7 +274319,7 @@ var SETTLEMINT_CLIENT_MAP = {
274341
274319
  async function waitForCompletion({
274342
274320
  settlemint,
274343
274321
  type: type4,
274344
- uniqueName,
274322
+ id,
274345
274323
  action,
274346
274324
  maxTimeout = 15 * 60 * 1000
274347
274325
  }) {
@@ -274360,7 +274338,7 @@ async function waitForCompletion({
274360
274338
  const startTime = Date.now();
274361
274339
  while (true) {
274362
274340
  try {
274363
- const resource = await service.read(uniqueName);
274341
+ const resource = await service.read(id);
274364
274342
  if (resource.status === "COMPLETED") {
274365
274343
  note(`${capitalizeFirstLetter(type4)} is ${getActionLabel(action)}`);
274366
274344
  return true;
@@ -274374,7 +274352,7 @@ async function waitForCompletion({
274374
274352
  note(`${capitalizeFirstLetter(type4)} is not ready yet (status: UNKNOWN)`);
274375
274353
  }
274376
274354
  if (Date.now() - startTime > maxTimeout) {
274377
- throw new Error(`Operation timed out after ${maxTimeout / 60000} minutes for ${type4} with unique name ${uniqueName}`);
274355
+ throw new Error(`Operation timed out after ${maxTimeout / 60000} minutes for ${type4} with id ${id}`);
274378
274356
  }
274379
274357
  await new Promise((resolve6) => setTimeout(resolve6, 5000));
274380
274358
  }
@@ -274431,7 +274409,7 @@ ${createExamples(examples)}`).argument("<name>", `The ${type4} name`).option("-a
274431
274409
  await waitForCompletion({
274432
274410
  settlemint,
274433
274411
  type: waitFor?.resourceType ?? type4,
274434
- uniqueName: waitFor?.uniqueName ?? result.uniqueName,
274412
+ id: waitFor?.id ?? result.id,
274435
274413
  action: "deploy"
274436
274414
  });
274437
274415
  if (waitFor) {
@@ -274451,10 +274429,10 @@ ${createExamples(examples)}`).argument("<name>", `The ${type4} name`).option("-a
274451
274429
  ...updatedEnv
274452
274430
  };
274453
274431
  if (isApplicationChanged && updatedEnv.SETTLEMINT_APPLICATION) {
274454
- newEnv.SETTLEMINT_WORKSPACE = (await settlemint.application.read(updatedEnv.SETTLEMINT_APPLICATION)).workspace.uniqueName;
274432
+ newEnv.SETTLEMINT_WORKSPACE = (await settlemint.application.read(updatedEnv.SETTLEMINT_APPLICATION)).workspace.id;
274455
274433
  }
274456
274434
  if (newEnv.SETTLEMINT_BLOCKCHAIN_NODE && newEnv.SETTLEMINT_BLOCKCHAIN_NODE !== env2.SETTLEMINT_BLOCKCHAIN_NODE) {
274457
- newEnv.SETTLEMINT_BLOCKCHAIN_NETWORK = (await settlemint.blockchainNode.read(newEnv.SETTLEMINT_BLOCKCHAIN_NODE)).blockchainNetwork.uniqueName;
274435
+ newEnv.SETTLEMINT_BLOCKCHAIN_NETWORK = (await settlemint.blockchainNode.read(newEnv.SETTLEMINT_BLOCKCHAIN_NODE)).blockchainNetwork.id;
274458
274436
  }
274459
274437
  await writeEnvSpinner(!!prod, newEnv);
274460
274438
  note(`${capitalizeFirstLetter(type4)} ${result.name} set as default`);
@@ -274471,8 +274449,8 @@ function blockchainNetworkBesuCreateCommand() {
274471
274449
  type: "blockchain network",
274472
274450
  alias: "b",
274473
274451
  execute: (cmd2, baseAction) => {
274474
- addClusterServiceArgs(cmd2).option("-a, --application <uniqueName>", "The unique name of the application to create the network in (defaults to application from env)").requiredOption("--node-name <name>", "Name of the node").option("--chain-id <chainId>", "The chain ID for the network", parseNumber).option("--contract-size-limit <limit>", "Maximum contract size limit", parseNumber).option("--evm-stack-size <size>", "EVM stack size", parseNumber).option("--gas-limit <limit>", "Block gas limit").option("--gas-price <price>", "Gas price in wei", parseNumber).option("--seconds-per-block <seconds>", "Block time in seconds", parseNumber).action(async (name2, {
274475
- application,
274452
+ addClusterServiceArgs(cmd2).option("-a, --application-id <applicationId>", "The application ID to create the network in (defaults to application from env)").requiredOption("--node-name <name>", "Name of the node").option("--chain-id <chainId>", "The chain ID for the network", parseNumber).option("--contract-size-limit <limit>", "Maximum contract size limit", parseNumber).option("--evm-stack-size <size>", "EVM stack size", parseNumber).option("--gas-limit <limit>", "Block gas limit").option("--gas-price <price>", "Gas price in wei", parseNumber).option("--seconds-per-block <seconds>", "Block time in seconds", parseNumber).action(async (name2, {
274453
+ applicationId,
274476
274454
  chainId,
274477
274455
  contractSizeLimit,
274478
274456
  evmStackSize,
@@ -274487,10 +274465,10 @@ function blockchainNetworkBesuCreateCommand() {
274487
274465
  ...defaultArgs
274488
274466
  }) => {
274489
274467
  return baseAction(defaultArgs, async (settlemint, env2) => {
274490
- const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
274468
+ const application = applicationId ?? env2.SETTLEMINT_APPLICATION;
274491
274469
  const result = await settlemint.blockchainNetwork.create({
274492
274470
  name: name2,
274493
- applicationUniqueName,
274471
+ applicationId: application,
274494
274472
  nodeName,
274495
274473
  consensusAlgorithm: "BESU_QBFT",
274496
274474
  chainId,
@@ -274514,8 +274492,8 @@ function blockchainNetworkBesuCreateCommand() {
274514
274492
  mapDefaultEnv: () => {
274515
274493
  return {
274516
274494
  SETTLEMINT_APPLICATION: application,
274517
- SETTLEMINT_BLOCKCHAIN_NETWORK: result.uniqueName,
274518
- SETTLEMINT_BLOCKCHAIN_NODE: blockchainNode?.uniqueName
274495
+ SETTLEMINT_BLOCKCHAIN_NETWORK: result.id,
274496
+ SETTLEMINT_BLOCKCHAIN_NODE: blockchainNode?.id
274519
274497
  };
274520
274498
  }
274521
274499
  };
@@ -274529,7 +274507,7 @@ function blockchainNetworkBesuCreateCommand() {
274529
274507
  },
274530
274508
  {
274531
274509
  description: "Create a Besu blockchain network in a different application",
274532
- command: "platform create blockchain-network besu my-network --application app-123 --node-name validator-1 --chain-id 12345 --gas-limit 10000000 --seconds-per-block 5"
274510
+ command: "platform create blockchain-network besu my-network --application-id 123456789 --node-name validator-1 --chain-id 12345 --gas-limit 10000000 --seconds-per-block 5"
274533
274511
  }
274534
274512
  ]
274535
274513
  });
@@ -274660,7 +274638,7 @@ function workspaceCreateCommand() {
274660
274638
  result,
274661
274639
  mapDefaultEnv: () => {
274662
274640
  return {
274663
- SETTLEMINT_WORKSPACE: result.uniqueName
274641
+ SETTLEMINT_WORKSPACE: result.id
274664
274642
  };
274665
274643
  }
274666
274644
  };
@@ -274691,11 +274669,10 @@ function applicationAccessTokenCreateCommand() {
274691
274669
  type: "application access token",
274692
274670
  alias: "aat",
274693
274671
  execute: (cmd2, baseAction) => {
274694
- cmd2.option("-a, --application <application>", "The application unique name to create the application access token for (defaults to application from env)").addOption(new Option("-v, --validity-period <period>", "The validity period for the token").choices(["DAYS_7", "DAYS_30", "DAYS_60", "DAYS_90", "NONE"]).default("DAYS_7")).action(async (name2, { application, validityPeriod, ...defaultArgs }) => {
274672
+ cmd2.option("-a, --application-id <applicationId>", "The application ID to create the application access token for (defaults to application from env)").addOption(new Option("-v, --validity-period <period>", "The validity period for the token").choices(["DAYS_7", "DAYS_30", "DAYS_60", "DAYS_90", "NONE"]).default("DAYS_7")).action(async (name2, { applicationId, validityPeriod, ...defaultArgs }) => {
274695
274673
  return baseAction(defaultArgs, async (settlemint, env2) => {
274696
- const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
274697
274674
  const aatToken = await settlemint.applicationAccessToken.create({
274698
- applicationUniqueName,
274675
+ applicationId: applicationId ?? env2.SETTLEMINT_APPLICATION,
274699
274676
  name: name2,
274700
274677
  blockchainNetworkScope: {
274701
274678
  type: "ALL",
@@ -274742,8 +274719,7 @@ function applicationAccessTokenCreateCommand() {
274742
274719
  return {
274743
274720
  result: {
274744
274721
  id: "",
274745
- name: name2,
274746
- uniqueName: ""
274722
+ name: name2
274747
274723
  },
274748
274724
  mapDefaultEnv: () => ({
274749
274725
  SETTLEMINT_ACCESS_TOKEN: aatToken
@@ -274776,17 +274752,18 @@ function applicationCreateCommand() {
274776
274752
  type: "application",
274777
274753
  alias: "a",
274778
274754
  execute: (cmd2, baseAction) => {
274779
- cmd2.option("-w, --workspace <workspace>", "The workspace unique name to create the application in (defaults to workspace from env)").action(async (name2, { workspace, ...defaultArgs }) => {
274755
+ cmd2.option("-w, --workspace-id <workspaceId>", "The workspace ID to create the application in (defaults to workspace from env)").action(async (name2, { workspaceId, ...defaultArgs }) => {
274780
274756
  return baseAction(defaultArgs, async (settlemint, env2) => {
274757
+ const workspace = workspaceId ?? env2.SETTLEMINT_WORKSPACE;
274781
274758
  const result = await settlemint.application.create({
274782
274759
  name: name2,
274783
- workspaceUniqueName: workspace ?? env2.SETTLEMINT_WORKSPACE
274760
+ workspaceId: workspace
274784
274761
  });
274785
274762
  return {
274786
274763
  result,
274787
274764
  mapDefaultEnv: () => {
274788
274765
  return {
274789
- SETTLEMINT_APPLICATION: result.uniqueName
274766
+ SETTLEMINT_APPLICATION: result.id
274790
274767
  };
274791
274768
  }
274792
274769
  };
@@ -274804,7 +274781,7 @@ function applicationCreateCommand() {
274804
274781
  },
274805
274782
  {
274806
274783
  description: "Create an application in a specific workspace",
274807
- command: "platform create application my-app --workspace my-workspace"
274784
+ command: "platform create application my-app --workspace-id 123456789"
274808
274785
  }
274809
274786
  ]
274810
274787
  });
@@ -274817,28 +274794,28 @@ function blockscoutInsightsCreateCommand() {
274817
274794
  type: "insights",
274818
274795
  alias: "bs",
274819
274796
  execute: (cmd2, baseAction) => {
274820
- addClusterServiceArgs(cmd2).option("--application <application>", "Application unique name").option("--load-balancer <loadBalancer>", "Load Balancer unique name (mutually exclusive with blockchain-node)").option("--blockchain-node <blockchainNode>", "Blockchain Node unique name (mutually exclusive with load-balancer)").action(async (name2, { application, provider, region, size, type: type4, blockchainNode, loadBalancer, ...defaultArgs }) => {
274797
+ addClusterServiceArgs(cmd2).option("--application-id <applicationId>", "Application ID").option("--load-balancer-id <loadBalancerId>", "Load Balancer ID (mutually exclusive with blockchain-node-id)").option("--blockchain-node-id <blockchainNodeId>", "Blockchain Node ID (mutually exclusive with load-balancer-id)").action(async (name2, { applicationId, provider, region, size, type: type4, blockchainNodeId, loadBalancerId, ...defaultArgs }) => {
274821
274798
  return baseAction(defaultArgs, async (settlemint, env2) => {
274822
- const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
274823
- const blockchainNodeUniqueName = loadBalancer ? undefined : blockchainNode ?? env2.SETTLEMINT_BLOCKCHAIN_NODE;
274824
- const loadBalancerUniqueName = blockchainNodeUniqueName ? undefined : loadBalancer ?? env2.SETTLEMINT_LOAD_BALANCER;
274799
+ const application = applicationId ?? env2.SETTLEMINT_APPLICATION;
274800
+ const blockchainNode = loadBalancerId ? undefined : blockchainNodeId ?? env2.SETTLEMINT_BLOCKCHAIN_NODE;
274801
+ const loadBalancer = loadBalancerId ?? (blockchainNode ? undefined : env2.SETTLEMINT_LOAD_BALANCER);
274825
274802
  const result = await settlemint.insights.create({
274826
274803
  name: name2,
274827
- applicationUniqueName,
274804
+ applicationId: application,
274828
274805
  insightsCategory: "BLOCKCHAIN_EXPLORER",
274829
274806
  provider,
274830
274807
  region,
274831
274808
  size,
274832
274809
  type: type4,
274833
- blockchainNodeUniqueName,
274834
- loadBalancerUniqueName
274810
+ blockchainNode,
274811
+ loadBalancer
274835
274812
  });
274836
274813
  return {
274837
274814
  result,
274838
274815
  mapDefaultEnv: async () => {
274839
274816
  return {
274840
274817
  SETTLEMINT_APPLICATION: application,
274841
- SETTLEMINT_BLOCKSCOUT: result.uniqueName,
274818
+ SETTLEMINT_BLOCKSCOUT: result.id,
274842
274819
  ...getBlockscoutEndpoints(result)
274843
274820
  };
274844
274821
  }
@@ -274853,7 +274830,7 @@ function blockscoutInsightsCreateCommand() {
274853
274830
  },
274854
274831
  {
274855
274832
  description: "Create a Blockscout insights service in a different application",
274856
- command: "platform create insights blockscout my-blockscout --application app-123"
274833
+ command: "platform create insights blockscout my-blockscout --application-id 123456789"
274857
274834
  }
274858
274835
  ]
274859
274836
  });
@@ -274873,12 +274850,12 @@ function hasuraIntegrationCreateCommand() {
274873
274850
  type: "integration tool",
274874
274851
  alias: "ha",
274875
274852
  execute: (cmd2, baseAction) => {
274876
- addClusterServiceArgs(cmd2).option("--application <application>", "Application unique name").action(async (name2, { application, provider, region, size, type: type4, ...defaultArgs }) => {
274853
+ addClusterServiceArgs(cmd2).option("--application-id <applicationId>", "Application ID").action(async (name2, { applicationId, provider, region, size, type: type4, ...defaultArgs }) => {
274877
274854
  return baseAction(defaultArgs, async (settlemint, env2) => {
274878
- const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
274855
+ const application = applicationId ?? env2.SETTLEMINT_APPLICATION;
274879
274856
  const result = await settlemint.integrationTool.create({
274880
274857
  name: name2,
274881
- applicationUniqueName,
274858
+ applicationId: application,
274882
274859
  integrationType: "HASURA",
274883
274860
  provider,
274884
274861
  region,
@@ -274890,7 +274867,7 @@ function hasuraIntegrationCreateCommand() {
274890
274867
  mapDefaultEnv: async () => {
274891
274868
  return {
274892
274869
  SETTLEMINT_APPLICATION: application,
274893
- SETTLEMINT_HASURA: result.uniqueName,
274870
+ SETTLEMINT_HASURA: result.id,
274894
274871
  ...getHasuraEndpoints(result)
274895
274872
  };
274896
274873
  }
@@ -274905,7 +274882,7 @@ function hasuraIntegrationCreateCommand() {
274905
274882
  },
274906
274883
  {
274907
274884
  description: "Create a Hasura integration in a different application",
274908
- command: "platform create integration-tool hasura my-hasura --application app-123"
274885
+ command: "platform create integration-tool hasura my-hasura --application-id 123456789"
274909
274886
  }
274910
274887
  ]
274911
274888
  });
@@ -274925,15 +274902,17 @@ function graphMiddlewareCreateCommand() {
274925
274902
  type: "middleware",
274926
274903
  alias: "gr",
274927
274904
  execute: (cmd2, baseAction) => {
274928
- addClusterServiceArgs(cmd2).option("--application <application>", "Application unique name").option("--blockchain-node <blockchainNode>", "Blockchain Node unique name").action(async (name2, { application, blockchainNode, provider, region, size, type: type4, ...defaultArgs }) => {
274905
+ addClusterServiceArgs(cmd2).option("--application-id <applicationId>", "Application ID").option("--storage-id <storageId>", "Storage ID (IFPS)").option("--blockchain-node-id <blockchainNodeId>", "Blockchain Node ID").action(async (name2, { applicationId, storageId, blockchainNodeId, provider, region, size, type: type4, ...defaultArgs }) => {
274929
274906
  return baseAction(defaultArgs, async (settlemint, env2) => {
274930
- const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
274931
- const blockchainNodeUniqueName = blockchainNode ?? env2.SETTLEMINT_BLOCKCHAIN_NODE;
274907
+ const application = applicationId ?? env2.SETTLEMINT_APPLICATION;
274908
+ const blockchainNode = blockchainNodeId ?? env2.SETTLEMINT_BLOCKCHAIN_NODE;
274909
+ const storage = storageId ?? env2.SETTLEMINT_IPFS;
274932
274910
  const result = await settlemint.middleware.create({
274933
274911
  name: name2,
274934
- applicationUniqueName,
274912
+ applicationId: application,
274935
274913
  interface: "HA_GRAPH",
274936
- blockchainNodeUniqueName,
274914
+ storageId: storage,
274915
+ blockchainNodeId: blockchainNode,
274937
274916
  provider,
274938
274917
  region,
274939
274918
  size,
@@ -274942,11 +274921,11 @@ function graphMiddlewareCreateCommand() {
274942
274921
  return {
274943
274922
  result,
274944
274923
  mapDefaultEnv: async () => {
274945
- const graphMiddleware = await settlemint.middleware.read(result.uniqueName);
274924
+ const resource = await settlemint.middleware.read(result.id);
274946
274925
  return {
274947
274926
  SETTLEMINT_APPLICATION: application,
274948
- SETTLEMINT_THEGRAPH: result.uniqueName,
274949
- ...await getGraphEndpoint(graphMiddleware, env2)
274927
+ SETTLEMINT_THEGRAPH: result.id,
274928
+ ...await getGraphEndpoint(resource, env2)
274950
274929
  };
274951
274930
  }
274952
274931
  };
@@ -274960,7 +274939,7 @@ function graphMiddlewareCreateCommand() {
274960
274939
  },
274961
274940
  {
274962
274941
  description: "Create a graph middleware in a different application",
274963
- command: "platform create middleware graph my-graph --application my-app --blockchain-node node-123"
274942
+ command: "platform create middleware graph my-graph --application-id 123456789 --blockchain-node-id node-123 --storage-id storage-123"
274964
274943
  }
274965
274944
  ]
274966
274945
  });
@@ -274974,16 +274953,16 @@ function smartContractPortalMiddlewareCreateCommand() {
274974
274953
  type: "middleware",
274975
274954
  alias: "scp",
274976
274955
  execute: (cmd2, baseAction) => {
274977
- addClusterServiceArgs(cmd2).option("--application <application>", "Application unique name").option("--load-balancer <loadBalancer>", "Load Balancer unique name (mutually exclusive with blockchain-node)").option("--blockchain-node <blockchainNode>", "Blockchain Node unique name (mutually exclusive with load-balancer)").option("--abis <abis...>", "Path to abi file(s)").addOption(new Option("--include-predeployed-abis <includePredeployedAbis...>", "Include pre-deployed abis").choices([
274956
+ addClusterServiceArgs(cmd2).option("--application-id <applicationId>", "Application ID").option("--load-balancer-id <loadBalancerId>", "Load Balancer ID (mutually exclusive with blockchain-node-id)").option("--blockchain-node-id <blockchainNodeId>", "Blockchain Node ID (mutually exclusive with load-balancer-id)").option("--abis <abis...>", "Path to abi file(s)").addOption(new Option("--include-predeployed-abis <includePredeployedAbis...>", "Include pre-deployed abis").choices([
274978
274957
  "StarterKitERC20Registry",
274979
274958
  "StarterKitERC20Factory",
274980
274959
  "StarterKitERC20",
274981
274960
  "StarterKitERC20DexFactory",
274982
274961
  "StarterKitERC20Dex"
274983
274962
  ])).action(async (name2, {
274984
- application,
274985
- blockchainNode,
274986
- loadBalancer,
274963
+ applicationId,
274964
+ blockchainNodeId,
274965
+ loadBalancerId,
274987
274966
  provider,
274988
274967
  region,
274989
274968
  size,
@@ -274993,9 +274972,9 @@ function smartContractPortalMiddlewareCreateCommand() {
274993
274972
  ...defaultArgs
274994
274973
  }) => {
274995
274974
  return baseAction(defaultArgs, async (settlemint, env2) => {
274996
- const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
274997
- const blockchainNodeUniqueName = loadBalancer ? undefined : blockchainNode ?? env2.SETTLEMINT_BLOCKCHAIN_NODE;
274998
- const loadBalancerUniqueName = blockchainNodeUniqueName ? undefined : loadBalancer ?? env2.SETTLEMINT_LOAD_BALANCER;
274975
+ const application = applicationId ?? env2.SETTLEMINT_APPLICATION;
274976
+ const blockchainNode = loadBalancerId ? undefined : blockchainNodeId ?? env2.SETTLEMINT_BLOCKCHAIN_NODE;
274977
+ const loadBalancer = loadBalancerId ?? (blockchainNode ? undefined : env2.SETTLEMINT_LOAD_BALANCER);
274999
274978
  const parsedAbis = [];
275000
274979
  if (abis && abis.length > 0) {
275001
274980
  try {
@@ -275012,10 +274991,10 @@ function smartContractPortalMiddlewareCreateCommand() {
275012
274991
  }
275013
274992
  const result = await settlemint.middleware.create({
275014
274993
  name: name2,
275015
- applicationUniqueName,
274994
+ applicationId: application,
275016
274995
  interface: "SMART_CONTRACT_PORTAL",
275017
- blockchainNodeUniqueName,
275018
- loadBalancerUniqueName,
274996
+ blockchainNodeId: blockchainNode,
274997
+ loadBalancerId: loadBalancer,
275019
274998
  abis: parsedAbis,
275020
274999
  includePredeployedAbis,
275021
275000
  provider,
@@ -275028,7 +275007,7 @@ function smartContractPortalMiddlewareCreateCommand() {
275028
275007
  mapDefaultEnv: async () => {
275029
275008
  return {
275030
275009
  SETTLEMINT_APPLICATION: application,
275031
- SETTLEMINT_PORTAL: result.uniqueName,
275010
+ SETTLEMINT_PORTAL: result.id,
275032
275011
  ...getPortalEndpoints(result)
275033
275012
  };
275034
275013
  }
@@ -275043,7 +275022,7 @@ function smartContractPortalMiddlewareCreateCommand() {
275043
275022
  },
275044
275023
  {
275045
275024
  description: "Create a smart contract portal middleware in a different application",
275046
- command: "platform create middleware smart-contract-portal my-portal --application my-app --blockchain-node node-123"
275025
+ command: "platform create middleware smart-contract-portal my-portal --application-id 123456789 --blockchain-node-id node-123"
275047
275026
  }
275048
275027
  ]
275049
275028
  });
@@ -275061,15 +275040,14 @@ function privateKeyHdCreateCommand() {
275061
275040
  type: "private key",
275062
275041
  alias: "hd",
275063
275042
  execute: (cmd2, baseAction) => {
275064
- addClusterServiceArgs(cmd2).option("--application <application>", "Application unique name").option("--blockchain-node <blockchainNode>", "Blockchain Node unique name").action(async (name2, { application, blockchainNode, provider, region, size, type: type4, ...defaultArgs }) => {
275043
+ addClusterServiceArgs(cmd2).option("--application-id <applicationId>", "Application ID").option("--blockchain-node-id <blockchainNodeId>", "Blockchain Node ID").action(async (name2, { applicationId, blockchainNodeId, provider, region, size, type: type4, ...defaultArgs }) => {
275065
275044
  return baseAction(defaultArgs, async (settlemint, env2) => {
275066
- const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
275067
- const blockchainNodeUniqueName = blockchainNode ?? env2.SETTLEMINT_BLOCKCHAIN_NODE;
275045
+ const application = applicationId ?? env2.SETTLEMINT_APPLICATION;
275068
275046
  const result = await settlemint.privateKey.create({
275069
275047
  name: name2,
275070
- applicationUniqueName,
275048
+ applicationId: application,
275071
275049
  privateKeyType: "HD_ECDSA_P256",
275072
- blockchainNodeUniqueNames: blockchainNodeUniqueName ? [blockchainNodeUniqueName] : [],
275050
+ blockchainNodes: blockchainNodeId ? [blockchainNodeId] : [],
275073
275051
  provider,
275074
275052
  region,
275075
275053
  size,
@@ -275094,11 +275072,11 @@ function privateKeyHdCreateCommand() {
275094
275072
  },
275095
275073
  {
275096
275074
  description: "Create a private key in a different application",
275097
- command: "platform create private-key hd-ecdsa-p256 my-key --application my-app"
275075
+ command: "platform create private-key hd-ecdsa-p256 my-key --application-id 123456789"
275098
275076
  },
275099
275077
  {
275100
275078
  description: "Create a private key linked to a blockchain node",
275101
- command: "platform create private-key hd-ecdsa-p256 my-key --blockchain-node node-123"
275079
+ command: "platform create private-key hd-ecdsa-p256 my-key --blockchain-node-id node123"
275102
275080
  }
275103
275081
  ]
275104
275082
  });
@@ -275111,15 +275089,14 @@ function privateKeyHsmCreateCommand() {
275111
275089
  type: "private key",
275112
275090
  alias: "hd",
275113
275091
  execute: (cmd2, baseAction) => {
275114
- addClusterServiceArgs(cmd2).option("--application <application>", "Application unique name").option("--blockchain-node <blockchainNode>", "Blockchain Node unique name").action(async (name2, { application, blockchainNode, provider, region, size, type: type4, ...defaultArgs }) => {
275092
+ addClusterServiceArgs(cmd2).option("--application-id <applicationId>", "Application ID").option("--blockchain-node-id <blockchainNodeId>", "Blockchain Node ID").action(async (name2, { applicationId, blockchainNodeId, provider, region, size, type: type4, ...defaultArgs }) => {
275115
275093
  return baseAction(defaultArgs, async (settlemint, env2) => {
275116
- const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
275117
- const blockchainNodeUniqueName = blockchainNode ?? env2.SETTLEMINT_BLOCKCHAIN_NODE;
275094
+ const application = applicationId ?? env2.SETTLEMINT_APPLICATION;
275118
275095
  const result = await settlemint.privateKey.create({
275119
275096
  name: name2,
275120
- applicationUniqueName,
275097
+ applicationId: application,
275121
275098
  privateKeyType: "HSM_ECDSA_P256",
275122
- blockchainNodeUniqueNames: blockchainNodeUniqueName ? [blockchainNodeUniqueName] : [],
275099
+ blockchainNodes: blockchainNodeId ? [blockchainNodeId] : [],
275123
275100
  provider,
275124
275101
  region,
275125
275102
  size,
@@ -275138,11 +275115,11 @@ function privateKeyHsmCreateCommand() {
275138
275115
  },
275139
275116
  {
275140
275117
  description: "Create a private key in a different application",
275141
- command: "platform create private-key hsm-ecdsa-p256 my-key --application 123456789"
275118
+ command: "platform create private-key hsm-ecdsa-p256 my-key --application-id 123456789"
275142
275119
  },
275143
275120
  {
275144
275121
  description: "Create a private key linked to a blockchain node",
275145
- command: "platform create private-key hsm-ecdsa-p256 my-key --blockchain-node node-123"
275122
+ command: "platform create private-key hsm-ecdsa-p256 my-key --blockchain-node-id node123"
275146
275123
  }
275147
275124
  ]
275148
275125
  });
@@ -275160,12 +275137,12 @@ function ipfsStorageCreateCommand() {
275160
275137
  type: "storage",
275161
275138
  alias: "ip",
275162
275139
  execute: (cmd2, baseAction) => {
275163
- addClusterServiceArgs(cmd2).option("--application <application>", "Application unique name").action(async (name2, { application, provider, region, size, type: type4, ...defaultArgs }) => {
275140
+ addClusterServiceArgs(cmd2).option("--application-id <applicationId>", "Application ID").action(async (name2, { applicationId, provider, region, size, type: type4, ...defaultArgs }) => {
275164
275141
  return baseAction(defaultArgs, async (settlemint, env2) => {
275165
- const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
275142
+ const application = applicationId ?? env2.SETTLEMINT_APPLICATION;
275166
275143
  const result = await settlemint.storage.create({
275167
275144
  name: name2,
275168
- applicationUniqueName,
275145
+ applicationId: application,
275169
275146
  storageProtocol: "IPFS",
275170
275147
  provider,
275171
275148
  region,
@@ -275176,7 +275153,8 @@ function ipfsStorageCreateCommand() {
275176
275153
  result,
275177
275154
  mapDefaultEnv: () => {
275178
275155
  return {
275179
- SETTLEMINT_IPFS: result.uniqueName,
275156
+ SETTLEMINT_APPLICATION: application,
275157
+ SETTLEMINT_IPFS: result.id,
275180
275158
  ...getIpfsEndpoints(result)
275181
275159
  };
275182
275160
  }
@@ -275191,7 +275169,7 @@ function ipfsStorageCreateCommand() {
275191
275169
  },
275192
275170
  {
275193
275171
  description: "Create an IPFS storage in a different application",
275194
- command: "platform create storage ipfs my-storage --application app-123"
275172
+ command: "platform create storage ipfs my-storage --application-id app-123"
275195
275173
  }
275196
275174
  ]
275197
275175
  });
@@ -275204,12 +275182,12 @@ function minioStorageCreateCommand() {
275204
275182
  type: "storage",
275205
275183
  alias: "m",
275206
275184
  execute: (cmd2, baseAction) => {
275207
- addClusterServiceArgs(cmd2).option("--application <application>", "Application unique name").action(async (name2, { application, provider, region, size, type: type4, ...defaultArgs }) => {
275185
+ addClusterServiceArgs(cmd2).option("--application-id <applicationId>", "Application ID").action(async (name2, { applicationId, provider, region, size, type: type4, ...defaultArgs }) => {
275208
275186
  return baseAction(defaultArgs, async (settlemint, env2) => {
275209
- const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
275187
+ const application = applicationId ?? env2.SETTLEMINT_APPLICATION;
275210
275188
  const result = await settlemint.storage.create({
275211
275189
  name: name2,
275212
- applicationUniqueName,
275190
+ applicationId: application,
275213
275191
  storageProtocol: "MINIO",
275214
275192
  provider,
275215
275193
  region,
@@ -275221,7 +275199,7 @@ function minioStorageCreateCommand() {
275221
275199
  mapDefaultEnv: () => {
275222
275200
  return {
275223
275201
  SETTLEMINT_APPLICATION: application,
275224
- SETTLEMINT_MINIO: result.uniqueName,
275202
+ SETTLEMINT_MINIO: result.id,
275225
275203
  ...getMinioEndpoints(result)
275226
275204
  };
275227
275205
  }
@@ -275236,7 +275214,7 @@ function minioStorageCreateCommand() {
275236
275214
  },
275237
275215
  {
275238
275216
  description: "Create a MinIO storage in a different application",
275239
- command: "platform create storage minio my-storage --application app-123"
275217
+ command: "platform create storage minio my-storage --application-id app-123"
275240
275218
  }
275241
275219
  ]
275242
275220
  });
@@ -275282,11 +275260,11 @@ function getDeleteCommand({
275282
275260
  deleteFunction,
275283
275261
  usePersonalAccessToken = true
275284
275262
  }) {
275285
- return new Command2(sanitizeCommandName(name2)).alias(alias).description(`Delete a ${type4} in the SettleMint platform. Provide the ${type4} unique name or use 'default' to delete the default ${type4} from your .env file.
275263
+ return new Command2(sanitizeCommandName(name2)).alias(alias).description(`Delete a ${type4} in the SettleMint platform. Provide the ${type4} ID or use 'default' to delete the default ${type4} from your .env file.
275286
275264
  ${createExamples([
275287
275265
  {
275288
- description: `Deletes the specified ${type4} by unique name`,
275289
- command: `platform delete ${type4} <${type4}-unique-name>`
275266
+ description: `Deletes the specified ${type4} by id`,
275267
+ command: `platform delete ${type4} <${type4}-id>`
275290
275268
  },
275291
275269
  {
275292
275270
  description: `Deletes the default ${type4} in the production environment`,
@@ -275294,9 +275272,9 @@ ${createExamples([
275294
275272
  },
275295
275273
  {
275296
275274
  description: `Force deletes the specified ${type4} without confirmation`,
275297
- command: `platform delete ${type4} <${type4}-unique-name> --force`
275275
+ command: `platform delete ${type4} <${type4}-id> --force`
275298
275276
  }
275299
- ])}`).argument("<uniqueName>", `The unique name of the ${type4}, use 'default' to delete the default one from your .env file`).option("-a, --accept-defaults", "Accept the default and previously set values").option("--prod", "Connect to your production environment").option("-w, --wait", "Wait until destroyed").option("-f, --force", `Force delete the ${type4} without confirmation`).action(async (uniqueName, { acceptDefaults, prod, force, wait }) => {
275277
+ ])}`).argument("<id>", `The id of the ${type4}, use 'default' to delete the default one from your .env file`).option("-a, --accept-defaults", "Accept the default and previously set values").option("--prod", "Connect to your production environment").option("-w, --wait", "Wait until destroyed").option("-f, --force", `Force delete the ${type4} without confirmation`).action(async (id, { acceptDefaults, prod, force, wait }) => {
275300
275278
  intro(`Deleting ${type4} in the SettleMint platform`);
275301
275279
  if (!force) {
275302
275280
  await deleteConfirmationPrompt(`this ${type4}`);
@@ -275312,19 +275290,19 @@ ${createExamples([
275312
275290
  accessToken,
275313
275291
  instance
275314
275292
  });
275315
- const isDefaultUniqueName = uniqueName === "default";
275316
- const serviceUniqueName = isDefaultUniqueName ? typeof env2[envKey] === "string" ? env2[envKey] : null : uniqueName;
275317
- if (!serviceUniqueName) {
275293
+ const isDefaultId = id === "default";
275294
+ const serviceId = isDefaultId ? typeof env2[envKey] === "string" ? env2[envKey] : null : id;
275295
+ if (!serviceId) {
275318
275296
  throw new Error(`No default ${type4} found in your .env file. Please provide a valid ${type4} ID or set a default ${type4} first.`);
275319
275297
  }
275320
275298
  const result = await spinner({
275321
275299
  startMessage: `Deleting ${type4}`,
275322
275300
  task: async () => {
275323
- return deleteFunction(settlemint, serviceUniqueName);
275301
+ return deleteFunction(settlemint, serviceId);
275324
275302
  },
275325
275303
  stopMessage: `${capitalizeFirstLetter(type4)} deleted`
275326
275304
  });
275327
- if (isDefaultUniqueName) {
275305
+ if (isDefaultId) {
275328
275306
  const newEnv = {
275329
275307
  SETTLEMINT_ACCESS_TOKEN: usePersonalAccessToken ? env2.SETTLEMINT_ACCESS_TOKEN : accessToken,
275330
275308
  SETTLEMINT_INSTANCE: instance,
@@ -275334,7 +275312,7 @@ ${createExamples([
275334
275312
  note(`${capitalizeFirstLetter(type4)} removed as default`);
275335
275313
  }
275336
275314
  if (wait) {
275337
- await waitForCompletion({ settlemint, type: type4, uniqueName: serviceUniqueName, action: "destroy" });
275315
+ await waitForCompletion({ settlemint, type: type4, id: serviceId, action: "destroy" });
275338
275316
  }
275339
275317
  outro(`${capitalizeFirstLetter(type4)} ${result.name} deleted successfully`);
275340
275318
  });
@@ -275347,8 +275325,8 @@ function workspaceDeleteCommand() {
275347
275325
  type: "workspace",
275348
275326
  alias: "w",
275349
275327
  envKey: "SETTLEMINT_WORKSPACE",
275350
- deleteFunction: async (settlemint, uniqueName) => {
275351
- return settlemint.workspace.delete(uniqueName);
275328
+ deleteFunction: async (settlemint, id) => {
275329
+ return settlemint.workspace.delete(id);
275352
275330
  }
275353
275331
  });
275354
275332
  }
@@ -275397,7 +275375,7 @@ ${createExamples([
275397
275375
  description: `Restarts the default ${type4} in the production environment`,
275398
275376
  command: `platform restart ${commandName}${subType ? ` ${subType}` : ""} default --prod`
275399
275377
  }
275400
- ])}`).argument("<uniqueName>", `The unique name of the ${type4}, use 'default' to restart the default one from your .env file`).option("-a, --accept-defaults", "Accept the default and previously set values").option("--prod", "Connect to your production environment").option("-w, --wait", "Wait until restarted").action(async (uniqueName, { acceptDefaults, prod, wait }) => {
275378
+ ])}`).argument("<id>", `The id of the ${type4}, use 'default' to restart the default one from your .env file`).option("-a, --accept-defaults", "Accept the default and previously set values").option("--prod", "Connect to your production environment").option("-w, --wait", "Wait until restarted").action(async (id, { acceptDefaults, prod, wait }) => {
275401
275379
  intro(`Restarting ${type4} in the SettleMint platform`);
275402
275380
  const autoAccept = !!acceptDefaults || is_in_ci_default;
275403
275381
  const env2 = await loadEnv2(false, !!prod);
@@ -275410,20 +275388,20 @@ ${createExamples([
275410
275388
  accessToken,
275411
275389
  instance
275412
275390
  });
275413
- const isDefaultUniqueName = uniqueName === "default";
275414
- const serviceUniqueName = isDefaultUniqueName ? typeof env2[envKey] === "string" ? env2[envKey] : null : uniqueName;
275415
- if (!serviceUniqueName) {
275416
- throw new Error(`No default ${type4} found in your .env file. Please provide a valid ${type4} unique name or set a default ${type4} first.`);
275391
+ const isDefaultId = id === "default";
275392
+ const serviceId = isDefaultId ? typeof env2[envKey] === "string" ? env2[envKey] : null : id;
275393
+ if (!serviceId) {
275394
+ throw new Error(`No default ${type4} found in your .env file. Please provide a valid ${type4} ID or set a default ${type4} first.`);
275417
275395
  }
275418
275396
  const result = await spinner({
275419
275397
  startMessage: `Restarting ${type4}`,
275420
275398
  task: async () => {
275421
- return restartFunction(settlemint, serviceUniqueName);
275399
+ return restartFunction(settlemint, serviceId);
275422
275400
  },
275423
275401
  stopMessage: `${capitalizeFirstLetter(type4)} restart initiated`
275424
275402
  });
275425
275403
  if (wait) {
275426
- await waitForCompletion({ settlemint, type: type4, uniqueName: serviceUniqueName, action: "restart" });
275404
+ await waitForCompletion({ settlemint, type: type4, id: serviceId, action: "restart" });
275427
275405
  }
275428
275406
  outro(`${capitalizeFirstLetter(type4)} ${result.name} restart initiated successfully`);
275429
275407
  });
@@ -275436,8 +275414,8 @@ function blockchainNetworkRestartCommand() {
275436
275414
  type: "blockchain network",
275437
275415
  alias: "bn",
275438
275416
  envKey: "SETTLEMINT_BLOCKCHAIN_NETWORK",
275439
- restartFunction: async (settlemint, uniqueName) => {
275440
- return settlemint.blockchainNetwork.restart(uniqueName);
275417
+ restartFunction: async (settlemint, id) => {
275418
+ return settlemint.blockchainNetwork.restart(id);
275441
275419
  }
275442
275420
  });
275443
275421
  }
@@ -275449,8 +275427,8 @@ function customDeploymentRestartCommand() {
275449
275427
  type: "custom deployment",
275450
275428
  alias: "cd",
275451
275429
  envKey: "SETTLEMINT_CUSTOM_DEPLOYMENT",
275452
- restartFunction: async (settlemint, uniqueName) => {
275453
- return settlemint.customDeployment.restart(uniqueName);
275430
+ restartFunction: async (settlemint, id) => {
275431
+ return settlemint.customDeployment.restart(id);
275454
275432
  },
275455
275433
  usePersonalAccessToken: false
275456
275434
  });
@@ -275464,8 +275442,8 @@ function blockscoutRestartCommand() {
275464
275442
  subType: "blockscout",
275465
275443
  alias: "bs",
275466
275444
  envKey: "SETTLEMINT_BLOCKSCOUT",
275467
- restartFunction: async (settlemint, uniqueName) => {
275468
- return settlemint.insights.restart(uniqueName);
275445
+ restartFunction: async (settlemint, id) => {
275446
+ return settlemint.insights.restart(id);
275469
275447
  }
275470
275448
  });
275471
275449
  }
@@ -275483,8 +275461,8 @@ function hasuraRestartCommand() {
275483
275461
  subType: "hasura",
275484
275462
  alias: "ha",
275485
275463
  envKey: "SETTLEMINT_HASURA",
275486
- restartFunction: async (settlemint, uniqueName) => {
275487
- return settlemint.integrationTool.restart(uniqueName);
275464
+ restartFunction: async (settlemint, id) => {
275465
+ return settlemint.integrationTool.restart(id);
275488
275466
  }
275489
275467
  });
275490
275468
  }
@@ -275516,8 +275494,8 @@ function smartContractPortalRestartCommand() {
275516
275494
  subType: "smart-contract-portal",
275517
275495
  alias: "scp",
275518
275496
  envKey: "SETTLEMINT_PORTAL",
275519
- restartFunction: async (settlemint, uniqueName) => {
275520
- return settlemint.middleware.restart(uniqueName);
275497
+ restartFunction: async (settlemint, id) => {
275498
+ return settlemint.middleware.restart(id);
275521
275499
  }
275522
275500
  });
275523
275501
  }
@@ -275535,8 +275513,8 @@ function hdEcdsaP256RestartCommand() {
275535
275513
  subType: "hd-ecdsa-p256",
275536
275514
  alias: "hd",
275537
275515
  envKey: "SETTLEMINT_HD_PRIVATE_KEY",
275538
- restartFunction: async (settlemint, uniqueName) => {
275539
- return settlemint.privateKey.restart(uniqueName);
275516
+ restartFunction: async (settlemint, id) => {
275517
+ return settlemint.privateKey.restart(id);
275540
275518
  }
275541
275519
  });
275542
275520
  }
@@ -275553,8 +275531,8 @@ function ipfsRestartCommand() {
275553
275531
  type: "storage",
275554
275532
  alias: "ip",
275555
275533
  envKey: "SETTLEMINT_IPFS",
275556
- restartFunction: async (settlemint, uniqueName) => {
275557
- return settlemint.storage.restart(uniqueName);
275534
+ restartFunction: async (settlemint, id) => {
275535
+ return settlemint.storage.restart(id);
275558
275536
  }
275559
275537
  });
275560
275538
  }
@@ -275566,8 +275544,8 @@ function minioRestartCommand() {
275566
275544
  type: "storage",
275567
275545
  alias: "m",
275568
275546
  envKey: "SETTLEMINT_MINIO",
275569
- restartFunction: async (settlemint, uniqueName) => {
275570
- return settlemint.storage.restart(uniqueName);
275547
+ restartFunction: async (settlemint, id) => {
275548
+ return settlemint.storage.restart(id);
275571
275549
  }
275572
275550
  });
275573
275551
  }
@@ -275585,12 +275563,12 @@ function restartCommand() {
275585
275563
 
275586
275564
  // src/commands/platform/custom-deployments/update.ts
275587
275565
  function customDeploymentsUpdateCommand() {
275588
- return new Command2("custom-deployment").alias("custom-deployments").alias("cd").argument("<tag>", "The tag to update the custom deployment to").option("--unique-name <uniqueName>", "The unique name of the custom deployment to update. If not provided, will use SETTLEMINT_CUSTOM_DEPLOYMENT from env").option("--prod", "Connect to your production environment").option("--wait", "Wait for the custom deployment to be redeployed").description("Update a custom deployment in the SettleMint platform").action(async (tag, { uniqueName, prod, wait }) => {
275566
+ return new Command2("custom-deployment").alias("custom-deployments").alias("cd").argument("<tag>", "The tag to update the custom deployment to").option("--id <id>", "The ID of the custom deployment to update. If not provided, will use SETTLEMINT_CUSTOM_DEPLOYMENT from env").option("--prod", "Connect to your production environment").option("--wait", "Wait for the custom deployment to be redeployed").description("Update a custom deployment in the SettleMint platform").action(async (tag, { id, prod, wait }) => {
275589
275567
  intro("Updating custom deployment in the SettleMint platform");
275590
275568
  const env2 = await loadEnv2(false, !!prod);
275591
- const customDeploymentUniqueName = uniqueName ?? env2.SETTLEMINT_CUSTOM_DEPLOYMENT;
275592
- if (!customDeploymentUniqueName) {
275593
- throw new Error("No custom deployment unique name specified. Please provide it either via the --unique-name flag or by setting the SETTLEMINT_CUSTOM_DEPLOYMENT environment variable");
275569
+ const customDeploymentId = id ?? env2.SETTLEMINT_CUSTOM_DEPLOYMENT;
275570
+ if (!customDeploymentId) {
275571
+ throw new Error("No custom deployment ID specified. Please provide it either via the --id flag or by setting the SETTLEMINT_CUSTOM_DEPLOYMENT environment variable");
275594
275572
  }
275595
275573
  const accessToken = env2.SETTLEMINT_ACCESS_TOKEN;
275596
275574
  if (!accessToken) {
@@ -275604,17 +275582,12 @@ function customDeploymentsUpdateCommand() {
275604
275582
  const customDeployment = await spinner({
275605
275583
  startMessage: "Updating custom deployment",
275606
275584
  task: async () => {
275607
- return settlemint.customDeployment.update(customDeploymentUniqueName, tag);
275585
+ return settlemint.customDeployment.update(customDeploymentId, tag);
275608
275586
  },
275609
275587
  stopMessage: "Custom deployment updated"
275610
275588
  });
275611
275589
  if (wait) {
275612
- await waitForCompletion({
275613
- settlemint,
275614
- type: "custom deployment",
275615
- uniqueName: customDeployment.uniqueName,
275616
- action: "deploy"
275617
- });
275590
+ await waitForCompletion({ settlemint, type: "custom deployment", id: customDeployment.id, action: "deploy" });
275618
275591
  }
275619
275592
  outro(`${customDeployment.name} updated to ${tag}`);
275620
275593
  });
@@ -276003,7 +275976,7 @@ function isHardhatConfig(config4) {
276003
275976
 
276004
275977
  // src/commands/smart-contract-set/hardhat/deploy/remote.ts
276005
275978
  function hardhatDeployRemoteCommand() {
276006
- const cmd2 = new Command2("remote").description("Deploy the smart contracts using Hardhat/ignition to the remote network on the platform").option("-m, --module <ignitionmodule>", 'The module to deploy with Ignition, defaults to "ignition/modules/main.ts"').option("--deployment-id <deploymentId>", "Set the id of the deployment").option("-r, --reset", "Wipes the existing deployment state before deploying").option("-v, --verify", "Verify the deployment on Etherscan").option("--default-sender <defaultSender>", "Set the default sender for the deployment").option("--parameters <parameters>", "A relative path to a JSON file to use for the module parameters").option("--strategy <strategy>", `Set the deployment strategy to use (default: "basic")`).option("--blockchain-node <blockchainNode>", "Blockchain Node unique name (optional, defaults to the blockchain node in the environment)").option("--prod", "Connect to your production environment").option("-a, --accept-defaults", "Accept the default and previously set values");
275979
+ const cmd2 = new Command2("remote").description("Deploy the smart contracts using Hardhat/ignition to the remote network on the platform").option("-m, --module <ignitionmodule>", 'The module to deploy with Ignition, defaults to "ignition/modules/main.ts"').option("--deployment-id <deploymentId>", "Set the id of the deployment").option("-r, --reset", "Wipes the existing deployment state before deploying").option("-v, --verify", "Verify the deployment on Etherscan").option("--default-sender <defaultSender>", "Set the default sender for the deployment").option("--parameters <parameters>", "A relative path to a JSON file to use for the module parameters").option("--strategy <strategy>", `Set the deployment strategy to use (default: "basic")`).option("--blockchain-node-id <blockchainNodeId>", "Blockchain Node ID (optional, defaults to the blockchain node in the environment)").option("--prod", "Connect to your production environment").option("-a, --accept-defaults", "Accept the default and previously set values");
276007
275980
  cmd2.action(async ({
276008
275981
  module,
276009
275982
  reset: reset2,
@@ -276014,7 +275987,7 @@ function hardhatDeployRemoteCommand() {
276014
275987
  strategy,
276015
275988
  prod,
276016
275989
  acceptDefaults,
276017
- blockchainNode: blockchainNodeUniqueName
275990
+ blockchainNodeId
276018
275991
  }) => {
276019
275992
  const autoAccept = !!acceptDefaults || is_in_ci_default;
276020
275993
  const env2 = await loadEnv(false, !!prod);
@@ -276028,12 +276001,12 @@ function hardhatDeployRemoteCommand() {
276028
276001
  instance
276029
276002
  });
276030
276003
  let node = undefined;
276031
- if (!blockchainNodeUniqueName) {
276004
+ if (!blockchainNodeId) {
276032
276005
  const blockchainNodes = await settlemint.blockchainNode.list(env2.SETTLEMINT_APPLICATION);
276033
276006
  if (blockchainNodes.length === 0) {
276034
276007
  cancel2("No blockchain nodes found. Please create a blockchain node and try again.");
276035
276008
  }
276036
- const nodesWithPrivateKey = await Promise.all(blockchainNodes.map((node2) => settlemint.blockchainNode.read(node2.uniqueName)));
276009
+ const nodesWithPrivateKey = await Promise.all(blockchainNodes.map((node2) => settlemint.blockchainNode.read(node2.id)));
276037
276010
  const nodesWithActivePrivateKey = nodesWithPrivateKey.filter((node2) => node2.privateKeys && node2.privateKeys.length > 0);
276038
276011
  if (nodesWithActivePrivateKey.length === 0) {
276039
276012
  cancel2("No blockchain nodes with private keys found. Please activate a private key on your blockchain node and try again.");
@@ -276044,9 +276017,9 @@ function hardhatDeployRemoteCommand() {
276044
276017
  }
276045
276018
  node = blockchainNode;
276046
276019
  } else {
276047
- node = await settlemint.blockchainNode.read(blockchainNodeUniqueName);
276020
+ node = await settlemint.blockchainNode.read(blockchainNodeId);
276048
276021
  }
276049
- const envConfig = await settlemint.foundry.env(node.uniqueName);
276022
+ const envConfig = await settlemint.foundry.env(node.id);
276050
276023
  const hardhatConfig = await getHardhatConfigData(envConfig);
276051
276024
  if (verify && !hardhatConfig?.etherscan?.apiKey) {
276052
276025
  cancel2("It is not possible to verify the deployment on this network unless you supply an Etherscan API key in the hardhat.config.ts file");
@@ -276110,8 +276083,8 @@ function hardhatScriptLocalCommand() {
276110
276083
 
276111
276084
  // src/commands/smart-contract-set/hardhat/script/remote.ts
276112
276085
  function hardhatScriptRemoteCommand() {
276113
- const cmd2 = new Command2("remote").description("Run a Hardhat script to deploy a contract on the platform or interact with a deployed contract.").requiredOption("-s, --script <script>", 'The script to run with Hardhat , e.g. "scripts/deploy.ts"').option("--blockchain-node <blockchainNode>", "Blockchain Node unique name (optional, defaults to the blockchain node in the environment)").option("--prod", "Connect to your production environment").option("-a, --accept-defaults", "Accept the default and previously set values").option("--no-compile", "Don't compile before running this task");
276114
- cmd2.action(async ({ script, prod, blockchainNode: blockchainNodeUniqueName, acceptDefaults, compile }) => {
276086
+ const cmd2 = new Command2("remote").description("Run a Hardhat script to deploy a contract on the platform or interact with a deployed contract.").requiredOption("-s, --script <script>", 'The script to run with Hardhat , e.g. "scripts/deploy.ts"').option("--blockchain-node-id <blockchainNodeId>", "Blockchain Node ID (optional, defaults to the blockchain node in the environment)").option("--prod", "Connect to your production environment").option("-a, --accept-defaults", "Accept the default and previously set values").option("--no-compile", "Don't compile before running this task");
276087
+ cmd2.action(async ({ script, prod, blockchainNodeId, acceptDefaults, compile }) => {
276115
276088
  const autoAccept = !!acceptDefaults || is_in_ci_default;
276116
276089
  const env2 = await loadEnv(false, !!prod);
276117
276090
  const accessToken = env2.SETTLEMINT_ACCESS_TOKEN;
@@ -276123,16 +276096,16 @@ function hardhatScriptRemoteCommand() {
276123
276096
  accessToken,
276124
276097
  instance
276125
276098
  });
276126
- let nodeUniqueName = blockchainNodeUniqueName;
276127
- if (!nodeUniqueName) {
276099
+ let nodeId = blockchainNodeId;
276100
+ if (!nodeId) {
276128
276101
  const blockchainNodes = await settlemint.blockchainNode.list(env2.SETTLEMINT_APPLICATION);
276129
276102
  const blockchainNode = await blockchainNodePrompt(env2, blockchainNodes, autoAccept);
276130
276103
  if (!blockchainNode) {
276131
276104
  cancel2("No Blockchain Node selected. Please select one to continue.");
276132
276105
  }
276133
- nodeUniqueName = blockchainNode.uniqueName;
276106
+ nodeId = blockchainNode.id;
276134
276107
  }
276135
- const envConfig = await settlemint.foundry.env(nodeUniqueName);
276108
+ const envConfig = await settlemint.foundry.env(nodeId);
276136
276109
  const { command, args } = await getPackageManagerExecutable();
276137
276110
  await executeCommand(command, [...args, "hardhat", "run", script, "--network", "btp", ...compile ? ["--no-compile"] : []], { env: envConfig });
276138
276111
  });
@@ -276535,4 +276508,4 @@ sdkcli.parseAsync(process.argv).catch((reason) => {
276535
276508
  cancel2(reason);
276536
276509
  });
276537
276510
 
276538
- //# debugId=3E2A877F606A4D0D64756E2164756E21
276511
+ //# debugId=F3435A7811E25CA364756E2164756E21