@campfire-interactive/master-data-client 4.27.0 → 4.30.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,132 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RateLibraryResource = void 0;
4
+ class RateEntryResource {
5
+ http;
6
+ constructor(http) {
7
+ this.http = http;
8
+ }
9
+ async list(libraryId, options = {}) {
10
+ const query = {};
11
+ if (options.kind)
12
+ query.kind = options.kind;
13
+ return this.http.request({
14
+ method: 'GET',
15
+ path: `/v1/rate-libraries/${encodeURIComponent(libraryId)}/entries`,
16
+ query,
17
+ });
18
+ }
19
+ async create(libraryId, input, idempotencyKey) {
20
+ return this.http.request({
21
+ method: 'POST',
22
+ path: `/v1/rate-libraries/${encodeURIComponent(libraryId)}/entries`,
23
+ body: input,
24
+ idempotencyKey,
25
+ });
26
+ }
27
+ async update(libraryId, entryId, input, idempotencyKey) {
28
+ return this.http.request({
29
+ method: 'PUT',
30
+ path: `/v1/rate-libraries/${encodeURIComponent(libraryId)}/entries/${encodeURIComponent(entryId)}`,
31
+ body: input,
32
+ idempotencyKey,
33
+ });
34
+ }
35
+ async remove(libraryId, entryId) {
36
+ await this.http.request({
37
+ method: 'DELETE',
38
+ path: `/v1/rate-libraries/${encodeURIComponent(libraryId)}/entries/${encodeURIComponent(entryId)}`,
39
+ });
40
+ }
41
+ }
42
+ class RateLibraryResource {
43
+ http;
44
+ entries;
45
+ constructor(http) {
46
+ this.http = http;
47
+ this.entries = new RateEntryResource(http);
48
+ }
49
+ async list(options) {
50
+ const query = {};
51
+ if (options) {
52
+ if (options.limit !== undefined)
53
+ query.limit = String(options.limit);
54
+ if (options.cursor)
55
+ query.cursor = options.cursor;
56
+ if (options.sort)
57
+ query.sort = options.sort;
58
+ if (options.q)
59
+ query.q = options.q;
60
+ if (options.status)
61
+ query.status = options.status;
62
+ if (options.asOf)
63
+ query.asOf = options.asOf;
64
+ if (options.code)
65
+ query.code = options.code;
66
+ if (options.currency)
67
+ query.currency = options.currency;
68
+ }
69
+ return this.http.request({
70
+ method: 'GET',
71
+ path: '/v1/rate-libraries',
72
+ query,
73
+ });
74
+ }
75
+ async get(id, options) {
76
+ const query = {};
77
+ if (options?.include && options.include.length > 0) {
78
+ query.include = options.include.join(',');
79
+ }
80
+ return this.http.request({
81
+ method: 'GET',
82
+ path: `/v1/rate-libraries/${encodeURIComponent(id)}`,
83
+ query,
84
+ });
85
+ }
86
+ async create(input, idempotencyKey) {
87
+ return this.http.request({
88
+ method: 'POST',
89
+ path: '/v1/rate-libraries',
90
+ body: input,
91
+ idempotencyKey,
92
+ });
93
+ }
94
+ async update(id, input, idempotencyKey) {
95
+ return this.http.request({
96
+ method: 'PUT',
97
+ path: `/v1/rate-libraries/${encodeURIComponent(id)}`,
98
+ body: input,
99
+ idempotencyKey,
100
+ });
101
+ }
102
+ async publish(id, idempotencyKey) {
103
+ return this.http.request({
104
+ method: 'POST',
105
+ path: `/v1/rate-libraries/${encodeURIComponent(id)}/publish`,
106
+ body: {},
107
+ idempotencyKey,
108
+ });
109
+ }
110
+ async archive(id) {
111
+ await this.http.request({
112
+ method: 'DELETE',
113
+ path: `/v1/rate-libraries/${encodeURIComponent(id)}`,
114
+ });
115
+ }
116
+ async fork(id, idempotencyKey) {
117
+ return this.http.request({
118
+ method: 'POST',
119
+ path: `/v1/rate-libraries/${encodeURIComponent(id)}/fork`,
120
+ body: {},
121
+ idempotencyKey,
122
+ });
123
+ }
124
+ async getAudit(id) {
125
+ return this.http.request({
126
+ method: 'GET',
127
+ path: `/v1/rate-libraries/${encodeURIComponent(id)}/audit`,
128
+ });
129
+ }
130
+ }
131
+ exports.RateLibraryResource = RateLibraryResource;
132
+ //# sourceMappingURL=rateLibraries.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rateLibraries.js","sourceRoot":"","sources":["../src/rateLibraries.ts"],"names":[],"mappings":";;;AAkBA,MAAM,i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AAC,EAAE,CAAC,EAAE;SACrD,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,EAAU,EAAE,cAAuB;QAC5C,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAA8B;YACpD,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,sBAAsB,kBAAkB,CAAC,EAAE,CAAC,OAAO;YACzD,IAAI,EAAE,EAAE;YACR,cAAc;SACf,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,EAAU;QACvB,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAA8B;YACpD,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,sBAAsB,kBAAkB,CAAC,EAAE,CAAC,QAAQ;SAC3D,CAAC,CAAC;IACL,CAAC;CACF;AA9FD,kDA8FC"}
@@ -0,0 +1,14 @@
1
+ import { HttpTransport } from './http';
2
+ import type { Supplier, AuditLogEntry, CreateSupplierInput, UpdateSupplierInput, MergeRequest, ListSuppliersOptions, GetSupplierOptions, SingleResponse, ListResponse, CreateResponse } from './types';
3
+ export declare class SupplierResource {
4
+ private readonly http;
5
+ constructor(http: HttpTransport);
6
+ list(options?: ListSuppliersOptions): Promise<ListResponse<Supplier>>;
7
+ get(id: string, options?: GetSupplierOptions): Promise<SingleResponse<Supplier>>;
8
+ create(input: CreateSupplierInput, idempotencyKey?: string): Promise<CreateResponse<Supplier>>;
9
+ update(id: string, input: UpdateSupplierInput, idempotencyKey?: string): Promise<SingleResponse<Supplier>>;
10
+ archive(id: string): Promise<void>;
11
+ merge(request: MergeRequest, idempotencyKey?: string): Promise<SingleResponse<Supplier>>;
12
+ getAudit(id: string): Promise<ListResponse<AuditLogEntry>>;
13
+ }
14
+ //# sourceMappingURL=suppliers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"suppliers.d.ts","sourceRoot":"","sources":["../src/suppliers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,KAAK,EACV,QAAQ,EACR,aAAa,EACb,mBAAmB,EACnB,mBAAmB,EACnB,YAAY,EACZ,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,EACd,YAAY,EACZ,cAAc,EACf,MAAM,SAAS,CAAC;AAEjB,qBAAa,gBAAgB;IACf,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,aAAa;IAE1C,IAAI,CAAC,OAAO,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;IAmBrE,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;IAYhF,MAAM,CACV,KAAK,EAAE,mBAAmB,EAC1B,cAAc,CAAC,EAAE,MAAM,GACtB,OAAO,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;IAS9B,MAAM,CACV,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,mBAAmB,EAC1B,cAAc,CAAC,EAAE,MAAM,GACtB,OAAO,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;IAS9B,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAOlC,KAAK,CACT,OAAO,EAAE,YAAY,EACrB,cAAc,CAAC,EAAE,MAAM,GACtB,OAAO,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;IAS9B,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC;CAMjE"}
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SupplierResource = void 0;
4
+ class SupplierResource {
5
+ http;
6
+ constructor(http) {
7
+ this.http = http;
8
+ }
9
+ async list(options) {
10
+ const query = {};
11
+ if (options) {
12
+ if (options.limit !== undefined)
13
+ query.limit = String(options.limit);
14
+ if (options.cursor)
15
+ query.cursor = options.cursor;
16
+ if (options.sort)
17
+ query.sort = options.sort;
18
+ if (options.q)
19
+ query.q = options.q;
20
+ if (options.status)
21
+ query.status = options.status;
22
+ if (options.country)
23
+ query.country = options.country;
24
+ if (options.quality)
25
+ query.quality = options.quality;
26
+ if (options.include)
27
+ query.include = options.include.join(',');
28
+ }
29
+ return this.http.request({
30
+ method: 'GET',
31
+ path: '/v1/suppliers',
32
+ query,
33
+ });
34
+ }
35
+ async get(id, options) {
36
+ const query = {};
37
+ if (options?.include) {
38
+ query.include = options.include.join(',');
39
+ }
40
+ return this.http.request({
41
+ method: 'GET',
42
+ path: `/v1/suppliers/${encodeURIComponent(id)}`,
43
+ query,
44
+ });
45
+ }
46
+ async create(input, idempotencyKey) {
47
+ return this.http.request({
48
+ method: 'POST',
49
+ path: '/v1/suppliers',
50
+ body: input,
51
+ idempotencyKey,
52
+ });
53
+ }
54
+ async update(id, input, idempotencyKey) {
55
+ return this.http.request({
56
+ method: 'PUT',
57
+ path: `/v1/suppliers/${encodeURIComponent(id)}`,
58
+ body: input,
59
+ idempotencyKey,
60
+ });
61
+ }
62
+ async archive(id) {
63
+ await this.http.request({
64
+ method: 'DELETE',
65
+ path: `/v1/suppliers/${encodeURIComponent(id)}`,
66
+ });
67
+ }
68
+ async merge(request, idempotencyKey) {
69
+ return this.http.request({
70
+ method: 'POST',
71
+ path: '/v1/suppliers/merge',
72
+ body: request,
73
+ idempotencyKey,
74
+ });
75
+ }
76
+ async getAudit(id) {
77
+ return this.http.request({
78
+ method: 'GET',
79
+ path: `/v1/suppliers/${encodeURIComponent(id)}/audit`,
80
+ });
81
+ }
82
+ }
83
+ exports.SupplierResource = SupplierResource;
84
+ //# sourceMappingURL=suppliers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"suppliers.js","sourceRoot":"","sources":["../src/suppliers.ts"],"names":[],"mappings":";;;AAcA,MAAa,gBAAgB;IACE;IAA7B,YAA6B,IA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C,EAAE,CAAC,QAAQ;SACtD,CAAC,CAAC;IACL,CAAC;CACF;AApFD,4CAoFC"}
package/dist/types.d.ts CHANGED
@@ -208,6 +208,30 @@ export interface Quote {
208
208
  effectivePricedAt: string | null;
209
209
  effectivePricedBy: string | null;
210
210
  effectivePriceBreakdown: unknown;
211
+ /**
212
+ * Quote-level EXPENDITURE (4.28.0) — capital, tooling and ED&D. Cash the
213
+ * supplier spends that the customer does not own or fund, held outside the
214
+ * per-part cost buildup. Third member of the effective-* family above, and
215
+ * published the same way: whichever engine resolved them calls
216
+ * {@link QuotesApi.setExpenditure}.
217
+ *
218
+ * Gross and customer-funded stay separate; the consumer subtracts. Decimals
219
+ * serialized as strings to preserve precision, exactly like the two above.
220
+ *
221
+ * **Null means NOT PUBLISHED, and that is not the same as zero.** OMSF's
222
+ * approval routing HOLDS a quote whose figure is unpublished rather than
223
+ * routing it at a lower level on an unknown, so do not coalesce these to 0
224
+ * on the way in.
225
+ */
226
+ expenditureCapitalGross: string | null;
227
+ expenditureCapitalFunded: string | null;
228
+ expenditureToolingGross: string | null;
229
+ expenditureToolingFunded: string | null;
230
+ expenditureEddGross: string | null;
231
+ expenditureEddFunded: string | null;
232
+ expenditureSource: string | null;
233
+ expenditureAt: string | null;
234
+ expenditureBy: string | null;
211
235
  dueDate: string | null;
212
236
  sopDate: string | null;
213
237
  eopDate: string | null;
@@ -345,6 +369,33 @@ export interface SetEffectiveCostInput {
345
369
  /** Which app is writing — gated to 'omsf' | 'cpq' | 'admin' server-side. */
346
370
  callerRole: 'omsf' | 'cpq' | 'admin';
347
371
  }
372
+ /**
373
+ * Quote-level expenditure publish (4.28.0).
374
+ *
375
+ * Every figure is OPTIONAL and STICKY: omit a bucket and its stored value is
376
+ * left alone; pass `null` to clear it back to unpublished. A partial
377
+ * re-statement never silently wipes what it did not mention.
378
+ *
379
+ * **`null` is not `0`.** A bucket nobody has costed must be published as null
380
+ * (or left out) — the consumer holds approval routing on an unpublished figure,
381
+ * whereas a confirmed zero routes normally. Sending 0 for "we don't know yet"
382
+ * routes the quote as though somebody had checked.
383
+ *
384
+ * Amounts are per QUOTE, not per line: a publisher holding per-line figures
385
+ * (CPQ's investment lines) sums them before calling.
386
+ */
387
+ export interface SetQuoteExpenditureInput {
388
+ capitalGross?: number | null;
389
+ capitalFunded?: number | null;
390
+ toolingGross?: number | null;
391
+ toolingFunded?: number | null;
392
+ eddGross?: number | null;
393
+ eddFunded?: number | null;
394
+ /** 'cpq' | 'manual' | 'external' — declared by the engine. */
395
+ source: string;
396
+ /** Which app is writing — gated to 'omsf' | 'cpq' | 'admin' server-side. */
397
+ callerRole: 'omsf' | 'cpq' | 'admin';
398
+ }
348
399
  export interface SetEffectivePriceInput {
349
400
  unitPrice: number;
350
401
  /** 'cpq' | 'omsf' | 'manual' | 'external' — declared by the adapter. */
@@ -3184,4 +3235,79 @@ export interface MasterDataClientConfig {
3184
3235
  /** When set, sends X-Target-Tenant header on every request (platform tenant override). */
3185
3236
  targetTenantId?: string;
3186
3237
  }
3238
+ export type QuoteDocumentStage = 'feasibility' | 'award';
3239
+ /** Quote-level (one document for the quote) or one per finished good. The
3240
+ * expected count for `finished_good` is DERIVED from the quote's lines by the
3241
+ * evaluator and never stored, so adding a line moves a requirement from
3242
+ * 3-of-3 to 3-of-4 retroactively. */
3243
+ export type QuoteDocumentGrain = 'quote' | 'finished_good';
3244
+ export type QuoteDocumentRequirementStatus = 'active' | 'archived';
3245
+ export interface QuoteDocumentRequirement {
3246
+ id: string;
3247
+ tenantId: string;
3248
+ stage: QuoteDocumentStage;
3249
+ label: string;
3250
+ description: string;
3251
+ sortOrder: number;
3252
+ /** Whether the gate is held until this is satisfied. Optional rows are shown
3253
+ * and fillable but never block. */
3254
+ isRequired: boolean;
3255
+ status: QuoteDocumentRequirementStatus;
3256
+ /** The DMS document-type id this requirement expects. A registry key, not a
3257
+ * foreign key — master-data stores it opaquely and never validates it
3258
+ * against DMS. Null means untyped: fillable by uploading through the
3259
+ * requirement, but never matchable automatically. */
3260
+ docTypeId: string | null;
3261
+ grain: QuoteDocumentGrain;
3262
+ createdBy: string;
3263
+ updatedBy: string;
3264
+ createdAt: string;
3265
+ updatedAt: string;
3266
+ }
3267
+ export interface CreateQuoteDocumentRequirementInput {
3268
+ stage: QuoteDocumentStage;
3269
+ label: string;
3270
+ description?: string;
3271
+ sortOrder?: number;
3272
+ isRequired?: boolean;
3273
+ docTypeId?: string | null;
3274
+ grain?: QuoteDocumentGrain;
3275
+ }
3276
+ /** `stage` is absent on purpose: a requirement cannot move gates. The documents
3277
+ * answering it were placed against THIS gate, so carrying them across would be
3278
+ * silently wrong — archive and re-add instead. */
3279
+ export interface UpdateQuoteDocumentRequirementInput {
3280
+ label?: string;
3281
+ description?: string;
3282
+ sortOrder?: number;
3283
+ isRequired?: boolean;
3284
+ docTypeId?: string | null;
3285
+ grain?: QuoteDocumentGrain;
3286
+ status?: QuoteDocumentRequirementStatus;
3287
+ }
3288
+ export interface ListQuoteDocumentRequirementsOptions {
3289
+ /** Narrow to one gate. Omit for every stage. */
3290
+ stage?: QuoteDocumentStage;
3291
+ /** Include archived rows. Default false — active only. */
3292
+ includeArchived?: boolean;
3293
+ }
3294
+ export interface BatchQuoteDocumentRequirementRow {
3295
+ /** Optional. An id the server has never seen is CREATED with that id, which
3296
+ * is what lets a migration preserve the ids its document links reference. */
3297
+ id?: string;
3298
+ label: string;
3299
+ description?: string;
3300
+ sortOrder?: number;
3301
+ isRequired?: boolean;
3302
+ docTypeId?: string | null;
3303
+ grain?: QuoteDocumentGrain;
3304
+ status?: QuoteDocumentRequirementStatus;
3305
+ }
3306
+ export interface BatchQuoteDocumentRequirementsInput {
3307
+ stage: QuoteDocumentStage;
3308
+ rows: BatchQuoteDocumentRequirementRow[];
3309
+ /** Archive active rows of this stage absent from `rows`. Default false — an
3310
+ * importer or a migration replays a subset and must not retire the rest. */
3311
+ archiveMissing?: boolean;
3312
+ }
3187
3313
  //# sourceMappingURL=types.d.ts.map