@shushed/helpers 0.0.229 → 0.0.230-fix-erp-780-20260109153401
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/cjs/contracts/index.js +1 -5
- package/dist/cjs/contracts/product-draft.schema.json +5 -159
- package/dist/cjs/dist-dereferenced/index.js +1 -5
- package/dist/cjs/dist-dereferenced/messages/product-draft.js +1 -1
- package/dist/cjs/dist-dereferenced/product-draft.js +1 -1
- package/dist/cjs/src-public/airtable.js +59 -96
- package/dist/cjs/src-public/bcOrder.js +6 -2
- package/dist/cjs/src-public/centra.js +5 -56
- package/dist/cjs/src-public/env.js +1 -1
- package/dist/cjs/src-public/index.js +1 -3
- package/dist/cjs/src-public/pubsub.js +10 -36
- package/dist/cjs/src-public/runtime.js +9 -48
- package/dist/cjs/src-public/utils.js +0 -3
- package/dist/package.json +2 -3
- package/dist/types/contracts/index.d.ts +0 -2
- package/dist/types/dist-dereferenced/index.d.ts +0 -2
- package/dist/types/dist-dereferenced/messages/product-draft.d.ts +1 -148
- package/dist/types/dist-dereferenced/product-draft.d.ts +1 -148
- package/dist/types/dist-types/index.d.ts +0 -2
- package/dist/types/dist-types/messages/product-draft.d.ts +4 -23
- package/dist/types/dist-types/product-draft.d.ts +4 -23
- package/dist/types/src-public/airtable.d.ts +9 -0
- package/dist/types/src-public/centra.d.ts +0 -3
- package/dist/types/src-public/env.d.ts +1 -1
- package/dist/types/src-public/index.d.ts +0 -1
- package/dist/types/src-public/pubsub.d.ts +1 -4
- package/dist/types/src-public/runtime.d.ts +4 -17
- package/dist/types/src-public/types.d.ts +0 -6
- package/dist/types/src-public/utils.d.ts +1 -1
- package/package.json +3 -4
- package/dist/cjs/contracts/purchase-orderline.schema.json +0 -135
- package/dist/cjs/contracts/stock-movement.schema.json +0 -144
- package/dist/cjs/dist-dereferenced/purchase-orderline.js +0 -4
- package/dist/cjs/dist-dereferenced/stock-movement.js +0 -4
- package/dist/cjs/dist-types/purchase-orderline.js +0 -2
- package/dist/cjs/dist-types/stock-movement.js +0 -2
- package/dist/cjs/src-public/sitoo.js +0 -349
- package/dist/types/dist-dereferenced/purchase-orderline.d.ts +0 -114
- package/dist/types/dist-dereferenced/stock-movement.d.ts +0 -110
- package/dist/types/dist-types/purchase-orderline.d.ts +0 -31
- package/dist/types/dist-types/stock-movement.d.ts +0 -30
- package/dist/types/src-public/sitoo.d.ts +0 -254
|
@@ -79,45 +79,19 @@ class PubSubHelper extends runtime_1.default {
|
|
|
79
79
|
}
|
|
80
80
|
const topic = pubSubPublishTopics[options.topicName];
|
|
81
81
|
const batches = payloads.length > 5 ? (0, lodash_chunk_1.default)(payloads, 10) : [payloads];
|
|
82
|
-
|
|
82
|
+
const attributes = {
|
|
83
|
+
...options.extraAttributes,
|
|
84
|
+
source_system: options.sourceSystem,
|
|
85
|
+
target_system: options.targetSystem,
|
|
86
|
+
buildship_id: this.systemEnvName + '-' + this.workflowId + '-' + this.triggerId,
|
|
87
|
+
};
|
|
83
88
|
const messageIds = [];
|
|
84
89
|
for (let i = 0; i < batches.length; i++) {
|
|
85
90
|
const batch = batches[i];
|
|
86
|
-
const results = await Promise.allSettled(batch.map((x
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
if (typeof options.extraAttributes === 'function') {
|
|
91
|
-
nextAttributes = Object.fromEntries(Object.entries(options.extraAttributes ? Object.assign({}, nextAttributes, options.extraAttributes(x, index)) : nextAttributes).filter(([_, v]) => v !== undefined && v !== null).map(([k, v]) => [k, typeof v === 'boolean' ? (v ? 'yes' : 'no') : `${v}`]));
|
|
92
|
-
}
|
|
93
|
-
else if (typeof options.extraAttributes === 'object') {
|
|
94
|
-
nextAttributes = Object.assign({}, nextAttributes, options.extraAttributes);
|
|
95
|
-
}
|
|
96
|
-
for (const key in nextAttributes) {
|
|
97
|
-
let resultForKey;
|
|
98
|
-
if (typeof nextAttributes[key] === 'function') {
|
|
99
|
-
resultForKey = nextAttributes[key](x, index);
|
|
100
|
-
}
|
|
101
|
-
else {
|
|
102
|
-
resultForKey = nextAttributes[key];
|
|
103
|
-
}
|
|
104
|
-
if (typeof resultForKey === 'boolean') {
|
|
105
|
-
nextAttributes[key] = resultForKey ? 'yes' : 'no';
|
|
106
|
-
}
|
|
107
|
-
else {
|
|
108
|
-
nextAttributes[key] = `${resultForKey}`;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
nextAttributes = Object.assign(nextAttributes, {
|
|
112
|
-
source_system: options.sourceSystem,
|
|
113
|
-
target_system: options.targetSystem,
|
|
114
|
-
buildship_id: this.systemEnvName + '-' + this.workflowId + '-' + this.triggerId,
|
|
115
|
-
});
|
|
116
|
-
return topic.publishMessage({
|
|
117
|
-
data: Buffer.from(JSON.stringify(x)),
|
|
118
|
-
attributes: nextAttributes
|
|
119
|
-
});
|
|
120
|
-
}));
|
|
91
|
+
const results = await Promise.allSettled(batch.map((x) => topic.publishMessage({
|
|
92
|
+
data: Buffer.from(JSON.stringify(x)),
|
|
93
|
+
attributes: Object.fromEntries(Object.entries(options.attributesGenerator ? Object.assign({}, attributes, options.attributesGenerator(x)) : attributes).filter(([_, v]) => v !== undefined && v !== null).map(([k, v]) => [k, `${v}`]))
|
|
94
|
+
})));
|
|
121
95
|
for (const result of results) {
|
|
122
96
|
if (result.status === 'fulfilled') {
|
|
123
97
|
messageIds.push(result.value);
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.Logging = void 0;
|
|
7
|
-
const lodash_pick_1 = __importDefault(require("lodash.pick"));
|
|
8
4
|
const DEFAULT_BRANCH = 'migratedprod';
|
|
9
5
|
const getCircularReplacer = () => {
|
|
10
6
|
const seen = new WeakSet();
|
|
@@ -63,50 +59,34 @@ exports.Logging = Logging;
|
|
|
63
59
|
class Runtime {
|
|
64
60
|
workflowId;
|
|
65
61
|
triggerId;
|
|
66
|
-
triggerName;
|
|
67
|
-
triggerVersion;
|
|
68
62
|
envName;
|
|
69
63
|
pubSubPrefix;
|
|
70
64
|
systemEnvName;
|
|
71
65
|
runtimeUrl;
|
|
72
66
|
logging;
|
|
73
|
-
|
|
74
|
-
triggerConfigProperties = undefined;
|
|
75
|
-
triggerConfig = undefined;
|
|
76
|
-
workflowRoot;
|
|
67
|
+
workflowRoot = null;
|
|
77
68
|
constructor(opts) {
|
|
78
69
|
if (opts instanceof Runtime) {
|
|
79
70
|
this.workflowRoot = opts.workflowRoot;
|
|
80
71
|
this.workflowId = opts.workflowId;
|
|
81
72
|
this.triggerId = opts.triggerId;
|
|
82
|
-
this.triggerName = opts.triggerName;
|
|
83
|
-
this.triggerVersion = opts.triggerVersion;
|
|
84
73
|
this.systemEnvName = opts.systemEnvName;
|
|
85
74
|
this.runtimeUrl = opts.runtimeUrl;
|
|
86
75
|
this.pubSubPrefix = opts.pubSubPrefix;
|
|
87
76
|
this.envName = opts.envName;
|
|
88
77
|
this.logging = opts.logging || new Logging(this.workflowId, this.triggerId, this.systemEnvName);
|
|
89
|
-
this.triggerName = opts.triggerName;
|
|
90
|
-
this.triggerVersion = opts.triggerVersion;
|
|
91
|
-
this.triggerDataProperties = opts.triggerDataProperties;
|
|
92
|
-
this.triggerConfigProperties = opts.triggerConfigProperties;
|
|
93
|
-
this.triggerConfig = opts.triggerConfig;
|
|
94
78
|
}
|
|
95
79
|
else {
|
|
96
|
-
|
|
80
|
+
if (opts.root) {
|
|
81
|
+
this.workflowRoot = opts.root;
|
|
82
|
+
}
|
|
97
83
|
this.workflowId = opts.workflowId || opts.workflow?.id || '';
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
this.
|
|
101
|
-
this.triggerVersion = buildSemver((opts.trigger.label.split(/\sv\d/)[1]?.trim() || 'v0').replace(/^v/, ''));
|
|
102
|
-
this.triggerDataProperties = opts.trigger.data?.properties;
|
|
103
|
-
this.triggerConfigProperties = opts.trigger.config?.properties;
|
|
84
|
+
this.triggerId = opts.triggerId || opts.trigger?.id || '';
|
|
85
|
+
if (!this.triggerId && opts.session) {
|
|
86
|
+
this.triggerId = Object.values(opts.session?.executedNodes || {}).find(e => e.nodeType === 'trigger')?.nodeId ?? 'unknown';
|
|
104
87
|
}
|
|
105
|
-
else {
|
|
106
|
-
this.triggerId =
|
|
107
|
-
this.triggerName = this.workflowRoot[this.triggerId]?.triggerName || this.workflowId;
|
|
108
|
-
this.triggerVersion = this.workflowRoot[this.triggerId]?.triggerVersion || '0.0.0';
|
|
109
|
-
this.triggerConfig = this.workflowRoot[this.triggerId]?.triggerConfig;
|
|
88
|
+
else if (!this.triggerId) {
|
|
89
|
+
this.triggerId = 'unknown';
|
|
110
90
|
}
|
|
111
91
|
this.systemEnvName = this.getSystemEnvName(opts);
|
|
112
92
|
this.envName = this.systemEnvName === DEFAULT_BRANCH ? 'prod' : this.systemEnvName;
|
|
@@ -115,18 +95,6 @@ class Runtime {
|
|
|
115
95
|
this.logging = opts.logging || new Logging(this.workflowId, this.triggerId, this.systemEnvName);
|
|
116
96
|
}
|
|
117
97
|
}
|
|
118
|
-
enhanceWorkflowReturn(triggerReturn, triggerConfig) {
|
|
119
|
-
const keys = Object.keys(this.triggerDataProperties || {});
|
|
120
|
-
return Object.assign((0, lodash_pick_1.default)({
|
|
121
|
-
workflowId: this.workflowId,
|
|
122
|
-
triggerId: this.triggerId,
|
|
123
|
-
triggerName: this.triggerName,
|
|
124
|
-
triggerVersion: this.triggerVersion,
|
|
125
|
-
systemEnvName: this.systemEnvName,
|
|
126
|
-
envName: this.envName,
|
|
127
|
-
triggerConfig: (0, lodash_pick_1.default)(triggerConfig, Object.entries(this.triggerConfigProperties || {}).filter(([_, value]) => !value.buildship?.sensitive).map(([key]) => key))
|
|
128
|
-
}, keys), triggerReturn);
|
|
129
|
-
}
|
|
130
98
|
getRuntimeUrl(options) {
|
|
131
99
|
if (options.runtimeUrl && this.isDeployment) {
|
|
132
100
|
return options.runtimeUrl;
|
|
@@ -175,10 +143,3 @@ class Runtime {
|
|
|
175
143
|
}
|
|
176
144
|
exports.default = Runtime;
|
|
177
145
|
;
|
|
178
|
-
function buildSemver(version) {
|
|
179
|
-
const parts = version.split(/\./).map(x => parseInt(x, 10));
|
|
180
|
-
for (let i = parts.length; i < 3; i++) {
|
|
181
|
-
parts.push(0);
|
|
182
|
-
}
|
|
183
|
-
return parts.join('.');
|
|
184
|
-
}
|
|
@@ -264,9 +264,6 @@ function setRetryAfterVariable(value, options) {
|
|
|
264
264
|
global.functionsCache = global.functionsCache || {};
|
|
265
265
|
exports.FUNCTION_EXPR_ERROR = Symbol('function');
|
|
266
266
|
function createFunction(expression) {
|
|
267
|
-
if (typeof expression === 'function') {
|
|
268
|
-
return expression;
|
|
269
|
-
}
|
|
270
267
|
if (!global.functionsCache[expression]) {
|
|
271
268
|
global.functionsCache[expression] = new Function('symbol', 'payload', 'try { return ' + expression + ' } catch (err) { return symbol; }');
|
|
272
269
|
}
|
package/dist/package.json
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"description": "",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@google-cloud/firestore": "^7.11.1",
|
|
9
8
|
"@hackylabs/deep-redact": "^2.2.1",
|
|
10
9
|
"ajv": "^8.17.1",
|
|
11
10
|
"ajv-formats": "^3.0.1",
|
|
@@ -13,15 +12,15 @@
|
|
|
13
12
|
"jose": "^6.0.11",
|
|
14
13
|
"lodash.chunk": "^4.2.0",
|
|
15
14
|
"lodash.clonedeep": "^4.5.0",
|
|
16
|
-
"lodash.groupby": "^4.6.0",
|
|
17
15
|
"lodash.isequal": "^4.5.0",
|
|
18
16
|
"lodash.omit": "^4.5.0",
|
|
19
17
|
"lodash.pick": "^4.4.0",
|
|
20
18
|
"mime-types": "^3.0.1",
|
|
21
19
|
"p-limit": "^7.1.1",
|
|
22
20
|
"rate-limiter-flexible": "^7.2.0",
|
|
21
|
+
"uuid": "^11.1.0",
|
|
23
22
|
"redis": "^5.6.0",
|
|
24
|
-
"
|
|
23
|
+
"@google-cloud/firestore": "^7.11.1"
|
|
25
24
|
},
|
|
26
25
|
"files": [
|
|
27
26
|
"dist"
|
|
@@ -10,8 +10,6 @@ export { default as DevelopmentColour } from './development-colour.schema.json';
|
|
|
10
10
|
export { default as Asset } from './asset.schema.json';
|
|
11
11
|
export { default as CustomerSegment } from './customer-segment.schema.json';
|
|
12
12
|
export { default as MarketingPref } from './marketing-preferences.schema.json';
|
|
13
|
-
export { default as StockMovement } from './stock-movement.schema.json';
|
|
14
|
-
export { default as PurchaseOrderline } from './purchase-orderline.schema.json';
|
|
15
13
|
export * from './order';
|
|
16
14
|
export { default as Order } from './order.schema.json';
|
|
17
15
|
export * from './messages';
|
|
@@ -10,8 +10,6 @@ export { default as Price } from './price';
|
|
|
10
10
|
export { default as ProductCategory } from './product-category';
|
|
11
11
|
export { default as ProductDraft } from './product-draft';
|
|
12
12
|
export { default as Product } from './product';
|
|
13
|
-
export { default as PurchaseOrderline } from './purchase-orderline';
|
|
14
|
-
export { default as StockMovement } from './stock-movement';
|
|
15
13
|
export { default as Stock } from './stock';
|
|
16
14
|
export { default as Total } from './total';
|
|
17
15
|
export * as Messages from './messages';
|
|
@@ -16,12 +16,6 @@ declare const schema: {
|
|
|
16
16
|
readonly type: "string";
|
|
17
17
|
readonly pattern: "^[A-Z]{2}\\d{2}[A-Z]+?-\\d{6}$";
|
|
18
18
|
};
|
|
19
|
-
readonly centric_id: {
|
|
20
|
-
readonly type: readonly ["string"];
|
|
21
|
-
};
|
|
22
|
-
readonly style_centric_id: {
|
|
23
|
-
readonly type: readonly ["string"];
|
|
24
|
-
};
|
|
25
19
|
readonly product_id: {
|
|
26
20
|
readonly type: readonly ["string"];
|
|
27
21
|
};
|
|
@@ -29,29 +23,12 @@ declare const schema: {
|
|
|
29
23
|
readonly type: "string";
|
|
30
24
|
readonly format: "date-time";
|
|
31
25
|
};
|
|
32
|
-
readonly erp_settings: {
|
|
33
|
-
readonly type: readonly ["string", "null"];
|
|
34
|
-
};
|
|
35
|
-
readonly erp_created_at: {
|
|
36
|
-
readonly type: readonly ["string", "null"];
|
|
37
|
-
readonly format: "date-time";
|
|
38
|
-
};
|
|
39
|
-
readonly erp_export_settings: {
|
|
40
|
-
readonly type: "array";
|
|
41
|
-
readonly items: {
|
|
42
|
-
readonly type: "string";
|
|
43
|
-
readonly enum: readonly ["Exportable to Website", "Exportable to Next", "Available to sell"];
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
26
|
readonly is_colourway_approved: {
|
|
47
27
|
readonly type: "boolean";
|
|
48
28
|
};
|
|
49
29
|
readonly product_name: {
|
|
50
30
|
readonly type: readonly ["string", "null"];
|
|
51
31
|
};
|
|
52
|
-
readonly erp_name: {
|
|
53
|
-
readonly type: readonly ["string", "null"];
|
|
54
|
-
};
|
|
55
32
|
readonly colour_id: {
|
|
56
33
|
readonly type: "string";
|
|
57
34
|
};
|
|
@@ -99,9 +76,6 @@ declare const schema: {
|
|
|
99
76
|
};
|
|
100
77
|
};
|
|
101
78
|
};
|
|
102
|
-
readonly store_grade: {
|
|
103
|
-
readonly type: readonly ["string", "null"];
|
|
104
|
-
};
|
|
105
79
|
readonly drops: {
|
|
106
80
|
readonly type: "array";
|
|
107
81
|
readonly items: {
|
|
@@ -116,22 +90,6 @@ declare const schema: {
|
|
|
116
90
|
};
|
|
117
91
|
};
|
|
118
92
|
};
|
|
119
|
-
readonly direct_stock_buffer: {
|
|
120
|
-
readonly type: readonly ["number", "null"];
|
|
121
|
-
};
|
|
122
|
-
readonly qa_completed: {
|
|
123
|
-
readonly type: readonly ["boolean", "null"];
|
|
124
|
-
};
|
|
125
|
-
readonly warehouse_instructions: {
|
|
126
|
-
readonly type: readonly ["string", "null"];
|
|
127
|
-
};
|
|
128
|
-
readonly available_to_sell_from: {
|
|
129
|
-
readonly type: readonly ["string", "null"];
|
|
130
|
-
readonly format: "date-time";
|
|
131
|
-
};
|
|
132
|
-
readonly processing_time_warehouse: {
|
|
133
|
-
readonly type: readonly ["number", "null"];
|
|
134
|
-
};
|
|
135
93
|
readonly stock_type: {
|
|
136
94
|
readonly type: readonly ["string", "null"];
|
|
137
95
|
};
|
|
@@ -141,9 +99,6 @@ declare const schema: {
|
|
|
141
99
|
readonly packing_method: {
|
|
142
100
|
readonly type: readonly ["string", "null"];
|
|
143
101
|
};
|
|
144
|
-
readonly packaging_code: {
|
|
145
|
-
readonly type: readonly ["string", "null"];
|
|
146
|
-
};
|
|
147
102
|
readonly is_bought_in_product: {
|
|
148
103
|
readonly type: readonly ["boolean", "null"];
|
|
149
104
|
};
|
|
@@ -380,16 +335,6 @@ declare const schema: {
|
|
|
380
335
|
};
|
|
381
336
|
};
|
|
382
337
|
};
|
|
383
|
-
readonly preorder_options: {
|
|
384
|
-
readonly type: readonly ["string", "null"];
|
|
385
|
-
readonly enum: readonly ["Never", "Default", "Weeks", null];
|
|
386
|
-
};
|
|
387
|
-
readonly preorder_num_period: {
|
|
388
|
-
readonly type: readonly ["string", "null"];
|
|
389
|
-
};
|
|
390
|
-
readonly vat_posting_group_code: {
|
|
391
|
-
readonly type: readonly ["string", "null"];
|
|
392
|
-
};
|
|
393
338
|
readonly retail_price: {
|
|
394
339
|
readonly oneOf: readonly [{
|
|
395
340
|
readonly $schema: "http://json-schema.org/draft-07/schema#";
|
|
@@ -575,92 +520,6 @@ declare const schema: {
|
|
|
575
520
|
readonly duty_rate: {
|
|
576
521
|
readonly type: readonly ["number", "null"];
|
|
577
522
|
};
|
|
578
|
-
readonly unit_cost: {
|
|
579
|
-
readonly oneOf: readonly [{
|
|
580
|
-
readonly $schema: "http://json-schema.org/draft-07/schema#";
|
|
581
|
-
readonly title: "Money";
|
|
582
|
-
readonly type: "object";
|
|
583
|
-
readonly additionalProperties: false;
|
|
584
|
-
readonly properties: {
|
|
585
|
-
readonly value: {
|
|
586
|
-
readonly type: "integer";
|
|
587
|
-
readonly minimum: 0;
|
|
588
|
-
};
|
|
589
|
-
readonly decimal_places: {
|
|
590
|
-
readonly type: "integer";
|
|
591
|
-
readonly minimum: 0;
|
|
592
|
-
readonly maximum: 4;
|
|
593
|
-
};
|
|
594
|
-
readonly currency: {
|
|
595
|
-
readonly title: "Currency";
|
|
596
|
-
readonly $schema: "http://json-schema.org/draft-07/schema#";
|
|
597
|
-
readonly type: "string";
|
|
598
|
-
readonly enum: readonly ["AFN", "ALL", "DZD", "USD", "EUR", "AOA", "XCD", "ARS", "AMD", "AWG", "AUD", "AZN", "BSD", "BHD", "BDT", "BBD", "BYN", "BZD", "XOF", "BMD", "BTN", "INR", "BOB", "BOV", "BAM", "BWP", "NOK", "BRL", "BND", "BGN", "BIF", "CVE", "KHR", "XAF", "CAD", "KYD", "CLF", "CLP", "CNY", "COP", "COU", "KMF", "CDF", "NZD", "CRC", "CUC", "CUP", "ANG", "CZK", "DKK", "DJF", "DOP", "EGP", "SVC", "ERN", "ETB", "FKP", "FJD", "XPF", "GMD", "GEL", "GHS", "GIP", "GTQ", "GBP", "GNF", "GYD", "HTG", "HNL", "HKD", "HUF", "ISK", "IDR", "XDR", "IRR", "IQD", "ILS", "JMD", "JPY", "JOD", "KZT", "KES", "KPW", "KRW", "KWD", "KGS", "LAK", "LBP", "LSL", "ZAR", "LRD", "LYD", "CHF", "MOP", "MGA", "MWK", "MYR", "MVR", "MRU", "MUR", "XUA", "MXN", "MXV", "MDL", "MNT", "MAD", "MZN", "MMK", "NAD", "NPR", "NIO", "NGN", "OMR", "PKR", "PAB", "PGK", "PYG", "PEN", "PHP", "PLN", "QAR", "MKD", "RON", "RUB", "RWF", "SHP", "WST", "STN", "SAR", "RSD", "SCR", "SLE", "SGD", "XSU", "SBD", "SOS", "SSP", "LKR", "SDG", "SRD", "SZL", "SEK", "CHE", "CHW", "SYP", "TWD", "TJS", "TZS", "THB", "TOP", "TTD", "TND", "TRY", "TMT", "UGX", "UAH", "AED", "USN", "UYI", "UYU", "UZS", "VUV", "VEF", "VED", "VND", "YER", "ZMW", "ZWL"];
|
|
599
|
-
};
|
|
600
|
-
readonly lcy_value: {
|
|
601
|
-
readonly type: "integer";
|
|
602
|
-
readonly minimum: 0;
|
|
603
|
-
};
|
|
604
|
-
readonly lcy_currency: {
|
|
605
|
-
readonly title: "LCY Currency";
|
|
606
|
-
readonly $schema: "http://json-schema.org/draft-07/schema#";
|
|
607
|
-
readonly type: "string";
|
|
608
|
-
readonly enum: readonly ["AFN", "ALL", "DZD", "USD", "EUR", "AOA", "XCD", "ARS", "AMD", "AWG", "AUD", "AZN", "BSD", "BHD", "BDT", "BBD", "BYN", "BZD", "XOF", "BMD", "BTN", "INR", "BOB", "BOV", "BAM", "BWP", "NOK", "BRL", "BND", "BGN", "BIF", "CVE", "KHR", "XAF", "CAD", "KYD", "CLF", "CLP", "CNY", "COP", "COU", "KMF", "CDF", "NZD", "CRC", "CUC", "CUP", "ANG", "CZK", "DKK", "DJF", "DOP", "EGP", "SVC", "ERN", "ETB", "FKP", "FJD", "XPF", "GMD", "GEL", "GHS", "GIP", "GTQ", "GBP", "GNF", "GYD", "HTG", "HNL", "HKD", "HUF", "ISK", "IDR", "XDR", "IRR", "IQD", "ILS", "JMD", "JPY", "JOD", "KZT", "KES", "KPW", "KRW", "KWD", "KGS", "LAK", "LBP", "LSL", "ZAR", "LRD", "LYD", "CHF", "MOP", "MGA", "MWK", "MYR", "MVR", "MRU", "MUR", "XUA", "MXN", "MXV", "MDL", "MNT", "MAD", "MZN", "MMK", "NAD", "NPR", "NIO", "NGN", "OMR", "PKR", "PAB", "PGK", "PYG", "PEN", "PHP", "PLN", "QAR", "MKD", "RON", "RUB", "RWF", "SHP", "WST", "STN", "SAR", "RSD", "SCR", "SLE", "SGD", "XSU", "SBD", "SOS", "SSP", "LKR", "SDG", "SRD", "SZL", "SEK", "CHE", "CHW", "SYP", "TWD", "TJS", "TZS", "THB", "TOP", "TTD", "TND", "TRY", "TMT", "UGX", "UAH", "AED", "USN", "UYI", "UYU", "UZS", "VUV", "VEF", "VED", "VND", "YER", "ZMW", "ZWL"];
|
|
609
|
-
};
|
|
610
|
-
readonly lcy_decimal_places: {
|
|
611
|
-
readonly type: "integer";
|
|
612
|
-
readonly minimum: 0;
|
|
613
|
-
readonly maximum: 4;
|
|
614
|
-
};
|
|
615
|
-
};
|
|
616
|
-
readonly required: readonly ["value", "currency", "lcy_value", "lcy_currency", "decimal_places", "lcy_decimal_places"];
|
|
617
|
-
}, {
|
|
618
|
-
readonly type: "null";
|
|
619
|
-
}];
|
|
620
|
-
};
|
|
621
|
-
readonly last_direct_cost: {
|
|
622
|
-
readonly oneOf: readonly [{
|
|
623
|
-
readonly $schema: "http://json-schema.org/draft-07/schema#";
|
|
624
|
-
readonly title: "Money";
|
|
625
|
-
readonly type: "object";
|
|
626
|
-
readonly additionalProperties: false;
|
|
627
|
-
readonly properties: {
|
|
628
|
-
readonly value: {
|
|
629
|
-
readonly type: "integer";
|
|
630
|
-
readonly minimum: 0;
|
|
631
|
-
};
|
|
632
|
-
readonly decimal_places: {
|
|
633
|
-
readonly type: "integer";
|
|
634
|
-
readonly minimum: 0;
|
|
635
|
-
readonly maximum: 4;
|
|
636
|
-
};
|
|
637
|
-
readonly currency: {
|
|
638
|
-
readonly title: "Currency";
|
|
639
|
-
readonly $schema: "http://json-schema.org/draft-07/schema#";
|
|
640
|
-
readonly type: "string";
|
|
641
|
-
readonly enum: readonly ["AFN", "ALL", "DZD", "USD", "EUR", "AOA", "XCD", "ARS", "AMD", "AWG", "AUD", "AZN", "BSD", "BHD", "BDT", "BBD", "BYN", "BZD", "XOF", "BMD", "BTN", "INR", "BOB", "BOV", "BAM", "BWP", "NOK", "BRL", "BND", "BGN", "BIF", "CVE", "KHR", "XAF", "CAD", "KYD", "CLF", "CLP", "CNY", "COP", "COU", "KMF", "CDF", "NZD", "CRC", "CUC", "CUP", "ANG", "CZK", "DKK", "DJF", "DOP", "EGP", "SVC", "ERN", "ETB", "FKP", "FJD", "XPF", "GMD", "GEL", "GHS", "GIP", "GTQ", "GBP", "GNF", "GYD", "HTG", "HNL", "HKD", "HUF", "ISK", "IDR", "XDR", "IRR", "IQD", "ILS", "JMD", "JPY", "JOD", "KZT", "KES", "KPW", "KRW", "KWD", "KGS", "LAK", "LBP", "LSL", "ZAR", "LRD", "LYD", "CHF", "MOP", "MGA", "MWK", "MYR", "MVR", "MRU", "MUR", "XUA", "MXN", "MXV", "MDL", "MNT", "MAD", "MZN", "MMK", "NAD", "NPR", "NIO", "NGN", "OMR", "PKR", "PAB", "PGK", "PYG", "PEN", "PHP", "PLN", "QAR", "MKD", "RON", "RUB", "RWF", "SHP", "WST", "STN", "SAR", "RSD", "SCR", "SLE", "SGD", "XSU", "SBD", "SOS", "SSP", "LKR", "SDG", "SRD", "SZL", "SEK", "CHE", "CHW", "SYP", "TWD", "TJS", "TZS", "THB", "TOP", "TTD", "TND", "TRY", "TMT", "UGX", "UAH", "AED", "USN", "UYI", "UYU", "UZS", "VUV", "VEF", "VED", "VND", "YER", "ZMW", "ZWL"];
|
|
642
|
-
};
|
|
643
|
-
readonly lcy_value: {
|
|
644
|
-
readonly type: "integer";
|
|
645
|
-
readonly minimum: 0;
|
|
646
|
-
};
|
|
647
|
-
readonly lcy_currency: {
|
|
648
|
-
readonly title: "LCY Currency";
|
|
649
|
-
readonly $schema: "http://json-schema.org/draft-07/schema#";
|
|
650
|
-
readonly type: "string";
|
|
651
|
-
readonly enum: readonly ["AFN", "ALL", "DZD", "USD", "EUR", "AOA", "XCD", "ARS", "AMD", "AWG", "AUD", "AZN", "BSD", "BHD", "BDT", "BBD", "BYN", "BZD", "XOF", "BMD", "BTN", "INR", "BOB", "BOV", "BAM", "BWP", "NOK", "BRL", "BND", "BGN", "BIF", "CVE", "KHR", "XAF", "CAD", "KYD", "CLF", "CLP", "CNY", "COP", "COU", "KMF", "CDF", "NZD", "CRC", "CUC", "CUP", "ANG", "CZK", "DKK", "DJF", "DOP", "EGP", "SVC", "ERN", "ETB", "FKP", "FJD", "XPF", "GMD", "GEL", "GHS", "GIP", "GTQ", "GBP", "GNF", "GYD", "HTG", "HNL", "HKD", "HUF", "ISK", "IDR", "XDR", "IRR", "IQD", "ILS", "JMD", "JPY", "JOD", "KZT", "KES", "KPW", "KRW", "KWD", "KGS", "LAK", "LBP", "LSL", "ZAR", "LRD", "LYD", "CHF", "MOP", "MGA", "MWK", "MYR", "MVR", "MRU", "MUR", "XUA", "MXN", "MXV", "MDL", "MNT", "MAD", "MZN", "MMK", "NAD", "NPR", "NIO", "NGN", "OMR", "PKR", "PAB", "PGK", "PYG", "PEN", "PHP", "PLN", "QAR", "MKD", "RON", "RUB", "RWF", "SHP", "WST", "STN", "SAR", "RSD", "SCR", "SLE", "SGD", "XSU", "SBD", "SOS", "SSP", "LKR", "SDG", "SRD", "SZL", "SEK", "CHE", "CHW", "SYP", "TWD", "TJS", "TZS", "THB", "TOP", "TTD", "TND", "TRY", "TMT", "UGX", "UAH", "AED", "USN", "UYI", "UYU", "UZS", "VUV", "VEF", "VED", "VND", "YER", "ZMW", "ZWL"];
|
|
652
|
-
};
|
|
653
|
-
readonly lcy_decimal_places: {
|
|
654
|
-
readonly type: "integer";
|
|
655
|
-
readonly minimum: 0;
|
|
656
|
-
readonly maximum: 4;
|
|
657
|
-
};
|
|
658
|
-
};
|
|
659
|
-
readonly required: readonly ["value", "currency", "lcy_value", "lcy_currency", "decimal_places", "lcy_decimal_places"];
|
|
660
|
-
}, {
|
|
661
|
-
readonly type: "null";
|
|
662
|
-
}];
|
|
663
|
-
};
|
|
664
523
|
};
|
|
665
524
|
};
|
|
666
525
|
readonly duty: {
|
|
@@ -673,9 +532,6 @@ declare const schema: {
|
|
|
673
532
|
readonly commodity_code: {
|
|
674
533
|
readonly type: readonly ["string", "null"];
|
|
675
534
|
};
|
|
676
|
-
readonly tariff_no: {
|
|
677
|
-
readonly type: readonly ["string", "null"];
|
|
678
|
-
};
|
|
679
535
|
};
|
|
680
536
|
readonly payment_terms: {
|
|
681
537
|
readonly type: "object";
|
|
@@ -713,9 +569,6 @@ declare const schema: {
|
|
|
713
569
|
readonly supplier_id: {
|
|
714
570
|
readonly type: readonly ["string", "null"];
|
|
715
571
|
};
|
|
716
|
-
readonly erp_supplier_id: {
|
|
717
|
-
readonly type: readonly ["string", "null"];
|
|
718
|
-
};
|
|
719
572
|
readonly supplier_name: {
|
|
720
573
|
readonly type: readonly ["string", "null"];
|
|
721
574
|
};
|
|
@@ -725,7 +578,7 @@ declare const schema: {
|
|
|
725
578
|
};
|
|
726
579
|
};
|
|
727
580
|
};
|
|
728
|
-
readonly required: readonly ["product_id", "colour_id", "style_id"];
|
|
581
|
+
readonly required: readonly ["development_colourway_id", "development_style_id", "product_id", "colour_id", "style_id", "created_at", "season_id"];
|
|
729
582
|
}, {
|
|
730
583
|
readonly type: "object";
|
|
731
584
|
readonly additionalProperties: false;
|