@contrail/extensions-sdk 1.0.0-alpha.1 → 1.0.0-alpha.3
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.
|
@@ -36,6 +36,10 @@ class EntitiesActionHandler {
|
|
|
36
36
|
return yield new sdk_1.Entities().update(action.options);
|
|
37
37
|
case 'batchUpdate':
|
|
38
38
|
return yield new sdk_1.Entities().batchUpdate(action.options);
|
|
39
|
+
case 'delete':
|
|
40
|
+
return yield new sdk_1.Entities().delete(action.options);
|
|
41
|
+
case 'batchDelete':
|
|
42
|
+
return yield new sdk_1.Entities().batchDelete(action.options);
|
|
39
43
|
}
|
|
40
44
|
});
|
|
41
45
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EntitiesClientBatchCreateOptions, EntitiesClientBatchUpdateOptions, EntitiesClientCreateOptions, EntitiesClientGetOptions, API_VERSION } from "@contrail/sdk";
|
|
1
|
+
import { EntitiesClientBatchCreateOptions, EntitiesClientBatchDeleteOptions, EntitiesClientBatchUpdateOptions, EntitiesClientCreateOptions, EntitiesClientDeleteOptions, EntitiesClientGetOptions, API_VERSION } from "@contrail/sdk";
|
|
2
2
|
declare class EntitiesClientUpdateOptions {
|
|
3
3
|
entityName?: string;
|
|
4
4
|
object: any;
|
|
@@ -15,6 +15,8 @@ export declare class EntitiesClient {
|
|
|
15
15
|
batchCreate(options: EntitiesClientBatchCreateOptions): Promise<any[]>;
|
|
16
16
|
update(options: EntitiesClientUpdateOptions): Promise<any>;
|
|
17
17
|
batchUpdate(options: EntitiesClientBatchUpdateOptions): Promise<any[]>;
|
|
18
|
+
delete(options: EntitiesClientDeleteOptions): Promise<any>;
|
|
19
|
+
batchDelete(options: EntitiesClientBatchDeleteOptions): Promise<any[]>;
|
|
18
20
|
private validateAndReturnEntityClientResults;
|
|
19
21
|
}
|
|
20
22
|
export {};
|
|
@@ -44,6 +44,18 @@ class EntitiesClient {
|
|
|
44
44
|
return this.validateAndReturnEntityClientResults(results);
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
|
+
delete(options) {
|
|
48
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
49
|
+
const results = yield (0, actions_1.getExtensionActions)().sendMessageToEntitiesClient({ method: 'delete', options });
|
|
50
|
+
return this.validateAndReturnEntityClientResults(results);
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
batchDelete(options) {
|
|
54
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
55
|
+
const results = yield (0, actions_1.getExtensionActions)().sendMessageToEntitiesClient({ method: 'batchDelete', options });
|
|
56
|
+
return this.validateAndReturnEntityClientResults(results);
|
|
57
|
+
});
|
|
58
|
+
}
|
|
47
59
|
validateAndReturnEntityClientResults(results) {
|
|
48
60
|
var _a;
|
|
49
61
|
if (!results.success) {
|
package/package.json
CHANGED