@contrail/cli 3.6.0-alpha-8-alpha.2ab4f80 → 3.6.0-alpha-8-alpha.351376b
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.
- package/README.md +80 -58
- package/dist/api/feature-flags.d.ts +3 -0
- package/dist/api/feature-flags.js +29 -0
- package/dist/api/users.d.ts +1 -0
- package/dist/api/users.js +10 -1
- package/dist/auth/login.js +44 -26
- package/dist/auth/login.spec.js +124 -0
- package/dist/basecommand.js +3 -3
- package/dist/commands/app/getApiKey.js +2 -2
- package/dist/commands/entities/create.d.ts +1 -13
- package/dist/commands/entities/create.js +31 -98
- package/dist/commands/entities/create.spec.js +3 -32
- package/dist/commands/entities/delete.d.ts +2 -6
- package/dist/commands/entities/delete.js +53 -72
- package/dist/commands/entities/get.d.ts +0 -4
- package/dist/commands/entities/get.js +15 -66
- package/dist/commands/entities/update.d.ts +2 -15
- package/dist/commands/entities/update.js +44 -80
- package/dist/commands/feature-flags/export.d.ts +19 -0
- package/dist/commands/feature-flags/export.js +66 -0
- package/dist/commands/feature-flags/export.spec.js +109 -0
- package/dist/commands/feature-flags/import.d.ts +42 -0
- package/dist/commands/feature-flags/import.js +191 -0
- package/dist/commands/feature-flags/import.spec.js +194 -0
- package/dist/commands/instance/export.d.ts +9 -0
- package/dist/commands/instance/export.js +18 -3
- package/dist/commands/instance/export.spec.js +32 -0
- package/dist/commands/instance/import.d.ts +3 -0
- package/dist/commands/instance/import.js +5 -0
- package/dist/commands/instance/import.spec.js +4 -0
- package/dist/common.d.ts +0 -3
- package/dist/common.js +1 -18
- package/dist/helpers/config/config.d.ts +2 -0
- package/dist/helpers/config/config.js +6 -1
- package/dist/helpers/entities/assortment-items.d.ts +2 -4
- package/dist/helpers/entities/assortment-items.js +1 -4
- package/dist/helpers/file-helpers.js +2 -2
- package/dist/helpers/propertySpecifications/propertySpecifications.d.ts +0 -8
- package/dist/helpers/propertySpecifications/propertySpecifications.js +9 -21
- package/dist/helpers/propertySpecifications/propertySpecifications.spec.js +10 -20
- package/dist/logger.js +1 -4
- package/node_modules/@contrail/entity-compare/package.json +3 -6
- package/node_modules/@contrail/loader/lib/common/conditional-columns.js +1 -1
- package/node_modules/@contrail/loader/lib/constants.d.ts +8 -0
- package/node_modules/@contrail/loader/lib/constants.js +9 -1
- package/node_modules/@contrail/loader/lib/entities-v2/linesheet-v2/item-processor.d.ts +4 -0
- package/node_modules/@contrail/loader/lib/entities-v2/linesheet-v2/item-processor.js +57 -0
- package/node_modules/@contrail/loader/lib/entities-v2/linesheet-v2/item-processor.spec.js +492 -34
- package/node_modules/@contrail/loader/lib/pipeline/validate.js +2 -52
- package/node_modules/@contrail/loader/lib/pipeline/validate.spec.js +0 -85
- package/node_modules/@contrail/loader/package.json +2 -2
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/image-search/image-search.d.ts +34 -0
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/image-search/image-search.js +42 -0
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/image-search/index.d.ts +1 -0
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/image-search/index.js +17 -0
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/index.d.ts +1 -0
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/lib/index.js +1 -0
- package/node_modules/@contrail/org-config-migration/node_modules/@contrail/sdk/package.json +1 -1
- package/oclif.manifest.json +137 -99
- package/package.json +4 -1
- package/dist/commands/entities/grammar.spec.js +0 -80
- package/dist/commands/entities/output.spec.js +0 -72
- package/dist/logger.spec.js +0 -12
- /package/dist/commands/{entities/grammar.spec.d.ts → feature-flags/export.spec.d.ts} +0 -0
- /package/dist/commands/{entities/output.spec.d.ts → feature-flags/import.spec.d.ts} +0 -0
- /package/dist/{logger.spec.d.ts → commands/instance/export.spec.d.ts} +0 -0
|
@@ -631,91 +631,6 @@ describe('validate', () => {
|
|
|
631
631
|
expect(issue).toBeUndefined();
|
|
632
632
|
});
|
|
633
633
|
});
|
|
634
|
-
describe('typePath format validation', () => {
|
|
635
|
-
const itemConfig = {
|
|
636
|
-
loadType: [types_1.LoadType.ITEM],
|
|
637
|
-
federatedMappings: { itemFamilyFederatedId: 'itemFamilyFederatedId', name: 'name' },
|
|
638
|
-
};
|
|
639
|
-
it('should error when rows have an invalid typePath', async () => {
|
|
640
|
-
const rows = [
|
|
641
|
-
{ itemFamilyFederatedId: 'fam-1', name: 'A', typePath: 'custom-entity:product' },
|
|
642
|
-
{ itemFamilyFederatedId: 'fam-2', name: 'B', typePath: 'item' },
|
|
643
|
-
];
|
|
644
|
-
const result = await (0, validate_1.validate)(rows, itemConfig, makeAnalysis());
|
|
645
|
-
const issue = result.issues.find((i) => i.columnName === 'typePath' && i.category === types_3.PreValidationCategory.MISSING_REQUIRED_FIELD);
|
|
646
|
-
expect(issue).toBeDefined();
|
|
647
|
-
expect(issue.affectedRows).toHaveLength(1);
|
|
648
|
-
expect(issue.affectedRows[0].row).toBe(2);
|
|
649
|
-
});
|
|
650
|
-
it('should error when typePath is missing on rows', async () => {
|
|
651
|
-
const rows = [
|
|
652
|
-
{ itemFamilyFederatedId: 'fam-1', name: 'A' },
|
|
653
|
-
{ itemFamilyFederatedId: 'fam-2', name: 'B' },
|
|
654
|
-
];
|
|
655
|
-
const result = await (0, validate_1.validate)(rows, itemConfig, makeAnalysis());
|
|
656
|
-
const issue = result.issues.find((i) => i.columnName === 'typePath' && i.category === types_3.PreValidationCategory.MISSING_REQUIRED_FIELD);
|
|
657
|
-
expect(issue).toBeDefined();
|
|
658
|
-
expect(issue.affectedRows).toHaveLength(2);
|
|
659
|
-
});
|
|
660
|
-
it('should not error when all rows have valid typePaths', async () => {
|
|
661
|
-
const rows = [
|
|
662
|
-
{ itemFamilyFederatedId: 'fam-1', name: 'A', typePath: 'item' },
|
|
663
|
-
{ itemFamilyFederatedId: 'fam-2', name: 'B', typePath: 'item:product' },
|
|
664
|
-
{ itemFamilyFederatedId: 'fam-3', name: 'C', typePath: 'item:material:fabric' },
|
|
665
|
-
];
|
|
666
|
-
const result = await (0, validate_1.validate)(rows, itemConfig, makeAnalysis());
|
|
667
|
-
const issue = result.issues.find((i) => i.columnName === 'typePath' && i.category === types_3.PreValidationCategory.MISSING_REQUIRED_FIELD);
|
|
668
|
-
expect(issue).toBeUndefined();
|
|
669
|
-
});
|
|
670
|
-
it('should not run for COLOR loads', async () => {
|
|
671
|
-
const colorConfig = {
|
|
672
|
-
loadType: [types_1.LoadType.COLOR],
|
|
673
|
-
federatedMappings: { federatedId: 'federatedId', name: 'name' },
|
|
674
|
-
};
|
|
675
|
-
const rows = [{ federatedId: '1', name: 'Red', typePath: 'bad-value' }];
|
|
676
|
-
const result = await (0, validate_1.validate)(rows, colorConfig, makeAnalysis());
|
|
677
|
-
const issue = result.issues.find((i) => i.columnName === 'typePath' && i.category === types_3.PreValidationCategory.MISSING_REQUIRED_FIELD);
|
|
678
|
-
expect(issue).toBeUndefined();
|
|
679
|
-
});
|
|
680
|
-
it('should not run for PROJECT_ITEM or ASSORTMENT loads (items already have a type)', async () => {
|
|
681
|
-
const projectItemConfig = {
|
|
682
|
-
loadType: [types_1.LoadType.PROJECT_ITEM, types_1.LoadType.ASSORTMENT],
|
|
683
|
-
federatedMappings: { itemFamilyFederatedId: 'itemFamilyFederatedId', name: 'name' },
|
|
684
|
-
};
|
|
685
|
-
const rows = [{ itemFamilyFederatedId: 'fam-1', name: 'A' }];
|
|
686
|
-
const result = await (0, validate_1.validate)(rows, projectItemConfig, makeAnalysis());
|
|
687
|
-
const issue = result.issues.find((i) => i.columnName === 'typePath' && i.category === types_3.PreValidationCategory.MISSING_REQUIRED_FIELD);
|
|
688
|
-
expect(issue).toBeUndefined();
|
|
689
|
-
});
|
|
690
|
-
it('should error for CUSTOM_ENTITY rows with missing subtype', async () => {
|
|
691
|
-
const customEntityConfig = {
|
|
692
|
-
loadType: [types_1.LoadType.CUSTOM_ENTITY],
|
|
693
|
-
federatedMappings: { federatedId: 'federatedId', name: 'name' },
|
|
694
|
-
};
|
|
695
|
-
const rows = [
|
|
696
|
-
{ federatedId: '1', name: 'A', typePath: 'custom-entity:material' },
|
|
697
|
-
{ federatedId: '2', name: 'B', typePath: 'custom-entity:' },
|
|
698
|
-
{ federatedId: '3', name: 'C' },
|
|
699
|
-
];
|
|
700
|
-
const result = await (0, validate_1.validate)(rows, customEntityConfig, makeAnalysis());
|
|
701
|
-
const issue = result.issues.find((i) => i.columnName === 'typePath' && i.category === types_3.PreValidationCategory.MISSING_REQUIRED_FIELD);
|
|
702
|
-
expect(issue).toBeDefined();
|
|
703
|
-
expect(issue.affectedRows).toHaveLength(2);
|
|
704
|
-
});
|
|
705
|
-
it('should not error for CUSTOM_ENTITY rows with valid typePath', async () => {
|
|
706
|
-
const customEntityConfig = {
|
|
707
|
-
loadType: [types_1.LoadType.CUSTOM_ENTITY],
|
|
708
|
-
federatedMappings: { federatedId: 'federatedId', name: 'name' },
|
|
709
|
-
};
|
|
710
|
-
const rows = [
|
|
711
|
-
{ federatedId: '1', name: 'A', typePath: 'custom-entity:material' },
|
|
712
|
-
{ federatedId: '2', name: 'B', typePath: 'custom-entity:material:fabric' },
|
|
713
|
-
];
|
|
714
|
-
const result = await (0, validate_1.validate)(rows, customEntityConfig, makeAnalysis());
|
|
715
|
-
const issue = result.issues.find((i) => i.columnName === 'typePath' && i.category === types_3.PreValidationCategory.MISSING_REQUIRED_FIELD);
|
|
716
|
-
expect(issue).toBeUndefined();
|
|
717
|
-
});
|
|
718
|
-
});
|
|
719
634
|
describe('typePath existence validation', () => {
|
|
720
635
|
it('should error when typesByPath contains entries with errors (non-existent type)', async () => {
|
|
721
636
|
const config = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contrail/loader",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.9",
|
|
4
4
|
"description": "Client library for helping with loader jobs.",
|
|
5
5
|
"homepage": "https://archergreysorg.github.io/contrail-loader/",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"lib"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@contrail/entity-compare": "^1.
|
|
30
|
+
"@contrail/entity-compare": "^1.0.5",
|
|
31
31
|
"@contrail/entity-types": "1.6.1",
|
|
32
32
|
"@contrail/policies": "^2.0.7",
|
|
33
33
|
"@contrail/types": "^3.0.33",
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { InvocationContext } from '../config';
|
|
2
|
+
export declare type ImageSearchSource = {
|
|
3
|
+
contentId: string;
|
|
4
|
+
} | {
|
|
5
|
+
fileId: string;
|
|
6
|
+
} | {
|
|
7
|
+
imageBase64: string;
|
|
8
|
+
};
|
|
9
|
+
export interface ImageSearchOptions {
|
|
10
|
+
limit?: number;
|
|
11
|
+
minScore?: number;
|
|
12
|
+
hydrate?: boolean;
|
|
13
|
+
filterContentIds?: string[];
|
|
14
|
+
}
|
|
15
|
+
export interface ImageSearchResult {
|
|
16
|
+
contentId: string;
|
|
17
|
+
fileId: string;
|
|
18
|
+
contentHolderReference: string;
|
|
19
|
+
fileName: string;
|
|
20
|
+
contentType: string;
|
|
21
|
+
primaryFileUrl: string;
|
|
22
|
+
score: number;
|
|
23
|
+
contentHolder?: Record<string, unknown>;
|
|
24
|
+
}
|
|
25
|
+
export interface ImageSearchResponse {
|
|
26
|
+
results: ImageSearchResult[];
|
|
27
|
+
}
|
|
28
|
+
export declare class ImageSearch {
|
|
29
|
+
private ctx;
|
|
30
|
+
constructor(ctx?: InvocationContext);
|
|
31
|
+
searchByText(query: string, options?: ImageSearchOptions): Promise<ImageSearchResponse>;
|
|
32
|
+
searchSimilar(source: ImageSearchSource, options?: ImageSearchOptions): Promise<ImageSearchResponse>;
|
|
33
|
+
private post;
|
|
34
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ImageSearch = void 0;
|
|
13
|
+
const request_1 = require("../core/request");
|
|
14
|
+
const SEARCH_RESOURCE = '/image-search/search';
|
|
15
|
+
const SEARCH_BY_IMAGE_RESOURCE = '/image-search/search-by-image';
|
|
16
|
+
class ImageSearch {
|
|
17
|
+
constructor(ctx) {
|
|
18
|
+
this.ctx = ctx;
|
|
19
|
+
}
|
|
20
|
+
searchByText(query, options = {}) {
|
|
21
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
+
return this.post(SEARCH_RESOURCE, Object.assign({ query }, options));
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
searchSimilar(source, options = {}) {
|
|
26
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
27
|
+
return this.post(SEARCH_BY_IMAGE_RESOURCE, Object.assign(Object.assign({}, source), options));
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
post(resource, body) {
|
|
31
|
+
var _a;
|
|
32
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
33
|
+
const response = (yield request_1.Request.request(resource, {
|
|
34
|
+
method: 'POST',
|
|
35
|
+
body: JSON.stringify(body),
|
|
36
|
+
headers: { Accept: 'application/json', 'Content-Type': 'application/json' },
|
|
37
|
+
}, this.ctx));
|
|
38
|
+
return { results: (_a = response === null || response === void 0 ? void 0 : response.results) !== null && _a !== void 0 ? _a : [] };
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.ImageSearch = ImageSearch;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './image-search';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./image-search"), exports);
|
package/oclif.manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "3.6.0-alpha-8-alpha.
|
|
2
|
+
"version": "3.6.0-alpha-8-alpha.351376b",
|
|
3
3
|
"commands": {
|
|
4
4
|
"app:create": {
|
|
5
5
|
"id": "app:create",
|
|
@@ -675,7 +675,7 @@
|
|
|
675
675
|
},
|
|
676
676
|
"entities:create": {
|
|
677
677
|
"id": "entities:create",
|
|
678
|
-
"description": "Create entities",
|
|
678
|
+
"description": "(BETA) Create entities",
|
|
679
679
|
"strict": false,
|
|
680
680
|
"pluginName": "@contrail/cli",
|
|
681
681
|
"pluginAlias": "@contrail/cli",
|
|
@@ -771,28 +771,10 @@
|
|
|
771
771
|
"skipHydrateRelationships": {
|
|
772
772
|
"name": "skipHydrateRelationships",
|
|
773
773
|
"type": "boolean",
|
|
774
|
-
"char": "
|
|
774
|
+
"char": "s",
|
|
775
775
|
"description": "If true, does not hydrate relationships for the created entities",
|
|
776
776
|
"required": false,
|
|
777
777
|
"allowNo": false
|
|
778
|
-
},
|
|
779
|
-
"suffix": {
|
|
780
|
-
"name": "suffix",
|
|
781
|
-
"type": "option",
|
|
782
|
-
"description": "Append a sub-route to the entity endpoint (e.g. --suffix=synchronous targets /<entities>/synchronous)",
|
|
783
|
-
"required": false,
|
|
784
|
-
"multiple": false
|
|
785
|
-
},
|
|
786
|
-
"apiVersion": {
|
|
787
|
-
"name": "apiVersion",
|
|
788
|
-
"type": "option",
|
|
789
|
-
"description": "Api-Version header to send; selects the V1 or V2 variant of the endpoint",
|
|
790
|
-
"required": false,
|
|
791
|
-
"multiple": false,
|
|
792
|
-
"options": [
|
|
793
|
-
"1",
|
|
794
|
-
"2"
|
|
795
|
-
]
|
|
796
778
|
}
|
|
797
779
|
},
|
|
798
780
|
"args": {
|
|
@@ -805,16 +787,14 @@
|
|
|
805
787
|
},
|
|
806
788
|
"entities:delete": {
|
|
807
789
|
"id": "entities:delete",
|
|
808
|
-
"description": "Delete
|
|
809
|
-
"strict":
|
|
790
|
+
"description": "(BETA) Delete an entity",
|
|
791
|
+
"strict": true,
|
|
810
792
|
"pluginName": "@contrail/cli",
|
|
811
793
|
"pluginAlias": "@contrail/cli",
|
|
812
794
|
"pluginType": "core",
|
|
813
795
|
"aliases": [],
|
|
814
796
|
"examples": [
|
|
815
|
-
"contrail entities delete color 123"
|
|
816
|
-
"contrail entities delete color id1 id2 id3",
|
|
817
|
-
"contrail entities delete item -i ids.json"
|
|
797
|
+
"contrail entities delete color 123"
|
|
818
798
|
],
|
|
819
799
|
"flags": {
|
|
820
800
|
"logLevel": {
|
|
@@ -848,35 +828,24 @@
|
|
|
848
828
|
"name": "dryRun",
|
|
849
829
|
"type": "boolean",
|
|
850
830
|
"char": "d",
|
|
851
|
-
"description": "If true, does not delete the
|
|
831
|
+
"description": "If true, does not delete the entity but simulates the deletion",
|
|
852
832
|
"required": false,
|
|
853
833
|
"allowNo": false
|
|
854
834
|
},
|
|
855
|
-
"
|
|
856
|
-
"name": "
|
|
835
|
+
"input": {
|
|
836
|
+
"name": "input",
|
|
857
837
|
"type": "option",
|
|
858
838
|
"char": "i",
|
|
859
|
-
"description": "A
|
|
839
|
+
"description": "A JSON array of objects where each object is one entity to create. Cannot be used with --count. Unless --precise is specified, any missing values will be populated with random values.",
|
|
860
840
|
"required": false,
|
|
861
841
|
"multiple": false
|
|
862
842
|
},
|
|
863
|
-
"
|
|
864
|
-
"name": "
|
|
843
|
+
"id": {
|
|
844
|
+
"name": "id",
|
|
865
845
|
"type": "option",
|
|
866
|
-
"description": "
|
|
846
|
+
"description": "The unique identifier of the entity",
|
|
867
847
|
"required": false,
|
|
868
848
|
"multiple": false
|
|
869
|
-
},
|
|
870
|
-
"apiVersion": {
|
|
871
|
-
"name": "apiVersion",
|
|
872
|
-
"type": "option",
|
|
873
|
-
"description": "Api-Version header to send; selects the V1 or V2 variant of the endpoint",
|
|
874
|
-
"required": false,
|
|
875
|
-
"multiple": false,
|
|
876
|
-
"options": [
|
|
877
|
-
"1",
|
|
878
|
-
"2"
|
|
879
|
-
]
|
|
880
849
|
}
|
|
881
850
|
},
|
|
882
851
|
"args": {
|
|
@@ -884,25 +853,18 @@
|
|
|
884
853
|
"name": "entityName",
|
|
885
854
|
"description": "The name of the entity type to delete",
|
|
886
855
|
"required": true
|
|
887
|
-
},
|
|
888
|
-
"ids": {
|
|
889
|
-
"name": "ids",
|
|
890
|
-
"description": "One or more entity ids to delete",
|
|
891
|
-
"required": false
|
|
892
856
|
}
|
|
893
857
|
}
|
|
894
858
|
},
|
|
895
859
|
"entities:get": {
|
|
896
860
|
"id": "entities:get",
|
|
897
|
-
"description": "Get an entity",
|
|
861
|
+
"description": "(BETA) Get an entity",
|
|
898
862
|
"strict": false,
|
|
899
863
|
"pluginName": "@contrail/cli",
|
|
900
864
|
"pluginAlias": "@contrail/cli",
|
|
901
865
|
"pluginType": "core",
|
|
902
866
|
"aliases": [],
|
|
903
867
|
"examples": [
|
|
904
|
-
"contrail entities get color 123",
|
|
905
|
-
"contrail entities get color id1 id2 id3",
|
|
906
868
|
"contrail entities get color -- id=123",
|
|
907
869
|
"contrail entities get loader-processes -- createdOn=2025-09-15..2025-09-16",
|
|
908
870
|
"contrail entities get orders -- updatedAt=2025-09-15T04:00:00Z..",
|
|
@@ -991,24 +953,6 @@
|
|
|
991
953
|
"description": "Comma-separated list of relations to include in the output",
|
|
992
954
|
"required": false,
|
|
993
955
|
"multiple": false
|
|
994
|
-
},
|
|
995
|
-
"suffix": {
|
|
996
|
-
"name": "suffix",
|
|
997
|
-
"type": "option",
|
|
998
|
-
"description": "Append a sub-route to the entity endpoint (e.g. --suffix=synchronous targets /<entities>/synchronous)",
|
|
999
|
-
"required": false,
|
|
1000
|
-
"multiple": false
|
|
1001
|
-
},
|
|
1002
|
-
"apiVersion": {
|
|
1003
|
-
"name": "apiVersion",
|
|
1004
|
-
"type": "option",
|
|
1005
|
-
"description": "Api-Version header to send; selects the V1 or V2 variant of the endpoint",
|
|
1006
|
-
"required": false,
|
|
1007
|
-
"multiple": false,
|
|
1008
|
-
"options": [
|
|
1009
|
-
"1",
|
|
1010
|
-
"2"
|
|
1011
|
-
]
|
|
1012
956
|
}
|
|
1013
957
|
},
|
|
1014
958
|
"args": {
|
|
@@ -1016,17 +960,12 @@
|
|
|
1016
960
|
"name": "typePath",
|
|
1017
961
|
"description": "The name of the entity type to fetch",
|
|
1018
962
|
"required": true
|
|
1019
|
-
},
|
|
1020
|
-
"ids": {
|
|
1021
|
-
"name": "ids",
|
|
1022
|
-
"description": "One or more entity ids; shorthand for the id/ids criteria",
|
|
1023
|
-
"required": false
|
|
1024
963
|
}
|
|
1025
964
|
}
|
|
1026
965
|
},
|
|
1027
966
|
"entities:update": {
|
|
1028
967
|
"id": "entities:update",
|
|
1029
|
-
"description": "Update an entity",
|
|
968
|
+
"description": "(BETA) Update an entity",
|
|
1030
969
|
"strict": false,
|
|
1031
970
|
"pluginName": "@contrail/cli",
|
|
1032
971
|
"pluginAlias": "@contrail/cli",
|
|
@@ -1034,7 +973,6 @@
|
|
|
1034
973
|
"aliases": [],
|
|
1035
974
|
"examples": [
|
|
1036
975
|
"contrail entities update color 123 -- name=obsidian hex=000000",
|
|
1037
|
-
"contrail entities update item id1 id2 id3 -- status=archived # apply the same change to several entities",
|
|
1038
976
|
"contrail entities update color 123 -- description= notes='\"\"' # Unset description, set notes to empty string"
|
|
1039
977
|
],
|
|
1040
978
|
"flags": {
|
|
@@ -1068,7 +1006,7 @@
|
|
|
1068
1006
|
"skipHydrateRelationships": {
|
|
1069
1007
|
"name": "skipHydrateRelationships",
|
|
1070
1008
|
"type": "boolean",
|
|
1071
|
-
"char": "
|
|
1009
|
+
"char": "s",
|
|
1072
1010
|
"description": "Skip hydrating relationships when updating the entity",
|
|
1073
1011
|
"required": false,
|
|
1074
1012
|
"allowNo": false
|
|
@@ -1077,7 +1015,7 @@
|
|
|
1077
1015
|
"name": "dryRun",
|
|
1078
1016
|
"type": "boolean",
|
|
1079
1017
|
"char": "d",
|
|
1080
|
-
"description": "If true, does not
|
|
1018
|
+
"description": "If true, does not create the entity but simulates the creation",
|
|
1081
1019
|
"required": false,
|
|
1082
1020
|
"allowNo": false
|
|
1083
1021
|
},
|
|
@@ -1085,27 +1023,17 @@
|
|
|
1085
1023
|
"name": "inputFile",
|
|
1086
1024
|
"type": "option",
|
|
1087
1025
|
"char": "i",
|
|
1088
|
-
"description": "
|
|
1089
|
-
"required": false,
|
|
1090
|
-
"multiple": false
|
|
1091
|
-
},
|
|
1092
|
-
"suffix": {
|
|
1093
|
-
"name": "suffix",
|
|
1094
|
-
"type": "option",
|
|
1095
|
-
"description": "Append a sub-route to the entity endpoint (e.g. --suffix=synchronous targets /<entities>/synchronous)",
|
|
1026
|
+
"description": "File containing properties to update the entity (optional)",
|
|
1096
1027
|
"required": false,
|
|
1097
1028
|
"multiple": false
|
|
1098
1029
|
},
|
|
1099
|
-
"
|
|
1100
|
-
"name": "
|
|
1101
|
-
"type": "
|
|
1102
|
-
"
|
|
1030
|
+
"force": {
|
|
1031
|
+
"name": "force",
|
|
1032
|
+
"type": "boolean",
|
|
1033
|
+
"char": "F",
|
|
1034
|
+
"description": "Force update without validation. Internal use only",
|
|
1103
1035
|
"required": false,
|
|
1104
|
-
"
|
|
1105
|
-
"options": [
|
|
1106
|
-
"1",
|
|
1107
|
-
"2"
|
|
1108
|
-
]
|
|
1036
|
+
"allowNo": false
|
|
1109
1037
|
}
|
|
1110
1038
|
},
|
|
1111
1039
|
"args": {
|
|
@@ -1114,13 +1042,123 @@
|
|
|
1114
1042
|
"description": "The name of the entity type to update",
|
|
1115
1043
|
"required": true
|
|
1116
1044
|
},
|
|
1117
|
-
"
|
|
1118
|
-
"name": "
|
|
1119
|
-
"description": "
|
|
1045
|
+
"id": {
|
|
1046
|
+
"name": "id",
|
|
1047
|
+
"description": "The unique identifier of the entity",
|
|
1120
1048
|
"required": false
|
|
1121
1049
|
}
|
|
1122
1050
|
}
|
|
1123
1051
|
},
|
|
1052
|
+
"feature-flags:export": {
|
|
1053
|
+
"id": "feature-flags:export",
|
|
1054
|
+
"description": "Export the enabled feature flags for your Org",
|
|
1055
|
+
"strict": true,
|
|
1056
|
+
"pluginName": "@contrail/cli",
|
|
1057
|
+
"pluginAlias": "@contrail/cli",
|
|
1058
|
+
"pluginType": "core",
|
|
1059
|
+
"aliases": [],
|
|
1060
|
+
"examples": [
|
|
1061
|
+
"$ contrail feature-flags export\n"
|
|
1062
|
+
],
|
|
1063
|
+
"flags": {
|
|
1064
|
+
"logLevel": {
|
|
1065
|
+
"name": "logLevel",
|
|
1066
|
+
"type": "option",
|
|
1067
|
+
"char": "l",
|
|
1068
|
+
"description": "The Log Level",
|
|
1069
|
+
"required": false,
|
|
1070
|
+
"multiple": false,
|
|
1071
|
+
"options": [
|
|
1072
|
+
"error",
|
|
1073
|
+
"warn",
|
|
1074
|
+
"info",
|
|
1075
|
+
"debug"
|
|
1076
|
+
]
|
|
1077
|
+
},
|
|
1078
|
+
"alwaysConfirmEnv": {
|
|
1079
|
+
"name": "alwaysConfirmEnv",
|
|
1080
|
+
"type": "option",
|
|
1081
|
+
"char": "e",
|
|
1082
|
+
"description": "The Environment variables",
|
|
1083
|
+
"required": false,
|
|
1084
|
+
"multiple": false,
|
|
1085
|
+
"options": [
|
|
1086
|
+
"true",
|
|
1087
|
+
"false"
|
|
1088
|
+
],
|
|
1089
|
+
"default": "true"
|
|
1090
|
+
},
|
|
1091
|
+
"outDir": {
|
|
1092
|
+
"name": "outDir",
|
|
1093
|
+
"type": "option",
|
|
1094
|
+
"char": "d",
|
|
1095
|
+
"description": "The directory to which to export the feature flags. Defaults to the current directory",
|
|
1096
|
+
"required": false,
|
|
1097
|
+
"multiple": false,
|
|
1098
|
+
"default": "."
|
|
1099
|
+
},
|
|
1100
|
+
"overwrite": {
|
|
1101
|
+
"name": "overwrite",
|
|
1102
|
+
"type": "boolean",
|
|
1103
|
+
"char": "f",
|
|
1104
|
+
"description": "Replaces any existing export files in outDir",
|
|
1105
|
+
"required": false,
|
|
1106
|
+
"allowNo": false
|
|
1107
|
+
}
|
|
1108
|
+
},
|
|
1109
|
+
"args": {}
|
|
1110
|
+
},
|
|
1111
|
+
"feature-flags:import": {
|
|
1112
|
+
"id": "feature-flags:import",
|
|
1113
|
+
"description": "Upload an extracted set of feature flags",
|
|
1114
|
+
"strict": true,
|
|
1115
|
+
"pluginName": "@contrail/cli",
|
|
1116
|
+
"pluginAlias": "@contrail/cli",
|
|
1117
|
+
"pluginType": "core",
|
|
1118
|
+
"aliases": [],
|
|
1119
|
+
"examples": [
|
|
1120
|
+
"$ contrail feature-flags import\n"
|
|
1121
|
+
],
|
|
1122
|
+
"flags": {
|
|
1123
|
+
"logLevel": {
|
|
1124
|
+
"name": "logLevel",
|
|
1125
|
+
"type": "option",
|
|
1126
|
+
"char": "l",
|
|
1127
|
+
"description": "The Log Level",
|
|
1128
|
+
"required": false,
|
|
1129
|
+
"multiple": false,
|
|
1130
|
+
"options": [
|
|
1131
|
+
"error",
|
|
1132
|
+
"warn",
|
|
1133
|
+
"info",
|
|
1134
|
+
"debug"
|
|
1135
|
+
]
|
|
1136
|
+
},
|
|
1137
|
+
"alwaysConfirmEnv": {
|
|
1138
|
+
"name": "alwaysConfirmEnv",
|
|
1139
|
+
"type": "option",
|
|
1140
|
+
"char": "e",
|
|
1141
|
+
"description": "The Environment variables",
|
|
1142
|
+
"required": false,
|
|
1143
|
+
"multiple": false,
|
|
1144
|
+
"options": [
|
|
1145
|
+
"true",
|
|
1146
|
+
"false"
|
|
1147
|
+
],
|
|
1148
|
+
"default": "true"
|
|
1149
|
+
},
|
|
1150
|
+
"dir": {
|
|
1151
|
+
"name": "dir",
|
|
1152
|
+
"type": "option",
|
|
1153
|
+
"char": "d",
|
|
1154
|
+
"description": "The directory from which to import the feature flags. Defaults to the current directory. The feature flags will be loaded from $dir/feature-flags.yml",
|
|
1155
|
+
"required": false,
|
|
1156
|
+
"multiple": false,
|
|
1157
|
+
"default": "."
|
|
1158
|
+
}
|
|
1159
|
+
},
|
|
1160
|
+
"args": {}
|
|
1161
|
+
},
|
|
1124
1162
|
"file:upload": {
|
|
1125
1163
|
"id": "file:upload",
|
|
1126
1164
|
"description": "Uploads a file to the VibeIQ platform",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contrail/cli",
|
|
3
|
-
"version": "3.6.0-alpha-8-alpha.
|
|
3
|
+
"version": "3.6.0-alpha-8-alpha.351376b",
|
|
4
4
|
"description": "VibeIQ's Contrail Platform CLI.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"contrail-cli": "./bin/run",
|
|
@@ -117,6 +117,9 @@
|
|
|
117
117
|
"org-config": {
|
|
118
118
|
"description": "Export and import org-level configuration"
|
|
119
119
|
},
|
|
120
|
+
"feature-flags": {
|
|
121
|
+
"description": "Export and import the org's enabled feature flags"
|
|
122
|
+
},
|
|
120
123
|
"webhooks": {
|
|
121
124
|
"description": "Manage VibeIQ webhooks"
|
|
122
125
|
},
|