@settlemint/sdk-cli 0.7.0-pr24cdbac → 0.7.0-pr2be5bbc

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 +1068 -992
  2. package/dist/cli.js.map +43 -40
  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.x2CRR3emRZ:/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.hOa3Yc8FYy:/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-pr24cdbac",
200567
+ binaryVersion: "0.7.0-pr2be5bbc",
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.x2CRR3emRZ:/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.hOa3Yc8FYy:/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.x2CRR3emRZ:/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.hOa3Yc8FYy:/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.x2CRR3emRZ:/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.hOa3Yc8FYy:/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.x2CRR3emRZ:/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.hOa3Yc8FYy:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin").split(colon)
235217
235217
  ];
235218
235218
  const pathExtExe = isWindows2 ? opt2.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
235219
235219
  const pathExt = isWindows2 ? pathExtExe.split(colon) : [""];
@@ -267675,7 +267675,10 @@ var cancel = (msg) => {
267675
267675
  var ApplicationAccessTokenSchema = z3.string().regex(/^sm_aat_.*$/);
267676
267676
  var PersonalAccessTokenSchema = z3.string().regex(/^sm_pat_.*$/);
267677
267677
  var AccessTokenSchema = z3.string().regex(/^sm_pat_.*|sm_aat_.*$/);
267678
- var UniqueNameSchema = z3.string().regex(/^[a-z0-9-]+$/);
267678
+ var IdSchema = z3.union([
267679
+ z3.string().uuid(),
267680
+ z3.string().regex(/^[0-9a-fA-F]{24}$/)
267681
+ ]);
267679
267682
  var UrlSchema = z3.string().url();
267680
267683
  var UrlPathSchema = z3.string().regex(/^\/(?:[a-zA-Z0-9-_]+(?:\/[a-zA-Z0-9-_]+)*\/?)?$/, {
267681
267684
  message: "Invalid URL path format. Must start with '/' and can contain letters, numbers, hyphens, and underscores."
@@ -267685,33 +267688,33 @@ var DotEnvSchema = z3.object({
267685
267688
  SETTLEMINT_INSTANCE: UrlSchema.default("https://console.settlemint.com"),
267686
267689
  SETTLEMINT_ACCESS_TOKEN: ApplicationAccessTokenSchema.optional(),
267687
267690
  SETTLEMINT_PERSONAL_ACCESS_TOKEN: PersonalAccessTokenSchema.optional(),
267688
- SETTLEMINT_WORKSPACE: UniqueNameSchema.optional(),
267689
- SETTLEMINT_APPLICATION: UniqueNameSchema.optional(),
267690
- SETTLEMINT_BLOCKCHAIN_NETWORK: UniqueNameSchema.optional(),
267691
- SETTLEMINT_BLOCKCHAIN_NODE: UniqueNameSchema.optional(),
267692
- SETTLEMINT_LOAD_BALANCER: UniqueNameSchema.optional(),
267693
- SETTLEMINT_HASURA: UniqueNameSchema.optional(),
267691
+ SETTLEMINT_WORKSPACE: IdSchema.optional(),
267692
+ SETTLEMINT_APPLICATION: IdSchema.optional(),
267693
+ SETTLEMINT_BLOCKCHAIN_NETWORK: IdSchema.optional(),
267694
+ SETTLEMINT_BLOCKCHAIN_NODE: IdSchema.optional(),
267695
+ SETTLEMINT_LOAD_BALANCER: IdSchema.optional(),
267696
+ SETTLEMINT_HASURA: IdSchema.optional(),
267694
267697
  SETTLEMINT_HASURA_ENDPOINT: UrlSchema.optional(),
267695
267698
  SETTLEMINT_HASURA_ADMIN_SECRET: z3.string().optional(),
267696
267699
  SETTLEMINT_HASURA_DATABASE_URL: z3.string().optional(),
267697
- SETTLEMINT_THEGRAPH: UniqueNameSchema.optional(),
267700
+ SETTLEMINT_THEGRAPH: IdSchema.optional(),
267698
267701
  SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS: z3.preprocess((value4) => tryParseJson(value4, []), z3.array(UrlSchema).optional()),
267699
267702
  SETTLEMINT_THEGRAPH_SUBGRAPH_NAME: z3.string().optional(),
267700
- SETTLEMINT_PORTAL: UniqueNameSchema.optional(),
267703
+ SETTLEMINT_PORTAL: IdSchema.optional(),
267701
267704
  SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT: UrlSchema.optional(),
267702
267705
  SETTLEMINT_PORTAL_REST_ENDPOINT: UrlSchema.optional(),
267703
- SETTLEMINT_HD_PRIVATE_KEY: UniqueNameSchema.optional(),
267704
- SETTLEMINT_MINIO: UniqueNameSchema.optional(),
267706
+ SETTLEMINT_HD_PRIVATE_KEY: z3.string().optional(),
267707
+ SETTLEMINT_MINIO: IdSchema.optional(),
267705
267708
  SETTLEMINT_MINIO_ENDPOINT: UrlSchema.optional(),
267706
267709
  SETTLEMINT_MINIO_ACCESS_KEY: z3.string().optional(),
267707
267710
  SETTLEMINT_MINIO_SECRET_KEY: z3.string().optional(),
267708
- SETTLEMINT_IPFS: UniqueNameSchema.optional(),
267711
+ SETTLEMINT_IPFS: IdSchema.optional(),
267709
267712
  SETTLEMINT_IPFS_API_ENDPOINT: UrlSchema.optional(),
267710
267713
  SETTLEMINT_IPFS_PINNING_ENDPOINT: UrlSchema.optional(),
267711
267714
  SETTLEMINT_IPFS_GATEWAY_ENDPOINT: UrlSchema.optional(),
267712
- SETTLEMINT_CUSTOM_DEPLOYMENT: UniqueNameSchema.optional(),
267715
+ SETTLEMINT_CUSTOM_DEPLOYMENT: IdSchema.optional(),
267713
267716
  SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT: UrlSchema.optional(),
267714
- SETTLEMINT_BLOCKSCOUT: UniqueNameSchema.optional(),
267717
+ SETTLEMINT_BLOCKSCOUT: IdSchema.optional(),
267715
267718
  SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT: UrlSchema.optional(),
267716
267719
  SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT: UrlSchema.optional(),
267717
267720
  SETTLEMINT_NEW_PROJECT_NAME: z3.string().optional(),
@@ -267719,10 +267722,6 @@ var DotEnvSchema = z3.object({
267719
267722
  SETTLEMINT_SMART_CONTRACT_DEPLOYMENT_ID: z3.string().optional()
267720
267723
  });
267721
267724
  var DotEnvSchemaPartial = DotEnvSchema.partial();
267722
- var IdSchema = z3.union([
267723
- z3.string().uuid(),
267724
- z3.string().regex(/^[0-9a-fA-F]{24}$/)
267725
- ]);
267726
267725
  function validate(schema, value4) {
267727
267726
  try {
267728
267727
  return schema.parse(value4);
@@ -269973,7 +269972,10 @@ function tryParseJson2(value4, defaultValue = null) {
269973
269972
  return defaultValue;
269974
269973
  }
269975
269974
  }
269976
- var UniqueNameSchema2 = z3.string().regex(/^[a-z0-9-]+$/);
269975
+ var IdSchema2 = z3.union([
269976
+ z3.string().uuid(),
269977
+ z3.string().regex(/^[0-9a-fA-F]{24}$/)
269978
+ ]);
269977
269979
  var UrlSchema2 = z3.string().url();
269978
269980
  var UrlPathSchema2 = z3.string().regex(/^\/(?:[a-zA-Z0-9-_]+(?:\/[a-zA-Z0-9-_]+)*\/?)?$/, {
269979
269981
  message: "Invalid URL path format. Must start with '/' and can contain letters, numbers, hyphens, and underscores."
@@ -269983,33 +269985,33 @@ var DotEnvSchema2 = z3.object({
269983
269985
  SETTLEMINT_INSTANCE: UrlSchema2.default("https://console.settlemint.com"),
269984
269986
  SETTLEMINT_ACCESS_TOKEN: ApplicationAccessTokenSchema2.optional(),
269985
269987
  SETTLEMINT_PERSONAL_ACCESS_TOKEN: PersonalAccessTokenSchema2.optional(),
269986
- SETTLEMINT_WORKSPACE: UniqueNameSchema2.optional(),
269987
- SETTLEMINT_APPLICATION: UniqueNameSchema2.optional(),
269988
- SETTLEMINT_BLOCKCHAIN_NETWORK: UniqueNameSchema2.optional(),
269989
- SETTLEMINT_BLOCKCHAIN_NODE: UniqueNameSchema2.optional(),
269990
- SETTLEMINT_LOAD_BALANCER: UniqueNameSchema2.optional(),
269991
- SETTLEMINT_HASURA: UniqueNameSchema2.optional(),
269988
+ SETTLEMINT_WORKSPACE: IdSchema2.optional(),
269989
+ SETTLEMINT_APPLICATION: IdSchema2.optional(),
269990
+ SETTLEMINT_BLOCKCHAIN_NETWORK: IdSchema2.optional(),
269991
+ SETTLEMINT_BLOCKCHAIN_NODE: IdSchema2.optional(),
269992
+ SETTLEMINT_LOAD_BALANCER: IdSchema2.optional(),
269993
+ SETTLEMINT_HASURA: IdSchema2.optional(),
269992
269994
  SETTLEMINT_HASURA_ENDPOINT: UrlSchema2.optional(),
269993
269995
  SETTLEMINT_HASURA_ADMIN_SECRET: z3.string().optional(),
269994
269996
  SETTLEMINT_HASURA_DATABASE_URL: z3.string().optional(),
269995
- SETTLEMINT_THEGRAPH: UniqueNameSchema2.optional(),
269997
+ SETTLEMINT_THEGRAPH: IdSchema2.optional(),
269996
269998
  SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS: z3.preprocess((value4) => tryParseJson2(value4, []), z3.array(UrlSchema2).optional()),
269997
269999
  SETTLEMINT_THEGRAPH_SUBGRAPH_NAME: z3.string().optional(),
269998
- SETTLEMINT_PORTAL: UniqueNameSchema2.optional(),
270000
+ SETTLEMINT_PORTAL: IdSchema2.optional(),
269999
270001
  SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT: UrlSchema2.optional(),
270000
270002
  SETTLEMINT_PORTAL_REST_ENDPOINT: UrlSchema2.optional(),
270001
- SETTLEMINT_HD_PRIVATE_KEY: UniqueNameSchema2.optional(),
270002
- SETTLEMINT_MINIO: UniqueNameSchema2.optional(),
270003
+ SETTLEMINT_HD_PRIVATE_KEY: z3.string().optional(),
270004
+ SETTLEMINT_MINIO: IdSchema2.optional(),
270003
270005
  SETTLEMINT_MINIO_ENDPOINT: UrlSchema2.optional(),
270004
270006
  SETTLEMINT_MINIO_ACCESS_KEY: z3.string().optional(),
270005
270007
  SETTLEMINT_MINIO_SECRET_KEY: z3.string().optional(),
270006
- SETTLEMINT_IPFS: UniqueNameSchema2.optional(),
270008
+ SETTLEMINT_IPFS: IdSchema2.optional(),
270007
270009
  SETTLEMINT_IPFS_API_ENDPOINT: UrlSchema2.optional(),
270008
270010
  SETTLEMINT_IPFS_PINNING_ENDPOINT: UrlSchema2.optional(),
270009
270011
  SETTLEMINT_IPFS_GATEWAY_ENDPOINT: UrlSchema2.optional(),
270010
- SETTLEMINT_CUSTOM_DEPLOYMENT: UniqueNameSchema2.optional(),
270012
+ SETTLEMINT_CUSTOM_DEPLOYMENT: IdSchema2.optional(),
270011
270013
  SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT: UrlSchema2.optional(),
270012
- SETTLEMINT_BLOCKSCOUT: UniqueNameSchema2.optional(),
270014
+ SETTLEMINT_BLOCKSCOUT: IdSchema2.optional(),
270013
270015
  SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT: UrlSchema2.optional(),
270014
270016
  SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT: UrlSchema2.optional(),
270015
270017
  SETTLEMINT_NEW_PROJECT_NAME: z3.string().optional(),
@@ -270017,10 +270019,6 @@ var DotEnvSchema2 = z3.object({
270017
270019
  SETTLEMINT_SMART_CONTRACT_DEPLOYMENT_ID: z3.string().optional()
270018
270020
  });
270019
270021
  var DotEnvSchemaPartial2 = DotEnvSchema2.partial();
270020
- var IdSchema2 = z3.union([
270021
- z3.string().uuid(),
270022
- z3.string().regex(/^[0-9a-fA-F]{24}$/)
270023
- ]);
270024
270022
  function validate2(schema, value4) {
270025
270023
  try {
270026
270024
  return schema.parse(value4);
@@ -270629,7 +270627,10 @@ function tryParseJson3(value4, defaultValue = null) {
270629
270627
  return defaultValue;
270630
270628
  }
270631
270629
  }
270632
- var UniqueNameSchema3 = z3.string().regex(/^[a-z0-9-]+$/);
270630
+ var IdSchema3 = z3.union([
270631
+ z3.string().uuid(),
270632
+ z3.string().regex(/^[0-9a-fA-F]{24}$/)
270633
+ ]);
270633
270634
  var UrlSchema3 = z3.string().url();
270634
270635
  var UrlPathSchema3 = z3.string().regex(/^\/(?:[a-zA-Z0-9-_]+(?:\/[a-zA-Z0-9-_]+)*\/?)?$/, {
270635
270636
  message: "Invalid URL path format. Must start with '/' and can contain letters, numbers, hyphens, and underscores."
@@ -270639,33 +270640,33 @@ var DotEnvSchema3 = z3.object({
270639
270640
  SETTLEMINT_INSTANCE: UrlSchema3.default("https://console.settlemint.com"),
270640
270641
  SETTLEMINT_ACCESS_TOKEN: ApplicationAccessTokenSchema3.optional(),
270641
270642
  SETTLEMINT_PERSONAL_ACCESS_TOKEN: PersonalAccessTokenSchema3.optional(),
270642
- SETTLEMINT_WORKSPACE: UniqueNameSchema3.optional(),
270643
- SETTLEMINT_APPLICATION: UniqueNameSchema3.optional(),
270644
- SETTLEMINT_BLOCKCHAIN_NETWORK: UniqueNameSchema3.optional(),
270645
- SETTLEMINT_BLOCKCHAIN_NODE: UniqueNameSchema3.optional(),
270646
- SETTLEMINT_LOAD_BALANCER: UniqueNameSchema3.optional(),
270647
- SETTLEMINT_HASURA: UniqueNameSchema3.optional(),
270643
+ SETTLEMINT_WORKSPACE: IdSchema3.optional(),
270644
+ SETTLEMINT_APPLICATION: IdSchema3.optional(),
270645
+ SETTLEMINT_BLOCKCHAIN_NETWORK: IdSchema3.optional(),
270646
+ SETTLEMINT_BLOCKCHAIN_NODE: IdSchema3.optional(),
270647
+ SETTLEMINT_LOAD_BALANCER: IdSchema3.optional(),
270648
+ SETTLEMINT_HASURA: IdSchema3.optional(),
270648
270649
  SETTLEMINT_HASURA_ENDPOINT: UrlSchema3.optional(),
270649
270650
  SETTLEMINT_HASURA_ADMIN_SECRET: z3.string().optional(),
270650
270651
  SETTLEMINT_HASURA_DATABASE_URL: z3.string().optional(),
270651
- SETTLEMINT_THEGRAPH: UniqueNameSchema3.optional(),
270652
+ SETTLEMINT_THEGRAPH: IdSchema3.optional(),
270652
270653
  SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS: z3.preprocess((value4) => tryParseJson3(value4, []), z3.array(UrlSchema3).optional()),
270653
270654
  SETTLEMINT_THEGRAPH_SUBGRAPH_NAME: z3.string().optional(),
270654
- SETTLEMINT_PORTAL: UniqueNameSchema3.optional(),
270655
+ SETTLEMINT_PORTAL: IdSchema3.optional(),
270655
270656
  SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT: UrlSchema3.optional(),
270656
270657
  SETTLEMINT_PORTAL_REST_ENDPOINT: UrlSchema3.optional(),
270657
- SETTLEMINT_HD_PRIVATE_KEY: UniqueNameSchema3.optional(),
270658
- SETTLEMINT_MINIO: UniqueNameSchema3.optional(),
270658
+ SETTLEMINT_HD_PRIVATE_KEY: z3.string().optional(),
270659
+ SETTLEMINT_MINIO: IdSchema3.optional(),
270659
270660
  SETTLEMINT_MINIO_ENDPOINT: UrlSchema3.optional(),
270660
270661
  SETTLEMINT_MINIO_ACCESS_KEY: z3.string().optional(),
270661
270662
  SETTLEMINT_MINIO_SECRET_KEY: z3.string().optional(),
270662
- SETTLEMINT_IPFS: UniqueNameSchema3.optional(),
270663
+ SETTLEMINT_IPFS: IdSchema3.optional(),
270663
270664
  SETTLEMINT_IPFS_API_ENDPOINT: UrlSchema3.optional(),
270664
270665
  SETTLEMINT_IPFS_PINNING_ENDPOINT: UrlSchema3.optional(),
270665
270666
  SETTLEMINT_IPFS_GATEWAY_ENDPOINT: UrlSchema3.optional(),
270666
- SETTLEMINT_CUSTOM_DEPLOYMENT: UniqueNameSchema3.optional(),
270667
+ SETTLEMINT_CUSTOM_DEPLOYMENT: IdSchema3.optional(),
270667
270668
  SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT: UrlSchema3.optional(),
270668
- SETTLEMINT_BLOCKSCOUT: UniqueNameSchema3.optional(),
270669
+ SETTLEMINT_BLOCKSCOUT: IdSchema3.optional(),
270669
270670
  SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT: UrlSchema3.optional(),
270670
270671
  SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT: UrlSchema3.optional(),
270671
270672
  SETTLEMINT_NEW_PROJECT_NAME: z3.string().optional(),
@@ -270673,10 +270674,6 @@ var DotEnvSchema3 = z3.object({
270673
270674
  SETTLEMINT_SMART_CONTRACT_DEPLOYMENT_ID: z3.string().optional()
270674
270675
  });
270675
270676
  var DotEnvSchemaPartial3 = DotEnvSchema3.partial();
270676
- var IdSchema3 = z3.union([
270677
- z3.string().uuid(),
270678
- z3.string().regex(/^[0-9a-fA-F]{24}$/)
270679
- ]);
270680
270677
  function validate3(schema, value4) {
270681
270678
  try {
270682
270679
  return schema.parse(value4);
@@ -271281,256 +271278,95 @@ var t7 = initGraphQLTada();
271281
271278
 
271282
271279
  // ../js/dist/settlemint.mjs
271283
271280
  var graphql = initGraphQLTada();
271281
+ var createApplicationAccessToken = graphql(`
271282
+ mutation CreateApplicationAccessToken($applicationId: ID!, $blockchainNetworkScope: BlockchainNetworkScopeInputType!, $blockchainNodeScope: BlockchainNodeScopeInputType!, $customDeploymentScope: CustomDeploymentScopeInputType!, $insightsScope: InsightsScopeInputType!, $integrationScope: IntegrationScopeInputType!, $loadBalancerScope: LoadBalancerScopeInputType!, $middlewareScope: MiddlewareScopeInputType!, $name: String!, $privateKeyScope: PrivateKeyScopeInputType!, $smartContractSetScope: SmartContractSetScopeInputType!, $storageScope: StorageScopeInputType!, $validityPeriod: AccessTokenValidityPeriod!) {
271283
+ createApplicationAccessToken(applicationId: $applicationId, blockchainNetworkScope: $blockchainNetworkScope, blockchainNodeScope: $blockchainNodeScope, customDeploymentScope: $customDeploymentScope, insightsScope: $insightsScope, integrationScope: $integrationScope, loadBalancerScope: $loadBalancerScope, middlewareScope: $middlewareScope, name: $name, privateKeyScope: $privateKeyScope, smartContractSetScope: $smartContractSetScope, storageScope: $storageScope, validityPeriod: $validityPeriod) {
271284
+ token
271285
+ }
271286
+ }
271287
+ `, []);
271288
+ var applicationAccessTokenCreate = (gqlClient, options) => {
271289
+ return async (args) => {
271290
+ validate3(IdSchema3, args.applicationId);
271291
+ const { createApplicationAccessToken: applicationAccessToken } = await gqlClient.request(createApplicationAccessToken, args);
271292
+ if (!applicationAccessToken.token) {
271293
+ throw new Error("Failed to create application access token");
271294
+ }
271295
+ return applicationAccessToken.token;
271296
+ };
271297
+ };
271284
271298
  var ApplicationFragment = graphql(`
271285
271299
  fragment Application on Application {
271286
271300
  id
271287
- uniqueName
271288
271301
  name
271289
- workspace {
271290
- id
271291
- uniqueName
271292
- }
271302
+ workspace { id }
271293
271303
  }
271294
271304
  `);
271295
- var WorkspaceFragment = graphql(`
271296
- fragment Workspace on Workspace {
271297
- id
271298
- uniqueName
271299
- name
271305
+ var listApplications = graphql(`
271306
+ query ListApplications($workspaceId: ID!) {
271307
+ workspace (workspaceId: $workspaceId) {
271300
271308
  applications {
271301
271309
  ...Application
271302
271310
  }
271303
271311
  }
271304
- `, [ApplicationFragment]);
271305
- var getWorkspacesAndApplications = graphql(`
271306
- query getWorkspacesAndApplications {
271307
- workspaces {
271308
- ...Workspace
271309
- applications {
271310
- ...Application
271311
- }
271312
- childWorkspaces {
271313
- ...Workspace
271314
- }
271315
- }
271316
- }
271317
- `, [WorkspaceFragment, ApplicationFragment]);
271318
- var getWorkspace = graphql(`
271319
- query getWorkspace($uniqueName: String!) {
271320
- workspaceByUniqueName(uniqueName: $uniqueName) {
271321
- ...Workspace
271322
- applications {
271323
- ...Application
271324
- }
271325
- }
271326
- }
271327
- `, [WorkspaceFragment, ApplicationFragment]);
271328
- var createWorkspace = graphql(`
271329
- mutation CreateWorkspace(
271330
- $addressLine1: String
271331
- $addressLine2: String
271332
- $city: String
271333
- $companyName: String
271334
- $country: String
271335
- $name: String!
271336
- $parentId: String
271337
- $paymentMethodId: String
271338
- $postalCode: String
271339
- $taxIdType: String
271340
- $taxIdValue: String
271341
- ) {
271342
- createWorkspace(
271343
- addressLine1: $addressLine1
271344
- addressLine2: $addressLine2
271345
- city: $city
271346
- companyName: $companyName
271347
- country: $country
271348
- name: $name
271349
- parentId: $parentId
271350
- paymentMethodId: $paymentMethodId
271351
- postalCode: $postalCode
271352
- taxIdType: $taxIdType
271353
- taxIdValue: $taxIdValue
271354
- ) {
271355
- ...Workspace
271356
- applications {
271357
- ...Application
271358
- }
271359
- }
271360
- }
271361
- `, [WorkspaceFragment, ApplicationFragment]);
271362
- var deleteWorkspace = graphql(`
271363
- mutation deleteWorkspace($id: ID!) {
271364
- deleteWorkspace(workspaceId: $id) {
271365
- ...Workspace
271366
- applications {
271367
- ...Application
271368
- }
271369
- }
271370
- }
271371
- `, [WorkspaceFragment, ApplicationFragment]);
271372
- var addCredits = graphql(`
271373
- mutation addCredits($workspaceId: String!, $amount: Float!) {
271374
- addCredits(workspaceId: $workspaceId, amount: $amount)
271375
- }
271376
- `);
271377
- var workspaceList = (gqlClient, options) => {
271378
- return async () => {
271379
- const { workspaces } = await gqlClient.request(getWorkspacesAndApplications);
271380
- const allWorkspaces = workspaces.reduce((acc, workspace) => {
271381
- acc.push(workspace);
271382
- if (workspace.childWorkspaces) {
271383
- acc.push(...workspace.childWorkspaces);
271384
- }
271385
- return acc;
271386
- }, []);
271387
- return allWorkspaces.sort((a8, b4) => a8.name.localeCompare(b4.name));
271388
- };
271389
- };
271390
- var workspaceRead = (gqlClient, options) => {
271391
- return async (workspaceUniqueName) => {
271392
- const { workspaceByUniqueName } = await gqlClient.request(getWorkspace, { uniqueName: workspaceUniqueName });
271393
- return workspaceByUniqueName;
271394
- };
271395
- };
271396
- var workspaceCreate = (gqlClient, options) => {
271397
- return async (createWorkspaceArgs) => {
271398
- const { createWorkspace: workspace } = await gqlClient.request(createWorkspace, createWorkspaceArgs);
271399
- return workspace;
271400
- };
271401
- };
271402
- var workspaceDelete = (gqlClient, options) => {
271403
- return async (workspaceUniqueName) => {
271404
- const workspaceToDelete = await workspaceRead(gqlClient, options)(workspaceUniqueName);
271405
- const { deleteWorkspace: workspace } = await gqlClient.request(deleteWorkspace, { id: workspaceToDelete.id });
271406
- return workspace;
271407
- };
271408
- };
271409
- var workspaceAddCredits = (gqlClient, options) => {
271410
- return async (workspaceId, amount) => {
271411
- const id = validate3(IdSchema3, workspaceId);
271412
- if (amount <= 0) {
271413
- throw new Error("Credit amount must be a positive number");
271414
- }
271415
- const { addCredits: result } = await gqlClient.request(addCredits, { workspaceId: id, amount });
271416
- return result;
271417
- };
271418
- };
271419
- var listApplications = graphql(`
271420
- query ListApplications($workspaceUniqueName: String!) {
271421
- workspaceByUniqueName(uniqueName: $workspaceUniqueName) {
271422
- applications {
271423
- ...Application
271424
- }
271425
- }
271426
- }
271312
+ }
271427
271313
  `, [ApplicationFragment]);
271428
271314
  var readApplication = graphql(`
271429
- query ReadApplication($applicationUniqueName: String!) {
271430
- applicationByUniqueName(uniqueName: $applicationUniqueName) {
271431
- ...Application
271432
- }
271315
+ query ReadApplication($id: ID!) {
271316
+ application(applicationId: $id) {
271317
+ ...Application
271433
271318
  }
271319
+ }
271434
271320
  `, [ApplicationFragment]);
271435
271321
  var createApplication = graphql(`
271436
- mutation CreateApplication($name: String!, $workspaceId: ID!) {
271437
- createApplication(name: $name, workspaceId: $workspaceId) {
271438
- ...Application
271439
- }
271322
+ mutation CreateApplication(
271323
+ $name: String!
271324
+ $workspaceId: ID!
271325
+ ) {
271326
+ createApplication(
271327
+ name: $name
271328
+ workspaceId: $workspaceId
271329
+ ) {
271330
+ ...Application
271440
271331
  }
271332
+ }
271441
271333
  `, [ApplicationFragment]);
271442
271334
  var deleteApplication = graphql(`
271443
- mutation DeleteApplication($id: ID!) {
271444
- deleteApplication(id: $id) {
271445
- ...Application
271446
- }
271335
+ mutation DeleteApplication($id: ID!) {
271336
+ deleteApplication(id: $id) {
271337
+ ...Application
271447
271338
  }
271339
+ }
271448
271340
  `, [ApplicationFragment]);
271449
271341
  var applicationList = (gqlClient, options) => {
271450
- return async (workspaceUniqueName) => {
271342
+ return async (workspaceId) => {
271343
+ const id = validate3(IdSchema3, workspaceId);
271451
271344
  const {
271452
- workspaceByUniqueName: { applications }
271453
- } = await gqlClient.request(listApplications, { workspaceUniqueName });
271345
+ workspace: { applications }
271346
+ } = await gqlClient.request(listApplications, { workspaceId: id });
271454
271347
  return applications;
271455
271348
  };
271456
271349
  };
271457
271350
  var applicationRead = (gqlClient, options) => {
271458
- return async (applicationUniqueName) => {
271459
- const { applicationByUniqueName: application } = await gqlClient.request(readApplication, {
271460
- applicationUniqueName
271461
- });
271351
+ return async (applicationId) => {
271352
+ const id = validate3(IdSchema3, applicationId);
271353
+ const { application } = await gqlClient.request(readApplication, { id });
271462
271354
  return application;
271463
271355
  };
271464
271356
  };
271465
271357
  var applicationCreate = (gqlClient, options) => {
271466
271358
  return async (args) => {
271467
- const { workspaceUniqueName, ...otherArgs } = args;
271468
- const workspace = await workspaceRead(gqlClient, options)(workspaceUniqueName);
271469
- const { createApplication: application } = await gqlClient.request(createApplication, {
271470
- ...otherArgs,
271471
- workspaceId: workspace.id
271472
- });
271359
+ const { createApplication: application } = await gqlClient.request(createApplication, args);
271473
271360
  return application;
271474
271361
  };
271475
271362
  };
271476
271363
  var applicationDelete = (gqlClient, options) => {
271477
- return async (applicationUniqueName) => {
271478
- const applicationToDelete = await applicationRead(gqlClient, options)(applicationUniqueName);
271479
- const { deleteApplication: application } = await gqlClient.request(deleteApplication, {
271480
- id: applicationToDelete.id
271481
- });
271364
+ return async (applicationId) => {
271365
+ const id = validate3(IdSchema3, applicationId);
271366
+ const { deleteApplication: application } = await gqlClient.request(deleteApplication, { id });
271482
271367
  return application;
271483
271368
  };
271484
271369
  };
271485
- var createApplicationAccessToken = graphql(`
271486
- mutation CreateApplicationAccessToken(
271487
- $applicationId: ID!,
271488
- $blockchainNetworkScope: BlockchainNetworkScopeInputType!,
271489
- $blockchainNodeScope: BlockchainNodeScopeInputType!,
271490
- $customDeploymentScope: CustomDeploymentScopeInputType!,
271491
- $insightsScope: InsightsScopeInputType!,
271492
- $integrationScope: IntegrationScopeInputType!,
271493
- $loadBalancerScope: LoadBalancerScopeInputType!,
271494
- $middlewareScope: MiddlewareScopeInputType!,
271495
- $name: String!,
271496
- $privateKeyScope: PrivateKeyScopeInputType!,
271497
- $smartContractSetScope: SmartContractSetScopeInputType!,
271498
- $storageScope: StorageScopeInputType!,
271499
- $validityPeriod: AccessTokenValidityPeriod!
271500
- ) {
271501
- createApplicationAccessToken(
271502
- applicationId: $applicationId,
271503
- blockchainNetworkScope: $blockchainNetworkScope,
271504
- blockchainNodeScope: $blockchainNodeScope,
271505
- customDeploymentScope: $customDeploymentScope,
271506
- insightsScope: $insightsScope,
271507
- integrationScope: $integrationScope,
271508
- loadBalancerScope: $loadBalancerScope,
271509
- middlewareScope: $middlewareScope,
271510
- name: $name,
271511
- privateKeyScope: $privateKeyScope,
271512
- smartContractSetScope: $smartContractSetScope,
271513
- storageScope: $storageScope,
271514
- validityPeriod: $validityPeriod
271515
- ) {
271516
- token
271517
- }
271518
- }
271519
- `, []);
271520
- var applicationAccessTokenCreate = (gqlClient, options) => {
271521
- return async (args) => {
271522
- const { applicationUniqueName, ...otherArgs } = args;
271523
- const application = await applicationRead(gqlClient, options)(applicationUniqueName);
271524
- const { createApplicationAccessToken: applicationAccessToken } = await gqlClient.request(createApplicationAccessToken, {
271525
- ...otherArgs,
271526
- applicationId: application.id
271527
- });
271528
- if (!applicationAccessToken.token) {
271529
- throw new Error("Failed to create application access token");
271530
- }
271531
- return applicationAccessToken.token;
271532
- };
271533
- };
271534
271370
  function setClusterServiceDefaults(args) {
271535
271371
  return {
271536
271372
  ...args,
@@ -271557,34 +271393,31 @@ var BlockchainNetworkFragment = graphql(`
271557
271393
  fragment BlockchainNetwork on BlockchainNetwork {
271558
271394
  __typename
271559
271395
  id
271560
- uniqueName
271561
271396
  name
271562
271397
  status
271563
271398
  blockchainNodes {
271564
271399
  ... on BlockchainNode {
271565
271400
  id
271566
271401
  name
271567
- uniqueName
271568
271402
  }
271569
271403
  }
271570
271404
  }
271571
271405
  `);
271572
271406
  var getBlockchainNetworks = graphql(`
271573
- query getBlockchainNetworks($applicationUniqueName: String!) {
271574
- blockchainNetworksByUniqueName(applicationUniqueName: $applicationUniqueName) {
271575
- items {
271576
- ...BlockchainNetwork
271577
- }
271578
- }
271407
+ query getBlockchainNetworks($id: ID!) {
271408
+ blockchainNetworks(applicationId: $id) {
271409
+ items {
271410
+ ...BlockchainNetwork
271579
271411
  }
271580
- `, [BlockchainNetworkFragment]);
271412
+ }
271413
+ }`, [BlockchainNetworkFragment]);
271581
271414
  var getBlockchainNetwork = graphql(`
271582
- query getBlockchainNetwork($uniqueName: String!) {
271583
- blockchainNetworkByUniqueName(uniqueName: $uniqueName) {
271584
- ...BlockchainNetwork
271585
- }
271415
+ query getBlockchainNetwork($id: ID!) {
271416
+ blockchainNetwork(entityId: $id) {
271417
+ ...BlockchainNetwork
271586
271418
  }
271587
- `, [BlockchainNetworkFragment]);
271419
+ }
271420
+ `, [BlockchainNetworkFragment]);
271588
271421
  var createBlockchainNetwork = graphql(`
271589
271422
  mutation createBlockchainNetwork(
271590
271423
  $applicationId: ID!
@@ -271645,67 +271478,65 @@ var createBlockchainNetwork = graphql(`
271645
271478
  ...BlockchainNetwork
271646
271479
  }
271647
271480
  }
271648
- `, [BlockchainNetworkFragment]);
271481
+ `, [BlockchainNetworkFragment]);
271649
271482
  var deleteBlockchainNetwork = graphql(`
271650
- mutation deleteBlockchainNetwork($uniqueName: String!) {
271651
- deleteBlockchainNetworkByUniqueName(uniqueName: $uniqueName) {
271483
+ mutation deleteBlockchainNetwork($blockchainNetworkId: ID!) {
271484
+ deleteBlockchainNetwork(entityId: $blockchainNetworkId) {
271652
271485
  ...BlockchainNetwork
271653
271486
  }
271654
271487
  }
271655
- `, [BlockchainNetworkFragment]);
271488
+ `, [BlockchainNetworkFragment]);
271656
271489
  var restartBlockchainNetwork = graphql(`
271657
- mutation RestartBlockchainNetwork($uniqueName: String!) {
271658
- restartBlockchainNetworkByUniqueName(uniqueName: $uniqueName) {
271490
+ mutation RestartBlockchainNetwork($id: ID!) {
271491
+ restartBlockchainNetwork(entityId: $id) {
271659
271492
  ...BlockchainNetwork
271660
271493
  }
271661
271494
  }
271662
- `, [BlockchainNetworkFragment]);
271495
+ `, [BlockchainNetworkFragment]);
271663
271496
  var blockchainNetworkList = (gqlClient, options) => {
271664
- return async (applicationUniqueName) => {
271497
+ return async (applicationId) => {
271498
+ const id = validate3(IdSchema3, applicationId);
271665
271499
  const {
271666
- blockchainNetworksByUniqueName: { items }
271667
- } = await gqlClient.request(getBlockchainNetworks, { applicationUniqueName });
271500
+ blockchainNetworks: { items }
271501
+ } = await gqlClient.request(getBlockchainNetworks, { id });
271668
271502
  return items;
271669
271503
  };
271670
271504
  };
271671
271505
  var blockchainNetworkRead = (gqlClient, options) => {
271672
- return async (blockchainNetworkUniqueName) => {
271673
- const { blockchainNetworkByUniqueName } = await gqlClient.request(getBlockchainNetwork, {
271674
- uniqueName: blockchainNetworkUniqueName
271675
- });
271676
- return blockchainNetworkByUniqueName;
271506
+ return async (blockchainNetworkId) => {
271507
+ const id = validate3(IdSchema3, blockchainNetworkId);
271508
+ const { blockchainNetwork } = await gqlClient.request(getBlockchainNetwork, { id });
271509
+ return blockchainNetwork;
271677
271510
  };
271678
271511
  };
271679
271512
  var blockchainNetworkCreate = (gqlClient, options) => {
271680
271513
  return async (args) => {
271681
- const { applicationUniqueName, ...otherArgs } = args;
271682
- const application = await applicationRead(gqlClient, options)(applicationUniqueName);
271683
- const blockchainNetworkArgs = setNetworkDefaults(otherArgs);
271684
- const { createBlockchainNetwork: blockchainNetwork } = await gqlClient.request(createBlockchainNetwork, {
271685
- ...blockchainNetworkArgs,
271686
- applicationId: application.id
271687
- });
271514
+ const blockchainNetworkArgs = setNetworkDefaults(args);
271515
+ validate3(IdSchema3, blockchainNetworkArgs.applicationId);
271516
+ const { createBlockchainNetwork: blockchainNetwork } = await gqlClient.request(createBlockchainNetwork, blockchainNetworkArgs);
271688
271517
  return blockchainNetwork;
271689
271518
  };
271690
271519
  };
271691
271520
  var blockchainNetworkDelete = (gqlClient, options) => {
271692
- return async (blockchainNetworkUniqueName) => {
271693
- const { deleteBlockchainNetworkByUniqueName: blockchainNetwork } = await gqlClient.request(deleteBlockchainNetwork, {
271694
- uniqueName: blockchainNetworkUniqueName
271521
+ return async (networkId) => {
271522
+ const id = validate3(IdSchema3, networkId);
271523
+ const { deleteBlockchainNetwork: blockchainNetwork } = await gqlClient.request(deleteBlockchainNetwork, {
271524
+ blockchainNetworkId: id
271695
271525
  });
271696
271526
  return blockchainNetwork;
271697
271527
  };
271698
271528
  };
271699
- var blockchainNetworkRestart = (gqlClient, _options) => async (blockchainNetworkUniqueName) => {
271700
- const { restartBlockchainNetworkByUniqueName: blockchainNetwork } = await gqlClient.request(restartBlockchainNetwork, { uniqueName: blockchainNetworkUniqueName });
271529
+ var blockchainNetworkRestart = (gqlClient, _options) => async (networkId) => {
271530
+ const id = validate3(IdSchema3, networkId);
271531
+ const { restartBlockchainNetwork: blockchainNetwork } = await gqlClient.request(restartBlockchainNetwork, { id });
271701
271532
  return blockchainNetwork;
271702
271533
  };
271703
271534
  var BlockchainNodeFragment = graphql(`
271704
271535
  fragment BlockchainNode on BlockchainNode {
271705
271536
  __typename
271706
271537
  id
271707
- uniqueName
271708
271538
  name
271539
+ uniqueName
271709
271540
  status
271710
271541
  endpoints {
271711
271542
  id
@@ -271721,7 +271552,6 @@ var BlockchainNodeFragment = graphql(`
271721
271552
  ... on AbstractClusterService {
271722
271553
  id
271723
271554
  name
271724
- uniqueName
271725
271555
  }
271726
271556
  }
271727
271557
  privateKeys {
@@ -271735,96 +271565,86 @@ var BlockchainNodeFragment = graphql(`
271735
271565
  }
271736
271566
  `);
271737
271567
  var getBlockchainNodes = graphql(`
271738
- query getBlockchainNodes($applicationUniqueName: String!) {
271739
- blockchainNodesByUniqueName(applicationUniqueName: $applicationUniqueName) {
271740
- items {
271741
- ...BlockchainNode
271742
- }
271743
- }
271744
- }
271745
- `, [BlockchainNodeFragment]);
271568
+ query getBlockchainNodes($id: ID!) {
271569
+ blockchainNodes(applicationId: $id) {
271570
+ items {
271571
+ ...BlockchainNode
271572
+ }
271573
+ }
271574
+ }`, [BlockchainNodeFragment]);
271746
271575
  var getBlockchainNode = graphql(`
271747
- query getBlockchainNode($uniqueName: String!) {
271748
- blockchainNodeByUniqueName(uniqueName: $uniqueName) {
271749
- ...BlockchainNode
271750
- }
271751
- }
271752
- `, [BlockchainNodeFragment]);
271576
+ query getBlockchainNode($id: ID!) {
271577
+ blockchainNode(entityId: $id) {
271578
+ ...BlockchainNode
271579
+ }
271580
+ }
271581
+ `, [BlockchainNodeFragment]);
271753
271582
  var createBlockchainNode = graphql(`
271754
- mutation createBlockchainNode(
271755
- $applicationId: ID!
271756
- $blockchainNetworkId: ID!
271757
- $name: String!
271758
- $provider: String!
271759
- $region: String!
271760
- $size: ClusterServiceSize
271761
- $type: ClusterServiceType
271762
- $nodeType: NodeType
271763
- $keyMaterial: ID
271583
+ mutation createBlockchainNode(
271584
+ $applicationId: ID!
271585
+ $blockchainNetworkId: ID!
271586
+ $name: String!
271587
+ $provider: String!
271588
+ $region: String!
271589
+ $size: ClusterServiceSize
271590
+ $type: ClusterServiceType
271591
+ $nodeType: NodeType
271592
+ $keyMaterial: ID
271593
+ ) {
271594
+ createBlockchainNode(
271595
+ applicationId: $applicationId
271596
+ blockchainNetworkId: $blockchainNetworkId
271597
+ name: $name
271598
+ provider: $provider
271599
+ region: $region
271600
+ size: $size
271601
+ type: $type
271602
+ nodeType: $nodeType
271603
+ keyMaterial: $keyMaterial
271764
271604
  ) {
271765
- createBlockchainNode(
271766
- applicationId: $applicationId
271767
- blockchainNetworkId: $blockchainNetworkId
271768
- name: $name
271769
- provider: $provider
271770
- region: $region
271771
- size: $size
271772
- type: $type
271773
- nodeType: $nodeType
271774
- keyMaterial: $keyMaterial
271775
- ) {
271776
- ...BlockchainNode
271777
- }
271778
- }
271779
- `, [BlockchainNodeFragment]);
271605
+ ...BlockchainNode
271606
+ }
271607
+ }
271608
+ `, [BlockchainNodeFragment]);
271780
271609
  var restartBlockchainNode = graphql(`
271781
- mutation RestartBlockchainNode($uniqueName: String!) {
271782
- restartBlockchainNodeByUniqueName(uniqueName: $uniqueName) {
271783
- ...BlockchainNode
271784
- }
271610
+ mutation RestartBlockchainNode($id: ID!) {
271611
+ restartBlockchainNode(entityId: $id) {
271612
+ ...BlockchainNode
271785
271613
  }
271786
- `, [BlockchainNodeFragment]);
271614
+ }
271615
+ `, [BlockchainNodeFragment]);
271787
271616
  var blockchainNodeList = (gqlClient, options) => {
271788
- return async (applicationUniqueName) => {
271617
+ return async (applicationId) => {
271618
+ const id = validate3(IdSchema3, applicationId);
271789
271619
  const {
271790
- blockchainNodesByUniqueName: { items }
271791
- } = await gqlClient.request(getBlockchainNodes, { applicationUniqueName });
271620
+ blockchainNodes: { items }
271621
+ } = await gqlClient.request(getBlockchainNodes, { id });
271792
271622
  return items;
271793
271623
  };
271794
271624
  };
271795
271625
  var blockchainNodeRead = (gqlClient, options) => {
271796
- return async (blockchainNodeUniqueName) => {
271797
- const { blockchainNodeByUniqueName } = await gqlClient.request(getBlockchainNode, {
271798
- uniqueName: blockchainNodeUniqueName
271799
- });
271800
- return blockchainNodeByUniqueName;
271626
+ return async (blockchainNodeId) => {
271627
+ const id = validate3(IdSchema3, blockchainNodeId);
271628
+ const { blockchainNode } = await gqlClient.request(getBlockchainNode, { id });
271629
+ return blockchainNode;
271801
271630
  };
271802
271631
  };
271803
271632
  var blockchainNodeCreate = (gqlClient, options) => {
271804
271633
  return async (args) => {
271805
- const { applicationUniqueName, blockchainNetworkUniqueName, ...otherArgs } = args;
271806
- const [application, blockchainNetwork] = await Promise.all([
271807
- applicationRead(gqlClient, options)(applicationUniqueName),
271808
- blockchainNetworkRead(gqlClient, options)(blockchainNetworkUniqueName)
271809
- ]);
271810
- const { createBlockchainNode: blockchainNode } = await gqlClient.request(createBlockchainNode, {
271811
- ...otherArgs,
271812
- applicationId: application.id,
271813
- blockchainNetworkId: blockchainNetwork.id
271814
- });
271634
+ validate3(IdSchema3, args.applicationId);
271635
+ validate3(IdSchema3, args.blockchainNetworkId);
271636
+ const { createBlockchainNode: blockchainNode } = await gqlClient.request(createBlockchainNode, args);
271815
271637
  return blockchainNode;
271816
271638
  };
271817
271639
  };
271818
- var blockchainNodeRestart = (gqlClient, _options) => async (blockchainNodeUniqueName) => {
271819
- const { restartBlockchainNodeByUniqueName: blockchainNode } = await gqlClient.request(restartBlockchainNode, {
271820
- uniqueName: blockchainNodeUniqueName
271821
- });
271640
+ var blockchainNodeRestart = (gqlClient, _options) => async (nodeId) => {
271641
+ const id = validate3(IdSchema3, nodeId);
271642
+ const { restartBlockchainNode: blockchainNode } = await gqlClient.request(restartBlockchainNode, { id });
271822
271643
  return blockchainNode;
271823
271644
  };
271824
271645
  var CustomDeploymentFragment = graphql(`
271825
271646
  fragment CustomDeployment on CustomDeployment {
271826
271647
  id
271827
- uniqueName
271828
271648
  name
271829
271649
  status
271830
271650
  endpoints {
@@ -271840,141 +271660,112 @@ var CustomDeploymentFragment = graphql(`
271840
271660
  }
271841
271661
  `);
271842
271662
  var getCustomDeployments = graphql(`
271843
- query getCustomDeployments($applicationUniqueName: String!) {
271844
- customDeploymentsByUniqueName(applicationUniqueName: $applicationUniqueName) {
271845
- items {
271846
- ...CustomDeployment
271847
- }
271848
- }
271663
+ query getCustomDeployments($id: ID!) {
271664
+ customDeployments(applicationId: $id) {
271665
+ items {
271666
+ ...CustomDeployment
271849
271667
  }
271850
- `, [CustomDeploymentFragment]);
271668
+ }
271669
+ }`, [CustomDeploymentFragment]);
271851
271670
  var getCustomDeployment = graphql(`
271852
- query getCustomDeployment($uniqueName: String!) {
271853
- customDeploymentByUniqueName(uniqueName: $uniqueName) {
271854
- ...CustomDeployment
271855
- }
271856
- }
271857
- `, [CustomDeploymentFragment]);
271671
+ query getCustomDeployment($id: ID!) {
271672
+ customDeployment(entityId: $id) {
271673
+ ...CustomDeployment
271674
+ }
271675
+ }
271676
+ `, [CustomDeploymentFragment]);
271858
271677
  var editCustomDeployment = graphql(`
271859
- mutation EditCustomDeployment($uniqueName: String!, $imageTag: String) {
271860
- editCustomDeploymentByUniqueName(uniqueName: $uniqueName, imageTag: $imageTag) {
271861
- ...CustomDeployment
271862
- }
271863
- }
271864
- `, [CustomDeploymentFragment]);
271678
+ mutation EditCustomDeployment($entityId: ID!, $imageTag: String) {
271679
+ editCustomDeployment(entityId: $entityId, imageTag: $imageTag) {
271680
+ ...CustomDeployment
271681
+ }
271682
+ }
271683
+ `, [CustomDeploymentFragment]);
271865
271684
  var createCustomDeployment = graphql(`
271866
- mutation CreateCustomDeployment(
271867
- $applicationId: ID!
271868
- $name: String!
271869
- $imageTag: String!
271870
- $imageName: String!
271871
- $imageRepository: String!
271872
- $environmentVariables: JSON
271873
- $port: Int!
271874
- $provider: String!
271875
- $region: String!
271876
- ) {
271877
- createCustomDeployment(
271878
- applicationId: $applicationId
271879
- name: $name
271880
- imageTag: $imageTag
271881
- imageName: $imageName
271882
- imageRepository: $imageRepository
271883
- port: $port
271884
- environmentVariables: $environmentVariables
271885
- provider: $provider
271886
- region: $region
271887
- ) {
271888
- ...CustomDeployment
271889
- }
271890
- }
271891
- `, [CustomDeploymentFragment]);
271685
+ mutation CreateCustomDeployment(
271686
+ $applicationId: ID!,
271687
+ $name: String!,
271688
+ $imageTag: String!,
271689
+ $imageName: String!,
271690
+ $imageRepository: String!,
271691
+ $environmentVariables: JSON,
271692
+ $port: Int!,
271693
+ $provider: String!,
271694
+ $region: String!
271695
+ ) {
271696
+ createCustomDeployment(
271697
+ applicationId: $applicationId,
271698
+ name: $name,
271699
+ imageTag: $imageTag,
271700
+ imageName: $imageName,
271701
+ imageRepository: $imageRepository,
271702
+ port: $port,
271703
+ environmentVariables: $environmentVariables,
271704
+ provider: $provider,
271705
+ region: $region
271706
+ ) {
271707
+ ...CustomDeployment
271708
+ }
271709
+ }
271710
+ `, [CustomDeploymentFragment]);
271892
271711
  var restartCustomDeployment = graphql(`
271893
- mutation RestartCustomDeployment($uniqueName: String!) {
271894
- restartCustomDeploymentByUniqueName(uniqueName: $uniqueName) {
271895
- ...CustomDeployment
271896
- }
271712
+ mutation RestartCustomDeployment($id: ID!) {
271713
+ restartCustomDeployment(entityId: $id) {
271714
+ ...CustomDeployment
271897
271715
  }
271898
- `, [CustomDeploymentFragment]);
271716
+ }
271717
+ `, [CustomDeploymentFragment]);
271899
271718
  var customdeploymentList = (gqlClient, options) => {
271900
- return async (applicationUniqueName) => {
271719
+ return async (applicationId) => {
271720
+ const id = validate3(IdSchema3, applicationId);
271901
271721
  const {
271902
- customDeploymentsByUniqueName: { items }
271903
- } = await gqlClient.request(getCustomDeployments, { applicationUniqueName });
271722
+ customDeployments: { items }
271723
+ } = await gqlClient.request(getCustomDeployments, { id });
271904
271724
  return items;
271905
271725
  };
271906
271726
  };
271907
271727
  var customdeploymentRead = (gqlClient, options) => {
271908
- return async (customDeploymentUniqueName) => {
271909
- const { customDeploymentByUniqueName: customDeployment } = await gqlClient.request(getCustomDeployment, {
271910
- uniqueName: customDeploymentUniqueName
271911
- });
271728
+ return async (customdeploymentId) => {
271729
+ const id = validate3(IdSchema3, customdeploymentId);
271730
+ const { customDeployment } = await gqlClient.request(getCustomDeployment, { id });
271912
271731
  return customDeployment;
271913
271732
  };
271914
271733
  };
271915
271734
  var customdeploymentUpdate = (gqlClient, options) => {
271916
- return async (customDeploymentUniqueName, imageTag) => {
271917
- const { editCustomDeploymentByUniqueName: cd } = await gqlClient.request(editCustomDeployment, {
271918
- uniqueName: customDeploymentUniqueName,
271919
- imageTag
271920
- });
271735
+ return async (customdeploymentId, imageTag) => {
271736
+ const id = validate3(IdSchema3, customdeploymentId);
271737
+ const { editCustomDeployment: cd } = await gqlClient.request(editCustomDeployment, { entityId: id, imageTag });
271921
271738
  return cd;
271922
271739
  };
271923
271740
  };
271924
271741
  var customdeploymentCreate = (gqlClient, options) => {
271925
271742
  return async (args) => {
271926
- const { applicationUniqueName, ...otherArgs } = args;
271927
- const application = await applicationRead(gqlClient, options)(applicationUniqueName);
271928
- const { createCustomDeployment: customDeployment } = await gqlClient.request(createCustomDeployment, {
271929
- ...otherArgs,
271930
- applicationId: application.id
271931
- });
271743
+ validate3(IdSchema3, args.applicationId);
271744
+ const { createCustomDeployment: customDeployment } = await gqlClient.request(createCustomDeployment, args);
271932
271745
  return customDeployment;
271933
271746
  };
271934
271747
  };
271935
- var customDeploymentRestart = (gqlClient, _options) => async (customDeploymentUniqueName) => {
271936
- const { restartCustomDeploymentByUniqueName: customDeployment } = await gqlClient.request(restartCustomDeployment, {
271937
- uniqueName: customDeploymentUniqueName
271938
- });
271748
+ var customDeploymentRestart = (gqlClient, _options) => async (deploymentId) => {
271749
+ const id = validate3(IdSchema3, deploymentId);
271750
+ const { restartCustomDeployment: customDeployment } = await gqlClient.request(restartCustomDeployment, { id });
271939
271751
  return customDeployment;
271940
271752
  };
271941
271753
  var getFoundryEnvConfig = graphql(`
271942
- query GetFoundryEnvConfig($blockchainNodeUniqueName: String!) {
271943
- foundryEnvConfigByUniqueName(blockchainNodeUniqueName: $blockchainNodeUniqueName)
271944
- }
271945
- `);
271946
- var getEnv = (gqlClient, _options) => {
271947
- return async (blockchainNodeUniqueName) => {
271948
- const { foundryEnvConfigByUniqueName } = await gqlClient.request(getFoundryEnvConfig, { blockchainNodeUniqueName });
271949
- return foundryEnvConfigByUniqueName;
271950
- };
271951
- };
271952
- var LoadBalancerFragment = graphql(`
271953
- fragment LoadBalancer on LoadBalancer {
271954
- id
271955
- uniqueName
271754
+ query getFoundryEnvConfig($blockchainNodeId: String!) {
271755
+ foundryEnvConfig(blockchainNodeId: $blockchainNodeId)
271956
271756
  }
271957
271757
  `);
271958
- var getLoadBalancer = graphql(`
271959
- query GetLoadBalancer($uniqueName: String!) {
271960
- loadBalancerByUniqueName(uniqueName: $uniqueName) {
271961
- ...LoadBalancer
271962
- }
271963
- }
271964
- `, [LoadBalancerFragment]);
271965
- var loadBalancerRead = (gqlClient, options) => {
271966
- return async (loadBalancerUniqueName) => {
271967
- const { loadBalancerByUniqueName: loadBalancer } = await gqlClient.request(getLoadBalancer, {
271968
- uniqueName: loadBalancerUniqueName
271969
- });
271970
- return loadBalancer;
271758
+ function getEnv(gqlClient, options) {
271759
+ return async (blockchainNodeId) => {
271760
+ validate3(IdSchema3, blockchainNodeId);
271761
+ const { foundryEnvConfig } = await gqlClient.request(getFoundryEnvConfig, { blockchainNodeId });
271762
+ return foundryEnvConfig;
271971
271763
  };
271972
- };
271764
+ }
271973
271765
  var InsightsFragment = graphql(`
271974
271766
  fragment Insights on Insights {
271975
271767
  __typename
271976
271768
  id
271977
- uniqueName
271978
271769
  name
271979
271770
  status
271980
271771
  insightsCategory
@@ -271991,97 +271782,86 @@ var InsightsFragment = graphql(`
271991
271782
  }
271992
271783
  `);
271993
271784
  var getInsights = graphql(`
271994
- query GetInsights($applicationUniqueName: String!) {
271995
- insightsListByUniqueName(applicationUniqueName: $applicationUniqueName) {
271996
- items {
271997
- ...Insights
271998
- }
271999
- }
271785
+ query getInsights($id: ID!) {
271786
+ insightsList(applicationId: $id) {
271787
+ items {
271788
+ ...Insights
272000
271789
  }
272001
- `, [InsightsFragment]);
271790
+ }
271791
+ }`, [InsightsFragment]);
272002
271792
  var getInsight = graphql(`
272003
- query GetInsight($uniqueName: String!) {
272004
- insightsByUniqueName(uniqueName: $uniqueName) {
272005
- ...Insights
272006
- }
272007
- }
272008
- `, [InsightsFragment]);
271793
+ query getInsights($id: ID!) {
271794
+ insights(entityId: $id) {
271795
+ ...Insights
271796
+ }
271797
+ }
271798
+ `, [InsightsFragment]);
272009
271799
  var createInsights = graphql(`
272010
- mutation CreateInsights(
272011
- $applicationId: ID!
272012
- $name: String!
272013
- $insightsCategory: InsightsCategory!
272014
- $provider: String!
272015
- $region: String!
272016
- $size: ClusterServiceSize
272017
- $type: ClusterServiceType
272018
- $blockchainNode: ID
272019
- $loadBalancer: ID
271800
+ mutation createInsights(
271801
+ $applicationId: ID!
271802
+ $name: String!
271803
+ $insightsCategory: InsightsCategory!
271804
+ $provider: String!
271805
+ $region: String!
271806
+ $size: ClusterServiceSize
271807
+ $type: ClusterServiceType
271808
+ $blockchainNode: ID
271809
+ $loadBalancer: ID
271810
+ ) {
271811
+ createInsights(
271812
+ applicationId: $applicationId
271813
+ name: $name
271814
+ insightsCategory: $insightsCategory
271815
+ provider: $provider
271816
+ region: $region
271817
+ size: $size
271818
+ type: $type
271819
+ blockchainNode: $blockchainNode
271820
+ loadBalancer: $loadBalancer
272020
271821
  ) {
272021
- createInsights(
272022
- applicationId: $applicationId
272023
- name: $name
272024
- insightsCategory: $insightsCategory
272025
- provider: $provider
272026
- region: $region
272027
- size: $size
272028
- type: $type
272029
- blockchainNode: $blockchainNode
272030
- loadBalancer: $loadBalancer
272031
- ) {
272032
- ...Insights
272033
- }
272034
- }
272035
- `, [InsightsFragment]);
271822
+ ...Insights
271823
+ }
271824
+ }
271825
+ `, [InsightsFragment]);
272036
271826
  var restartInsights = graphql(`
272037
- mutation RestartInsights($uniqueName: String!) {
272038
- restartInsightsByUniqueName(uniqueName: $uniqueName) {
272039
- ...Insights
272040
- }
271827
+ mutation RestartInsights($id: ID!) {
271828
+ restartInsights(entityId: $id) {
271829
+ ...Insights
272041
271830
  }
272042
- `, [InsightsFragment]);
271831
+ }
271832
+ `, [InsightsFragment]);
272043
271833
  var insightsList = (gqlClient, options) => {
272044
- return async (applicationUniqueName) => {
271834
+ return async (applicationId) => {
271835
+ const id = validate3(IdSchema3, applicationId);
272045
271836
  const {
272046
- insightsListByUniqueName: { items }
272047
- } = await gqlClient.request(getInsights, { applicationUniqueName });
271837
+ insightsList: { items }
271838
+ } = await gqlClient.request(getInsights, { id });
272048
271839
  return items;
272049
271840
  };
272050
271841
  };
272051
271842
  var insightsRead = (gqlClient, options) => {
272052
- return async (insightsUniqueName) => {
272053
- const { insightsByUniqueName: insights } = await gqlClient.request(getInsight, { uniqueName: insightsUniqueName });
271843
+ return async (insightsId) => {
271844
+ const id = validate3(IdSchema3, insightsId);
271845
+ const { insights } = await gqlClient.request(getInsight, { id });
272054
271846
  return insights;
272055
271847
  };
272056
271848
  };
272057
271849
  var insightsCreate = (gqlClient, options) => {
272058
271850
  return async (args) => {
272059
- const { applicationUniqueName, blockchainNodeUniqueName, loadBalancerUniqueName, ...otherArgs } = args;
272060
- const [application, blockchainNode, loadBalancer] = await Promise.all([
272061
- applicationRead(gqlClient, options)(applicationUniqueName),
272062
- blockchainNodeUniqueName ? blockchainNodeRead(gqlClient, options)(blockchainNodeUniqueName) : Promise.resolve(undefined),
272063
- loadBalancerUniqueName ? loadBalancerRead(gqlClient, options)(loadBalancerUniqueName) : Promise.resolve(undefined)
272064
- ]);
272065
- const { createInsights: insights } = await gqlClient.request(createInsights, {
272066
- ...otherArgs,
272067
- applicationId: application.id,
272068
- blockchainNode: blockchainNode?.id,
272069
- loadBalancer: loadBalancer?.id
272070
- });
271851
+ validate3(IdSchema3, args.applicationId);
271852
+ const { createInsights: insights } = await gqlClient.request(createInsights, args);
272071
271853
  return insights;
272072
271854
  };
272073
271855
  };
272074
- var insightsRestart = (gqlClient, _options) => async (insightsUniqueName) => {
272075
- const { restartInsightsByUniqueName: insights } = await gqlClient.request(restartInsights, {
272076
- uniqueName: insightsUniqueName
272077
- });
271856
+ var insightsRestart = (gqlClient, _options) => async (insightsId) => {
271857
+ const id = validate3(IdSchema3, insightsId);
271858
+ const { restartInsights: insights } = await gqlClient.request(restartInsights, { id });
272078
271859
  return insights;
272079
271860
  };
272080
271861
  var IntegrationFragment = graphql(`
272081
271862
  fragment Integration on Integration {
272082
271863
  __typename
272083
271864
  id
272084
- uniqueName
272085
271865
  name
272086
271866
  status
272087
271867
  integrationType
@@ -272098,184 +271878,82 @@ var IntegrationFragment = graphql(`
272098
271878
  }
272099
271879
  `);
272100
271880
  var getIntegrations = graphql(`
272101
- query GetIntegrations($applicationUniqueName: String!) {
272102
- integrationsByUniqueName(applicationUniqueName: $applicationUniqueName) {
272103
- items {
272104
- ...Integration
272105
- }
272106
- }
271881
+ query getIntegrations($id: ID!) {
271882
+ integrations(applicationId: $id) {
271883
+ items {
271884
+ ...Integration
272107
271885
  }
272108
- `, [IntegrationFragment]);
271886
+ }
271887
+ }`, [IntegrationFragment]);
272109
271888
  var getIntegration = graphql(`
272110
- query GetIntegration($uniqueName: String!) {
272111
- integrationByUniqueName(uniqueName: $uniqueName) {
272112
- ...Integration
272113
- }
272114
- }
272115
- `, [IntegrationFragment]);
271889
+ query getIntegration($id: ID!) {
271890
+ integration(entityId: $id) {
271891
+ ...Integration
271892
+ }
271893
+ }
271894
+ `, [IntegrationFragment]);
272116
271895
  var createIntegration = graphql(`
272117
- mutation CreateIntegration(
272118
- $applicationId: ID!
272119
- $name: String!
272120
- $integrationType: IntegrationType!
272121
- $provider: String!
272122
- $region: String!
272123
- $size: ClusterServiceSize
272124
- $type: ClusterServiceType
271896
+ mutation createIntegration(
271897
+ $applicationId: ID!
271898
+ $name: String!
271899
+ $integrationType: IntegrationType!
271900
+ $provider: String!
271901
+ $region: String!
271902
+ $size: ClusterServiceSize
271903
+ $type: ClusterServiceType
271904
+ ) {
271905
+ createIntegration(
271906
+ applicationId: $applicationId
271907
+ name: $name
271908
+ integrationType: $integrationType
271909
+ provider: $provider
271910
+ region: $region
271911
+ size: $size
271912
+ type: $type
272125
271913
  ) {
272126
- createIntegration(
272127
- applicationId: $applicationId
272128
- name: $name
272129
- integrationType: $integrationType
272130
- provider: $provider
272131
- region: $region
272132
- size: $size
272133
- type: $type
272134
- ) {
272135
- ...Integration
272136
- }
272137
- }
272138
- `, [IntegrationFragment]);
271914
+ ...Integration
271915
+ }
271916
+ }
271917
+ `, [IntegrationFragment]);
272139
271918
  var restartIntegrationTool = graphql(`
272140
- mutation RestartIntegrationTool($uniqueName: String!) {
272141
- restartIntegrationByUniqueName(uniqueName: $uniqueName) {
272142
- ...Integration
272143
- }
271919
+ mutation RestartIntegrationTool($id: ID!) {
271920
+ restartIntegration(entityId: $id) {
271921
+ ...Integration
272144
271922
  }
272145
- `, [IntegrationFragment]);
271923
+ }
271924
+ `, [IntegrationFragment]);
272146
271925
  var integrationToolList = (gqlClient, options) => {
272147
- return async (applicationUniqueName) => {
271926
+ return async (applicationId) => {
271927
+ const id = validate3(IdSchema3, applicationId);
272148
271928
  const {
272149
- integrationsByUniqueName: { items }
272150
- } = await gqlClient.request(getIntegrations, { applicationUniqueName });
271929
+ integrations: { items }
271930
+ } = await gqlClient.request(getIntegrations, { id });
272151
271931
  return items;
272152
271932
  };
272153
271933
  };
272154
271934
  var integrationToolRead = (gqlClient, options) => {
272155
- return async (integrationUniqueName) => {
272156
- const { integrationByUniqueName } = await gqlClient.request(getIntegration, { uniqueName: integrationUniqueName });
272157
- return integrationByUniqueName;
271935
+ return async (integrationId) => {
271936
+ const id = validate3(IdSchema3, integrationId);
271937
+ const { integration } = await gqlClient.request(getIntegration, { id });
271938
+ return integration;
272158
271939
  };
272159
271940
  };
272160
271941
  var integrationToolCreate = (gqlClient, options) => {
272161
271942
  return async (args) => {
272162
- const { applicationUniqueName, ...otherArgs } = args;
272163
- const application = await applicationRead(gqlClient, options)(applicationUniqueName);
272164
- const { createIntegration: integration } = await gqlClient.request(createIntegration, {
272165
- ...otherArgs,
272166
- applicationId: application.id
272167
- });
271943
+ validate3(IdSchema3, args.applicationId);
271944
+ const { createIntegration: integration } = await gqlClient.request(createIntegration, args);
272168
271945
  return integration;
272169
271946
  };
272170
271947
  };
272171
- var integrationToolRestart = (gqlClient, _options) => async (integrationUniqueName) => {
272172
- const { restartIntegrationByUniqueName: integration } = await gqlClient.request(restartIntegrationTool, {
272173
- uniqueName: integrationUniqueName
272174
- });
271948
+ var integrationToolRestart = (gqlClient, _options) => async (toolId) => {
271949
+ const id = validate3(IdSchema3, toolId);
271950
+ const { restartIntegration: integration } = await gqlClient.request(restartIntegrationTool, { id });
272175
271951
  return integration;
272176
271952
  };
272177
- var StorageFragment = graphql(`
272178
- fragment Storage on Storage {
272179
- __typename
272180
- id
272181
- uniqueName
272182
- name
272183
- status
272184
- storageProtocol
272185
- endpoints {
272186
- id
272187
- label
272188
- displayValue
272189
- }
272190
- credentials {
272191
- id
272192
- label
272193
- displayValue
272194
- }
272195
- }
272196
- `);
272197
- var getStorages = graphql(`
272198
- query GetStorages($applicationUniqueName: String!) {
272199
- storagesByUniqueName(applicationUniqueName: $applicationUniqueName) {
272200
- items {
272201
- ...Storage
272202
- }
272203
- }
272204
- }
272205
- `, [StorageFragment]);
272206
- var getStorage = graphql(`
272207
- query GetStorage($uniqueName: String!) {
272208
- storageByUniqueName(uniqueName: $uniqueName) {
272209
- ...Storage
272210
- }
272211
- }
272212
- `, [StorageFragment]);
272213
- var createStorage = graphql(`
272214
- mutation CreateStorage(
272215
- $applicationId: ID!
272216
- $name: String!
272217
- $storageProtocol: StorageProtocol!
272218
- $provider: String!
272219
- $region: String!
272220
- $size: ClusterServiceSize
272221
- $type: ClusterServiceType
272222
- ) {
272223
- createStorage(
272224
- applicationId: $applicationId
272225
- name: $name
272226
- storageProtocol: $storageProtocol
272227
- provider: $provider
272228
- region: $region
272229
- size: $size
272230
- type: $type
272231
- ) {
272232
- ...Storage
272233
- }
272234
- }
272235
- `, [StorageFragment]);
272236
- var restartStorage = graphql(`
272237
- mutation RestartStorage($uniqueName: String!) {
272238
- restartStorageByUniqueName(uniqueName: $uniqueName) {
272239
- ...Storage
272240
- }
272241
- }
272242
- `, [StorageFragment]);
272243
- var storageList = (gqlClient, options) => {
272244
- return async (applicationUniqueName) => {
272245
- const {
272246
- storagesByUniqueName: { items }
272247
- } = await gqlClient.request(getStorages, { applicationUniqueName });
272248
- return items;
272249
- };
272250
- };
272251
- var storageRead = (gqlClient, options) => {
272252
- return async (storageUniqueName) => {
272253
- const { storageByUniqueName: storage } = await gqlClient.request(getStorage, { uniqueName: storageUniqueName });
272254
- return storage;
272255
- };
272256
- };
272257
- var storageCreate = (gqlClient, options) => {
272258
- return async (args) => {
272259
- const { applicationUniqueName, ...otherArgs } = args;
272260
- const application = await applicationRead(gqlClient, options)(applicationUniqueName);
272261
- const { createStorage: storage } = await gqlClient.request(createStorage, {
272262
- ...otherArgs,
272263
- applicationId: application.id
272264
- });
272265
- return storage;
272266
- };
272267
- };
272268
- var storageRestart = (gqlClient, _options) => async (storageUniqueName) => {
272269
- const { restartStorageByUniqueName: storage } = await gqlClient.request(restartStorage, {
272270
- uniqueName: storageUniqueName
272271
- });
272272
- return storage;
272273
- };
272274
271953
  var MiddlewareFragment = graphql(`
272275
271954
  fragment Middleware on Middleware {
272276
271955
  __typename
272277
271956
  id
272278
- uniqueName
272279
271957
  name
272280
271958
  status
272281
271959
  interface
@@ -272304,196 +271982,489 @@ var MiddlewareFragment = graphql(`
272304
271982
  }
272305
271983
  `);
272306
271984
  var getMiddlewares = graphql(`
272307
- query GetMiddlewares($applicationUniqueName: String!, $noCache: Boolean = false) {
272308
- middlewaresByUniqueName(applicationUniqueName: $applicationUniqueName) {
272309
- items {
272310
- ...Middleware
272311
- }
272312
- }
271985
+ query getMiddlewares($id: ID!, $noCache: Boolean = false) {
271986
+ middlewares(applicationId: $id) {
271987
+ items {
271988
+ ...Middleware
272313
271989
  }
272314
- `, [MiddlewareFragment]);
271990
+ }
271991
+ }`, [MiddlewareFragment]);
272315
271992
  var getMiddleware = graphql(`
272316
- query GetMiddleware($uniqueName: String!, $noCache: Boolean = true) {
272317
- middlewareByUniqueName(uniqueName: $uniqueName) {
272318
- ...Middleware
272319
- }
272320
- }
272321
- `, [MiddlewareFragment]);
271993
+ query getMiddleware($id: ID!, $noCache: Boolean = true) {
271994
+ middleware(entityId: $id) {
271995
+ ...Middleware
271996
+ }
271997
+ }
271998
+ `, [MiddlewareFragment]);
272322
271999
  var createMiddleware = graphql(`
272323
- mutation CreateMiddleware(
272324
- $applicationId: ID!
272325
- $name: String!
272326
- $provider: String!
272327
- $region: String!
272328
- $size: ClusterServiceSize
272329
- $type: ClusterServiceType
272330
- $interface: MiddlewareType!
272331
- $storageId: ID
272332
- $blockchainNodeId: ID
272333
- $loadBalancerId: ID
272334
- $abis: [SmartContractPortalMiddlewareAbiInputDto!]
272335
- $includePredeployedAbis: [String!]
272336
- $noCache: Boolean = false
272000
+ mutation createMiddleware(
272001
+ $applicationId: ID!
272002
+ $name: String!
272003
+ $provider: String!
272004
+ $region: String!
272005
+ $size: ClusterServiceSize
272006
+ $type: ClusterServiceType
272007
+ $interface: MiddlewareType!
272008
+ $storageId: ID
272009
+ $smartContractSetId: ID
272010
+ $blockchainNodeId: ID
272011
+ $loadBalancerId: ID
272012
+ $abis: [SmartContractPortalMiddlewareAbiInputDto!]
272013
+ $includePredeployedAbis: [String!]
272014
+ $noCache: Boolean = false
272015
+ ) {
272016
+ createMiddleware(
272017
+ applicationId: $applicationId
272018
+ name: $name
272019
+ provider: $provider
272020
+ region: $region
272021
+ size: $size
272022
+ type: $type
272023
+ interface: $interface
272024
+ storageId: $storageId
272025
+ smartContractSetId: $smartContractSetId
272026
+ blockchainNodeId: $blockchainNodeId
272027
+ loadBalancerId: $loadBalancerId
272028
+ abis: $abis
272029
+ includePredeployedAbis: $includePredeployedAbis
272337
272030
  ) {
272338
- createMiddleware(
272339
- applicationId: $applicationId
272340
- name: $name
272341
- provider: $provider
272342
- region: $region
272343
- size: $size
272344
- type: $type
272345
- interface: $interface
272346
- storageId: $storageId
272347
- blockchainNodeId: $blockchainNodeId
272348
- loadBalancerId: $loadBalancerId
272349
- abis: $abis
272350
- includePredeployedAbis: $includePredeployedAbis
272351
- ) {
272352
- ...Middleware
272353
- }
272354
- }
272355
- `, [MiddlewareFragment]);
272031
+ ...Middleware
272032
+ }
272033
+ }
272034
+ `, [MiddlewareFragment]);
272356
272035
  var restartMiddleware = graphql(`
272357
- mutation RestartMiddleware($uniqueName: String!, $noCache: Boolean = false) {
272358
- restartMiddlewareByUniqueName(uniqueName: $uniqueName) {
272359
- ...Middleware
272360
- }
272036
+ mutation RestartMiddleware($id: ID!, $noCache: Boolean = false) {
272037
+ restartMiddleware(entityId: $id) {
272038
+ ...Middleware
272361
272039
  }
272362
- `, [MiddlewareFragment]);
272040
+ }
272041
+ `, [MiddlewareFragment]);
272363
272042
  var middlewareList = (gqlClient, options) => {
272364
- return async (applicationUniqueName) => {
272043
+ return async (applicationId) => {
272044
+ const id = validate3(IdSchema3, applicationId);
272365
272045
  const {
272366
- middlewaresByUniqueName: { items }
272367
- } = await gqlClient.request(getMiddlewares, { applicationUniqueName });
272046
+ middlewares: { items }
272047
+ } = await gqlClient.request(getMiddlewares, { id });
272368
272048
  return items;
272369
272049
  };
272370
272050
  };
272371
272051
  var middlewareRead = (gqlClient, options) => {
272372
- return async (middlewareUniqueName) => {
272373
- const { middlewareByUniqueName: middleware } = await gqlClient.request(getMiddleware, {
272374
- uniqueName: middlewareUniqueName
272375
- });
272052
+ return async (middlewareId) => {
272053
+ const id = validate3(IdSchema3, middlewareId);
272054
+ const { middleware } = await gqlClient.request(getMiddleware, { id });
272376
272055
  return middleware;
272377
272056
  };
272378
272057
  };
272379
272058
  var middlewareCreate = (gqlClient, options) => {
272380
272059
  return async (args) => {
272381
- const { applicationUniqueName, blockchainNodeUniqueName, loadBalancerUniqueName, storageUniqueName, ...otherArgs } = args;
272382
- const [application, blockchainNode, loadBalancer, storage] = await Promise.all([
272383
- applicationRead(gqlClient, options)(applicationUniqueName),
272384
- blockchainNodeUniqueName ? blockchainNodeRead(gqlClient, options)(blockchainNodeUniqueName) : Promise.resolve(undefined),
272385
- loadBalancerUniqueName ? loadBalancerRead(gqlClient, options)(loadBalancerUniqueName) : Promise.resolve(undefined),
272386
- storageUniqueName ? storageRead(gqlClient, options)(storageUniqueName) : Promise.resolve(undefined)
272387
- ]);
272388
- const { createMiddleware: middleware } = await gqlClient.request(createMiddleware, {
272389
- ...otherArgs,
272390
- applicationId: application.id,
272391
- blockchainNodeId: blockchainNode?.id,
272392
- loadBalancerId: loadBalancer?.id,
272393
- storageId: storage?.id
272394
- });
272060
+ validate3(IdSchema3, args.applicationId);
272061
+ const { createMiddleware: middleware } = await gqlClient.request(createMiddleware, args);
272395
272062
  return middleware;
272396
272063
  };
272397
272064
  };
272398
- var middlewareRestart = (gqlClient, _options) => async (middlewareUniqueName) => {
272399
- const { restartMiddlewareByUniqueName: middleware } = await gqlClient.request(restartMiddleware, {
272400
- uniqueName: middlewareUniqueName
272401
- });
272065
+ var middlewareRestart = (gqlClient, _options) => async (middlewareId) => {
272066
+ const id = validate3(IdSchema3, middlewareId);
272067
+ const { restartMiddleware: middleware } = await gqlClient.request(restartMiddleware, { id });
272402
272068
  return middleware;
272403
272069
  };
272404
272070
  var PrivateKeyFragment = graphql(`
272405
272071
  fragment PrivateKey on PrivateKey {
272406
272072
  __typename
272407
272073
  id
272408
- uniqueName
272409
272074
  name
272075
+ uniqueName
272410
272076
  privateKeyType
272411
272077
  status
272412
272078
  }
272413
272079
  `);
272414
272080
  var getPrivateKeys = graphql(`
272415
- query GetPrivateKeys($applicationUniqueName: String!) {
272416
- privateKeysByUniqueName(applicationUniqueName: $applicationUniqueName) {
272417
- items {
272418
- ...PrivateKey
272419
- }
272420
- }
272081
+ query getPrivateKeys($id: ID!) {
272082
+ privateKeys(applicationId: $id) {
272083
+ items {
272084
+ ...PrivateKey
272421
272085
  }
272422
- `, [PrivateKeyFragment]);
272086
+ }
272087
+ }`, [PrivateKeyFragment]);
272423
272088
  var getPrivateKey = graphql(`
272424
- query GetPrivateKey($uniqueName: String!) {
272425
- privateKeyByUniqueName(uniqueName: $uniqueName) {
272426
- ...PrivateKey
272427
- }
272428
- }
272429
- `, [PrivateKeyFragment]);
272089
+ query getPrivateKey($id: ID!) {
272090
+ privateKey(entityId: $id) {
272091
+ ...PrivateKey
272092
+ }
272093
+ }
272094
+ `, [PrivateKeyFragment]);
272430
272095
  var createPrivateKey = graphql(`
272431
- mutation CreatePrivateKey(
272432
- $applicationId: ID!
272433
- $name: String!
272434
- $privateKeyType: PrivateKeyType!
272435
- $provider: String!
272436
- $region: String!
272437
- $size: ClusterServiceSize
272438
- $type: ClusterServiceType
272439
- $blockchainNodes: [ID!]
272096
+ mutation CreatePrivateKey(
272097
+ $applicationId: ID!,
272098
+ $name: String!,
272099
+ $privateKeyType: PrivateKeyType!,
272100
+ $provider: String!
272101
+ $region: String!
272102
+ $size: ClusterServiceSize
272103
+ $type: ClusterServiceType
272104
+ $blockchainNodes: [ID!]
272105
+ ) {
272106
+ createPrivateKey(
272107
+ applicationId: $applicationId,
272108
+ name: $name,
272109
+ privateKeyType: $privateKeyType,
272110
+ provider: $provider,
272111
+ region: $region
272112
+ size: $size
272113
+ type: $type
272114
+ blockchainNodes: $blockchainNodes
272440
272115
  ) {
272441
- createPrivateKey(
272442
- applicationId: $applicationId
272443
- name: $name
272444
- privateKeyType: $privateKeyType
272445
- provider: $provider
272446
- region: $region
272447
- size: $size
272448
- type: $type
272449
- blockchainNodes: $blockchainNodes
272450
- ) {
272451
- ...PrivateKey
272452
- }
272453
- }
272454
- `, [PrivateKeyFragment]);
272116
+ ...PrivateKey
272117
+ }
272118
+ }
272119
+ `, [PrivateKeyFragment]);
272455
272120
  var restartPrivateKey = graphql(`
272456
- mutation RestartPrivateKey($uniqueName: String!) {
272457
- restartPrivateKeyByUniqueName(uniqueName: $uniqueName) {
272458
- ...PrivateKey
272459
- }
272121
+ mutation RestartPrivateKey($id: ID!) {
272122
+ restartPrivateKey(entityId: $id) {
272123
+ ...PrivateKey
272460
272124
  }
272461
- `, [PrivateKeyFragment]);
272125
+ }
272126
+ `, [PrivateKeyFragment]);
272462
272127
  var privateKeyList = (gqlClient, options) => {
272463
- return async (applicationUniqueName) => {
272128
+ return async (applicationId) => {
272129
+ const id = validate3(IdSchema3, applicationId);
272464
272130
  const {
272465
- privateKeysByUniqueName: { items }
272466
- } = await gqlClient.request(getPrivateKeys, { applicationUniqueName });
272131
+ privateKeys: { items }
272132
+ } = await gqlClient.request(getPrivateKeys, { id });
272467
272133
  return items;
272468
272134
  };
272469
272135
  };
272470
272136
  var privatekeyRead = (gqlClient, options) => {
272471
- return async (privateKeyUniqueName) => {
272472
- const { privateKeyByUniqueName: privateKey } = await gqlClient.request(getPrivateKey, {
272473
- uniqueName: privateKeyUniqueName
272474
- });
272137
+ return async (privatekeyId) => {
272138
+ const id = validate3(IdSchema3, privatekeyId);
272139
+ const { privateKey } = await gqlClient.request(getPrivateKey, { id });
272475
272140
  return privateKey;
272476
272141
  };
272477
272142
  };
272478
272143
  var privateKeyCreate = (gqlClient, options) => {
272479
272144
  return async (args) => {
272480
- const { applicationUniqueName, blockchainNodeUniqueNames, ...otherArgs } = args;
272481
- const application = await applicationRead(gqlClient, options)(applicationUniqueName);
272482
- const blockchainNodes = blockchainNodeUniqueNames ? await Promise.all(blockchainNodeUniqueNames.map((uniqueName) => blockchainNodeRead(gqlClient, options)(uniqueName))) : [];
272483
- const { createPrivateKey: privateKey } = await gqlClient.request(createPrivateKey, {
272484
- ...otherArgs,
272485
- applicationId: application.id,
272486
- blockchainNodes: blockchainNodes.map((node) => node?.id)
272487
- });
272145
+ validate3(IdSchema3, args.applicationId);
272146
+ const { createPrivateKey: privateKey } = await gqlClient.request(createPrivateKey, args);
272488
272147
  return privateKey;
272489
272148
  };
272490
272149
  };
272491
- var privateKeyRestart = (gqlClient, _options) => async (privateKeyUniqueName) => {
272492
- const { restartPrivateKeyByUniqueName: privateKey } = await gqlClient.request(restartPrivateKey, {
272493
- uniqueName: privateKeyUniqueName
272494
- });
272150
+ var privateKeyRestart = (gqlClient, _options) => async (keyId) => {
272151
+ const id = validate3(IdSchema3, keyId);
272152
+ const { restartPrivateKey: privateKey } = await gqlClient.request(restartPrivateKey, { id });
272495
272153
  return privateKey;
272496
272154
  };
272155
+ var SmartContractSetFragment = graphql(`
272156
+ fragment SmartContractSet on SmartContractSet {
272157
+ __typename
272158
+ id
272159
+ name
272160
+ application {
272161
+ id
272162
+ }
272163
+ status
272164
+ useCase
272165
+ user {
272166
+ id
272167
+ firstname
272168
+ lastname
272169
+ }
272170
+ }
272171
+ `);
272172
+ var getSmartContractSets = graphql(`
272173
+ query getSmartContractSets($id: ID!) {
272174
+ smartContractSets(applicationId: $id) {
272175
+ items {
272176
+ ...SmartContractSet
272177
+ }
272178
+ }
272179
+ }`, [SmartContractSetFragment]);
272180
+ var getSmartContractSet = graphql(`
272181
+ query getSmartContractSet($id: ID!) {
272182
+ smartContractSet(entityId: $id) {
272183
+ ...SmartContractSet
272184
+ }
272185
+ }`, [SmartContractSetFragment]);
272186
+ var createSmartContractSet = graphql(`
272187
+ mutation CreateSmartContractSet(
272188
+ $applicationId: ID!
272189
+ $name: String!
272190
+ $blockchainNodeId: ID!
272191
+ $useCase: String!
272192
+ $userId: ID
272193
+ $provider: String!
272194
+ $region: String!
272195
+ $size: ClusterServiceSize
272196
+ $type: ClusterServiceType
272197
+ ) {
272198
+ createSmartContractSet(
272199
+ applicationId: $applicationId,
272200
+ name: $name,
272201
+ blockchainNodeId: $blockchainNodeId
272202
+ useCase: $useCase
272203
+ userId: $userId
272204
+ provider: $provider,
272205
+ region: $region
272206
+ size: $size
272207
+ type: $type
272208
+ ) {
272209
+ ...SmartContractSet
272210
+ }
272211
+ }`, [SmartContractSetFragment]);
272212
+ var restartSmartContractSet = graphql(`
272213
+ mutation RestartSmartContractSet($entityId: ID!) {
272214
+ restartSmartContractSet(entityId: $entityId) {
272215
+ ...SmartContractSet
272216
+ }
272217
+ }`, [SmartContractSetFragment]);
272218
+ var smartContractSetList = (gqlClient, options) => {
272219
+ return async (applicationId) => {
272220
+ const id = validate3(IdSchema3, applicationId);
272221
+ const {
272222
+ smartContractSets: { items }
272223
+ } = await gqlClient.request(getSmartContractSets, { id });
272224
+ return items;
272225
+ };
272226
+ };
272227
+ var smartContractSetRead = (gqlClient, options) => {
272228
+ return async (smartContractSetId) => {
272229
+ const id = validate3(IdSchema3, smartContractSetId);
272230
+ const { smartContractSet } = await gqlClient.request(getSmartContractSet, { id });
272231
+ return smartContractSet;
272232
+ };
272233
+ };
272234
+ var smartContractSetCreate = (gqlClient, options) => {
272235
+ return async (args) => {
272236
+ validate3(IdSchema3, args.applicationId);
272237
+ validate3(IdSchema3, args.blockchainNodeId);
272238
+ if (typeof args.userId === "string") {
272239
+ validate3(IdSchema3, args.userId);
272240
+ }
272241
+ const { createSmartContractSet: smartContractSet } = await gqlClient.request(createSmartContractSet, args);
272242
+ return smartContractSet;
272243
+ };
272244
+ };
272245
+ var smartContractSetRestart = (gqlClient, _options) => async (smartContractSetId) => {
272246
+ const id = validate3(IdSchema3, smartContractSetId);
272247
+ const { restartSmartContractSet: smartContractSet } = await gqlClient.request(restartSmartContractSet, {
272248
+ entityId: id
272249
+ });
272250
+ return smartContractSet;
272251
+ };
272252
+ var StorageFragment = graphql(`
272253
+ fragment Storage on Storage {
272254
+ __typename
272255
+ id
272256
+ name
272257
+ status
272258
+ storageProtocol
272259
+ endpoints {
272260
+ id
272261
+ label
272262
+ displayValue
272263
+ }
272264
+ credentials {
272265
+ id
272266
+ label
272267
+ displayValue
272268
+ }
272269
+ }
272270
+ `);
272271
+ var getStorages = graphql(`
272272
+ query getStorages($id: ID!) {
272273
+ storages(applicationId: $id) {
272274
+ items {
272275
+ ...Storage
272276
+ }
272277
+ }
272278
+ }`, [StorageFragment]);
272279
+ var getStorage = graphql(`
272280
+ query getStorage($id: ID!) {
272281
+ storage(entityId: $id) {
272282
+ ...Storage
272283
+ }
272284
+ }
272285
+ `, [StorageFragment]);
272286
+ var createStorage = graphql(`
272287
+ mutation CreateStorage(
272288
+ $applicationId: ID!,
272289
+ $name: String!,
272290
+ $storageProtocol: StorageProtocol!,
272291
+ $provider: String!,
272292
+ $region: String!,
272293
+ $size: ClusterServiceSize
272294
+ $type: ClusterServiceType
272295
+ ) {
272296
+ createStorage(
272297
+ applicationId: $applicationId,
272298
+ name: $name,
272299
+ storageProtocol: $storageProtocol,
272300
+ provider: $provider,
272301
+ region: $region,
272302
+ size: $size,
272303
+ type: $type
272304
+ ) {
272305
+ ...Storage
272306
+ }
272307
+ }
272308
+ `, [StorageFragment]);
272309
+ var restartStorage = graphql(`
272310
+ mutation RestartStorage($id: ID!) {
272311
+ restartStorage(entityId: $id) {
272312
+ ...Storage
272313
+ }
272314
+ }
272315
+ `, [StorageFragment]);
272316
+ var storageList = (gqlClient, options) => {
272317
+ return async (applicationId) => {
272318
+ const id = validate3(IdSchema3, applicationId);
272319
+ const {
272320
+ storages: { items }
272321
+ } = await gqlClient.request(getStorages, { id });
272322
+ return items;
272323
+ };
272324
+ };
272325
+ var storageRead = (gqlClient, options) => {
272326
+ return async (storageId) => {
272327
+ const id = validate3(IdSchema3, storageId);
272328
+ const { storage } = await gqlClient.request(getStorage, { id });
272329
+ return storage;
272330
+ };
272331
+ };
272332
+ var storageCreate = (gqlClient, options) => {
272333
+ return async (args) => {
272334
+ validate3(IdSchema3, args.applicationId);
272335
+ const { createStorage: storage } = await gqlClient.request(createStorage, args);
272336
+ return storage;
272337
+ };
272338
+ };
272339
+ var storageRestart = (gqlClient, _options) => async (storageId) => {
272340
+ const id = validate3(IdSchema3, storageId);
272341
+ const { restartStorage: storage } = await gqlClient.request(restartStorage, { id });
272342
+ return storage;
272343
+ };
272344
+ var WorkspaceFragment = graphql(`
272345
+ fragment Workspace on Workspace {
272346
+ id
272347
+ name
272348
+ applications {
272349
+ ...Application
272350
+ }
272351
+ }
272352
+ `, [ApplicationFragment]);
272353
+ var getWorkspacesAndApplications = graphql(`
272354
+ query getWorkspacesAndApplications {
272355
+ workspaces {
272356
+ ...Workspace
272357
+ applications {
272358
+ ...Application
272359
+ }
272360
+ childWorkspaces {
272361
+ ...Workspace
272362
+ }
272363
+ }
272364
+ }
272365
+ `, [WorkspaceFragment, ApplicationFragment]);
272366
+ var getWorkspace = graphql(`
272367
+ query getWorkspace($id: ID!) {
272368
+ workspace(workspaceId: $id) {
272369
+ ...Workspace
272370
+ applications {
272371
+ ...Application
272372
+ }
272373
+ }
272374
+ }
272375
+ `, [WorkspaceFragment, ApplicationFragment]);
272376
+ var createWorkspace = graphql(`
272377
+ mutation CreateWorkspace(
272378
+ $addressLine1: String
272379
+ $addressLine2: String
272380
+ $city: String
272381
+ $companyName: String
272382
+ $country: String
272383
+ $name: String!
272384
+ $parentId: String
272385
+ $paymentMethodId: String
272386
+ $postalCode: String
272387
+ $taxIdType: String
272388
+ $taxIdValue: String
272389
+ ) {
272390
+ createWorkspace(
272391
+ addressLine1: $addressLine1
272392
+ addressLine2: $addressLine2
272393
+ city: $city
272394
+ companyName: $companyName
272395
+ country: $country
272396
+ name: $name
272397
+ parentId: $parentId
272398
+ paymentMethodId: $paymentMethodId
272399
+ postalCode: $postalCode
272400
+ taxIdType: $taxIdType
272401
+ taxIdValue: $taxIdValue
272402
+ ) {
272403
+ ...Workspace
272404
+ applications {
272405
+ ...Application
272406
+ }
272407
+ }
272408
+ }
272409
+ `, [WorkspaceFragment, ApplicationFragment]);
272410
+ var deleteWorkspace = graphql(`
272411
+ mutation deleteWorkspace($id: ID!) {
272412
+ deleteWorkspace(workspaceId: $id) {
272413
+ ...Workspace
272414
+ applications {
272415
+ ...Application
272416
+ }
272417
+ }
272418
+ }
272419
+ `, [WorkspaceFragment, ApplicationFragment]);
272420
+ var addCredits = graphql(`
272421
+ mutation addCredits($workspaceId: String!, $amount: Float!) {
272422
+ addCredits(workspaceId: $workspaceId, amount: $amount)
272423
+ }
272424
+ `);
272425
+ var workspaceList = (gqlClient, options) => {
272426
+ return async () => {
272427
+ const { workspaces } = await gqlClient.request(getWorkspacesAndApplications);
272428
+ const allWorkspaces = workspaces.reduce((acc, workspace) => {
272429
+ acc.push(workspace);
272430
+ if (workspace.childWorkspaces) {
272431
+ acc.push(...workspace.childWorkspaces);
272432
+ }
272433
+ return acc;
272434
+ }, []);
272435
+ return allWorkspaces.sort((a8, b4) => a8.name.localeCompare(b4.name));
272436
+ };
272437
+ };
272438
+ var workspaceRead = (gqlClient, options) => {
272439
+ return async (workspaceId) => {
272440
+ const id = validate3(IdSchema3, workspaceId);
272441
+ const { workspace } = await gqlClient.request(getWorkspace, { id });
272442
+ return workspace;
272443
+ };
272444
+ };
272445
+ var workspaceCreate = (gqlClient, options) => {
272446
+ return async (createWorkspaceArgs) => {
272447
+ const { createWorkspace: workspace } = await gqlClient.request(createWorkspace, createWorkspaceArgs);
272448
+ return workspace;
272449
+ };
272450
+ };
272451
+ var workspaceDelete = (gqlClient, options) => {
272452
+ return async (workspaceId) => {
272453
+ const id = validate3(IdSchema3, workspaceId);
272454
+ const { deleteWorkspace: workspace } = await gqlClient.request(deleteWorkspace, { id });
272455
+ return workspace;
272456
+ };
272457
+ };
272458
+ var workspaceAddCredits = (gqlClient, options) => {
272459
+ return async (workspaceId, amount) => {
272460
+ const id = validate3(IdSchema3, workspaceId);
272461
+ if (amount <= 0) {
272462
+ throw new Error("Credit amount must be a positive number");
272463
+ }
272464
+ const { addCredits: result } = await gqlClient.request(addCredits, { workspaceId: id, amount });
272465
+ return result;
272466
+ };
272467
+ };
272497
272468
  var ClientOptionsSchema = z3.object({
272498
272469
  accessToken: AccessTokenSchema3,
272499
272470
  instance: UrlSchema3
@@ -272595,6 +272566,12 @@ function createSettleMintClient(options) {
272595
272566
  update: customdeploymentUpdate(gqlClient, options),
272596
272567
  restart: customDeploymentRestart(gqlClient, options)
272597
272568
  },
272569
+ smartContractSet: {
272570
+ list: smartContractSetList(gqlClient, options),
272571
+ read: smartContractSetRead(gqlClient, options),
272572
+ create: smartContractSetCreate(gqlClient, options),
272573
+ restart: smartContractSetRestart(gqlClient, options)
272574
+ },
272598
272575
  foundry: {
272599
272576
  env: getEnv(gqlClient, options)
272600
272577
  },
@@ -272799,7 +272776,7 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
272799
272776
  }
272800
272777
  });
272801
272778
  const aat = await settlemint.applicationAccessToken.create({
272802
- applicationUniqueName: application.uniqueName,
272779
+ applicationId: application.id,
272803
272780
  name: name2,
272804
272781
  blockchainNetworkScope: {
272805
272782
  type: "ALL",
@@ -273255,23 +273232,23 @@ function connectCommand() {
273255
273232
  await writeEnvSpinner(!!prod, {
273256
273233
  SETTLEMINT_ACCESS_TOKEN: aatToken,
273257
273234
  SETTLEMINT_INSTANCE: instance,
273258
- SETTLEMINT_WORKSPACE: workspace.uniqueName,
273259
- SETTLEMINT_APPLICATION: application.uniqueName,
273260
- SETTLEMINT_BLOCKCHAIN_NETWORK: blockchainNode?.blockchainNetwork?.uniqueName,
273261
- SETTLEMINT_BLOCKCHAIN_NODE: blockchainNode?.uniqueName,
273262
- SETTLEMINT_HASURA: hasura?.uniqueName,
273235
+ SETTLEMINT_WORKSPACE: workspace.id,
273236
+ SETTLEMINT_APPLICATION: application.id,
273237
+ SETTLEMINT_BLOCKCHAIN_NETWORK: blockchainNode?.blockchainNetwork?.id,
273238
+ SETTLEMINT_BLOCKCHAIN_NODE: blockchainNode?.id,
273239
+ SETTLEMINT_HASURA: hasura?.id,
273263
273240
  ...getHasuraEndpoints(hasura),
273264
- SETTLEMINT_THEGRAPH: thegraph?.uniqueName,
273241
+ SETTLEMINT_THEGRAPH: thegraph?.id,
273265
273242
  ...await getGraphEndpoint(thegraph, env2),
273266
273243
  ...getPortalEndpoints(portal),
273267
273244
  SETTLEMINT_HD_PRIVATE_KEY: hdPrivateKey?.uniqueName,
273268
- SETTLEMINT_MINIO: minio?.uniqueName,
273245
+ SETTLEMINT_MINIO: minio?.id,
273269
273246
  ...getMinioEndpoints(minio),
273270
- SETTLEMINT_IPFS: ipfs?.uniqueName,
273247
+ SETTLEMINT_IPFS: ipfs?.id,
273271
273248
  ...getIpfsEndpoints(ipfs),
273272
- SETTLEMINT_CUSTOM_DEPLOYMENT: cDeployment?.uniqueName,
273249
+ SETTLEMINT_CUSTOM_DEPLOYMENT: cDeployment?.id,
273273
273250
  SETTLEMINT_CUSTOM_DEPLOYMENT_ENDPOINT: cDeployment?.endpoints.find((endpoint) => endpoint.id.includes("internal"))?.displayValue,
273274
- SETTLEMINT_BLOCKSCOUT: blockscout?.uniqueName,
273251
+ SETTLEMINT_BLOCKSCOUT: blockscout?.id,
273275
273252
  ...getBlockscoutEndpoints(blockscout)
273276
273253
  });
273277
273254
  outro("Connected to SettleMint");
@@ -273281,7 +273258,7 @@ function connectCommand() {
273281
273258
  var package_default = {
273282
273259
  name: "@settlemint/sdk-cli",
273283
273260
  description: "SettleMint SDK, integrate SettleMint into your application with ease.",
273284
- version: "0.7.0-pr24cdbac",
273261
+ version: "0.7.0-pr2be5bbc",
273285
273262
  type: "module",
273286
273263
  private: false,
273287
273264
  license: "FSL-1.1-MIT",
@@ -273332,8 +273309,8 @@ var package_default = {
273332
273309
  "@inquirer/input": "4.1.0",
273333
273310
  "@inquirer/password": "4.0.3",
273334
273311
  "@inquirer/select": "4.0.3",
273335
- "@settlemint/sdk-js": "0.7.0-pr24cdbac",
273336
- "@settlemint/sdk-utils": "0.7.0-pr24cdbac",
273312
+ "@settlemint/sdk-js": "0.7.0-pr2be5bbc",
273313
+ "@settlemint/sdk-utils": "0.7.0-pr2be5bbc",
273337
273314
  "get-tsconfig": "4.8.1",
273338
273315
  giget: "1.2.3"
273339
273316
  },
@@ -274330,6 +274307,7 @@ var SETTLEMINT_CLIENT_MAP = {
274330
274307
  "blockchain node": "blockchainNode",
274331
274308
  "custom deployment": "customDeployment",
274332
274309
  "private key": "privateKey",
274310
+ "smart contract set": "smartContractSet",
274333
274311
  middleware: "middleware",
274334
274312
  "integration tool": "integrationTool",
274335
274313
  storage: "storage",
@@ -274341,7 +274319,7 @@ var SETTLEMINT_CLIENT_MAP = {
274341
274319
  async function waitForCompletion({
274342
274320
  settlemint,
274343
274321
  type: type4,
274344
- uniqueName,
274322
+ id,
274345
274323
  action,
274346
274324
  maxTimeout = 15 * 60 * 1000
274347
274325
  }) {
@@ -274360,7 +274338,7 @@ async function waitForCompletion({
274360
274338
  const startTime = Date.now();
274361
274339
  while (true) {
274362
274340
  try {
274363
- const resource = await service.read(uniqueName);
274341
+ const resource = await service.read(id);
274364
274342
  if (resource.status === "COMPLETED") {
274365
274343
  note(`${capitalizeFirstLetter(type4)} is ${getActionLabel(action)}`);
274366
274344
  return true;
@@ -274374,7 +274352,7 @@ async function waitForCompletion({
274374
274352
  note(`${capitalizeFirstLetter(type4)} is not ready yet (status: UNKNOWN)`);
274375
274353
  }
274376
274354
  if (Date.now() - startTime > maxTimeout) {
274377
- throw new Error(`Operation timed out after ${maxTimeout / 60000} minutes for ${type4} with unique name ${uniqueName}`);
274355
+ throw new Error(`Operation timed out after ${maxTimeout / 60000} minutes for ${type4} with id ${id}`);
274378
274356
  }
274379
274357
  await new Promise((resolve6) => setTimeout(resolve6, 5000));
274380
274358
  }
@@ -274411,7 +274389,7 @@ ${createExamples(examples)}`).argument("<name>", `The ${type4} name`).option("-a
274411
274389
  intro(`Creating ${type4} in the SettleMint platform`);
274412
274390
  const autoAccept = !!acceptDefaults || is_in_ci_default;
274413
274391
  const env2 = await loadEnv2(false, !!prod);
274414
- const instance = await instancePrompt(env2, autoAccept);
274392
+ const instance = env2.SETTLEMINT_INSTANCE ?? await instancePrompt(env2, autoAccept);
274415
274393
  const accessToken = usePersonalAccessToken ? (await getInstanceCredentials(instance))?.personalAccessToken : env2.SETTLEMINT_ACCESS_TOKEN;
274416
274394
  if (!accessToken) {
274417
274395
  return missingAccessTokenError();
@@ -274431,7 +274409,7 @@ ${createExamples(examples)}`).argument("<name>", `The ${type4} name`).option("-a
274431
274409
  await waitForCompletion({
274432
274410
  settlemint,
274433
274411
  type: waitFor?.resourceType ?? type4,
274434
- uniqueName: waitFor?.uniqueName ?? result.uniqueName,
274412
+ id: waitFor?.id ?? result.id,
274435
274413
  action: "deploy"
274436
274414
  });
274437
274415
  if (waitFor) {
@@ -274451,10 +274429,10 @@ ${createExamples(examples)}`).argument("<name>", `The ${type4} name`).option("-a
274451
274429
  ...updatedEnv
274452
274430
  };
274453
274431
  if (isApplicationChanged && updatedEnv.SETTLEMINT_APPLICATION) {
274454
- newEnv.SETTLEMINT_WORKSPACE = (await settlemint.application.read(updatedEnv.SETTLEMINT_APPLICATION)).workspace.uniqueName;
274432
+ newEnv.SETTLEMINT_WORKSPACE = (await settlemint.application.read(updatedEnv.SETTLEMINT_APPLICATION)).workspace.id;
274455
274433
  }
274456
274434
  if (newEnv.SETTLEMINT_BLOCKCHAIN_NODE && newEnv.SETTLEMINT_BLOCKCHAIN_NODE !== env2.SETTLEMINT_BLOCKCHAIN_NODE) {
274457
- newEnv.SETTLEMINT_BLOCKCHAIN_NETWORK = (await settlemint.blockchainNode.read(newEnv.SETTLEMINT_BLOCKCHAIN_NODE)).blockchainNetwork.uniqueName;
274435
+ newEnv.SETTLEMINT_BLOCKCHAIN_NETWORK = (await settlemint.blockchainNode.read(newEnv.SETTLEMINT_BLOCKCHAIN_NODE)).blockchainNetwork.id;
274458
274436
  }
274459
274437
  await writeEnvSpinner(!!prod, newEnv);
274460
274438
  note(`${capitalizeFirstLetter(type4)} ${result.name} set as default`);
@@ -274471,8 +274449,8 @@ function blockchainNetworkBesuCreateCommand() {
274471
274449
  type: "blockchain network",
274472
274450
  alias: "b",
274473
274451
  execute: (cmd2, baseAction) => {
274474
- addClusterServiceArgs(cmd2).option("-a, --application <uniqueName>", "The unique name of the application to create the network in (defaults to application from env)").requiredOption("--node-name <name>", "Name of the node").option("--chain-id <chainId>", "The chain ID for the network", parseNumber).option("--contract-size-limit <limit>", "Maximum contract size limit", parseNumber).option("--evm-stack-size <size>", "EVM stack size", parseNumber).option("--gas-limit <limit>", "Block gas limit").option("--gas-price <price>", "Gas price in wei", parseNumber).option("--seconds-per-block <seconds>", "Block time in seconds", parseNumber).action(async (name2, {
274475
- application,
274452
+ addClusterServiceArgs(cmd2).option("-a, --application-id <applicationId>", "The application ID to create the network in (defaults to application from env)").requiredOption("--node-name <name>", "Name of the node").option("--chain-id <chainId>", "The chain ID for the network", parseNumber).option("--contract-size-limit <limit>", "Maximum contract size limit", parseNumber).option("--evm-stack-size <size>", "EVM stack size", parseNumber).option("--gas-limit <limit>", "Block gas limit").option("--gas-price <price>", "Gas price in wei", parseNumber).option("--seconds-per-block <seconds>", "Block time in seconds", parseNumber).action(async (name2, {
274453
+ applicationId,
274476
274454
  chainId,
274477
274455
  contractSizeLimit,
274478
274456
  evmStackSize,
@@ -274487,10 +274465,10 @@ function blockchainNetworkBesuCreateCommand() {
274487
274465
  ...defaultArgs
274488
274466
  }) => {
274489
274467
  return baseAction(defaultArgs, async (settlemint, env2) => {
274490
- const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
274468
+ const application = applicationId ?? env2.SETTLEMINT_APPLICATION;
274491
274469
  const result = await settlemint.blockchainNetwork.create({
274492
274470
  name: name2,
274493
- applicationUniqueName,
274471
+ applicationId: application,
274494
274472
  nodeName,
274495
274473
  consensusAlgorithm: "BESU_QBFT",
274496
274474
  chainId,
@@ -274514,8 +274492,8 @@ function blockchainNetworkBesuCreateCommand() {
274514
274492
  mapDefaultEnv: () => {
274515
274493
  return {
274516
274494
  SETTLEMINT_APPLICATION: application,
274517
- SETTLEMINT_BLOCKCHAIN_NETWORK: result.uniqueName,
274518
- SETTLEMINT_BLOCKCHAIN_NODE: blockchainNode?.uniqueName
274495
+ SETTLEMINT_BLOCKCHAIN_NETWORK: result.id,
274496
+ SETTLEMINT_BLOCKCHAIN_NODE: blockchainNode?.id
274519
274497
  };
274520
274498
  }
274521
274499
  };
@@ -274529,7 +274507,7 @@ function blockchainNetworkBesuCreateCommand() {
274529
274507
  },
274530
274508
  {
274531
274509
  description: "Create a Besu blockchain network in a different application",
274532
- command: "platform create blockchain-network besu my-network --application app-123 --node-name validator-1 --chain-id 12345 --gas-limit 10000000 --seconds-per-block 5"
274510
+ command: "platform create blockchain-network besu my-network --application-id 123456789 --node-name validator-1 --chain-id 12345 --gas-limit 10000000 --seconds-per-block 5"
274533
274511
  }
274534
274512
  ]
274535
274513
  });
@@ -274537,7 +274515,7 @@ function blockchainNetworkBesuCreateCommand() {
274537
274515
 
274538
274516
  // src/commands/platform/blockchain-network/create.ts
274539
274517
  function blockchainNetworkCreateCommand() {
274540
- return new Command2("blockchain-network").alias("bn").description("Create a blockchain network in the SettleMint platform").addCommand(blockchainNetworkBesuCreateCommand());
274518
+ return new Command2("blockchain-network").alias("bnw").description("Create a blockchain network in the SettleMint platform").addCommand(blockchainNetworkBesuCreateCommand());
274541
274519
  }
274542
274520
 
274543
274521
  // src/commands/platform/workspace/create.ts
@@ -274660,7 +274638,7 @@ function workspaceCreateCommand() {
274660
274638
  result,
274661
274639
  mapDefaultEnv: () => {
274662
274640
  return {
274663
- SETTLEMINT_WORKSPACE: result.uniqueName
274641
+ SETTLEMINT_WORKSPACE: result.id
274664
274642
  };
274665
274643
  }
274666
274644
  };
@@ -274691,11 +274669,10 @@ function applicationAccessTokenCreateCommand() {
274691
274669
  type: "application access token",
274692
274670
  alias: "aat",
274693
274671
  execute: (cmd2, baseAction) => {
274694
- cmd2.option("-a, --application <application>", "The application unique name to create the application access token for (defaults to application from env)").addOption(new Option("-v, --validity-period <period>", "The validity period for the token").choices(["DAYS_7", "DAYS_30", "DAYS_60", "DAYS_90", "NONE"]).default("DAYS_7")).action(async (name2, { application, validityPeriod, ...defaultArgs }) => {
274672
+ cmd2.option("-a, --application-id <applicationId>", "The application ID to create the application access token for (defaults to application from env)").addOption(new Option("-v, --validity-period <period>", "The validity period for the token").choices(["DAYS_7", "DAYS_30", "DAYS_60", "DAYS_90", "NONE"]).default("DAYS_7")).action(async (name2, { applicationId, validityPeriod, ...defaultArgs }) => {
274695
274673
  return baseAction(defaultArgs, async (settlemint, env2) => {
274696
- const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
274697
274674
  const aatToken = await settlemint.applicationAccessToken.create({
274698
- applicationUniqueName,
274675
+ applicationId: applicationId ?? env2.SETTLEMINT_APPLICATION,
274699
274676
  name: name2,
274700
274677
  blockchainNetworkScope: {
274701
274678
  type: "ALL",
@@ -274742,8 +274719,7 @@ function applicationAccessTokenCreateCommand() {
274742
274719
  return {
274743
274720
  result: {
274744
274721
  id: "",
274745
- name: name2,
274746
- uniqueName: ""
274722
+ name: name2
274747
274723
  },
274748
274724
  mapDefaultEnv: () => ({
274749
274725
  SETTLEMINT_ACCESS_TOKEN: aatToken
@@ -274776,17 +274752,18 @@ function applicationCreateCommand() {
274776
274752
  type: "application",
274777
274753
  alias: "a",
274778
274754
  execute: (cmd2, baseAction) => {
274779
- cmd2.option("-w, --workspace <workspace>", "The workspace unique name to create the application in (defaults to workspace from env)").action(async (name2, { workspace, ...defaultArgs }) => {
274755
+ cmd2.option("-w, --workspace-id <workspaceId>", "The workspace ID to create the application in (defaults to workspace from env)").action(async (name2, { workspaceId, ...defaultArgs }) => {
274780
274756
  return baseAction(defaultArgs, async (settlemint, env2) => {
274757
+ const workspace = workspaceId ?? env2.SETTLEMINT_WORKSPACE;
274781
274758
  const result = await settlemint.application.create({
274782
274759
  name: name2,
274783
- workspaceUniqueName: workspace ?? env2.SETTLEMINT_WORKSPACE
274760
+ workspaceId: workspace
274784
274761
  });
274785
274762
  return {
274786
274763
  result,
274787
274764
  mapDefaultEnv: () => {
274788
274765
  return {
274789
- SETTLEMINT_APPLICATION: result.uniqueName
274766
+ SETTLEMINT_APPLICATION: result.id
274790
274767
  };
274791
274768
  }
274792
274769
  };
@@ -274804,12 +274781,117 @@ function applicationCreateCommand() {
274804
274781
  },
274805
274782
  {
274806
274783
  description: "Create an application in a specific workspace",
274807
- command: "platform create application my-app --workspace my-workspace"
274784
+ command: "platform create application my-app --workspace-id 123456789"
274808
274785
  }
274809
274786
  ]
274810
274787
  });
274811
274788
  }
274812
274789
 
274790
+ // src/commands/connect/blockchain-network.prompt.ts
274791
+ async function blockchainNetworkPrompt(env2, networks, accept) {
274792
+ if (networks.length === 0) {
274793
+ return;
274794
+ }
274795
+ const defaultNetwork = networks.find((network2) => network2.id === env2.SETTLEMINT_BLOCKCHAIN_NETWORK) ?? (networks.length === 1 ? networks[0] : undefined);
274796
+ const defaultPossible = accept;
274797
+ if (defaultPossible) {
274798
+ return defaultNetwork;
274799
+ }
274800
+ const network = await esm_default2({
274801
+ message: "Which blockchain network do you want to connect to?",
274802
+ choices: [
274803
+ ...networks.map((network2) => ({
274804
+ name: network2.name,
274805
+ value: network2
274806
+ })),
274807
+ {
274808
+ name: "None",
274809
+ value: undefined
274810
+ }
274811
+ ],
274812
+ default: defaultNetwork
274813
+ });
274814
+ return network;
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"
274885
+ }
274886
+ ]
274887
+ });
274888
+ }
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,
@@ -274945,7 +275027,7 @@ function graphMiddlewareCreateCommand() {
274945
275027
  const resource = await settlemint.middleware.read(result.id);
274946
275028
  return {
274947
275029
  SETTLEMINT_APPLICATION: application,
274948
- SETTLEMINT_THEGRAPH: result.uniqueName,
275030
+ SETTLEMINT_THEGRAPH: result.id,
274949
275031
  ...await getGraphEndpoint(resource, env2)
274950
275032
  };
274951
275033
  }
@@ -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);
@@ -276028,7 +276104,7 @@ function hardhatDeployRemoteCommand() {
276028
276104
  instance
276029
276105
  });
276030
276106
  let node = undefined;
276031
- if (!blockchainNodeUniqueName) {
276107
+ if (!blockchainNodeId) {
276032
276108
  const blockchainNodes = await settlemint.blockchainNode.list(env2.SETTLEMINT_APPLICATION);
276033
276109
  if (blockchainNodes.length === 0) {
276034
276110
  cancel2("No blockchain nodes found. Please create a blockchain node and try again.");
@@ -276044,7 +276120,7 @@ function hardhatDeployRemoteCommand() {
276044
276120
  }
276045
276121
  node = blockchainNode;
276046
276122
  } else {
276047
- node = await settlemint.blockchainNode.read(blockchainNodeUniqueName);
276123
+ node = await settlemint.blockchainNode.read(blockchainNodeId);
276048
276124
  }
276049
276125
  const envConfig = await settlemint.foundry.env(node.id);
276050
276126
  const hardhatConfig = await getHardhatConfigData(envConfig);
@@ -276110,8 +276186,8 @@ function hardhatScriptLocalCommand() {
276110
276186
 
276111
276187
  // src/commands/smart-contract-set/hardhat/script/remote.ts
276112
276188
  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 }) => {
276189
+ 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");
276190
+ cmd2.action(async ({ script, prod, blockchainNodeId, acceptDefaults, compile }) => {
276115
276191
  const autoAccept = !!acceptDefaults || is_in_ci_default;
276116
276192
  const env2 = await loadEnv(false, !!prod);
276117
276193
  const accessToken = env2.SETTLEMINT_ACCESS_TOKEN;
@@ -276123,16 +276199,16 @@ function hardhatScriptRemoteCommand() {
276123
276199
  accessToken,
276124
276200
  instance
276125
276201
  });
276126
- let nodeUniqueName = blockchainNodeUniqueName;
276127
- if (!nodeUniqueName) {
276202
+ let nodeId = blockchainNodeId;
276203
+ if (!nodeId) {
276128
276204
  const blockchainNodes = await settlemint.blockchainNode.list(env2.SETTLEMINT_APPLICATION);
276129
276205
  const blockchainNode = await blockchainNodePrompt(env2, blockchainNodes, autoAccept);
276130
276206
  if (!blockchainNode) {
276131
276207
  cancel2("No Blockchain Node selected. Please select one to continue.");
276132
276208
  }
276133
- nodeUniqueName = blockchainNode.uniqueName;
276209
+ nodeId = blockchainNode.id;
276134
276210
  }
276135
- const envConfig = await settlemint.foundry.env(nodeUniqueName);
276211
+ const envConfig = await settlemint.foundry.env(nodeId);
276136
276212
  const { command, args } = await getPackageManagerExecutable();
276137
276213
  await executeCommand(command, [...args, "hardhat", "run", script, "--network", "btp", ...compile ? ["--no-compile"] : []], { env: envConfig });
276138
276214
  });
@@ -276535,4 +276611,4 @@ sdkcli.parseAsync(process.argv).catch((reason) => {
276535
276611
  cancel2(reason);
276536
276612
  });
276537
276613
 
276538
- //# debugId=09413FFEE267649A64756E2164756E21
276614
+ //# debugId=2DEC0197EA5E76F364756E2164756E21