@happyvertical/smrt-commerce 0.55.24 → 0.56.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/AGENTS.md +2 -1
- package/README.md +38 -2
- package/agents/purchasing-ui.md +4 -3
- package/agents/quote-ui.md +3 -2
- package/dist/chunks/types-zVnIjSOk.js.map +1 -1
- package/dist/collections/ContractCollection.d.ts +2 -0
- package/dist/collections/ContractCollection.d.ts.map +1 -1
- package/dist/collections/PurchaseContractCollection.d.ts +8 -0
- package/dist/collections/PurchaseContractCollection.d.ts.map +1 -0
- package/dist/collections/SalesContractCollection.d.ts +8 -0
- package/dist/collections/SalesContractCollection.d.ts.map +1 -0
- package/dist/collections/index.d.ts +2 -0
- package/dist/collections/index.d.ts.map +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +228 -57
- package/dist/index.js.map +1 -1
- package/dist/manifest.json +2004 -800
- package/dist/migrations/partyLinks.d.ts +39 -0
- package/dist/migrations/partyLinks.d.ts.map +1 -0
- package/dist/models/Contract.d.ts +37 -27
- package/dist/models/Contract.d.ts.map +1 -1
- package/dist/models/index.d.ts +1 -1
- package/dist/models/index.d.ts.map +1 -1
- package/dist/recipes.d.ts +2 -32
- package/dist/recipes.d.ts.map +1 -1
- package/dist/smrt-knowledge.json +938 -378
- package/dist/types/index.d.ts +8 -4
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +9 -9
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/** Read-only deployment preflight for the Contract party split (#3898). */
|
|
2
|
+
import type { DatabaseInterface } from '@happyvertical/smrt-core/migrations';
|
|
3
|
+
export interface CommercePartyLinkRow {
|
|
4
|
+
id: string;
|
|
5
|
+
tenant_id: string | null;
|
|
6
|
+
_meta_type: string | null;
|
|
7
|
+
contract_type: string | null;
|
|
8
|
+
customer_id: string | null;
|
|
9
|
+
vendor_id: string | null;
|
|
10
|
+
}
|
|
11
|
+
export interface CommerceContractTypeGroup {
|
|
12
|
+
_meta_type: string | null;
|
|
13
|
+
contract_type: string | null;
|
|
14
|
+
count: number;
|
|
15
|
+
}
|
|
16
|
+
/** Existing document whose contract link will fail branch validation on save. */
|
|
17
|
+
export interface CommerceInvalidContractReference {
|
|
18
|
+
source_table: string;
|
|
19
|
+
source_id: string;
|
|
20
|
+
source_tenant_id: string | null;
|
|
21
|
+
contract_id: string;
|
|
22
|
+
contract_meta_type: string | null;
|
|
23
|
+
contract_tenant_id: string | null;
|
|
24
|
+
}
|
|
25
|
+
export interface CommercePartyLinksPreflight {
|
|
26
|
+
purchaseRowsWithCustomer: CommercePartyLinkRow[];
|
|
27
|
+
salesRowsWithVendor: CommercePartyLinkRow[];
|
|
28
|
+
missingRequiredCustomer: CommercePartyLinkRow[];
|
|
29
|
+
missingRequiredVendor: CommercePartyLinkRow[];
|
|
30
|
+
baseTypedRows: CommercePartyLinkRow[];
|
|
31
|
+
unqualifiedDiscriminatorRows: CommercePartyLinkRow[];
|
|
32
|
+
discriminatorGroups: CommerceContractTypeGroup[];
|
|
33
|
+
discriminatorMismatches: CommerceContractTypeGroup[];
|
|
34
|
+
invalidSalesReferences: CommerceInvalidContractReference[];
|
|
35
|
+
invalidPurchaseReferences: CommerceInvalidContractReference[];
|
|
36
|
+
}
|
|
37
|
+
/** Inspect existing party links before deploying the new STI hierarchy. Never writes. */
|
|
38
|
+
export declare function preflightCommercePartyLinks(db: DatabaseInterface): Promise<CommercePartyLinksPreflight>;
|
|
39
|
+
//# sourceMappingURL=partyLinks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"partyLinks.d.ts","sourceRoot":"","sources":["../../src/migrations/partyLinks.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAG3E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAE7E,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAA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4
4
|
*/
|
|
5
5
|
import { type Meta, SmrtObject } from '@happyvertical/smrt-core';
|
|
6
|
-
import { type ContractOptions, ContractStatus, ContractType, type LicenseSaleOptions, type PurchaseOrderOptions } from '../types/index.js';
|
|
6
|
+
import { type ContractOptions, ContractStatus, ContractType, type LicenseSaleOptions, type PurchaseContractOptions, type PurchaseOrderOptions, type SalesContractOptions } from '../types/index.js';
|
|
7
7
|
/**
|
|
8
8
|
* Contract is the base class for all commercial agreements.
|
|
9
9
|
*
|
|
10
|
-
* Uses Single Table Inheritance (STI)
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* - Agreement: Service/maintenance agreement
|
|
15
|
-
* - PurchaseOrder: Order to vendor/supplier
|
|
10
|
+
* Uses Single Table Inheritance (STI) for nine leaf types. SalesContract owns
|
|
11
|
+
* the customer link for Estimate, Order, WholesaleOrder, Cart, Lease,
|
|
12
|
+
* Agreement, and LicenseSale. PurchaseContract owns the vendor link for
|
|
13
|
+
* PurchaseOrder and ProductionOrder. Both branches share `contracts`.
|
|
16
14
|
*
|
|
17
15
|
* @example
|
|
18
16
|
* ```typescript
|
|
@@ -47,14 +45,6 @@ export declare class Contract extends SmrtObject {
|
|
|
47
45
|
* Current status of the contract
|
|
48
46
|
*/
|
|
49
47
|
status: ContractStatus;
|
|
50
|
-
/**
|
|
51
|
-
* Customer ID (for sales contracts: Estimate, Order, Agreement)
|
|
52
|
-
*/
|
|
53
|
-
customerId: string | null;
|
|
54
|
-
/**
|
|
55
|
-
* Vendor ID (for purchase contracts: PurchaseOrder)
|
|
56
|
-
*/
|
|
57
|
-
vendorId: string | null;
|
|
58
48
|
/**
|
|
59
49
|
* Subtotal before tax, in **integer minor units** (cents, satoshis).
|
|
60
50
|
*
|
|
@@ -179,34 +169,53 @@ export declare class Contract extends SmrtObject {
|
|
|
179
169
|
*/
|
|
180
170
|
protected resolvePriorStatus(): Promise<ContractStatus | undefined>;
|
|
181
171
|
}
|
|
172
|
+
/** Customer-side contracts, including orders, estimates, and licenses. */
|
|
173
|
+
export declare abstract class SalesContract extends Contract {
|
|
174
|
+
customerId: string | null;
|
|
175
|
+
constructor(options?: SalesContractOptions);
|
|
176
|
+
}
|
|
177
|
+
/** Supplier-side contracts, including purchase and production orders. */
|
|
178
|
+
export declare abstract class PurchaseContract extends Contract {
|
|
179
|
+
vendorId: string | null;
|
|
180
|
+
constructor(options?: PurchaseContractOptions);
|
|
181
|
+
}
|
|
182
182
|
/**
|
|
183
183
|
* Estimate - Quote or proposal for a customer
|
|
184
184
|
*/
|
|
185
|
-
export declare class Estimate extends
|
|
185
|
+
export declare class Estimate extends SalesContract {
|
|
186
|
+
customerId: string | null;
|
|
186
187
|
contractType: ContractType;
|
|
188
|
+
constructor(options?: SalesContractOptions);
|
|
187
189
|
}
|
|
188
190
|
/**
|
|
189
191
|
* Order - Customer purchase order
|
|
190
192
|
*/
|
|
191
|
-
export declare class Order extends
|
|
193
|
+
export declare class Order extends SalesContract {
|
|
194
|
+
customerId: string | null;
|
|
192
195
|
contractType: ContractType;
|
|
196
|
+
constructor(options?: SalesContractOptions);
|
|
193
197
|
}
|
|
194
198
|
/**
|
|
195
199
|
* Lease - Rental or lease agreement
|
|
196
200
|
*/
|
|
197
|
-
export declare class Lease extends
|
|
201
|
+
export declare class Lease extends SalesContract {
|
|
202
|
+
customerId: string | null;
|
|
198
203
|
contractType: ContractType;
|
|
204
|
+
constructor(options?: SalesContractOptions);
|
|
199
205
|
}
|
|
200
206
|
/**
|
|
201
207
|
* Agreement - Service or maintenance agreement
|
|
202
208
|
*/
|
|
203
|
-
export declare class Agreement extends
|
|
209
|
+
export declare class Agreement extends SalesContract {
|
|
210
|
+
customerId: string | null;
|
|
204
211
|
contractType: ContractType;
|
|
212
|
+
constructor(options?: SalesContractOptions);
|
|
205
213
|
}
|
|
206
214
|
/**
|
|
207
215
|
* PurchaseOrder - Order sent to vendor/supplier
|
|
208
216
|
*/
|
|
209
|
-
export declare class PurchaseOrder extends
|
|
217
|
+
export declare class PurchaseOrder extends PurchaseContract {
|
|
218
|
+
vendorId: string | null;
|
|
210
219
|
contractType: ContractType;
|
|
211
220
|
/** Expected delivery calendar date (YYYY-MM-DD), or empty when unspecified. */
|
|
212
221
|
expectedDate: Meta<string>;
|
|
@@ -222,8 +231,10 @@ export declare class PurchaseOrder extends Contract {
|
|
|
222
231
|
* `customerType: 'wholesale'`, uses NET-30/60 payment terms, and is delivered
|
|
223
232
|
* via the wholesale-portal channel rather than retail checkout.
|
|
224
233
|
*/
|
|
225
|
-
export declare class WholesaleOrder extends
|
|
234
|
+
export declare class WholesaleOrder extends SalesContract {
|
|
235
|
+
customerId: string | null;
|
|
226
236
|
contractType: ContractType;
|
|
237
|
+
constructor(options?: SalesContractOptions);
|
|
227
238
|
}
|
|
228
239
|
/**
|
|
229
240
|
* ProductionOrder - instruction to commission goods from an internal or
|
|
@@ -251,7 +262,7 @@ export declare class WholesaleOrder extends Contract {
|
|
|
251
262
|
* shared `_meta_data` JSON column on the Contract STI table instead of
|
|
252
263
|
* widening the base schema with manufacturing-specific columns.
|
|
253
264
|
*/
|
|
254
|
-
export declare class ProductionOrder extends
|
|
265
|
+
export declare class ProductionOrder extends PurchaseContract {
|
|
255
266
|
contractType: ContractType;
|
|
256
267
|
/**
|
|
257
268
|
* Plain string reference to the upstream product the order is asked
|
|
@@ -277,11 +288,10 @@ export declare class ProductionOrder extends Contract {
|
|
|
277
288
|
*
|
|
278
289
|
* A Cart starts in {@link ContractStatus.DRAFT} via the base `Contract.status`
|
|
279
290
|
* default — the subclass doesn't need its own override. Application code
|
|
280
|
-
* is responsible for
|
|
281
|
-
*
|
|
282
|
-
* machine on the cart → order transition.
|
|
291
|
+
* is responsible for assigning the appropriate Order status at checkout;
|
|
292
|
+
* the framework doesn't enforce a state machine on the cart → order transition.
|
|
283
293
|
*/
|
|
284
|
-
export declare class Cart extends
|
|
294
|
+
export declare class Cart extends SalesContract {
|
|
285
295
|
contractType: ContractType;
|
|
286
296
|
}
|
|
287
297
|
/**
|
|
@@ -334,7 +344,7 @@ export interface LicenseRightsSnapshot {
|
|
|
334
344
|
* the `contracts` STI table — no migration of the base schema needed
|
|
335
345
|
* to land this subtype.
|
|
336
346
|
*/
|
|
337
|
-
export declare class LicenseSale extends
|
|
347
|
+
export declare class LicenseSale extends SalesContract {
|
|
338
348
|
contractType: ContractType;
|
|
339
349
|
/**
|
|
340
350
|
* Plain string reference to the upstream `Sku` (from
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Contract.d.ts","sourceRoot":"","sources":["../../src/models/Contract.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAGL,KAAK,IAAI,EACT,UAAU,EAEX,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EACL,KAAK,eAAe,EACpB,cAAc,EACd,YAAY,EACZ,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EAC1B,MAAM,mBAAmB,CAAC;AA2C3B
|
|
1
|
+
{"version":3,"file":"Contract.d.ts","sourceRoot":"","sources":["../../src/models/Contract.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAGL,KAAK,IAAI,EACT,UAAU,EAEX,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EACL,KAAK,eAAe,EACpB,cAAc,EACd,YAAY,EACZ,KAAK,kBAAkB,EACvB,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EAC1B,MAAM,mBAAmB,CAAC;AA2C3B;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,qBAOa,QAAS,SAAQ,UAAU;IACtC;;;OAGG;IAEH,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAQ;IAE/B;;OAEG;IAKH,YAAY,EAAE,YAAY,CAAsB;IAEhD;;OAEG;IAKH,MAAM,EAAE,cAAc,CAAwB;IAE9C;;;;;;;OAOG;IAEH,QAAQ,EAAE,MAAM,CAAK;IAErB;;OAEG;IAEH,SAAS,EA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D;IACtD,kBAAkB,EAAE,IAAI,CAAC,OAAO,CAAC,CAAS;IAE1C,wDAAwD;IACxD,iBAAiB,EAAE,IAAI,CAAC,OAAO,CAAC,CAAS;IAIzC,oEAAoE;IACpE,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAM;IAE1B;;;;OAIG;IACH,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,CAAM;IAE3B;;;;;;OAMG;IACH,sBAAsB,EAAE,IAAI,CAAC,MAAM,CAAC,CAAM;gBAE9B,OAAO,GAAE,kBAAuB;IA8B5C;;;;;;OAMG;IACY,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAQ1C;;;;;OAKG;IACH,iBAAiB,IAAI,qBAAqB;IAY1C;;;;;OAKG;IACH,MAAM,IAAI,IAAI;IASd;;;;;;;;;;;OAWG;IACY,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAcpC;;;;OAIG;IACH,OAAO,CAAC,iBAAiB;IAYzB,OAAO,CAAC,uBAAuB;CAahC;AAED,eAAe,QAAQ,CAAC"}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @packageDocumentation
|
|
4
4
|
*/
|
|
5
5
|
export { BillingAccount, type BillingCloseKind, BillingLineSource, type BillingLineSourceType, BillingPaymentAttempt, type BillingPaymentAttemptFlag, type BillingPaymentAttemptPurpose, type BillingPaymentAttemptTransition, BillingPeriodClose, type BillingPeriodCloseStatus, type BillingStanding, } from './billing.js';
|
|
6
|
-
export { Agreement, Cart, Contract, Estimate, Lease, type LicenseRightsSnapshot, LicenseSale, Order, ProductionOrder, PurchaseOrder, WholesaleOrder, } from './Contract.js';
|
|
6
|
+
export { Agreement, Cart, Contract, Estimate, Lease, type LicenseRightsSnapshot, LicenseSale, Order, ProductionOrder, PurchaseContract, PurchaseOrder, SalesContract, WholesaleOrder, } from './Contract.js';
|
|
7
7
|
export { ContractLineItem } from './ContractLineItem.js';
|
|
8
8
|
export { Customer } from './Customer.js';
|
|
9
9
|
export { Fulfillment } from './Fulfillment.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,cAAc,EACd,KAAK,gBAAgB,EACrB,iBAAiB,EACjB,KAAK,qBAAqB,EAC1B,qBAAqB,EACrB,KAAK,yBAAyB,EAC9B,KAAK,4BAA4B,EACjC,KAAK,+BAA+B,EACpC,kBAAkB,EAClB,KAAK,wBAAwB,EAC7B,KAAK,eAAe,GACrB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,SAAS,EACT,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,KAAK,qBAAqB,EAC1B,WAAW,EACX,KAAK,EACL,eAAe,EACf,aAAa,EACb,cAAc,GACf,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,cAAc,EACd,KAAK,gBAAgB,EACrB,iBAAiB,EACjB,KAAK,qBAAqB,EAC1B,qBAAqB,EACrB,KAAK,yBAAyB,EAC9B,KAAK,4BAA4B,EACjC,KAAK,+BAA+B,EACpC,kBAAkB,EAClB,KAAK,wBAAwB,EAC7B,KAAK,eAAe,GACrB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,SAAS,EACT,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,KAAK,qBAAqB,EAC1B,WAAW,EACX,KAAK,EACL,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,cAAc,GACf,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/recipes.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @packageDocumentation
|
|
8
8
|
*/
|
|
9
9
|
import { SmrtRecipe } from '@happyvertical/smrt-core';
|
|
10
|
-
import {
|
|
10
|
+
import { Contract, Estimate, Lease, LicenseSale, Order, PurchaseOrder, WholesaleOrder } from './models/Contract.js';
|
|
11
11
|
import { ContractLineItem } from './models/ContractLineItem.js';
|
|
12
12
|
import { Customer } from './models/Customer.js';
|
|
13
13
|
import { Fulfillment } from './models/Fulfillment.js';
|
|
@@ -77,10 +77,6 @@ export declare class PurchasesRecipe extends SmrtRecipe {
|
|
|
77
77
|
readonly visibility: "hidden";
|
|
78
78
|
readonly locked: true;
|
|
79
79
|
};
|
|
80
|
-
readonly customerId: {
|
|
81
|
-
readonly visibility: "hidden";
|
|
82
|
-
readonly locked: true;
|
|
83
|
-
};
|
|
84
80
|
readonly vendorId: {
|
|
85
81
|
readonly label: "Vendor";
|
|
86
82
|
readonly order: 1;
|
|
@@ -149,14 +145,9 @@ export declare class SalesRecipe extends SmrtRecipe {
|
|
|
149
145
|
readonly visibility: "hidden";
|
|
150
146
|
readonly locked: true;
|
|
151
147
|
};
|
|
152
|
-
readonly vendorId: {
|
|
153
|
-
readonly visibility: "hidden";
|
|
154
|
-
readonly locked: true;
|
|
155
|
-
};
|
|
156
148
|
readonly customerId: {
|
|
157
149
|
readonly label: "Customer";
|
|
158
150
|
readonly order: 1;
|
|
159
|
-
readonly required: true;
|
|
160
151
|
};
|
|
161
152
|
readonly channelId: {
|
|
162
153
|
readonly visibility: "hidden";
|
|
@@ -253,14 +244,9 @@ export declare class EstimatesRecipe extends SmrtRecipe {
|
|
|
253
244
|
readonly visibility: "hidden";
|
|
254
245
|
readonly locked: true;
|
|
255
246
|
};
|
|
256
|
-
readonly vendorId: {
|
|
257
|
-
readonly visibility: "hidden";
|
|
258
|
-
readonly locked: true;
|
|
259
|
-
};
|
|
260
247
|
readonly customerId: {
|
|
261
248
|
readonly label: "Customer";
|
|
262
249
|
readonly order: 1;
|
|
263
|
-
readonly required: true;
|
|
264
250
|
};
|
|
265
251
|
readonly channelId: {
|
|
266
252
|
readonly visibility: "hidden";
|
|
@@ -323,10 +309,6 @@ export declare class WholesaleRecipe extends SmrtRecipe {
|
|
|
323
309
|
readonly visibility: "hidden";
|
|
324
310
|
readonly locked: true;
|
|
325
311
|
};
|
|
326
|
-
readonly vendorId: {
|
|
327
|
-
readonly visibility: "hidden";
|
|
328
|
-
readonly locked: true;
|
|
329
|
-
};
|
|
330
312
|
readonly customerId: {
|
|
331
313
|
readonly label: "Customer";
|
|
332
314
|
readonly order: 1;
|
|
@@ -591,7 +573,7 @@ export declare class AgreementsRecipe extends SmrtRecipe {
|
|
|
591
573
|
static models: (typeof Contract | typeof ContractLineItem)[];
|
|
592
574
|
static nav: {
|
|
593
575
|
label: string;
|
|
594
|
-
model: typeof
|
|
576
|
+
model: typeof Contract;
|
|
595
577
|
icon: string;
|
|
596
578
|
description: string;
|
|
597
579
|
}[];
|
|
@@ -607,10 +589,6 @@ export declare class AgreementsRecipe extends SmrtRecipe {
|
|
|
607
589
|
readonly customerId: {
|
|
608
590
|
readonly label: "Customer";
|
|
609
591
|
readonly order: 1;
|
|
610
|
-
readonly required: true;
|
|
611
|
-
};
|
|
612
|
-
readonly vendorId: {
|
|
613
|
-
readonly visibility: "hidden";
|
|
614
592
|
};
|
|
615
593
|
readonly subtotal: {
|
|
616
594
|
readonly visibility: "hidden";
|
|
@@ -694,10 +672,6 @@ export declare class LeasesRecipe extends SmrtRecipe {
|
|
|
694
672
|
readonly customerId: {
|
|
695
673
|
readonly label: "Customer";
|
|
696
674
|
readonly order: 1;
|
|
697
|
-
readonly required: true;
|
|
698
|
-
};
|
|
699
|
-
readonly vendorId: {
|
|
700
|
-
readonly visibility: "hidden";
|
|
701
675
|
};
|
|
702
676
|
readonly subtotal: {
|
|
703
677
|
readonly visibility: "hidden";
|
|
@@ -774,10 +748,6 @@ export declare class LicensesRecipe extends SmrtRecipe {
|
|
|
774
748
|
readonly customerId: {
|
|
775
749
|
readonly label: "Customer";
|
|
776
750
|
readonly order: 1;
|
|
777
|
-
readonly required: true;
|
|
778
|
-
};
|
|
779
|
-
readonly vendorId: {
|
|
780
|
-
readonly visibility: "hidden";
|
|
781
751
|
};
|
|
782
752
|
readonly subtotal: {
|
|
783
753
|
readonly visibility: "hidden";
|
package/dist/recipes.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recipes.d.ts","sourceRoot":"","sources":["../src/recipes.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,
|
|
1
|
+
{"version":3,"file":"recipes.d.ts","sourceRoot":"","sources":["../src/recipes.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAEL,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,WAAW,EACX,KAAK,EACL,aAAa,EACb,cAAc,EACf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,sEAAsE;AACtE,qBAAa,eAAgB,SAAQ,UAAU;IAC7C,MAAM,CAAC,EAAE,SAAwB;IACjC,MAAM,CAAC,IAAI,SAA2B;IACtC,MAAM,CAAC,KAAK,SAAe;IAC3B,MAAM,CAAC,OAAO,SAA0D;IACxE,MAAM,CAAC,QAAQ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