@sudoplatform/sudo-notification 1.0.2 → 2.0.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/cjs/gen/graphqlTypes.js +3 -1
- package/cjs/gen/graphqlTypes.js.map +1 -1
- package/cjs/private/apiClient.js +33 -29
- package/cjs/private/apiClient.js.map +1 -1
- package/cjs/private/transformers/errorTransformer.js +6 -1
- package/cjs/private/transformers/errorTransformer.js.map +1 -1
- package/cjs/public/errors.js +19 -1
- package/cjs/public/errors.js.map +1 -1
- package/cjs/public/sudoNotificationClient.js +36 -3
- package/cjs/public/sudoNotificationClient.js.map +1 -1
- package/cjs/public/types/index.js +1 -0
- package/cjs/public/types/index.js.map +1 -1
- package/cjs/public/types/userAndDeviceNotificationConfiguration.js +8 -0
- package/cjs/public/types/userAndDeviceNotificationConfiguration.js.map +1 -0
- package/lib/gen/graphqlTypes.js +2 -0
- package/lib/gen/graphqlTypes.js.map +1 -1
- package/lib/private/apiClient.js +35 -31
- package/lib/private/apiClient.js.map +1 -1
- package/lib/private/transformers/errorTransformer.js +8 -3
- package/lib/private/transformers/errorTransformer.js.map +1 -1
- package/lib/public/errors.js +16 -0
- package/lib/public/errors.js.map +1 -1
- package/lib/public/sudoNotificationClient.js +36 -3
- package/lib/public/sudoNotificationClient.js.map +1 -1
- package/lib/public/types/index.js +1 -0
- package/lib/public/types/index.js.map +1 -1
- package/lib/public/types/userAndDeviceNotificationConfiguration.js +7 -0
- package/lib/public/types/userAndDeviceNotificationConfiguration.js.map +1 -0
- package/package.json +46 -45
- package/types/gen/graphqlTypes.d.ts +68 -1
- package/types/private/apiClient.d.ts +7 -4
- package/types/private/transformers/errorTransformer.d.ts +5 -2
- package/types/public/errors.d.ts +12 -0
- package/types/public/sudoNotificationClient.d.ts +47 -1
- package/types/public/types/index.d.ts +1 -0
- package/types/public/types/userAndDeviceNotificationConfiguration.d.ts +18 -0
package/lib/private/apiClient.js
CHANGED
|
@@ -1,19 +1,27 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright © 2025 Anonyome Labs, Inc. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
1
|
import { DefaultApiClientManager, } from '@sudoplatform/sudo-api-client';
|
|
7
|
-
import { DefaultLogger, FatalError, UnknownGraphQLError, } from '@sudoplatform/sudo-common';
|
|
8
|
-
import { DeleteAppFromDeviceDocument, GetNotificationSettingsDocument, RegisterAppOnDeviceDocument, SendTestNotificationDocument, UpdateDeviceInfoDocument, UpdateNotificationSettingsDocument, } from '../gen/graphqlTypes';
|
|
2
|
+
import { DefaultLogger, FatalError, isGraphQLNetworkError, mapNetworkErrorToClientError, UnknownGraphQLError, } from '@sudoplatform/sudo-common';
|
|
3
|
+
import { DeleteAppFromDeviceDocument, GetNotificationSettingsDocument, GetUserAndDeviceNotificationSettingsDocument, RegisterAppOnDeviceDocument, SendTestNotificationDocument, UpdateDeviceInfoDocument, UpdateNotificationSettingsDocument, } from '../gen/graphqlTypes';
|
|
9
4
|
import { SERVICE_NAME } from './constants';
|
|
10
5
|
import { ErrorTransformer } from './transformers/errorTransformer';
|
|
11
6
|
export class ApiClient {
|
|
12
7
|
constructor(apiClientManager) {
|
|
8
|
+
this.mapGraphQLCallError = (err) => {
|
|
9
|
+
if ('graphQLErrors' in err && Array.isArray(err.graphQLErrors)) {
|
|
10
|
+
const error = err.graphQLErrors[0];
|
|
11
|
+
if (error) {
|
|
12
|
+
this.log.debug('appSync operation failed with error', { err });
|
|
13
|
+
return ErrorTransformer.toClientError(error);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
if ('errorType' in err) {
|
|
17
|
+
this.log.debug('appSync operation failed with error', { err });
|
|
18
|
+
return ErrorTransformer.toClientError(err);
|
|
19
|
+
}
|
|
20
|
+
return new UnknownGraphQLError(err);
|
|
21
|
+
};
|
|
13
22
|
this.log = new DefaultLogger(this.constructor.name);
|
|
14
23
|
const clientManager = apiClientManager ?? DefaultApiClientManager.getInstance();
|
|
15
24
|
this.client = clientManager.getClient({
|
|
16
|
-
disableOffline: true,
|
|
17
25
|
configNamespace: SERVICE_NAME,
|
|
18
26
|
});
|
|
19
27
|
}
|
|
@@ -45,11 +53,18 @@ export class ApiClient {
|
|
|
45
53
|
const data = await this.performQuery({
|
|
46
54
|
query: GetNotificationSettingsDocument,
|
|
47
55
|
variables: { input },
|
|
48
|
-
fetchPolicy: 'network-only',
|
|
49
56
|
calleeName: this.getNotificationSettings.name,
|
|
50
57
|
});
|
|
51
58
|
return data.getNotificationSettings;
|
|
52
59
|
}
|
|
60
|
+
async getUserAndDeviceNotificationSettings(input) {
|
|
61
|
+
const data = await this.performQuery({
|
|
62
|
+
query: GetUserAndDeviceNotificationSettingsDocument,
|
|
63
|
+
variables: { input },
|
|
64
|
+
calleeName: this.getUserAndDeviceNotificationSettings.name,
|
|
65
|
+
});
|
|
66
|
+
return data.getUserAndDeviceNotificationSettings;
|
|
67
|
+
}
|
|
53
68
|
async updateNotificationSettings(input) {
|
|
54
69
|
const data = await this.performMutation({
|
|
55
70
|
mutation: UpdateNotificationSettingsDocument,
|
|
@@ -66,30 +81,24 @@ export class ApiClient {
|
|
|
66
81
|
});
|
|
67
82
|
return data.sendTestNotification;
|
|
68
83
|
}
|
|
69
|
-
async performQuery({ variables,
|
|
84
|
+
async performQuery({ variables, query, calleeName, }) {
|
|
70
85
|
let result;
|
|
71
86
|
try {
|
|
72
87
|
result = await this.client.query({
|
|
73
88
|
variables,
|
|
74
|
-
fetchPolicy,
|
|
75
89
|
query,
|
|
76
90
|
});
|
|
77
91
|
}
|
|
78
92
|
catch (err) {
|
|
79
|
-
const
|
|
80
|
-
this.log.debug('error received', { calleeName,
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
this.log.debug('appSync query failed with error', { error });
|
|
84
|
-
throw ErrorTransformer.toClientError(error);
|
|
85
|
-
}
|
|
86
|
-
else {
|
|
87
|
-
throw new UnknownGraphQLError(err);
|
|
93
|
+
const error = err;
|
|
94
|
+
this.log.debug('error received via query', { calleeName, error });
|
|
95
|
+
if (isGraphQLNetworkError(error)) {
|
|
96
|
+
throw mapNetworkErrorToClientError(error);
|
|
88
97
|
}
|
|
98
|
+
throw this.mapGraphQLCallError(error);
|
|
89
99
|
}
|
|
90
100
|
const error = result.errors?.[0];
|
|
91
101
|
if (error) {
|
|
92
|
-
this.log.debug('error received', { error });
|
|
93
102
|
throw ErrorTransformer.toClientError(error);
|
|
94
103
|
}
|
|
95
104
|
if (result.data) {
|
|
@@ -108,20 +117,15 @@ export class ApiClient {
|
|
|
108
117
|
});
|
|
109
118
|
}
|
|
110
119
|
catch (err) {
|
|
111
|
-
const
|
|
112
|
-
this.log.debug('error received', { calleeName,
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
this.log.debug('appSync mutation failed with error', { error });
|
|
116
|
-
throw ErrorTransformer.toClientError(error);
|
|
117
|
-
}
|
|
118
|
-
else {
|
|
119
|
-
throw new UnknownGraphQLError(err);
|
|
120
|
+
const error = err;
|
|
121
|
+
this.log.debug('error received via mutation', { calleeName, error });
|
|
122
|
+
if (isGraphQLNetworkError(error)) {
|
|
123
|
+
throw mapNetworkErrorToClientError(error);
|
|
120
124
|
}
|
|
125
|
+
throw this.mapGraphQLCallError(error);
|
|
121
126
|
}
|
|
122
127
|
const error = result.errors?.[0];
|
|
123
128
|
if (error) {
|
|
124
|
-
this.log.debug('appSync mutation failed with error', { error });
|
|
125
129
|
throw ErrorTransformer.toClientError(error);
|
|
126
130
|
}
|
|
127
131
|
if (result.data) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apiClient.js","sourceRoot":"","sources":["../../src/private/apiClient.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"apiClient.js","sourceRoot":"","sources":["../../src/private/apiClient.ts"],"names":[],"mappings":"AAMA,OAAO,EAEL,uBAAuB,GACxB,MAAM,+BAA+B,CAAA;A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AAA;QAChC,IAAI,KAAK,EAAE,CAAC;YACV,MAAM,gBAAgB,CAAC,aAAa,CAAC,KAAK,CAAC,CAAA;QAC7C,CAAC;QAED,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;YAChB,OAAO,MAAM,CAAC,IAAI,CAAA;QACpB,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,UAAU,CAClB,GAAG,UAAU,IAAI,aAAa,4BAA4B,CAC3D,CAAA;QACH,CAAC;IACH,CAAC;CAoBF"}
|
|
@@ -3,11 +3,12 @@
|
|
|
3
3
|
*
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { mapGraphQLToClientError
|
|
7
|
-
import { DeviceAlreadyRegisteredError, DeviceCreateError, DeviceDeleteError, DeviceNotFoundError, DeviceReadError, DeviceUpdateError, SchemaValidationError, } from '../../public/errors';
|
|
6
|
+
import { mapGraphQLToClientError } from '@sudoplatform/sudo-common';
|
|
7
|
+
import { DeviceAlreadyRegisteredError, DeviceCreateError, DeviceDeleteError, DeviceNotFoundError, DeviceReadError, DeviceUpdateError, SchemaValidationError, UserInfoReadError, UserInfoUpdateError, } from '../../public/errors';
|
|
8
8
|
export class ErrorTransformer {
|
|
9
9
|
static toClientError(error) {
|
|
10
|
-
|
|
10
|
+
const errorType = 'errorType' in error ? error.errorType : error.message;
|
|
11
|
+
switch (errorType) {
|
|
11
12
|
case 'sudoplatform.ns.DeviceExist':
|
|
12
13
|
return new DeviceAlreadyRegisteredError(error.message);
|
|
13
14
|
case 'sudoplatform.ns.DeviceNotFound':
|
|
@@ -22,6 +23,10 @@ export class ErrorTransformer {
|
|
|
22
23
|
return new DeviceReadError(error.message);
|
|
23
24
|
case 'sudoplatform.ns.SchemaValidation':
|
|
24
25
|
return new SchemaValidationError(error.message);
|
|
26
|
+
case 'sudoplatform.ns.UserInfoRead':
|
|
27
|
+
return new UserInfoReadError(error.message);
|
|
28
|
+
case 'sudoplatform.ns.UserInfoUpdate':
|
|
29
|
+
return new UserInfoUpdateError(error.message);
|
|
25
30
|
default:
|
|
26
31
|
return mapGraphQLToClientError(error);
|
|
27
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errorTransformer.js","sourceRoot":"","sources":["../../../src/private/transformers/errorTransformer.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,
|
|
1
|
+
{"version":3,"file":"errorTransformer.js","sourceRoot":"","sources":["../../../src/private/transformers/errorTransformer.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAA;AAEnE,OAAO,EACL,4BAA4B,EAC5B,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,eAAe,EACf,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,qBAAqB,CAAA;AAE5B,MAAM,OAAO,gBAAgB;IAC3B,MAAM,CAAC,aAAa,CAClB,KAA4D;QAE5D,MAAM,SAAS,GAAG,WAAW,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAA;QAExE,QAAQ,SAAS,EAAE,CAAC;YAClB,KAAK,6BAA6B;gBAChC,OAAO,IAAI,4BAA4B,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;YACxD,KAAK,gCAAgC;gBACnC,OAAO,IAAI,mBAAmB,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;YAC/C,KAAK,8BAA8B;gBACjC,OAAO,IAAI,iBAAiB,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;YAC7C,KAAK,8BAA8B;gBACjC,OAAO,IAAI,iBAAiB,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;YAC7C,KAAK,8BAA8B;gBACjC,OAAO,IAAI,iBAAiB,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;YAC7C,KAAK,4BAA4B;gBAC/B,OAAO,IAAI,eAAe,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;YAC3C,KAAK,kCAAkC;gBACrC,OAAO,IAAI,qBAAqB,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;YACjD,KAAK,8BAA8B;gBACjC,OAAO,IAAI,iBAAiB,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;YAC7C,KAAK,gCAAgC;gBACnC,OAAO,IAAI,mBAAmB,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;YAC/C;gBACE,OAAO,uBAAuB,CAAC,KAAK,CAAC,CAAA;QACzC,CAAC;IACH,CAAC;CACF"}
|
package/lib/public/errors.js
CHANGED
|
@@ -113,4 +113,20 @@ export class SchemaValidationError extends NotificationError {
|
|
|
113
113
|
super(message);
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
|
+
/**
|
|
117
|
+
* The user notification settings could not be read
|
|
118
|
+
*/
|
|
119
|
+
export class UserInfoReadError extends NotificationError {
|
|
120
|
+
constructor(msg) {
|
|
121
|
+
super(msg);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* The user notification settings could not be updated
|
|
126
|
+
*/
|
|
127
|
+
export class UserInfoUpdateError extends NotificationError {
|
|
128
|
+
constructor(msg) {
|
|
129
|
+
super(msg);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
116
132
|
//# sourceMappingURL=errors.js.map
|
package/lib/public/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/public/errors.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,iBAAkB,SAAQ,KAAK;IACnC,YAAY,GAAY;QACtB,KAAK,CAAC,GAAG,CAAC,CAAA;QACV,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAA;QACjC,IAAI,KAAK,CAAC,iBAAiB,EAAE,CAAC;YAC5B,KAAK,CAAC,iBA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AAK,CAAC,GAAG,CAAC,CAAA;IACZ,CAAC;CACF"}
|
|
@@ -102,14 +102,47 @@ export class DefaultSudoNotificationClient {
|
|
|
102
102
|
});
|
|
103
103
|
return NotificationConfigurationTransformer.toAPI(settings);
|
|
104
104
|
}
|
|
105
|
-
async
|
|
105
|
+
async getUserNotificationConfiguration(bundleId) {
|
|
106
|
+
await this.checkIsSignedInOrThrow();
|
|
107
|
+
const settings = await this.apiClient.getUserAndDeviceNotificationSettings({
|
|
108
|
+
bundleId,
|
|
109
|
+
});
|
|
110
|
+
return settings.user
|
|
111
|
+
? NotificationConfigurationTransformer.toAPI(settings.user)
|
|
112
|
+
: undefined;
|
|
113
|
+
}
|
|
114
|
+
async getUserAndDeviceNotificationConfiguration(deviceInfo) {
|
|
115
|
+
await this.checkIsSignedInOrThrow();
|
|
116
|
+
const settings = await this.apiClient.getUserAndDeviceNotificationSettings({
|
|
117
|
+
bundleId: deviceInfo.bundleId,
|
|
118
|
+
deviceId: deviceInfo.deviceId,
|
|
119
|
+
});
|
|
120
|
+
return {
|
|
121
|
+
user: settings.user
|
|
122
|
+
? NotificationConfigurationTransformer.toAPI(settings.user)
|
|
123
|
+
: undefined,
|
|
124
|
+
device: settings.device
|
|
125
|
+
? NotificationConfigurationTransformer.toAPI(settings.device)
|
|
126
|
+
: undefined,
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
setNotificationConfiguration(deviceInfo, config) {
|
|
130
|
+
return this.setUserOrDeviceNotificationConfiguration(deviceInfo, config);
|
|
131
|
+
}
|
|
132
|
+
setUserNotificationConfiguration(bundleId, config) {
|
|
133
|
+
return this.setUserOrDeviceNotificationConfiguration(bundleId, config);
|
|
134
|
+
}
|
|
135
|
+
async setUserOrDeviceNotificationConfiguration(deviceInfoOrBundleId, config) {
|
|
136
|
+
const { bundleId, deviceId } = typeof deviceInfoOrBundleId === 'string'
|
|
137
|
+
? { bundleId: deviceInfoOrBundleId, deviceId: undefined }
|
|
138
|
+
: deviceInfoOrBundleId;
|
|
106
139
|
await this.checkIsSignedInOrThrow();
|
|
107
140
|
const services = this.notifiableServices
|
|
108
141
|
.map((client) => client.getSchema())
|
|
109
142
|
.map((schema) => NotificationMetadataTransformer.toGraphQL(schema));
|
|
110
143
|
await this.apiClient.updateNotificationSettings({
|
|
111
|
-
bundleId
|
|
112
|
-
deviceId
|
|
144
|
+
bundleId,
|
|
145
|
+
deviceId,
|
|
113
146
|
filter: NotificationConfigurationTransformer.toGraphQLFilters(config),
|
|
114
147
|
services,
|
|
115
148
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sudoNotificationClient.js","sourceRoot":"","sources":["../../src/public/sudoNotificationClient.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,2BAA2B,EAC3B,aAAa,EACb,gBAAgB,EAChB,4BAA4B,GAC7B,MAAM,2BAA2B,CAAA;AAElC,OAAO,EAAE,aAAa,EAA6B,MAAM,qBAAqB,CAAA;AAC9E,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,8CAA8C,CAAA;AACnF,OAAO,EAAE,oCAAoC,EAAE,MAAM,8DAA8D,CAAA;AACnH,OAAO,EAAE,+BAA+B,EAAE,MAAM,yDAAyD,CAAA;AAEzG,OAAO,EAEL,4BAA4B,GAC7B,MAAM,0CAA0C,CAAA;AACjD,OAAO,EAEL,8BAA8B,GAC/B,MAAM,4CAA4C,CAAA;AAEnD,OAAO,EACL,sCAAsC,EACtC,yBAAyB,EACzB,4BAA4B,EAC5B,sCAAsC,GACvC,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"sudoNotificationClient.js","sourceRoot":"","sources":["../../src/public/sudoNotificationClient.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,2BAA2B,EAC3B,aAAa,EACb,gBAA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AAE,CAAC,QAAQ,CAAC,CAAA;QACvC,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,MAAM,IAAI,4BAA4B,CAAC,aAAa,CAAC,CAAA;QACvD,CAAC;QAED,MAAM,SAAS,GAAkC;YAC/C,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,IAAI,EAAE;gBACJ,IAAI,EAAE,OAAO;gBACb,MAAM,EAAE,SAAS;aAClB;SACF,CAAA;QACD,IAAI,IAAI,CAAC,cAAc,KAAK,SAAS,IAAI,IAAI,CAAC,cAAc,KAAK,IAAI,EAAE,CAAC;YACtE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,cAAc,CAAA;QAChD,CAAC;QAED,OAAO,SAAS,CAAA;IAClB,CAAC;IAEO,KAAK,CAAC,sBAAsB;QAClC,IAAI,CAAC,CAAC,MAAM,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE,CAAC,EAAE,CAAC;YAC9C,MAAM,IAAI,gBAAgB,EAAE,CAAA;QAC9B,CAAC;IACH,CAAC;CACF"}
|
|
@@ -14,4 +14,5 @@ export * from './sudoNotification';
|
|
|
14
14
|
export * from './sudoNotificationClientOptions';
|
|
15
15
|
export * from './sudoNotificationData';
|
|
16
16
|
export * from './sudoNotificationFilterClient';
|
|
17
|
+
export * from './userAndDeviceNotificationConfiguration';
|
|
17
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/public/types/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,cAAc,aAAa,CAAA;AAC3B,cAAc,6BAA6B,CAAA;AAC3C,cAAc,0BAA0B,CAAA;AACxC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,0BAA0B,CAAA;AACxC,cAAc,wBAAwB,CAAA;AACtC,cAAc,2BAA2B,CAAA;AACzC,cAAc,oBAAoB,CAAA;AAClC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,wBAAwB,CAAA;AACtC,cAAc,gCAAgC,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/public/types/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,cAAc,aAAa,CAAA;AAC3B,cAAc,6BAA6B,CAAA;AAC3C,cAAc,0BAA0B,CAAA;AACxC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,0BAA0B,CAAA;AACxC,cAAc,wBAAwB,CAAA;AACtC,cAAc,2BAA2B,CAAA;AACzC,cAAc,oBAAoB,CAAA;AAClC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,wBAAwB,CAAA;AACtC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,0CAA0C,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"userAndDeviceNotificationConfiguration.js","sourceRoot":"","sources":["../../../src/public/types/userAndDeviceNotificationConfiguration.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sudoplatform/sudo-notification",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"author": "Anonyome Labs, Inc.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
|
-
"url": "https://github.com/sudoplatform/sudo-notification-web.git"
|
|
7
|
+
"url": "git+https://github.com/sudoplatform/sudo-notification-web.git"
|
|
8
8
|
},
|
|
9
9
|
"license": "Apache-2.0",
|
|
10
10
|
"scripts": {
|
|
11
|
-
"audit": "
|
|
11
|
+
"audit": "true",
|
|
12
12
|
"prepare": "husky",
|
|
13
13
|
"lint": "yarn lint:eslint && yarn lint:prettier",
|
|
14
14
|
"lint:eslint": "eslint \"{bin,test,src}/**/*.{js,ts,tsx}\"",
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
"codegen": "graphql-codegen -c codegen.yml",
|
|
17
17
|
"verify": "yarn audit && yarn lint && yarn unit-test",
|
|
18
18
|
"unit-test": "jest --coverage test/unit",
|
|
19
|
-
"integration-test": "jest test/integration",
|
|
19
|
+
"integration-test": "jest test/integration --passWithNoTests",
|
|
20
|
+
"test": "yarn unit-test && yarn integration-test",
|
|
20
21
|
"clean": "rm -rf esm lib docs",
|
|
21
22
|
"build": "yarn codegen && yarn build:transpile && yarn build:docs",
|
|
22
23
|
"build:transpile": "concurrently \"yarn build:transpile:declarations\" \"yarn build:transpile:cjs\" \"yarn build:transpile:esm\"",
|
|
@@ -42,63 +43,63 @@
|
|
|
42
43
|
"types"
|
|
43
44
|
],
|
|
44
45
|
"peerDependencies": {
|
|
45
|
-
"@sudoplatform/sudo-api-client": "^
|
|
46
|
-
"@sudoplatform/sudo-common": "^
|
|
47
|
-
"@sudoplatform/sudo-user": "^
|
|
46
|
+
"@sudoplatform/sudo-api-client": "^16.0.0",
|
|
47
|
+
"@sudoplatform/sudo-common": "^12.2.0",
|
|
48
|
+
"@sudoplatform/sudo-user": "^16.0.0"
|
|
48
49
|
},
|
|
49
50
|
"dependencies": {
|
|
50
|
-
"
|
|
51
|
-
"
|
|
51
|
+
"aws-amplify": "^6.15.8",
|
|
52
|
+
"fp-ts": "^2.16.11",
|
|
53
|
+
"graphql": "^16.12.0",
|
|
52
54
|
"io-ts": "^2.2.22",
|
|
53
55
|
"monocle-ts": "^2.3.13",
|
|
54
56
|
"newtype-ts": "^0.3.5",
|
|
55
57
|
"tslib": "^2.8.1"
|
|
56
58
|
},
|
|
59
|
+
"resolutions": {
|
|
60
|
+
"graphql": "^16.12.0"
|
|
61
|
+
},
|
|
57
62
|
"devDependencies": {
|
|
58
|
-
"@eslint/compat": "^1.
|
|
59
|
-
"@eslint/eslintrc": "^3.3.
|
|
60
|
-
"@eslint/js": "^9.
|
|
61
|
-
"@graphql-codegen/add": "^
|
|
62
|
-
"@graphql-codegen/cli": "^
|
|
63
|
-
"@graphql-codegen/typed-document-node": "^
|
|
64
|
-
"@graphql-codegen/typescript": "^
|
|
65
|
-
"@graphql-codegen/typescript-operations": "^
|
|
66
|
-
"@
|
|
67
|
-
"@sudoplatform/sudo-
|
|
68
|
-
"@sudoplatform/sudo-
|
|
69
|
-
"@
|
|
70
|
-
"@types/
|
|
71
|
-
"@types/
|
|
72
|
-
"@
|
|
73
|
-
"@
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"eslint": "^
|
|
80
|
-
"eslint-config-prettier": "^10.1.5",
|
|
81
|
-
"eslint-plugin-import": "^2.31.0",
|
|
82
|
-
"eslint-plugin-jest": "^28.11.0",
|
|
83
|
-
"eslint-plugin-prettier": "^5.4.0",
|
|
63
|
+
"@eslint/compat": "^1.4.1",
|
|
64
|
+
"@eslint/eslintrc": "^3.3.3",
|
|
65
|
+
"@eslint/js": "^9.39.1",
|
|
66
|
+
"@graphql-codegen/add": "^6.0.0",
|
|
67
|
+
"@graphql-codegen/cli": "^6.1.0",
|
|
68
|
+
"@graphql-codegen/typed-document-node": "^6.1.4",
|
|
69
|
+
"@graphql-codegen/typescript": "^5.0.6",
|
|
70
|
+
"@graphql-codegen/typescript-operations": "^5.0.6",
|
|
71
|
+
"@sudoplatform/sudo-api-client": "^16.0.0",
|
|
72
|
+
"@sudoplatform/sudo-common": "^12.2.0",
|
|
73
|
+
"@sudoplatform/sudo-user": "^16.0.0",
|
|
74
|
+
"@types/jest": "^30.0.0",
|
|
75
|
+
"@types/lodash": "^4.17.21",
|
|
76
|
+
"@types/node": "^22.19.1",
|
|
77
|
+
"@typescript-eslint/eslint-plugin": "^8.48.0",
|
|
78
|
+
"@typescript-eslint/parser": "^8.48.0",
|
|
79
|
+
"concurrently": "^9.2.1",
|
|
80
|
+
"eslint": "^9.39.1",
|
|
81
|
+
"eslint-config-prettier": "^10.1.8",
|
|
82
|
+
"eslint-plugin-import": "^2.32.0",
|
|
83
|
+
"eslint-plugin-jest": "^29.2.1",
|
|
84
|
+
"eslint-plugin-prettier": "^5.5.4",
|
|
84
85
|
"eslint-plugin-tree-shaking": "^1.12.2",
|
|
85
86
|
"husky": "^9.1.7",
|
|
86
87
|
"isomorphic-fetch": "^3.0.0",
|
|
87
|
-
"jest": "^
|
|
88
|
-
"jest-environment-jsdom": "^
|
|
88
|
+
"jest": "^30.2.0",
|
|
89
|
+
"jest-environment-jsdom": "^30.2.0",
|
|
89
90
|
"lodash": "^4.17.21",
|
|
90
|
-
"prettier": "^3.
|
|
91
|
-
"prettier-plugin-organize-imports": "^4.
|
|
92
|
-
"ts-jest": "^29.
|
|
91
|
+
"prettier": "^3.7.3",
|
|
92
|
+
"prettier-plugin-organize-imports": "^4.3.0",
|
|
93
|
+
"ts-jest": "^29.4.6",
|
|
93
94
|
"ts-mockito": "^2.6.1",
|
|
94
95
|
"ts-node": "^10.9.2",
|
|
95
|
-
"typedoc": "^0.28.
|
|
96
|
-
"typescript": "^5.
|
|
96
|
+
"typedoc": "^0.28.15",
|
|
97
|
+
"typescript": "^5.9.3",
|
|
97
98
|
"uuid": "^11.1.0",
|
|
98
|
-
"wait-for-expect": "^
|
|
99
|
+
"wait-for-expect": "^4.0.0"
|
|
99
100
|
},
|
|
100
101
|
"engines": {
|
|
101
|
-
"node": ">=
|
|
102
|
+
"node": ">=22"
|
|
102
103
|
},
|
|
103
104
|
"packageManager": "yarn@4.9.1+sha512.f95ce356460e05be48d66401c1ae64ef84d163dd689964962c6888a9810865e39097a5e9de748876c2e0bf89b232d583c33982773e9903ae7a76257270986538"
|
|
104
|
-
}
|
|
105
|
+
}
|
|
@@ -68,6 +68,10 @@ export type GetSettingsInput = {
|
|
|
68
68
|
bundleId: Scalars['String']['input'];
|
|
69
69
|
deviceId: Scalars['String']['input'];
|
|
70
70
|
};
|
|
71
|
+
export type GetUserAndDeviceSettingsInput = {
|
|
72
|
+
bundleId: Scalars['String']['input'];
|
|
73
|
+
deviceId?: InputMaybe<Scalars['String']['input']>;
|
|
74
|
+
};
|
|
71
75
|
export type Mutation = {
|
|
72
76
|
__typename?: 'Mutation';
|
|
73
77
|
deleteAppFromDevice?: Maybe<Scalars['Boolean']['output']>;
|
|
@@ -102,10 +106,14 @@ export type NotificationSettingsOutput = {
|
|
|
102
106
|
export type Query = {
|
|
103
107
|
__typename?: 'Query';
|
|
104
108
|
getNotificationSettings: NotificationSettingsOutput;
|
|
109
|
+
getUserAndDeviceNotificationSettings: UserAndDeviceNotificationSettingsOutput;
|
|
105
110
|
};
|
|
106
111
|
export type QueryGetNotificationSettingsArgs = {
|
|
107
112
|
input: GetSettingsInput;
|
|
108
113
|
};
|
|
114
|
+
export type QueryGetUserAndDeviceNotificationSettingsArgs = {
|
|
115
|
+
input: GetUserAndDeviceSettingsInput;
|
|
116
|
+
};
|
|
109
117
|
export type RegisterAppOnDeviceInput = {
|
|
110
118
|
build: BuildType;
|
|
111
119
|
bundleId: Scalars['String']['input'];
|
|
@@ -144,10 +152,15 @@ export type UpdateInfoInput = {
|
|
|
144
152
|
};
|
|
145
153
|
export type UpdateSettingsInput = {
|
|
146
154
|
bundleId: Scalars['String']['input'];
|
|
147
|
-
deviceId
|
|
155
|
+
deviceId?: InputMaybe<Scalars['String']['input']>;
|
|
148
156
|
filter: Array<InputMaybe<Filter>>;
|
|
149
157
|
services: Array<NotifiableServiceSchema>;
|
|
150
158
|
};
|
|
159
|
+
export type UserAndDeviceNotificationSettingsOutput = {
|
|
160
|
+
__typename?: 'UserAndDeviceNotificationSettingsOutput';
|
|
161
|
+
device?: Maybe<NotificationSettingsOutput>;
|
|
162
|
+
user?: Maybe<NotificationSettingsOutput>;
|
|
163
|
+
};
|
|
151
164
|
export declare enum BuildType {
|
|
152
165
|
Debug = "DEBUG",
|
|
153
166
|
Release = "RELEASE"
|
|
@@ -182,6 +195,35 @@ export type GetNotificationSettingsQuery = {
|
|
|
182
195
|
}>;
|
|
183
196
|
};
|
|
184
197
|
};
|
|
198
|
+
export type GetUserAndDeviceNotificationSettingsQueryVariables = Exact<{
|
|
199
|
+
input: GetUserAndDeviceSettingsInput;
|
|
200
|
+
}>;
|
|
201
|
+
export type GetUserAndDeviceNotificationSettingsQuery = {
|
|
202
|
+
__typename?: 'Query';
|
|
203
|
+
getUserAndDeviceNotificationSettings: {
|
|
204
|
+
__typename?: 'UserAndDeviceNotificationSettingsOutput';
|
|
205
|
+
user?: {
|
|
206
|
+
__typename?: 'NotificationSettingsOutput';
|
|
207
|
+
filter: Array<{
|
|
208
|
+
__typename?: 'FilterOutputEntry';
|
|
209
|
+
serviceName: string;
|
|
210
|
+
actionType: FilterAction;
|
|
211
|
+
rule: string;
|
|
212
|
+
enableMeta?: string | null;
|
|
213
|
+
}>;
|
|
214
|
+
} | null;
|
|
215
|
+
device?: {
|
|
216
|
+
__typename?: 'NotificationSettingsOutput';
|
|
217
|
+
filter: Array<{
|
|
218
|
+
__typename?: 'FilterOutputEntry';
|
|
219
|
+
serviceName: string;
|
|
220
|
+
actionType: FilterAction;
|
|
221
|
+
rule: string;
|
|
222
|
+
enableMeta?: string | null;
|
|
223
|
+
}>;
|
|
224
|
+
} | null;
|
|
225
|
+
};
|
|
226
|
+
};
|
|
185
227
|
export type NotificationSettingsOutputFragment = {
|
|
186
228
|
__typename?: 'NotificationSettingsOutput';
|
|
187
229
|
filter: Array<{
|
|
@@ -220,9 +262,34 @@ export type UpdateNotificationSettingsMutation = {
|
|
|
220
262
|
__typename?: 'Mutation';
|
|
221
263
|
updateNotificationSettings?: boolean | null;
|
|
222
264
|
};
|
|
265
|
+
export type UserAndDeviceNotificationSettingsOutputFragment = {
|
|
266
|
+
__typename?: 'UserAndDeviceNotificationSettingsOutput';
|
|
267
|
+
user?: {
|
|
268
|
+
__typename?: 'NotificationSettingsOutput';
|
|
269
|
+
filter: Array<{
|
|
270
|
+
__typename?: 'FilterOutputEntry';
|
|
271
|
+
serviceName: string;
|
|
272
|
+
actionType: FilterAction;
|
|
273
|
+
rule: string;
|
|
274
|
+
enableMeta?: string | null;
|
|
275
|
+
}>;
|
|
276
|
+
} | null;
|
|
277
|
+
device?: {
|
|
278
|
+
__typename?: 'NotificationSettingsOutput';
|
|
279
|
+
filter: Array<{
|
|
280
|
+
__typename?: 'FilterOutputEntry';
|
|
281
|
+
serviceName: string;
|
|
282
|
+
actionType: FilterAction;
|
|
283
|
+
rule: string;
|
|
284
|
+
enableMeta?: string | null;
|
|
285
|
+
}>;
|
|
286
|
+
} | null;
|
|
287
|
+
};
|
|
223
288
|
export declare const NotificationSettingsOutputFragmentDoc: DocumentNode<NotificationSettingsOutputFragment, unknown>;
|
|
289
|
+
export declare const UserAndDeviceNotificationSettingsOutputFragmentDoc: DocumentNode<UserAndDeviceNotificationSettingsOutputFragment, unknown>;
|
|
224
290
|
export declare const DeleteAppFromDeviceDocument: DocumentNode<DeleteAppFromDeviceMutation, DeleteAppFromDeviceMutationVariables>;
|
|
225
291
|
export declare const GetNotificationSettingsDocument: DocumentNode<GetNotificationSettingsQuery, GetNotificationSettingsQueryVariables>;
|
|
292
|
+
export declare const GetUserAndDeviceNotificationSettingsDocument: DocumentNode<GetUserAndDeviceNotificationSettingsQuery, GetUserAndDeviceNotificationSettingsQueryVariables>;
|
|
226
293
|
export declare const RegisterAppOnDeviceDocument: DocumentNode<RegisterAppOnDeviceMutation, RegisterAppOnDeviceMutationVariables>;
|
|
227
294
|
export declare const SendTestNotificationDocument: DocumentNode<SendTestNotificationMutation, SendTestNotificationMutationVariables>;
|
|
228
295
|
export declare const UpdateDeviceInfoDocument: DocumentNode<UpdateDeviceInfoMutation, UpdateDeviceInfoMutationVariables>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { GraphQLOptions } from '@aws-amplify/api-graphql';
|
|
1
2
|
import { ApiClientManager } from '@sudoplatform/sudo-api-client';
|
|
2
|
-
import {
|
|
3
|
-
import { DeleteAppFromDeviceInput, GetSettingsInput, NotificationSettingsOutput, RegisterAppOnDeviceInput, SendTestNotificationInput, UpdateInfoInput, UpdateSettingsInput } from '../gen/graphqlTypes';
|
|
3
|
+
import { DeleteAppFromDeviceInput, GetSettingsInput, GetUserAndDeviceSettingsInput, NotificationSettingsOutput, RegisterAppOnDeviceInput, SendTestNotificationInput, UpdateInfoInput, UpdateSettingsInput, UserAndDeviceNotificationSettingsOutput } from '../gen/graphqlTypes';
|
|
4
4
|
export declare class ApiClient {
|
|
5
5
|
private readonly log;
|
|
6
6
|
private readonly client;
|
|
@@ -9,12 +9,15 @@ export declare class ApiClient {
|
|
|
9
9
|
deleteAppFromDevice(input: DeleteAppFromDeviceInput): Promise<boolean>;
|
|
10
10
|
updateDeviceInfo(input: UpdateInfoInput): Promise<boolean>;
|
|
11
11
|
getNotificationSettings(input: GetSettingsInput): Promise<NotificationSettingsOutput>;
|
|
12
|
+
getUserAndDeviceNotificationSettings(input: GetUserAndDeviceSettingsInput): Promise<UserAndDeviceNotificationSettingsOutput>;
|
|
12
13
|
updateNotificationSettings(input: UpdateSettingsInput): Promise<boolean>;
|
|
13
14
|
sendTestNotification(input: SendTestNotificationInput): Promise<boolean>;
|
|
14
|
-
performQuery<Q>({ variables,
|
|
15
|
+
performQuery<Q>({ variables, query, calleeName, }: GraphQLOptions & {
|
|
15
16
|
calleeName?: string;
|
|
16
17
|
}): Promise<Q>;
|
|
17
|
-
performMutation<M>({ mutation, variables, calleeName, }: Omit<
|
|
18
|
+
performMutation<M>({ mutation, variables, calleeName, }: Omit<GraphQLOptions, 'query'> & {
|
|
19
|
+
mutation: GraphQLOptions['query'];
|
|
18
20
|
calleeName?: string;
|
|
19
21
|
}): Promise<M>;
|
|
22
|
+
mapGraphQLCallError: (err: Error) => Error;
|
|
20
23
|
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GraphQLError } from 'graphql/error';
|
|
2
2
|
export declare class ErrorTransformer {
|
|
3
|
-
static toClientError(error:
|
|
3
|
+
static toClientError(error: {
|
|
4
|
+
errorType: string;
|
|
5
|
+
message: string;
|
|
6
|
+
} | GraphQLError): Error;
|
|
4
7
|
}
|
package/types/public/errors.d.ts
CHANGED
|
@@ -78,4 +78,16 @@ export declare class DuplicateNotifiableClientError extends NotificationError {
|
|
|
78
78
|
export declare class SchemaValidationError extends NotificationError {
|
|
79
79
|
constructor(message?: string);
|
|
80
80
|
}
|
|
81
|
+
/**
|
|
82
|
+
* The user notification settings could not be read
|
|
83
|
+
*/
|
|
84
|
+
export declare class UserInfoReadError extends NotificationError {
|
|
85
|
+
constructor(msg?: string);
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* The user notification settings could not be updated
|
|
89
|
+
*/
|
|
90
|
+
export declare class UserInfoUpdateError extends NotificationError {
|
|
91
|
+
constructor(msg?: string);
|
|
92
|
+
}
|
|
81
93
|
export {};
|