@extrahorizon/javascript-sdk 8.7.0-dev-103-01749fa → 8.7.0-dev-105-3ab0ff8
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 +4 -0
- package/build/index.cjs.js +3 -3
- package/build/index.mjs +3 -3
- package/build/types/mockType.d.ts +3 -3
- package/build/types/services/notificationsV2/index.d.ts +2 -2
- package/build/types/services/notificationsV2/types.d.ts +1 -1
- package/build/types/services/notificationsV2/{users → userSettings}/index.d.ts +2 -2
- package/build/types/services/notificationsV2/{users → userSettings}/types.d.ts +8 -8
- package/build/types/version.d.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [8.7.0]
|
|
9
9
|
|
|
10
|
+
### Added
|
|
11
|
+
- Introduced `exh.notificationsV2` with methods for Notifications Service v2:
|
|
12
|
+
- `exh.notificationsV2.*` provides functionality to send and retrieve notifications
|
|
13
|
+
- `exh.notificationsV2.userSettings.*` offers management of user's devices
|
|
10
14
|
|
|
11
15
|
## [8.6.0]
|
|
12
16
|
|
package/build/index.cjs.js
CHANGED
|
@@ -5369,7 +5369,7 @@ var notificationsV2 = (client, httpWithAuth) => {
|
|
|
5369
5369
|
};
|
|
5370
5370
|
};
|
|
5371
5371
|
|
|
5372
|
-
var
|
|
5372
|
+
var notificationV2UserSettings = (client, httpWithAuth) => {
|
|
5373
5373
|
async function find(options) {
|
|
5374
5374
|
const result = await client.get(httpWithAuth, `/users/${(options === null || options === void 0 ? void 0 : options.rql) || ''}`, options);
|
|
5375
5375
|
return result.data;
|
|
@@ -5416,7 +5416,7 @@ const notificationsV2Service = (httpWithAuth) => {
|
|
|
5416
5416
|
return {
|
|
5417
5417
|
...health$1(client, httpWithAuth),
|
|
5418
5418
|
...notificationsV2(client, httpWithAuth),
|
|
5419
|
-
|
|
5419
|
+
userSettings: notificationV2UserSettings(client, httpWithAuth),
|
|
5420
5420
|
};
|
|
5421
5421
|
};
|
|
5422
5422
|
|
|
@@ -5512,7 +5512,7 @@ const logsService = (httpWithAuth) => {
|
|
|
5512
5512
|
};
|
|
5513
5513
|
};
|
|
5514
5514
|
|
|
5515
|
-
const version = '8.7.0-dev-
|
|
5515
|
+
const version = '8.7.0-dev-105-3ab0ff8';
|
|
5516
5516
|
|
|
5517
5517
|
/**
|
|
5518
5518
|
* Create ExtraHorizon client.
|
package/build/index.mjs
CHANGED
|
@@ -5339,7 +5339,7 @@ var notificationsV2 = (client, httpWithAuth) => {
|
|
|
5339
5339
|
};
|
|
5340
5340
|
};
|
|
5341
5341
|
|
|
5342
|
-
var
|
|
5342
|
+
var notificationV2UserSettings = (client, httpWithAuth) => {
|
|
5343
5343
|
async function find(options) {
|
|
5344
5344
|
const result = await client.get(httpWithAuth, `/users/${(options === null || options === void 0 ? void 0 : options.rql) || ''}`, options);
|
|
5345
5345
|
return result.data;
|
|
@@ -5386,7 +5386,7 @@ const notificationsV2Service = (httpWithAuth) => {
|
|
|
5386
5386
|
return {
|
|
5387
5387
|
...health$1(client, httpWithAuth),
|
|
5388
5388
|
...notificationsV2(client, httpWithAuth),
|
|
5389
|
-
|
|
5389
|
+
userSettings: notificationV2UserSettings(client, httpWithAuth),
|
|
5390
5390
|
};
|
|
5391
5391
|
};
|
|
5392
5392
|
|
|
@@ -5482,7 +5482,7 @@ const logsService = (httpWithAuth) => {
|
|
|
5482
5482
|
};
|
|
5483
5483
|
};
|
|
5484
5484
|
|
|
5485
|
-
const version = '8.7.0-dev-
|
|
5485
|
+
const version = '8.7.0-dev-105-3ab0ff8';
|
|
5486
5486
|
|
|
5487
5487
|
/**
|
|
5488
5488
|
* Create ExtraHorizon client.
|
|
@@ -435,7 +435,7 @@ export declare type MockClientOAuth1<MockFn> = {
|
|
|
435
435
|
findByTargetUserId: MockFn;
|
|
436
436
|
findFirst: MockFn;
|
|
437
437
|
findById: MockFn;
|
|
438
|
-
|
|
438
|
+
userSettings: {
|
|
439
439
|
getById: MockFn;
|
|
440
440
|
update: MockFn;
|
|
441
441
|
remove: MockFn;
|
|
@@ -988,7 +988,7 @@ export declare type MockClientOAuth2<MockFn> = {
|
|
|
988
988
|
findByTargetUserId: MockFn;
|
|
989
989
|
findFirst: MockFn;
|
|
990
990
|
findById: MockFn;
|
|
991
|
-
|
|
991
|
+
userSettings: {
|
|
992
992
|
getById: MockFn;
|
|
993
993
|
update: MockFn;
|
|
994
994
|
remove: MockFn;
|
|
@@ -1541,7 +1541,7 @@ export declare type MockClientProxy<MockFn> = {
|
|
|
1541
1541
|
findByTargetUserId: MockFn;
|
|
1542
1542
|
findFirst: MockFn;
|
|
1543
1543
|
findById: MockFn;
|
|
1544
|
-
|
|
1544
|
+
userSettings: {
|
|
1545
1545
|
getById: MockFn;
|
|
1546
1546
|
update: MockFn;
|
|
1547
1547
|
remove: MockFn;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AuthHttpClient } from '../../types';
|
|
2
2
|
import health from './health';
|
|
3
3
|
import { NotificationV2Service } from './types';
|
|
4
|
-
import {
|
|
4
|
+
import { NotificationV2UserSettingsService } from './userSettings/types';
|
|
5
5
|
export declare const notificationsV2Service: (httpWithAuth: AuthHttpClient) => ReturnType<typeof health> & NotificationV2Service & {
|
|
6
|
-
|
|
6
|
+
userSettings: NotificationV2UserSettingsService;
|
|
7
7
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ObjectId, OptionsBase, OptionsWithRql, PagedResultWithPager } from '../types';
|
|
2
|
-
export * from './
|
|
2
|
+
export * from './userSettings/types';
|
|
3
3
|
export interface NotificationV2Creation<T extends Record<string, string> = Record<string, string>> {
|
|
4
4
|
targetUserId: ObjectId;
|
|
5
5
|
title: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AuthHttpClient } from '../../../types';
|
|
2
2
|
import { HttpClient } from '../../http-client';
|
|
3
|
-
import {
|
|
4
|
-
declare const _default: (client: HttpClient, httpWithAuth: AuthHttpClient) =>
|
|
3
|
+
import { NotificationV2UserSettingsService } from './types';
|
|
4
|
+
declare const _default: (client: HttpClient, httpWithAuth: AuthHttpClient) => NotificationV2UserSettingsService;
|
|
5
5
|
export default _default;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { AffectedRecords, ObjectId, OptionsBase, OptionsWithRql, PagedResultWithPager } from '../../types';
|
|
2
|
-
export interface
|
|
2
|
+
export interface NotificationV2UserSettingsUpsert {
|
|
3
3
|
/** @deprecated We recommend using `devices` instead */
|
|
4
4
|
fcmToken: string;
|
|
5
5
|
}
|
|
6
|
-
export interface
|
|
6
|
+
export interface NotificationV2UserSettings extends NotificationV2UserSettingsUpsert {
|
|
7
7
|
id: ObjectId;
|
|
8
8
|
devices?: NotificationV2UserDevice[];
|
|
9
9
|
creationTimestamp: Date;
|
|
@@ -20,7 +20,7 @@ export interface NotificationV2UserDevice {
|
|
|
20
20
|
creationTimestamp: Date;
|
|
21
21
|
updateTimestamp: Date;
|
|
22
22
|
}
|
|
23
|
-
export interface
|
|
23
|
+
export interface NotificationV2UserSettingsService {
|
|
24
24
|
/**
|
|
25
25
|
* # Get the notification settings for a specific user
|
|
26
26
|
*
|
|
@@ -32,7 +32,7 @@ export interface NotificationV2UserService {
|
|
|
32
32
|
* `VIEW_NOTIFICATION_SETTINGS` | `global` | View all notifications
|
|
33
33
|
* none | | View your own notification settings
|
|
34
34
|
*/
|
|
35
|
-
getById(userId: ObjectId, options?: OptionsBase): Promise<
|
|
35
|
+
getById(userId: ObjectId, options?: OptionsBase): Promise<NotificationV2UserSettings>;
|
|
36
36
|
/**
|
|
37
37
|
* @deprecated We recommend using `devices` instead, managed by the `addOrUpdateDevice()` and `removeDevice()` methods.
|
|
38
38
|
* # Update a user its notification settings
|
|
@@ -50,7 +50,7 @@ export interface NotificationV2UserService {
|
|
|
50
50
|
* @param options
|
|
51
51
|
* @returns AffectedRecords
|
|
52
52
|
*/
|
|
53
|
-
update(userId: ObjectId, requestBody:
|
|
53
|
+
update(userId: ObjectId, requestBody: NotificationV2UserSettingsUpsert, options?: OptionsBase): Promise<AffectedRecords>;
|
|
54
54
|
/**
|
|
55
55
|
* # Delete the notification settings for a specific user
|
|
56
56
|
*
|
|
@@ -108,7 +108,7 @@ export interface NotificationV2UserService {
|
|
|
108
108
|
* ## Interface
|
|
109
109
|
* @returns PagedResultWithPager<NotificationV2User>
|
|
110
110
|
*/
|
|
111
|
-
find(options?: OptionsWithRql): Promise<PagedResultWithPager<
|
|
111
|
+
find(options?: OptionsWithRql): Promise<PagedResultWithPager<NotificationV2UserSettings>>;
|
|
112
112
|
/**
|
|
113
113
|
* # Request a list of user notification settings
|
|
114
114
|
*
|
|
@@ -122,7 +122,7 @@ export interface NotificationV2UserService {
|
|
|
122
122
|
* ## Interface
|
|
123
123
|
* @returns NotificationV2User[]
|
|
124
124
|
*/
|
|
125
|
-
findAll(options?: OptionsWithRql): Promise<
|
|
125
|
+
findAll(options?: OptionsWithRql): Promise<NotificationV2UserSettings[]>;
|
|
126
126
|
/**
|
|
127
127
|
* # Request the first user notification settings
|
|
128
128
|
*
|
|
@@ -134,5 +134,5 @@ export interface NotificationV2UserService {
|
|
|
134
134
|
* ## Interface
|
|
135
135
|
* @returns NotificationV2User | undefined
|
|
136
136
|
*/
|
|
137
|
-
findFirst(options?: OptionsWithRql): Promise<
|
|
137
|
+
findFirst(options?: OptionsWithRql): Promise<NotificationV2UserSettings | undefined>;
|
|
138
138
|
}
|
package/build/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "8.7.0-dev-
|
|
1
|
+
export declare const version = "8.7.0-dev-105-3ab0ff8";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@extrahorizon/javascript-sdk",
|
|
3
|
-
"version": "8.7.0-dev-
|
|
3
|
+
"version": "8.7.0-dev-105-3ab0ff8",
|
|
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",
|