@extrahorizon/javascript-sdk 8.9.0-dev-141-b21be6e → 8.9.0-dev-144-fe86b3e
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/CHANGELOG.md
CHANGED
|
@@ -13,6 +13,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
13
13
|
- Completed the `Task` type for changes made in TaskService 1.3.0 a while ago:
|
|
14
14
|
- Added the `retriedByTaskId`, `retryForTaskIds`, and `error` properties.
|
|
15
15
|
- Added the `retried` status.
|
|
16
|
+
- Introduced `exh.templatesV2` with methods to manage and resolve V2 templates
|
|
17
|
+
- Added `template_name` to `exh.mails.*` to allow sending mails with a V2 template by name
|
|
16
18
|
|
|
17
19
|
### Deprecated
|
|
18
20
|
- `exh.tasks.schedules.delete` is deprecated in favor of `exh.tasks.schedules.remove`
|
|
@@ -20,6 +22,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
20
22
|
|
|
21
23
|
### Fixed
|
|
22
24
|
- Corrected the types for the `findFirst` (based) methods to indicate they may return `undefined` when no results are found.
|
|
25
|
+
- Corrected the types of the `schema` property in the `exh.templates.*`
|
|
26
|
+
- Corrected the types of `exh.mails.*`
|
|
23
27
|
|
|
24
28
|
|
|
25
29
|
## [8.8.2]
|
package/build/index.cjs.js
CHANGED
|
@@ -5545,7 +5545,7 @@ var templatesV2 = (client, httpWithAuth) => {
|
|
|
5545
5545
|
async function find(options) {
|
|
5546
5546
|
const result = await client.get(httpWithAuth, `/${(options === null || options === void 0 ? void 0 : options.rql) || ''}`, {
|
|
5547
5547
|
...options,
|
|
5548
|
-
customResponseKeys: ['data.
|
|
5548
|
+
customResponseKeys: ['data.inputs', 'data.outputs'],
|
|
5549
5549
|
});
|
|
5550
5550
|
return result.data;
|
|
5551
5551
|
}
|
|
@@ -5553,14 +5553,14 @@ var templatesV2 = (client, httpWithAuth) => {
|
|
|
5553
5553
|
async create(requestBody, options) {
|
|
5554
5554
|
const result = (await client.post(httpWithAuth, '/', requestBody, {
|
|
5555
5555
|
...options,
|
|
5556
|
-
customKeys: ['
|
|
5556
|
+
customKeys: ['inputs', 'outputs'],
|
|
5557
5557
|
}));
|
|
5558
5558
|
return result.data;
|
|
5559
5559
|
},
|
|
5560
5560
|
async update(templateId, requestBody, options) {
|
|
5561
5561
|
const result = (await client.put(httpWithAuth, `/${templateId}`, requestBody, {
|
|
5562
5562
|
...options,
|
|
5563
|
-
customKeys: ['
|
|
5563
|
+
customKeys: ['inputs', 'outputs'],
|
|
5564
5564
|
}));
|
|
5565
5565
|
return result.data;
|
|
5566
5566
|
},
|
|
@@ -5571,7 +5571,7 @@ var templatesV2 = (client, httpWithAuth) => {
|
|
|
5571
5571
|
async resolve(templateId, requestBody, options) {
|
|
5572
5572
|
const result = (await client.post(httpWithAuth, `/${templateId}/resolve`, requestBody, {
|
|
5573
5573
|
...options,
|
|
5574
|
-
customRequestKeys: ['
|
|
5574
|
+
customRequestKeys: ['inputs'],
|
|
5575
5575
|
customResponseKeys: ['*'],
|
|
5576
5576
|
}));
|
|
5577
5577
|
return result.data;
|
|
@@ -5613,7 +5613,7 @@ const templatesV2Service = (httpWithAuth) => {
|
|
|
5613
5613
|
};
|
|
5614
5614
|
};
|
|
5615
5615
|
|
|
5616
|
-
const version = '8.9.0-dev-
|
|
5616
|
+
const version = '8.9.0-dev-144-fe86b3e';
|
|
5617
5617
|
|
|
5618
5618
|
/**
|
|
5619
5619
|
* Create ExtraHorizon client.
|
package/build/index.mjs
CHANGED
|
@@ -5515,7 +5515,7 @@ var templatesV2 = (client, httpWithAuth) => {
|
|
|
5515
5515
|
async function find(options) {
|
|
5516
5516
|
const result = await client.get(httpWithAuth, `/${(options === null || options === void 0 ? void 0 : options.rql) || ''}`, {
|
|
5517
5517
|
...options,
|
|
5518
|
-
customResponseKeys: ['data.
|
|
5518
|
+
customResponseKeys: ['data.inputs', 'data.outputs'],
|
|
5519
5519
|
});
|
|
5520
5520
|
return result.data;
|
|
5521
5521
|
}
|
|
@@ -5523,14 +5523,14 @@ var templatesV2 = (client, httpWithAuth) => {
|
|
|
5523
5523
|
async create(requestBody, options) {
|
|
5524
5524
|
const result = (await client.post(httpWithAuth, '/', requestBody, {
|
|
5525
5525
|
...options,
|
|
5526
|
-
customKeys: ['
|
|
5526
|
+
customKeys: ['inputs', 'outputs'],
|
|
5527
5527
|
}));
|
|
5528
5528
|
return result.data;
|
|
5529
5529
|
},
|
|
5530
5530
|
async update(templateId, requestBody, options) {
|
|
5531
5531
|
const result = (await client.put(httpWithAuth, `/${templateId}`, requestBody, {
|
|
5532
5532
|
...options,
|
|
5533
|
-
customKeys: ['
|
|
5533
|
+
customKeys: ['inputs', 'outputs'],
|
|
5534
5534
|
}));
|
|
5535
5535
|
return result.data;
|
|
5536
5536
|
},
|
|
@@ -5541,7 +5541,7 @@ var templatesV2 = (client, httpWithAuth) => {
|
|
|
5541
5541
|
async resolve(templateId, requestBody, options) {
|
|
5542
5542
|
const result = (await client.post(httpWithAuth, `/${templateId}/resolve`, requestBody, {
|
|
5543
5543
|
...options,
|
|
5544
|
-
customRequestKeys: ['
|
|
5544
|
+
customRequestKeys: ['inputs'],
|
|
5545
5545
|
customResponseKeys: ['*'],
|
|
5546
5546
|
}));
|
|
5547
5547
|
return result.data;
|
|
@@ -5583,7 +5583,7 @@ const templatesV2Service = (httpWithAuth) => {
|
|
|
5583
5583
|
};
|
|
5584
5584
|
};
|
|
5585
5585
|
|
|
5586
|
-
const version = '8.9.0-dev-
|
|
5586
|
+
const version = '8.9.0-dev-144-fe86b3e';
|
|
5587
5587
|
|
|
5588
5588
|
/**
|
|
5589
5589
|
* Create ExtraHorizon client.
|
|
@@ -7,9 +7,15 @@ export interface TemplateV2 extends TemplateV2Creation {
|
|
|
7
7
|
export interface TemplateV2Creation {
|
|
8
8
|
name: string;
|
|
9
9
|
description?: string;
|
|
10
|
-
|
|
10
|
+
inputs?: Record<string, TemplateV2TypeConfiguration>;
|
|
11
11
|
outputs: Record<string, string>;
|
|
12
12
|
}
|
|
13
|
+
export interface TemplateV2Update {
|
|
14
|
+
name?: string;
|
|
15
|
+
description?: string | null;
|
|
16
|
+
inputs?: Record<string, TemplateV2TypeConfiguration> | null;
|
|
17
|
+
outputs?: Record<string, string>;
|
|
18
|
+
}
|
|
13
19
|
export declare type TemplateV2TypeConfiguration = TemplateV2ObjectConfiguration | TemplateV2ArrayConfiguration | TemplateV2StringConfiguration | TemplateV2NumberConfiguration | TemplateV2BooleanConfiguration;
|
|
14
20
|
export interface TemplateV2ObjectConfiguration {
|
|
15
21
|
type: 'object';
|
|
@@ -37,7 +43,7 @@ export interface TemplateV2ResolveIn<T extends Record<string, any>> {
|
|
|
37
43
|
* If not present (or empty) we will first check the configured time_zone in the users-service. If that is not present it will default to 'UTC'
|
|
38
44
|
*/
|
|
39
45
|
timeZone?: TimeZone;
|
|
40
|
-
|
|
46
|
+
inputs?: T;
|
|
41
47
|
}
|
|
42
48
|
export interface TemplatesV2ErrorInfo {
|
|
43
49
|
/**
|
|
@@ -95,7 +101,7 @@ export interface TemplatesV2Service {
|
|
|
95
101
|
* Permission | Scope | Effect
|
|
96
102
|
* - | - | -
|
|
97
103
|
* `CREATE_TEMPLATES` | `global` | **Required** for this endpoint
|
|
98
|
-
* @param requestBody
|
|
104
|
+
* @param requestBody TemplateV2Creation
|
|
99
105
|
* @returns TemplateV2
|
|
100
106
|
* @throws {ResourceAlreadyExistsError}
|
|
101
107
|
* @throws {TemplateSyntaxError}
|
|
@@ -108,13 +114,13 @@ export interface TemplatesV2Service {
|
|
|
108
114
|
* - | - | -
|
|
109
115
|
* `UPDATE_TEMPLATES` | `global` | **Required** for this endpoint
|
|
110
116
|
* @param templateIdOrName Id or Name of the targeted template
|
|
111
|
-
* @param requestBody
|
|
117
|
+
* @param requestBody TemplateV2Update
|
|
112
118
|
* @returns TemplateV2
|
|
113
119
|
* @throws {ResourceAlreadyExistsError}
|
|
114
120
|
* @throws {TemplateSyntaxError}
|
|
115
121
|
* @throws {ResourceUnknownError}
|
|
116
122
|
*/
|
|
117
|
-
update(templateIdOrName: string, requestBody:
|
|
123
|
+
update(templateIdOrName: string, requestBody: TemplateV2Update, options?: OptionsBase): Promise<AffectedRecords>;
|
|
118
124
|
/**
|
|
119
125
|
* Delete a template
|
|
120
126
|
*
|
package/build/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "8.9.0-dev-
|
|
1
|
+
export declare const version = "8.9.0-dev-144-fe86b3e";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@extrahorizon/javascript-sdk",
|
|
3
|
-
"version": "8.9.0-dev-
|
|
3
|
+
"version": "8.9.0-dev-144-fe86b3e",
|
|
4
4
|
"description": "This package serves as a JavaScript wrapper around all Extra Horizon cloud services.",
|
|
5
5
|
"main": "build/index.cjs.js",
|
|
6
6
|
"types": "build/types/index.d.ts",
|