@managemint-solutions/entities 1.12.0 → 1.13.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.
@@ -0,0 +1,25 @@
1
+ /**
2
+ * The body of `POST /feature-requests`. Every field the endpoint accepts is here: the api's
3
+ * global ValidationPipe runs with `forbidNonWhitelisted`, so anything not on this contract is
4
+ * a 400 — the honeypot included, which is why it is a declared field rather than a stray one.
5
+ *
6
+ * `source` is absent on purpose: the api sets it from `FeatureRequestSource`, never from the
7
+ * request.
8
+ */
9
+ export type CreateFeatureRequestDto = {
10
+ name: string;
11
+ /** Markdown. Empty is normalised to null before it is stored. */
12
+ specification?: string | null;
13
+ requester_name: string;
14
+ requester_email: string;
15
+ /**
16
+ * Honeypot. The website renders it off-screen and always submits it empty; a bot that fills
17
+ * every input it can see gets a 201 and no stored row. Optional so an older client that does
18
+ * not send it at all still works.
19
+ */
20
+ website_url?: string;
21
+ };
22
+ /** All a submitter gets back: the id of the row, or a throwaway one when the honeypot tripped. */
23
+ export type CreateFeatureRequestResponse = {
24
+ mms_id: string;
25
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Where a feature request came in from. Stored as text and set server-side by the api — the
3
+ * client never sends it, so a second intake (an in-portal "suggest a feature", say) adds a
4
+ * member here rather than trusting a request field.
5
+ */
6
+ export declare enum FeatureRequestSource {
7
+ WEBSITE = "website"
8
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FeatureRequestSource = void 0;
4
+ /**
5
+ * Where a feature request came in from. Stored as text and set server-side by the api — the
6
+ * client never sends it, so a second intake (an in-portal "suggest a feature", say) adds a
7
+ * member here rather than trusting a request field.
8
+ */
9
+ var FeatureRequestSource;
10
+ (function (FeatureRequestSource) {
11
+ FeatureRequestSource["WEBSITE"] = "website";
12
+ })(FeatureRequestSource || (exports.FeatureRequestSource = FeatureRequestSource = {}));
13
+ ;
@@ -0,0 +1,21 @@
1
+ import type { UUID } from 'crypto';
2
+ import { FeatureRequestSource } from './enum';
3
+ export * from './enum';
4
+ /**
5
+ * A "I need something" submission from the marketing website's roadmap page.
6
+ *
7
+ * Deliberately tenant-less: the person filling the form has no account, so there is no
8
+ * `organization_id` and no `created_by` to record. The row is read in Supabase Studio and
9
+ * nowhere else — nothing in the portal or on the website ever renders one back.
10
+ */
11
+ export type FeatureRequestEntity = {
12
+ mms_id: UUID;
13
+ created_at: string;
14
+ name: string;
15
+ /** Markdown, as typed. Optional on the form, so an empty submission is stored as null. */
16
+ specification: string | null;
17
+ /** Whatever the requester called themselves — a person, a company, or both. */
18
+ requester_name: string;
19
+ requester_email: string;
20
+ source: FeatureRequestSource;
21
+ };
@@ -0,0 +1,17 @@
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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@managemint-solutions/entities",
3
- "version": "1.12.0",
3
+ "version": "1.13.0",
4
4
  "description": "Entity types used by both the api and portal",
5
5
  "homepage": "https://github.com/ManageMint-Solutions/managemint-solutions-entities#readme",
6
6
  "bugs": {