@stefaninigo/notifications-api 1.0.1
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/README.md +29 -0
- package/dist/generated/health/health.d.ts +7 -0
- package/dist/generated/health/health.js +13 -0
- package/dist/generated/health/health.js.map +1 -0
- package/dist/generated/index.d.ts +4 -0
- package/dist/generated/index.js +21 -0
- package/dist/generated/index.js.map +1 -0
- package/dist/generated/notifications/notifications.d.ts +20 -0
- package/dist/generated/notifications/notifications.js +42 -0
- package/dist/generated/notifications/notifications.js.map +1 -0
- package/dist/generated/send/send.d.ts +10 -0
- package/dist/generated/send/send.js +21 -0
- package/dist/generated/send/send.js.map +1 -0
- package/dist/generated/stefaniniGoServiceAPI.schemas.d.ts +90 -0
- package/dist/generated/stefaniniGoServiceAPI.schemas.js +28 -0
- package/dist/generated/stefaniniGoServiceAPI.schemas.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/dist/utils/mutator.d.ts +3 -0
- package/dist/utils/mutator.js +22 -0
- package/dist/utils/mutator.js.map +1 -0
- package/package.json +39 -0
package/README.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# @stefaninigo/notifications-api
|
|
2
|
+
|
|
3
|
+
Generated API SDK for the StefaniniGo Notifications service.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
`ash
|
|
8
|
+
npm install @stefaninigo/notifications-api
|
|
9
|
+
`
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
` s
|
|
14
|
+
import * as ServiceApi from '@stefaninigo/notifications-api';
|
|
15
|
+
|
|
16
|
+
// Example: call any generated function after SDK generation.
|
|
17
|
+
console.log(Object.keys(ServiceApi));
|
|
18
|
+
`
|
|
19
|
+
|
|
20
|
+
## Development Workflow
|
|
21
|
+
|
|
22
|
+
From repository root:
|
|
23
|
+
|
|
24
|
+
`ash
|
|
25
|
+
npm run client:generate
|
|
26
|
+
npm run client:build
|
|
27
|
+
`
|
|
28
|
+
|
|
29
|
+
client:generate creates the SDK from scripts/api-gateway/generated/openapi.json.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { customInstance } from '../../utils/mutator';
|
|
2
|
+
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
|
3
|
+
export declare const getHealth: () => {
|
|
4
|
+
appControllerGetHealth: (options?: SecondParameter<typeof customInstance<void>>) => Promise<void>;
|
|
5
|
+
};
|
|
6
|
+
export type AppControllerGetHealthResult = NonNullable<Awaited<ReturnType<ReturnType<typeof getHealth>['appControllerGetHealth']>>>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getHealth = void 0;
|
|
4
|
+
const mutator_1 = require("../../utils/mutator");
|
|
5
|
+
const getHealth = () => {
|
|
6
|
+
const appControllerGetHealth = (options) => {
|
|
7
|
+
return (0, mutator_1.customInstance)({ url: `/health`, method: 'GET'
|
|
8
|
+
}, options);
|
|
9
|
+
};
|
|
10
|
+
return { appControllerGetHealth };
|
|
11
|
+
};
|
|
12
|
+
exports.getHealth = getHealth;
|
|
13
|
+
//# sourceMappingURL=health.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"health.js","sourceRoot":"","sources":["../../../src/generated/health/health.ts"],"names":[],"mappings":";;;AAOA,iDAAqD;AAM5C,MAAM,SAAS,GAAG,GAAG,EAAE;IAIhC,MAAM,sBAAsB,GAAG,CAE9B,OAAsD,EAAG,EAAE;QACtD,OAAO,IAAA,wBAAc,EACrB,EAAC,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK;SAC/B,EACC,OAAO,CAAC,CAAC;IACX,CAAC,CAAA;IACH,OAAO,EAAC,sBAAsB,EAAC,CAAA;AAAA,CAAC,CAAC;AAZpB,QAAA,SAAS,aAYW"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./health/health"), exports);
|
|
18
|
+
__exportStar(require("./notifications/notifications"), exports);
|
|
19
|
+
__exportStar(require("./send/send"), exports);
|
|
20
|
+
__exportStar(require("./stefaniniGoServiceAPI.schemas"), exports);
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/generated/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,gEAA8C;AAC9C,8CAA4B;AAC5B,kEAAgD"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { CreateNotificationConfigDto, NotificationsControllerFindAllParams, UpdateNotificationConfigDto } from '../stefaniniGoServiceAPI.schemas';
|
|
2
|
+
import { customInstance } from '../../utils/mutator';
|
|
3
|
+
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
|
4
|
+
export declare const getNotifications: () => {
|
|
5
|
+
notificationsControllerCreate: (createNotificationConfigDto: CreateNotificationConfigDto, options?: SecondParameter<typeof customInstance<void>>) => Promise<void>;
|
|
6
|
+
notificationsControllerFindAll: (params?: NotificationsControllerFindAllParams, options?: SecondParameter<typeof customInstance<void>>) => Promise<void>;
|
|
7
|
+
notificationsControllerFindOne: (id: string, options?: SecondParameter<typeof customInstance<void>>) => Promise<void>;
|
|
8
|
+
notificationsControllerUpdate: (id: string, updateNotificationConfigDto: UpdateNotificationConfigDto, options?: SecondParameter<typeof customInstance<void>>) => Promise<void>;
|
|
9
|
+
notificationsControllerRemove: (id: string, options?: SecondParameter<typeof customInstance<void>>) => Promise<void>;
|
|
10
|
+
notificationsControllerFindByClient: (clientId: string, options?: SecondParameter<typeof customInstance<void>>) => Promise<void>;
|
|
11
|
+
notificationsControllerFindByPurpose: (purpose: string, options?: SecondParameter<typeof customInstance<void>>) => Promise<void>;
|
|
12
|
+
};
|
|
13
|
+
export type NotificationsControllerCreateResult = NonNullable<Awaited<ReturnType<ReturnType<typeof getNotifications>['notificationsControllerCreate']>>>;
|
|
14
|
+
export type NotificationsControllerFindAllResult = NonNullable<Awaited<ReturnType<ReturnType<typeof getNotifications>['notificationsControllerFindAll']>>>;
|
|
15
|
+
export type NotificationsControllerFindOneResult = NonNullable<Awaited<ReturnType<ReturnType<typeof getNotifications>['notificationsControllerFindOne']>>>;
|
|
16
|
+
export type NotificationsControllerUpdateResult = NonNullable<Awaited<ReturnType<ReturnType<typeof getNotifications>['notificationsControllerUpdate']>>>;
|
|
17
|
+
export type NotificationsControllerRemoveResult = NonNullable<Awaited<ReturnType<ReturnType<typeof getNotifications>['notificationsControllerRemove']>>>;
|
|
18
|
+
export type NotificationsControllerFindByClientResult = NonNullable<Awaited<ReturnType<ReturnType<typeof getNotifications>['notificationsControllerFindByClient']>>>;
|
|
19
|
+
export type NotificationsControllerFindByPurposeResult = NonNullable<Awaited<ReturnType<ReturnType<typeof getNotifications>['notificationsControllerFindByPurpose']>>>;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getNotifications = void 0;
|
|
4
|
+
const mutator_1 = require("../../utils/mutator");
|
|
5
|
+
const getNotifications = () => {
|
|
6
|
+
const notificationsControllerCreate = (createNotificationConfigDto, options) => {
|
|
7
|
+
return (0, mutator_1.customInstance)({ url: `/`, method: 'POST',
|
|
8
|
+
headers: { 'Content-Type': 'application/json', },
|
|
9
|
+
data: createNotificationConfigDto
|
|
10
|
+
}, options);
|
|
11
|
+
};
|
|
12
|
+
const notificationsControllerFindAll = (params, options) => {
|
|
13
|
+
return (0, mutator_1.customInstance)({ url: `/`, method: 'GET',
|
|
14
|
+
params
|
|
15
|
+
}, options);
|
|
16
|
+
};
|
|
17
|
+
const notificationsControllerFindOne = (id, options) => {
|
|
18
|
+
return (0, mutator_1.customInstance)({ url: `/${id}`, method: 'GET'
|
|
19
|
+
}, options);
|
|
20
|
+
};
|
|
21
|
+
const notificationsControllerUpdate = (id, updateNotificationConfigDto, options) => {
|
|
22
|
+
return (0, mutator_1.customInstance)({ url: `/${id}`, method: 'PATCH',
|
|
23
|
+
headers: { 'Content-Type': 'application/json', },
|
|
24
|
+
data: updateNotificationConfigDto
|
|
25
|
+
}, options);
|
|
26
|
+
};
|
|
27
|
+
const notificationsControllerRemove = (id, options) => {
|
|
28
|
+
return (0, mutator_1.customInstance)({ url: `/${id}`, method: 'DELETE'
|
|
29
|
+
}, options);
|
|
30
|
+
};
|
|
31
|
+
const notificationsControllerFindByClient = (clientId, options) => {
|
|
32
|
+
return (0, mutator_1.customInstance)({ url: `/client/${clientId}`, method: 'GET'
|
|
33
|
+
}, options);
|
|
34
|
+
};
|
|
35
|
+
const notificationsControllerFindByPurpose = (purpose, options) => {
|
|
36
|
+
return (0, mutator_1.customInstance)({ url: `/purpose/${purpose}`, method: 'GET'
|
|
37
|
+
}, options);
|
|
38
|
+
};
|
|
39
|
+
return { notificationsControllerCreate, notificationsControllerFindAll, notificationsControllerFindOne, notificationsControllerUpdate, notificationsControllerRemove, notificationsControllerFindByClient, notificationsControllerFindByPurpose };
|
|
40
|
+
};
|
|
41
|
+
exports.getNotifications = getNotifications;
|
|
42
|
+
//# sourceMappingURL=notifications.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notifications.js","sourceRoot":"","sources":["../../../src/generated/notifications/notifications.ts"],"names":[],"mappings":";;;AAaA,iDAAqD;AAM5C,MAAM,gBAAgB,GAAG,GAAG,EAAE;IAIvC,MAAM,6BAA6B,GAAG,CAClC,2BAAwD,EAC3D,OAAsD,EAAG,EAAE;QACtD,OAAO,IAAA,wBAAc,EACrB,EAAC,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM;YACzB,OAAO,EAAE,EAAC,cAAc,EAAE,kBAAkB,GAAG;YAC/C,IAAI,EAAE,2BAA2B;SAClC,EACC,OAAO,CAAC,CAAC;IACX,CAAC,CAAA;IAIL,MAAM,8BAA8B,GAAG,CACnC,MAA6C,EAChD,OAAsD,EAAG,EAAE;QACtD,OAAO,IAAA,wBAAc,EACrB,EAAC,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK;YACtB,MAAM;SACT,EACC,OAAO,CAAC,CAAC;IACX,CAAC,CAAA;IAIL,MAAM,8BAA8B,GAAG,CACnC,EAAU,EACb,OAAsD,EAAG,EAAE;QACtD,OAAO,IAAA,wBAAc,EACrB,EAAC,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK;SAC9B,EACC,OAAO,CAAC,CAAC;IACX,CAAC,CAAA;IAIL,MAAM,6BAA6B,GAAG,CAClC,EAAU,EACV,2BAAwD,EAC3D,OAAsD,EAAG,EAAE;QACtD,OAAO,IAAA,wBAAc,EACrB,EAAC,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO;YAC/B,OAAO,EAAE,EAAC,cAAc,EAAE,kBAAkB,GAAG;YAC/C,IAAI,EAAE,2BAA2B;SAClC,EACC,OAAO,CAAC,CAAC;IACX,CAAC,CAAA;IAIL,MAAM,6BAA6B,GAAG,CAClC,EAAU,EACb,OAAsD,EAAG,EAAE;QACtD,OAAO,IAAA,wBAAc,EACrB,EAAC,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,QAAQ;SACjC,EACC,OAAO,CAAC,CAAC;IACX,CAAC,CAAA;IAIL,MAAM,mCAAmC,GAAG,CACxC,QAAgB,EACnB,OAAsD,EAAG,EAAE;QACtD,OAAO,IAAA,wBAAc,EACrB,EAAC,GAAG,EAAE,WAAW,QAAQ,EAAE,EAAE,MAAM,EAAE,KAAK;SAC3C,EACC,OAAO,CAAC,CAAC;IACX,CAAC,CAAA;IAIL,MAAM,oCAAoC,GAAG,CACzC,OAAe,EAClB,OAAsD,EAAG,EAAE;QACtD,OAAO,IAAA,wBAAc,EACrB,EAAC,GAAG,EAAE,YAAY,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK;SAC3C,EACC,OAAO,CAAC,CAAC;IACX,CAAC,CAAA;IACH,OAAO,EAAC,6BAA6B,EAAC,8BAA8B,EAAC,8BAA8B,EAAC,6BAA6B,EAAC,6BAA6B,EAAC,mCAAmC,EAAC,oCAAoC,EAAC,CAAA;AAAA,CAAC,CAAC;AApF9N,QAAA,gBAAgB,oBAoF8M"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { SendByPurposeDto, SendNotificationDto } from '../stefaniniGoServiceAPI.schemas';
|
|
2
|
+
import { customInstance } from '../../utils/mutator';
|
|
3
|
+
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
|
4
|
+
export declare const getSend: () => {
|
|
5
|
+
notificationsControllerSend: (sendNotificationDto: SendNotificationDto, options?: SecondParameter<typeof customInstance<void>>) => Promise<void>;
|
|
6
|
+
notificationsControllerSendByPurpose: (purpose: string, sendByPurposeDto: SendByPurposeDto, options?: SecondParameter<typeof customInstance<void>>) => Promise<void>;
|
|
7
|
+
};
|
|
8
|
+
export type NotificationsControllerSendResult = NonNullable<Awaited<ReturnType<ReturnType<typeof getSend>['notificationsControllerSend']>>>;
|
|
9
|
+
export type NotificationsControllerSendByPurposeResult = NonNullable<Awaited<ReturnType<ReturnType<typeof getSend>['notificationsControllerSendByPurpose']>>>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getSend = void 0;
|
|
4
|
+
const mutator_1 = require("../../utils/mutator");
|
|
5
|
+
const getSend = () => {
|
|
6
|
+
const notificationsControllerSend = (sendNotificationDto, options) => {
|
|
7
|
+
return (0, mutator_1.customInstance)({ url: `/send`, method: 'POST',
|
|
8
|
+
headers: { 'Content-Type': 'application/json', },
|
|
9
|
+
data: sendNotificationDto
|
|
10
|
+
}, options);
|
|
11
|
+
};
|
|
12
|
+
const notificationsControllerSendByPurpose = (purpose, sendByPurposeDto, options) => {
|
|
13
|
+
return (0, mutator_1.customInstance)({ url: `/send/${purpose}`, method: 'POST',
|
|
14
|
+
headers: { 'Content-Type': 'application/json', },
|
|
15
|
+
data: sendByPurposeDto
|
|
16
|
+
}, options);
|
|
17
|
+
};
|
|
18
|
+
return { notificationsControllerSend, notificationsControllerSendByPurpose };
|
|
19
|
+
};
|
|
20
|
+
exports.getSend = getSend;
|
|
21
|
+
//# sourceMappingURL=send.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send.js","sourceRoot":"","sources":["../../../src/generated/send/send.ts"],"names":[],"mappings":";;;AAYA,iDAAqD;AAM5C,MAAM,OAAO,GAAG,GAAG,EAAE;IAI9B,MAAM,2BAA2B,GAAG,CAChC,mBAAwC,EAC3C,OAAsD,EAAG,EAAE;QACtD,OAAO,IAAA,wBAAc,EACrB,EAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM;YAC7B,OAAO,EAAE,EAAC,cAAc,EAAE,kBAAkB,GAAG;YAC/C,IAAI,EAAE,mBAAmB;SAC1B,EACC,OAAO,CAAC,CAAC;IACX,CAAC,CAAA;IAIL,MAAM,oCAAoC,GAAG,CACzC,OAAe,EACf,gBAAkC,EACrC,OAAsD,EAAG,EAAE;QACtD,OAAO,IAAA,wBAAc,EACrB,EAAC,GAAG,EAAE,SAAS,OAAO,EAAE,EAAE,MAAM,EAAE,MAAM;YACxC,OAAO,EAAE,EAAC,cAAc,EAAE,kBAAkB,GAAG;YAC/C,IAAI,EAAE,gBAAgB;SACvB,EACC,OAAO,CAAC,CAAC;IACX,CAAC,CAAA;IACH,OAAO,EAAC,2BAA2B,EAAC,oCAAoC,EAAC,CAAA;AAAA,CAAC,CAAC;AA5B9D,QAAA,OAAO,WA4BuD"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
export type TemplateConfigDtoMapping = {
|
|
2
|
+
[key: string]: unknown;
|
|
3
|
+
};
|
|
4
|
+
export interface TemplateConfigDto {
|
|
5
|
+
subject: string;
|
|
6
|
+
body: string;
|
|
7
|
+
mapping?: TemplateConfigDtoMapping;
|
|
8
|
+
}
|
|
9
|
+
export interface NotificationSettingsDto {
|
|
10
|
+
sendToTechnician: boolean;
|
|
11
|
+
sendToDispatcher: boolean;
|
|
12
|
+
sendToLocation: boolean;
|
|
13
|
+
sendToContact: boolean;
|
|
14
|
+
additionalEmails?: string[];
|
|
15
|
+
template: TemplateConfigDto;
|
|
16
|
+
}
|
|
17
|
+
export type CreateNotificationConfigDtoType = typeof CreateNotificationConfigDtoType[keyof typeof CreateNotificationConfigDtoType];
|
|
18
|
+
export declare const CreateNotificationConfigDtoType: {
|
|
19
|
+
readonly email: "email";
|
|
20
|
+
readonly push: "push";
|
|
21
|
+
readonly sms: "sms";
|
|
22
|
+
readonly webhook: "webhook";
|
|
23
|
+
};
|
|
24
|
+
export type CreateNotificationConfigDtoPurpose = typeof CreateNotificationConfigDtoPurpose[keyof typeof CreateNotificationConfigDtoPurpose];
|
|
25
|
+
export declare const CreateNotificationConfigDtoPurpose: {
|
|
26
|
+
readonly ods: "ods";
|
|
27
|
+
readonly ticket_update: "ticket_update";
|
|
28
|
+
readonly alert: "alert";
|
|
29
|
+
readonly reminder: "reminder";
|
|
30
|
+
};
|
|
31
|
+
export interface CreateNotificationConfigDto {
|
|
32
|
+
clientId: string;
|
|
33
|
+
type: CreateNotificationConfigDtoType;
|
|
34
|
+
purpose: CreateNotificationConfigDtoPurpose;
|
|
35
|
+
description: string;
|
|
36
|
+
config: NotificationSettingsDto;
|
|
37
|
+
enabled?: boolean;
|
|
38
|
+
}
|
|
39
|
+
export type UpdateNotificationConfigDtoType = typeof UpdateNotificationConfigDtoType[keyof typeof UpdateNotificationConfigDtoType];
|
|
40
|
+
export declare const UpdateNotificationConfigDtoType: {
|
|
41
|
+
readonly email: "email";
|
|
42
|
+
readonly push: "push";
|
|
43
|
+
readonly sms: "sms";
|
|
44
|
+
readonly webhook: "webhook";
|
|
45
|
+
};
|
|
46
|
+
export type UpdateNotificationConfigDtoPurpose = typeof UpdateNotificationConfigDtoPurpose[keyof typeof UpdateNotificationConfigDtoPurpose];
|
|
47
|
+
export declare const UpdateNotificationConfigDtoPurpose: {
|
|
48
|
+
readonly ods: "ods";
|
|
49
|
+
readonly ticket_update: "ticket_update";
|
|
50
|
+
readonly alert: "alert";
|
|
51
|
+
readonly reminder: "reminder";
|
|
52
|
+
};
|
|
53
|
+
export interface UpdateNotificationConfigDto {
|
|
54
|
+
clientId?: string;
|
|
55
|
+
type?: UpdateNotificationConfigDtoType;
|
|
56
|
+
purpose?: UpdateNotificationConfigDtoPurpose;
|
|
57
|
+
description?: string;
|
|
58
|
+
config?: NotificationSettingsDto;
|
|
59
|
+
enabled?: boolean;
|
|
60
|
+
}
|
|
61
|
+
export interface AttachmentDto {
|
|
62
|
+
fileName: string;
|
|
63
|
+
base64Content?: string;
|
|
64
|
+
}
|
|
65
|
+
export type SendNotificationDtoData = {
|
|
66
|
+
[key: string]: unknown;
|
|
67
|
+
};
|
|
68
|
+
export interface SendNotificationDto {
|
|
69
|
+
notificationId?: string;
|
|
70
|
+
purpose?: string;
|
|
71
|
+
clientId: string;
|
|
72
|
+
ticketId?: string;
|
|
73
|
+
data: SendNotificationDtoData;
|
|
74
|
+
attachments?: AttachmentDto[];
|
|
75
|
+
overrideRecipients?: string[];
|
|
76
|
+
}
|
|
77
|
+
export type SendByPurposeDtoData = {
|
|
78
|
+
[key: string]: unknown;
|
|
79
|
+
};
|
|
80
|
+
export interface SendByPurposeDto {
|
|
81
|
+
clientId: string;
|
|
82
|
+
ticketId?: string;
|
|
83
|
+
data: SendByPurposeDtoData;
|
|
84
|
+
attachments?: AttachmentDto[];
|
|
85
|
+
}
|
|
86
|
+
export type NotificationsControllerFindAllParams = {
|
|
87
|
+
page?: number;
|
|
88
|
+
limit?: number;
|
|
89
|
+
filters?: string;
|
|
90
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateNotificationConfigDtoPurpose = exports.UpdateNotificationConfigDtoType = exports.CreateNotificationConfigDtoPurpose = exports.CreateNotificationConfigDtoType = void 0;
|
|
4
|
+
exports.CreateNotificationConfigDtoType = {
|
|
5
|
+
email: 'email',
|
|
6
|
+
push: 'push',
|
|
7
|
+
sms: 'sms',
|
|
8
|
+
webhook: 'webhook',
|
|
9
|
+
};
|
|
10
|
+
exports.CreateNotificationConfigDtoPurpose = {
|
|
11
|
+
ods: 'ods',
|
|
12
|
+
ticket_update: 'ticket_update',
|
|
13
|
+
alert: 'alert',
|
|
14
|
+
reminder: 'reminder',
|
|
15
|
+
};
|
|
16
|
+
exports.UpdateNotificationConfigDtoType = {
|
|
17
|
+
email: 'email',
|
|
18
|
+
push: 'push',
|
|
19
|
+
sms: 'sms',
|
|
20
|
+
webhook: 'webhook',
|
|
21
|
+
};
|
|
22
|
+
exports.UpdateNotificationConfigDtoPurpose = {
|
|
23
|
+
ods: 'ods',
|
|
24
|
+
ticket_update: 'ticket_update',
|
|
25
|
+
alert: 'alert',
|
|
26
|
+
reminder: 'reminder',
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=stefaniniGoServiceAPI.schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stefaniniGoServiceAPI.schemas.js","sourceRoot":"","sources":["../../src/generated/stefaniniGoServiceAPI.schemas.ts"],"names":[],"mappings":";;;AA2Ca,QAAA,+BAA+B,GAAG;IAC7C,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,KAAK;IACV,OAAO,EAAE,SAAS;CACV,CAAC;AASE,QAAA,kCAAkC,GAAG;IAChD,GAAG,EAAE,KAAK;IACV,aAAa,EAAE,eAAe;IAC9B,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,UAAU;CACZ,CAAC;AAwBE,QAAA,+BAA+B,GAAG;IAC7C,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,KAAK;IACV,OAAO,EAAE,SAAS;CACV,CAAC;AASE,QAAA,kCAAkC,GAAG;IAChD,GAAG,EAAE,KAAK;IACV,aAAa,EAAE,eAAe;IAC9B,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,UAAU;CACZ,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './generated';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./generated"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.customInstance = void 0;
|
|
7
|
+
const axios_1 = __importDefault(require("axios"));
|
|
8
|
+
const customInstance = (config, options) => {
|
|
9
|
+
const source = axios_1.default.CancelToken.source();
|
|
10
|
+
const promise = (0, axios_1.default)({
|
|
11
|
+
...config,
|
|
12
|
+
...options,
|
|
13
|
+
cancelToken: source.token,
|
|
14
|
+
}).then(({ data }) => data);
|
|
15
|
+
promise.cancel = () => {
|
|
16
|
+
source.cancel('Request was cancelled');
|
|
17
|
+
};
|
|
18
|
+
return promise;
|
|
19
|
+
};
|
|
20
|
+
exports.customInstance = customInstance;
|
|
21
|
+
exports.default = exports.customInstance;
|
|
22
|
+
//# sourceMappingURL=mutator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mutator.js","sourceRoot":"","sources":["../../src/utils/mutator.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAkD;AAE3C,MAAM,cAAc,GAAG,CAC5B,MAA0B,EAC1B,OAA4B,EAChB,EAAE;IACd,MAAM,MAAM,GAAG,eAAK,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC;IAC1C,MAAM,OAAO,GAAG,IAAA,eAAK,EAAC;QACpB,GAAG,MAAM;QACT,GAAG,OAAO;QACV,WAAW,EAAE,MAAM,CAAC,KAAK;KAC1B,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC;IAK5B,OAAO,CAAC,MAAM,GAAG,GAAG,EAAE;QACpB,MAAM,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC;IACzC,CAAC,CAAC;IAEF,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAnBW,QAAA,cAAc,kBAmBzB;AAEF,kBAAe,sBAAc,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@stefaninigo/notifications-api",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "Generated API SDK for StefaniniGo Notifications service",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist",
|
|
9
|
+
"README.md"
|
|
10
|
+
],
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "tsc",
|
|
13
|
+
"prepublishOnly": "npm run build"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"stefanini-go",
|
|
17
|
+
"notifications",
|
|
18
|
+
"openapi",
|
|
19
|
+
"sdk",
|
|
20
|
+
"axios"
|
|
21
|
+
],
|
|
22
|
+
"author": "StefaniniGo Team",
|
|
23
|
+
"license": "UNLICENSED",
|
|
24
|
+
"publishConfig": {
|
|
25
|
+
"access": "public"
|
|
26
|
+
},
|
|
27
|
+
"repository": {
|
|
28
|
+
"type": "git",
|
|
29
|
+
"url": "git+https://github.com/stefanini-go/stefanini-go-notifications.git",
|
|
30
|
+
"directory": "packages/notifications-api"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"axios": "^1.7.9"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@types/node": "^24.7.2",
|
|
37
|
+
"typescript": "^5.9.3"
|
|
38
|
+
}
|
|
39
|
+
}
|