@settlemint/sdk-cli 0.7.0-pr3d4fea5 → 0.7.0-pr4209bb4

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 +1088 -1010
  2. package/dist/cli.js.map +53 -50
  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.uC3CSCNyeI:/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.T5APISeKPm:/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-pr3d4fea5",
200567
+ binaryVersion: "0.7.0-pr4209bb4",
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.uC3CSCNyeI:/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.T5APISeKPm:/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.uC3CSCNyeI:/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.T5APISeKPm:/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.uC3CSCNyeI:/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.T5APISeKPm:/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.uC3CSCNyeI:/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.T5APISeKPm:/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,68 +271478,67 @@ 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
271541
+ isEvm
271710
271542
  endpoints {
271711
271543
  id
271712
271544
  label
@@ -271721,7 +271553,6 @@ var BlockchainNodeFragment = graphql(`
271721
271553
  ... on AbstractClusterService {
271722
271554
  id
271723
271555
  name
271724
- uniqueName
271725
271556
  }
271726
271557
  }
271727
271558
  privateKeys {
@@ -271735,96 +271566,86 @@ var BlockchainNodeFragment = graphql(`
271735
271566
  }
271736
271567
  `);
271737
271568
  var getBlockchainNodes = graphql(`
271738
- query getBlockchainNodes($applicationUniqueName: String!) {
271739
- blockchainNodesByUniqueName(applicationUniqueName: $applicationUniqueName) {
271740
- items {
271741
- ...BlockchainNode
271742
- }
271743
- }
271744
- }
271745
- `, [BlockchainNodeFragment]);
271569
+ query getBlockchainNodes($id: ID!) {
271570
+ blockchainNodes(applicationId: $id) {
271571
+ items {
271572
+ ...BlockchainNode
271573
+ }
271574
+ }
271575
+ }`, [BlockchainNodeFragment]);
271746
271576
  var getBlockchainNode = graphql(`
271747
- query getBlockchainNode($uniqueName: String!) {
271748
- blockchainNodeByUniqueName(uniqueName: $uniqueName) {
271749
- ...BlockchainNode
271750
- }
271751
- }
271752
- `, [BlockchainNodeFragment]);
271577
+ query getBlockchainNode($id: ID!) {
271578
+ blockchainNode(entityId: $id) {
271579
+ ...BlockchainNode
271580
+ }
271581
+ }
271582
+ `, [BlockchainNodeFragment]);
271753
271583
  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
271584
+ mutation createBlockchainNode(
271585
+ $applicationId: ID!
271586
+ $blockchainNetworkId: ID!
271587
+ $name: String!
271588
+ $provider: String!
271589
+ $region: String!
271590
+ $size: ClusterServiceSize
271591
+ $type: ClusterServiceType
271592
+ $nodeType: NodeType
271593
+ $keyMaterial: ID
271594
+ ) {
271595
+ createBlockchainNode(
271596
+ applicationId: $applicationId
271597
+ blockchainNetworkId: $blockchainNetworkId
271598
+ name: $name
271599
+ provider: $provider
271600
+ region: $region
271601
+ size: $size
271602
+ type: $type
271603
+ nodeType: $nodeType
271604
+ keyMaterial: $keyMaterial
271764
271605
  ) {
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]);
271606
+ ...BlockchainNode
271607
+ }
271608
+ }
271609
+ `, [BlockchainNodeFragment]);
271780
271610
  var restartBlockchainNode = graphql(`
271781
- mutation RestartBlockchainNode($uniqueName: String!) {
271782
- restartBlockchainNodeByUniqueName(uniqueName: $uniqueName) {
271783
- ...BlockchainNode
271784
- }
271611
+ mutation RestartBlockchainNode($id: ID!) {
271612
+ restartBlockchainNode(entityId: $id) {
271613
+ ...BlockchainNode
271785
271614
  }
271786
- `, [BlockchainNodeFragment]);
271615
+ }
271616
+ `, [BlockchainNodeFragment]);
271787
271617
  var blockchainNodeList = (gqlClient, options) => {
271788
- return async (applicationUniqueName) => {
271618
+ return async (applicationId) => {
271619
+ const id = validate3(IdSchema3, applicationId);
271789
271620
  const {
271790
- blockchainNodesByUniqueName: { items }
271791
- } = await gqlClient.request(getBlockchainNodes, { applicationUniqueName });
271621
+ blockchainNodes: { items }
271622
+ } = await gqlClient.request(getBlockchainNodes, { id });
271792
271623
  return items;
271793
271624
  };
271794
271625
  };
271795
271626
  var blockchainNodeRead = (gqlClient, options) => {
271796
- return async (blockchainNodeUniqueName) => {
271797
- const { blockchainNodeByUniqueName } = await gqlClient.request(getBlockchainNode, {
271798
- uniqueName: blockchainNodeUniqueName
271799
- });
271800
- return blockchainNodeByUniqueName;
271627
+ return async (blockchainNodeId) => {
271628
+ const id = validate3(IdSchema3, blockchainNodeId);
271629
+ const { blockchainNode } = await gqlClient.request(getBlockchainNode, { id });
271630
+ return blockchainNode;
271801
271631
  };
271802
271632
  };
271803
271633
  var blockchainNodeCreate = (gqlClient, options) => {
271804
271634
  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
- });
271635
+ validate3(IdSchema3, args.applicationId);
271636
+ validate3(IdSchema3, args.blockchainNetworkId);
271637
+ const { createBlockchainNode: blockchainNode } = await gqlClient.request(createBlockchainNode, args);
271815
271638
  return blockchainNode;
271816
271639
  };
271817
271640
  };
271818
- var blockchainNodeRestart = (gqlClient, _options) => async (blockchainNodeUniqueName) => {
271819
- const { restartBlockchainNodeByUniqueName: blockchainNode } = await gqlClient.request(restartBlockchainNode, {
271820
- uniqueName: blockchainNodeUniqueName
271821
- });
271641
+ var blockchainNodeRestart = (gqlClient, _options) => async (nodeId) => {
271642
+ const id = validate3(IdSchema3, nodeId);
271643
+ const { restartBlockchainNode: blockchainNode } = await gqlClient.request(restartBlockchainNode, { id });
271822
271644
  return blockchainNode;
271823
271645
  };
271824
271646
  var CustomDeploymentFragment = graphql(`
271825
271647
  fragment CustomDeployment on CustomDeployment {
271826
271648
  id
271827
- uniqueName
271828
271649
  name
271829
271650
  status
271830
271651
  endpoints {
@@ -271840,141 +271661,112 @@ var CustomDeploymentFragment = graphql(`
271840
271661
  }
271841
271662
  `);
271842
271663
  var getCustomDeployments = graphql(`
271843
- query getCustomDeployments($applicationUniqueName: String!) {
271844
- customDeploymentsByUniqueName(applicationUniqueName: $applicationUniqueName) {
271845
- items {
271846
- ...CustomDeployment
271847
- }
271848
- }
271664
+ query getCustomDeployments($id: ID!) {
271665
+ customDeployments(applicationId: $id) {
271666
+ items {
271667
+ ...CustomDeployment
271849
271668
  }
271850
- `, [CustomDeploymentFragment]);
271669
+ }
271670
+ }`, [CustomDeploymentFragment]);
271851
271671
  var getCustomDeployment = graphql(`
271852
- query getCustomDeployment($uniqueName: String!) {
271853
- customDeploymentByUniqueName(uniqueName: $uniqueName) {
271854
- ...CustomDeployment
271855
- }
271856
- }
271857
- `, [CustomDeploymentFragment]);
271672
+ query getCustomDeployment($id: ID!) {
271673
+ customDeployment(entityId: $id) {
271674
+ ...CustomDeployment
271675
+ }
271676
+ }
271677
+ `, [CustomDeploymentFragment]);
271858
271678
  var editCustomDeployment = graphql(`
271859
- mutation EditCustomDeployment($uniqueName: String!, $imageTag: String) {
271860
- editCustomDeploymentByUniqueName(uniqueName: $uniqueName, imageTag: $imageTag) {
271861
- ...CustomDeployment
271862
- }
271863
- }
271864
- `, [CustomDeploymentFragment]);
271679
+ mutation EditCustomDeployment($entityId: ID!, $imageTag: String) {
271680
+ editCustomDeployment(entityId: $entityId, imageTag: $imageTag) {
271681
+ ...CustomDeployment
271682
+ }
271683
+ }
271684
+ `, [CustomDeploymentFragment]);
271865
271685
  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]);
271686
+ mutation CreateCustomDeployment(
271687
+ $applicationId: ID!,
271688
+ $name: String!,
271689
+ $imageTag: String!,
271690
+ $imageName: String!,
271691
+ $imageRepository: String!,
271692
+ $environmentVariables: JSON,
271693
+ $port: Int!,
271694
+ $provider: String!,
271695
+ $region: String!
271696
+ ) {
271697
+ createCustomDeployment(
271698
+ applicationId: $applicationId,
271699
+ name: $name,
271700
+ imageTag: $imageTag,
271701
+ imageName: $imageName,
271702
+ imageRepository: $imageRepository,
271703
+ port: $port,
271704
+ environmentVariables: $environmentVariables,
271705
+ provider: $provider,
271706
+ region: $region
271707
+ ) {
271708
+ ...CustomDeployment
271709
+ }
271710
+ }
271711
+ `, [CustomDeploymentFragment]);
271892
271712
  var restartCustomDeployment = graphql(`
271893
- mutation RestartCustomDeployment($uniqueName: String!) {
271894
- restartCustomDeploymentByUniqueName(uniqueName: $uniqueName) {
271895
- ...CustomDeployment
271896
- }
271713
+ mutation RestartCustomDeployment($id: ID!) {
271714
+ restartCustomDeployment(entityId: $id) {
271715
+ ...CustomDeployment
271897
271716
  }
271898
- `, [CustomDeploymentFragment]);
271717
+ }
271718
+ `, [CustomDeploymentFragment]);
271899
271719
  var customdeploymentList = (gqlClient, options) => {
271900
- return async (applicationUniqueName) => {
271720
+ return async (applicationId) => {
271721
+ const id = validate3(IdSchema3, applicationId);
271901
271722
  const {
271902
- customDeploymentsByUniqueName: { items }
271903
- } = await gqlClient.request(getCustomDeployments, { applicationUniqueName });
271723
+ customDeployments: { items }
271724
+ } = await gqlClient.request(getCustomDeployments, { id });
271904
271725
  return items;
271905
271726
  };
271906
271727
  };
271907
271728
  var customdeploymentRead = (gqlClient, options) => {
271908
- return async (customDeploymentUniqueName) => {
271909
- const { customDeploymentByUniqueName: customDeployment } = await gqlClient.request(getCustomDeployment, {
271910
- uniqueName: customDeploymentUniqueName
271911
- });
271729
+ return async (customdeploymentId) => {
271730
+ const id = validate3(IdSchema3, customdeploymentId);
271731
+ const { customDeployment } = await gqlClient.request(getCustomDeployment, { id });
271912
271732
  return customDeployment;
271913
271733
  };
271914
271734
  };
271915
271735
  var customdeploymentUpdate = (gqlClient, options) => {
271916
- return async (customDeploymentUniqueName, imageTag) => {
271917
- const { editCustomDeploymentByUniqueName: cd } = await gqlClient.request(editCustomDeployment, {
271918
- uniqueName: customDeploymentUniqueName,
271919
- imageTag
271920
- });
271736
+ return async (customdeploymentId, imageTag) => {
271737
+ const id = validate3(IdSchema3, customdeploymentId);
271738
+ const { editCustomDeployment: cd } = await gqlClient.request(editCustomDeployment, { entityId: id, imageTag });
271921
271739
  return cd;
271922
271740
  };
271923
271741
  };
271924
271742
  var customdeploymentCreate = (gqlClient, options) => {
271925
271743
  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
- });
271744
+ validate3(IdSchema3, args.applicationId);
271745
+ const { createCustomDeployment: customDeployment } = await gqlClient.request(createCustomDeployment, args);
271932
271746
  return customDeployment;
271933
271747
  };
271934
271748
  };
271935
- var customDeploymentRestart = (gqlClient, _options) => async (customDeploymentUniqueName) => {
271936
- const { restartCustomDeploymentByUniqueName: customDeployment } = await gqlClient.request(restartCustomDeployment, {
271937
- uniqueName: customDeploymentUniqueName
271938
- });
271749
+ var customDeploymentRestart = (gqlClient, _options) => async (deploymentId) => {
271750
+ const id = validate3(IdSchema3, deploymentId);
271751
+ const { restartCustomDeployment: customDeployment } = await gqlClient.request(restartCustomDeployment, { id });
271939
271752
  return customDeployment;
271940
271753
  };
271941
271754
  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
271755
+ query getFoundryEnvConfig($blockchainNodeId: String!) {
271756
+ foundryEnvConfig(blockchainNodeId: $blockchainNodeId)
271956
271757
  }
271957
271758
  `);
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;
271759
+ function getEnv(gqlClient, options) {
271760
+ return async (blockchainNodeId) => {
271761
+ validate3(IdSchema3, blockchainNodeId);
271762
+ const { foundryEnvConfig } = await gqlClient.request(getFoundryEnvConfig, { blockchainNodeId });
271763
+ return foundryEnvConfig;
271971
271764
  };
271972
- };
271765
+ }
271973
271766
  var InsightsFragment = graphql(`
271974
271767
  fragment Insights on Insights {
271975
271768
  __typename
271976
271769
  id
271977
- uniqueName
271978
271770
  name
271979
271771
  status
271980
271772
  insightsCategory
@@ -271991,97 +271783,86 @@ var InsightsFragment = graphql(`
271991
271783
  }
271992
271784
  `);
271993
271785
  var getInsights = graphql(`
271994
- query GetInsights($applicationUniqueName: String!) {
271995
- insightsListByUniqueName(applicationUniqueName: $applicationUniqueName) {
271996
- items {
271997
- ...Insights
271998
- }
271999
- }
271786
+ query getInsights($id: ID!) {
271787
+ insightsList(applicationId: $id) {
271788
+ items {
271789
+ ...Insights
272000
271790
  }
272001
- `, [InsightsFragment]);
271791
+ }
271792
+ }`, [InsightsFragment]);
272002
271793
  var getInsight = graphql(`
272003
- query GetInsight($uniqueName: String!) {
272004
- insightsByUniqueName(uniqueName: $uniqueName) {
272005
- ...Insights
272006
- }
272007
- }
272008
- `, [InsightsFragment]);
271794
+ query getInsights($id: ID!) {
271795
+ insights(entityId: $id) {
271796
+ ...Insights
271797
+ }
271798
+ }
271799
+ `, [InsightsFragment]);
272009
271800
  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
271801
+ mutation createInsights(
271802
+ $applicationId: ID!
271803
+ $name: String!
271804
+ $insightsCategory: InsightsCategory!
271805
+ $provider: String!
271806
+ $region: String!
271807
+ $size: ClusterServiceSize
271808
+ $type: ClusterServiceType
271809
+ $blockchainNode: ID
271810
+ $loadBalancer: ID
271811
+ ) {
271812
+ createInsights(
271813
+ applicationId: $applicationId
271814
+ name: $name
271815
+ insightsCategory: $insightsCategory
271816
+ provider: $provider
271817
+ region: $region
271818
+ size: $size
271819
+ type: $type
271820
+ blockchainNode: $blockchainNode
271821
+ loadBalancer: $loadBalancer
272020
271822
  ) {
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]);
271823
+ ...Insights
271824
+ }
271825
+ }
271826
+ `, [InsightsFragment]);
272036
271827
  var restartInsights = graphql(`
272037
- mutation RestartInsights($uniqueName: String!) {
272038
- restartInsightsByUniqueName(uniqueName: $uniqueName) {
272039
- ...Insights
272040
- }
271828
+ mutation RestartInsights($id: ID!) {
271829
+ restartInsights(entityId: $id) {
271830
+ ...Insights
272041
271831
  }
272042
- `, [InsightsFragment]);
271832
+ }
271833
+ `, [InsightsFragment]);
272043
271834
  var insightsList = (gqlClient, options) => {
272044
- return async (applicationUniqueName) => {
271835
+ return async (applicationId) => {
271836
+ const id = validate3(IdSchema3, applicationId);
272045
271837
  const {
272046
- insightsListByUniqueName: { items }
272047
- } = await gqlClient.request(getInsights, { applicationUniqueName });
271838
+ insightsList: { items }
271839
+ } = await gqlClient.request(getInsights, { id });
272048
271840
  return items;
272049
271841
  };
272050
271842
  };
272051
271843
  var insightsRead = (gqlClient, options) => {
272052
- return async (insightsUniqueName) => {
272053
- const { insightsByUniqueName: insights } = await gqlClient.request(getInsight, { uniqueName: insightsUniqueName });
271844
+ return async (insightsId) => {
271845
+ const id = validate3(IdSchema3, insightsId);
271846
+ const { insights } = await gqlClient.request(getInsight, { id });
272054
271847
  return insights;
272055
271848
  };
272056
271849
  };
272057
271850
  var insightsCreate = (gqlClient, options) => {
272058
271851
  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
- });
271852
+ validate3(IdSchema3, args.applicationId);
271853
+ const { createInsights: insights } = await gqlClient.request(createInsights, args);
272071
271854
  return insights;
272072
271855
  };
272073
271856
  };
272074
- var insightsRestart = (gqlClient, _options) => async (insightsUniqueName) => {
272075
- const { restartInsightsByUniqueName: insights } = await gqlClient.request(restartInsights, {
272076
- uniqueName: insightsUniqueName
272077
- });
271857
+ var insightsRestart = (gqlClient, _options) => async (insightsId) => {
271858
+ const id = validate3(IdSchema3, insightsId);
271859
+ const { restartInsights: insights } = await gqlClient.request(restartInsights, { id });
272078
271860
  return insights;
272079
271861
  };
272080
271862
  var IntegrationFragment = graphql(`
272081
271863
  fragment Integration on Integration {
272082
271864
  __typename
272083
271865
  id
272084
- uniqueName
272085
271866
  name
272086
271867
  status
272087
271868
  integrationType
@@ -272098,184 +271879,82 @@ var IntegrationFragment = graphql(`
272098
271879
  }
272099
271880
  `);
272100
271881
  var getIntegrations = graphql(`
272101
- query GetIntegrations($applicationUniqueName: String!) {
272102
- integrationsByUniqueName(applicationUniqueName: $applicationUniqueName) {
272103
- items {
272104
- ...Integration
272105
- }
272106
- }
271882
+ query getIntegrations($id: ID!) {
271883
+ integrations(applicationId: $id) {
271884
+ items {
271885
+ ...Integration
272107
271886
  }
272108
- `, [IntegrationFragment]);
271887
+ }
271888
+ }`, [IntegrationFragment]);
272109
271889
  var getIntegration = graphql(`
272110
- query GetIntegration($uniqueName: String!) {
272111
- integrationByUniqueName(uniqueName: $uniqueName) {
272112
- ...Integration
272113
- }
272114
- }
272115
- `, [IntegrationFragment]);
271890
+ query getIntegration($id: ID!) {
271891
+ integration(entityId: $id) {
271892
+ ...Integration
271893
+ }
271894
+ }
271895
+ `, [IntegrationFragment]);
272116
271896
  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
271897
+ mutation createIntegration(
271898
+ $applicationId: ID!
271899
+ $name: String!
271900
+ $integrationType: IntegrationType!
271901
+ $provider: String!
271902
+ $region: String!
271903
+ $size: ClusterServiceSize
271904
+ $type: ClusterServiceType
271905
+ ) {
271906
+ createIntegration(
271907
+ applicationId: $applicationId
271908
+ name: $name
271909
+ integrationType: $integrationType
271910
+ provider: $provider
271911
+ region: $region
271912
+ size: $size
271913
+ type: $type
272125
271914
  ) {
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]);
271915
+ ...Integration
271916
+ }
271917
+ }
271918
+ `, [IntegrationFragment]);
272139
271919
  var restartIntegrationTool = graphql(`
272140
- mutation RestartIntegrationTool($uniqueName: String!) {
272141
- restartIntegrationByUniqueName(uniqueName: $uniqueName) {
272142
- ...Integration
272143
- }
271920
+ mutation RestartIntegrationTool($id: ID!) {
271921
+ restartIntegration(entityId: $id) {
271922
+ ...Integration
272144
271923
  }
272145
- `, [IntegrationFragment]);
271924
+ }
271925
+ `, [IntegrationFragment]);
272146
271926
  var integrationToolList = (gqlClient, options) => {
272147
- return async (applicationUniqueName) => {
271927
+ return async (applicationId) => {
271928
+ const id = validate3(IdSchema3, applicationId);
272148
271929
  const {
272149
- integrationsByUniqueName: { items }
272150
- } = await gqlClient.request(getIntegrations, { applicationUniqueName });
271930
+ integrations: { items }
271931
+ } = await gqlClient.request(getIntegrations, { id });
272151
271932
  return items;
272152
271933
  };
272153
271934
  };
272154
271935
  var integrationToolRead = (gqlClient, options) => {
272155
- return async (integrationUniqueName) => {
272156
- const { integrationByUniqueName } = await gqlClient.request(getIntegration, { uniqueName: integrationUniqueName });
272157
- return integrationByUniqueName;
271936
+ return async (integrationId) => {
271937
+ const id = validate3(IdSchema3, integrationId);
271938
+ const { integration } = await gqlClient.request(getIntegration, { id });
271939
+ return integration;
272158
271940
  };
272159
271941
  };
272160
271942
  var integrationToolCreate = (gqlClient, options) => {
272161
271943
  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
- });
271944
+ validate3(IdSchema3, args.applicationId);
271945
+ const { createIntegration: integration } = await gqlClient.request(createIntegration, args);
272168
271946
  return integration;
272169
271947
  };
272170
271948
  };
272171
- var integrationToolRestart = (gqlClient, _options) => async (integrationUniqueName) => {
272172
- const { restartIntegrationByUniqueName: integration } = await gqlClient.request(restartIntegrationTool, {
272173
- uniqueName: integrationUniqueName
272174
- });
271949
+ var integrationToolRestart = (gqlClient, _options) => async (toolId) => {
271950
+ const id = validate3(IdSchema3, toolId);
271951
+ const { restartIntegration: integration } = await gqlClient.request(restartIntegrationTool, { id });
272175
271952
  return integration;
272176
271953
  };
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
271954
  var MiddlewareFragment = graphql(`
272275
271955
  fragment Middleware on Middleware {
272276
271956
  __typename
272277
271957
  id
272278
- uniqueName
272279
271958
  name
272280
271959
  status
272281
271960
  interface
@@ -272304,196 +271983,489 @@ var MiddlewareFragment = graphql(`
272304
271983
  }
272305
271984
  `);
272306
271985
  var getMiddlewares = graphql(`
272307
- query GetMiddlewares($applicationUniqueName: String!, $noCache: Boolean = false) {
272308
- middlewaresByUniqueName(applicationUniqueName: $applicationUniqueName) {
272309
- items {
272310
- ...Middleware
272311
- }
272312
- }
271986
+ query getMiddlewares($id: ID!, $noCache: Boolean = false) {
271987
+ middlewares(applicationId: $id) {
271988
+ items {
271989
+ ...Middleware
272313
271990
  }
272314
- `, [MiddlewareFragment]);
271991
+ }
271992
+ }`, [MiddlewareFragment]);
272315
271993
  var getMiddleware = graphql(`
272316
- query GetMiddleware($uniqueName: String!, $noCache: Boolean = true) {
272317
- middlewareByUniqueName(uniqueName: $uniqueName) {
272318
- ...Middleware
272319
- }
272320
- }
272321
- `, [MiddlewareFragment]);
271994
+ query getMiddleware($id: ID!, $noCache: Boolean = true) {
271995
+ middleware(entityId: $id) {
271996
+ ...Middleware
271997
+ }
271998
+ }
271999
+ `, [MiddlewareFragment]);
272322
272000
  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
272001
+ mutation createMiddleware(
272002
+ $applicationId: ID!
272003
+ $name: String!
272004
+ $provider: String!
272005
+ $region: String!
272006
+ $size: ClusterServiceSize
272007
+ $type: ClusterServiceType
272008
+ $interface: MiddlewareType!
272009
+ $storageId: ID
272010
+ $smartContractSetId: ID
272011
+ $blockchainNodeId: ID
272012
+ $loadBalancerId: ID
272013
+ $abis: [SmartContractPortalMiddlewareAbiInputDto!]
272014
+ $includePredeployedAbis: [String!]
272015
+ $noCache: Boolean = false
272016
+ ) {
272017
+ createMiddleware(
272018
+ applicationId: $applicationId
272019
+ name: $name
272020
+ provider: $provider
272021
+ region: $region
272022
+ size: $size
272023
+ type: $type
272024
+ interface: $interface
272025
+ storageId: $storageId
272026
+ smartContractSetId: $smartContractSetId
272027
+ blockchainNodeId: $blockchainNodeId
272028
+ loadBalancerId: $loadBalancerId
272029
+ abis: $abis
272030
+ includePredeployedAbis: $includePredeployedAbis
272337
272031
  ) {
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]);
272032
+ ...Middleware
272033
+ }
272034
+ }
272035
+ `, [MiddlewareFragment]);
272356
272036
  var restartMiddleware = graphql(`
272357
- mutation RestartMiddleware($uniqueName: String!, $noCache: Boolean = false) {
272358
- restartMiddlewareByUniqueName(uniqueName: $uniqueName) {
272359
- ...Middleware
272360
- }
272037
+ mutation RestartMiddleware($id: ID!, $noCache: Boolean = false) {
272038
+ restartMiddleware(entityId: $id) {
272039
+ ...Middleware
272361
272040
  }
272362
- `, [MiddlewareFragment]);
272041
+ }
272042
+ `, [MiddlewareFragment]);
272363
272043
  var middlewareList = (gqlClient, options) => {
272364
- return async (applicationUniqueName) => {
272044
+ return async (applicationId) => {
272045
+ const id = validate3(IdSchema3, applicationId);
272365
272046
  const {
272366
- middlewaresByUniqueName: { items }
272367
- } = await gqlClient.request(getMiddlewares, { applicationUniqueName });
272047
+ middlewares: { items }
272048
+ } = await gqlClient.request(getMiddlewares, { id });
272368
272049
  return items;
272369
272050
  };
272370
272051
  };
272371
272052
  var middlewareRead = (gqlClient, options) => {
272372
- return async (middlewareUniqueName) => {
272373
- const { middlewareByUniqueName: middleware } = await gqlClient.request(getMiddleware, {
272374
- uniqueName: middlewareUniqueName
272375
- });
272053
+ return async (middlewareId) => {
272054
+ const id = validate3(IdSchema3, middlewareId);
272055
+ const { middleware } = await gqlClient.request(getMiddleware, { id });
272376
272056
  return middleware;
272377
272057
  };
272378
272058
  };
272379
272059
  var middlewareCreate = (gqlClient, options) => {
272380
272060
  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
- });
272061
+ validate3(IdSchema3, args.applicationId);
272062
+ const { createMiddleware: middleware } = await gqlClient.request(createMiddleware, args);
272395
272063
  return middleware;
272396
272064
  };
272397
272065
  };
272398
- var middlewareRestart = (gqlClient, _options) => async (middlewareUniqueName) => {
272399
- const { restartMiddlewareByUniqueName: middleware } = await gqlClient.request(restartMiddleware, {
272400
- uniqueName: middlewareUniqueName
272401
- });
272066
+ var middlewareRestart = (gqlClient, _options) => async (middlewareId) => {
272067
+ const id = validate3(IdSchema3, middlewareId);
272068
+ const { restartMiddleware: middleware } = await gqlClient.request(restartMiddleware, { id });
272402
272069
  return middleware;
272403
272070
  };
272404
272071
  var PrivateKeyFragment = graphql(`
272405
272072
  fragment PrivateKey on PrivateKey {
272406
272073
  __typename
272407
272074
  id
272408
- uniqueName
272409
272075
  name
272076
+ uniqueName
272410
272077
  privateKeyType
272411
272078
  status
272412
272079
  }
272413
272080
  `);
272414
272081
  var getPrivateKeys = graphql(`
272415
- query GetPrivateKeys($applicationUniqueName: String!) {
272416
- privateKeysByUniqueName(applicationUniqueName: $applicationUniqueName) {
272417
- items {
272418
- ...PrivateKey
272419
- }
272420
- }
272082
+ query getPrivateKeys($id: ID!) {
272083
+ privateKeys(applicationId: $id) {
272084
+ items {
272085
+ ...PrivateKey
272421
272086
  }
272422
- `, [PrivateKeyFragment]);
272087
+ }
272088
+ }`, [PrivateKeyFragment]);
272423
272089
  var getPrivateKey = graphql(`
272424
- query GetPrivateKey($uniqueName: String!) {
272425
- privateKeyByUniqueName(uniqueName: $uniqueName) {
272426
- ...PrivateKey
272427
- }
272428
- }
272429
- `, [PrivateKeyFragment]);
272090
+ query getPrivateKey($id: ID!) {
272091
+ privateKey(entityId: $id) {
272092
+ ...PrivateKey
272093
+ }
272094
+ }
272095
+ `, [PrivateKeyFragment]);
272430
272096
  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!]
272097
+ mutation CreatePrivateKey(
272098
+ $applicationId: ID!,
272099
+ $name: String!,
272100
+ $privateKeyType: PrivateKeyType!,
272101
+ $provider: String!
272102
+ $region: String!
272103
+ $size: ClusterServiceSize
272104
+ $type: ClusterServiceType
272105
+ $blockchainNodes: [ID!]
272106
+ ) {
272107
+ createPrivateKey(
272108
+ applicationId: $applicationId,
272109
+ name: $name,
272110
+ privateKeyType: $privateKeyType,
272111
+ provider: $provider,
272112
+ region: $region
272113
+ size: $size
272114
+ type: $type
272115
+ blockchainNodes: $blockchainNodes
272440
272116
  ) {
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]);
272117
+ ...PrivateKey
272118
+ }
272119
+ }
272120
+ `, [PrivateKeyFragment]);
272455
272121
  var restartPrivateKey = graphql(`
272456
- mutation RestartPrivateKey($uniqueName: String!) {
272457
- restartPrivateKeyByUniqueName(uniqueName: $uniqueName) {
272458
- ...PrivateKey
272459
- }
272122
+ mutation RestartPrivateKey($id: ID!) {
272123
+ restartPrivateKey(entityId: $id) {
272124
+ ...PrivateKey
272460
272125
  }
272461
- `, [PrivateKeyFragment]);
272126
+ }
272127
+ `, [PrivateKeyFragment]);
272462
272128
  var privateKeyList = (gqlClient, options) => {
272463
- return async (applicationUniqueName) => {
272129
+ return async (applicationId) => {
272130
+ const id = validate3(IdSchema3, applicationId);
272464
272131
  const {
272465
- privateKeysByUniqueName: { items }
272466
- } = await gqlClient.request(getPrivateKeys, { applicationUniqueName });
272132
+ privateKeys: { items }
272133
+ } = await gqlClient.request(getPrivateKeys, { id });
272467
272134
  return items;
272468
272135
  };
272469
272136
  };
272470
272137
  var privatekeyRead = (gqlClient, options) => {
272471
- return async (privateKeyUniqueName) => {
272472
- const { privateKeyByUniqueName: privateKey } = await gqlClient.request(getPrivateKey, {
272473
- uniqueName: privateKeyUniqueName
272474
- });
272138
+ return async (privatekeyId) => {
272139
+ const id = validate3(IdSchema3, privatekeyId);
272140
+ const { privateKey } = await gqlClient.request(getPrivateKey, { id });
272475
272141
  return privateKey;
272476
272142
  };
272477
272143
  };
272478
272144
  var privateKeyCreate = (gqlClient, options) => {
272479
272145
  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
- });
272146
+ validate3(IdSchema3, args.applicationId);
272147
+ const { createPrivateKey: privateKey } = await gqlClient.request(createPrivateKey, args);
272488
272148
  return privateKey;
272489
272149
  };
272490
272150
  };
272491
- var privateKeyRestart = (gqlClient, _options) => async (privateKeyUniqueName) => {
272492
- const { restartPrivateKeyByUniqueName: privateKey } = await gqlClient.request(restartPrivateKey, {
272493
- uniqueName: privateKeyUniqueName
272494
- });
272151
+ var privateKeyRestart = (gqlClient, _options) => async (keyId) => {
272152
+ const id = validate3(IdSchema3, keyId);
272153
+ const { restartPrivateKey: privateKey } = await gqlClient.request(restartPrivateKey, { id });
272495
272154
  return privateKey;
272496
272155
  };
272156
+ var SmartContractSetFragment = graphql(`
272157
+ fragment SmartContractSet on SmartContractSet {
272158
+ __typename
272159
+ id
272160
+ name
272161
+ application {
272162
+ id
272163
+ }
272164
+ status
272165
+ useCase
272166
+ user {
272167
+ id
272168
+ firstname
272169
+ lastname
272170
+ }
272171
+ }
272172
+ `);
272173
+ var getSmartContractSets = graphql(`
272174
+ query getSmartContractSets($id: ID!) {
272175
+ smartContractSets(applicationId: $id) {
272176
+ items {
272177
+ ...SmartContractSet
272178
+ }
272179
+ }
272180
+ }`, [SmartContractSetFragment]);
272181
+ var getSmartContractSet = graphql(`
272182
+ query getSmartContractSet($id: ID!) {
272183
+ smartContractSet(entityId: $id) {
272184
+ ...SmartContractSet
272185
+ }
272186
+ }`, [SmartContractSetFragment]);
272187
+ var createSmartContractSet = graphql(`
272188
+ mutation CreateSmartContractSet(
272189
+ $applicationId: ID!
272190
+ $name: String!
272191
+ $blockchainNodeId: ID!
272192
+ $useCase: String!
272193
+ $userId: ID
272194
+ $provider: String!
272195
+ $region: String!
272196
+ $size: ClusterServiceSize
272197
+ $type: ClusterServiceType
272198
+ ) {
272199
+ createSmartContractSet(
272200
+ applicationId: $applicationId,
272201
+ name: $name,
272202
+ blockchainNodeId: $blockchainNodeId
272203
+ useCase: $useCase
272204
+ userId: $userId
272205
+ provider: $provider,
272206
+ region: $region
272207
+ size: $size
272208
+ type: $type
272209
+ ) {
272210
+ ...SmartContractSet
272211
+ }
272212
+ }`, [SmartContractSetFragment]);
272213
+ var restartSmartContractSet = graphql(`
272214
+ mutation RestartSmartContractSet($entityId: ID!) {
272215
+ restartSmartContractSet(entityId: $entityId) {
272216
+ ...SmartContractSet
272217
+ }
272218
+ }`, [SmartContractSetFragment]);
272219
+ var smartContractSetList = (gqlClient, options) => {
272220
+ return async (applicationId) => {
272221
+ const id = validate3(IdSchema3, applicationId);
272222
+ const {
272223
+ smartContractSets: { items }
272224
+ } = await gqlClient.request(getSmartContractSets, { id });
272225
+ return items;
272226
+ };
272227
+ };
272228
+ var smartContractSetRead = (gqlClient, options) => {
272229
+ return async (smartContractSetId) => {
272230
+ const id = validate3(IdSchema3, smartContractSetId);
272231
+ const { smartContractSet } = await gqlClient.request(getSmartContractSet, { id });
272232
+ return smartContractSet;
272233
+ };
272234
+ };
272235
+ var smartContractSetCreate = (gqlClient, options) => {
272236
+ return async (args) => {
272237
+ validate3(IdSchema3, args.applicationId);
272238
+ validate3(IdSchema3, args.blockchainNodeId);
272239
+ if (typeof args.userId === "string") {
272240
+ validate3(IdSchema3, args.userId);
272241
+ }
272242
+ const { createSmartContractSet: smartContractSet } = await gqlClient.request(createSmartContractSet, args);
272243
+ return smartContractSet;
272244
+ };
272245
+ };
272246
+ var smartContractSetRestart = (gqlClient, _options) => async (smartContractSetId) => {
272247
+ const id = validate3(IdSchema3, smartContractSetId);
272248
+ const { restartSmartContractSet: smartContractSet } = await gqlClient.request(restartSmartContractSet, {
272249
+ entityId: id
272250
+ });
272251
+ return smartContractSet;
272252
+ };
272253
+ var StorageFragment = graphql(`
272254
+ fragment Storage on Storage {
272255
+ __typename
272256
+ id
272257
+ name
272258
+ status
272259
+ storageProtocol
272260
+ endpoints {
272261
+ id
272262
+ label
272263
+ displayValue
272264
+ }
272265
+ credentials {
272266
+ id
272267
+ label
272268
+ displayValue
272269
+ }
272270
+ }
272271
+ `);
272272
+ var getStorages = graphql(`
272273
+ query getStorages($id: ID!) {
272274
+ storages(applicationId: $id) {
272275
+ items {
272276
+ ...Storage
272277
+ }
272278
+ }
272279
+ }`, [StorageFragment]);
272280
+ var getStorage = graphql(`
272281
+ query getStorage($id: ID!) {
272282
+ storage(entityId: $id) {
272283
+ ...Storage
272284
+ }
272285
+ }
272286
+ `, [StorageFragment]);
272287
+ var createStorage = graphql(`
272288
+ mutation CreateStorage(
272289
+ $applicationId: ID!,
272290
+ $name: String!,
272291
+ $storageProtocol: StorageProtocol!,
272292
+ $provider: String!,
272293
+ $region: String!,
272294
+ $size: ClusterServiceSize
272295
+ $type: ClusterServiceType
272296
+ ) {
272297
+ createStorage(
272298
+ applicationId: $applicationId,
272299
+ name: $name,
272300
+ storageProtocol: $storageProtocol,
272301
+ provider: $provider,
272302
+ region: $region,
272303
+ size: $size,
272304
+ type: $type
272305
+ ) {
272306
+ ...Storage
272307
+ }
272308
+ }
272309
+ `, [StorageFragment]);
272310
+ var restartStorage = graphql(`
272311
+ mutation RestartStorage($id: ID!) {
272312
+ restartStorage(entityId: $id) {
272313
+ ...Storage
272314
+ }
272315
+ }
272316
+ `, [StorageFragment]);
272317
+ var storageList = (gqlClient, options) => {
272318
+ return async (applicationId) => {
272319
+ const id = validate3(IdSchema3, applicationId);
272320
+ const {
272321
+ storages: { items }
272322
+ } = await gqlClient.request(getStorages, { id });
272323
+ return items;
272324
+ };
272325
+ };
272326
+ var storageRead = (gqlClient, options) => {
272327
+ return async (storageId) => {
272328
+ const id = validate3(IdSchema3, storageId);
272329
+ const { storage } = await gqlClient.request(getStorage, { id });
272330
+ return storage;
272331
+ };
272332
+ };
272333
+ var storageCreate = (gqlClient, options) => {
272334
+ return async (args) => {
272335
+ validate3(IdSchema3, args.applicationId);
272336
+ const { createStorage: storage } = await gqlClient.request(createStorage, args);
272337
+ return storage;
272338
+ };
272339
+ };
272340
+ var storageRestart = (gqlClient, _options) => async (storageId) => {
272341
+ const id = validate3(IdSchema3, storageId);
272342
+ const { restartStorage: storage } = await gqlClient.request(restartStorage, { id });
272343
+ return storage;
272344
+ };
272345
+ var WorkspaceFragment = graphql(`
272346
+ fragment Workspace on Workspace {
272347
+ id
272348
+ name
272349
+ applications {
272350
+ ...Application
272351
+ }
272352
+ }
272353
+ `, [ApplicationFragment]);
272354
+ var getWorkspacesAndApplications = graphql(`
272355
+ query getWorkspacesAndApplications {
272356
+ workspaces {
272357
+ ...Workspace
272358
+ applications {
272359
+ ...Application
272360
+ }
272361
+ childWorkspaces {
272362
+ ...Workspace
272363
+ }
272364
+ }
272365
+ }
272366
+ `, [WorkspaceFragment, ApplicationFragment]);
272367
+ var getWorkspace = graphql(`
272368
+ query getWorkspace($id: ID!) {
272369
+ workspace(workspaceId: $id) {
272370
+ ...Workspace
272371
+ applications {
272372
+ ...Application
272373
+ }
272374
+ }
272375
+ }
272376
+ `, [WorkspaceFragment, ApplicationFragment]);
272377
+ var createWorkspace = graphql(`
272378
+ mutation CreateWorkspace(
272379
+ $addressLine1: String
272380
+ $addressLine2: String
272381
+ $city: String
272382
+ $companyName: String
272383
+ $country: String
272384
+ $name: String!
272385
+ $parentId: String
272386
+ $paymentMethodId: String
272387
+ $postalCode: String
272388
+ $taxIdType: String
272389
+ $taxIdValue: String
272390
+ ) {
272391
+ createWorkspace(
272392
+ addressLine1: $addressLine1
272393
+ addressLine2: $addressLine2
272394
+ city: $city
272395
+ companyName: $companyName
272396
+ country: $country
272397
+ name: $name
272398
+ parentId: $parentId
272399
+ paymentMethodId: $paymentMethodId
272400
+ postalCode: $postalCode
272401
+ taxIdType: $taxIdType
272402
+ taxIdValue: $taxIdValue
272403
+ ) {
272404
+ ...Workspace
272405
+ applications {
272406
+ ...Application
272407
+ }
272408
+ }
272409
+ }
272410
+ `, [WorkspaceFragment, ApplicationFragment]);
272411
+ var deleteWorkspace = graphql(`
272412
+ mutation deleteWorkspace($id: ID!) {
272413
+ deleteWorkspace(workspaceId: $id) {
272414
+ ...Workspace
272415
+ applications {
272416
+ ...Application
272417
+ }
272418
+ }
272419
+ }
272420
+ `, [WorkspaceFragment, ApplicationFragment]);
272421
+ var addCredits = graphql(`
272422
+ mutation addCredits($workspaceId: String!, $amount: Float!) {
272423
+ addCredits(workspaceId: $workspaceId, amount: $amount)
272424
+ }
272425
+ `);
272426
+ var workspaceList = (gqlClient, options) => {
272427
+ return async () => {
272428
+ const { workspaces } = await gqlClient.request(getWorkspacesAndApplications);
272429
+ const allWorkspaces = workspaces.reduce((acc, workspace) => {
272430
+ acc.push(workspace);
272431
+ if (workspace.childWorkspaces) {
272432
+ acc.push(...workspace.childWorkspaces);
272433
+ }
272434
+ return acc;
272435
+ }, []);
272436
+ return allWorkspaces.sort((a8, b4) => a8.name.localeCompare(b4.name));
272437
+ };
272438
+ };
272439
+ var workspaceRead = (gqlClient, options) => {
272440
+ return async (workspaceId) => {
272441
+ const id = validate3(IdSchema3, workspaceId);
272442
+ const { workspace } = await gqlClient.request(getWorkspace, { id });
272443
+ return workspace;
272444
+ };
272445
+ };
272446
+ var workspaceCreate = (gqlClient, options) => {
272447
+ return async (createWorkspaceArgs) => {
272448
+ const { createWorkspace: workspace } = await gqlClient.request(createWorkspace, createWorkspaceArgs);
272449
+ return workspace;
272450
+ };
272451
+ };
272452
+ var workspaceDelete = (gqlClient, options) => {
272453
+ return async (workspaceId) => {
272454
+ const id = validate3(IdSchema3, workspaceId);
272455
+ const { deleteWorkspace: workspace } = await gqlClient.request(deleteWorkspace, { id });
272456
+ return workspace;
272457
+ };
272458
+ };
272459
+ var workspaceAddCredits = (gqlClient, options) => {
272460
+ return async (workspaceId, amount) => {
272461
+ const id = validate3(IdSchema3, workspaceId);
272462
+ if (amount <= 0) {
272463
+ throw new Error("Credit amount must be a positive number");
272464
+ }
272465
+ const { addCredits: result } = await gqlClient.request(addCredits, { workspaceId: id, amount });
272466
+ return result;
272467
+ };
272468
+ };
272497
272469
  var ClientOptionsSchema = z3.object({
272498
272470
  accessToken: AccessTokenSchema3,
272499
272471
  instance: UrlSchema3
@@ -272595,6 +272567,12 @@ function createSettleMintClient(options) {
272595
272567
  update: customdeploymentUpdate(gqlClient, options),
272596
272568
  restart: customDeploymentRestart(gqlClient, options)
272597
272569
  },
272570
+ smartContractSet: {
272571
+ list: smartContractSetList(gqlClient, options),
272572
+ read: smartContractSetRead(gqlClient, options),
272573
+ create: smartContractSetCreate(gqlClient, options),
272574
+ restart: smartContractSetRestart(gqlClient, options)
272575
+ },
272598
272576
  foundry: {
272599
272577
  env: getEnv(gqlClient, options)
272600
272578
  },
@@ -272799,7 +272777,7 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
272799
272777
  }
272800
272778
  });
272801
272779
  const aat = await settlemint.applicationAccessToken.create({
272802
- applicationUniqueName: application.uniqueName,
272780
+ applicationId: application.id,
272803
272781
  name: name2,
272804
272782
  blockchainNetworkScope: {
272805
272783
  type: "ALL",
@@ -272864,7 +272842,7 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
272864
272842
 
272865
272843
  // src/commands/connect/application.prompt.ts
272866
272844
  async function applicationPrompt(env2, applications, accept) {
272867
- const defaultApplication = applications.find((application2) => application2.uniqueName === env2.SETTLEMINT_APPLICATION);
272845
+ const defaultApplication = applications.find((application2) => application2.id === env2.SETTLEMINT_APPLICATION);
272868
272846
  const defaultPossible = accept && defaultApplication;
272869
272847
  if (defaultPossible) {
272870
272848
  return defaultApplication;
@@ -272891,7 +272869,7 @@ async function blockchainNodePrompt(env2, nodes, accept) {
272891
272869
  if (nodes.length === 0) {
272892
272870
  return;
272893
272871
  }
272894
- const defaultNode = nodes.find((node2) => node2.uniqueName === env2.SETTLEMINT_BLOCKCHAIN_NODE) ?? (nodes.length === 1 ? nodes[0] : undefined);
272872
+ const defaultNode = nodes.find((node2) => node2.id === env2.SETTLEMINT_BLOCKCHAIN_NODE) ?? (nodes.length === 1 ? nodes[0] : undefined);
272895
272873
  const defaultPossible = accept;
272896
272874
  if (defaultPossible) {
272897
272875
  return defaultNode;
@@ -272919,7 +272897,7 @@ async function blockscoutPrompt(env2, insights, accept) {
272919
272897
  if (possible.length === 0) {
272920
272898
  return;
272921
272899
  }
272922
- const defaultBlockscout = insights.find((insight) => insight.uniqueName === env2.SETTLEMINT_BLOCKSCOUT) ?? (insights.length === 1 ? insights[0] : undefined);
272900
+ const defaultBlockscout = insights.find((insight) => insight.id === env2.SETTLEMINT_BLOCKSCOUT) ?? (insights.length === 1 ? insights[0] : undefined);
272923
272901
  const defaultPossible = accept;
272924
272902
  if (defaultPossible) {
272925
272903
  return defaultBlockscout;
@@ -272946,7 +272924,7 @@ async function customDeploymentPrompt(env2, customDeployments, accept) {
272946
272924
  if (customDeployments.length === 0) {
272947
272925
  return;
272948
272926
  }
272949
- const defaultCustomDeployment = customDeployments.find((customDeployment) => customDeployment.uniqueName === env2.SETTLEMINT_CUSTOM_DEPLOYMENT) ?? (customDeployments.length === 1 ? customDeployments[0] : undefined);
272927
+ const defaultCustomDeployment = customDeployments.find((customDeployment) => customDeployment.id === env2.SETTLEMINT_CUSTOM_DEPLOYMENT) ?? (customDeployments.length === 1 ? customDeployments[0] : undefined);
272950
272928
  const defaultPossible = accept;
272951
272929
  if (defaultPossible) {
272952
272930
  return defaultCustomDeployment;
@@ -272974,7 +272952,7 @@ async function hasuraPrompt(env2, integrations, accept) {
272974
272952
  if (possible.length === 0) {
272975
272953
  return;
272976
272954
  }
272977
- const defaultIntegration = possible.find((integration) => integration.uniqueName === env2.SETTLEMINT_HASURA) ?? (possible.length === 1 ? possible[0] : undefined);
272955
+ const defaultIntegration = possible.find((integration) => integration.id === env2.SETTLEMINT_HASURA) ?? (possible.length === 1 ? possible[0] : undefined);
272978
272956
  const defaultPossible = accept;
272979
272957
  if (defaultPossible) {
272980
272958
  return defaultIntegration;
@@ -273053,7 +273031,7 @@ async function ipfsPrompt(env2, storages, accept) {
273053
273031
  if (possible.length === 0) {
273054
273032
  return;
273055
273033
  }
273056
- const defaultStorage = possible.find((storage) => storage.uniqueName === env2.SETTLEMINT_IPFS) ?? (possible.length === 1 ? possible[0] : undefined);
273034
+ const defaultStorage = possible.find((storage) => storage.id === env2.SETTLEMINT_IPFS) ?? (possible.length === 1 ? possible[0] : undefined);
273057
273035
  const defaultPossible = accept;
273058
273036
  if (defaultPossible) {
273059
273037
  return defaultStorage;
@@ -273081,7 +273059,7 @@ async function minioPrompt(env2, storages, accept) {
273081
273059
  if (possible.length === 0) {
273082
273060
  return;
273083
273061
  }
273084
- const defaultStorage = possible.find((storage) => storage.uniqueName === env2.SETTLEMINT_MINIO) ?? (possible.length === 1 ? possible[0] : undefined);
273062
+ const defaultStorage = possible.find((storage) => storage.id === env2.SETTLEMINT_MINIO) ?? (possible.length === 1 ? possible[0] : undefined);
273085
273063
  const defaultPossible = accept;
273086
273064
  if (defaultPossible) {
273087
273065
  return defaultStorage;
@@ -273109,7 +273087,7 @@ async function portalPrompt(env2, middlewares, accept) {
273109
273087
  if (possible.length === 0) {
273110
273088
  return;
273111
273089
  }
273112
- const defaultMiddleware = possible.find((middleware2) => middleware2.uniqueName === env2.SETTLEMINT_PORTAL) ?? (possible.length === 1 ? possible[0] : undefined);
273090
+ const defaultMiddleware = possible.find((middleware2) => middleware2.id === env2.SETTLEMINT_PORTAL) ?? (possible.length === 1 ? possible[0] : undefined);
273113
273091
  const defaultPossible = accept;
273114
273092
  if (defaultPossible) {
273115
273093
  return defaultMiddleware;
@@ -273176,7 +273154,7 @@ async function theGraphPrompt(env2, middlewares, accept) {
273176
273154
  if (possible.length === 0) {
273177
273155
  return;
273178
273156
  }
273179
- const defaultMiddleware = possible.find((middleware2) => middleware2.uniqueName === env2.SETTLEMINT_THEGRAPH) ?? (possible.length === 1 ? possible[0] : undefined);
273157
+ const defaultMiddleware = possible.find((middleware2) => middleware2.id === env2.SETTLEMINT_THEGRAPH) ?? (possible.length === 1 ? possible[0] : undefined);
273180
273158
  const defaultPossible = accept;
273181
273159
  if (defaultPossible) {
273182
273160
  return defaultMiddleware;
@@ -273200,7 +273178,7 @@ async function theGraphPrompt(env2, middlewares, accept) {
273200
273178
 
273201
273179
  // src/commands/connect/workspace.prompt.ts
273202
273180
  async function workspacePrompt(env2, workspaces, accept) {
273203
- const defaultWorkspace = workspaces.find((workspace2) => workspace2.uniqueName === env2.SETTLEMINT_WORKSPACE);
273181
+ const defaultWorkspace = workspaces.find((workspace2) => workspace2.id === env2.SETTLEMINT_WORKSPACE);
273204
273182
  const defaultPossible = accept && defaultWorkspace;
273205
273183
  if (defaultPossible) {
273206
273184
  return defaultWorkspace;
@@ -273255,23 +273233,23 @@ function connectCommand() {
273255
273233
  await writeEnvSpinner(!!prod, {
273256
273234
  SETTLEMINT_ACCESS_TOKEN: aatToken,
273257
273235
  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,
273236
+ SETTLEMINT_WORKSPACE: workspace.id,
273237
+ SETTLEMINT_APPLICATION: application.id,
273238
+ SETTLEMINT_BLOCKCHAIN_NETWORK: blockchainNode?.blockchainNetwork?.id,
273239
+ SETTLEMINT_BLOCKCHAIN_NODE: blockchainNode?.id,
273240
+ SETTLEMINT_HASURA: hasura?.id,
273263
273241
  ...getHasuraEndpoints(hasura),
273264
- SETTLEMINT_THEGRAPH: thegraph?.uniqueName,
273242
+ SETTLEMINT_THEGRAPH: thegraph?.id,
273265
273243
  ...await getGraphEndpoint(thegraph, env2),
273266
273244
  ...getPortalEndpoints(portal),
273267
273245
  SETTLEMINT_HD_PRIVATE_KEY: hdPrivateKey?.uniqueName,
273268
- SETTLEMINT_MINIO: minio?.uniqueName,
273246
+ SETTLEMINT_MINIO: minio?.id,
273269
273247
  ...getMinioEndpoints(minio),
273270
- SETTLEMINT_IPFS: ipfs?.uniqueName,
273248
+ SETTLEMINT_IPFS: ipfs?.id,
273271
273249
  ...getIpfsEndpoints(ipfs),
273272
- SETTLEMINT_CUSTOM_DEPLOYMENT: cDeployment?.uniqueName,
273250
+ SETTLEMINT_CUSTOM_DEPLOYMENT: cDeployment?.id,
273273
273251
  SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT: cDeployment?.endpoints.find((endpoint) => endpoint.id.includes("internal"))?.displayValue,
273274
- SETTLEMINT_BLOCKSCOUT: blockscout?.uniqueName,
273252
+ SETTLEMINT_BLOCKSCOUT: blockscout?.id,
273275
273253
  ...getBlockscoutEndpoints(blockscout)
273276
273254
  });
273277
273255
  outro("Connected to SettleMint");
@@ -273281,7 +273259,7 @@ function connectCommand() {
273281
273259
  var package_default = {
273282
273260
  name: "@settlemint/sdk-cli",
273283
273261
  description: "SettleMint SDK, integrate SettleMint into your application with ease.",
273284
- version: "0.7.0-pr3d4fea5",
273262
+ version: "0.7.0-pr4209bb4",
273285
273263
  type: "module",
273286
273264
  private: false,
273287
273265
  license: "FSL-1.1-MIT",
@@ -273332,8 +273310,8 @@ var package_default = {
273332
273310
  "@inquirer/input": "4.1.0",
273333
273311
  "@inquirer/password": "4.0.3",
273334
273312
  "@inquirer/select": "4.0.3",
273335
- "@settlemint/sdk-js": "0.7.0-pr3d4fea5",
273336
- "@settlemint/sdk-utils": "0.7.0-pr3d4fea5",
273313
+ "@settlemint/sdk-js": "0.7.0-pr4209bb4",
273314
+ "@settlemint/sdk-utils": "0.7.0-pr4209bb4",
273337
273315
  "get-tsconfig": "4.8.1",
273338
273316
  giget: "1.2.3"
273339
273317
  },
@@ -274330,6 +274308,7 @@ var SETTLEMINT_CLIENT_MAP = {
274330
274308
  "blockchain node": "blockchainNode",
274331
274309
  "custom deployment": "customDeployment",
274332
274310
  "private key": "privateKey",
274311
+ "smart contract set": "smartContractSet",
274333
274312
  middleware: "middleware",
274334
274313
  "integration tool": "integrationTool",
274335
274314
  storage: "storage",
@@ -274341,7 +274320,7 @@ var SETTLEMINT_CLIENT_MAP = {
274341
274320
  async function waitForCompletion({
274342
274321
  settlemint,
274343
274322
  type: type4,
274344
- uniqueName,
274323
+ id,
274345
274324
  action,
274346
274325
  maxTimeout = 15 * 60 * 1000
274347
274326
  }) {
@@ -274360,7 +274339,7 @@ async function waitForCompletion({
274360
274339
  const startTime = Date.now();
274361
274340
  while (true) {
274362
274341
  try {
274363
- const resource = await service.read(uniqueName);
274342
+ const resource = await service.read(id);
274364
274343
  if (resource.status === "COMPLETED") {
274365
274344
  note(`${capitalizeFirstLetter(type4)} is ${getActionLabel(action)}`);
274366
274345
  return true;
@@ -274374,7 +274353,7 @@ async function waitForCompletion({
274374
274353
  note(`${capitalizeFirstLetter(type4)} is not ready yet (status: UNKNOWN)`);
274375
274354
  }
274376
274355
  if (Date.now() - startTime > maxTimeout) {
274377
- throw new Error(`Operation timed out after ${maxTimeout / 60000} minutes for ${type4} with unique name ${uniqueName}`);
274356
+ throw new Error(`Operation timed out after ${maxTimeout / 60000} minutes for ${type4} with id ${id}`);
274378
274357
  }
274379
274358
  await new Promise((resolve6) => setTimeout(resolve6, 5000));
274380
274359
  }
@@ -274411,7 +274390,7 @@ ${createExamples(examples)}`).argument("<name>", `The ${type4} name`).option("-a
274411
274390
  intro(`Creating ${type4} in the SettleMint platform`);
274412
274391
  const autoAccept = !!acceptDefaults || is_in_ci_default;
274413
274392
  const env2 = await loadEnv2(false, !!prod);
274414
- const instance = await instancePrompt(env2, autoAccept);
274393
+ const instance = env2.SETTLEMINT_INSTANCE ?? await instancePrompt(env2, autoAccept);
274415
274394
  const accessToken = usePersonalAccessToken ? (await getInstanceCredentials(instance))?.personalAccessToken : env2.SETTLEMINT_ACCESS_TOKEN;
274416
274395
  if (!accessToken) {
274417
274396
  return missingAccessTokenError();
@@ -274431,7 +274410,7 @@ ${createExamples(examples)}`).argument("<name>", `The ${type4} name`).option("-a
274431
274410
  await waitForCompletion({
274432
274411
  settlemint,
274433
274412
  type: waitFor?.resourceType ?? type4,
274434
- uniqueName: waitFor?.uniqueName ?? result.uniqueName,
274413
+ id: waitFor?.id ?? result.id,
274435
274414
  action: "deploy"
274436
274415
  });
274437
274416
  if (waitFor) {
@@ -274451,10 +274430,10 @@ ${createExamples(examples)}`).argument("<name>", `The ${type4} name`).option("-a
274451
274430
  ...updatedEnv
274452
274431
  };
274453
274432
  if (isApplicationChanged && updatedEnv.SETTLEMINT_APPLICATION) {
274454
- newEnv.SETTLEMINT_WORKSPACE = (await settlemint.application.read(updatedEnv.SETTLEMINT_APPLICATION)).workspace.uniqueName;
274433
+ newEnv.SETTLEMINT_WORKSPACE = (await settlemint.application.read(updatedEnv.SETTLEMINT_APPLICATION)).workspace.id;
274455
274434
  }
274456
274435
  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;
274436
+ newEnv.SETTLEMINT_BLOCKCHAIN_NETWORK = (await settlemint.blockchainNode.read(newEnv.SETTLEMINT_BLOCKCHAIN_NODE)).blockchainNetwork.id;
274458
274437
  }
274459
274438
  await writeEnvSpinner(!!prod, newEnv);
274460
274439
  note(`${capitalizeFirstLetter(type4)} ${result.name} set as default`);
@@ -274471,8 +274450,8 @@ function blockchainNetworkBesuCreateCommand() {
274471
274450
  type: "blockchain network",
274472
274451
  alias: "b",
274473
274452
  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,
274453
+ 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, {
274454
+ applicationId,
274476
274455
  chainId,
274477
274456
  contractSizeLimit,
274478
274457
  evmStackSize,
@@ -274487,10 +274466,10 @@ function blockchainNetworkBesuCreateCommand() {
274487
274466
  ...defaultArgs
274488
274467
  }) => {
274489
274468
  return baseAction(defaultArgs, async (settlemint, env2) => {
274490
- const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
274469
+ const application = applicationId ?? env2.SETTLEMINT_APPLICATION;
274491
274470
  const result = await settlemint.blockchainNetwork.create({
274492
274471
  name: name2,
274493
- applicationUniqueName,
274472
+ applicationId: application,
274494
274473
  nodeName,
274495
274474
  consensusAlgorithm: "BESU_QBFT",
274496
274475
  chainId,
@@ -274514,8 +274493,8 @@ function blockchainNetworkBesuCreateCommand() {
274514
274493
  mapDefaultEnv: () => {
274515
274494
  return {
274516
274495
  SETTLEMINT_APPLICATION: application,
274517
- SETTLEMINT_BLOCKCHAIN_NETWORK: result.uniqueName,
274518
- SETTLEMINT_BLOCKCHAIN_NODE: blockchainNode?.uniqueName
274496
+ SETTLEMINT_BLOCKCHAIN_NETWORK: result.id,
274497
+ SETTLEMINT_BLOCKCHAIN_NODE: blockchainNode?.id
274519
274498
  };
274520
274499
  }
274521
274500
  };
@@ -274529,7 +274508,7 @@ function blockchainNetworkBesuCreateCommand() {
274529
274508
  },
274530
274509
  {
274531
274510
  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"
274511
+ 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
274512
  }
274534
274513
  ]
274535
274514
  });
@@ -274537,7 +274516,7 @@ function blockchainNetworkBesuCreateCommand() {
274537
274516
 
274538
274517
  // src/commands/platform/blockchain-network/create.ts
274539
274518
  function blockchainNetworkCreateCommand() {
274540
- return new Command2("blockchain-network").alias("bn").description("Create a blockchain network in the SettleMint platform").addCommand(blockchainNetworkBesuCreateCommand());
274519
+ return new Command2("blockchain-network").alias("bnw").description("Create a blockchain network in the SettleMint platform").addCommand(blockchainNetworkBesuCreateCommand());
274541
274520
  }
274542
274521
 
274543
274522
  // src/commands/platform/workspace/create.ts
@@ -274660,7 +274639,7 @@ function workspaceCreateCommand() {
274660
274639
  result,
274661
274640
  mapDefaultEnv: () => {
274662
274641
  return {
274663
- SETTLEMINT_WORKSPACE: result.uniqueName
274642
+ SETTLEMINT_WORKSPACE: result.id
274664
274643
  };
274665
274644
  }
274666
274645
  };
@@ -274691,11 +274670,10 @@ function applicationAccessTokenCreateCommand() {
274691
274670
  type: "application access token",
274692
274671
  alias: "aat",
274693
274672
  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 }) => {
274673
+ 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
274674
  return baseAction(defaultArgs, async (settlemint, env2) => {
274696
- const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
274697
274675
  const aatToken = await settlemint.applicationAccessToken.create({
274698
- applicationUniqueName,
274676
+ applicationId: applicationId ?? env2.SETTLEMINT_APPLICATION,
274699
274677
  name: name2,
274700
274678
  blockchainNetworkScope: {
274701
274679
  type: "ALL",
@@ -274742,8 +274720,7 @@ function applicationAccessTokenCreateCommand() {
274742
274720
  return {
274743
274721
  result: {
274744
274722
  id: "",
274745
- name: name2,
274746
- uniqueName: ""
274723
+ name: name2
274747
274724
  },
274748
274725
  mapDefaultEnv: () => ({
274749
274726
  SETTLEMINT_ACCESS_TOKEN: aatToken
@@ -274776,17 +274753,18 @@ function applicationCreateCommand() {
274776
274753
  type: "application",
274777
274754
  alias: "a",
274778
274755
  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 }) => {
274756
+ 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
274757
  return baseAction(defaultArgs, async (settlemint, env2) => {
274758
+ const workspace = workspaceId ?? env2.SETTLEMINT_WORKSPACE;
274781
274759
  const result = await settlemint.application.create({
274782
274760
  name: name2,
274783
- workspaceUniqueName: workspace ?? env2.SETTLEMINT_WORKSPACE
274761
+ workspaceId: workspace
274784
274762
  });
274785
274763
  return {
274786
274764
  result,
274787
274765
  mapDefaultEnv: () => {
274788
274766
  return {
274789
- SETTLEMINT_APPLICATION: result.uniqueName
274767
+ SETTLEMINT_APPLICATION: result.id
274790
274768
  };
274791
274769
  }
274792
274770
  };
@@ -274804,12 +274782,116 @@ function applicationCreateCommand() {
274804
274782
  },
274805
274783
  {
274806
274784
  description: "Create an application in a specific workspace",
274807
- command: "platform create application my-app --workspace my-workspace"
274785
+ command: "platform create application my-app --workspace-id 123456789"
274786
+ }
274787
+ ]
274788
+ });
274789
+ }
274790
+
274791
+ // src/commands/connect/blockchain-network.prompt.ts
274792
+ async function blockchainNetworkPrompt(env2, networks, accept) {
274793
+ if (networks.length === 0) {
274794
+ return;
274795
+ }
274796
+ const defaultNetwork = networks.find((network) => network.id === env2.SETTLEMINT_BLOCKCHAIN_NETWORK) ?? (networks.length === 1 ? networks[0] : undefined);
274797
+ const defaultPossible = accept;
274798
+ if (defaultPossible) {
274799
+ return defaultNetwork;
274800
+ }
274801
+ return esm_default2({
274802
+ message: "Which blockchain network do you want to connect to?",
274803
+ choices: [
274804
+ ...networks.map((network) => ({
274805
+ name: network.name,
274806
+ value: network
274807
+ })),
274808
+ {
274809
+ name: "None",
274810
+ value: undefined
274811
+ }
274812
+ ],
274813
+ default: defaultNetwork
274814
+ });
274815
+ }
274816
+
274817
+ // src/commands/platform/blockchain-node/besu/create.ts
274818
+ function blockchainNodeBesuCreateCommand() {
274819
+ return getCreateCommand({
274820
+ name: "besu",
274821
+ type: "blockchain node",
274822
+ alias: "b",
274823
+ execute: (cmd2, baseAction) => {
274824
+ addClusterServiceArgs(cmd2).option("-a, --application-id <applicationId>", "The application ID to create the node in (defaults to application from env)").option("--blockchain-network-id <blockchainNetworkId>", "Blockchain network to add this node to").option("--node-identity <nodeIdentity>", "EC DSA P256 private key to use as the node identity").addOption(new Option("--node-type <nodeType>", "Type of the node").choices(["VALIDATOR", "NON_VALIDATOR"]).makeOptionMandatory()).action(async (name2, {
274825
+ applicationId,
274826
+ provider,
274827
+ region,
274828
+ size,
274829
+ type: type4,
274830
+ blockchainNetworkId,
274831
+ nodeType,
274832
+ nodeIdentity,
274833
+ acceptDefaults,
274834
+ ...defaultArgs
274835
+ }) => {
274836
+ return baseAction(defaultArgs, async (settlemint, env2) => {
274837
+ const application = applicationId ?? env2.SETTLEMINT_APPLICATION;
274838
+ if (!application) {
274839
+ cancel2("No application found. Please specify an application or run `settlemint connect` to continue.");
274840
+ }
274841
+ let networkId = blockchainNetworkId ?? (acceptDefaults ? env2.SETTLEMINT_BLOCKCHAIN_NETWORK : undefined);
274842
+ if (!networkId) {
274843
+ const networks = await settlemint.blockchainNetwork.list(application);
274844
+ const network = await blockchainNetworkPrompt(env2, networks, acceptDefaults ?? false);
274845
+ if (!network) {
274846
+ cancel2("No network found. Please specify a network to continue.");
274847
+ }
274848
+ networkId = network?.id;
274849
+ }
274850
+ const result = await settlemint.blockchainNode.create({
274851
+ applicationId: application,
274852
+ name: name2,
274853
+ blockchainNetworkId: networkId,
274854
+ nodeType,
274855
+ keyMaterial: nodeIdentity,
274856
+ provider,
274857
+ region,
274858
+ size,
274859
+ type: type4
274860
+ });
274861
+ return {
274862
+ result,
274863
+ mapDefaultEnv: () => {
274864
+ return {
274865
+ SETTLEMINT_APPLICATION: application,
274866
+ SETTLEMINT_BLOCKCHAIN_NODE: result.id
274867
+ };
274868
+ }
274869
+ };
274870
+ });
274871
+ });
274872
+ },
274873
+ examples: [
274874
+ {
274875
+ description: "Create a Besu blockchain node and save as default",
274876
+ command: "platform create blockchain-node besu my-node --node-type VALIDATOR --accept-defaults -d"
274877
+ },
274878
+ {
274879
+ description: "Create a Besu blockchain node in a different network",
274880
+ command: "platform create blockchain-node besu my-node --blockchain-network-id 12345 --node-type NON_VALIDATOR --accept-defaults"
274881
+ },
274882
+ {
274883
+ description: "Create a Besu blockchain node in a different application",
274884
+ command: "platform create blockchain-node besu my-node --application-id 123456789 --node-type NON_VALIDATOR --accept-defaults"
274808
274885
  }
274809
274886
  ]
274810
274887
  });
274811
274888
  }
274812
274889
 
274890
+ // src/commands/platform/blockchain-node/create.ts
274891
+ function blockchainNodeCreateCommand() {
274892
+ return new Command2("blockchain-node").alias("bn").description("Create a blockchain node in the SettleMint platform").addCommand(blockchainNodeBesuCreateCommand());
274893
+ }
274894
+
274813
274895
  // src/commands/platform/insights/blockscout/create.ts
274814
274896
  function blockscoutInsightsCreateCommand() {
274815
274897
  return getCreateCommand({
@@ -274817,28 +274899,28 @@ function blockscoutInsightsCreateCommand() {
274817
274899
  type: "insights",
274818
274900
  alias: "bs",
274819
274901
  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 }) => {
274902
+ 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
274903
  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;
274904
+ const application = applicationId ?? env2.SETTLEMINT_APPLICATION;
274905
+ const blockchainNode = loadBalancerId ? undefined : blockchainNodeId ?? env2.SETTLEMINT_BLOCKCHAIN_NODE;
274906
+ const loadBalancer = loadBalancerId ?? (blockchainNode ? undefined : env2.SETTLEMINT_LOAD_BALANCER);
274825
274907
  const result = await settlemint.insights.create({
274826
274908
  name: name2,
274827
- applicationUniqueName,
274909
+ applicationId: application,
274828
274910
  insightsCategory: "BLOCKCHAIN_EXPLORER",
274829
274911
  provider,
274830
274912
  region,
274831
274913
  size,
274832
274914
  type: type4,
274833
- blockchainNodeUniqueName,
274834
- loadBalancerUniqueName
274915
+ blockchainNode,
274916
+ loadBalancer
274835
274917
  });
274836
274918
  return {
274837
274919
  result,
274838
274920
  mapDefaultEnv: async () => {
274839
274921
  return {
274840
274922
  SETTLEMINT_APPLICATION: application,
274841
- SETTLEMINT_BLOCKSCOUT: result.uniqueName,
274923
+ SETTLEMINT_BLOCKSCOUT: result.id,
274842
274924
  ...getBlockscoutEndpoints(result)
274843
274925
  };
274844
274926
  }
@@ -274853,7 +274935,7 @@ function blockscoutInsightsCreateCommand() {
274853
274935
  },
274854
274936
  {
274855
274937
  description: "Create a Blockscout insights service in a different application",
274856
- command: "platform create insights blockscout my-blockscout --application app-123"
274938
+ command: "platform create insights blockscout my-blockscout --application-id 123456789"
274857
274939
  }
274858
274940
  ]
274859
274941
  });
@@ -274873,12 +274955,12 @@ function hasuraIntegrationCreateCommand() {
274873
274955
  type: "integration tool",
274874
274956
  alias: "ha",
274875
274957
  execute: (cmd2, baseAction) => {
274876
- addClusterServiceArgs(cmd2).option("--application <application>", "Application unique name").action(async (name2, { application, provider, region, size, type: type4, ...defaultArgs }) => {
274958
+ addClusterServiceArgs(cmd2).option("--application-id <applicationId>", "Application ID").action(async (name2, { applicationId, provider, region, size, type: type4, ...defaultArgs }) => {
274877
274959
  return baseAction(defaultArgs, async (settlemint, env2) => {
274878
- const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
274960
+ const application = applicationId ?? env2.SETTLEMINT_APPLICATION;
274879
274961
  const result = await settlemint.integrationTool.create({
274880
274962
  name: name2,
274881
- applicationUniqueName,
274963
+ applicationId: application,
274882
274964
  integrationType: "HASURA",
274883
274965
  provider,
274884
274966
  region,
@@ -274890,7 +274972,7 @@ function hasuraIntegrationCreateCommand() {
274890
274972
  mapDefaultEnv: async () => {
274891
274973
  return {
274892
274974
  SETTLEMINT_APPLICATION: application,
274893
- SETTLEMINT_HASURA: result.uniqueName,
274975
+ SETTLEMINT_HASURA: result.id,
274894
274976
  ...getHasuraEndpoints(result)
274895
274977
  };
274896
274978
  }
@@ -274905,7 +274987,7 @@ function hasuraIntegrationCreateCommand() {
274905
274987
  },
274906
274988
  {
274907
274989
  description: "Create a Hasura integration in a different application",
274908
- command: "platform create integration-tool hasura my-hasura --application app-123"
274990
+ command: "platform create integration-tool hasura my-hasura --application-id 123456789"
274909
274991
  }
274910
274992
  ]
274911
274993
  });
@@ -274925,15 +275007,15 @@ function graphMiddlewareCreateCommand() {
274925
275007
  type: "middleware",
274926
275008
  alias: "gr",
274927
275009
  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 }) => {
275010
+ 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 }) => {
274929
275011
  return baseAction(defaultArgs, async (settlemint, env2) => {
274930
- const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
274931
- const blockchainNodeUniqueName = blockchainNode ?? env2.SETTLEMINT_BLOCKCHAIN_NODE;
275012
+ const application = applicationId ?? env2.SETTLEMINT_APPLICATION;
275013
+ const blockchainNode = blockchainNodeId ?? env2.SETTLEMINT_BLOCKCHAIN_NODE;
274932
275014
  const result = await settlemint.middleware.create({
274933
275015
  name: name2,
274934
- applicationUniqueName,
275016
+ applicationId: application,
274935
275017
  interface: "HA_GRAPH",
274936
- blockchainNodeUniqueName,
275018
+ blockchainNodeId: blockchainNode,
274937
275019
  provider,
274938
275020
  region,
274939
275021
  size,
@@ -274942,11 +275024,11 @@ function graphMiddlewareCreateCommand() {
274942
275024
  return {
274943
275025
  result,
274944
275026
  mapDefaultEnv: async () => {
274945
- const graphMiddleware = await settlemint.middleware.read(result.uniqueName);
275027
+ const resource = await settlemint.middleware.read(result.id);
274946
275028
  return {
274947
275029
  SETTLEMINT_APPLICATION: application,
274948
- SETTLEMINT_THEGRAPH: result.uniqueName,
274949
- ...await getGraphEndpoint(graphMiddleware, env2)
275030
+ SETTLEMINT_THEGRAPH: result.id,
275031
+ ...await getGraphEndpoint(resource, env2)
274950
275032
  };
274951
275033
  }
274952
275034
  };
@@ -274960,7 +275042,7 @@ function graphMiddlewareCreateCommand() {
274960
275042
  },
274961
275043
  {
274962
275044
  description: "Create a graph middleware in a different application",
274963
- command: "platform create middleware graph my-graph --application my-app --blockchain-node node-123"
275045
+ command: "platform create middleware graph my-graph --application-id 123456789 --blockchain-node-id node-123 --storage-id storage-123"
274964
275046
  }
274965
275047
  ]
274966
275048
  });
@@ -274974,16 +275056,16 @@ function smartContractPortalMiddlewareCreateCommand() {
274974
275056
  type: "middleware",
274975
275057
  alias: "scp",
274976
275058
  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([
275059
+ 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
275060
  "StarterKitERC20Registry",
274979
275061
  "StarterKitERC20Factory",
274980
275062
  "StarterKitERC20",
274981
275063
  "StarterKitERC20DexFactory",
274982
275064
  "StarterKitERC20Dex"
274983
275065
  ])).action(async (name2, {
274984
- application,
274985
- blockchainNode,
274986
- loadBalancer,
275066
+ applicationId,
275067
+ blockchainNodeId,
275068
+ loadBalancerId,
274987
275069
  provider,
274988
275070
  region,
274989
275071
  size,
@@ -274993,9 +275075,9 @@ function smartContractPortalMiddlewareCreateCommand() {
274993
275075
  ...defaultArgs
274994
275076
  }) => {
274995
275077
  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;
275078
+ const application = applicationId ?? env2.SETTLEMINT_APPLICATION;
275079
+ const blockchainNode = loadBalancerId ? undefined : blockchainNodeId ?? env2.SETTLEMINT_BLOCKCHAIN_NODE;
275080
+ const loadBalancer = loadBalancerId ?? (blockchainNode ? undefined : env2.SETTLEMINT_LOAD_BALANCER);
274999
275081
  const parsedAbis = [];
275000
275082
  if (abis && abis.length > 0) {
275001
275083
  try {
@@ -275012,10 +275094,10 @@ function smartContractPortalMiddlewareCreateCommand() {
275012
275094
  }
275013
275095
  const result = await settlemint.middleware.create({
275014
275096
  name: name2,
275015
- applicationUniqueName,
275097
+ applicationId: application,
275016
275098
  interface: "SMART_CONTRACT_PORTAL",
275017
- blockchainNodeUniqueName,
275018
- loadBalancerUniqueName,
275099
+ blockchainNodeId: blockchainNode,
275100
+ loadBalancerId: loadBalancer,
275019
275101
  abis: parsedAbis,
275020
275102
  includePredeployedAbis,
275021
275103
  provider,
@@ -275028,7 +275110,7 @@ function smartContractPortalMiddlewareCreateCommand() {
275028
275110
  mapDefaultEnv: async () => {
275029
275111
  return {
275030
275112
  SETTLEMINT_APPLICATION: application,
275031
- SETTLEMINT_PORTAL: result.uniqueName,
275113
+ SETTLEMINT_PORTAL: result.id,
275032
275114
  ...getPortalEndpoints(result)
275033
275115
  };
275034
275116
  }
@@ -275043,7 +275125,7 @@ function smartContractPortalMiddlewareCreateCommand() {
275043
275125
  },
275044
275126
  {
275045
275127
  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"
275128
+ command: "platform create middleware smart-contract-portal my-portal --application-id 123456789 --blockchain-node-id node-123"
275047
275129
  }
275048
275130
  ]
275049
275131
  });
@@ -275061,15 +275143,14 @@ function privateKeyHdCreateCommand() {
275061
275143
  type: "private key",
275062
275144
  alias: "hd",
275063
275145
  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 }) => {
275146
+ 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
275147
  return baseAction(defaultArgs, async (settlemint, env2) => {
275066
- const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
275067
- const blockchainNodeUniqueName = blockchainNode ?? env2.SETTLEMINT_BLOCKCHAIN_NODE;
275148
+ const application = applicationId ?? env2.SETTLEMINT_APPLICATION;
275068
275149
  const result = await settlemint.privateKey.create({
275069
275150
  name: name2,
275070
- applicationUniqueName,
275151
+ applicationId: application,
275071
275152
  privateKeyType: "HD_ECDSA_P256",
275072
- blockchainNodeUniqueNames: blockchainNodeUniqueName ? [blockchainNodeUniqueName] : [],
275153
+ blockchainNodes: blockchainNodeId ? [blockchainNodeId] : [],
275073
275154
  provider,
275074
275155
  region,
275075
275156
  size,
@@ -275094,11 +275175,11 @@ function privateKeyHdCreateCommand() {
275094
275175
  },
275095
275176
  {
275096
275177
  description: "Create a private key in a different application",
275097
- command: "platform create private-key hd-ecdsa-p256 my-key --application my-app"
275178
+ command: "platform create private-key hd-ecdsa-p256 my-key --application-id 123456789"
275098
275179
  },
275099
275180
  {
275100
275181
  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"
275182
+ command: "platform create private-key hd-ecdsa-p256 my-key --blockchain-node-id node123"
275102
275183
  }
275103
275184
  ]
275104
275185
  });
@@ -275111,15 +275192,14 @@ function privateKeyHsmCreateCommand() {
275111
275192
  type: "private key",
275112
275193
  alias: "hd",
275113
275194
  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 }) => {
275195
+ 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
275196
  return baseAction(defaultArgs, async (settlemint, env2) => {
275116
- const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
275117
- const blockchainNodeUniqueName = blockchainNode ?? env2.SETTLEMINT_BLOCKCHAIN_NODE;
275197
+ const application = applicationId ?? env2.SETTLEMINT_APPLICATION;
275118
275198
  const result = await settlemint.privateKey.create({
275119
275199
  name: name2,
275120
- applicationUniqueName,
275200
+ applicationId: application,
275121
275201
  privateKeyType: "HSM_ECDSA_P256",
275122
- blockchainNodeUniqueNames: blockchainNodeUniqueName ? [blockchainNodeUniqueName] : [],
275202
+ blockchainNodes: blockchainNodeId ? [blockchainNodeId] : [],
275123
275203
  provider,
275124
275204
  region,
275125
275205
  size,
@@ -275138,11 +275218,11 @@ function privateKeyHsmCreateCommand() {
275138
275218
  },
275139
275219
  {
275140
275220
  description: "Create a private key in a different application",
275141
- command: "platform create private-key hsm-ecdsa-p256 my-key --application 123456789"
275221
+ command: "platform create private-key hsm-ecdsa-p256 my-key --application-id 123456789"
275142
275222
  },
275143
275223
  {
275144
275224
  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"
275225
+ command: "platform create private-key hsm-ecdsa-p256 my-key --blockchain-node-id node123"
275146
275226
  }
275147
275227
  ]
275148
275228
  });
@@ -275160,12 +275240,12 @@ function ipfsStorageCreateCommand() {
275160
275240
  type: "storage",
275161
275241
  alias: "ip",
275162
275242
  execute: (cmd2, baseAction) => {
275163
- addClusterServiceArgs(cmd2).option("--application <application>", "Application unique name").action(async (name2, { application, provider, region, size, type: type4, ...defaultArgs }) => {
275243
+ addClusterServiceArgs(cmd2).option("--application-id <applicationId>", "Application ID").action(async (name2, { applicationId, provider, region, size, type: type4, ...defaultArgs }) => {
275164
275244
  return baseAction(defaultArgs, async (settlemint, env2) => {
275165
- const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
275245
+ const application = applicationId ?? env2.SETTLEMINT_APPLICATION;
275166
275246
  const result = await settlemint.storage.create({
275167
275247
  name: name2,
275168
- applicationUniqueName,
275248
+ applicationId: application,
275169
275249
  storageProtocol: "IPFS",
275170
275250
  provider,
275171
275251
  region,
@@ -275176,7 +275256,8 @@ function ipfsStorageCreateCommand() {
275176
275256
  result,
275177
275257
  mapDefaultEnv: () => {
275178
275258
  return {
275179
- SETTLEMINT_IPFS: result.uniqueName,
275259
+ SETTLEMINT_APPLICATION: application,
275260
+ SETTLEMINT_IPFS: result.id,
275180
275261
  ...getIpfsEndpoints(result)
275181
275262
  };
275182
275263
  }
@@ -275191,7 +275272,7 @@ function ipfsStorageCreateCommand() {
275191
275272
  },
275192
275273
  {
275193
275274
  description: "Create an IPFS storage in a different application",
275194
- command: "platform create storage ipfs my-storage --application app-123"
275275
+ command: "platform create storage ipfs my-storage --application-id app-123"
275195
275276
  }
275196
275277
  ]
275197
275278
  });
@@ -275204,12 +275285,12 @@ function minioStorageCreateCommand() {
275204
275285
  type: "storage",
275205
275286
  alias: "m",
275206
275287
  execute: (cmd2, baseAction) => {
275207
- addClusterServiceArgs(cmd2).option("--application <application>", "Application unique name").action(async (name2, { application, provider, region, size, type: type4, ...defaultArgs }) => {
275288
+ addClusterServiceArgs(cmd2).option("--application-id <applicationId>", "Application ID").action(async (name2, { applicationId, provider, region, size, type: type4, ...defaultArgs }) => {
275208
275289
  return baseAction(defaultArgs, async (settlemint, env2) => {
275209
- const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
275290
+ const application = applicationId ?? env2.SETTLEMINT_APPLICATION;
275210
275291
  const result = await settlemint.storage.create({
275211
275292
  name: name2,
275212
- applicationUniqueName,
275293
+ applicationId: application,
275213
275294
  storageProtocol: "MINIO",
275214
275295
  provider,
275215
275296
  region,
@@ -275221,7 +275302,7 @@ function minioStorageCreateCommand() {
275221
275302
  mapDefaultEnv: () => {
275222
275303
  return {
275223
275304
  SETTLEMINT_APPLICATION: application,
275224
- SETTLEMINT_MINIO: result.uniqueName,
275305
+ SETTLEMINT_MINIO: result.id,
275225
275306
  ...getMinioEndpoints(result)
275226
275307
  };
275227
275308
  }
@@ -275236,7 +275317,7 @@ function minioStorageCreateCommand() {
275236
275317
  },
275237
275318
  {
275238
275319
  description: "Create a MinIO storage in a different application",
275239
- command: "platform create storage minio my-storage --application app-123"
275320
+ command: "platform create storage minio my-storage --application-id app-123"
275240
275321
  }
275241
275322
  ]
275242
275323
  });
@@ -275249,7 +275330,7 @@ function storageCreateCommand() {
275249
275330
 
275250
275331
  // src/commands/platform/create.ts
275251
275332
  function createCommand3() {
275252
- return new Command2("create").alias("c").description("Create a resource in the SettleMint platform").addCommand(workspaceCreateCommand()).addCommand(applicationCreateCommand()).addCommand(blockchainNetworkCreateCommand()).addCommand(privateKeyCreateCommand()).addCommand(middlewareCreateCommand()).addCommand(storageCreateCommand()).addCommand(integrationToolCreateCommand()).addCommand(insightsCreateCommand()).addCommand(applicationAccessTokenCreateCommand());
275333
+ return new Command2("create").alias("c").description("Create a resource in the SettleMint platform").addCommand(workspaceCreateCommand()).addCommand(applicationCreateCommand()).addCommand(blockchainNetworkCreateCommand()).addCommand(blockchainNodeCreateCommand()).addCommand(privateKeyCreateCommand()).addCommand(middlewareCreateCommand()).addCommand(storageCreateCommand()).addCommand(integrationToolCreateCommand()).addCommand(insightsCreateCommand()).addCommand(applicationAccessTokenCreateCommand());
275253
275334
  }
275254
275335
 
275255
275336
  // src/commands/platform/prompts/delete-confirmation.prompt.ts
@@ -275282,11 +275363,11 @@ function getDeleteCommand({
275282
275363
  deleteFunction,
275283
275364
  usePersonalAccessToken = true
275284
275365
  }) {
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.
275366
+ 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
275367
  ${createExamples([
275287
275368
  {
275288
- description: `Deletes the specified ${type4} by unique name`,
275289
- command: `platform delete ${type4} <${type4}-unique-name>`
275369
+ description: `Deletes the specified ${type4} by id`,
275370
+ command: `platform delete ${type4} <${type4}-id>`
275290
275371
  },
275291
275372
  {
275292
275373
  description: `Deletes the default ${type4} in the production environment`,
@@ -275294,9 +275375,9 @@ ${createExamples([
275294
275375
  },
275295
275376
  {
275296
275377
  description: `Force deletes the specified ${type4} without confirmation`,
275297
- command: `platform delete ${type4} <${type4}-unique-name> --force`
275378
+ command: `platform delete ${type4} <${type4}-id> --force`
275298
275379
  }
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 }) => {
275380
+ ])}`).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
275381
  intro(`Deleting ${type4} in the SettleMint platform`);
275301
275382
  if (!force) {
275302
275383
  await deleteConfirmationPrompt(`this ${type4}`);
@@ -275312,19 +275393,19 @@ ${createExamples([
275312
275393
  accessToken,
275313
275394
  instance
275314
275395
  });
275315
- const isDefaultUniqueName = uniqueName === "default";
275316
- const serviceUniqueName = isDefaultUniqueName ? typeof env2[envKey] === "string" ? env2[envKey] : null : uniqueName;
275317
- if (!serviceUniqueName) {
275396
+ const isDefaultId = id === "default";
275397
+ const serviceId = isDefaultId ? typeof env2[envKey] === "string" ? env2[envKey] : null : id;
275398
+ if (!serviceId) {
275318
275399
  throw new Error(`No default ${type4} found in your .env file. Please provide a valid ${type4} ID or set a default ${type4} first.`);
275319
275400
  }
275320
275401
  const result = await spinner({
275321
275402
  startMessage: `Deleting ${type4}`,
275322
275403
  task: async () => {
275323
- return deleteFunction(settlemint, serviceUniqueName);
275404
+ return deleteFunction(settlemint, serviceId);
275324
275405
  },
275325
275406
  stopMessage: `${capitalizeFirstLetter(type4)} deleted`
275326
275407
  });
275327
- if (isDefaultUniqueName) {
275408
+ if (isDefaultId) {
275328
275409
  const newEnv = {
275329
275410
  SETTLEMINT_ACCESS_TOKEN: usePersonalAccessToken ? env2.SETTLEMINT_ACCESS_TOKEN : accessToken,
275330
275411
  SETTLEMINT_INSTANCE: instance,
@@ -275334,7 +275415,7 @@ ${createExamples([
275334
275415
  note(`${capitalizeFirstLetter(type4)} removed as default`);
275335
275416
  }
275336
275417
  if (wait) {
275337
- await waitForCompletion({ settlemint, type: type4, uniqueName: serviceUniqueName, action: "destroy" });
275418
+ await waitForCompletion({ settlemint, type: type4, id: serviceId, action: "destroy" });
275338
275419
  }
275339
275420
  outro(`${capitalizeFirstLetter(type4)} ${result.name} deleted successfully`);
275340
275421
  });
@@ -275347,8 +275428,8 @@ function workspaceDeleteCommand() {
275347
275428
  type: "workspace",
275348
275429
  alias: "w",
275349
275430
  envKey: "SETTLEMINT_WORKSPACE",
275350
- deleteFunction: async (settlemint, uniqueName) => {
275351
- return settlemint.workspace.delete(uniqueName);
275431
+ deleteFunction: async (settlemint, id) => {
275432
+ return settlemint.workspace.delete(id);
275352
275433
  }
275353
275434
  });
275354
275435
  }
@@ -275397,7 +275478,7 @@ ${createExamples([
275397
275478
  description: `Restarts the default ${type4} in the production environment`,
275398
275479
  command: `platform restart ${commandName}${subType ? ` ${subType}` : ""} default --prod`
275399
275480
  }
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 }) => {
275481
+ ])}`).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
275482
  intro(`Restarting ${type4} in the SettleMint platform`);
275402
275483
  const autoAccept = !!acceptDefaults || is_in_ci_default;
275403
275484
  const env2 = await loadEnv2(false, !!prod);
@@ -275410,20 +275491,20 @@ ${createExamples([
275410
275491
  accessToken,
275411
275492
  instance
275412
275493
  });
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.`);
275494
+ const isDefaultId = id === "default";
275495
+ const serviceId = isDefaultId ? typeof env2[envKey] === "string" ? env2[envKey] : null : id;
275496
+ if (!serviceId) {
275497
+ throw new Error(`No default ${type4} found in your .env file. Please provide a valid ${type4} ID or set a default ${type4} first.`);
275417
275498
  }
275418
275499
  const result = await spinner({
275419
275500
  startMessage: `Restarting ${type4}`,
275420
275501
  task: async () => {
275421
- return restartFunction(settlemint, serviceUniqueName);
275502
+ return restartFunction(settlemint, serviceId);
275422
275503
  },
275423
275504
  stopMessage: `${capitalizeFirstLetter(type4)} restart initiated`
275424
275505
  });
275425
275506
  if (wait) {
275426
- await waitForCompletion({ settlemint, type: type4, uniqueName: serviceUniqueName, action: "restart" });
275507
+ await waitForCompletion({ settlemint, type: type4, id: serviceId, action: "restart" });
275427
275508
  }
275428
275509
  outro(`${capitalizeFirstLetter(type4)} ${result.name} restart initiated successfully`);
275429
275510
  });
@@ -275436,8 +275517,8 @@ function blockchainNetworkRestartCommand() {
275436
275517
  type: "blockchain network",
275437
275518
  alias: "bn",
275438
275519
  envKey: "SETTLEMINT_BLOCKCHAIN_NETWORK",
275439
- restartFunction: async (settlemint, uniqueName) => {
275440
- return settlemint.blockchainNetwork.restart(uniqueName);
275520
+ restartFunction: async (settlemint, id) => {
275521
+ return settlemint.blockchainNetwork.restart(id);
275441
275522
  }
275442
275523
  });
275443
275524
  }
@@ -275449,8 +275530,8 @@ function customDeploymentRestartCommand() {
275449
275530
  type: "custom deployment",
275450
275531
  alias: "cd",
275451
275532
  envKey: "SETTLEMINT_CUSTOM_DEPLOYMENT",
275452
- restartFunction: async (settlemint, uniqueName) => {
275453
- return settlemint.customDeployment.restart(uniqueName);
275533
+ restartFunction: async (settlemint, id) => {
275534
+ return settlemint.customDeployment.restart(id);
275454
275535
  },
275455
275536
  usePersonalAccessToken: false
275456
275537
  });
@@ -275464,8 +275545,8 @@ function blockscoutRestartCommand() {
275464
275545
  subType: "blockscout",
275465
275546
  alias: "bs",
275466
275547
  envKey: "SETTLEMINT_BLOCKSCOUT",
275467
- restartFunction: async (settlemint, uniqueName) => {
275468
- return settlemint.insights.restart(uniqueName);
275548
+ restartFunction: async (settlemint, id) => {
275549
+ return settlemint.insights.restart(id);
275469
275550
  }
275470
275551
  });
275471
275552
  }
@@ -275483,8 +275564,8 @@ function hasuraRestartCommand() {
275483
275564
  subType: "hasura",
275484
275565
  alias: "ha",
275485
275566
  envKey: "SETTLEMINT_HASURA",
275486
- restartFunction: async (settlemint, uniqueName) => {
275487
- return settlemint.integrationTool.restart(uniqueName);
275567
+ restartFunction: async (settlemint, id) => {
275568
+ return settlemint.integrationTool.restart(id);
275488
275569
  }
275489
275570
  });
275490
275571
  }
@@ -275516,8 +275597,8 @@ function smartContractPortalRestartCommand() {
275516
275597
  subType: "smart-contract-portal",
275517
275598
  alias: "scp",
275518
275599
  envKey: "SETTLEMINT_PORTAL",
275519
- restartFunction: async (settlemint, uniqueName) => {
275520
- return settlemint.middleware.restart(uniqueName);
275600
+ restartFunction: async (settlemint, id) => {
275601
+ return settlemint.middleware.restart(id);
275521
275602
  }
275522
275603
  });
275523
275604
  }
@@ -275535,8 +275616,8 @@ function hdEcdsaP256RestartCommand() {
275535
275616
  subType: "hd-ecdsa-p256",
275536
275617
  alias: "hd",
275537
275618
  envKey: "SETTLEMINT_HD_PRIVATE_KEY",
275538
- restartFunction: async (settlemint, uniqueName) => {
275539
- return settlemint.privateKey.restart(uniqueName);
275619
+ restartFunction: async (settlemint, id) => {
275620
+ return settlemint.privateKey.restart(id);
275540
275621
  }
275541
275622
  });
275542
275623
  }
@@ -275553,8 +275634,8 @@ function ipfsRestartCommand() {
275553
275634
  type: "storage",
275554
275635
  alias: "ip",
275555
275636
  envKey: "SETTLEMINT_IPFS",
275556
- restartFunction: async (settlemint, uniqueName) => {
275557
- return settlemint.storage.restart(uniqueName);
275637
+ restartFunction: async (settlemint, id) => {
275638
+ return settlemint.storage.restart(id);
275558
275639
  }
275559
275640
  });
275560
275641
  }
@@ -275566,8 +275647,8 @@ function minioRestartCommand() {
275566
275647
  type: "storage",
275567
275648
  alias: "m",
275568
275649
  envKey: "SETTLEMINT_MINIO",
275569
- restartFunction: async (settlemint, uniqueName) => {
275570
- return settlemint.storage.restart(uniqueName);
275650
+ restartFunction: async (settlemint, id) => {
275651
+ return settlemint.storage.restart(id);
275571
275652
  }
275572
275653
  });
275573
275654
  }
@@ -275585,12 +275666,12 @@ function restartCommand() {
275585
275666
 
275586
275667
  // src/commands/platform/custom-deployments/update.ts
275587
275668
  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 }) => {
275669
+ 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
275670
  intro("Updating custom deployment in the SettleMint platform");
275590
275671
  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");
275672
+ const customDeploymentId = id ?? env2.SETTLEMINT_CUSTOM_DEPLOYMENT;
275673
+ if (!customDeploymentId) {
275674
+ 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
275675
  }
275595
275676
  const accessToken = env2.SETTLEMINT_ACCESS_TOKEN;
275596
275677
  if (!accessToken) {
@@ -275604,17 +275685,12 @@ function customDeploymentsUpdateCommand() {
275604
275685
  const customDeployment = await spinner({
275605
275686
  startMessage: "Updating custom deployment",
275606
275687
  task: async () => {
275607
- return settlemint.customDeployment.update(customDeploymentUniqueName, tag);
275688
+ return settlemint.customDeployment.update(customDeploymentId, tag);
275608
275689
  },
275609
275690
  stopMessage: "Custom deployment updated"
275610
275691
  });
275611
275692
  if (wait) {
275612
- await waitForCompletion({
275613
- settlemint,
275614
- type: "custom deployment",
275615
- uniqueName: customDeployment.uniqueName,
275616
- action: "deploy"
275617
- });
275693
+ await waitForCompletion({ settlemint, type: "custom deployment", id: customDeployment.id, action: "deploy" });
275618
275694
  }
275619
275695
  outro(`${customDeployment.name} updated to ${tag}`);
275620
275696
  });
@@ -276003,7 +276079,7 @@ function isHardhatConfig(config4) {
276003
276079
 
276004
276080
  // src/commands/smart-contract-set/hardhat/deploy/remote.ts
276005
276081
  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");
276082
+ 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
276083
  cmd2.action(async ({
276008
276084
  module,
276009
276085
  reset: reset2,
@@ -276014,7 +276090,7 @@ function hardhatDeployRemoteCommand() {
276014
276090
  strategy,
276015
276091
  prod,
276016
276092
  acceptDefaults,
276017
- blockchainNode: blockchainNodeUniqueName
276093
+ blockchainNodeId
276018
276094
  }) => {
276019
276095
  const autoAccept = !!acceptDefaults || is_in_ci_default;
276020
276096
  const env2 = await loadEnv(false, !!prod);
@@ -276027,24 +276103,26 @@ function hardhatDeployRemoteCommand() {
276027
276103
  accessToken,
276028
276104
  instance
276029
276105
  });
276106
+ const nodeId = autoAccept ? env2.SETTLEMINT_BLOCKCHAIN_NODE : blockchainNodeId;
276030
276107
  let node = undefined;
276031
- if (!blockchainNodeUniqueName) {
276032
- const blockchainNodes = await settlemint.blockchainNode.list(env2.SETTLEMINT_APPLICATION);
276033
- if (blockchainNodes.length === 0) {
276034
- cancel2("No blockchain nodes found. Please create a blockchain node and try again.");
276108
+ if (!nodeId) {
276109
+ const nodes = await settlemint.blockchainNode.list(env2.SETTLEMINT_APPLICATION);
276110
+ const evmNodes = nodes.filter((node2) => node2.isEvm);
276111
+ if (evmNodes.length === 0) {
276112
+ cancel2("No EVM blockchain nodes found. Please create an EVM blockchain node and try again.");
276035
276113
  }
276036
- const nodesWithPrivateKey = await Promise.all(blockchainNodes.map((node2) => settlemint.blockchainNode.read(node2.id)));
276114
+ const nodesWithPrivateKey = await Promise.all(evmNodes.map((node2) => settlemint.blockchainNode.read(node2.id)));
276037
276115
  const nodesWithActivePrivateKey = nodesWithPrivateKey.filter((node2) => node2.privateKeys && node2.privateKeys.length > 0);
276038
276116
  if (nodesWithActivePrivateKey.length === 0) {
276039
- cancel2("No blockchain nodes with private keys found. Please activate a private key on your blockchain node and try again.");
276117
+ cancel2("No EVM blockchain nodes with private keys found. Please activate a private key on your EVM blockchain node and try again.");
276040
276118
  }
276041
276119
  const blockchainNode = await blockchainNodePrompt(env2, nodesWithActivePrivateKey, autoAccept);
276042
276120
  if (!blockchainNode) {
276043
- cancel2("No Blockchain Node selected. Please select one to continue.");
276121
+ cancel2("No EVM blockchain node selected. Please select one to continue.");
276044
276122
  }
276045
276123
  node = blockchainNode;
276046
276124
  } else {
276047
- node = await settlemint.blockchainNode.read(blockchainNodeUniqueName);
276125
+ node = await settlemint.blockchainNode.read(nodeId);
276048
276126
  }
276049
276127
  const envConfig = await settlemint.foundry.env(node.id);
276050
276128
  const hardhatConfig = await getHardhatConfigData(envConfig);
@@ -276110,8 +276188,8 @@ function hardhatScriptLocalCommand() {
276110
276188
 
276111
276189
  // src/commands/smart-contract-set/hardhat/script/remote.ts
276112
276190
  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 }) => {
276191
+ 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");
276192
+ cmd2.action(async ({ script, prod, blockchainNodeId, acceptDefaults, compile }) => {
276115
276193
  const autoAccept = !!acceptDefaults || is_in_ci_default;
276116
276194
  const env2 = await loadEnv(false, !!prod);
276117
276195
  const accessToken = env2.SETTLEMINT_ACCESS_TOKEN;
@@ -276123,16 +276201,16 @@ function hardhatScriptRemoteCommand() {
276123
276201
  accessToken,
276124
276202
  instance
276125
276203
  });
276126
- let nodeUniqueName = blockchainNodeUniqueName;
276127
- if (!nodeUniqueName) {
276204
+ let nodeId = blockchainNodeId;
276205
+ if (!nodeId) {
276128
276206
  const blockchainNodes = await settlemint.blockchainNode.list(env2.SETTLEMINT_APPLICATION);
276129
276207
  const blockchainNode = await blockchainNodePrompt(env2, blockchainNodes, autoAccept);
276130
276208
  if (!blockchainNode) {
276131
276209
  cancel2("No Blockchain Node selected. Please select one to continue.");
276132
276210
  }
276133
- nodeUniqueName = blockchainNode.uniqueName;
276211
+ nodeId = blockchainNode.id;
276134
276212
  }
276135
- const envConfig = await settlemint.foundry.env(nodeUniqueName);
276213
+ const envConfig = await settlemint.foundry.env(nodeId);
276136
276214
  const { command, args } = await getPackageManagerExecutable();
276137
276215
  await executeCommand(command, [...args, "hardhat", "run", script, "--network", "btp", ...compile ? ["--no-compile"] : []], { env: envConfig });
276138
276216
  });
@@ -276535,4 +276613,4 @@ sdkcli.parseAsync(process.argv).catch((reason) => {
276535
276613
  cancel2(reason);
276536
276614
  });
276537
276615
 
276538
- //# debugId=F4646A98190C7A9264756E2164756E21
276616
+ //# debugId=24AFA1C0F696C61B64756E2164756E21