@molda-org/quotes-custom-orders 0.1.0-next.2 → 0.1.0-next.21

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,203 @@
1
+ import type { MoldaModuleDefinition, MoldaModuleShape } from '@molda-org/module-contracts';
2
+ import { z } from 'zod';
3
+ import { type ModuleRepository } from '@molda-org/module-runtime';
4
+ export type QuotesCustomOrdersAction = 'requestQuote' | 'reviseQuote' | 'acceptQuote' | 'approveDeliverable';
5
+ export type QuotesCustomOrdersView = 'quoteRequests' | 'activeCustomOrders' | 'awaitingApproval';
6
+ export type QuotesCustomOrdersHook = 'useQuoteRequests' | 'useCustomOrders' | 'useAwaitingApproval';
7
+ export interface QuotesCustomOrdersModuleShape extends MoldaModuleShape<'quotes-custom-orders', QuotesCustomOrdersAction, QuotesCustomOrdersView, QuotesCustomOrdersHook> {
8
+ readonly stage: 'phase-two';
9
+ readonly category: 'commerce';
10
+ readonly purpose: 'Quote requests, revision snapshots, custom-order acceptance, deliverables, and approval evidence.';
11
+ }
12
+ export type QuotesCustomOrdersModule = MoldaModuleDefinition<QuotesCustomOrdersModuleShape>;
13
+ export declare const QuotesCustomOrdersActionIds: readonly ["requestQuote", "reviseQuote", "acceptQuote", "approveDeliverable"];
14
+ export declare const QuotesCustomOrdersViewIds: readonly ["quoteRequests", "activeCustomOrders", "awaitingApproval"];
15
+ export declare const QuotesCustomOrdersHookIds: readonly ["useQuoteRequests", "useCustomOrders", "useAwaitingApproval"];
16
+ export declare const QuotesCustomOrdersSpecification: {
17
+ readonly id: "quotes-custom-orders";
18
+ readonly version: "1.0.0";
19
+ readonly collections: {
20
+ readonly quotes: z.ZodObject<{
21
+ customerId: z.ZodString;
22
+ status: z.ZodEnum<{
23
+ draft: "draft";
24
+ sent: "sent";
25
+ accepted: "accepted";
26
+ rejected: "rejected";
27
+ }>;
28
+ revision: z.ZodNumber;
29
+ currency: z.ZodString;
30
+ totalMinor: z.ZodNumber;
31
+ transitionReason: z.ZodOptional<z.ZodString>;
32
+ }, z.core.$strict>;
33
+ readonly 'custom-orders': z.ZodObject<{
34
+ quoteId: z.ZodString;
35
+ status: z.ZodEnum<{
36
+ active: "active";
37
+ completed: "completed";
38
+ cancelled: "cancelled";
39
+ }>;
40
+ }, z.core.$strict>;
41
+ readonly deliverables: z.ZodObject<{
42
+ orderId: z.ZodString;
43
+ status: z.ZodEnum<{
44
+ rejected: "rejected";
45
+ "awaiting-approval": "awaiting-approval";
46
+ approved: "approved";
47
+ }>;
48
+ revision: z.ZodNumber;
49
+ transitionReason: z.ZodOptional<z.ZodString>;
50
+ }, z.core.$strict>;
51
+ };
52
+ readonly actions: {
53
+ readonly requestQuote: {
54
+ readonly kind: "create";
55
+ readonly collection: "quotes";
56
+ readonly permission: "request.quote";
57
+ readonly event: "request.quote";
58
+ };
59
+ readonly reviseQuote: {
60
+ readonly kind: "update";
61
+ readonly collection: "quotes";
62
+ readonly permission: "revise.quote";
63
+ readonly event: "revise.quote";
64
+ readonly validate: ({ value, current }: {
65
+ readonly value: import("@molda-org/module-runtime").ModuleEntityValue;
66
+ readonly current: import("@molda-org/module-runtime").ModuleRecord | null;
67
+ readonly transaction: import("@molda-org/module-runtime").ModuleTransaction;
68
+ }) => void;
69
+ };
70
+ readonly acceptQuote: {
71
+ readonly kind: "transition";
72
+ readonly collection: "quotes";
73
+ readonly permission: "accept.quote";
74
+ readonly event: "accept.quote";
75
+ readonly status: "accepted";
76
+ readonly allowedFrom: readonly ["draft", "sent"];
77
+ readonly confirmation: "required";
78
+ };
79
+ readonly approveDeliverable: {
80
+ readonly kind: "transition";
81
+ readonly collection: "deliverables";
82
+ readonly permission: "approve.deliverable";
83
+ readonly event: "approve.deliverable";
84
+ readonly status: "approved";
85
+ readonly allowedFrom: readonly ["awaiting-approval"];
86
+ readonly confirmation: "required";
87
+ };
88
+ };
89
+ readonly views: {
90
+ readonly quoteRequests: {
91
+ readonly kind: "list";
92
+ readonly collection: "quotes";
93
+ readonly permission: "quote.requests.read";
94
+ };
95
+ readonly activeCustomOrders: {
96
+ readonly kind: "list";
97
+ readonly collection: "custom-orders";
98
+ readonly permission: "active.custom.orders.read";
99
+ readonly where: {
100
+ readonly status: "active";
101
+ };
102
+ };
103
+ readonly awaitingApproval: {
104
+ readonly kind: "list";
105
+ readonly collection: "deliverables";
106
+ readonly permission: "awaiting.approval.read";
107
+ readonly where: {
108
+ readonly status: "awaiting-approval";
109
+ };
110
+ };
111
+ };
112
+ readonly migrations: readonly [{
113
+ readonly version: 1;
114
+ readonly description: "Create quotes-custom-orders collections and indexes";
115
+ }];
116
+ readonly fixtures: readonly [{
117
+ readonly id: "quotes-custom-orders-baseline";
118
+ readonly description: "Deterministic quotes-custom-orders production-case fixture";
119
+ readonly records: readonly [{
120
+ readonly collection: "quotes";
121
+ readonly id: "quote-fixture";
122
+ readonly value: {
123
+ readonly customerId: "customer-fixture";
124
+ readonly status: "sent";
125
+ readonly revision: 1;
126
+ readonly currency: "EUR";
127
+ readonly totalMinor: 5000;
128
+ };
129
+ }];
130
+ }];
131
+ };
132
+ export declare const QuotesCustomOrdersBlueprint: import("@molda-org/module-runtime").ModuleBlueprint<{
133
+ [k: string]: import("@molda-org/module-runtime").ModuleActionDefinition<{
134
+ id: string;
135
+ data: Record<string, unknown>;
136
+ }, import("@molda-org/module-runtime").ModuleRecord<Readonly<Record<string, unknown>>>> | import("@molda-org/module-runtime").ModuleActionDefinition<{
137
+ data: Record<string, unknown>;
138
+ }, import("@molda-org/module-runtime").ModuleRecord<Readonly<Record<string, unknown>>>> | import("@molda-org/module-runtime").ModuleActionDefinition<{
139
+ id: string;
140
+ expectedRevision: number;
141
+ patch: Record<string, unknown>;
142
+ reason?: string | undefined;
143
+ }, import("@molda-org/module-runtime").ModuleRecord<Readonly<Record<string, unknown>>>> | import("@molda-org/module-runtime").ModuleActionDefinition<{
144
+ id: string;
145
+ expectedRevision: number;
146
+ patch: Record<string, unknown>;
147
+ }, import("@molda-org/module-runtime").ModuleRecord<Readonly<Record<string, unknown>>>>;
148
+ }, {
149
+ [k: string]: import("@molda-org/module-runtime").ModuleViewDefinition<{
150
+ id: string;
151
+ }, import("@molda-org/module-runtime").ModuleRecord<Readonly<Record<string, unknown>>>> | import("@molda-org/module-runtime").ModuleViewDefinition<{
152
+ limit: number;
153
+ equals?: Record<string, unknown> | undefined;
154
+ }, readonly import("@molda-org/module-runtime").ModuleRecord<Record<string, unknown>>[]>;
155
+ }>;
156
+ export declare function createQuotesCustomOrdersService(repository: ModuleRepository): {
157
+ blueprint: import("@molda-org/module-runtime").ModuleBlueprint<{
158
+ [k: string]: import("@molda-org/module-runtime").ModuleActionDefinition<{
159
+ id: string;
160
+ data: Record<string, unknown>;
161
+ }, import("@molda-org/module-runtime").ModuleRecord<Readonly<Record<string, unknown>>>> | import("@molda-org/module-runtime").ModuleActionDefinition<{
162
+ data: Record<string, unknown>;
163
+ }, import("@molda-org/module-runtime").ModuleRecord<Readonly<Record<string, unknown>>>> | import("@molda-org/module-runtime").ModuleActionDefinition<{
164
+ id: string;
165
+ expectedRevision: number;
166
+ patch: Record<string, unknown>;
167
+ reason?: string | undefined;
168
+ }, import("@molda-org/module-runtime").ModuleRecord<Readonly<Record<string, unknown>>>> | import("@molda-org/module-runtime").ModuleActionDefinition<{
169
+ id: string;
170
+ expectedRevision: number;
171
+ patch: Record<string, unknown>;
172
+ }, import("@molda-org/module-runtime").ModuleRecord<Readonly<Record<string, unknown>>>>;
173
+ }, {
174
+ [k: string]: import("@molda-org/module-runtime").ModuleViewDefinition<{
175
+ id: string;
176
+ }, import("@molda-org/module-runtime").ModuleRecord<Readonly<Record<string, unknown>>>> | import("@molda-org/module-runtime").ModuleViewDefinition<{
177
+ limit: number;
178
+ equals?: Record<string, unknown> | undefined;
179
+ }, readonly import("@molda-org/module-runtime").ModuleRecord<Record<string, unknown>>[]>;
180
+ }>;
181
+ executeAction<TKey extends string>(actionId: TKey, unsafeInput: {
182
+ id: string;
183
+ data: Record<string, unknown>;
184
+ } | {
185
+ data: Record<string, unknown>;
186
+ } | {
187
+ id: string;
188
+ expectedRevision: number;
189
+ patch: Record<string, unknown>;
190
+ reason?: string | undefined;
191
+ } | {
192
+ id: string;
193
+ expectedRevision: number;
194
+ patch: Record<string, unknown>;
195
+ }, invocation: import("@molda-org/module-runtime").ModuleActionInvocation): Promise<import("@molda-org/module-runtime").ModuleActionExecution<never>>;
196
+ executeView<TKey extends string>(viewId: TKey, unsafeInput: {
197
+ id: string;
198
+ } | {
199
+ limit: number;
200
+ equals?: Record<string, unknown> | undefined;
201
+ }, context: import("@molda-org/module-runtime").ModuleExecutionContext): Promise<never>;
202
+ };
203
+ export declare function createQuotesCustomOrdersRuntimeModule(repository: ModuleRepository): import("@molda-org/module-runtime").ResourceModuleContribution;
package/dist/index.js ADDED
@@ -0,0 +1,53 @@
1
+ import { z } from 'zod';
2
+ import { createResourceModuleContribution, createResourceModuleService, defineResourceModule, ModuleConflictError, } from '@molda-org/module-runtime';
3
+ export const QuotesCustomOrdersActionIds = ["requestQuote", "reviseQuote", "acceptQuote", "approveDeliverable"];
4
+ export const QuotesCustomOrdersViewIds = ["quoteRequests", "activeCustomOrders", "awaitingApproval"];
5
+ export const QuotesCustomOrdersHookIds = ["useQuoteRequests", "useCustomOrders", "useAwaitingApproval"];
6
+ export const QuotesCustomOrdersSpecification = {
7
+ id: 'quotes-custom-orders',
8
+ version: '1.0.0',
9
+ collections: {
10
+ 'quotes': z.object({ customerId: z.string().min(1).max(200), status: z.enum(['draft', 'sent', 'accepted', 'rejected']), revision: z.number().int().positive(), currency: z.string().regex(/^[A-Z]{3}$/), totalMinor: z.number().int().nonnegative(), transitionReason: z.string().max(1_000).optional() }).strict(),
11
+ 'custom-orders': z.object({ quoteId: z.string().min(1).max(200), status: z.enum(['active', 'completed', 'cancelled']) }).strict(),
12
+ 'deliverables': z.object({ orderId: z.string().min(1).max(200), status: z.enum(['awaiting-approval', 'approved', 'rejected']), revision: z.number().int().positive(), transitionReason: z.string().max(1_000).optional() }).strict(),
13
+ },
14
+ actions: {
15
+ requestQuote: { kind: 'create', collection: 'quotes', permission: 'request.quote', event: 'request.quote' },
16
+ reviseQuote: {
17
+ kind: 'update', collection: 'quotes', permission: 'revise.quote', event: 'revise.quote',
18
+ validate: ({ value, current }) => {
19
+ if (!current)
20
+ throw new ModuleConflictError('Quote does not exist');
21
+ if (current.value.status !== 'draft' && current.value.status !== 'sent') {
22
+ throw new ModuleConflictError('Only draft or sent quotes can be revised');
23
+ }
24
+ for (const field of ['customerId', 'currency']) {
25
+ if (value[field] !== current.value[field])
26
+ throw new ModuleConflictError(`Quote ${field} is immutable`);
27
+ }
28
+ if (Number(value.revision) !== Number(current.value.revision) + 1) {
29
+ throw new ModuleConflictError('Quote revision must increment by exactly one');
30
+ }
31
+ },
32
+ },
33
+ acceptQuote: { kind: 'transition', collection: 'quotes', permission: 'accept.quote', event: 'accept.quote', status: 'accepted', allowedFrom: ["draft", "sent"], confirmation: 'required' },
34
+ approveDeliverable: { kind: 'transition', collection: 'deliverables', permission: 'approve.deliverable', event: 'approve.deliverable', status: 'approved', allowedFrom: ["awaiting-approval"], confirmation: 'required' },
35
+ },
36
+ views: {
37
+ quoteRequests: { kind: 'list', collection: 'quotes', permission: 'quote.requests.read' },
38
+ activeCustomOrders: { kind: 'list', collection: 'custom-orders', permission: 'active.custom.orders.read', where: { status: 'active' } },
39
+ awaitingApproval: { kind: 'list', collection: 'deliverables', permission: 'awaiting.approval.read', where: { status: 'awaiting-approval' } },
40
+ },
41
+ migrations: [{ version: 1, description: 'Create quotes-custom-orders collections and indexes' }],
42
+ fixtures: [{ id: 'quotes-custom-orders-baseline', description: 'Deterministic quotes-custom-orders production-case fixture', records: [
43
+ { collection: 'quotes', id: 'quote-fixture', value: { customerId: 'customer-fixture', status: 'sent', revision: 1, currency: 'EUR', totalMinor: 5000 } },
44
+ ] }],
45
+ };
46
+ export const QuotesCustomOrdersBlueprint = defineResourceModule(QuotesCustomOrdersSpecification);
47
+ export function createQuotesCustomOrdersService(repository) {
48
+ return createResourceModuleService(QuotesCustomOrdersSpecification, repository);
49
+ }
50
+ export function createQuotesCustomOrdersRuntimeModule(repository) {
51
+ return createResourceModuleContribution(QuotesCustomOrdersSpecification, repository);
52
+ }
53
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,gCAAgC,EAChC,2BAA2B,EAC3B,oBAAoB,EACpB,mBAAmB,GAGpB,MAAM,2BAA2B,CAAC;AAcnC,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,cAAc,EAAC,aAAa,EAAC,aAAa,EAAC,oBAAoB,CAAU,CAAC;AACtH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,eAAe,EAAC,oBAAoB,EAAC,kBAAkB,CAAU,CAAC;AAC5G,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,kBAAkB,EAAC,iBAAiB,EAAC,qBAAqB,CAAU,CAAC;AAE/G,MAAM,CAAC,MAAM,+BAA+B,GAAG;IAC7C,EAAE,EAAE,sBAAsB;IAC1B,OAAO,EAAE,OAAO;IAChB,WAAW,EAAE;QACX,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,EAAE,UA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AAU,EAAE,qBAAqB,EAAE;QACxF,kBAAkB,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,eAAe,EAAE,UAAU,EAAE,2BAA2B,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE;QACvI,gBAAgB,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,cAAc,EAAE,UAAU,EAAE,wBAAwB,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,mBAAmB,EAAE,EAAE;KAC7I;IACD,UAAU,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,WAAW,EAAE,qDAAqD,EAAE,CAAC;IAChG,QAAQ,EAAE,CAAC,EAAE,EAAE,EAAE,+BAA+B,EAAE,WAAW,EAAE,4DAA4D,EAAE,OAAO,EAAE;gBACpI,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,EAAE,eAAe,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE;aACzJ,EAAE,CAAC;CAC0C,CAAC;AAEjD,MAAM,CAAC,MAAM,2BAA2B,GAAG,oBAAoB,CAAC,+BAA+B,CAAC,CAAC;AAEjG,MAAM,UAAU,+BAA+B,CAAC,UAA4B;IAC1E,OAAO,2BAA2B,CAAC,+BAA+B,EAAE,UAAU,CAAC,CAAC;AAClF,CAAC;AAED,MAAM,UAAU,qCAAqC,CAAC,UAA4B;IAChF,OAAO,gCAAgC,CAAC,+BAA+B,EAAE,UAAU,CAAC,CAAC;AACvF,CAAC"}
package/package.json CHANGED
@@ -1,18 +1,29 @@
1
1
  {
2
2
  "name": "@molda-org/quotes-custom-orders",
3
- "version": "0.1.0-next.2",
3
+ "version": "0.1.0-next.21",
4
4
  "type": "module",
5
- "types": "./index.d.ts",
6
5
  "exports": {
7
6
  ".": {
8
- "types": "./index.d.ts"
7
+ "types": "./dist/index.d.ts",
8
+ "import": "./dist/index.js"
9
9
  }
10
10
  },
11
11
  "files": [
12
- "index.d.ts"
12
+ "dist"
13
13
  ],
14
+ "scripts": {
15
+ "build": "tsc -p tsconfig.json",
16
+ "prepack": "npm run build",
17
+ "typecheck": "tsc -p tsconfig.json --noEmit"
18
+ },
14
19
  "dependencies": {
15
- "@molda-org/module-contracts": "0.1.0-next.2"
20
+ "@molda-org/module-contracts": "0.1.0-next.21",
21
+ "@molda-org/module-runtime": "0.1.0-next.21",
22
+ "zod": "4.6.5"
23
+ },
24
+ "devDependencies": {
25
+ "@types/node": "22.19.19",
26
+ "typescript": "5.9.3"
16
27
  },
17
28
  "publishConfig": {
18
29
  "access": "public",
package/index.d.ts DELETED
@@ -1,20 +0,0 @@
1
- import type { MoldaModuleDefinition, MoldaModuleShape } from '@molda-org/module-contracts';
2
-
3
- export type QuotesCustomOrdersAction = 'requestQuote' | 'reviseQuote' | 'acceptQuote' | 'approveDeliverable';
4
- export type QuotesCustomOrdersView = 'quoteRequests' | 'activeCustomOrders' | 'awaitingApproval';
5
- export type QuotesCustomOrdersHook = 'useQuoteRequest' | 'useCustomOrder';
6
-
7
- export interface QuotesCustomOrdersModuleShape
8
- extends MoldaModuleShape<
9
- 'quotes-custom-orders',
10
- QuotesCustomOrdersAction,
11
- QuotesCustomOrdersView,
12
- QuotesCustomOrdersHook
13
- > {
14
- readonly stage: 'phase-two';
15
- readonly category: 'operations';
16
- readonly purpose: 'Requests, requirements, estimates, quotes, revisions, approval, deposits, and delivery.';
17
- }
18
-
19
- export type QuotesCustomOrdersModule = MoldaModuleDefinition<QuotesCustomOrdersModuleShape>;
20
-