@extrahorizon/javascript-sdk 8.5.0-dev-78-7b06d51 → 8.5.0
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 +1 -0
- package/build/index.cjs.js +7 -2
- package/build/index.mjs +7 -2
- package/build/types/services/events/types.d.ts +10 -1
- package/build/types/version.d.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
16
16
|
- `exh.data.documents.transition` now accepts a `name` field the `requestBody`, allowing a Transition to be triggered by its `name`
|
|
17
17
|
- `exh.data.documents.unlinkAllUsers` and `unlinkAllGroups` methods added, to unlink all users or groups from a Document
|
|
18
18
|
- `TRANSITION_DOCUMENTS` has been added as a supported permission
|
|
19
|
+
- `exh.events.create` now supports a `normalizeEventContent` option to disable normalization of event content
|
|
19
20
|
|
|
20
21
|
### Changed
|
|
21
22
|
- `exh.data.documents.unlinkUsers` and `unlinkGroups` now also accept an array of user or group ids directly
|
package/build/index.cjs.js
CHANGED
|
@@ -5302,7 +5302,12 @@ var events = (client, httpAuth) => ({
|
|
|
5302
5302
|
return res.data[0];
|
|
5303
5303
|
},
|
|
5304
5304
|
async create(requestBody, options) {
|
|
5305
|
-
|
|
5305
|
+
const requestOptions = { ...options };
|
|
5306
|
+
if ((options === null || options === void 0 ? void 0 : options.normalizeEventContent) === false) {
|
|
5307
|
+
requestOptions.customRequestKeys = ['content'];
|
|
5308
|
+
requestOptions.customResponseKeys = ['content'];
|
|
5309
|
+
}
|
|
5310
|
+
return (await client.post(httpAuth, '/', requestBody, requestOptions)).data;
|
|
5306
5311
|
},
|
|
5307
5312
|
});
|
|
5308
5313
|
|
|
@@ -5375,7 +5380,7 @@ const logsService = (httpWithAuth) => {
|
|
|
5375
5380
|
};
|
|
5376
5381
|
};
|
|
5377
5382
|
|
|
5378
|
-
const version = '8.5.0
|
|
5383
|
+
const version = '8.5.0';
|
|
5379
5384
|
|
|
5380
5385
|
/**
|
|
5381
5386
|
* Create ExtraHorizon client.
|
package/build/index.mjs
CHANGED
|
@@ -5272,7 +5272,12 @@ var events = (client, httpAuth) => ({
|
|
|
5272
5272
|
return res.data[0];
|
|
5273
5273
|
},
|
|
5274
5274
|
async create(requestBody, options) {
|
|
5275
|
-
|
|
5275
|
+
const requestOptions = { ...options };
|
|
5276
|
+
if ((options === null || options === void 0 ? void 0 : options.normalizeEventContent) === false) {
|
|
5277
|
+
requestOptions.customRequestKeys = ['content'];
|
|
5278
|
+
requestOptions.customResponseKeys = ['content'];
|
|
5279
|
+
}
|
|
5280
|
+
return (await client.post(httpAuth, '/', requestBody, requestOptions)).data;
|
|
5276
5281
|
},
|
|
5277
5282
|
});
|
|
5278
5283
|
|
|
@@ -5345,7 +5350,7 @@ const logsService = (httpWithAuth) => {
|
|
|
5345
5350
|
};
|
|
5346
5351
|
};
|
|
5347
5352
|
|
|
5348
|
-
const version = '8.5.0
|
|
5353
|
+
const version = '8.5.0';
|
|
5349
5354
|
|
|
5350
5355
|
/**
|
|
5351
5356
|
* Create ExtraHorizon client.
|
|
@@ -19,6 +19,12 @@ export interface Version {
|
|
|
19
19
|
minor: number;
|
|
20
20
|
patch: number;
|
|
21
21
|
}
|
|
22
|
+
export interface CreateEventOptions extends OptionsBase {
|
|
23
|
+
/**
|
|
24
|
+
* If set to `false`, the `content` of the event will not be normalized, i.e. camelCase keys will be preserved.
|
|
25
|
+
*/
|
|
26
|
+
normalizeEventContent?: boolean;
|
|
27
|
+
}
|
|
22
28
|
export interface EventsService {
|
|
23
29
|
/**
|
|
24
30
|
* Returns a list of events
|
|
@@ -46,13 +52,16 @@ export interface EventsService {
|
|
|
46
52
|
/**
|
|
47
53
|
* Creates an event
|
|
48
54
|
*
|
|
55
|
+
* **Note**: The `content` of the event will be normalized by default, i.e. all keys will be converted to snake_case.
|
|
56
|
+
* Use `normalizeEventContent: false` to preserve camelCase keys.
|
|
57
|
+
*
|
|
49
58
|
* Permission | Scope | Effect
|
|
50
59
|
* - | - | -
|
|
51
60
|
* `CREATE_EVENTS` | `global` | **Required** for this endpoint
|
|
52
61
|
* @param requestBody
|
|
53
62
|
* @returns Event
|
|
54
63
|
*/
|
|
55
|
-
create(requestBody: CreateEvent, options?:
|
|
64
|
+
create(requestBody: CreateEvent, options?: CreateEventOptions): Promise<Event>;
|
|
56
65
|
}
|
|
57
66
|
export interface SubscriptionsService {
|
|
58
67
|
/**
|
package/build/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "8.5.0
|
|
1
|
+
export declare const version = "8.5.0";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@extrahorizon/javascript-sdk",
|
|
3
|
-
"version": "8.5.0
|
|
3
|
+
"version": "8.5.0",
|
|
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",
|