@contrail/cli 3.6.0-alpha.f45f126 → 3.7.0-alpha.0d7ff29

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 (180) hide show
  1. package/README.md +405 -71
  2. package/dist/api/types.d.ts +35 -0
  3. package/dist/api/types.js +49 -1
  4. package/dist/auth/login.d.ts +1 -1
  5. package/dist/auth/login.js +47 -29
  6. package/dist/auth/login.spec.js +48 -15
  7. package/dist/auth/sign-in-error.d.ts +7 -0
  8. package/dist/auth/sign-in-error.js +24 -0
  9. package/dist/auth/sign-in-error.spec.d.ts +1 -0
  10. package/dist/auth/sign-in-error.spec.js +22 -0
  11. package/dist/auth/sso.d.ts +5 -3
  12. package/dist/auth/sso.js +34 -18
  13. package/dist/auth/sso.spec.js +63 -10
  14. package/dist/baseFlags.d.ts +4 -0
  15. package/dist/baseFlags.js +9 -1
  16. package/dist/basecommand.d.ts +5 -0
  17. package/dist/basecommand.js +17 -4
  18. package/dist/basecommand.spec.d.ts +1 -0
  19. package/dist/basecommand.spec.js +69 -0
  20. package/dist/commands/app/create.d.ts +1 -0
  21. package/dist/commands/app/delete.d.ts +1 -0
  22. package/dist/commands/app/extension/deploy.d.ts +1 -0
  23. package/dist/commands/app/extension/deployment/list.d.ts +1 -0
  24. package/dist/commands/app/getApiKey.d.ts +1 -0
  25. package/dist/commands/app/getApiKey.js +2 -2
  26. package/dist/commands/app/init.d.ts +1 -0
  27. package/dist/commands/app/install.d.ts +1 -0
  28. package/dist/commands/app/publish.d.ts +1 -0
  29. package/dist/commands/app/uninstall.d.ts +1 -0
  30. package/dist/commands/app/upgrade.d.ts +1 -0
  31. package/dist/commands/app/version/major.d.ts +1 -0
  32. package/dist/commands/app/version/minor.d.ts +1 -0
  33. package/dist/commands/app/version/patch.d.ts +1 -0
  34. package/dist/commands/config/create.d.ts +2 -0
  35. package/dist/commands/config/create.js +1 -0
  36. package/dist/commands/config/describe.d.ts +2 -0
  37. package/dist/commands/config/describe.js +7 -4
  38. package/dist/commands/config/list.d.ts +2 -0
  39. package/dist/commands/config/list.js +2 -3
  40. package/dist/commands/config/set.d.ts +1 -0
  41. package/dist/commands/config/set.js +11 -6
  42. package/dist/commands/config/use.d.ts +2 -0
  43. package/dist/commands/config/use.js +4 -0
  44. package/dist/commands/entities/create.d.ts +50 -0
  45. package/dist/commands/entities/create.js +618 -0
  46. package/dist/commands/entities/create.spec.d.ts +1 -0
  47. package/dist/commands/entities/create.spec.js +581 -0
  48. package/dist/commands/entities/delete.d.ts +21 -0
  49. package/dist/commands/entities/delete.js +146 -0
  50. package/dist/commands/entities/get.d.ts +26 -0
  51. package/dist/commands/entities/get.js +298 -0
  52. package/dist/commands/entities/grammar.spec.d.ts +1 -0
  53. package/dist/commands/entities/grammar.spec.js +79 -0
  54. package/dist/commands/entities/output.spec.d.ts +1 -0
  55. package/dist/commands/entities/output.spec.js +72 -0
  56. package/dist/commands/entities/update.d.ts +33 -0
  57. package/dist/commands/entities/update.js +212 -0
  58. package/dist/commands/feature-flags/export.d.ts +1 -0
  59. package/dist/commands/feature-flags/import.d.ts +1 -0
  60. package/dist/commands/file/upload.d.ts +1 -0
  61. package/dist/commands/groups/export.d.ts +1 -0
  62. package/dist/commands/groups/import.d.ts +1 -0
  63. package/dist/commands/instance/export.d.ts +1 -0
  64. package/dist/commands/instance/import.d.ts +1 -0
  65. package/dist/commands/load/colors.d.ts +1 -0
  66. package/dist/commands/load/custom-entity.d.ts +1 -0
  67. package/dist/commands/load/line-sheet.d.ts +1 -0
  68. package/dist/commands/load/upload-and-load.d.ts +1 -0
  69. package/dist/commands/load-local/index.d.ts +1 -0
  70. package/dist/commands/login.d.ts +1 -0
  71. package/dist/commands/login.js +1 -1
  72. package/dist/commands/org-config/export.d.ts +1 -0
  73. package/dist/commands/org-config/import.d.ts +1 -0
  74. package/dist/commands/projects/export.d.ts +1 -0
  75. package/dist/commands/projects/list.d.ts +1 -0
  76. package/dist/commands/projects/load.d.ts +1 -0
  77. package/dist/commands/types/exportOptionSetHierarchies.d.ts +1 -0
  78. package/dist/commands/types/getAll.d.ts +1 -0
  79. package/dist/commands/types/getOptionSets.d.ts +1 -0
  80. package/dist/commands/types/loadAll.d.ts +1 -0
  81. package/dist/commands/types/mergeOptionSets.d.ts +1 -0
  82. package/dist/commands/types/mergeTypeProperties.d.ts +1 -0
  83. package/dist/commands/types/parseOptionSetsHierarchyLocalFile.d.ts +1 -0
  84. package/dist/commands/types/parseOptionSetsHierarchyValuesToKeysLocalFile.d.ts +1 -0
  85. package/dist/commands/types/parseOptionSetsLocalFiles.d.ts +1 -0
  86. package/dist/commands/types/parseOptionSetsToFolderStructure.d.ts +1 -0
  87. package/dist/commands/types/parseTypesFromFiles.d.ts +1 -0
  88. package/dist/commands/types/parseTypesFromLocalFiles.d.ts +1 -0
  89. package/dist/commands/types/parseTypesFromTemplateAndDataFromLocalFiles.d.ts +1 -0
  90. package/dist/commands/types/parseTypesFromTemplateFromLocalFiles.d.ts +1 -0
  91. package/dist/commands/types/uploadOptionSetHierarchies.d.ts +1 -0
  92. package/dist/commands/types/uploadOptionSets.d.ts +1 -0
  93. package/dist/commands/types/uploadOptionSetsHierarchyLocalFile.d.ts +1 -0
  94. package/dist/commands/types/uploadRuleSets.d.ts +1 -0
  95. package/dist/commands/types/uploadTypeOverrides.d.ts +1 -0
  96. package/dist/commands/types/uploadTypePolicies.d.ts +1 -0
  97. package/dist/commands/types/uploadTypePropertyPolicies.d.ts +1 -0
  98. package/dist/commands/types/uploadTypes.d.ts +1 -0
  99. package/dist/commands/users/export.d.ts +1 -0
  100. package/dist/commands/users/import.d.ts +1 -0
  101. package/dist/commands/webhooks/create.d.ts +1 -0
  102. package/dist/commands/webhooks/delete.d.ts +1 -0
  103. package/dist/commands/webhooks/delete.js +2 -3
  104. package/dist/commands/webhooks/getWebhookTrigger.d.ts +1 -0
  105. package/dist/commands/webhooks/list.d.ts +1 -0
  106. package/dist/commands/workflow-template-definitions/install.d.ts +1 -0
  107. package/dist/commands/workflow-template-definitions/list.d.ts +1 -0
  108. package/dist/commands/workflow-templates/delete.d.ts +1 -0
  109. package/dist/commands/workflow-templates/export.d.ts +1 -0
  110. package/dist/commands/workflow-templates/list.d.ts +1 -0
  111. package/dist/commands/workflow-templates/load.d.ts +1 -0
  112. package/dist/common.d.ts +10 -1
  113. package/dist/common.js +37 -1
  114. package/dist/common.spec.d.ts +1 -0
  115. package/dist/common.spec.js +40 -0
  116. package/dist/helpers/config/config.d.ts +4 -3
  117. package/dist/helpers/config/config.js +52 -45
  118. package/dist/helpers/config/config.spec.d.ts +1 -0
  119. package/dist/helpers/config/config.spec.js +79 -0
  120. package/dist/helpers/config/redact-tokens.d.ts +1 -0
  121. package/dist/helpers/config/redact-tokens.js +14 -0
  122. package/dist/helpers/config/redact-tokens.spec.d.ts +1 -0
  123. package/dist/helpers/config/redact-tokens.spec.js +24 -0
  124. package/dist/helpers/entities/assortment-items.d.ts +11 -0
  125. package/dist/helpers/entities/assortment-items.js +76 -0
  126. package/dist/helpers/entities/batchFetch.d.ts +11 -0
  127. package/dist/helpers/entities/batchFetch.js +50 -0
  128. package/dist/helpers/entities/index.d.ts +3 -0
  129. package/dist/helpers/entities/index.js +6 -0
  130. package/dist/helpers/entities/items.d.ts +6 -0
  131. package/dist/helpers/entities/items.js +60 -0
  132. package/dist/helpers/entities/items.spec.d.ts +1 -0
  133. package/dist/helpers/entities/items.spec.js +19 -0
  134. package/dist/helpers/entities/project-items.d.ts +2 -0
  135. package/dist/helpers/entities/project-items.js +44 -0
  136. package/dist/helpers/file-helpers.d.ts +1 -0
  137. package/dist/helpers/file-helpers.js +20 -3
  138. package/dist/helpers/propertySpecifications/dateRanges.d.ts +34 -0
  139. package/dist/helpers/propertySpecifications/dateRanges.js +91 -0
  140. package/dist/helpers/propertySpecifications/dateRanges.spec.d.ts +1 -0
  141. package/dist/helpers/propertySpecifications/dateRanges.spec.js +97 -0
  142. package/dist/helpers/propertySpecifications/propertySpecifications.d.ts +39 -0
  143. package/dist/helpers/propertySpecifications/propertySpecifications.js +102 -0
  144. package/dist/helpers/propertySpecifications/propertySpecifications.spec.d.ts +1 -0
  145. package/dist/helpers/propertySpecifications/propertySpecifications.spec.js +387 -0
  146. package/dist/helpers/propertySpecifications/propertyValues.d.ts +31 -0
  147. package/dist/helpers/propertySpecifications/propertyValues.js +132 -0
  148. package/dist/helpers/propertySpecifications/propertyValues.spec.d.ts +1 -0
  149. package/dist/helpers/propertySpecifications/propertyValues.spec.js +156 -0
  150. package/dist/logger.js +4 -1
  151. package/dist/logger.spec.d.ts +1 -0
  152. package/dist/logger.spec.js +12 -0
  153. package/node_modules/@contrail/entity-compare/package.json +6 -3
  154. package/node_modules/@contrail/loader/lib/common/conditional-columns.js +1 -1
  155. package/node_modules/@contrail/loader/lib/constants.d.ts +0 -8
  156. package/node_modules/@contrail/loader/lib/constants.js +1 -9
  157. package/node_modules/@contrail/loader/lib/entities-v2/linesheet-v2/item-processor.d.ts +0 -4
  158. package/node_modules/@contrail/loader/lib/entities-v2/linesheet-v2/item-processor.js +0 -57
  159. package/node_modules/@contrail/loader/lib/entities-v2/linesheet-v2/item-processor.spec.js +34 -492
  160. package/node_modules/@contrail/loader/lib/pipeline/validate.js +52 -2
  161. package/node_modules/@contrail/loader/lib/pipeline/validate.spec.js +85 -0
  162. package/node_modules/@contrail/loader/package.json +2 -2
  163. package/node_modules/@contrail/sdk/.github/workflows/publish-to-npm.yml +1 -4
  164. package/node_modules/@contrail/sdk/lib/auth/login.js +1 -1
  165. package/node_modules/@contrail/sdk/lib/config/config.d.ts +3 -0
  166. package/node_modules/@contrail/sdk/lib/config/config.js +13 -7
  167. package/node_modules/@contrail/sdk/lib/core/request.js +6 -2
  168. package/node_modules/@contrail/sdk/lib/entities/entities.client.d.ts +2 -0
  169. package/node_modules/@contrail/sdk/lib/entities/entities.client.js +3 -1
  170. package/node_modules/@contrail/sdk/lib/entities/entity.resource.registry.js +1 -0
  171. package/node_modules/@contrail/sdk/lib/image-search/image-search.d.ts +34 -0
  172. package/node_modules/@contrail/sdk/lib/image-search/image-search.js +42 -0
  173. package/node_modules/@contrail/sdk/lib/image-search/index.d.ts +1 -0
  174. package/node_modules/@contrail/sdk/lib/image-search/index.js +17 -0
  175. package/node_modules/@contrail/sdk/lib/index.d.ts +1 -0
  176. package/node_modules/@contrail/sdk/lib/index.js +1 -0
  177. package/node_modules/@contrail/sdk/package.json +1 -1
  178. package/node_modules/@contrail/sdk/scripts/replicate-bug.js +69 -0
  179. package/oclif.manifest.json +969 -9
  180. package/package.json +6 -12
@@ -2,11 +2,13 @@ import { BaseCommand } from '../../basecommand';
2
2
  export default class DescribeConfig extends BaseCommand {
3
3
  static description: string;
4
4
  skipConfirmEnv: boolean;
5
+ selectsConfigAtStart: boolean;
5
6
  static examples: string[];
6
7
  static args: {
7
8
  name: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
8
9
  };
9
10
  static flags: {
11
+ config: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
10
12
  alwaysConfirmEnv: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
11
13
  logLevel: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
12
14
  };
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
+ const node_util_1 = require("node:util");
4
5
  const config_1 = require("../../helpers/config/config");
6
+ const redact_tokens_1 = require("../../helpers/config/redact-tokens");
5
7
  const basecommand_1 = require("../../basecommand");
6
8
  const inquirer_1 = tslib_1.__importDefault(require("inquirer"));
7
9
  const core_1 = require("@oclif/core");
@@ -9,6 +11,7 @@ const logger_1 = tslib_1.__importDefault(require("../../logger"));
9
11
  class DescribeConfig extends basecommand_1.BaseCommand {
10
12
  static description = 'Display the contents of a configuration file';
11
13
  skipConfirmEnv = true;
14
+ selectsConfigAtStart = false;
12
15
  static examples = ['$ contrail config describe demo-org'];
13
16
  static args = {
14
17
  name: core_1.Args.string({ description: 'The config name', required: false }),
@@ -17,13 +20,13 @@ class DescribeConfig extends basecommand_1.BaseCommand {
17
20
  ...basecommand_1.BaseCommand.baseFlags,
18
21
  };
19
22
  async run() {
20
- let configName = this.args.name;
23
+ let configName = this.args.name ?? this.flags.config;
21
24
  const arrConfigFiles = await (0, config_1.getConfigFiles)();
22
- if (this.args.name && !arrConfigFiles.includes(configName)) {
25
+ if (configName && !arrConfigFiles.includes(configName)) {
23
26
  logger_1.default.error(`No config found with name ${configName}`);
24
27
  return;
25
28
  }
26
- if (!this.args.name) {
29
+ if (!configName) {
27
30
  const questions = [
28
31
  {
29
32
  type: 'list',
@@ -40,7 +43,7 @@ class DescribeConfig extends basecommand_1.BaseCommand {
40
43
  const answers = await inquirer_1.default.prompt(questions);
41
44
  configName = answers.configFile;
42
45
  }
43
- this.log(await (0, config_1.getConfigContent)(configName));
46
+ this.log((0, node_util_1.inspect)((0, redact_tokens_1.redactTokens)(await (0, config_1.getConfigContent)(configName))));
44
47
  }
45
48
  }
46
49
  exports.default = DescribeConfig;
@@ -2,8 +2,10 @@ import { BaseCommand } from '../../basecommand';
2
2
  export default class ListConfig extends BaseCommand {
3
3
  static description: string;
4
4
  skipConfirmEnv: boolean;
5
+ selectsConfigAtStart: boolean;
5
6
  static examples: string[];
6
7
  static flags: {
8
+ config: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
7
9
  alwaysConfirmEnv: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
8
10
  logLevel: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
9
11
  };
@@ -7,6 +7,7 @@ const chalk_1 = tslib_1.__importDefault(require("chalk"));
7
7
  class ListConfig extends basecommand_1.BaseCommand {
8
8
  static description = 'List the configurations';
9
9
  skipConfirmEnv = true;
10
+ selectsConfigAtStart = false;
10
11
  static examples = [
11
12
  `$ contrail config list
12
13
  `,
@@ -17,9 +18,7 @@ class ListConfig extends basecommand_1.BaseCommand {
17
18
  async run() {
18
19
  // Get all available config files
19
20
  const arrConfigFiles = await (0, config_1.getConfigFiles)();
20
- // Get the current active configuration from the main config file
21
- const mainConfig = await (0, config_1.readVibeIQConfig)();
22
- const activeConfig = mainConfig?.configInUse || '';
21
+ const activeConfig = (await (0, config_1.fetchConfigNameForRun)()) || '';
23
22
  // Create a simpler array of objects with just the names
24
23
  const tableData = arrConfigFiles.map((config, index) => {
25
24
  return {
@@ -1,6 +1,7 @@
1
1
  import { BaseCommand } from '../../basecommand';
2
2
  export default class SetConfig extends BaseCommand {
3
3
  skipConfirmEnv: boolean;
4
+ selectsConfigAtStart: boolean;
4
5
  static description: string;
5
6
  static examples: string[];
6
7
  static flags: {
@@ -7,8 +7,12 @@ const basecommand_1 = require("../../basecommand");
7
7
  const logger_1 = tslib_1.__importDefault(require("../../logger"));
8
8
  class SetConfig extends basecommand_1.BaseCommand {
9
9
  skipConfirmEnv = true;
10
+ selectsConfigAtStart = false;
10
11
  static description = 'Set a variable in the configuration';
11
- static examples = ['$ contrail config set --orgId 1234'];
12
+ static examples = [
13
+ '$ contrail config set --orgSlug acme',
14
+ '$ contrail config set --orgSlug acme --config acme-dev',
15
+ ];
12
16
  static flags = {
13
17
  ...basecommand_1.BaseCommand.baseFlags,
14
18
  orgSlug: core_1.Flags.string({ description: 'The org slug', required: false }),
@@ -21,14 +25,15 @@ class SetConfig extends basecommand_1.BaseCommand {
21
25
  description: 'The API User Token',
22
26
  required: false,
23
27
  }),
24
- config: core_1.Flags.string({
25
- description: 'The config name',
26
- required: false,
27
- }),
28
28
  };
29
29
  static args = {};
30
30
  async run() {
31
31
  delete this.flags.alwaysConfirmEnv;
32
+ const configName = this.flags.config;
33
+ delete this.flags.config;
34
+ if (configName && !(await (0, config_1.getConfigFiles)()).includes(configName)) {
35
+ await (0, config_1.createConfig)(configName);
36
+ }
32
37
  const config = {};
33
38
  for (const [label, obj] of Object.entries(this.flags)) {
34
39
  if (label === 'environment') {
@@ -39,7 +44,7 @@ class SetConfig extends basecommand_1.BaseCommand {
39
44
  }
40
45
  logger_1.default.info(`label: ${label}, value: ${obj}`);
41
46
  }
42
- await (0, config_1.storeConfig)(config, this.flags.config);
47
+ await (0, config_1.storeConfig)(config);
43
48
  logger_1.default.info(`Successfully added/updated configuration`);
44
49
  }
45
50
  }
@@ -2,11 +2,13 @@ import { BaseCommand } from '../../basecommand';
2
2
  export default class UseConfig extends BaseCommand {
3
3
  static description: string;
4
4
  skipConfirmEnv: boolean;
5
+ selectsConfigAtStart: boolean;
5
6
  static examples: string[];
6
7
  static args: {
7
8
  name: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
8
9
  };
9
10
  static flags: {
11
+ config: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
10
12
  alwaysConfirmEnv: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
11
13
  logLevel: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
12
14
  };
@@ -9,6 +9,7 @@ const logger_1 = tslib_1.__importDefault(require("../../logger"));
9
9
  class UseConfig extends basecommand_1.BaseCommand {
10
10
  static description = 'Use a specific configuration';
11
11
  skipConfirmEnv = true;
12
+ selectsConfigAtStart = false;
12
13
  static examples = ['$ contrail config use demo-org'];
13
14
  static args = {
14
15
  name: core_1.Args.string({ description: 'The config name', required: false }),
@@ -42,6 +43,9 @@ class UseConfig extends basecommand_1.BaseCommand {
42
43
  }
43
44
  await (0, config_1.storeVibeIQConfig)({ configInUse: configName });
44
45
  logger_1.default.info(`Successfully set ${configName} as the configuration to use.`);
46
+ if (process.env.CONTRAIL_CLI_CONFIG) {
47
+ logger_1.default.warn(`CONTRAIL_CLI_CONFIG is set, so this shell keeps using ${process.env.CONTRAIL_CLI_CONFIG}.`);
48
+ }
45
49
  }
46
50
  }
47
51
  exports.default = UseConfig;
@@ -0,0 +1,50 @@
1
+ import { PropertyLevel } from '@contrail/types';
2
+ import { ColonDelimited, TypeProperty as ExtendedTypeProperty, TypeReferencesCacheByPath } from '../../api/types';
3
+ import { TypeWithProperties } from '../../api/types';
4
+ import { BaseCommand } from '../../basecommand';
5
+ import { Role } from '../../helpers/entities';
6
+ export default class CreateEntity extends BaseCommand {
7
+ static description: string;
8
+ static examples: string[];
9
+ static flags: {
10
+ count: import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
11
+ dryRun: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
12
+ inputFile: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
13
+ outputFile: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
14
+ generateValues: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
15
+ readableIds: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
16
+ skipHydrateRelationships: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
17
+ suffix: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
18
+ apiVersion: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
19
+ config: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
20
+ alwaysConfirmEnv: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
21
+ logLevel: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
22
+ };
23
+ static args: {
24
+ typePath: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
25
+ };
26
+ static strict: boolean;
27
+ init(): Promise<void>;
28
+ run(): Promise<void>;
29
+ }
30
+ export type CreateSummary = {
31
+ created: any[];
32
+ failed: {
33
+ input: any;
34
+ error: string;
35
+ }[];
36
+ };
37
+ export declare function summarizeSettledCreates(inputs: any[], settled: PromiseSettledResult<any>[]): CreateSummary;
38
+ export declare function pickRandomPropertyValues(type: TypeWithProperties, objectReferencesCache: ObjectReferenceCachesByTypePath, typeReferencesCache: TypeReferencesCacheByPath, roles?: Role[], suppliedSlugs?: Set<string>): any;
39
+ export type WithId = {
40
+ id: string;
41
+ [key: string]: any;
42
+ };
43
+ export type ObjectReferenceCache = Map<string, WithId>;
44
+ type ObjectReferenceCachesByTypePath = Map<string, ObjectReferenceCache>;
45
+ export declare function pickRandomValueForProperty(property: ExtendedTypeProperty, objectReferencesCache: ObjectReferenceCachesByTypePath, typeReferencesCache: TypeReferencesCacheByPath): number | string | string[] | boolean | null;
46
+ export declare function getReferencedObjectPaths(type: TypeWithProperties): ColonDelimited[];
47
+ export declare function buildObjectReferenceCache(entities: any[]): ObjectReferenceCache;
48
+ export declare function selectRandomObject(cache: ObjectReferenceCache): WithId;
49
+ export declare function doesPropertyLevelMatchRole(propertyLevel: PropertyLevel, role: Role): boolean;
50
+ export {};