@managemint-solutions/entities 1.13.0 → 1.15.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/dist/notifications/enum/index.d.ts +1 -0
- package/dist/notifications/enum/index.js +1 -0
- package/dist/support/dto/index.d.ts +29 -0
- package/dist/support/dto/index.js +2 -0
- package/dist/support/enum/index.d.ts +10 -0
- package/dist/support/enum/index.js +15 -0
- package/dist/support/index.d.ts +8 -0
- package/dist/support/index.js +24 -0
- package/package.json +1 -1
|
@@ -12,6 +12,7 @@ export declare enum NotificationType {
|
|
|
12
12
|
TASK_ASSIGNED = "task_assigned",
|
|
13
13
|
PROJECT_MANAGER_ASSIGNED = "project_manager_assigned",
|
|
14
14
|
PAYMENT_FAILED = "payment_failed",
|
|
15
|
+
INVOICE_PAID = "invoice_paid",
|
|
15
16
|
SIGNUP_CONFIRMATION = "signup_confirmation",
|
|
16
17
|
PASSWORD_RECOVERY = "password_recovery"
|
|
17
18
|
}
|
|
@@ -20,6 +20,7 @@ var NotificationType;
|
|
|
20
20
|
NotificationType["TASK_ASSIGNED"] = "task_assigned";
|
|
21
21
|
NotificationType["PROJECT_MANAGER_ASSIGNED"] = "project_manager_assigned";
|
|
22
22
|
NotificationType["PAYMENT_FAILED"] = "payment_failed";
|
|
23
|
+
NotificationType["INVOICE_PAID"] = "invoice_paid";
|
|
23
24
|
NotificationType["SIGNUP_CONFIRMATION"] = "signup_confirmation";
|
|
24
25
|
NotificationType["PASSWORD_RECOVERY"] = "password_recovery";
|
|
25
26
|
})(NotificationType || (exports.NotificationType = NotificationType = {}));
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { SupportTopic } from '../enum';
|
|
2
|
+
/**
|
|
3
|
+
* The body of `POST /support`. Every field the endpoint accepts is here: the api's global
|
|
4
|
+
* ValidationPipe runs with `forbidNonWhitelisted`, so anything not on this contract is a 400 —
|
|
5
|
+
* the honeypot included, which is why it is a declared field rather than a stray one.
|
|
6
|
+
*
|
|
7
|
+
* Nothing is stored. The api turns one of these into two emails — the message to the support
|
|
8
|
+
* inbox, and an acknowledgement back to `email` — and that is the whole record of it.
|
|
9
|
+
*/
|
|
10
|
+
export type CreateSupportRequestDto = {
|
|
11
|
+
topic: SupportTopic;
|
|
12
|
+
/** Whatever the sender called themselves. */
|
|
13
|
+
name: string;
|
|
14
|
+
/** Where the acknowledgement goes, and the Reply-To on the message to the inbox. */
|
|
15
|
+
email: string;
|
|
16
|
+
/** Optional on the form. Empty is normalised to null. */
|
|
17
|
+
company?: string | null;
|
|
18
|
+
message: string;
|
|
19
|
+
/**
|
|
20
|
+
* Honeypot. The website renders it off-screen and always submits it empty; a bot that fills
|
|
21
|
+
* every input it can see gets a 201 and no email. Optional so an older client that does not
|
|
22
|
+
* send it at all still works.
|
|
23
|
+
*/
|
|
24
|
+
website_url?: string;
|
|
25
|
+
};
|
|
26
|
+
/** All a sender gets back: confirmation that the message was accepted. */
|
|
27
|
+
export type CreateSupportRequestResponse = {
|
|
28
|
+
message: string;
|
|
29
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a message through the website's contact page is about. The three values are the three
|
|
3
|
+
* chips on the form, and the api turns each into the subject line and the topic wording of
|
|
4
|
+
* the emails it sends.
|
|
5
|
+
*/
|
|
6
|
+
export declare enum SupportTopic {
|
|
7
|
+
GETTING_STARTED = "getting-started",
|
|
8
|
+
SUPPORT = "support",
|
|
9
|
+
BUILD = "build"
|
|
10
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SupportTopic = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* What a message through the website's contact page is about. The three values are the three
|
|
6
|
+
* chips on the form, and the api turns each into the subject line and the topic wording of
|
|
7
|
+
* the emails it sends.
|
|
8
|
+
*/
|
|
9
|
+
var SupportTopic;
|
|
10
|
+
(function (SupportTopic) {
|
|
11
|
+
SupportTopic["GETTING_STARTED"] = "getting-started";
|
|
12
|
+
SupportTopic["SUPPORT"] = "support";
|
|
13
|
+
SupportTopic["BUILD"] = "build";
|
|
14
|
+
})(SupportTopic || (exports.SupportTopic = SupportTopic = {}));
|
|
15
|
+
;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './enum';
|
|
2
|
+
/**
|
|
3
|
+
* The marketing website's contact page, `POST /support`.
|
|
4
|
+
*
|
|
5
|
+
* There is no entity here on purpose: a message through the contact page is not stored
|
|
6
|
+
* anywhere. The api sends it to the support inbox and acknowledges it to the sender, and the
|
|
7
|
+
* two emails are the only record. The contract lives in `./dto`, the topics in `./enum`.
|
|
8
|
+
*/
|
|
@@ -0,0 +1,24 @@
|
|
|
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("./enum"), exports);
|
|
18
|
+
/**
|
|
19
|
+
* The marketing website's contact page, `POST /support`.
|
|
20
|
+
*
|
|
21
|
+
* There is no entity here on purpose: a message through the contact page is not stored
|
|
22
|
+
* anywhere. The api sends it to the support inbox and acknowledges it to the sender, and the
|
|
23
|
+
* two emails are the only record. The contract lives in `./dto`, the topics in `./enum`.
|
|
24
|
+
*/
|
package/package.json
CHANGED