@contrail/entity-types 1.1.48-0 → 1.1.50-2
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/lib/client.d.ts +105 -0
- package/lib/client.js +110 -0
- package/lib/index.d.ts +27 -25
- package/lib/index.js +2 -0
- package/lib/subscription.d.ts +1 -1
- package/package.json +2 -2
package/lib/client.d.ts
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
export declare class InvalidPolicyError extends Error {
|
|
2
|
+
}
|
|
3
|
+
export declare class TimeoutError extends Error {
|
|
4
|
+
}
|
|
5
|
+
export declare class ApiError extends Error {
|
|
6
|
+
details: any;
|
|
7
|
+
constructor(message: any, details: any);
|
|
8
|
+
}
|
|
9
|
+
export declare abstract class EntityReference {
|
|
10
|
+
id: string;
|
|
11
|
+
entityType: string;
|
|
12
|
+
reference: string;
|
|
13
|
+
}
|
|
14
|
+
export interface SortOption {
|
|
15
|
+
orderField: string;
|
|
16
|
+
order?: SortOrderOptions;
|
|
17
|
+
}
|
|
18
|
+
export declare enum SortOrderOptions {
|
|
19
|
+
ASC = "asc",
|
|
20
|
+
DESC = "desc"
|
|
21
|
+
}
|
|
22
|
+
export declare enum API_VERSION {
|
|
23
|
+
EMPTY = "",
|
|
24
|
+
V1 = "1",
|
|
25
|
+
V2 = "2"
|
|
26
|
+
}
|
|
27
|
+
export declare const DEFAULT_API_VERSION = API_VERSION.EMPTY;
|
|
28
|
+
export declare abstract class EntitiesClientGetOptions {
|
|
29
|
+
entityName?: string;
|
|
30
|
+
id?: string;
|
|
31
|
+
reference?: string;
|
|
32
|
+
federatedId?: string;
|
|
33
|
+
federatedIds?: string[];
|
|
34
|
+
relation?: string;
|
|
35
|
+
relations?: Array<string>;
|
|
36
|
+
criteria?: {
|
|
37
|
+
[key: string]: any;
|
|
38
|
+
};
|
|
39
|
+
cacheMode?: string;
|
|
40
|
+
search?: string;
|
|
41
|
+
useSearch?: boolean;
|
|
42
|
+
order?: SortOption[];
|
|
43
|
+
skip?: number;
|
|
44
|
+
take?: number;
|
|
45
|
+
paginate?: boolean;
|
|
46
|
+
nextPageKey?: string;
|
|
47
|
+
apiVersion?: API_VERSION;
|
|
48
|
+
suffix?: string;
|
|
49
|
+
}
|
|
50
|
+
export declare abstract class EntitiesClientCreateOptions {
|
|
51
|
+
entityName: string;
|
|
52
|
+
object: any;
|
|
53
|
+
id?: string;
|
|
54
|
+
relation?: string;
|
|
55
|
+
apiVersion?: API_VERSION;
|
|
56
|
+
suffix?: string;
|
|
57
|
+
}
|
|
58
|
+
export declare abstract class EntitiesClientBatchCreateOptions {
|
|
59
|
+
entityName: string;
|
|
60
|
+
objects: any[];
|
|
61
|
+
apiVersion?: API_VERSION;
|
|
62
|
+
suffix?: string;
|
|
63
|
+
}
|
|
64
|
+
declare class EntitiesClientUpdateOptions {
|
|
65
|
+
entityName?: string;
|
|
66
|
+
object: any;
|
|
67
|
+
id?: string;
|
|
68
|
+
reference?: string;
|
|
69
|
+
relation?: string;
|
|
70
|
+
relationId?: string;
|
|
71
|
+
apiVersion?: API_VERSION;
|
|
72
|
+
suffix?: string;
|
|
73
|
+
}
|
|
74
|
+
export declare abstract class EntitiesClientBatchUpdateOptions {
|
|
75
|
+
entityName: string;
|
|
76
|
+
objects: any[];
|
|
77
|
+
apiVersion?: API_VERSION;
|
|
78
|
+
suffix?: string;
|
|
79
|
+
}
|
|
80
|
+
export declare abstract class EntitiesClientDeleteOptions {
|
|
81
|
+
entityName?: string;
|
|
82
|
+
id?: string;
|
|
83
|
+
reference?: string;
|
|
84
|
+
relation?: string;
|
|
85
|
+
relationId?: string;
|
|
86
|
+
apiVersion?: API_VERSION;
|
|
87
|
+
suffix?: string;
|
|
88
|
+
}
|
|
89
|
+
export declare abstract class EntitiesClientBatchDeleteOptions {
|
|
90
|
+
entityName?: string;
|
|
91
|
+
ids?: string[];
|
|
92
|
+
apiVersion?: API_VERSION;
|
|
93
|
+
suffix?: string;
|
|
94
|
+
}
|
|
95
|
+
export declare abstract class EntitiesClient {
|
|
96
|
+
abstract getAllReferences(references: Array<EntityReference>, relations: Array<string>): Promise<Map<string, any>>;
|
|
97
|
+
abstract get(options: EntitiesClientGetOptions): Promise<any | any[]>;
|
|
98
|
+
abstract create(options: EntitiesClientCreateOptions): any;
|
|
99
|
+
abstract batchCreate(options: EntitiesClientBatchCreateOptions): any;
|
|
100
|
+
abstract update(options: EntitiesClientUpdateOptions): any;
|
|
101
|
+
abstract batchUpdate(options: EntitiesClientBatchUpdateOptions): any;
|
|
102
|
+
abstract delete(options: EntitiesClientDeleteOptions): any;
|
|
103
|
+
abstract batchDelete(options: EntitiesClientBatchDeleteOptions): any;
|
|
104
|
+
}
|
|
105
|
+
export {};
|
package/lib/client.js
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EntitiesClient = exports.EntitiesClientBatchDeleteOptions = exports.EntitiesClientDeleteOptions = exports.EntitiesClientBatchUpdateOptions = exports.EntitiesClientBatchCreateOptions = exports.EntitiesClientCreateOptions = exports.EntitiesClientGetOptions = exports.DEFAULT_API_VERSION = exports.API_VERSION = exports.SortOrderOptions = exports.EntityReference = exports.ApiError = exports.TimeoutError = exports.InvalidPolicyError = void 0;
|
|
4
|
+
class InvalidPolicyError extends Error {
|
|
5
|
+
}
|
|
6
|
+
exports.InvalidPolicyError = InvalidPolicyError;
|
|
7
|
+
class TimeoutError extends Error {
|
|
8
|
+
}
|
|
9
|
+
exports.TimeoutError = TimeoutError;
|
|
10
|
+
class ApiError extends Error {
|
|
11
|
+
details;
|
|
12
|
+
constructor(message, details) {
|
|
13
|
+
super(message);
|
|
14
|
+
this.details = details;
|
|
15
|
+
this.details = details;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.ApiError = ApiError;
|
|
19
|
+
class EntityReference {
|
|
20
|
+
id;
|
|
21
|
+
entityType;
|
|
22
|
+
reference;
|
|
23
|
+
}
|
|
24
|
+
exports.EntityReference = EntityReference;
|
|
25
|
+
var SortOrderOptions;
|
|
26
|
+
(function (SortOrderOptions) {
|
|
27
|
+
SortOrderOptions["ASC"] = "asc";
|
|
28
|
+
SortOrderOptions["DESC"] = "desc";
|
|
29
|
+
})(SortOrderOptions = exports.SortOrderOptions || (exports.SortOrderOptions = {}));
|
|
30
|
+
var API_VERSION;
|
|
31
|
+
(function (API_VERSION) {
|
|
32
|
+
API_VERSION["EMPTY"] = "";
|
|
33
|
+
API_VERSION["V1"] = "1";
|
|
34
|
+
API_VERSION["V2"] = "2";
|
|
35
|
+
})(API_VERSION = exports.API_VERSION || (exports.API_VERSION = {}));
|
|
36
|
+
exports.DEFAULT_API_VERSION = API_VERSION.EMPTY;
|
|
37
|
+
class EntitiesClientGetOptions {
|
|
38
|
+
entityName;
|
|
39
|
+
id;
|
|
40
|
+
reference;
|
|
41
|
+
federatedId;
|
|
42
|
+
federatedIds;
|
|
43
|
+
relation;
|
|
44
|
+
relations;
|
|
45
|
+
criteria;
|
|
46
|
+
cacheMode;
|
|
47
|
+
search;
|
|
48
|
+
useSearch;
|
|
49
|
+
order;
|
|
50
|
+
skip;
|
|
51
|
+
take;
|
|
52
|
+
paginate;
|
|
53
|
+
nextPageKey;
|
|
54
|
+
apiVersion;
|
|
55
|
+
suffix;
|
|
56
|
+
}
|
|
57
|
+
exports.EntitiesClientGetOptions = EntitiesClientGetOptions;
|
|
58
|
+
class EntitiesClientCreateOptions {
|
|
59
|
+
entityName;
|
|
60
|
+
object;
|
|
61
|
+
id;
|
|
62
|
+
relation;
|
|
63
|
+
apiVersion;
|
|
64
|
+
suffix;
|
|
65
|
+
}
|
|
66
|
+
exports.EntitiesClientCreateOptions = EntitiesClientCreateOptions;
|
|
67
|
+
class EntitiesClientBatchCreateOptions {
|
|
68
|
+
entityName;
|
|
69
|
+
objects;
|
|
70
|
+
apiVersion;
|
|
71
|
+
suffix;
|
|
72
|
+
}
|
|
73
|
+
exports.EntitiesClientBatchCreateOptions = EntitiesClientBatchCreateOptions;
|
|
74
|
+
class EntitiesClientUpdateOptions {
|
|
75
|
+
entityName;
|
|
76
|
+
object;
|
|
77
|
+
id;
|
|
78
|
+
reference;
|
|
79
|
+
relation;
|
|
80
|
+
relationId;
|
|
81
|
+
apiVersion;
|
|
82
|
+
suffix;
|
|
83
|
+
}
|
|
84
|
+
class EntitiesClientBatchUpdateOptions {
|
|
85
|
+
entityName;
|
|
86
|
+
objects;
|
|
87
|
+
apiVersion;
|
|
88
|
+
suffix;
|
|
89
|
+
}
|
|
90
|
+
exports.EntitiesClientBatchUpdateOptions = EntitiesClientBatchUpdateOptions;
|
|
91
|
+
class EntitiesClientDeleteOptions {
|
|
92
|
+
entityName;
|
|
93
|
+
id;
|
|
94
|
+
reference;
|
|
95
|
+
relation;
|
|
96
|
+
relationId;
|
|
97
|
+
apiVersion;
|
|
98
|
+
suffix;
|
|
99
|
+
}
|
|
100
|
+
exports.EntitiesClientDeleteOptions = EntitiesClientDeleteOptions;
|
|
101
|
+
class EntitiesClientBatchDeleteOptions {
|
|
102
|
+
entityName;
|
|
103
|
+
ids;
|
|
104
|
+
apiVersion;
|
|
105
|
+
suffix;
|
|
106
|
+
}
|
|
107
|
+
exports.EntitiesClientBatchDeleteOptions = EntitiesClientBatchDeleteOptions;
|
|
108
|
+
class EntitiesClient {
|
|
109
|
+
}
|
|
110
|
+
exports.EntitiesClient = EntitiesClient;
|
package/lib/index.d.ts
CHANGED
|
@@ -1,25 +1,27 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
12
|
-
export * from
|
|
13
|
-
export * from
|
|
14
|
-
export * from
|
|
15
|
-
export * from
|
|
16
|
-
export * from
|
|
17
|
-
export * from
|
|
18
|
-
export * from
|
|
19
|
-
export * from
|
|
20
|
-
export * from
|
|
21
|
-
export * from
|
|
22
|
-
export * from
|
|
23
|
-
export * from
|
|
24
|
-
export * from
|
|
25
|
-
export * from
|
|
1
|
+
export * from "./app-access-grant";
|
|
2
|
+
export * from "./app-api-key";
|
|
3
|
+
export * from "./app-code-package";
|
|
4
|
+
export * from "./app-org";
|
|
5
|
+
export * from "./app-version";
|
|
6
|
+
export * from "./app-extension-definition";
|
|
7
|
+
export * from "./app-extension";
|
|
8
|
+
export * from "./app";
|
|
9
|
+
export * from "./asset";
|
|
10
|
+
export * from "./base-managed-entity";
|
|
11
|
+
export * from "./client";
|
|
12
|
+
export * from "./content";
|
|
13
|
+
export * from "./contentholder-content";
|
|
14
|
+
export * from "./file";
|
|
15
|
+
export * from "./item";
|
|
16
|
+
export * from "./loader";
|
|
17
|
+
export * from "./log-level";
|
|
18
|
+
export * from "./org";
|
|
19
|
+
export * from "./project-item";
|
|
20
|
+
export * from "./project";
|
|
21
|
+
export * from "./property-type";
|
|
22
|
+
export * from "./org-managed-entity";
|
|
23
|
+
export * from "./subscription";
|
|
24
|
+
export * from "./shared-links";
|
|
25
|
+
export * from "./type-managed-entity";
|
|
26
|
+
export * from "./user";
|
|
27
|
+
export * from "./workspace-managed-entity";
|
package/lib/index.js
CHANGED
|
@@ -24,11 +24,13 @@ __exportStar(require("./app-extension"), exports);
|
|
|
24
24
|
__exportStar(require("./app"), exports);
|
|
25
25
|
__exportStar(require("./asset"), exports);
|
|
26
26
|
__exportStar(require("./base-managed-entity"), exports);
|
|
27
|
+
__exportStar(require("./client"), exports);
|
|
27
28
|
__exportStar(require("./content"), exports);
|
|
28
29
|
__exportStar(require("./contentholder-content"), exports);
|
|
29
30
|
__exportStar(require("./file"), exports);
|
|
30
31
|
__exportStar(require("./item"), exports);
|
|
31
32
|
__exportStar(require("./loader"), exports);
|
|
33
|
+
__exportStar(require("./log-level"), exports);
|
|
32
34
|
__exportStar(require("./org"), exports);
|
|
33
35
|
__exportStar(require("./project-item"), exports);
|
|
34
36
|
__exportStar(require("./project"), exports);
|
package/lib/subscription.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export declare enum SubscriptionChannel {
|
|
|
17
17
|
export declare const SHOWCASE_APP_SUBSCRIBED_TO_CONST = "showcase-app";
|
|
18
18
|
export declare const PLAN_APP_SUBSCRIBED_TO_CONST = "plan-app";
|
|
19
19
|
export declare const BOARD_APP_SUBSCRIBED_TO_CONST = "board-app";
|
|
20
|
-
export
|
|
20
|
+
export type SubscriptionMatrix = {
|
|
21
21
|
[key in SubscriptionType]?: SubscriptionChannel[];
|
|
22
22
|
};
|
|
23
23
|
export interface Subscription extends OrgManagedEntity {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contrail/entity-types",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.50-2",
|
|
4
4
|
"description": "A types library for Vibeiq entities.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -21,6 +21,6 @@
|
|
|
21
21
|
"js-yaml": "^4.1.0",
|
|
22
22
|
"typedoc": "^0.25.7",
|
|
23
23
|
"typedoc-plugin-extras": "^3.0.0",
|
|
24
|
-
"typescript": "^4.
|
|
24
|
+
"typescript": "^4.2"
|
|
25
25
|
}
|
|
26
26
|
}
|