@extrahorizon/javascript-sdk 8.6.0-feat-94-2fc8886 → 8.7.0-dev-96-f1db68f
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 +3 -0
- package/build/index.cjs.js +11 -104
- package/build/index.mjs +11 -104
- package/build/types/client.d.ts +1 -6
- package/build/types/constants.d.ts +0 -1
- package/build/types/mockType.d.ts +0 -48
- package/build/types/services/index.d.ts +0 -1
- package/build/types/types.d.ts +0 -1
- package/build/types/version.d.ts +1 -1
- package/package.json +1 -1
- package/build/types/services/notificationsV2/health.d.ts +0 -9
- package/build/types/services/notificationsV2/index.d.ts +0 -7
- package/build/types/services/notificationsV2/notificationsV2.d.ts +0 -5
- package/build/types/services/notificationsV2/types.d.ts +0 -109
- package/build/types/services/notificationsV2/users/index.d.ts +0 -5
- package/build/types/services/notificationsV2/users/types.d.ts +0 -79
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,9 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [8.7.0]
|
|
9
|
+
|
|
10
|
+
|
|
8
11
|
## [8.6.0]
|
|
9
12
|
|
|
10
13
|
### Added
|
package/build/index.cjs.js
CHANGED
|
@@ -1636,7 +1636,6 @@ const DISPATCHERS_BASE = '/dispatchers/v1';
|
|
|
1636
1636
|
const PAYMENTS_BASE = '/payments/v1';
|
|
1637
1637
|
const PROFILES_BASE = '/profiles/v1';
|
|
1638
1638
|
const NOTIFICATIONS_BASE = '/notifications/v1';
|
|
1639
|
-
const NOTIFICATIONS_V2_BASE = '/notifications/v2';
|
|
1640
1639
|
const LOCALIZATIONS_BASE = '/localizations/v1';
|
|
1641
1640
|
const EVENTS_BASE = '/events/v1';
|
|
1642
1641
|
const LOGS_BASE = '/logs/v1';
|
|
@@ -4230,7 +4229,7 @@ var groupRoles = (client, httpWithAuth) => ({
|
|
|
4230
4229
|
},
|
|
4231
4230
|
});
|
|
4232
4231
|
|
|
4233
|
-
var health$
|
|
4232
|
+
var health$5 = (userClient, http) => ({
|
|
4234
4233
|
/**
|
|
4235
4234
|
* Perform a health check
|
|
4236
4235
|
* @returns {boolean} success
|
|
@@ -4427,7 +4426,7 @@ const usersService = (httpWithAuth, http) => {
|
|
|
4427
4426
|
basePath: USER_BASE,
|
|
4428
4427
|
transformRequestData: decamelizeRequestData,
|
|
4429
4428
|
});
|
|
4430
|
-
const healthMethods = health$
|
|
4429
|
+
const healthMethods = health$5(userClient, httpWithAuth);
|
|
4431
4430
|
const usersMethods = users$1(userClient, httpWithAuth, http);
|
|
4432
4431
|
const groupRolesMethods = groupRoles(userClient, httpWithAuth);
|
|
4433
4432
|
const globalRolesMethods = globalRoles(userClient, httpWithAuth);
|
|
@@ -4808,7 +4807,7 @@ var appStoreSubscriptions = (client, httpAuth) => ({
|
|
|
4808
4807
|
},
|
|
4809
4808
|
});
|
|
4810
4809
|
|
|
4811
|
-
var health$
|
|
4810
|
+
var health$4 = (client, httpAuth) => ({
|
|
4812
4811
|
/**
|
|
4813
4812
|
* Check if the service is available
|
|
4814
4813
|
* @returns true if service is up and running
|
|
@@ -5014,7 +5013,7 @@ const paymentsService = (httpWithAuth) => {
|
|
|
5014
5013
|
basePath: PAYMENTS_BASE,
|
|
5015
5014
|
});
|
|
5016
5015
|
return {
|
|
5017
|
-
...health$
|
|
5016
|
+
...health$4(client, httpWithAuth),
|
|
5018
5017
|
products: products(client, httpWithAuth),
|
|
5019
5018
|
orders: orders(client, httpWithAuth),
|
|
5020
5019
|
subscriptions: subscriptions$1(client, httpWithAuth),
|
|
@@ -5036,7 +5035,7 @@ var countries = (client, httpAuth) => ({
|
|
|
5036
5035
|
},
|
|
5037
5036
|
});
|
|
5038
5037
|
|
|
5039
|
-
var health$
|
|
5038
|
+
var health$3 = (client, http) => ({
|
|
5040
5039
|
/**
|
|
5041
5040
|
* Perform a health check
|
|
5042
5041
|
* @returns {boolean} success
|
|
@@ -5089,7 +5088,7 @@ const localizationsService = (httpWithAuth) => {
|
|
|
5089
5088
|
basePath: LOCALIZATIONS_BASE,
|
|
5090
5089
|
});
|
|
5091
5090
|
return {
|
|
5092
|
-
...health$
|
|
5091
|
+
...health$3(client, httpWithAuth),
|
|
5093
5092
|
...localizations(client, httpWithAuth),
|
|
5094
5093
|
...countries(client, httpWithAuth),
|
|
5095
5094
|
...languages(client, httpWithAuth),
|
|
@@ -5114,7 +5113,7 @@ var groups = (client, httpAuth) => ({
|
|
|
5114
5113
|
},
|
|
5115
5114
|
});
|
|
5116
5115
|
|
|
5117
|
-
var health$
|
|
5116
|
+
var health$2 = (client, httpAuth) => ({
|
|
5118
5117
|
/**
|
|
5119
5118
|
* Perform a health check for profiles service
|
|
5120
5119
|
* @returns {boolean} success
|
|
@@ -5204,14 +5203,14 @@ const profilesService = (httpWithAuth) => {
|
|
|
5204
5203
|
basePath: PROFILES_BASE,
|
|
5205
5204
|
});
|
|
5206
5205
|
return {
|
|
5207
|
-
...health$
|
|
5206
|
+
...health$2(client, httpWithAuth),
|
|
5208
5207
|
...profiles(client, httpWithAuth),
|
|
5209
5208
|
groups: groups(client, httpWithAuth),
|
|
5210
5209
|
logs: logs(client, httpWithAuth),
|
|
5211
5210
|
};
|
|
5212
5211
|
};
|
|
5213
5212
|
|
|
5214
|
-
var health$
|
|
5213
|
+
var health$1 = (client, http) => ({
|
|
5215
5214
|
/**
|
|
5216
5215
|
* Perform a health check
|
|
5217
5216
|
* @returns {boolean} success
|
|
@@ -5298,103 +5297,12 @@ const notificationsService = (httpWithAuth) => {
|
|
|
5298
5297
|
transformRequestData: decamelizeRequestData,
|
|
5299
5298
|
});
|
|
5300
5299
|
return {
|
|
5301
|
-
...health$
|
|
5300
|
+
...health$1(client, httpWithAuth),
|
|
5302
5301
|
...notifications(client, httpWithAuth),
|
|
5303
5302
|
settings: settings(client, httpWithAuth),
|
|
5304
5303
|
};
|
|
5305
5304
|
};
|
|
5306
5305
|
|
|
5307
|
-
var health$1 = (client, http) => ({
|
|
5308
|
-
/**
|
|
5309
|
-
* Perform a health check
|
|
5310
|
-
* @returns {boolean} success
|
|
5311
|
-
*/
|
|
5312
|
-
async health() {
|
|
5313
|
-
const result = await client.get(http, '/health');
|
|
5314
|
-
return result.status === exports.Results.Success;
|
|
5315
|
-
},
|
|
5316
|
-
});
|
|
5317
|
-
|
|
5318
|
-
var notificationsV2 = (client, httpWithAuth) => {
|
|
5319
|
-
async function find(options) {
|
|
5320
|
-
const result = await client.get(httpWithAuth, `/${(options === null || options === void 0 ? void 0 : options.rql) || ''}`, {
|
|
5321
|
-
...options,
|
|
5322
|
-
customResponseKeys: ['data.data'],
|
|
5323
|
-
});
|
|
5324
|
-
return result.data;
|
|
5325
|
-
}
|
|
5326
|
-
return {
|
|
5327
|
-
async create(requestBody, options) {
|
|
5328
|
-
const result = await client.post(httpWithAuth, '/', requestBody, {
|
|
5329
|
-
...options,
|
|
5330
|
-
customKeys: ['data'],
|
|
5331
|
-
});
|
|
5332
|
-
return result.data;
|
|
5333
|
-
},
|
|
5334
|
-
async find(options) {
|
|
5335
|
-
const result = await find(options);
|
|
5336
|
-
return addPagersFn(find, options, result);
|
|
5337
|
-
},
|
|
5338
|
-
async findAll(options) {
|
|
5339
|
-
return findAllGeneric(find, options);
|
|
5340
|
-
},
|
|
5341
|
-
async findByTargetUserId(targetUserId, options) {
|
|
5342
|
-
const rqlWithTargetUserId = rqlBuilder(options === null || options === void 0 ? void 0 : options.rql).eq('targetUserId', targetUserId).build();
|
|
5343
|
-
const result = await find({ ...options, rql: rqlWithTargetUserId });
|
|
5344
|
-
return addPagersFn(find, { ...options, rql: rqlWithTargetUserId }, result);
|
|
5345
|
-
},
|
|
5346
|
-
async findFirst(options) {
|
|
5347
|
-
const result = await find(options);
|
|
5348
|
-
return result.data[0];
|
|
5349
|
-
},
|
|
5350
|
-
async findById(notificationId, options) {
|
|
5351
|
-
const rqlWithNotificationId = rqlBuilder().eq('id', notificationId).build();
|
|
5352
|
-
const result = await find({ ...options, rql: rqlWithNotificationId });
|
|
5353
|
-
return result.data[0];
|
|
5354
|
-
},
|
|
5355
|
-
};
|
|
5356
|
-
};
|
|
5357
|
-
|
|
5358
|
-
var notificationV2Users = (client, httpWithAuth) => {
|
|
5359
|
-
async function find(options) {
|
|
5360
|
-
const result = await client.get(httpWithAuth, `/users/${(options === null || options === void 0 ? void 0 : options.rql) || ''}`, options);
|
|
5361
|
-
return result.data;
|
|
5362
|
-
}
|
|
5363
|
-
return {
|
|
5364
|
-
async update(userId, requestBody, options) {
|
|
5365
|
-
const result = await client.put(httpWithAuth, `/users/${userId}`, requestBody, options);
|
|
5366
|
-
return result.data;
|
|
5367
|
-
},
|
|
5368
|
-
async find(options) {
|
|
5369
|
-
const result = await find(options);
|
|
5370
|
-
return addPagersFn(find, options, result);
|
|
5371
|
-
},
|
|
5372
|
-
async findAll(options) {
|
|
5373
|
-
return findAllGeneric(find, options);
|
|
5374
|
-
},
|
|
5375
|
-
async findByUserId(userId, options) {
|
|
5376
|
-
const rqlWithUserId = rqlBuilder(options === null || options === void 0 ? void 0 : options.rql).eq('id', userId).build();
|
|
5377
|
-
const result = await find({ ...options, rql: rqlWithUserId });
|
|
5378
|
-
return result.data[0];
|
|
5379
|
-
},
|
|
5380
|
-
async findFirst(options) {
|
|
5381
|
-
const result = await find(options);
|
|
5382
|
-
return result.data[0];
|
|
5383
|
-
},
|
|
5384
|
-
};
|
|
5385
|
-
};
|
|
5386
|
-
|
|
5387
|
-
const notificationsV2Service = (httpWithAuth) => {
|
|
5388
|
-
const client = httpClient({
|
|
5389
|
-
basePath: NOTIFICATIONS_V2_BASE,
|
|
5390
|
-
});
|
|
5391
|
-
return {
|
|
5392
|
-
...health$1(client, httpWithAuth),
|
|
5393
|
-
...notificationsV2(client, httpWithAuth),
|
|
5394
|
-
users: notificationV2Users(client, httpWithAuth),
|
|
5395
|
-
};
|
|
5396
|
-
};
|
|
5397
|
-
|
|
5398
5306
|
var events = (client, httpAuth) => ({
|
|
5399
5307
|
async find(options) {
|
|
5400
5308
|
return (await client.get(httpAuth, `/${(options === null || options === void 0 ? void 0 : options.rql) || ''}`)).data;
|
|
@@ -5487,7 +5395,7 @@ const logsService = (httpWithAuth) => {
|
|
|
5487
5395
|
};
|
|
5488
5396
|
};
|
|
5489
5397
|
|
|
5490
|
-
const version = '8.
|
|
5398
|
+
const version = '8.7.0-dev-96-f1db68f';
|
|
5491
5399
|
|
|
5492
5400
|
/**
|
|
5493
5401
|
* Create ExtraHorizon client.
|
|
@@ -5527,7 +5435,6 @@ function createClient(rawConfig) {
|
|
|
5527
5435
|
localizations: localizationsService(httpWithAuth),
|
|
5528
5436
|
profiles: profilesService(httpWithAuth),
|
|
5529
5437
|
notifications: notificationsService(httpWithAuth),
|
|
5530
|
-
notificationsV2: notificationsV2Service(httpWithAuth),
|
|
5531
5438
|
events: eventsService(httpWithAuth),
|
|
5532
5439
|
logs: logsService(httpWithAuth),
|
|
5533
5440
|
auth: {
|
package/build/index.mjs
CHANGED
|
@@ -1606,7 +1606,6 @@ const DISPATCHERS_BASE = '/dispatchers/v1';
|
|
|
1606
1606
|
const PAYMENTS_BASE = '/payments/v1';
|
|
1607
1607
|
const PROFILES_BASE = '/profiles/v1';
|
|
1608
1608
|
const NOTIFICATIONS_BASE = '/notifications/v1';
|
|
1609
|
-
const NOTIFICATIONS_V2_BASE = '/notifications/v2';
|
|
1610
1609
|
const LOCALIZATIONS_BASE = '/localizations/v1';
|
|
1611
1610
|
const EVENTS_BASE = '/events/v1';
|
|
1612
1611
|
const LOGS_BASE = '/logs/v1';
|
|
@@ -4200,7 +4199,7 @@ var groupRoles = (client, httpWithAuth) => ({
|
|
|
4200
4199
|
},
|
|
4201
4200
|
});
|
|
4202
4201
|
|
|
4203
|
-
var health$
|
|
4202
|
+
var health$5 = (userClient, http) => ({
|
|
4204
4203
|
/**
|
|
4205
4204
|
* Perform a health check
|
|
4206
4205
|
* @returns {boolean} success
|
|
@@ -4397,7 +4396,7 @@ const usersService = (httpWithAuth, http) => {
|
|
|
4397
4396
|
basePath: USER_BASE,
|
|
4398
4397
|
transformRequestData: decamelizeRequestData,
|
|
4399
4398
|
});
|
|
4400
|
-
const healthMethods = health$
|
|
4399
|
+
const healthMethods = health$5(userClient, httpWithAuth);
|
|
4401
4400
|
const usersMethods = users$1(userClient, httpWithAuth, http);
|
|
4402
4401
|
const groupRolesMethods = groupRoles(userClient, httpWithAuth);
|
|
4403
4402
|
const globalRolesMethods = globalRoles(userClient, httpWithAuth);
|
|
@@ -4778,7 +4777,7 @@ var appStoreSubscriptions = (client, httpAuth) => ({
|
|
|
4778
4777
|
},
|
|
4779
4778
|
});
|
|
4780
4779
|
|
|
4781
|
-
var health$
|
|
4780
|
+
var health$4 = (client, httpAuth) => ({
|
|
4782
4781
|
/**
|
|
4783
4782
|
* Check if the service is available
|
|
4784
4783
|
* @returns true if service is up and running
|
|
@@ -4984,7 +4983,7 @@ const paymentsService = (httpWithAuth) => {
|
|
|
4984
4983
|
basePath: PAYMENTS_BASE,
|
|
4985
4984
|
});
|
|
4986
4985
|
return {
|
|
4987
|
-
...health$
|
|
4986
|
+
...health$4(client, httpWithAuth),
|
|
4988
4987
|
products: products(client, httpWithAuth),
|
|
4989
4988
|
orders: orders(client, httpWithAuth),
|
|
4990
4989
|
subscriptions: subscriptions$1(client, httpWithAuth),
|
|
@@ -5006,7 +5005,7 @@ var countries = (client, httpAuth) => ({
|
|
|
5006
5005
|
},
|
|
5007
5006
|
});
|
|
5008
5007
|
|
|
5009
|
-
var health$
|
|
5008
|
+
var health$3 = (client, http) => ({
|
|
5010
5009
|
/**
|
|
5011
5010
|
* Perform a health check
|
|
5012
5011
|
* @returns {boolean} success
|
|
@@ -5059,7 +5058,7 @@ const localizationsService = (httpWithAuth) => {
|
|
|
5059
5058
|
basePath: LOCALIZATIONS_BASE,
|
|
5060
5059
|
});
|
|
5061
5060
|
return {
|
|
5062
|
-
...health$
|
|
5061
|
+
...health$3(client, httpWithAuth),
|
|
5063
5062
|
...localizations(client, httpWithAuth),
|
|
5064
5063
|
...countries(client, httpWithAuth),
|
|
5065
5064
|
...languages(client, httpWithAuth),
|
|
@@ -5084,7 +5083,7 @@ var groups = (client, httpAuth) => ({
|
|
|
5084
5083
|
},
|
|
5085
5084
|
});
|
|
5086
5085
|
|
|
5087
|
-
var health$
|
|
5086
|
+
var health$2 = (client, httpAuth) => ({
|
|
5088
5087
|
/**
|
|
5089
5088
|
* Perform a health check for profiles service
|
|
5090
5089
|
* @returns {boolean} success
|
|
@@ -5174,14 +5173,14 @@ const profilesService = (httpWithAuth) => {
|
|
|
5174
5173
|
basePath: PROFILES_BASE,
|
|
5175
5174
|
});
|
|
5176
5175
|
return {
|
|
5177
|
-
...health$
|
|
5176
|
+
...health$2(client, httpWithAuth),
|
|
5178
5177
|
...profiles(client, httpWithAuth),
|
|
5179
5178
|
groups: groups(client, httpWithAuth),
|
|
5180
5179
|
logs: logs(client, httpWithAuth),
|
|
5181
5180
|
};
|
|
5182
5181
|
};
|
|
5183
5182
|
|
|
5184
|
-
var health$
|
|
5183
|
+
var health$1 = (client, http) => ({
|
|
5185
5184
|
/**
|
|
5186
5185
|
* Perform a health check
|
|
5187
5186
|
* @returns {boolean} success
|
|
@@ -5268,103 +5267,12 @@ const notificationsService = (httpWithAuth) => {
|
|
|
5268
5267
|
transformRequestData: decamelizeRequestData,
|
|
5269
5268
|
});
|
|
5270
5269
|
return {
|
|
5271
|
-
...health$
|
|
5270
|
+
...health$1(client, httpWithAuth),
|
|
5272
5271
|
...notifications(client, httpWithAuth),
|
|
5273
5272
|
settings: settings(client, httpWithAuth),
|
|
5274
5273
|
};
|
|
5275
5274
|
};
|
|
5276
5275
|
|
|
5277
|
-
var health$1 = (client, http) => ({
|
|
5278
|
-
/**
|
|
5279
|
-
* Perform a health check
|
|
5280
|
-
* @returns {boolean} success
|
|
5281
|
-
*/
|
|
5282
|
-
async health() {
|
|
5283
|
-
const result = await client.get(http, '/health');
|
|
5284
|
-
return result.status === Results.Success;
|
|
5285
|
-
},
|
|
5286
|
-
});
|
|
5287
|
-
|
|
5288
|
-
var notificationsV2 = (client, httpWithAuth) => {
|
|
5289
|
-
async function find(options) {
|
|
5290
|
-
const result = await client.get(httpWithAuth, `/${(options === null || options === void 0 ? void 0 : options.rql) || ''}`, {
|
|
5291
|
-
...options,
|
|
5292
|
-
customResponseKeys: ['data.data'],
|
|
5293
|
-
});
|
|
5294
|
-
return result.data;
|
|
5295
|
-
}
|
|
5296
|
-
return {
|
|
5297
|
-
async create(requestBody, options) {
|
|
5298
|
-
const result = await client.post(httpWithAuth, '/', requestBody, {
|
|
5299
|
-
...options,
|
|
5300
|
-
customKeys: ['data'],
|
|
5301
|
-
});
|
|
5302
|
-
return result.data;
|
|
5303
|
-
},
|
|
5304
|
-
async find(options) {
|
|
5305
|
-
const result = await find(options);
|
|
5306
|
-
return addPagersFn(find, options, result);
|
|
5307
|
-
},
|
|
5308
|
-
async findAll(options) {
|
|
5309
|
-
return findAllGeneric(find, options);
|
|
5310
|
-
},
|
|
5311
|
-
async findByTargetUserId(targetUserId, options) {
|
|
5312
|
-
const rqlWithTargetUserId = rqlBuilder(options === null || options === void 0 ? void 0 : options.rql).eq('targetUserId', targetUserId).build();
|
|
5313
|
-
const result = await find({ ...options, rql: rqlWithTargetUserId });
|
|
5314
|
-
return addPagersFn(find, { ...options, rql: rqlWithTargetUserId }, result);
|
|
5315
|
-
},
|
|
5316
|
-
async findFirst(options) {
|
|
5317
|
-
const result = await find(options);
|
|
5318
|
-
return result.data[0];
|
|
5319
|
-
},
|
|
5320
|
-
async findById(notificationId, options) {
|
|
5321
|
-
const rqlWithNotificationId = rqlBuilder().eq('id', notificationId).build();
|
|
5322
|
-
const result = await find({ ...options, rql: rqlWithNotificationId });
|
|
5323
|
-
return result.data[0];
|
|
5324
|
-
},
|
|
5325
|
-
};
|
|
5326
|
-
};
|
|
5327
|
-
|
|
5328
|
-
var notificationV2Users = (client, httpWithAuth) => {
|
|
5329
|
-
async function find(options) {
|
|
5330
|
-
const result = await client.get(httpWithAuth, `/users/${(options === null || options === void 0 ? void 0 : options.rql) || ''}`, options);
|
|
5331
|
-
return result.data;
|
|
5332
|
-
}
|
|
5333
|
-
return {
|
|
5334
|
-
async update(userId, requestBody, options) {
|
|
5335
|
-
const result = await client.put(httpWithAuth, `/users/${userId}`, requestBody, options);
|
|
5336
|
-
return result.data;
|
|
5337
|
-
},
|
|
5338
|
-
async find(options) {
|
|
5339
|
-
const result = await find(options);
|
|
5340
|
-
return addPagersFn(find, options, result);
|
|
5341
|
-
},
|
|
5342
|
-
async findAll(options) {
|
|
5343
|
-
return findAllGeneric(find, options);
|
|
5344
|
-
},
|
|
5345
|
-
async findByUserId(userId, options) {
|
|
5346
|
-
const rqlWithUserId = rqlBuilder(options === null || options === void 0 ? void 0 : options.rql).eq('id', userId).build();
|
|
5347
|
-
const result = await find({ ...options, rql: rqlWithUserId });
|
|
5348
|
-
return result.data[0];
|
|
5349
|
-
},
|
|
5350
|
-
async findFirst(options) {
|
|
5351
|
-
const result = await find(options);
|
|
5352
|
-
return result.data[0];
|
|
5353
|
-
},
|
|
5354
|
-
};
|
|
5355
|
-
};
|
|
5356
|
-
|
|
5357
|
-
const notificationsV2Service = (httpWithAuth) => {
|
|
5358
|
-
const client = httpClient({
|
|
5359
|
-
basePath: NOTIFICATIONS_V2_BASE,
|
|
5360
|
-
});
|
|
5361
|
-
return {
|
|
5362
|
-
...health$1(client, httpWithAuth),
|
|
5363
|
-
...notificationsV2(client, httpWithAuth),
|
|
5364
|
-
users: notificationV2Users(client, httpWithAuth),
|
|
5365
|
-
};
|
|
5366
|
-
};
|
|
5367
|
-
|
|
5368
5276
|
var events = (client, httpAuth) => ({
|
|
5369
5277
|
async find(options) {
|
|
5370
5278
|
return (await client.get(httpAuth, `/${(options === null || options === void 0 ? void 0 : options.rql) || ''}`)).data;
|
|
@@ -5457,7 +5365,7 @@ const logsService = (httpWithAuth) => {
|
|
|
5457
5365
|
};
|
|
5458
5366
|
};
|
|
5459
5367
|
|
|
5460
|
-
const version = '8.
|
|
5368
|
+
const version = '8.7.0-dev-96-f1db68f';
|
|
5461
5369
|
|
|
5462
5370
|
/**
|
|
5463
5371
|
* Create ExtraHorizon client.
|
|
@@ -5497,7 +5405,6 @@ function createClient(rawConfig) {
|
|
|
5497
5405
|
localizations: localizationsService(httpWithAuth),
|
|
5498
5406
|
profiles: profilesService(httpWithAuth),
|
|
5499
5407
|
notifications: notificationsService(httpWithAuth),
|
|
5500
|
-
notificationsV2: notificationsV2Service(httpWithAuth),
|
|
5501
5408
|
events: eventsService(httpWithAuth),
|
|
5502
5409
|
logs: logsService(httpWithAuth),
|
|
5503
5410
|
auth: {
|
package/build/types/client.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AuthHttpClient, OAuth1HttpClient, OAuth2HttpClient, ProxyInstance } from './http/types';
|
|
2
|
-
import { authService, configurationsService, dataService, dispatchersService, eventsService, filesService, localizationsService, logsService, mailsService, notificationsService,
|
|
2
|
+
import { authService, configurationsService, dataService, dispatchersService, eventsService, filesService, localizationsService, logsService, mailsService, notificationsService, paymentsService, profilesService, tasksService, templatesService, usersService } from './services';
|
|
3
3
|
import { ClientParams, ParamsOauth1, ParamsOauth2, ParamsProxy } from './types';
|
|
4
4
|
export interface Client<T extends ClientParams> {
|
|
5
5
|
raw: AuthHttpClient;
|
|
@@ -58,11 +58,6 @@ export interface Client<T extends ClientParams> {
|
|
|
58
58
|
* @see https://swagger.extrahorizon.com/listing/?service=notifications-service&redirectToVersion=1
|
|
59
59
|
*/
|
|
60
60
|
notifications: ReturnType<typeof notificationsService>;
|
|
61
|
-
/**
|
|
62
|
-
* A service that handles push notifications.
|
|
63
|
-
* @see https://swagger.extrahorizon.com/listing/?service=notifications-service&redirectToVersion=2
|
|
64
|
-
*/
|
|
65
|
-
notificationsV2: ReturnType<typeof notificationsV2Service>;
|
|
66
61
|
/**
|
|
67
62
|
* Service that provides event (publish/subscribe) functionality for other services.
|
|
68
63
|
* @see https://swagger.extrahorizon.com/listing/?service=events-service&redirectToVersion=1
|
|
@@ -10,7 +10,6 @@ export declare const DISPATCHERS_BASE = "/dispatchers/v1";
|
|
|
10
10
|
export declare const PAYMENTS_BASE = "/payments/v1";
|
|
11
11
|
export declare const PROFILES_BASE = "/profiles/v1";
|
|
12
12
|
export declare const NOTIFICATIONS_BASE = "/notifications/v1";
|
|
13
|
-
export declare const NOTIFICATIONS_V2_BASE = "/notifications/v2";
|
|
14
13
|
export declare const LOCALIZATIONS_BASE = "/localizations/v1";
|
|
15
14
|
export declare const EVENTS_BASE = "/events/v1";
|
|
16
15
|
export declare const LOGS_BASE = "/logs/v1";
|
|
@@ -427,22 +427,6 @@ export declare type MockClientOAuth1<MockFn> = {
|
|
|
427
427
|
remove: MockFn;
|
|
428
428
|
};
|
|
429
429
|
};
|
|
430
|
-
notificationsV2: {
|
|
431
|
-
health: MockFn;
|
|
432
|
-
create: MockFn;
|
|
433
|
-
find: MockFn;
|
|
434
|
-
findAll: MockFn;
|
|
435
|
-
findByTargetUserId: MockFn;
|
|
436
|
-
findFirst: MockFn;
|
|
437
|
-
findById: MockFn;
|
|
438
|
-
users: {
|
|
439
|
-
update: MockFn;
|
|
440
|
-
find: MockFn;
|
|
441
|
-
findAll: MockFn;
|
|
442
|
-
findByUserId: MockFn;
|
|
443
|
-
findFirst: MockFn;
|
|
444
|
-
};
|
|
445
|
-
};
|
|
446
430
|
events: {
|
|
447
431
|
health: MockFn;
|
|
448
432
|
find: MockFn;
|
|
@@ -977,22 +961,6 @@ export declare type MockClientOAuth2<MockFn> = {
|
|
|
977
961
|
remove: MockFn;
|
|
978
962
|
};
|
|
979
963
|
};
|
|
980
|
-
notificationsV2: {
|
|
981
|
-
health: MockFn;
|
|
982
|
-
create: MockFn;
|
|
983
|
-
find: MockFn;
|
|
984
|
-
findAll: MockFn;
|
|
985
|
-
findByTargetUserId: MockFn;
|
|
986
|
-
findFirst: MockFn;
|
|
987
|
-
findById: MockFn;
|
|
988
|
-
users: {
|
|
989
|
-
update: MockFn;
|
|
990
|
-
find: MockFn;
|
|
991
|
-
findAll: MockFn;
|
|
992
|
-
findByUserId: MockFn;
|
|
993
|
-
findFirst: MockFn;
|
|
994
|
-
};
|
|
995
|
-
};
|
|
996
964
|
events: {
|
|
997
965
|
health: MockFn;
|
|
998
966
|
find: MockFn;
|
|
@@ -1527,22 +1495,6 @@ export declare type MockClientProxy<MockFn> = {
|
|
|
1527
1495
|
remove: MockFn;
|
|
1528
1496
|
};
|
|
1529
1497
|
};
|
|
1530
|
-
notificationsV2: {
|
|
1531
|
-
health: MockFn;
|
|
1532
|
-
create: MockFn;
|
|
1533
|
-
find: MockFn;
|
|
1534
|
-
findAll: MockFn;
|
|
1535
|
-
findByTargetUserId: MockFn;
|
|
1536
|
-
findFirst: MockFn;
|
|
1537
|
-
findById: MockFn;
|
|
1538
|
-
users: {
|
|
1539
|
-
update: MockFn;
|
|
1540
|
-
find: MockFn;
|
|
1541
|
-
findAll: MockFn;
|
|
1542
|
-
findByUserId: MockFn;
|
|
1543
|
-
findFirst: MockFn;
|
|
1544
|
-
};
|
|
1545
|
-
};
|
|
1546
1498
|
events: {
|
|
1547
1499
|
health: MockFn;
|
|
1548
1500
|
find: MockFn;
|
package/build/types/types.d.ts
CHANGED
|
@@ -15,7 +15,6 @@ export * from './services/payments/types';
|
|
|
15
15
|
export * from './services/localizations/types';
|
|
16
16
|
export * from './services/profiles/types';
|
|
17
17
|
export * from './services/notifications/types';
|
|
18
|
-
export * from './services/notificationsV2/types';
|
|
19
18
|
export * from './services/events/types';
|
|
20
19
|
export interface ParamsOauth1WithEmail {
|
|
21
20
|
email: string;
|
package/build/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "8.
|
|
1
|
+
export declare const version = "8.7.0-dev-96-f1db68f";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@extrahorizon/javascript-sdk",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.7.0-dev-96-f1db68f",
|
|
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",
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { AuthHttpClient } from '../../types';
|
|
2
|
-
import health from './health';
|
|
3
|
-
import { NotificationV2Service } from './types';
|
|
4
|
-
import { NotificationV2UserService } from './users/types';
|
|
5
|
-
export declare const notificationsV2Service: (httpWithAuth: AuthHttpClient) => ReturnType<typeof health> & NotificationV2Service & {
|
|
6
|
-
users: NotificationV2UserService;
|
|
7
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { AuthHttpClient } from '../../types';
|
|
2
|
-
import { HttpClient } from '../http-client';
|
|
3
|
-
import { NotificationV2Service } from './types';
|
|
4
|
-
declare const _default: (client: HttpClient, httpWithAuth: AuthHttpClient) => NotificationV2Service;
|
|
5
|
-
export default _default;
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import { ObjectId, OptionsBase, OptionsWithRql, PagedResultWithPager } from '../types';
|
|
2
|
-
export * from './users/types';
|
|
3
|
-
export interface NotificationV2Creation<T extends Record<string, string> = Record<string, string>> {
|
|
4
|
-
targetUserId: string;
|
|
5
|
-
title: string;
|
|
6
|
-
body: string;
|
|
7
|
-
data?: T;
|
|
8
|
-
/**
|
|
9
|
-
* See https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#AndroidConfig
|
|
10
|
-
*/
|
|
11
|
-
android?: any;
|
|
12
|
-
/**
|
|
13
|
-
* See https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#ApnsConfig
|
|
14
|
-
*/
|
|
15
|
-
apns?: any;
|
|
16
|
-
/**
|
|
17
|
-
* See https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#WebpushConfig
|
|
18
|
-
*/
|
|
19
|
-
webpush?: any;
|
|
20
|
-
}
|
|
21
|
-
export interface NotificationV2<T extends Record<string, string> = Record<string, string>> extends NotificationV2Creation<T> {
|
|
22
|
-
id: ObjectId;
|
|
23
|
-
creatorId: ObjectId;
|
|
24
|
-
sent: boolean;
|
|
25
|
-
creationTimestamp: Date;
|
|
26
|
-
updateTimestamp: Date;
|
|
27
|
-
}
|
|
28
|
-
export interface NotificationV2Service {
|
|
29
|
-
/**
|
|
30
|
-
* # Create a notification
|
|
31
|
-
*
|
|
32
|
-
* ## Access via permissions
|
|
33
|
-
* Permission | Scopes | Effect
|
|
34
|
-
* - | - | -
|
|
35
|
-
* `CREATE_NOTIFICATIONS` | `global` | Create notifications for any user
|
|
36
|
-
* `CREATE_NOTIFICATIONS` | `group` | Create notifications for any patient in group
|
|
37
|
-
* none | | Create notifications for yourself
|
|
38
|
-
*
|
|
39
|
-
* # Interface
|
|
40
|
-
* @param requestBody
|
|
41
|
-
* @param options
|
|
42
|
-
* @returns NotificationV2<T>
|
|
43
|
-
*/
|
|
44
|
-
create<T extends Record<string, string>>(requestBody: NotificationV2Creation<T>, options?: OptionsBase): Promise<NotificationV2<T>>;
|
|
45
|
-
/**
|
|
46
|
-
* # Request a list of notifications
|
|
47
|
-
*
|
|
48
|
-
* ## Access via permissions
|
|
49
|
-
* Permission | Scopes | Effect
|
|
50
|
-
* - | - | -
|
|
51
|
-
* `VIEW_NOTIFICATIONS` | `global` | View all notifications
|
|
52
|
-
*
|
|
53
|
-
* # Interface
|
|
54
|
-
* @returns PagedResultWithPager<NotificationV2<T>>
|
|
55
|
-
*/
|
|
56
|
-
find<T extends Record<string, string>>(options?: OptionsWithRql): Promise<PagedResultWithPager<NotificationV2<T>>>;
|
|
57
|
-
/**
|
|
58
|
-
* # Request a list of notifications
|
|
59
|
-
*
|
|
60
|
-
* Do not pass in an rql with limit operator!
|
|
61
|
-
*
|
|
62
|
-
* ## Access via permissions
|
|
63
|
-
* Permission | Scopes | Effect
|
|
64
|
-
* - | - | -
|
|
65
|
-
* `VIEW_NOTIFICATIONS` | `global` | View all notifications
|
|
66
|
-
*
|
|
67
|
-
* # Interface
|
|
68
|
-
* @returns NotificationV2<T>[]
|
|
69
|
-
*/
|
|
70
|
-
findAll<T extends Record<string, string>>(options?: OptionsWithRql): Promise<NotificationV2<T>[]>;
|
|
71
|
-
/**
|
|
72
|
-
* # Request a list of notifications created for a user
|
|
73
|
-
*
|
|
74
|
-
* ## Access via permissions
|
|
75
|
-
* Permission | Scopes | Effect
|
|
76
|
-
* - | - | -
|
|
77
|
-
* `VIEW_NOTIFICATIONS` | `global` | View all notifications
|
|
78
|
-
*
|
|
79
|
-
* # Interface
|
|
80
|
-
* @param targetUserId the user id to search for
|
|
81
|
-
* @returns PagedResultWithPager<NotificationV2<T>>
|
|
82
|
-
*/
|
|
83
|
-
findByTargetUserId<T extends Record<string, string>>(targetUserId: ObjectId, options?: OptionsWithRql): Promise<PagedResultWithPager<NotificationV2<T>>>;
|
|
84
|
-
/**
|
|
85
|
-
* # Request the first notification found
|
|
86
|
-
*
|
|
87
|
-
* ## Access via permissions
|
|
88
|
-
* Permission | Scopes | Effect
|
|
89
|
-
* - | - | -
|
|
90
|
-
* `VIEW_NOTIFICATIONS` | `global` | View all notifications
|
|
91
|
-
*
|
|
92
|
-
* # Interface
|
|
93
|
-
* @returns NotificationV2<T> | undefined
|
|
94
|
-
*/
|
|
95
|
-
findFirst<T extends Record<string, string>>(options?: OptionsWithRql): Promise<NotificationV2<T> | undefined>;
|
|
96
|
-
/**
|
|
97
|
-
* # Request a notification by id
|
|
98
|
-
*
|
|
99
|
-
* ## Access via permissions
|
|
100
|
-
* Permission | Scopes | Effect
|
|
101
|
-
* - | - | -
|
|
102
|
-
* `VIEW_NOTIFICATIONS` | `global` | View all notifications
|
|
103
|
-
*
|
|
104
|
-
* # Interface
|
|
105
|
-
* @param notificationId the Id to search for
|
|
106
|
-
* @returns NotificationV2<T> | undefined
|
|
107
|
-
*/
|
|
108
|
-
findById<T extends Record<string, string>>(notificationId: ObjectId, options?: OptionsBase): Promise<NotificationV2<T> | undefined>;
|
|
109
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { AuthHttpClient } from '../../../types';
|
|
2
|
-
import { HttpClient } from '../../http-client';
|
|
3
|
-
import { NotificationV2UserService } from './types';
|
|
4
|
-
declare const _default: (client: HttpClient, httpWithAuth: AuthHttpClient) => NotificationV2UserService;
|
|
5
|
-
export default _default;
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { AffectedRecords, ObjectId, OptionsBase, OptionsWithRql, PagedResultWithPager } from '../../types';
|
|
2
|
-
export interface NotificationV2UserUpsert {
|
|
3
|
-
fcmToken: string;
|
|
4
|
-
}
|
|
5
|
-
export interface NotificationV2User extends NotificationV2UserUpsert {
|
|
6
|
-
id: ObjectId;
|
|
7
|
-
creationTimestamp: Date;
|
|
8
|
-
updateTimestamp: Date;
|
|
9
|
-
}
|
|
10
|
-
export interface NotificationV2UserService {
|
|
11
|
-
/**
|
|
12
|
-
* # Update a user its notification settings
|
|
13
|
-
*
|
|
14
|
-
* Updates (or creates if non exists) a user its settings for the specified user id.
|
|
15
|
-
*
|
|
16
|
-
* ## Access via permissions
|
|
17
|
-
* Permission | Scopes | Effect
|
|
18
|
-
* - | - | -
|
|
19
|
-
* `UPDATE_NOTIFICATION_SETTINGS` | `global` | Update the notification settings of any user
|
|
20
|
-
* none | | Update your own notification settings
|
|
21
|
-
*
|
|
22
|
-
* # Interface
|
|
23
|
-
* @param requestBody
|
|
24
|
-
* @param options
|
|
25
|
-
* @returns AffectedRecords
|
|
26
|
-
*/
|
|
27
|
-
update(userId: ObjectId, requestBody: NotificationV2UserUpsert, options?: OptionsBase): Promise<AffectedRecords>;
|
|
28
|
-
/**
|
|
29
|
-
* # Request a list of user notification settings
|
|
30
|
-
*
|
|
31
|
-
* ## Access via permissions
|
|
32
|
-
* Permission | Scopes | Effect
|
|
33
|
-
* - | - | -
|
|
34
|
-
* `VIEW_NOTIFICATION_SETTINGS` | `global` | View all notifications
|
|
35
|
-
*
|
|
36
|
-
* # Interface
|
|
37
|
-
* @returns PagedResultWithPager<NotificationV2User>
|
|
38
|
-
*/
|
|
39
|
-
find(options?: OptionsWithRql): Promise<PagedResultWithPager<NotificationV2User>>;
|
|
40
|
-
/**
|
|
41
|
-
* # Request a list of user notification settings
|
|
42
|
-
*
|
|
43
|
-
* Do not pass in an rql with limit operator!
|
|
44
|
-
*
|
|
45
|
-
* ## Access via permissions
|
|
46
|
-
* Permission | Scopes | Effect
|
|
47
|
-
* - | - | -
|
|
48
|
-
* `VIEW_NOTIFICATION_SETTINGS` | `global` | View all notifications
|
|
49
|
-
*
|
|
50
|
-
* # Interface
|
|
51
|
-
* @returns NotificationV2User[]
|
|
52
|
-
*/
|
|
53
|
-
findAll(options?: OptionsWithRql): Promise<NotificationV2User[]>;
|
|
54
|
-
/**
|
|
55
|
-
* # Request notification settings for a specific user
|
|
56
|
-
*
|
|
57
|
-
* ## Access via permissions
|
|
58
|
-
* Permission | Scopes | Effect
|
|
59
|
-
* - | - | -
|
|
60
|
-
* `VIEW_NOTIFICATION_SETTINGS` | `global` | View all notifications
|
|
61
|
-
*
|
|
62
|
-
* # Interface
|
|
63
|
-
* @param userId the user id to search for
|
|
64
|
-
* @returns NotificationV2User | undefined
|
|
65
|
-
*/
|
|
66
|
-
findByUserId(userId: ObjectId, options?: OptionsWithRql): Promise<NotificationV2User | undefined>;
|
|
67
|
-
/**
|
|
68
|
-
* # Request the first user notification settings
|
|
69
|
-
*
|
|
70
|
-
* ## Access via permissions
|
|
71
|
-
* Permission | Scopes | Effect
|
|
72
|
-
* - | - | -
|
|
73
|
-
* `VIEW_NOTIFICATION_SETTINGS` | `global` | View all notifications
|
|
74
|
-
*
|
|
75
|
-
* # Interface
|
|
76
|
-
* @returns NotificationV2User | undefined
|
|
77
|
-
*/
|
|
78
|
-
findFirst(options?: OptionsWithRql): Promise<NotificationV2User | undefined>;
|
|
79
|
-
}
|