@campfire-interactive/master-data-client 4.13.0 → 4.13.2
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/attributeDefinitions.d.ts +15 -0
- package/dist/attributeDefinitions.d.ts.map +1 -0
- package/dist/attributeDefinitions.js +70 -0
- package/dist/attributeDefinitions.js.map +1 -0
- package/dist/attributeGroups.d.ts +14 -0
- package/dist/attributeGroups.d.ts.map +1 -0
- package/dist/attributeGroups.js +51 -0
- package/dist/attributeGroups.js.map +1 -0
- package/dist/attributeOptions.d.ts +14 -0
- package/dist/attributeOptions.d.ts.map +1 -0
- package/dist/attributeOptions.js +53 -0
- package/dist/attributeOptions.js.map +1 -0
- package/dist/attributeValidation.d.ts +15 -0
- package/dist/attributeValidation.d.ts.map +1 -0
- package/dist/attributeValidation.js +141 -0
- package/dist/attributeValidation.js.map +1 -0
- package/dist/client.d.ts +12 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +18 -0
- package/dist/client.js.map +1 -1
- package/dist/companies.d.ts.map +1 -1
- package/dist/companies.js +2 -0
- package/dist/companies.js.map +1 -1
- package/dist/http.d.ts.map +1 -1
- package/dist/http.js +5 -2
- package/dist/http.js.map +1 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +16 -1
- package/dist/index.js.map +1 -1
- package/dist/ownership.d.ts +21 -0
- package/dist/ownership.d.ts.map +1 -0
- package/dist/ownership.js +36 -0
- package/dist/ownership.js.map +1 -0
- package/dist/programs.d.ts.map +1 -1
- package/dist/programs.js +2 -0
- package/dist/programs.js.map +1 -1
- package/dist/quoteAsks.d.ts +66 -0
- package/dist/quoteAsks.d.ts.map +1 -0
- package/dist/quoteAsks.js +103 -0
- package/dist/quoteAsks.js.map +1 -0
- package/dist/quoteLines.d.ts +91 -0
- package/dist/quoteLines.d.ts.map +1 -0
- package/dist/quoteLines.js +147 -0
- package/dist/quoteLines.js.map +1 -0
- package/dist/quotes.d.ts +10 -5
- package/dist/quotes.d.ts.map +1 -1
- package/dist/quotes.js +10 -5
- package/dist/quotes.js.map +1 -1
- package/dist/types.d.ts +451 -4
- package/dist/types.d.ts.map +1 -1
- package/package.json +3 -2
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.QuoteLineResource = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Quote lines — the finished goods on a quote.
|
|
6
|
+
*
|
|
7
|
+
* A quote is MULTI-PART: it is the document the OEM receives and it carries one
|
|
8
|
+
* line per finished good, each with its own volume, cost and price. See the
|
|
9
|
+
* nextgen ADR `2026-08-05-multi-part-quotes.md`.
|
|
10
|
+
*
|
|
11
|
+
* Two things to know before using this:
|
|
12
|
+
*
|
|
13
|
+
* 1. **`Quote.partId` is now a derived mirror** of these lines and is
|
|
14
|
+
* deprecated. It reflects the FIRST line only, so it is lossy the moment a
|
|
15
|
+
* quote has more than one. Read `lines` here instead. It keeps working for
|
|
16
|
+
* the whole deprecation window — including writes, which transparently
|
|
17
|
+
* maintain the quote's single line — and is dropped in a later major.
|
|
18
|
+
*
|
|
19
|
+
* 2. **Never sum lines across competing quotes.** When an OEM asks for several
|
|
20
|
+
* competing groupings of the same parts, those are alternatives, not
|
|
21
|
+
* additions. `rollUp` covers ONE quote; anything aggregating across a round
|
|
22
|
+
* must dedupe by part.
|
|
23
|
+
*
|
|
24
|
+
* Cost is DERIVED, never authored: it reaches a line only through
|
|
25
|
+
* {@link setEffectiveCost}, published by whichever engine resolved it. There is
|
|
26
|
+
* no authored-cost field, deliberately — the earlier design had one whose only
|
|
27
|
+
* writer was a human, so it could store a per-grouping cost but never produce
|
|
28
|
+
* one, and went stale unnoticed on the next re-cost.
|
|
29
|
+
*/
|
|
30
|
+
class QuoteLineResource {
|
|
31
|
+
http;
|
|
32
|
+
constructor(http) {
|
|
33
|
+
this.http = http;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* The quote's lines, each with resolved `terms` (volume / cost / price plus
|
|
37
|
+
* which tier each came from), and the quote-level `rollUp`.
|
|
38
|
+
*/
|
|
39
|
+
async list(quoteId) {
|
|
40
|
+
return this.http.request({
|
|
41
|
+
method: 'GET',
|
|
42
|
+
path: `/v1/quotes/${encodeURIComponent(quoteId)}/lines`,
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* The resolved line sets for MANY quotes, in one round trip.
|
|
47
|
+
*
|
|
48
|
+
* Use this instead of looping {@link list} whenever you read volume off a set
|
|
49
|
+
* of quotes — a per-quote fan-out is slow and, against a hub holding one warm
|
|
50
|
+
* instance, manufactures cold starts.
|
|
51
|
+
*
|
|
52
|
+
* Chunk to 200 ids per call (the server rejects more). Ids that don't exist, or
|
|
53
|
+
* belong to another tenant, are simply absent from the result — so index the
|
|
54
|
+
* response by `quoteId` rather than assuming it lines up positionally with the
|
|
55
|
+
* ids you passed. A quote that exists but has no finished goods comes back with
|
|
56
|
+
* an empty `lines` array.
|
|
57
|
+
*/
|
|
58
|
+
// Typed SingleResponse<T[]> rather than ListResponse<T>: this batch read is not
|
|
59
|
+
// paginated, so it carries no cursor/hasMore meta and claiming ListMeta would
|
|
60
|
+
// promise fields the server never sends.
|
|
61
|
+
async listForQuotes(quoteIds) {
|
|
62
|
+
return this.http.request({
|
|
63
|
+
method: 'GET',
|
|
64
|
+
path: '/v1/quote-lines',
|
|
65
|
+
query: { quoteIds: quoteIds.join(',') },
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Add a finished good to a quote. Returns the full line set, so a caller never
|
|
70
|
+
* has to re-fetch to get the new roll-up.
|
|
71
|
+
*
|
|
72
|
+
* Omit `partId` to have it resolved from `partNumber` against the parts
|
|
73
|
+
* catalog; it is left null when nothing matches, which is legal — soft
|
|
74
|
+
* enforcement, so a part number that hasn't been reconciled into the catalog
|
|
75
|
+
* can still be quoted. Pass `partId: null` to pin it null explicitly.
|
|
76
|
+
*/
|
|
77
|
+
async add(quoteId, input, idempotencyKey) {
|
|
78
|
+
return this.http.request({
|
|
79
|
+
method: 'POST',
|
|
80
|
+
path: `/v1/quotes/${encodeURIComponent(quoteId)}/lines`,
|
|
81
|
+
body: input,
|
|
82
|
+
idempotencyKey,
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Update a line's AUTHORED terms. Derived cost/price are not settable here.
|
|
87
|
+
*
|
|
88
|
+
* A `note`-only patch is accepted while the quote is in review — flagging a bad
|
|
89
|
+
* part is something that happens DURING review. Anything touching the figures
|
|
90
|
+
* requires a pre-approval status (422 otherwise).
|
|
91
|
+
*/
|
|
92
|
+
async update(quoteId, lineId, input) {
|
|
93
|
+
return this.http.request({
|
|
94
|
+
method: 'PATCH',
|
|
95
|
+
path: `/v1/quotes/${encodeURIComponent(quoteId)}/lines/${encodeURIComponent(lineId)}`,
|
|
96
|
+
body: input,
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
/** Remove a finished good. The last line may be removed. */
|
|
100
|
+
async remove(quoteId, lineId) {
|
|
101
|
+
return this.http.request({
|
|
102
|
+
method: 'DELETE',
|
|
103
|
+
path: `/v1/quotes/${encodeURIComponent(quoteId)}/lines/${encodeURIComponent(lineId)}`,
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Set the document order. `lineIds` must list every line on the quote exactly
|
|
108
|
+
* once (422 otherwise). Order also decides which line supplies the deprecated
|
|
109
|
+
* `quote.partId` mirror.
|
|
110
|
+
*/
|
|
111
|
+
async reorder(quoteId, lineIds) {
|
|
112
|
+
return this.http.request({
|
|
113
|
+
method: 'PUT',
|
|
114
|
+
path: `/v1/quotes/${encodeURIComponent(quoteId)}/lines/reorder`,
|
|
115
|
+
body: { lineIds },
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Publish a DERIVED per-line cost — the line-scoped mirror of
|
|
120
|
+
* `quotes.setEffectiveCost`, and the only way a cost reaches a line.
|
|
121
|
+
*
|
|
122
|
+
* Deliberately NOT gated on quote status: a re-cost must always be able to
|
|
123
|
+
* land, or the published number silently diverges from the cost model that
|
|
124
|
+
* produced it. When the figure lands on a quote already in approval the
|
|
125
|
+
* response sets `invalidatesApproval` — the caller owns what to do about it
|
|
126
|
+
* (OMSF voids the collected approvals and re-routes).
|
|
127
|
+
*/
|
|
128
|
+
async setEffectiveCost(quoteId, lineId, input, idempotencyKey) {
|
|
129
|
+
return this.http.request({
|
|
130
|
+
method: 'PATCH',
|
|
131
|
+
path: `/v1/quotes/${encodeURIComponent(quoteId)}/lines/${encodeURIComponent(lineId)}/effective-cost`,
|
|
132
|
+
body: input,
|
|
133
|
+
idempotencyKey,
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
/** Price-side sibling of {@link setEffectiveCost}. */
|
|
137
|
+
async setEffectivePrice(quoteId, lineId, input, idempotencyKey) {
|
|
138
|
+
return this.http.request({
|
|
139
|
+
method: 'PATCH',
|
|
140
|
+
path: `/v1/quotes/${encodeURIComponent(quoteId)}/lines/${encodeURIComponent(lineId)}/effective-price`,
|
|
141
|
+
body: input,
|
|
142
|
+
idempotencyKey,
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
exports.QuoteLineResource = QuoteLineResource;
|
|
147
|
+
//# sourceMappingURL=quoteLines.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quoteLines.js","sourceRoot":"","sources":["../src/quoteLines.ts"],"names":[],"mappings":";;;AAWA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAa,iBAAiB;IACC;IAA7B,YAA6B,IAAmB;QAAnB,SAAI,GAAJ,IAAI,CAAe;IAAG,CAAC;IAEpD;;;OAGG;IACH,KAAK,CAAC,IAAI,CAAC,OAAe;QACxB,OAAO,IAAI,CAAC,IAAI,CA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;SACtF,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,OAAO,CAAC,OAAe,EAAE,OAAiB;QAC9C,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAqC;YAC3D,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,cAAc,kBAAkB,CAAC,OAAO,CAAC,gBAAgB;YAC/D,IAAI,EAAE,EAAE,OAAO,EAAE;SAClB,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,gBAAgB,CACpB,OAAe,EACf,MAAc,EACd,KAAqC,EACrC,cAAuB;QAEvB,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAA6C;YACnE,MAAM,EAAE,OAAO;YACf,IAAI,EAAE,cAAc,kBAAkB,CAAC,OAAO,CAAC,UAAU,kBAAkB,CAAC,MAAM,CAAC,iBAAiB;YACpG,IAAI,EAAE,KAAK;YACX,cAAc;SACf,CAAC,CAAC;IACL,CAAC;IAED,sDAAsD;IACtD,KAAK,CAAC,iBAAiB,CACrB,OAAe,EACf,MAAc,EACd,KAAsC,EACtC,cAAuB;QAEvB,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAA6C;YACnE,MAAM,EAAE,OAAO;YACf,IAAI,EAAE,cAAc,kBAAkB,CAAC,OAAO,CAAC,UAAU,kBAAkB,CAAC,MAAM,CAAC,kBAAkB;YACrG,IAAI,EAAE,KAAK;YACX,cAAc;SACf,CAAC,CAAC;IACL,CAAC;CACF;AA1ID,8CA0IC"}
|
package/dist/quotes.d.ts
CHANGED
|
@@ -19,13 +19,18 @@ export declare class QuoteResource {
|
|
|
19
19
|
get(id: string, options?: GetQuoteOptions): Promise<SingleResponse<Quote>>;
|
|
20
20
|
create(input: CreateQuoteInput, idempotencyKey?: string): Promise<CreateResponse<Quote>>;
|
|
21
21
|
/**
|
|
22
|
-
* Issue the next `
|
|
22
|
+
* Issue the next `Q-YYYY-NNN` for the caller's tenant — the authoritative
|
|
23
23
|
* quote-number mint (master-data owns the number and enforces `quoteNumber`
|
|
24
24
|
* uniqueness). Atomic per (tenant, year); the first call of a year seeds the
|
|
25
|
-
* counter above the existing numeric max
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* passed four digits.
|
|
25
|
+
* counter above the existing numeric max, across both prefixes. Returns
|
|
26
|
+
* `{ quoteNumber }`. Both CPQ and OMSF call this instead of scanning the quote
|
|
27
|
+
* list and incrementing — scans that wedged at 10000 once a tenant's yearly
|
|
28
|
+
* sequence passed four digits (CPQ) and raced on concurrent creates (OMSF).
|
|
29
|
+
*
|
|
30
|
+
* **The prefix changed from `RFQ-` to `Q-` on 2026-08-06**, because `RFQ-` now
|
|
31
|
+
* names the customer's request that several competing quotes answer. Quotes
|
|
32
|
+
* numbered before the change keep their `RFQ-` numbers — treat a quote number
|
|
33
|
+
* as an opaque string and never parse a prefix out of it.
|
|
29
34
|
*/
|
|
30
35
|
nextNumber(): Promise<SingleResponse<{
|
|
31
36
|
quoteNumber: string;
|
package/dist/quotes.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quotes.d.ts","sourceRoot":"","sources":["../src/quotes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,KAAK,EACV,KAAK,EACL,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,0BAA0B,EAC1B,qBAAqB,EACrB,sBAAsB,EACtB,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,YAAY,EACZ,cAAc,EACd,iBAAiB,EAClB,MAAM,SAAS,CAAC;AAEjB;;;;;;;;;;;GAWG;AACH,qBAAa,aAAa;IACZ,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,aAAa;IAE1C,IAAI,CAAC,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAqB/D,GAAG,CA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cAAc,CAAC,KAAK,CAAC,CAAC;IASjC;;;;;;;;;;;;;;;;;OAiBG;IACG,gBAAgB,CACpB,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,0BAA0B,EACjC,cAAc,CAAC,EAAE,MAAM,GACtB,OAAO,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IASjC;;;;;;;;;;;;;OAaG;IACG,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQzD;;;;;;OAMG;IACG,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAC;IAQvE,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC;IAOhE;;;;;;;;;;;;;;OAcG;IACG,gBAAgB,CACpB,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,qBAAqB,EAC5B,cAAc,CAAC,EAAE,MAAM,GACtB,OAAO,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IASjC;;;;;;;;;;;;;;OAcG;IACG,iBAAiB,CACrB,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,sBAAsB,EAC7B,cAAc,CAAC,EAAE,MAAM,GACtB,OAAO,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;CAQlC"}
|
package/dist/quotes.js
CHANGED
|
@@ -68,13 +68,18 @@ class QuoteResource {
|
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
70
|
/**
|
|
71
|
-
* Issue the next `
|
|
71
|
+
* Issue the next `Q-YYYY-NNN` for the caller's tenant — the authoritative
|
|
72
72
|
* quote-number mint (master-data owns the number and enforces `quoteNumber`
|
|
73
73
|
* uniqueness). Atomic per (tenant, year); the first call of a year seeds the
|
|
74
|
-
* counter above the existing numeric max
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
* passed four digits.
|
|
74
|
+
* counter above the existing numeric max, across both prefixes. Returns
|
|
75
|
+
* `{ quoteNumber }`. Both CPQ and OMSF call this instead of scanning the quote
|
|
76
|
+
* list and incrementing — scans that wedged at 10000 once a tenant's yearly
|
|
77
|
+
* sequence passed four digits (CPQ) and raced on concurrent creates (OMSF).
|
|
78
|
+
*
|
|
79
|
+
* **The prefix changed from `RFQ-` to `Q-` on 2026-08-06**, because `RFQ-` now
|
|
80
|
+
* names the customer's request that several competing quotes answer. Quotes
|
|
81
|
+
* numbered before the change keep their `RFQ-` numbers — treat a quote number
|
|
82
|
+
* as an opaque string and never parse a prefix out of it.
|
|
78
83
|
*/
|
|
79
84
|
async nextNumber() {
|
|
80
85
|
return this.http.request({
|
package/dist/quotes.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quotes.js","sourceRoot":"","sources":["../src/quotes.ts"],"names":[],"mappings":";;;AAiBA;;;;;;;;;;;GAWG;AACH,MAAa,aAAa;IACK;IAA7B,YAA6B,IAAmB;QAAnB,SAAI,GAAJ,IAAI,CAAe;IAAG,CAAC;IAEpD,KAAK,CAAC,IAAI,CAAC,OAA2B;QACpC,MAAM,KAAK,GAAuC,EAAE,CAAC;QACrD,IAAI,OAAO,EAAE,CAAC;YACZ,IAAI,OAAO,CAAC,KAAK,KAAK,SAAS;gBAAE,KAAK,CAAC,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YACrE,IAAI,OAAO,CAAC,MAAM;gBAAE,KAAK,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;YAClD,IAAI,OAAO,CAAC,IAAI;gBAAE,KAAK,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;YAC5C,IAAI,OAAO,CAAC,CAAC;gBAAE,KAAK,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;YACnC,IAAI,OAAO,CAAC,MAAM;gBAAE,KAAK,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CA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