@campfire-interactive/master-data-client 5.10.2 → 5.12.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/dist/types.d.ts CHANGED
@@ -877,7 +877,7 @@ export interface ListQuotesOptions {
877
877
  /**
878
878
  * `all` returns every status. `open` returns only the statuses still in
879
879
  * play — `OPEN_QUOTE_STATUSES`, i.e. everything but `awarded`, `lost` and
880
- * `not_taken`. (5.9.0)
880
+ * `not_taken`. (5.10.2)
881
881
  *
882
882
  * Omitting defaults to "not closed": `lost` and `not_taken` are excluded,
883
883
  * `awarded` is not. That default is deliberately unchanged — it is what
@@ -1265,6 +1265,8 @@ export interface RateElement {
1265
1265
  equipmentCode: string | null;
1266
1266
  equipmentId: string | null;
1267
1267
  skillClass: string | null;
1268
+ /** Product segment when the tenant's labor axis includes segment. */
1269
+ segment?: string | null;
1268
1270
  lane: string | null;
1269
1271
  mode: string | null;
1270
1272
  container: string | null;
@@ -1287,6 +1289,7 @@ export interface CreateRateElementInput {
1287
1289
  equipmentCode?: string | null;
1288
1290
  equipmentId?: string | null;
1289
1291
  skillClass?: string | null;
1292
+ segment?: string | null;
1290
1293
  lane?: string | null;
1291
1294
  mode?: string | null;
1292
1295
  container?: string | null;
@@ -1567,6 +1570,12 @@ export interface RekeyPlantsReport {
1567
1570
  equipmentIds: number;
1568
1571
  };
1569
1572
  }
1573
+ export interface RateSnapshotOptions {
1574
+ /** ISO date the snapshot is taken as of. Defaults to now. */
1575
+ asOf?: string;
1576
+ /** Scope elements and legacy entries to this plant (plus the global ones). */
1577
+ plantId?: string;
1578
+ }
1570
1579
  export interface RateSnapshot {
1571
1580
  asOf: string;
1572
1581
  books: Array<{
@@ -1591,6 +1600,7 @@ export interface RateSnapshot {
1591
1600
  equipmentCode: string | null;
1592
1601
  equipmentId: string | null;
1593
1602
  skillClass: string | null;
1603
+ segment?: string | null;
1594
1604
  lane: string | null;
1595
1605
  mode: string | null;
1596
1606
  container: string | null;
@@ -1715,6 +1725,11 @@ export interface RateSnapshot {
1715
1725
  ratePerKg: number | null;
1716
1726
  }>;
1717
1727
  }>;
1728
+ /** Which labor columns this tenant uses. Absent on older snapshots means skill only. */
1729
+ laborAxes?: {
1730
+ skill: boolean;
1731
+ segment: boolean;
1732
+ };
1718
1733
  }
1719
1734
  export type RateCategoryKind = 'material' | 'packaging' | 'freight' | 'labor';
1720
1735
  /** The active book summary (`GET /v1/rate-books/active` → `{ book }`). */
@@ -1796,6 +1811,10 @@ export interface CategoryRateRow {
1796
1811
  rate: number;
1797
1812
  origin: string;
1798
1813
  }>;
1814
+ skillClass?: string | null;
1815
+ segment?: string | null;
1816
+ lineCode?: string | null;
1817
+ lineLabel?: string | null;
1799
1818
  }
1800
1819
  /** A packaging-container option (`GET /v1/rate-containers` → `{ rows }`). */
1801
1820
  export interface RateContainer {
@@ -1851,6 +1870,7 @@ export interface AddRateElementsInput {
1851
1870
  lane?: string;
1852
1871
  mode?: string;
1853
1872
  skillClass?: string;
1873
+ segment?: string;
1854
1874
  entries: AddRateEntry[];
1855
1875
  }
1856
1876
  export interface AddRateElementsResult {
@@ -1928,6 +1948,7 @@ export interface RateBookExportRow {
1928
1948
  plantCode: string | null;
1929
1949
  /** equipmentCode | gradeCode | container | lane (the identity dim). */
1930
1950
  itemCode: string;
1951
+ segment?: string | null;
1931
1952
  itemLabel: string | null;
1932
1953
  lineCode: string | null;
1933
1954
  uom: string | null;
@@ -1955,6 +1976,7 @@ export interface RateBookImportRow {
1955
1976
  scope: 'plant' | 'global';
1956
1977
  plantCode?: string | null;
1957
1978
  itemCode: string;
1979
+ segment?: string | null;
1958
1980
  lineCode?: string | null;
1959
1981
  /** The value UoM when creating a new element. */
1960
1982
  uom?: string | null;
@@ -3950,4 +3972,211 @@ export interface AiLlmConfigRows {
3950
3972
  valid_providers: string[];
3951
3973
  suggested_models: Record<string, string[]>;
3952
3974
  }
3975
+ export type KnownWorkStepSubjectKind = 'quote' | 'vehicle_program' | 'launch_program';
3976
+ /** OPEN union: a new kind is an additive change, so do not switch exhaustively. */
3977
+ export type WorkStepSubjectKind = KnownWorkStepSubjectKind | (string & {});
3978
+ /** Stored state. `at_risk` and `past_due` are derived at read time (see WorkStepDisplayState). */
3979
+ export type WorkStepState = 'not_started' | 'open' | 'done';
3980
+ export type KnownWorkStepDisplayState = WorkStepState | 'at_risk' | 'past_due';
3981
+ export type WorkStepDisplayState = KnownWorkStepDisplayState | (string & {});
3982
+ /**
3983
+ * How the timing was obtained. `late` is only claimable for `measured` and
3984
+ * `signed_off`; everything else is a record, not a measurement.
3985
+ */
3986
+ export type KnownWorkStepCertainty = 'measured' | 'signed_off' | 'observed' | 'recorded' | 'untracked';
3987
+ export type WorkStepCertainty = KnownWorkStepCertainty | (string & {});
3988
+ /** The role a write is made on behalf of. The server checks it against the subject kind. */
3989
+ export type WorkStepCallerRole = 'omsf' | 'cpq' | 'pm' | 'admin';
3990
+ export type WorkStepStandardUnit = 'hours' | 'days';
3991
+ export type WorkStepSlaBasis = 'internal' | 'elapsed';
3992
+ export type WorkStepAnchor = 'award' | 'sop' | 'eop' | 'gap_fraction' | 'custom';
3993
+ export interface WorkStepDefinition {
3994
+ /** null when this is the platform default and the tenant has no row. */
3995
+ id: string | null;
3996
+ stepCode: string;
3997
+ subjectKind: WorkStepSubjectKind;
3998
+ variant: string;
3999
+ grain: 'subject' | 'child';
4000
+ plannedBasis: 'duration' | 'anchored_date' | 'fixed_date';
4001
+ label: string;
4002
+ milestone: string | null;
4003
+ sortOrder: number;
4004
+ parentCode: string | null;
4005
+ standardQty: number | null;
4006
+ standardUnit: WorkStepStandardUnit;
4007
+ slaBasis: WorkStepSlaBasis;
4008
+ anchor: WorkStepAnchor | null;
4009
+ anchorFraction: number | null;
4010
+ ownerRole: string | null;
4011
+ ownerScope: 'tenant' | 'child_team';
4012
+ measurementSource: string;
4013
+ active: boolean;
4014
+ /** true when a tenant row exists; false when this is the platform default. */
4015
+ customized: boolean;
4016
+ }
4017
+ export interface ListWorkStepDefinitionsOptions {
4018
+ /** Omit for every kind. */
4019
+ subjectKind?: WorkStepSubjectKind;
4020
+ /** 'default' or 'eco' (quote steps only). */
4021
+ variant?: string;
4022
+ includeInactive?: boolean;
4023
+ }
4024
+ export interface WorkStepDefinitionRowInput {
4025
+ stepCode: string;
4026
+ /** Program kinds only; the quote graph is fixed. */
4027
+ label?: string;
4028
+ milestone?: string | null;
4029
+ sortOrder?: number;
4030
+ standardQty?: number | null;
4031
+ standardUnit?: WorkStepStandardUnit;
4032
+ slaBasis?: WorkStepSlaBasis;
4033
+ anchor?: WorkStepAnchor | null;
4034
+ anchorFraction?: number | null;
4035
+ ownerRole?: string | null;
4036
+ active?: boolean;
4037
+ /** Custom (non-catalog) program steps only. */
4038
+ plannedBasis?: 'anchored_date' | 'fixed_date';
4039
+ }
4040
+ export interface SaveWorkStepDefinitionsInput {
4041
+ subjectKind: WorkStepSubjectKind;
4042
+ variant?: string;
4043
+ rows: WorkStepDefinitionRowInput[];
4044
+ /** Deactivate this kind's custom steps absent from `rows`. */
4045
+ archiveMissing?: boolean;
4046
+ }
4047
+ /** One execution of a step. Dates are ISO-8601 strings on the wire. */
4048
+ export interface WorkStepEpisode {
4049
+ id: string;
4050
+ subjectType: WorkStepSubjectKind;
4051
+ subjectId: string;
4052
+ /** '' for a subject-grain step. */
4053
+ childId: string;
4054
+ childLabel: string | null;
4055
+ stepCode: string;
4056
+ iteration: number;
4057
+ plannedStart: string | null;
4058
+ plannedEnd: string | null;
4059
+ actualStart: string | null;
4060
+ actualEnd: string | null;
4061
+ state: WorkStepState;
4062
+ certainty: WorkStepCertainty;
4063
+ openedBy: string | null;
4064
+ closedBy: string | null;
4065
+ reopenReason: string | null;
4066
+ createdAt: string;
4067
+ updatedAt: string;
4068
+ }
4069
+ export interface WorkStepSeriesEntry {
4070
+ subjectType: WorkStepSubjectKind;
4071
+ subjectId: string;
4072
+ childId: string;
4073
+ childLabel: string | null;
4074
+ stepCode: string;
4075
+ /** The latest iteration wins. */
4076
+ latest: WorkStepEpisode;
4077
+ iterations: number;
4078
+ reopenCount: number;
4079
+ derived: {
4080
+ displayState: WorkStepDisplayState;
4081
+ /** null when it cannot be claimed. */
4082
+ late: boolean | null;
4083
+ };
4084
+ }
4085
+ export interface WorkStepKeyInput {
4086
+ subjectType: WorkStepSubjectKind;
4087
+ subjectId: string;
4088
+ /** Required for per-child steps. */
4089
+ childId?: string;
4090
+ stepCode: string;
4091
+ callerRole: WorkStepCallerRole;
4092
+ }
4093
+ export interface OpenWorkStepInput extends WorkStepKeyInput {
4094
+ childLabel?: string | null;
4095
+ variant?: string;
4096
+ /** Plant whose calendar governs an internal-days standard. */
4097
+ calendarSourceId?: string | null;
4098
+ actualStart?: string | null;
4099
+ plannedStart?: string | null;
4100
+ plannedEnd?: string | null;
4101
+ openedBy?: string | null;
4102
+ }
4103
+ export interface CloseWorkStepInput extends WorkStepKeyInput {
4104
+ variant?: string;
4105
+ actualEnd?: string | null;
4106
+ closedBy?: string | null;
4107
+ childLabel?: string | null;
4108
+ }
4109
+ export interface ReopenWorkStepInput extends WorkStepKeyInput {
4110
+ variant?: string;
4111
+ calendarSourceId?: string | null;
4112
+ reopenReason: string;
4113
+ openedBy?: string | null;
4114
+ }
4115
+ export interface BatchWorkStepEpisodeRow {
4116
+ subjectType: WorkStepSubjectKind;
4117
+ subjectId: string;
4118
+ childId?: string;
4119
+ stepCode: string;
4120
+ /** The caller supplies the iteration here (default 1); open/reopen assign it server-side. */
4121
+ iteration?: number;
4122
+ childLabel?: string | null;
4123
+ plannedStart?: string | null;
4124
+ plannedEnd?: string | null;
4125
+ actualStart?: string | null;
4126
+ actualEnd?: string | null;
4127
+ state?: WorkStepState;
4128
+ certainty?: WorkStepCertainty;
4129
+ openedBy?: string | null;
4130
+ closedBy?: string | null;
4131
+ reopenReason?: string | null;
4132
+ }
4133
+ export interface BatchWorkStepEpisodesInput {
4134
+ callerRole: WorkStepCallerRole;
4135
+ /** 1 to 500. Duplicate keys within one batch are a 422. */
4136
+ episodes: BatchWorkStepEpisodeRow[];
4137
+ }
4138
+ export interface BatchWorkStepEpisodesResult {
4139
+ created: number;
4140
+ updated: number;
4141
+ unchanged: number;
4142
+ /** A done row is never regressed by a stale replay. */
4143
+ skipped: number;
4144
+ }
4145
+ export interface ListWorkStepEpisodesOptions {
4146
+ /** ISO-8601; the analytics feed's watermark. */
4147
+ updatedSince?: string;
4148
+ subjectType?: WorkStepSubjectKind;
4149
+ stepCode?: string;
4150
+ /** 1 to 1000. */
4151
+ limit?: number;
4152
+ cursor?: string;
4153
+ }
4154
+ export interface WorkingCalendarException {
4155
+ id: string;
4156
+ date: string;
4157
+ working: boolean;
4158
+ reason: string;
4159
+ }
4160
+ export interface WorkingCalendar {
4161
+ id: string;
4162
+ /** master-data Plant id. */
4163
+ productionSourceId: string;
4164
+ sourceLabel: string | null;
4165
+ /** UTC weekday numbers that are working days, 0 = Sunday. Never empty. */
4166
+ workingDays: number[];
4167
+ timeZone: string | null;
4168
+ exceptions?: WorkingCalendarException[];
4169
+ }
4170
+ export interface UpsertWorkingCalendarInput {
4171
+ sourceLabel?: string | null;
4172
+ workingDays?: number[];
4173
+ timeZone?: string | null;
4174
+ }
4175
+ export interface PutWorkingCalendarExceptionInput {
4176
+ /** YYYY-MM-DD */
4177
+ date: string;
4178
+ /** Default false (a non-working day); true is a make-up working day. */
4179
+ working?: boolean;
4180
+ reason: string;
4181
+ }
3953
4182
  //# sourceMappingURL=types.d.ts.map