@spotto/contract 1.0.70-alpha.4 → 1.0.70-alpha.5
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/assets/[id]/get.d.ts +9 -1
- package/dist/assets/[id]/patch/request.d.ts +5 -0
- package/dist/assets/get/query.d.ts +6 -3
- package/dist/assets/post/request.d.ts +2 -0
- package/dist/assets/post/request.js.map +1 -1
- package/dist/fields/constants.d.ts +19 -0
- package/dist/fields/constants.js +15 -1
- package/dist/fields/constants.js.map +1 -1
- package/dist/shared/index.d.ts +1 -0
- package/dist/shared/index.js +1 -0
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/readiness.d.ts +58 -0
- package/dist/shared/readiness.js +11 -0
- package/dist/shared/readiness.js.map +1 -0
- package/dist/types/[id]/get.d.ts +15 -2
- package/dist/types/[id]/patch/request.d.ts +13 -2
- package/dist/types/post/request.d.ts +15 -2
- package/dist/types/post/request.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Point } from 'geojson';
|
|
2
2
|
import { IEmbeddedLabel } from '../../labels';
|
|
3
3
|
import { LocationStatus, LocationType } from '../../locations/constants';
|
|
4
|
-
import { IEntityMeta, IEmbeddedEntity } from '../../shared';
|
|
4
|
+
import { IEntityMeta, IEmbeddedEntity, IReadiness } from '../../shared';
|
|
5
5
|
import { IAssetTelemetry } from '../../telemetry';
|
|
6
6
|
import { IFieldValue } from '../../types';
|
|
7
7
|
export interface ILastLocation {
|
|
@@ -74,4 +74,12 @@ export interface GetAssetResponse {
|
|
|
74
74
|
homeLocationPath?: string;
|
|
75
75
|
readers?: IEmbeddedEntity[];
|
|
76
76
|
manifestIds?: string[];
|
|
77
|
+
typeKit?: boolean;
|
|
78
|
+
groupParentId?: string;
|
|
79
|
+
groupAncestors?: string[];
|
|
80
|
+
groupMember?: boolean;
|
|
81
|
+
groupChildCount?: number;
|
|
82
|
+
groupSatisfiesKit?: boolean;
|
|
83
|
+
readiness?: IReadiness;
|
|
84
|
+
timeSensitive?: boolean;
|
|
77
85
|
}
|
|
@@ -8,4 +8,9 @@ export interface UpdateAssetRequest {
|
|
|
8
8
|
fieldValues?: IFieldValueWithConstraints[];
|
|
9
9
|
homeLocationId?: string;
|
|
10
10
|
manifestIds?: string[];
|
|
11
|
+
/**
|
|
12
|
+
* Kit membership (G2G M2): a kit id joins/moves the asset under that kit,
|
|
13
|
+
* `null` leaves its current kit, omitted leaves membership unchanged.
|
|
14
|
+
*/
|
|
15
|
+
groupParentId?: string | null;
|
|
11
16
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { DateCondition, SearchableSortFields, SortOrders } from '../../shared';
|
|
1
|
+
import { DateCondition, ReadinessState, SearchableSortFields, SortOrders } from '../../shared';
|
|
2
2
|
import { LocationStatus } from '../../locations/constants';
|
|
3
3
|
export declare type AssetSearchField = 'name' | 'tagIds';
|
|
4
|
-
export declare type AssetEmbedField = 'meta' | 'tagIds' | 'candidateLocations' | 'telemetry' | 'readers';
|
|
5
|
-
export declare type AssetSortField = SearchableSortFields | 'battery';
|
|
4
|
+
export declare type AssetEmbedField = 'meta' | 'tagIds' | 'candidateLocations' | 'telemetry' | 'readers' | 'readiness';
|
|
5
|
+
export declare type AssetSortField = SearchableSortFields | 'battery' | 'ready';
|
|
6
6
|
export declare type AssetBatteryStatus = 'critical' | 'low' | 'ok';
|
|
7
7
|
declare type _CustomFieldsAssetFilterBase = {
|
|
8
8
|
id: string;
|
|
@@ -50,6 +50,9 @@ export interface AssetFilters {
|
|
|
50
50
|
supportsWith?: boolean;
|
|
51
51
|
withAsset?: boolean;
|
|
52
52
|
dispatched?: boolean;
|
|
53
|
+
timeSensitive?: boolean;
|
|
54
|
+
ready?: ReadinessState[];
|
|
55
|
+
hasReadyIssues?: boolean;
|
|
53
56
|
createdAt?: DateCondition[];
|
|
54
57
|
updatedAt?: DateCondition[];
|
|
55
58
|
lastSeen?: DateCondition[];
|
|
@@ -8,6 +8,8 @@ export interface PostAssetRequest {
|
|
|
8
8
|
fieldValues?: IFieldValueWithConstraints[];
|
|
9
9
|
homeLocationId?: string;
|
|
10
10
|
manifestIds?: string[];
|
|
11
|
+
/** Join a kit at creation — the direct parent kit's id (G2G M2). */
|
|
12
|
+
groupParentId?: string;
|
|
11
13
|
}
|
|
12
14
|
export declare type PostAssetsRequest = PostAssetRequest[];
|
|
13
15
|
export declare const testPostAssetRequest: PostAssetRequest;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.js","sourceRoot":"","sources":["../../../src/assets/post/request.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"request.js","sourceRoot":"","sources":["../../../src/assets/post/request.ts"],"names":[],"mappings":";;;AAiBA,QAAQ;AACK,QAAA,oBAAoB,GAAqB;IACpD,IAAI,EAAE,MAAM;IACZ,UAAU,EAAE,MAAM;IAClB,MAAM,EAAE,OAAO;CAChB,CAAA"}
|
|
@@ -2,3 +2,22 @@ export declare type FieldDataType = 'STRING' | 'INTEGER' | 'DECIMAL' | 'BOOLEAN'
|
|
|
2
2
|
export declare const FIELD_DATA_TYPES: FieldDataType[];
|
|
3
3
|
export declare type FieldInputType = 'SINGLELINE' | 'MULTILINE' | 'LINK' | 'RICHTEXT' | 'DROPDOWN' | 'RADIO' | 'CHECKBOXES' | 'DATE' | 'DATETIME' | 'INTEGER' | 'DECIMAL' | 'SWITCH';
|
|
4
4
|
export declare const FIELD_INPUT_TYPES: FieldInputType[];
|
|
5
|
+
export declare type FieldSource = 'INPUT' | 'COMPUTED' | 'AGGREGATED';
|
|
6
|
+
export declare const FIELD_SOURCES: FieldSource[];
|
|
7
|
+
export declare type AggregateFunction = 'SUM' | 'AVG' | 'MIN' | 'MAX' | 'COUNT';
|
|
8
|
+
export declare const AGGREGATE_FUNCTIONS: AggregateFunction[];
|
|
9
|
+
/**
|
|
10
|
+
* A per-type field-binding delta, layered onto the inherited field identity
|
|
11
|
+
* (`fieldsAll = parent.fieldsAll ⊕ fields`). Omitted `source` on an override =
|
|
12
|
+
* inherit; explicit `INPUT` = reset to user-entered.
|
|
13
|
+
* - `expression` — COMPUTED: excelexp over the asset's other fields.
|
|
14
|
+
* - `visibleWhen` — conditional visibility (client-render only).
|
|
15
|
+
* - `function` — AGGREGATED (M2 — kits): the same field is reduced across
|
|
16
|
+
* a kit's direct members.
|
|
17
|
+
*/
|
|
18
|
+
export interface IFieldBindingDelta {
|
|
19
|
+
source?: FieldSource;
|
|
20
|
+
expression?: string;
|
|
21
|
+
visibleWhen?: string;
|
|
22
|
+
function?: AggregateFunction;
|
|
23
|
+
}
|
package/dist/fields/constants.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FIELD_INPUT_TYPES = exports.FIELD_DATA_TYPES = void 0;
|
|
3
|
+
exports.AGGREGATE_FUNCTIONS = exports.FIELD_SOURCES = exports.FIELD_INPUT_TYPES = exports.FIELD_DATA_TYPES = void 0;
|
|
4
4
|
const dataTypes = {
|
|
5
5
|
STRING: null,
|
|
6
6
|
INTEGER: null,
|
|
@@ -25,4 +25,18 @@ const inputTypes = {
|
|
|
25
25
|
SWITCH: null,
|
|
26
26
|
};
|
|
27
27
|
exports.FIELD_INPUT_TYPES = Object.keys(inputTypes);
|
|
28
|
+
const fieldSources = {
|
|
29
|
+
INPUT: null,
|
|
30
|
+
COMPUTED: null,
|
|
31
|
+
AGGREGATED: null,
|
|
32
|
+
};
|
|
33
|
+
exports.FIELD_SOURCES = Object.keys(fieldSources);
|
|
34
|
+
const aggregateFunctions = {
|
|
35
|
+
SUM: null,
|
|
36
|
+
AVG: null,
|
|
37
|
+
MIN: null,
|
|
38
|
+
MAX: null,
|
|
39
|
+
COUNT: null,
|
|
40
|
+
};
|
|
41
|
+
exports.AGGREGATE_FUNCTIONS = Object.keys(aggregateFunctions);
|
|
28
42
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/fields/constants.ts"],"names":[],"mappings":";;;AAQA,MAAM,SAAS,GAAqC;IAClD,MAAM,EAAE,IAAI;IACZ,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,IAAI;IACb,IAAI,EAAE,IAAI;IACV,QAAQ,EAAE,IAAI;CACf,CAAA;AAEY,QAAA,gBAAgB,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,CAAoB,CAAA;AAgBzE,MAAM,UAAU,GAAsC;IACpD,UAAU,EAAE,IAAI;IAChB,SAAS,EAAE,IAAI;IACf,IAAI,EAAE,IAAI;IACV,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE,IAAI;IACX,UAAU,EAAE,IAAI;IAChB,IAAI,EAAE,IAAI;IACV,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,IAAI;IACb,MAAM,EAAE,IAAI;CACb,CAAA;AAEY,QAAA,iBAAiB,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAqB,CAAA"}
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/fields/constants.ts"],"names":[],"mappings":";;;AAQA,MAAM,SAAS,GAAqC;IAClD,MAAM,EAAE,IAAI;IACZ,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,IAAI;IACb,IAAI,EAAE,IAAI;IACV,QAAQ,EAAE,IAAI;CACf,CAAA;AAEY,QAAA,gBAAgB,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,CAAoB,CAAA;AAgBzE,MAAM,UAAU,GAAsC;IACpD,UAAU,EAAE,IAAI;IAChB,SAAS,EAAE,IAAI;IACf,IAAI,EAAE,IAAI;IACV,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE,IAAI;IACX,UAAU,EAAE,IAAI;IAChB,IAAI,EAAE,IAAI;IACV,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,IAAI;IACb,MAAM,EAAE,IAAI;CACb,CAAA;AAEY,QAAA,iBAAiB,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAqB,CAAA;AAS5E,MAAM,YAAY,GAAmC;IACnD,KAAK,EAAE,IAAI;IACX,QAAQ,EAAE,IAAI;IACd,UAAU,EAAE,IAAI;CACjB,CAAA;AAEY,QAAA,aAAa,GAAG,MAAM,CAAC,IAAI,CAAC,YAAY,CAAkB,CAAA;AAIvE,MAAM,kBAAkB,GAAyC;IAC/D,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,IAAI;IACT,KAAK,EAAE,IAAI;CACZ,CAAA;AAEY,QAAA,mBAAmB,GAAG,MAAM,CAAC,IAAI,CAC5C,kBAAkB,CACI,CAAA"}
|
package/dist/shared/index.d.ts
CHANGED
package/dist/shared/index.js
CHANGED
|
@@ -25,4 +25,5 @@ __exportStar(require("./sort"), exports);
|
|
|
25
25
|
__exportStar(require("./timezone"), exports);
|
|
26
26
|
__exportStar(require("./timestamp"), exports);
|
|
27
27
|
__exportStar(require("./relative-date"), exports);
|
|
28
|
+
__exportStar(require("./readiness"), exports);
|
|
28
29
|
//# sourceMappingURL=index.js.map
|
package/dist/shared/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/shared/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAsB;AACtB,2CAAwB;AACxB,0CAAuB;AACvB,2CAAwB;AACxB,4CAAyB;AACzB,yCAAsB;AACtB,0CAAuB;AACvB,yCAAsB;AACtB,6CAA0B;AAC1B,8CAA2B;AAC3B,kDAA+B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/shared/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAsB;AACtB,2CAAwB;AACxB,0CAAuB;AACvB,2CAAwB;AACxB,4CAAyB;AACzB,yCAAsB;AACtB,0CAAuB;AACvB,yCAAsB;AACtB,6CAA0B;AAC1B,8CAA2B;AAC3B,kDAA+B;AAC/B,8CAA2B"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Good-to-Go (G2G) asset readiness — shared API contract shapes.
|
|
3
|
+
*
|
|
4
|
+
* Readiness rules are authored on types (and inherited like fields), evaluated
|
|
5
|
+
* against an asset's field values by the excelexp engine. A rule whose
|
|
6
|
+
* expression evaluates TRUE raises an issue at its level; an asset's overall
|
|
7
|
+
* `ready` is the worst level among its issues.
|
|
8
|
+
*/
|
|
9
|
+
/** Readiness severity: 1 = amber (warning), 2 = red (blocking). */
|
|
10
|
+
export declare type ReadinessLevel = 1 | 2;
|
|
11
|
+
/** Overall readiness: 0 = ready (green), else the worst issue level. */
|
|
12
|
+
export declare type ReadinessState = 0 | ReadinessLevel;
|
|
13
|
+
/**
|
|
14
|
+
* An authored readiness rule on a type. `expression` is an excelexp boolean;
|
|
15
|
+
* when it evaluates TRUE the issue fires at `level` with `message` rendered as
|
|
16
|
+
* a `{FieldName}` template.
|
|
17
|
+
*/
|
|
18
|
+
export interface IReadinessRule {
|
|
19
|
+
level: ReadinessLevel;
|
|
20
|
+
expression: string;
|
|
21
|
+
message: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* A resolved rule (own + inherited), carrying the path of the type that
|
|
25
|
+
* authored it — mirrors how `IFieldDefinitionAll` carries `typePath`.
|
|
26
|
+
*/
|
|
27
|
+
export interface IReadinessRuleAll extends IReadinessRule {
|
|
28
|
+
/** Id of the type that authored the rule. */
|
|
29
|
+
typeId: string;
|
|
30
|
+
typePath: string;
|
|
31
|
+
}
|
|
32
|
+
/** A fired readiness issue on an asset. */
|
|
33
|
+
export interface IReadinessIssue {
|
|
34
|
+
/** The type that authored the fired rule. */
|
|
35
|
+
typeId: string;
|
|
36
|
+
/**
|
|
37
|
+
* The asset the issue came from: the asset itself for a leaf, or a member
|
|
38
|
+
* for a kit (kit issues are materialized copies of member issues).
|
|
39
|
+
*/
|
|
40
|
+
assetId: string;
|
|
41
|
+
assetName: string;
|
|
42
|
+
level: ReadinessLevel;
|
|
43
|
+
/** Rendered message (the rule's `message` template with field values). */
|
|
44
|
+
reason: string;
|
|
45
|
+
/**
|
|
46
|
+
* Referenced DATE / number fields that had no value, causing the rule to
|
|
47
|
+
* fail closed. Present only when the issue fired on missing data.
|
|
48
|
+
*/
|
|
49
|
+
missingFields?: string[];
|
|
50
|
+
}
|
|
51
|
+
/** Stored/returned readiness for an asset. */
|
|
52
|
+
export interface IReadiness {
|
|
53
|
+
/** Worst level among `readyIssues`; 0 = ready (green). */
|
|
54
|
+
ready: ReadinessState;
|
|
55
|
+
readyIssues: IReadinessIssue[];
|
|
56
|
+
/** Epoch ms of the evaluation that produced this result. */
|
|
57
|
+
evaluatedAt?: number;
|
|
58
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Good-to-Go (G2G) asset readiness — shared API contract shapes.
|
|
4
|
+
*
|
|
5
|
+
* Readiness rules are authored on types (and inherited like fields), evaluated
|
|
6
|
+
* against an asset's field values by the excelexp engine. A rule whose
|
|
7
|
+
* expression evaluates TRUE raises an issue at its level; an asset's overall
|
|
8
|
+
* `ready` is the worst level among its issues.
|
|
9
|
+
*/
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
//# sourceMappingURL=readiness.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readiness.js","sourceRoot":"","sources":["../../src/shared/readiness.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG"}
|
package/dist/types/[id]/get.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { GetFieldResponse } from '../../fields/[id]/get';
|
|
2
|
-
import {
|
|
2
|
+
import { IFieldBindingDelta } from '../../fields';
|
|
3
|
+
import { IEmbeddedEntity, IReadinessRule, IReadinessRuleAll } from '../../shared';
|
|
3
4
|
export interface IFieldValue {
|
|
4
5
|
id: string;
|
|
5
6
|
name: string;
|
|
@@ -9,8 +10,16 @@ export interface IFieldValue {
|
|
|
9
10
|
valueBoolean?: boolean;
|
|
10
11
|
valueDate?: string;
|
|
11
12
|
valueDateTime?: Date;
|
|
13
|
+
/** True when the value was derived by a COMPUTED/AGGREGATED binding (read-only). */
|
|
14
|
+
computed?: boolean;
|
|
12
15
|
}
|
|
13
|
-
|
|
16
|
+
/**
|
|
17
|
+
* A resolved field on a type (own + inherited), carrying its authoring
|
|
18
|
+
* `typePath` and any binding delta (`source`/`expression`/`visibleWhen`). The
|
|
19
|
+
* server-computed metadata (`referencedFields`/`timeSensitive`) is internal and
|
|
20
|
+
* not surfaced here.
|
|
21
|
+
*/
|
|
22
|
+
export interface IFieldDefinitionAll extends GetFieldResponse, IFieldBindingDelta {
|
|
14
23
|
typePath: string;
|
|
15
24
|
}
|
|
16
25
|
export interface IFieldValueAll extends IFieldValue {
|
|
@@ -36,4 +45,8 @@ export interface GetTypeResponse {
|
|
|
36
45
|
manifestId?: string;
|
|
37
46
|
manifestIds?: string[];
|
|
38
47
|
supportsStocktake?: boolean;
|
|
48
|
+
/** Assets of this type are kits (containers) — G2G M2. */
|
|
49
|
+
typeKit?: boolean;
|
|
50
|
+
readinessRules?: IReadinessRule[];
|
|
51
|
+
readinessRulesAll?: IReadinessRuleAll[];
|
|
39
52
|
}
|
|
@@ -1,13 +1,24 @@
|
|
|
1
|
-
import { IEmbeddedEntityWithIdOrName, IFieldValueWithConstraints } from '../../post';
|
|
1
|
+
import { IEmbeddedEntityWithIdOrName, IFieldBinding, IFieldValueWithConstraints } from '../../post';
|
|
2
|
+
import { IReadinessRule, IReadinessRuleAll } from '../../../shared';
|
|
2
3
|
export interface UpdateTypeRequest {
|
|
3
4
|
name?: string;
|
|
4
5
|
parent?: string;
|
|
5
6
|
fullNameTemplate?: string | null;
|
|
6
7
|
description?: string;
|
|
7
8
|
path?: string;
|
|
8
|
-
fields?:
|
|
9
|
+
fields?: IFieldBinding[];
|
|
9
10
|
typeFields?: IEmbeddedEntityWithIdOrName[];
|
|
10
11
|
typeFieldValues?: IFieldValueWithConstraints[];
|
|
11
12
|
manifestIds?: string[];
|
|
12
13
|
supportsStocktake?: boolean;
|
|
14
|
+
/** Assets of this type are kits (containers) — G2G M2. */
|
|
15
|
+
typeKit?: boolean;
|
|
16
|
+
readinessRules?: IReadinessRule[];
|
|
17
|
+
/**
|
|
18
|
+
* Server-derived, read-only projection (own + inherited rules) returned by
|
|
19
|
+
* GET. Tolerated on input only so a GET → edit → PATCH round-trip of the whole
|
|
20
|
+
* type doesn't 400; the server strips it and re-derives it from stored state +
|
|
21
|
+
* parent (prepareUpdate), so it never affects what is stored.
|
|
22
|
+
*/
|
|
23
|
+
readinessRulesAll?: IReadinessRuleAll[];
|
|
13
24
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { IReadinessRule } from '../../shared';
|
|
2
|
+
import { IFieldBindingDelta } from '../../fields';
|
|
1
3
|
export declare type IEmbeddedEntityWithIdOrName = {
|
|
2
4
|
id: string;
|
|
3
5
|
name?: never;
|
|
@@ -8,6 +10,12 @@ export declare type IEmbeddedEntityWithIdOrName = {
|
|
|
8
10
|
id: string;
|
|
9
11
|
name: string;
|
|
10
12
|
};
|
|
13
|
+
/**
|
|
14
|
+
* A type's authored field binding: the field reference (`id`/`name`) plus an
|
|
15
|
+
* optional source/visibility delta (§5 / §1.4). A bare `{ id }` is an INPUT
|
|
16
|
+
* binding, exactly as before.
|
|
17
|
+
*/
|
|
18
|
+
export declare type IFieldBinding = IEmbeddedEntityWithIdOrName & IFieldBindingDelta;
|
|
11
19
|
declare type ValueStringOnly = {
|
|
12
20
|
valueString: string;
|
|
13
21
|
valueInteger?: never;
|
|
@@ -66,18 +74,23 @@ declare type IdOrName = {
|
|
|
66
74
|
id: string;
|
|
67
75
|
name: string;
|
|
68
76
|
};
|
|
69
|
-
export declare type IFieldValueWithConstraints = IdOrName &
|
|
77
|
+
export declare type IFieldValueWithConstraints = IdOrName & {
|
|
78
|
+
computed?: boolean;
|
|
79
|
+
} & (ValueStringOnly | ValueIntegerOnly | ValueDecimalOnly | ValueBooleanOnly | ValueDateOnly | ValueDateTimeOnly);
|
|
70
80
|
export interface PostTypeRequest {
|
|
71
81
|
name: string;
|
|
72
82
|
parent?: string;
|
|
73
83
|
fullNameTemplate?: string | null;
|
|
74
84
|
description?: string;
|
|
75
85
|
path?: string;
|
|
76
|
-
fields?:
|
|
86
|
+
fields?: IFieldBinding[];
|
|
77
87
|
typeFields?: IEmbeddedEntityWithIdOrName[];
|
|
78
88
|
typeFieldValues?: IFieldValueWithConstraints[];
|
|
79
89
|
manifestIds?: string[];
|
|
80
90
|
supportsStocktake?: boolean;
|
|
91
|
+
/** Assets of this type are kits (containers) — G2G M2. */
|
|
92
|
+
typeKit?: boolean;
|
|
93
|
+
readinessRules?: IReadinessRule[];
|
|
81
94
|
}
|
|
82
95
|
export declare type PostTypesRequest = PostTypeRequest[];
|
|
83
96
|
export declare const testPostTypeRequest: PostTypeRequest;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.js","sourceRoot":"","sources":["../../../src/types/post/request.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"request.js","sourceRoot":"","sources":["../../../src/types/post/request.ts"],"names":[],"mappings":";;;AAyGA,QAAQ;AACK,QAAA,mBAAmB,GAAoB;IAClD,MAAM,EAAE,MAAM;IACd,IAAI,EAAE,MAAM;IACZ,gBAAgB,EAAE,OAAO;IACzB,MAAM,EAAE;QACN;YACE,EAAE,EAAE,QAAQ;YACZ,IAAI,EAAE,QAAQ;SACf;KACF;IACD,eAAe,EAAE;QACf;YACE,gBAAgB;YAChB,IAAI,EAAE,QAAQ;YACd,YAAY,EAAE,IAAI;YAClB,oBAAoB;SACrB;KACF;IACD,iBAAiB,EAAE,IAAI;CACxB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spotto/contract",
|
|
3
3
|
"license": "ISC",
|
|
4
|
-
"version": "1.0.70-alpha.
|
|
4
|
+
"version": "1.0.70-alpha.5",
|
|
5
5
|
"description": "Spotto's API Contract type definitions",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"files": [
|
|
@@ -18,5 +18,5 @@
|
|
|
18
18
|
"@types/geojson": "^7946.0.11",
|
|
19
19
|
"shx": "^0.3.4"
|
|
20
20
|
},
|
|
21
|
-
"gitHead": "
|
|
21
|
+
"gitHead": "8a9d62932fd6cab497181105341be04599f993f5"
|
|
22
22
|
}
|