@shushed/helpers 0.0.212 → 0.0.213
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 +3 -1
- package/dist/cjs/contracts/stock-movement.schema.json +116 -0
- package/dist/cjs/dist-dereferenced/index.js +3 -1
- package/dist/cjs/dist-dereferenced/stock-movement.js +4 -0
- package/dist/cjs/dist-types/stock-movement.js +2 -0
- package/dist/types/contracts/index.d.ts +1 -0
- package/dist/types/dist-dereferenced/index.d.ts +1 -0
- package/dist/types/dist-dereferenced/stock-movement.d.ts +99 -0
- package/dist/types/dist-types/index.d.ts +1 -0
- package/dist/types/dist-types/stock-movement.d.ts +26 -0
- package/package.json +1 -1
|
@@ -17,7 +17,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
17
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
18
|
};
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.Order = exports.MarketingPref = exports.CustomerSegment = exports.Asset = exports.DevelopmentColour = exports.Category = exports.ProductCategory = exports.Product = exports.ProductDraft = exports.Total = exports.Money = exports.Country = exports.Currency = void 0;
|
|
20
|
+
exports.Order = exports.StockMovement = exports.MarketingPref = exports.CustomerSegment = exports.Asset = exports.DevelopmentColour = exports.Category = exports.ProductCategory = exports.Product = exports.ProductDraft = exports.Total = exports.Money = exports.Country = exports.Currency = void 0;
|
|
21
21
|
var currency_schema_json_1 = require("./currency.schema.json");
|
|
22
22
|
Object.defineProperty(exports, "Currency", { enumerable: true, get: function () { return __importDefault(currency_schema_json_1).default; } });
|
|
23
23
|
var country_schema_json_1 = require("./country.schema.json");
|
|
@@ -42,6 +42,8 @@ var customer_segment_schema_json_1 = require("./customer-segment.schema.json");
|
|
|
42
42
|
Object.defineProperty(exports, "CustomerSegment", { enumerable: true, get: function () { return __importDefault(customer_segment_schema_json_1).default; } });
|
|
43
43
|
var marketing_preferences_schema_json_1 = require("./marketing-preferences.schema.json");
|
|
44
44
|
Object.defineProperty(exports, "MarketingPref", { enumerable: true, get: function () { return __importDefault(marketing_preferences_schema_json_1).default; } });
|
|
45
|
+
var stock_movement_schema_json_1 = require("./stock-movement.schema.json");
|
|
46
|
+
Object.defineProperty(exports, "StockMovement", { enumerable: true, get: function () { return __importDefault(stock_movement_schema_json_1).default; } });
|
|
45
47
|
__exportStar(require("./order"), exports);
|
|
46
48
|
var order_schema_json_1 = require("./order.schema.json");
|
|
47
49
|
Object.defineProperty(exports, "Order", { enumerable: true, get: function () { return __importDefault(order_schema_json_1).default; } });
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://shushed.example.com/stock-move.schema.json",
|
|
4
|
+
"title": "Stock Movement Schema",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"properties": {
|
|
8
|
+
"style_id": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"minLength": 1,
|
|
11
|
+
"faker": {
|
|
12
|
+
"custom.style": []
|
|
13
|
+
},
|
|
14
|
+
"description": "Style Code - Example: 000697"
|
|
15
|
+
},
|
|
16
|
+
"colour_id": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"minLength": 1,
|
|
19
|
+
"faker": {
|
|
20
|
+
"custom.color": []
|
|
21
|
+
},
|
|
22
|
+
"description": "Colour Code - Example: 3203"
|
|
23
|
+
},
|
|
24
|
+
"size_code": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"minLength": 1,
|
|
27
|
+
"description": "Variant code, e.g., XS, M, XL, ONE, or numeric like 10, 37, 40"
|
|
28
|
+
},
|
|
29
|
+
"history": {
|
|
30
|
+
"type": "array",
|
|
31
|
+
"items": {
|
|
32
|
+
"type": "object",
|
|
33
|
+
"properties": {
|
|
34
|
+
"quantity": {
|
|
35
|
+
"type": "integer",
|
|
36
|
+
"minimum": 0,
|
|
37
|
+
"description": "Quantity of stock available on hand"
|
|
38
|
+
},
|
|
39
|
+
"location_code": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"pattern": "^\\d{3}-[A-Z]+$|^[A-Z]{2,}-?[A-Z]*$|^[A-Z]{2,}\\d{3}$",
|
|
42
|
+
"description": "Valid location code like 001-DR, JL200, HEADOFFICE"
|
|
43
|
+
},
|
|
44
|
+
"type": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"enum": [
|
|
47
|
+
"transfer",
|
|
48
|
+
"negative adjustment",
|
|
49
|
+
"positive adjustment",
|
|
50
|
+
"purchase",
|
|
51
|
+
"sale"
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
"unit_cost": {
|
|
55
|
+
"oneOf": [
|
|
56
|
+
{
|
|
57
|
+
"$ref": "https://shushed.example.com/money.schema.json"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"type": "null"
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
"description": "Cost per unit, can be null"
|
|
64
|
+
},
|
|
65
|
+
"posting_date": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"format": "date",
|
|
68
|
+
"description": "Date of creation of the record. Preferably creation time of the item ledger entry",
|
|
69
|
+
"faker": {
|
|
70
|
+
"date.between": [
|
|
71
|
+
"2024-01-01",
|
|
72
|
+
"2025-04-30"
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"created_at": {
|
|
77
|
+
"type": "string",
|
|
78
|
+
"format": "date-time",
|
|
79
|
+
"description": "Date time of the creation of the record. Preferably creation time of the item ledger entry",
|
|
80
|
+
"faker": {
|
|
81
|
+
"date.between": [
|
|
82
|
+
"2024-01-01T00:00:00.000Z",
|
|
83
|
+
"2025-04-30T00:00:00.000Z"
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"required": [
|
|
89
|
+
"quantity",
|
|
90
|
+
"location_code",
|
|
91
|
+
"created_at",
|
|
92
|
+
"posting_date",
|
|
93
|
+
"type"
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"last_modified_at": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"format": "date-time",
|
|
100
|
+
"description": "Datetime of the last created_at in the history",
|
|
101
|
+
"faker": {
|
|
102
|
+
"date.between": [
|
|
103
|
+
"2024-01-01T00:00:00.000Z",
|
|
104
|
+
"2025-04-30T00:00:00.000Z"
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"required": [
|
|
110
|
+
"style_id",
|
|
111
|
+
"colour_id",
|
|
112
|
+
"size_code",
|
|
113
|
+
"history",
|
|
114
|
+
"last_modified_at"
|
|
115
|
+
]
|
|
116
|
+
}
|
|
@@ -36,7 +36,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
36
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.Order = exports.Messages = exports.Total = exports.Stock = exports.Product = exports.ProductDraft = exports.ProductCategory = exports.Price = exports.Money = exports.MarketingPreferences = exports.DevelopmentColour = exports.CustomerSegment = exports.Currency = exports.Country = exports.Category = exports.Asset = void 0;
|
|
39
|
+
exports.Order = exports.Messages = exports.Total = exports.Stock = exports.StockMovement = exports.Product = exports.ProductDraft = exports.ProductCategory = exports.Price = exports.Money = exports.MarketingPreferences = exports.DevelopmentColour = exports.CustomerSegment = exports.Currency = exports.Country = exports.Category = exports.Asset = void 0;
|
|
40
40
|
var asset_1 = require("./asset");
|
|
41
41
|
Object.defineProperty(exports, "Asset", { enumerable: true, get: function () { return __importDefault(asset_1).default; } });
|
|
42
42
|
var category_1 = require("./category");
|
|
@@ -61,6 +61,8 @@ var product_draft_1 = require("./product-draft");
|
|
|
61
61
|
Object.defineProperty(exports, "ProductDraft", { enumerable: true, get: function () { return __importDefault(product_draft_1).default; } });
|
|
62
62
|
var product_1 = require("./product");
|
|
63
63
|
Object.defineProperty(exports, "Product", { enumerable: true, get: function () { return __importDefault(product_1).default; } });
|
|
64
|
+
var stock_movement_1 = require("./stock-movement");
|
|
65
|
+
Object.defineProperty(exports, "StockMovement", { enumerable: true, get: function () { return __importDefault(stock_movement_1).default; } });
|
|
64
66
|
var stock_1 = require("./stock");
|
|
65
67
|
Object.defineProperty(exports, "Stock", { enumerable: true, get: function () { return __importDefault(stock_1).default; } });
|
|
66
68
|
var total_1 = require("./total");
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const schema = { "$schema": "http://json-schema.org/draft-07/schema#", "title": "Stock Movement Schema", "type": "object", "additionalProperties": false, "properties": { "style_id": { "type": "string", "minLength": 1 }, "colour_id": { "type": "string", "minLength": 1 }, "size_code": { "type": "string", "minLength": 1 }, "history": { "type": "array", "items": { "type": "object", "properties": { "quantity": { "type": "integer", "minimum": 0 }, "location_code": { "type": "string", "pattern": "^\\d{3}-[A-Z]+$|^[A-Z]{2,}-?[A-Z]*$|^[A-Z]{2,}\\d{3}$" }, "type": { "type": "string", "enum": ["transfer", "negative adjustment", "positive adjustment", "purchase", "sale"] }, "unit_cost": { "oneOf": [{ "$schema": "http://json-schema.org/draft-07/schema#", "title": "Money", "type": "object", "additionalProperties": false, "properties": { "value": { "type": "integer", "minimum": 0 }, "decimal_places": { "type": "integer", "minimum": 0, "maximum": 4 }, "currency": { "title": "Currency", "$schema": "http://json-schema.org/draft-07/schema#", "type": "string", "enum": ["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"] }, "lcy_value": { "type": "integer", "minimum": 0 }, "lcy_currency": { "title": "LCY Currency", "$schema": "http://json-schema.org/draft-07/schema#", "type": "string", "enum": ["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"] }, "lcy_decimal_places": { "type": "integer", "minimum": 0, "maximum": 4 } }, "required": ["value", "currency", "lcy_value", "lcy_currency", "decimal_places", "lcy_decimal_places"] }, { "type": "null" }] }, "posting_date": { "type": "string", "format": "date" }, "created_at": { "type": "string", "format": "date-time" } }, "required": ["quantity", "location_code", "created_at", "posting_date", "type"] } }, "last_modified_at": { "type": "string", "format": "date-time" } }, "required": ["style_id", "colour_id", "size_code", "history", "last_modified_at"], "$id": "https://shushed.example.com/stock-move.schema.json" };
|
|
4
|
+
exports.default = schema;
|
|
@@ -10,6 +10,7 @@ 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';
|
|
13
14
|
export * from './order';
|
|
14
15
|
export { default as Order } from './order.schema.json';
|
|
15
16
|
export * from './messages';
|
|
@@ -10,6 +10,7 @@ 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 StockMovement } from './stock-movement';
|
|
13
14
|
export { default as Stock } from './stock';
|
|
14
15
|
export { default as Total } from './total';
|
|
15
16
|
export * as Messages from './messages';
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
declare const schema: {
|
|
2
|
+
readonly $schema: "http://json-schema.org/draft-07/schema#";
|
|
3
|
+
readonly title: "Stock Movement Schema";
|
|
4
|
+
readonly type: "object";
|
|
5
|
+
readonly additionalProperties: false;
|
|
6
|
+
readonly properties: {
|
|
7
|
+
readonly style_id: {
|
|
8
|
+
readonly type: "string";
|
|
9
|
+
readonly minLength: 1;
|
|
10
|
+
};
|
|
11
|
+
readonly colour_id: {
|
|
12
|
+
readonly type: "string";
|
|
13
|
+
readonly minLength: 1;
|
|
14
|
+
};
|
|
15
|
+
readonly size_code: {
|
|
16
|
+
readonly type: "string";
|
|
17
|
+
readonly minLength: 1;
|
|
18
|
+
};
|
|
19
|
+
readonly history: {
|
|
20
|
+
readonly type: "array";
|
|
21
|
+
readonly items: {
|
|
22
|
+
readonly type: "object";
|
|
23
|
+
readonly properties: {
|
|
24
|
+
readonly quantity: {
|
|
25
|
+
readonly type: "integer";
|
|
26
|
+
readonly minimum: 0;
|
|
27
|
+
};
|
|
28
|
+
readonly location_code: {
|
|
29
|
+
readonly type: "string";
|
|
30
|
+
readonly pattern: "^\\d{3}-[A-Z]+$|^[A-Z]{2,}-?[A-Z]*$|^[A-Z]{2,}\\d{3}$";
|
|
31
|
+
};
|
|
32
|
+
readonly type: {
|
|
33
|
+
readonly type: "string";
|
|
34
|
+
readonly enum: readonly ["transfer", "negative adjustment", "positive adjustment", "purchase", "sale"];
|
|
35
|
+
};
|
|
36
|
+
readonly unit_cost: {
|
|
37
|
+
readonly oneOf: readonly [{
|
|
38
|
+
readonly $schema: "http://json-schema.org/draft-07/schema#";
|
|
39
|
+
readonly title: "Money";
|
|
40
|
+
readonly type: "object";
|
|
41
|
+
readonly additionalProperties: false;
|
|
42
|
+
readonly properties: {
|
|
43
|
+
readonly value: {
|
|
44
|
+
readonly type: "integer";
|
|
45
|
+
readonly minimum: 0;
|
|
46
|
+
};
|
|
47
|
+
readonly decimal_places: {
|
|
48
|
+
readonly type: "integer";
|
|
49
|
+
readonly minimum: 0;
|
|
50
|
+
readonly maximum: 4;
|
|
51
|
+
};
|
|
52
|
+
readonly currency: {
|
|
53
|
+
readonly title: "Currency";
|
|
54
|
+
readonly $schema: "http://json-schema.org/draft-07/schema#";
|
|
55
|
+
readonly type: "string";
|
|
56
|
+
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"];
|
|
57
|
+
};
|
|
58
|
+
readonly lcy_value: {
|
|
59
|
+
readonly type: "integer";
|
|
60
|
+
readonly minimum: 0;
|
|
61
|
+
};
|
|
62
|
+
readonly lcy_currency: {
|
|
63
|
+
readonly title: "LCY Currency";
|
|
64
|
+
readonly $schema: "http://json-schema.org/draft-07/schema#";
|
|
65
|
+
readonly type: "string";
|
|
66
|
+
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"];
|
|
67
|
+
};
|
|
68
|
+
readonly lcy_decimal_places: {
|
|
69
|
+
readonly type: "integer";
|
|
70
|
+
readonly minimum: 0;
|
|
71
|
+
readonly maximum: 4;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
readonly required: readonly ["value", "currency", "lcy_value", "lcy_currency", "decimal_places", "lcy_decimal_places"];
|
|
75
|
+
}, {
|
|
76
|
+
readonly type: "null";
|
|
77
|
+
}];
|
|
78
|
+
};
|
|
79
|
+
readonly posting_date: {
|
|
80
|
+
readonly type: "string";
|
|
81
|
+
readonly format: "date";
|
|
82
|
+
};
|
|
83
|
+
readonly created_at: {
|
|
84
|
+
readonly type: "string";
|
|
85
|
+
readonly format: "date-time";
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
readonly required: readonly ["quantity", "location_code", "created_at", "posting_date", "type"];
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
readonly last_modified_at: {
|
|
92
|
+
readonly type: "string";
|
|
93
|
+
readonly format: "date-time";
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
readonly required: readonly ["style_id", "colour_id", "size_code", "history", "last_modified_at"];
|
|
97
|
+
readonly $id: "https://shushed.example.com/stock-move.schema.json";
|
|
98
|
+
};
|
|
99
|
+
export default schema;
|
|
@@ -10,6 +10,7 @@ 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 StockMovement } from './stock-movement';
|
|
13
14
|
export { default as Stock } from './stock';
|
|
14
15
|
export { default as Total } from './total';
|
|
15
16
|
export * as Messages from './messages';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export type Currency = ("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");
|
|
2
|
+
export type LCYCurrency = ("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");
|
|
3
|
+
export interface __MainSchema {
|
|
4
|
+
style_id: string;
|
|
5
|
+
colour_id: string;
|
|
6
|
+
size_code: string;
|
|
7
|
+
history: {
|
|
8
|
+
quantity: number;
|
|
9
|
+
location_code: string;
|
|
10
|
+
type: ("transfer" | "negative adjustment" | "positive adjustment" | "purchase" | "sale");
|
|
11
|
+
unit_cost?: (Money | null);
|
|
12
|
+
posting_date: string;
|
|
13
|
+
created_at: string;
|
|
14
|
+
[k: string]: unknown;
|
|
15
|
+
}[];
|
|
16
|
+
last_modified_at: string;
|
|
17
|
+
}
|
|
18
|
+
export interface Money {
|
|
19
|
+
value: number;
|
|
20
|
+
decimal_places: number;
|
|
21
|
+
currency: Currency;
|
|
22
|
+
lcy_value: number;
|
|
23
|
+
lcy_currency: LCYCurrency;
|
|
24
|
+
lcy_decimal_places: number;
|
|
25
|
+
}
|
|
26
|
+
export default __MainSchema;
|