@equinor/fusion-framework-module-services 2.1.0 → 2.2.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 +6 -0
- package/dist/esm/notification/api-models.js +2 -0
- package/dist/esm/notification/api-models.js.map +1 -0
- package/dist/esm/notification/client.js +43 -0
- package/dist/esm/notification/client.js.map +1 -0
- package/dist/esm/notification/index.js +5 -0
- package/dist/esm/notification/index.js.map +1 -0
- package/dist/esm/notification/notification/delete/client.js +4 -0
- package/dist/esm/notification/notification/delete/client.js.map +1 -0
- package/dist/esm/notification/notification/delete/generate-endpoint.js +18 -0
- package/dist/esm/notification/notification/delete/generate-endpoint.js.map +1 -0
- package/dist/esm/notification/notification/delete/generate-parameters.js +10 -0
- package/dist/esm/notification/notification/delete/generate-parameters.js.map +1 -0
- package/dist/esm/notification/notification/delete/index.js +6 -0
- package/dist/esm/notification/notification/delete/index.js.map +1 -0
- package/dist/esm/notification/notification/delete/types.js +2 -0
- package/dist/esm/notification/notification/delete/types.js.map +1 -0
- package/dist/esm/notification/notification/get/client.js +4 -0
- package/dist/esm/notification/notification/get/client.js.map +1 -0
- package/dist/esm/notification/notification/get/generate-endpoint.js +18 -0
- package/dist/esm/notification/notification/get/generate-endpoint.js.map +1 -0
- package/dist/esm/notification/notification/get/generate-parameters.js +7 -0
- package/dist/esm/notification/notification/get/generate-parameters.js.map +1 -0
- package/dist/esm/notification/notification/get/index.js +6 -0
- package/dist/esm/notification/notification/get/index.js.map +1 -0
- package/dist/esm/notification/notification/get/types.js +2 -0
- package/dist/esm/notification/notification/get/types.js.map +1 -0
- package/dist/esm/notification/notification/getAll/client.js +4 -0
- package/dist/esm/notification/notification/getAll/client.js.map +1 -0
- package/dist/esm/notification/notification/getAll/generate-endpoint.js +18 -0
- package/dist/esm/notification/notification/getAll/generate-endpoint.js.map +1 -0
- package/dist/esm/notification/notification/getAll/generate-parameters.js +7 -0
- package/dist/esm/notification/notification/getAll/generate-parameters.js.map +1 -0
- package/dist/esm/notification/notification/getAll/index.js +6 -0
- package/dist/esm/notification/notification/getAll/index.js.map +1 -0
- package/dist/esm/notification/notification/getAll/types.js +2 -0
- package/dist/esm/notification/notification/getAll/types.js.map +1 -0
- package/dist/esm/notification/notification/index.js +6 -0
- package/dist/esm/notification/notification/index.js.map +1 -0
- package/dist/esm/notification/notification/patch/client.js +4 -0
- package/dist/esm/notification/notification/patch/client.js.map +1 -0
- package/dist/esm/notification/notification/patch/generate-endpoint.js +18 -0
- package/dist/esm/notification/notification/patch/generate-endpoint.js.map +1 -0
- package/dist/esm/notification/notification/patch/generate-parameters.js +10 -0
- package/dist/esm/notification/notification/patch/generate-parameters.js.map +1 -0
- package/dist/esm/notification/notification/patch/index.js +6 -0
- package/dist/esm/notification/notification/patch/index.js.map +1 -0
- package/dist/esm/notification/notification/patch/types.js +2 -0
- package/dist/esm/notification/notification/patch/types.js.map +1 -0
- package/dist/esm/notification/notification/post/client.js +4 -0
- package/dist/esm/notification/notification/post/client.js.map +1 -0
- package/dist/esm/notification/notification/post/generate-endpoint.js +18 -0
- package/dist/esm/notification/notification/post/generate-endpoint.js.map +1 -0
- package/dist/esm/notification/notification/post/generate-parameters.js +10 -0
- package/dist/esm/notification/notification/post/generate-parameters.js.map +1 -0
- package/dist/esm/notification/notification/post/index.js +6 -0
- package/dist/esm/notification/notification/post/index.js.map +1 -0
- package/dist/esm/notification/notification/post/types.js +2 -0
- package/dist/esm/notification/notification/post/types.js.map +1 -0
- package/dist/esm/notification/settings/get/client.js +4 -0
- package/dist/esm/notification/settings/get/client.js.map +1 -0
- package/dist/esm/notification/settings/get/generate-endpoint.js +18 -0
- package/dist/esm/notification/settings/get/generate-endpoint.js.map +1 -0
- package/dist/esm/notification/settings/get/generate-parameters.js +7 -0
- package/dist/esm/notification/settings/get/generate-parameters.js.map +1 -0
- package/dist/esm/notification/settings/get/index.js +6 -0
- package/dist/esm/notification/settings/get/index.js.map +1 -0
- package/dist/esm/notification/settings/get/types.js +2 -0
- package/dist/esm/notification/settings/get/types.js.map +1 -0
- package/dist/esm/notification/settings/put/client.js +4 -0
- package/dist/esm/notification/settings/put/client.js.map +1 -0
- package/dist/esm/notification/settings/put/generate-endpoint.js +18 -0
- package/dist/esm/notification/settings/put/generate-endpoint.js.map +1 -0
- package/dist/esm/notification/settings/put/generate-parameters.js +10 -0
- package/dist/esm/notification/settings/put/generate-parameters.js.map +1 -0
- package/dist/esm/notification/settings/put/index.js +6 -0
- package/dist/esm/notification/settings/put/index.js.map +1 -0
- package/dist/esm/notification/settings/put/types.js +2 -0
- package/dist/esm/notification/settings/put/types.js.map +1 -0
- package/dist/esm/notification/static.js +6 -0
- package/dist/esm/notification/static.js.map +1 -0
- package/dist/esm/notification/types.js +2 -0
- package/dist/esm/notification/types.js.map +1 -0
- package/dist/esm/provider.js +7 -0
- package/dist/esm/provider.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/notification/api-models.d.ts +54 -0
- package/dist/types/notification/client.d.ts +24 -0
- package/dist/types/notification/index.d.ts +4 -0
- package/dist/types/notification/notification/delete/client.d.ts +5 -0
- package/dist/types/notification/notification/delete/generate-endpoint.d.ts +2 -0
- package/dist/types/notification/notification/delete/generate-parameters.d.ts +5 -0
- package/dist/types/notification/notification/delete/index.d.ts +5 -0
- package/dist/types/notification/notification/delete/types.d.ts +21 -0
- package/dist/types/notification/notification/get/client.d.ts +5 -0
- package/dist/types/notification/notification/get/generate-endpoint.d.ts +2 -0
- package/dist/types/notification/notification/get/generate-parameters.d.ts +5 -0
- package/dist/types/notification/notification/get/index.d.ts +5 -0
- package/dist/types/notification/notification/get/types.d.ts +21 -0
- package/dist/types/notification/notification/getAll/client.d.ts +5 -0
- package/dist/types/notification/notification/getAll/generate-endpoint.d.ts +2 -0
- package/dist/types/notification/notification/getAll/generate-parameters.d.ts +5 -0
- package/dist/types/notification/notification/getAll/index.d.ts +5 -0
- package/dist/types/notification/notification/getAll/types.d.ts +21 -0
- package/dist/types/notification/notification/index.d.ts +5 -0
- package/dist/types/notification/notification/patch/client.d.ts +5 -0
- package/dist/types/notification/notification/patch/generate-endpoint.d.ts +2 -0
- package/dist/types/notification/notification/patch/generate-parameters.d.ts +5 -0
- package/dist/types/notification/notification/patch/index.d.ts +5 -0
- package/dist/types/notification/notification/patch/types.d.ts +22 -0
- package/dist/types/notification/notification/post/client.d.ts +5 -0
- package/dist/types/notification/notification/post/generate-endpoint.d.ts +2 -0
- package/dist/types/notification/notification/post/generate-parameters.d.ts +5 -0
- package/dist/types/notification/notification/post/index.d.ts +5 -0
- package/dist/types/notification/notification/post/types.d.ts +33 -0
- package/dist/types/notification/settings/get/client.d.ts +5 -0
- package/dist/types/notification/settings/get/generate-endpoint.d.ts +2 -0
- package/dist/types/notification/settings/get/generate-parameters.d.ts +5 -0
- package/dist/types/notification/settings/get/index.d.ts +5 -0
- package/dist/types/notification/settings/get/types.d.ts +21 -0
- package/dist/types/notification/settings/put/client.d.ts +5 -0
- package/dist/types/notification/settings/put/generate-endpoint.d.ts +2 -0
- package/dist/types/notification/settings/put/generate-parameters.d.ts +5 -0
- package/dist/types/notification/settings/put/index.d.ts +5 -0
- package/dist/types/notification/settings/put/types.d.ts +17 -0
- package/dist/types/notification/static.d.ts +4 -0
- package/dist/types/notification/types.d.ts +1 -0
- package/dist/types/provider.d.ts +2 -0
- package/package.json +6 -2
- package/src/notification/api-models.ts +70 -0
- package/src/notification/client.ts +167 -0
- package/src/notification/index.ts +6 -0
- package/src/notification/notification/delete/client.ts +37 -0
- package/src/notification/notification/delete/generate-endpoint.ts +24 -0
- package/src/notification/notification/delete/generate-parameters.ts +32 -0
- package/src/notification/notification/delete/index.ts +8 -0
- package/src/notification/notification/delete/types.ts +44 -0
- package/src/notification/notification/get/client.ts +33 -0
- package/src/notification/notification/get/generate-endpoint.ts +25 -0
- package/src/notification/notification/get/generate-parameters.ts +22 -0
- package/src/notification/notification/get/index.ts +8 -0
- package/src/notification/notification/get/types.ts +44 -0
- package/src/notification/notification/getAll/client.ts +37 -0
- package/src/notification/notification/getAll/generate-endpoint.ts +25 -0
- package/src/notification/notification/getAll/generate-parameters.ts +22 -0
- package/src/notification/notification/getAll/index.ts +8 -0
- package/src/notification/notification/getAll/types.ts +44 -0
- package/src/notification/notification/index.ts +5 -0
- package/src/notification/notification/patch/client.ts +37 -0
- package/src/notification/notification/patch/generate-endpoint.ts +24 -0
- package/src/notification/notification/patch/generate-parameters.ts +32 -0
- package/src/notification/notification/patch/index.ts +8 -0
- package/src/notification/notification/patch/types.ts +45 -0
- package/src/notification/notification/post/client.ts +37 -0
- package/src/notification/notification/post/generate-endpoint.ts +25 -0
- package/src/notification/notification/post/generate-parameters.ts +32 -0
- package/src/notification/notification/post/index.ts +8 -0
- package/src/notification/notification/post/types.ts +57 -0
- package/src/notification/settings/get/client.ts +37 -0
- package/src/notification/settings/get/generate-endpoint.ts +25 -0
- package/src/notification/settings/get/generate-parameters.ts +22 -0
- package/src/notification/settings/get/index.ts +8 -0
- package/src/notification/settings/get/types.ts +44 -0
- package/src/notification/settings/put/client.ts +37 -0
- package/src/notification/settings/put/generate-endpoint.ts +25 -0
- package/src/notification/settings/put/generate-parameters.ts +34 -0
- package/src/notification/settings/put/index.ts +8 -0
- package/src/notification/settings/put/types.ts +38 -0
- package/src/notification/static.ts +6 -0
- package/src/notification/types.ts +5 -0
- package/src/provider.ts +8 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 2.2.0 (2023-03-27)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- **services:** Added notification api service ([8a40606](https://github.com/equinor/fusion-framework/commit/8a406068d69903e0d7ebc76079ed12caeac540f1))
|
|
11
|
+
|
|
6
12
|
## 2.1.0 (2023-03-22)
|
|
7
13
|
|
|
8
14
|
### Features
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-models.js","sourceRoot":"","sources":["../../../src/notification/api-models.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { createNotification, deleteNotification, getNotificationById, getNotifications, updateSeenByUser, } from './notification';
|
|
2
|
+
import { ApiVersion } from './static';
|
|
3
|
+
import updateUserNotificationSettings from './settings/put';
|
|
4
|
+
import getUserNotificationSettings from './settings/get';
|
|
5
|
+
export class NotificationApiClient {
|
|
6
|
+
get Version() {
|
|
7
|
+
return ApiVersion;
|
|
8
|
+
}
|
|
9
|
+
constructor(_client, _method) {
|
|
10
|
+
this._client = _client;
|
|
11
|
+
this._method = _method;
|
|
12
|
+
}
|
|
13
|
+
getAll(version, ...args) {
|
|
14
|
+
const fn = getNotifications(this._client, version, this._method);
|
|
15
|
+
return fn(...args);
|
|
16
|
+
}
|
|
17
|
+
getById(version, ...args) {
|
|
18
|
+
const fn = getNotificationById(this._client, version, this._method);
|
|
19
|
+
return fn(...args);
|
|
20
|
+
}
|
|
21
|
+
setSeenByUser(version, ...args) {
|
|
22
|
+
const fn = updateSeenByUser(this._client, version, this._method);
|
|
23
|
+
return fn(...args);
|
|
24
|
+
}
|
|
25
|
+
create(version, ...args) {
|
|
26
|
+
const fn = createNotification(this._client, version, this._method);
|
|
27
|
+
return fn(...args);
|
|
28
|
+
}
|
|
29
|
+
delete(version, ...args) {
|
|
30
|
+
const fn = deleteNotification(this._client, version, this._method);
|
|
31
|
+
return fn(...args);
|
|
32
|
+
}
|
|
33
|
+
getSettings(version, ...args) {
|
|
34
|
+
const fn = getUserNotificationSettings(this._client, version, this._method);
|
|
35
|
+
return fn(...args);
|
|
36
|
+
}
|
|
37
|
+
updateSettings(version, ...args) {
|
|
38
|
+
const fn = updateUserNotificationSettings(this._client, version, this._method);
|
|
39
|
+
return fn(...args);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
export default NotificationApiClient;
|
|
43
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/notification/client.ts"],"names":[],"mappings":"AAGA,OAAO,EACH,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,GACnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAKtC,OAAO,8BAGN,MAAM,gBAAgB,CAAC;AACxB,OAAO,2BAGN,MAAM,gBAAgB,CAAC;AAExB,MAAM,OAAO,qBAAqB;IAI9B,IAAI,OAAO;QACP,OAAO,UAAU,CAAC;IACtB,CAAC;IAED,YAAsB,OAAgB,EAAY,OAAgB;QAA5C,YAAO,GAAP,OAAO,CAAS;QAAY,YAAO,GAAP,OAAO,CAAS;IAAG,CAAC;IAM/D,MAAM,CAIT,OAAiB,EACjB,GAAG,IAAyE;QAE5E,MAAM,EAAE,GAAG,gBAAgB,CACvB,IAAI,CAAC,OAAO,EACZ,OAAO,EACP,IAAI,CAAC,OAAO,CACf,CAAC;QACF,OAAO,EAAE,CAAU,GAAG,IAAI,CAAC,CAAC;IAChC,CAAC;IAMM,OAAO,CAIV,OAAiB,EACjB,GAAG,IAAwE;QAE3E,MAAM,EAAE,GAAG,mBAAmB,CAC1B,IAAI,CAAC,OAAO,EACZ,OAAO,EACP,IAAI,CAAC,OAAO,CACf,CAAC;QACF,OAAO,EAAE,CAAU,GAAG,IAAI,CAAC,CAAC;IAChC,CAAC;IAMM,aAAa,CAIhB,OAAiB,EACjB,GAAG,IAA0E;QAE7E,MAAM,EAAE,GAAG,gBAAgB,CACvB,IAAI,CAAC,OAAO,EACZ,OAAO,EACP,IAAI,CAAC,OAAO,CACf,CAAC;QACF,OAAO,EAAE,CAAU,GAAG,IAAI,CAAC,CAAC;IAChC,CAAC;IAMM,MAAM,CAIT,OAAiB,EACjB,GAAG,IAAyE;QAE5E,MAAM,EAAE,GAAG,kBAAkB,CACzB,IAAI,CAAC,OAAO,EACZ,OAAO,EACP,IAAI,CAAC,OAAO,CACf,CAAC;QACF,OAAO,EAAE,CAAU,GAAG,IAAI,CAAC,CAAC;IAChC,CAAC;IAMM,MAAM,CAIT,OAAiB,EACjB,GAAG,IAA2E;QAE9E,MAAM,EAAE,GAAG,kBAAkB,CACzB,IAAI,CAAC,OAAO,EACZ,OAAO,EACP,IAAI,CAAC,OAAO,CACf,CAAC;QACF,OAAO,EAAE,CAAU,GAAG,IAAI,CAAC,CAAC;IAChC,CAAC;IAKM,WAAW,CAId,OAAiB,EACjB,GAAG,IAAoF;QAEvF,MAAM,EAAE,GAAG,2BAA2B,CAClC,IAAI,CAAC,OAAO,EACZ,OAAO,EACP,IAAI,CAAC,OAAO,CACf,CAAC;QACF,OAAO,EAAE,CAAU,GAAG,IAAI,CAAC,CAAC;IAChC,CAAC;IAKM,cAAc,CAIjB,OAAiB,EACjB,GAAG,IAAoF;QAEvF,MAAM,EAAE,GAAG,8BAA8B,CACrC,IAAI,CAAC,OAAO,EACZ,OAAO,EACP,IAAI,CAAC,OAAO,CACf,CAAC;QACF,OAAO,EAAE,CAAU,GAAG,IAAI,CAAC,CAAC;IAChC,CAAC;CACJ;AAED,eAAe,qBAAqB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/notification/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAE1D,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { generateParameters } from './generate-parameters';
|
|
2
|
+
export const deleteNotification = (client, version, method = 'json') => (args, init) => client[method](...generateParameters(version, args, init));
|
|
3
|
+
export default deleteNotification;
|
|
4
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../../src/notification/notification/delete/client.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAc3D,MAAM,CAAC,MAAM,kBAAkB,GAC3B,CAKI,MAAe,EACf,OAAiB,EACjB,SAAkB,MAAiB,EACrC,EAAE,CACJ,CACI,IAAsC,EACtC,IAAoC,EACU,EAAE,CAChD,MAAM,CAAC,MAAM,CAAC,CACV,GAAG,kBAAkB,CAAuB,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,CACjB,CAAC;AAE5D,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { UnsupportedApiVersion } from '@equinor/fusion-framework-module-services/errors';
|
|
2
|
+
import { ApiVersion } from '@equinor/fusion-framework-module-services/notification';
|
|
3
|
+
export const generateEndpoint = (version, args) => {
|
|
4
|
+
var _a;
|
|
5
|
+
const apiVersion = (_a = ApiVersion[version]) !== null && _a !== void 0 ? _a : version;
|
|
6
|
+
switch (apiVersion) {
|
|
7
|
+
case ApiVersion.v2:
|
|
8
|
+
throw new UnsupportedApiVersion(version);
|
|
9
|
+
case ApiVersion.v1:
|
|
10
|
+
default: {
|
|
11
|
+
const { id } = args;
|
|
12
|
+
const params = new URLSearchParams();
|
|
13
|
+
params.append('api-version', apiVersion);
|
|
14
|
+
return `/notification/${id}/?${String(params)}`;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=generate-endpoint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-endpoint.js","sourceRoot":"","sources":["../../../../../src/notification/notification/delete/generate-endpoint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,kDAAkD,CAAC;AACzF,OAAO,EAAE,UAAU,EAAE,MAAM,wDAAwD,CAAC;AAMpF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAC5B,OAAiB,EACjB,IAAsC,EACxC,EAAE;;IACA,MAAM,UAAU,GAAG,MAAA,UAAU,CAAC,OAAkC,CAAC,mCAAI,OAAO,CAAC;IAC7E,QAAQ,UAAU,EAAE;QAChB,KAAK,UAAU,CAAC,EAAE;YACd,MAAM,IAAI,qBAAqB,CAAC,OAAO,CAAC,CAAC;QAC7C,KAAK,UAAU,CAAC,EAAE,CAAC;QACnB,OAAO,CAAC,CAAC;YACL,MAAM,EAAE,EAAE,EAAE,GAAG,IAAsB,CAAC;YACtC,MAAM,MAAM,GAAG,IAAI,eAAe,EAAE,CAAC;YACrC,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;YACzC,OAAO,iBAAiB,EAAE,KAAK,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;SACnD;KACJ;AACL,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { generateEndpoint } from './generate-endpoint';
|
|
2
|
+
export const generateParameters = (version, args, init) => {
|
|
3
|
+
const path = generateEndpoint(version, args);
|
|
4
|
+
const headers = new Headers();
|
|
5
|
+
headers.append('content-type', 'application/json');
|
|
6
|
+
const requestParams = Object.assign({}, { method: 'delete', headers: headers }, init);
|
|
7
|
+
return [path, requestParams];
|
|
8
|
+
};
|
|
9
|
+
export default generateParameters;
|
|
10
|
+
//# sourceMappingURL=generate-parameters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-parameters.js","sourceRoot":"","sources":["../../../../../src/notification/notification/delete/generate-parameters.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAIvD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAK9B,OAAiB,EACjB,IAAsC,EACtC,IAA0C,EACN,EAAE;IACtC,MAAM,IAAI,GAAG,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAE7C,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;IAC9B,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,kBAAkB,CAAC,CAAC;IAEnD,MAAM,aAAa,GAAwC,MAAM,CAAC,MAAM,CACpE,EAAE,EACF,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,EACtC,IAAI,CACP,CAAC;IAEF,OAAO,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;AACjC,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { ApiVersion } from '@equinor/fusion-framework-module-services/notification';
|
|
2
|
+
export { generateEndpoint } from './generate-endpoint';
|
|
3
|
+
export { generateParameters } from './generate-parameters';
|
|
4
|
+
export * from './types';
|
|
5
|
+
export { deleteNotification as getNotificationById, default } from './client';
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/notification/notification/delete/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wDAAwD,CAAC;AAEpF,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D,cAAc,SAAS,CAAC;AAExB,OAAO,EAAE,kBAAkB,IAAI,mBAAmB,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/notification/notification/delete/types.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { generateParameters } from './generate-parameters';
|
|
2
|
+
export const getNotificationById = (client, version, method = 'json') => (args, init) => client[method](...generateParameters(version, args, init));
|
|
3
|
+
export default getNotificationById;
|
|
4
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../../src/notification/notification/get/client.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAU3D,MAAM,CAAC,MAAM,mBAAmB,GAC5B,CAKI,MAAe,EACf,OAAiB,EACjB,SAAkB,MAAiB,EACrC,EAAE,CACJ,CACI,IAAmC,EACnC,IAAoC,EACO,EAAE,CAC7C,MAAM,CAAC,MAAM,CAAC,CACV,GAAG,kBAAkB,CAAuB,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,CACpB,CAAC;AAEzD,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { UnsupportedApiVersion } from '@equinor/fusion-framework-module-services/errors';
|
|
2
|
+
import { ApiVersion } from '@equinor/fusion-framework-module-services/notification';
|
|
3
|
+
export const generateEndpoint = (version, args) => {
|
|
4
|
+
var _a;
|
|
5
|
+
const apiVersion = (_a = ApiVersion[version]) !== null && _a !== void 0 ? _a : version;
|
|
6
|
+
switch (apiVersion) {
|
|
7
|
+
case ApiVersion.v2:
|
|
8
|
+
throw new UnsupportedApiVersion(version);
|
|
9
|
+
case ApiVersion.v1:
|
|
10
|
+
default: {
|
|
11
|
+
const { id } = args;
|
|
12
|
+
const params = new URLSearchParams();
|
|
13
|
+
params.append('api-version', apiVersion);
|
|
14
|
+
return `/notification/${id}/?${String(params)}`;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=generate-endpoint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-endpoint.js","sourceRoot":"","sources":["../../../../../src/notification/notification/get/generate-endpoint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,kDAAkD,CAAC;AACzF,OAAO,EAAE,UAAU,EAAE,MAAM,wDAAwD,CAAC;AAOpF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAC5B,OAAiB,EACjB,IAAmC,EACrC,EAAE;;IACA,MAAM,UAAU,GAAG,MAAA,UAAU,CAAC,OAAkC,CAAC,mCAAI,OAAO,CAAC;IAC7E,QAAQ,UAAU,EAAE;QAChB,KAAK,UAAU,CAAC,EAAE;YACd,MAAM,IAAI,qBAAqB,CAAC,OAAO,CAAC,CAAC;QAC7C,KAAK,UAAU,CAAC,EAAE,CAAC;QACnB,OAAO,CAAC,CAAC;YACL,MAAM,EAAE,EAAE,EAAE,GAAG,IAAsB,CAAC;YACtC,MAAM,MAAM,GAAG,IAAI,eAAe,EAAE,CAAC;YACrC,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;YACzC,OAAO,iBAAiB,EAAE,KAAK,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;SACnD;KACJ;AACL,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { generateEndpoint } from './generate-endpoint';
|
|
2
|
+
export const generateParameters = (version, args, init) => {
|
|
3
|
+
const path = generateEndpoint(version, args);
|
|
4
|
+
return [path, init];
|
|
5
|
+
};
|
|
6
|
+
export default generateParameters;
|
|
7
|
+
//# sourceMappingURL=generate-parameters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-parameters.js","sourceRoot":"","sources":["../../../../../src/notification/notification/get/generate-parameters.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAIvD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAK9B,OAAiB,EACjB,IAAmC,EACnC,IAA0C,EACN,EAAE;IACtC,MAAM,IAAI,GAAG,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAC7C,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AACxB,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { ApiVersion } from '@equinor/fusion-framework-module-services/notification';
|
|
2
|
+
export { generateEndpoint } from './generate-endpoint';
|
|
3
|
+
export { generateParameters } from './generate-parameters';
|
|
4
|
+
export * from './types';
|
|
5
|
+
export { getNotificationById, default } from './client';
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/notification/notification/get/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wDAAwD,CAAC;AAEpF,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D,cAAc,SAAS,CAAC;AAExB,OAAO,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/notification/notification/get/types.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { generateParameters } from './generate-parameters';
|
|
2
|
+
export const getNotifications = (client, version, method = 'json') => (args, init) => client[method](...generateParameters(version, args, init));
|
|
3
|
+
export default getNotifications;
|
|
4
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../../src/notification/notification/getAll/client.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAc3D,MAAM,CAAC,MAAM,gBAAgB,GACzB,CAKI,MAAe,EACf,OAAiB,EACjB,SAAkB,MAAiB,EACrC,EAAE,CACJ,CACI,IAAoC,EACpC,IAAoC,EACQ,EAAE,CAC9C,MAAM,CAAC,MAAM,CAAC,CACV,GAAG,kBAAkB,CAAuB,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,CACnB,CAAC;AAE1D,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { UnsupportedApiVersion } from '@equinor/fusion-framework-module-services/errors';
|
|
2
|
+
import { ApiVersion } from '@equinor/fusion-framework-module-services/notification';
|
|
3
|
+
export const generateEndpoint = (version, args) => {
|
|
4
|
+
var _a;
|
|
5
|
+
const apiVersion = (_a = ApiVersion[version]) !== null && _a !== void 0 ? _a : version;
|
|
6
|
+
switch (apiVersion) {
|
|
7
|
+
case ApiVersion.v2:
|
|
8
|
+
throw new UnsupportedApiVersion(version);
|
|
9
|
+
case ApiVersion.v1:
|
|
10
|
+
default: {
|
|
11
|
+
const { userId } = args;
|
|
12
|
+
const params = new URLSearchParams();
|
|
13
|
+
params.append('api-version', apiVersion);
|
|
14
|
+
return `/person/${userId}/notifications/?${String(params)}`;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=generate-endpoint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-endpoint.js","sourceRoot":"","sources":["../../../../../src/notification/notification/getAll/generate-endpoint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,kDAAkD,CAAC;AACzF,OAAO,EAAE,UAAU,EAAE,MAAM,wDAAwD,CAAC;AAOpF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAC5B,OAAiB,EACjB,IAAoC,EACtC,EAAE;;IACA,MAAM,UAAU,GAAG,MAAA,UAAU,CAAC,OAAkC,CAAC,mCAAI,OAAO,CAAC;IAC7E,QAAQ,UAAU,EAAE;QAChB,KAAK,UAAU,CAAC,EAAE;YACd,MAAM,IAAI,qBAAqB,CAAC,OAAO,CAAC,CAAC;QAC7C,KAAK,UAAU,CAAC,EAAE,CAAC;QACnB,OAAO,CAAC,CAAC;YACL,MAAM,EAAE,MAAM,EAAE,GAAG,IAA0B,CAAC;YAC9C,MAAM,MAAM,GAAG,IAAI,eAAe,EAAE,CAAC;YACrC,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;YACzC,OAAO,WAAW,MAAM,mBAAmB,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;SAC/D;KACJ;AACL,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { generateEndpoint } from './generate-endpoint';
|
|
2
|
+
export const generateParameters = (version, args, init) => {
|
|
3
|
+
const path = generateEndpoint(version, args);
|
|
4
|
+
return [path, init];
|
|
5
|
+
};
|
|
6
|
+
export default generateParameters;
|
|
7
|
+
//# sourceMappingURL=generate-parameters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-parameters.js","sourceRoot":"","sources":["../../../../../src/notification/notification/getAll/generate-parameters.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAIvD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAK9B,OAAiB,EACjB,IAAoC,EACpC,IAA0C,EACN,EAAE;IACtC,MAAM,IAAI,GAAG,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAC7C,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AACxB,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { ApiVersion } from '@equinor/fusion-framework-module-services/notification';
|
|
2
|
+
export { generateEndpoint } from './generate-endpoint';
|
|
3
|
+
export { generateParameters } from './generate-parameters';
|
|
4
|
+
export * from './types';
|
|
5
|
+
export { getNotifications, default } from './client';
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/notification/notification/getAll/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wDAAwD,CAAC;AAEpF,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D,cAAc,SAAS,CAAC;AAExB,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/notification/notification/getAll/types.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { getNotificationById } from './get/client';
|
|
2
|
+
export { createNotification } from './post/client';
|
|
3
|
+
export { updateSeenByUser } from './patch/client';
|
|
4
|
+
export { getNotifications } from './getAll/client';
|
|
5
|
+
export { deleteNotification } from './delete/client';
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/notification/notification/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { generateParameters } from './generate-parameters';
|
|
2
|
+
export const updateSeenByUser = (client, version, method = 'json') => (args, init) => client[method](...generateParameters(version, args, init));
|
|
3
|
+
export default updateSeenByUser;
|
|
4
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../../src/notification/notification/patch/client.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAc3D,MAAM,CAAC,MAAM,gBAAgB,GACzB,CAKI,MAAe,EACf,OAAiB,EACjB,SAAkB,MAAiB,EACrC,EAAE,CACJ,CACI,IAAqC,EACrC,IAAoC,EACS,EAAE,CAC/C,MAAM,CAAC,MAAM,CAAC,CACV,GAAG,kBAAkB,CAAuB,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,CAClB,CAAC;AAE3D,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { UnsupportedApiVersion } from '@equinor/fusion-framework-module-services/errors';
|
|
2
|
+
import { ApiVersion } from '@equinor/fusion-framework-module-services/notification';
|
|
3
|
+
export const generateEndpoint = (version, args) => {
|
|
4
|
+
var _a;
|
|
5
|
+
const apiVersion = (_a = ApiVersion[version]) !== null && _a !== void 0 ? _a : version;
|
|
6
|
+
switch (apiVersion) {
|
|
7
|
+
case ApiVersion.v2:
|
|
8
|
+
throw new UnsupportedApiVersion(version);
|
|
9
|
+
case ApiVersion.v1:
|
|
10
|
+
default: {
|
|
11
|
+
const { id } = args;
|
|
12
|
+
const params = new URLSearchParams();
|
|
13
|
+
params.append('api-version', apiVersion);
|
|
14
|
+
return `/notification/${id}/?${String(params)}`;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=generate-endpoint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-endpoint.js","sourceRoot":"","sources":["../../../../../src/notification/notification/patch/generate-endpoint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,kDAAkD,CAAC;AACzF,OAAO,EAAE,UAAU,EAAE,MAAM,wDAAwD,CAAC;AAMpF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAC5B,OAAiB,EACjB,IAAqC,EACvC,EAAE;;IACA,MAAM,UAAU,GAAG,MAAA,UAAU,CAAC,OAAkC,CAAC,mCAAI,OAAO,CAAC;IAC7E,QAAQ,UAAU,EAAE;QAChB,KAAK,UAAU,CAAC,EAAE;YACd,MAAM,IAAI,qBAAqB,CAAC,OAAO,CAAC,CAAC;QAC7C,KAAK,UAAU,CAAC,EAAE,CAAC;QACnB,OAAO,CAAC,CAAC;YACL,MAAM,EAAE,EAAE,EAAE,GAAG,IAAsB,CAAC;YACtC,MAAM,MAAM,GAAG,IAAI,eAAe,EAAE,CAAC;YACrC,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;YACzC,OAAO,iBAAiB,EAAE,KAAK,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;SACnD;KACJ;AACL,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { generateEndpoint } from './generate-endpoint';
|
|
2
|
+
export const generateParameters = (version, args, init) => {
|
|
3
|
+
const path = generateEndpoint(version, args);
|
|
4
|
+
const headers = new Headers();
|
|
5
|
+
headers.append('content-type', 'application/json');
|
|
6
|
+
const requestParams = Object.assign({}, { method: 'patch', body: JSON.stringify(args), headers: headers }, init);
|
|
7
|
+
return [path, requestParams];
|
|
8
|
+
};
|
|
9
|
+
export default generateParameters;
|
|
10
|
+
//# sourceMappingURL=generate-parameters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-parameters.js","sourceRoot":"","sources":["../../../../../src/notification/notification/patch/generate-parameters.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAIvD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAK9B,OAAiB,EACjB,IAAqC,EACrC,IAA0C,EACN,EAAE;IACtC,MAAM,IAAI,GAAG,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAE7C,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;IAC9B,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,kBAAkB,CAAC,CAAC;IAEnD,MAAM,aAAa,GAAwC,MAAM,CAAC,MAAM,CACpE,EAAE,EACF,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,EACjE,IAAI,CACP,CAAC;IAEF,OAAO,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;AACjC,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { ApiVersion } from '@equinor/fusion-framework-module-services/notification';
|
|
2
|
+
export { generateEndpoint } from './generate-endpoint';
|
|
3
|
+
export { generateParameters } from './generate-parameters';
|
|
4
|
+
export * from './types';
|
|
5
|
+
export { updateSeenByUser as getNotificationById, default } from './client';
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/notification/notification/patch/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wDAAwD,CAAC;AAEpF,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D,cAAc,SAAS,CAAC;AAExB,OAAO,EAAE,gBAAgB,IAAI,mBAAmB,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/notification/notification/patch/types.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { generateParameters } from './generate-parameters';
|
|
2
|
+
export const createNotification = (client, version, method = 'json') => (args, init) => client[method](...generateParameters(version, args, init));
|
|
3
|
+
export default createNotification;
|
|
4
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../../src/notification/notification/post/client.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAc3D,MAAM,CAAC,MAAM,kBAAkB,GAC3B,CAKI,MAAe,EACf,OAAiB,EACjB,SAAkB,MAAiB,EACrC,EAAE,CACJ,CACI,IAAoC,EACpC,IAAoC,EACQ,EAAE,CAC9C,MAAM,CAAC,MAAM,CAAC,CACV,GAAG,kBAAkB,CAAuB,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,CACnB,CAAC;AAE1D,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { UnsupportedApiVersion } from '@equinor/fusion-framework-module-services/errors';
|
|
2
|
+
import { ApiVersion } from '@equinor/fusion-framework-module-services/notification';
|
|
3
|
+
export const generateEndpoint = (version, args) => {
|
|
4
|
+
var _a;
|
|
5
|
+
const apiVersion = (_a = ApiVersion[version]) !== null && _a !== void 0 ? _a : version;
|
|
6
|
+
switch (apiVersion) {
|
|
7
|
+
case ApiVersion.v2:
|
|
8
|
+
throw new UnsupportedApiVersion(version);
|
|
9
|
+
case ApiVersion.v1:
|
|
10
|
+
default: {
|
|
11
|
+
const { userId } = args;
|
|
12
|
+
const params = new URLSearchParams();
|
|
13
|
+
params.append('api-version', apiVersion);
|
|
14
|
+
return `/person/${userId}/notifications/?${String(params)}`;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=generate-endpoint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-endpoint.js","sourceRoot":"","sources":["../../../../../src/notification/notification/post/generate-endpoint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,kDAAkD,CAAC;AACzF,OAAO,EAAE,UAAU,EAAE,MAAM,wDAAwD,CAAC;AAOpF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAC5B,OAAiB,EACjB,IAAoC,EACtC,EAAE;;IACA,MAAM,UAAU,GAAG,MAAA,UAAU,CAAC,OAAkC,CAAC,mCAAI,OAAO,CAAC;IAC7E,QAAQ,UAAU,EAAE;QAChB,KAAK,UAAU,CAAC,EAAE;YACd,MAAM,IAAI,qBAAqB,CAAC,OAAO,CAAC,CAAC;QAC7C,KAAK,UAAU,CAAC,EAAE,CAAC;QACnB,OAAO,CAAC,CAAC;YACL,MAAM,EAAE,MAAM,EAAE,GAAG,IAA0B,CAAC;YAC9C,MAAM,MAAM,GAAG,IAAI,eAAe,EAAE,CAAC;YACrC,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;YACzC,OAAO,WAAW,MAAM,mBAAmB,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;SAC/D;KACJ;AACL,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { generateEndpoint } from './generate-endpoint';
|
|
2
|
+
export const generateParameters = (version, args, init) => {
|
|
3
|
+
const path = generateEndpoint(version, args);
|
|
4
|
+
const headers = new Headers();
|
|
5
|
+
headers.append('content-type', 'application/json');
|
|
6
|
+
const requestParams = Object.assign({}, { method: 'post', body: JSON.stringify(args), headers: headers }, init);
|
|
7
|
+
return [path, requestParams];
|
|
8
|
+
};
|
|
9
|
+
export default generateParameters;
|
|
10
|
+
//# sourceMappingURL=generate-parameters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-parameters.js","sourceRoot":"","sources":["../../../../../src/notification/notification/post/generate-parameters.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAIvD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAK9B,OAAiB,EACjB,IAAoC,EACpC,IAA0C,EACN,EAAE;IACtC,MAAM,IAAI,GAAG,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAE7C,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;IAC9B,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,kBAAkB,CAAC,CAAC;IAEnD,MAAM,aAAa,GAAwC,MAAM,CAAC,MAAM,CACpE,EAAE,EACF,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,EAChE,IAAI,CACP,CAAC;IAEF,OAAO,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;AACjC,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { ApiVersion } from '@equinor/fusion-framework-module-services/notification';
|
|
2
|
+
export { generateEndpoint } from './generate-endpoint';
|
|
3
|
+
export { generateParameters } from './generate-parameters';
|
|
4
|
+
export * from './types';
|
|
5
|
+
export { createNotification as getNotificationById, default } from './client';
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/notification/notification/post/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wDAAwD,CAAC;AAEpF,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D,cAAc,SAAS,CAAC;AAExB,OAAO,EAAE,kBAAkB,IAAI,mBAAmB,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/notification/notification/post/types.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { generateParameters } from './generate-parameters';
|
|
2
|
+
export const getUserNotificationSettings = (client, version, method = 'json') => (args, init) => client[method](...generateParameters(version, args, init));
|
|
3
|
+
export default getUserNotificationSettings;
|
|
4
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../../src/notification/settings/get/client.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAc3D,MAAM,CAAC,MAAM,2BAA2B,GACpC,CAKI,MAAe,EACf,OAAiB,EACjB,SAAkB,MAAiB,EACrC,EAAE,CACJ,CACI,IAA+C,EAC/C,IAAoC,EACoB,EAAE,CAC1D,MAAM,CAAC,MAAM,CAAC,CACV,GAAG,kBAAkB,CAAuB,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,CACP,CAAC;AAEtE,eAAe,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { UnsupportedApiVersion } from '@equinor/fusion-framework-module-services/errors';
|
|
2
|
+
import { ApiVersion } from '@equinor/fusion-framework-module-services/notification';
|
|
3
|
+
export const generateEndpoint = (version, args) => {
|
|
4
|
+
var _a;
|
|
5
|
+
const apiVersion = (_a = ApiVersion[version]) !== null && _a !== void 0 ? _a : version;
|
|
6
|
+
switch (apiVersion) {
|
|
7
|
+
case ApiVersion.v2:
|
|
8
|
+
throw new UnsupportedApiVersion(version);
|
|
9
|
+
case ApiVersion.v1:
|
|
10
|
+
default: {
|
|
11
|
+
const { userId } = args;
|
|
12
|
+
const params = new URLSearchParams();
|
|
13
|
+
params.append('api-version', apiVersion);
|
|
14
|
+
return `/person/${userId}/notifications/settings/?${String(params)}`;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=generate-endpoint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-endpoint.js","sourceRoot":"","sources":["../../../../../src/notification/settings/get/generate-endpoint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,kDAAkD,CAAC;AACzF,OAAO,EAAE,UAAU,EAAE,MAAM,wDAAwD,CAAC;AAOpF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAC5B,OAAiB,EACjB,IAA+C,EACjD,EAAE;;IACA,MAAM,UAAU,GAAG,MAAA,UAAU,CAAC,OAAkC,CAAC,mCAAI,OAAO,CAAC;IAC7E,QAAQ,UAAU,EAAE;QAChB,KAAK,UAAU,CAAC,EAAE;YACd,MAAM,IAAI,qBAAqB,CAAC,OAAO,CAAC,CAAC;QAC7C,KAAK,UAAU,CAAC,EAAE,CAAC;QACnB,OAAO,CAAC,CAAC;YACL,MAAM,EAAE,MAAM,EAAE,GAAG,IAA0B,CAAC;YAC9C,MAAM,MAAM,GAAG,IAAI,eAAe,EAAE,CAAC;YACrC,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;YACzC,OAAO,WAAW,MAAM,4BAA4B,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;SACxE;KACJ;AACL,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { generateEndpoint } from './generate-endpoint';
|
|
2
|
+
export const generateParameters = (version, args, init) => {
|
|
3
|
+
const path = generateEndpoint(version, args);
|
|
4
|
+
return [path, init];
|
|
5
|
+
};
|
|
6
|
+
export default generateParameters;
|
|
7
|
+
//# sourceMappingURL=generate-parameters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-parameters.js","sourceRoot":"","sources":["../../../../../src/notification/settings/get/generate-parameters.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAIvD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAK9B,OAAiB,EACjB,IAA+C,EAC/C,IAA0C,EACN,EAAE;IACtC,MAAM,IAAI,GAAG,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAC7C,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AACxB,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { ApiVersion } from '@equinor/fusion-framework-module-services/notification';
|
|
2
|
+
export { generateEndpoint } from './generate-endpoint';
|
|
3
|
+
export { generateParameters } from './generate-parameters';
|
|
4
|
+
export * from './types';
|
|
5
|
+
export { getUserNotificationSettings, default } from './client';
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/notification/settings/get/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wDAAwD,CAAC;AAEpF,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D,cAAc,SAAS,CAAC;AAExB,OAAO,EAAE,2BAA2B,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/notification/settings/get/types.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { generateParameters } from './generate-parameters';
|
|
2
|
+
export const updateUserNotificationSettings = (client, version, method = 'json') => (args, init) => client[method](...generateParameters(version, args, init));
|
|
3
|
+
export default updateUserNotificationSettings;
|
|
4
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../../src/notification/settings/put/client.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAc3D,MAAM,CAAC,MAAM,8BAA8B,GACvC,CAKI,MAAe,EACf,OAAiB,EACjB,SAAkB,MAAiB,EACrC,EAAE,CACJ,CACI,IAA+C,EAC/C,IAAoC,EACmB,EAAE,CACzD,MAAM,CAAC,MAAM,CAAC,CACV,GAAG,kBAAkB,CAAuB,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,CACR,CAAC;AAErE,eAAe,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { UnsupportedApiVersion } from '@equinor/fusion-framework-module-services/errors';
|
|
2
|
+
import { ApiVersion } from '@equinor/fusion-framework-module-services/notification';
|
|
3
|
+
export const generateEndpoint = (version, args) => {
|
|
4
|
+
var _a;
|
|
5
|
+
const apiVersion = (_a = ApiVersion[version]) !== null && _a !== void 0 ? _a : version;
|
|
6
|
+
switch (apiVersion) {
|
|
7
|
+
case ApiVersion.v2:
|
|
8
|
+
throw new UnsupportedApiVersion(version);
|
|
9
|
+
case ApiVersion.v1:
|
|
10
|
+
default: {
|
|
11
|
+
const { userId } = args;
|
|
12
|
+
const params = new URLSearchParams();
|
|
13
|
+
params.append('api-version', apiVersion);
|
|
14
|
+
return `/person/${userId}/notifications/settings/?${String(params)}`;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=generate-endpoint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-endpoint.js","sourceRoot":"","sources":["../../../../../src/notification/settings/put/generate-endpoint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,kDAAkD,CAAC;AACzF,OAAO,EAAE,UAAU,EAAE,MAAM,wDAAwD,CAAC;AAOpF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAC5B,OAAiB,EACjB,IAA+C,EACjD,EAAE;;IACA,MAAM,UAAU,GAAG,MAAA,UAAU,CAAC,OAAkC,CAAC,mCAAI,OAAO,CAAC;IAC7E,QAAQ,UAAU,EAAE;QAChB,KAAK,UAAU,CAAC,EAAE;YACd,MAAM,IAAI,qBAAqB,CAAC,OAAO,CAAC,CAAC;QAC7C,KAAK,UAAU,CAAC,EAAE,CAAC;QACnB,OAAO,CAAC,CAAC;YACL,MAAM,EAAE,MAAM,EAAE,GAAG,IAA0B,CAAC;YAC9C,MAAM,MAAM,GAAG,IAAI,eAAe,EAAE,CAAC;YACrC,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;YACzC,OAAO,WAAW,MAAM,4BAA4B,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;SACxE;KACJ;AACL,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { generateEndpoint } from './generate-endpoint';
|
|
2
|
+
export const generateParameters = (version, args, init) => {
|
|
3
|
+
const path = generateEndpoint(version, args);
|
|
4
|
+
const headers = new Headers();
|
|
5
|
+
headers.append('content-type', 'application/json');
|
|
6
|
+
const requestParams = Object.assign({}, { method: 'put', body: JSON.stringify(args), headers: headers }, init);
|
|
7
|
+
return [path, requestParams];
|
|
8
|
+
};
|
|
9
|
+
export default generateParameters;
|
|
10
|
+
//# sourceMappingURL=generate-parameters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-parameters.js","sourceRoot":"","sources":["../../../../../src/notification/settings/put/generate-parameters.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAIvD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAK9B,OAAiB,EACjB,IAA+C,EAC/C,IAA0C,EACN,EAAE;IACtC,MAAM,IAAI,GAAG,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAI7C,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;IAC9B,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,kBAAkB,CAAC,CAAC;IAEnD,MAAM,aAAa,GAAwC,MAAM,CAAC,MAAM,CACpE,EAAE,EACF,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,EAC/D,IAAI,CACP,CAAC;IAEF,OAAO,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;AACjC,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { ApiVersion } from '@equinor/fusion-framework-module-services/notification';
|
|
2
|
+
export { generateEndpoint } from './generate-endpoint';
|
|
3
|
+
export { generateParameters } from './generate-parameters';
|
|
4
|
+
export * from './types';
|
|
5
|
+
export { updateUserNotificationSettings, default } from './client';
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/notification/settings/put/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wDAAwD,CAAC;AAEpF,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D,cAAc,SAAS,CAAC;AAExB,OAAO,EAAE,8BAA8B,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/notification/settings/put/types.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
|