@shushed/helpers 0.0.202-v2-20251208085030 → 0.0.202
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/asset.schema.json +78 -0
- package/dist/cjs/contracts/category.schema.json +86 -0
- package/dist/cjs/contracts/country.schema.json +258 -0
- package/dist/cjs/contracts/currency.schema.json +177 -0
- package/dist/cjs/contracts/customer-segment.schema.json +32 -0
- package/dist/cjs/contracts/development-colour.schema.json +97 -0
- package/dist/cjs/contracts/index.js +48 -0
- package/dist/cjs/contracts/marketing-preferences.schema.json +41 -0
- package/dist/cjs/contracts/messages/ean-change.schema.json +22 -0
- package/dist/cjs/contracts/messages/index.js +29 -0
- package/dist/cjs/contracts/messages/order/delivered.schema.json +26 -0
- package/dist/cjs/contracts/messages/order/index.js +18 -0
- package/dist/cjs/contracts/messages/order/new.schema.json +32 -0
- package/dist/cjs/contracts/messages/order/processed.schema.json +15 -0
- package/dist/cjs/contracts/messages/order/return-initiated.schema.json +26 -0
- package/dist/cjs/contracts/messages/order/returned.schema.json +25 -0
- package/dist/cjs/contracts/messages/order/shipped.schema.json +26 -0
- package/dist/cjs/contracts/messages/product-category.schema.json +21 -0
- package/dist/cjs/contracts/messages/product-draft.schema.json +66 -0
- package/dist/cjs/contracts/messages/product.schema.json +29 -0
- package/dist/cjs/contracts/money.schema.json +54 -0
- package/dist/cjs/contracts/order/address.schema.json +127 -0
- package/dist/cjs/contracts/order/customer.schema.json +149 -0
- package/dist/cjs/contracts/order/index.js +31 -0
- package/dist/cjs/contracts/order/item.schema.json +98 -0
- package/dist/cjs/contracts/order/payment.schema.json +115 -0
- package/dist/cjs/contracts/order/shipment/index.js +29 -0
- package/dist/cjs/contracts/order/shipment/item/index.js +8 -0
- package/dist/cjs/contracts/order/shipment/item/returned.schema.json +30 -0
- package/dist/cjs/contracts/order/shipment/item.schema.json +22 -0
- package/dist/cjs/contracts/order/shipment/pos/index.js +10 -0
- package/dist/cjs/contracts/order/shipment/pos/outbound.schema.json +37 -0
- package/dist/cjs/contracts/order/shipment/pos/return.schema.json +31 -0
- package/dist/cjs/contracts/order/shipment/pos.schema.json +48 -0
- package/dist/cjs/contracts/order/shipment/shipped/index.js +10 -0
- package/dist/cjs/contracts/order/shipment/shipped/outbound.schema.json +34 -0
- package/dist/cjs/contracts/order/shipment/shipped/return.schema.json +43 -0
- package/dist/cjs/contracts/order/shipment/shipped.schema.json +52 -0
- package/dist/cjs/contracts/order/shipment.schema.json +58 -0
- package/dist/cjs/contracts/order.schema.json +231 -0
- package/dist/cjs/contracts/product-category.schema.json +34 -0
- package/dist/cjs/contracts/product-draft.schema.json +782 -0
- package/dist/cjs/contracts/product.schema.json +816 -0
- package/dist/cjs/contracts/total.schema.json +41 -0
- package/dist/cjs/dist-dereferenced/messages/order/delivered.js +1 -1
- package/dist/cjs/dist-dereferenced/messages/order/new.js +1 -1
- package/dist/cjs/dist-dereferenced/messages/order/processed.js +1 -1
- package/dist/cjs/dist-dereferenced/messages/order/return-initiated.js +1 -1
- package/dist/cjs/dist-dereferenced/messages/order/returned.js +1 -1
- package/dist/cjs/dist-dereferenced/messages/order/shipped.js +1 -1
- package/dist/cjs/dist-dereferenced/order/customer.js +1 -1
- package/dist/cjs/dist-dereferenced/order/item.js +1 -1
- package/dist/cjs/dist-dereferenced/order/orderMain.js +1 -1
- package/dist/cjs/dist-dereferenced/order/payment.js +1 -1
- package/dist/cjs/dist-dereferenced/order/shipment/pos/outbound.js +1 -1
- package/dist/cjs/dist-dereferenced/order/shipment/pos/return.js +1 -1
- package/dist/cjs/src-public/bcOrder.js +943 -0
- package/dist/cjs/src-public/dato.js +10 -287
- package/dist/cjs/src-public/index.js +3 -1
- package/dist/cjs/src-public/validate.js +34 -0
- package/dist/types/contracts/index.d.ts +15 -0
- package/dist/types/contracts/messages/index.d.ts +5 -0
- package/dist/types/contracts/messages/order/index.d.ts +6 -0
- package/dist/types/contracts/order/index.d.ts +6 -0
- package/dist/types/contracts/order/shipment/index.d.ts +6 -0
- package/dist/types/contracts/order/shipment/item/index.d.ts +1 -0
- package/dist/types/contracts/order/shipment/pos/index.d.ts +2 -0
- package/dist/types/contracts/order/shipment/shipped/index.d.ts +2 -0
- package/dist/types/dist-dereferenced/messages/order/delivered.d.ts +34 -10
- package/dist/types/dist-dereferenced/messages/order/new.d.ts +34 -10
- package/dist/types/dist-dereferenced/messages/order/processed.d.ts +34 -10
- package/dist/types/dist-dereferenced/messages/order/return-initiated.d.ts +34 -10
- package/dist/types/dist-dereferenced/messages/order/returned.d.ts +34 -10
- package/dist/types/dist-dereferenced/messages/order/shipped.d.ts +34 -10
- package/dist/types/dist-dereferenced/order/customer.d.ts +3 -0
- package/dist/types/dist-dereferenced/order/index.d.ts +34 -10
- package/dist/types/dist-dereferenced/order/item.d.ts +6 -3
- package/dist/types/dist-dereferenced/order/orderMain.d.ts +34 -10
- package/dist/types/dist-dereferenced/order/payment.d.ts +16 -0
- package/dist/types/dist-dereferenced/order/shipment/pos/outbound.d.ts +0 -1
- package/dist/types/dist-dereferenced/order/shipment/pos/return.d.ts +0 -1
- package/dist/types/dist-types/messages/order/delivered.d.ts +13 -5
- package/dist/types/dist-types/messages/order/new.d.ts +13 -5
- package/dist/types/dist-types/messages/order/processed.d.ts +13 -5
- package/dist/types/dist-types/messages/order/return-initiated.d.ts +13 -5
- package/dist/types/dist-types/messages/order/returned.d.ts +13 -5
- package/dist/types/dist-types/messages/order/shipped.d.ts +13 -5
- package/dist/types/dist-types/order/customer.d.ts +1 -0
- package/dist/types/dist-types/order/item.d.ts +4 -3
- package/dist/types/dist-types/order/orderMain.d.ts +13 -5
- package/dist/types/dist-types/order/payment.d.ts +4 -0
- package/dist/types/src-public/bcOrder.d.ts +84 -0
- package/dist/types/src-public/dato.d.ts +1 -34
- package/dist/types/src-public/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "Development Colour",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"description": "Represents a colour / pattern of the material. Managed by the PLM (design team)",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"$id": "https://shushed.example.com/development-colour.schema.json",
|
|
8
|
+
"properties": {
|
|
9
|
+
"colour_id": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "The colour id (example: 3684). Becomes part of the product id"
|
|
12
|
+
},
|
|
13
|
+
"name": {
|
|
14
|
+
"type": [
|
|
15
|
+
"string",
|
|
16
|
+
"null"
|
|
17
|
+
],
|
|
18
|
+
"description": "The development name of the colour (example: Absinthe Green 14-6329 TCX). Always lowercase, spaces, dashes"
|
|
19
|
+
},
|
|
20
|
+
"rgb": {
|
|
21
|
+
"anyOf": [
|
|
22
|
+
{
|
|
23
|
+
"type": "null"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"type": "array",
|
|
27
|
+
"items": {
|
|
28
|
+
"type": "number"
|
|
29
|
+
},
|
|
30
|
+
"description": "The RGB value of the colour (0-255) (example: [240, 100, 0])"
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
"cmyk": {
|
|
35
|
+
"anyOf": [
|
|
36
|
+
{
|
|
37
|
+
"type": "null"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"type": "array",
|
|
41
|
+
"items": {
|
|
42
|
+
"type": "number"
|
|
43
|
+
},
|
|
44
|
+
"description": "The CMYK value of the colour (%) (example: [0, 100, 0, 0])"
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
"pantone": {
|
|
49
|
+
"anyOf": [
|
|
50
|
+
{
|
|
51
|
+
"type": "null"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"type": "object",
|
|
55
|
+
"properties": {
|
|
56
|
+
"name": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"description": "Pantone colour name"
|
|
59
|
+
},
|
|
60
|
+
"system": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"pattern": "^[A-Z0-9-]+$",
|
|
63
|
+
"description": "Pantone system (example: TCX). Always uppercase, dashes, numbers"
|
|
64
|
+
},
|
|
65
|
+
"id": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"pattern": "^[A-Z0-9-]+$",
|
|
68
|
+
"description": "The pantone id (example: 14-6329). Always uppercase, dashes, numbers"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
"display_name": {
|
|
75
|
+
"type": [
|
|
76
|
+
"string",
|
|
77
|
+
"null"
|
|
78
|
+
],
|
|
79
|
+
"pattern": "^[ a-z-]+$",
|
|
80
|
+
"description": "The display name of the colour (example: star blue). Always lowercase, spaces, dashes"
|
|
81
|
+
},
|
|
82
|
+
"family_display_name": {
|
|
83
|
+
"type": [
|
|
84
|
+
"string",
|
|
85
|
+
"null"
|
|
86
|
+
],
|
|
87
|
+
"pattern": "^[ a-z]+$",
|
|
88
|
+
"description": "The display name of the colour family (example blue). Always lowercase, spaces"
|
|
89
|
+
},
|
|
90
|
+
"source_asset": {
|
|
91
|
+
"$ref": "https://shushed.example.com/asset.schema.json"
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"required": [
|
|
95
|
+
"colour_id"
|
|
96
|
+
]
|
|
97
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
|
+
};
|
|
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;
|
|
21
|
+
var currency_schema_json_1 = require("./currency.schema.json");
|
|
22
|
+
Object.defineProperty(exports, "Currency", { enumerable: true, get: function () { return __importDefault(currency_schema_json_1).default; } });
|
|
23
|
+
var country_schema_json_1 = require("./country.schema.json");
|
|
24
|
+
Object.defineProperty(exports, "Country", { enumerable: true, get: function () { return __importDefault(country_schema_json_1).default; } });
|
|
25
|
+
var money_schema_json_1 = require("./money.schema.json");
|
|
26
|
+
Object.defineProperty(exports, "Money", { enumerable: true, get: function () { return __importDefault(money_schema_json_1).default; } });
|
|
27
|
+
var total_schema_json_1 = require("./total.schema.json");
|
|
28
|
+
Object.defineProperty(exports, "Total", { enumerable: true, get: function () { return __importDefault(total_schema_json_1).default; } });
|
|
29
|
+
var product_draft_schema_json_1 = require("./product-draft.schema.json");
|
|
30
|
+
Object.defineProperty(exports, "ProductDraft", { enumerable: true, get: function () { return __importDefault(product_draft_schema_json_1).default; } });
|
|
31
|
+
var product_schema_json_1 = require("./product.schema.json");
|
|
32
|
+
Object.defineProperty(exports, "Product", { enumerable: true, get: function () { return __importDefault(product_schema_json_1).default; } });
|
|
33
|
+
var product_category_schema_json_1 = require("./product-category.schema.json");
|
|
34
|
+
Object.defineProperty(exports, "ProductCategory", { enumerable: true, get: function () { return __importDefault(product_category_schema_json_1).default; } });
|
|
35
|
+
var category_schema_json_1 = require("./category.schema.json");
|
|
36
|
+
Object.defineProperty(exports, "Category", { enumerable: true, get: function () { return __importDefault(category_schema_json_1).default; } });
|
|
37
|
+
var development_colour_schema_json_1 = require("./development-colour.schema.json");
|
|
38
|
+
Object.defineProperty(exports, "DevelopmentColour", { enumerable: true, get: function () { return __importDefault(development_colour_schema_json_1).default; } });
|
|
39
|
+
var asset_schema_json_1 = require("./asset.schema.json");
|
|
40
|
+
Object.defineProperty(exports, "Asset", { enumerable: true, get: function () { return __importDefault(asset_schema_json_1).default; } });
|
|
41
|
+
var customer_segment_schema_json_1 = require("./customer-segment.schema.json");
|
|
42
|
+
Object.defineProperty(exports, "CustomerSegment", { enumerable: true, get: function () { return __importDefault(customer_segment_schema_json_1).default; } });
|
|
43
|
+
var marketing_preferences_schema_json_1 = require("./marketing-preferences.schema.json");
|
|
44
|
+
Object.defineProperty(exports, "MarketingPref", { enumerable: true, get: function () { return __importDefault(marketing_preferences_schema_json_1).default; } });
|
|
45
|
+
__exportStar(require("./order"), exports);
|
|
46
|
+
var order_schema_json_1 = require("./order.schema.json");
|
|
47
|
+
Object.defineProperty(exports, "Order", { enumerable: true, get: function () { return __importDefault(order_schema_json_1).default; } });
|
|
48
|
+
__exportStar(require("./messages"), exports);
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "MarketingPref",
|
|
4
|
+
"$id": "https://shushed.example.com/order/marketing-preferences.schema.json",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"properties": {
|
|
8
|
+
"email_consent": {
|
|
9
|
+
"type": "boolean",
|
|
10
|
+
"description": "If the user has given consent to receive email marketing - Example: true or false"
|
|
11
|
+
},
|
|
12
|
+
"catalogue_consent": {
|
|
13
|
+
"type": "boolean",
|
|
14
|
+
"description": "If the user has given catalogue consent - Example: true or false"
|
|
15
|
+
},
|
|
16
|
+
"phone_consent": {
|
|
17
|
+
"type": "boolean",
|
|
18
|
+
"description": "If the user has given consent to receive phone marketing - Example: true or false"
|
|
19
|
+
},
|
|
20
|
+
"3rdparty_consent": {
|
|
21
|
+
"type": "boolean",
|
|
22
|
+
"description": "If the user has given consent to receive 3rd party marketing - Example: true or false"
|
|
23
|
+
},
|
|
24
|
+
"svc_customer_id": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"description": "Customer id"
|
|
27
|
+
},
|
|
28
|
+
"email": {
|
|
29
|
+
"type": ["string", "null"],
|
|
30
|
+
"format": "email",
|
|
31
|
+
"description": "Normalized and lowercased email. Null if invalid.",
|
|
32
|
+
"example": "alice.johnson@example.com"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"required": [
|
|
36
|
+
"email_consent",
|
|
37
|
+
"email",
|
|
38
|
+
"phone_consent",
|
|
39
|
+
"svc_customer_id"
|
|
40
|
+
]
|
|
41
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "EANChange",
|
|
4
|
+
"additionalProperties": false,
|
|
5
|
+
"$id": "https://shushed.example.com/messages/ean-change.schema.json",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"sku",
|
|
9
|
+
"ean"
|
|
10
|
+
],
|
|
11
|
+
"properties": {
|
|
12
|
+
"sku": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"faker": {
|
|
15
|
+
"custom.sku": []
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"ean": {
|
|
19
|
+
"type": "string"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
|
+
};
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
exports.MessageProductCategory = exports.MessageProductChange = exports.MessageEanChange = exports.MessageProductDraft = void 0;
|
|
21
|
+
var product_draft_schema_json_1 = require("./product-draft.schema.json");
|
|
22
|
+
Object.defineProperty(exports, "MessageProductDraft", { enumerable: true, get: function () { return __importDefault(product_draft_schema_json_1).default; } });
|
|
23
|
+
var ean_change_schema_json_1 = require("./ean-change.schema.json");
|
|
24
|
+
Object.defineProperty(exports, "MessageEanChange", { enumerable: true, get: function () { return __importDefault(ean_change_schema_json_1).default; } });
|
|
25
|
+
var product_schema_json_1 = require("./product.schema.json");
|
|
26
|
+
Object.defineProperty(exports, "MessageProductChange", { enumerable: true, get: function () { return __importDefault(product_schema_json_1).default; } });
|
|
27
|
+
var product_category_schema_json_1 = require("./product-category.schema.json");
|
|
28
|
+
Object.defineProperty(exports, "MessageProductCategory", { enumerable: true, get: function () { return __importDefault(product_category_schema_json_1).default; } });
|
|
29
|
+
__exportStar(require("./order"), exports);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "OrderDelivered",
|
|
4
|
+
"$id": "https://shushed.example.com/messages/order/delivered.schema.json",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"allOf": [
|
|
7
|
+
{ "$ref": "https://shushed.example.com/order.schema.json" },
|
|
8
|
+
{
|
|
9
|
+
"type": "object",
|
|
10
|
+
"additionalProperties": false,
|
|
11
|
+
"properties": {
|
|
12
|
+
"status": {
|
|
13
|
+
"type": ["string"],
|
|
14
|
+
"enum": [
|
|
15
|
+
"SHIPPED",
|
|
16
|
+
"PARTIALLY-SHIPPED",
|
|
17
|
+
"RETURNED",
|
|
18
|
+
"PARTIALLY-RETURNED",
|
|
19
|
+
"CANCELLED"
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"required": ["erp_order_id", "shipments", "items", "total"]
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.MessageOrderShipped = exports.MessageOrderReturned = exports.MessageOrderReturnInitiated = exports.MessageOrderProcessed = exports.MessageOrderNew = exports.MessageOrderDelivered = void 0;
|
|
7
|
+
var delivered_schema_json_1 = require("./delivered.schema.json");
|
|
8
|
+
Object.defineProperty(exports, "MessageOrderDelivered", { enumerable: true, get: function () { return __importDefault(delivered_schema_json_1).default; } });
|
|
9
|
+
var new_schema_json_1 = require("./new.schema.json");
|
|
10
|
+
Object.defineProperty(exports, "MessageOrderNew", { enumerable: true, get: function () { return __importDefault(new_schema_json_1).default; } });
|
|
11
|
+
var processed_schema_json_1 = require("./processed.schema.json");
|
|
12
|
+
Object.defineProperty(exports, "MessageOrderProcessed", { enumerable: true, get: function () { return __importDefault(processed_schema_json_1).default; } });
|
|
13
|
+
var return_initiated_schema_json_1 = require("./return-initiated.schema.json");
|
|
14
|
+
Object.defineProperty(exports, "MessageOrderReturnInitiated", { enumerable: true, get: function () { return __importDefault(return_initiated_schema_json_1).default; } });
|
|
15
|
+
var returned_schema_json_1 = require("./returned.schema.json");
|
|
16
|
+
Object.defineProperty(exports, "MessageOrderReturned", { enumerable: true, get: function () { return __importDefault(returned_schema_json_1).default; } });
|
|
17
|
+
var shipped_schema_json_1 = require("./shipped.schema.json");
|
|
18
|
+
Object.defineProperty(exports, "MessageOrderShipped", { enumerable: true, get: function () { return __importDefault(shipped_schema_json_1).default; } });
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "OrderNew",
|
|
4
|
+
"$id": "https://shushed.example.com/messages/order/new.schema.json",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"allOf": [
|
|
7
|
+
{ "$ref": "https://shushed.example.com/order.schema.json" },
|
|
8
|
+
{
|
|
9
|
+
"type": "object",
|
|
10
|
+
"additionalProperties": false,
|
|
11
|
+
"properties": {
|
|
12
|
+
"status": {
|
|
13
|
+
"type": ["string"],
|
|
14
|
+
"enum": ["NEW", "PENDING"],
|
|
15
|
+
"description": "Initial status of the newly created order. 'NEW' indicates it's freshly created; 'PENDING' may be used when awaiting payment capture or confirmation."
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"required": [
|
|
19
|
+
"payments",
|
|
20
|
+
"customer",
|
|
21
|
+
"is_pos",
|
|
22
|
+
"is_anonymous",
|
|
23
|
+
"is_gift",
|
|
24
|
+
"shipping_address",
|
|
25
|
+
"billing_address",
|
|
26
|
+
"shipments",
|
|
27
|
+
"items",
|
|
28
|
+
"total"
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "OrderProcessed",
|
|
4
|
+
"$id": "https://shushed.example.com/messages/order/processed.schema.json",
|
|
5
|
+
"description": "Represents an order that has been successfully processed in the ERP system.",
|
|
6
|
+
"additionalProperties": true,
|
|
7
|
+
"allOf": [
|
|
8
|
+
{ "$ref": "https://shushed.example.com/order.schema.json" },
|
|
9
|
+
{
|
|
10
|
+
"type": "object",
|
|
11
|
+
"additionalProperties": true,
|
|
12
|
+
"required": ["erp_order_id", "customer", "total"]
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "OrderReturnInitiated",
|
|
4
|
+
"additionalProperties": false,
|
|
5
|
+
"$id": "https://shushed.example.com/messages/order/return-initiated.schema.json",
|
|
6
|
+
"description": "Event message triggered when a customer initiates a return, starting the refund process.",
|
|
7
|
+
"allOf": [
|
|
8
|
+
{ "$ref": "https://shushed.example.com/order.schema.json" },
|
|
9
|
+
{
|
|
10
|
+
"type": "object",
|
|
11
|
+
"additionalProperties": false,
|
|
12
|
+
"properties": {
|
|
13
|
+
"status": {
|
|
14
|
+
"type": ["string"],
|
|
15
|
+
"enum": [
|
|
16
|
+
"RETURN-INITIATED",
|
|
17
|
+
"RETURN-REQUESTED",
|
|
18
|
+
"AWAITING-RETURN"
|
|
19
|
+
],
|
|
20
|
+
"description": "Status indicating the early stage of the return process."
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"required": ["erp_order_id", "shipments", "items", "total"]
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "OrderReturnInitiated",
|
|
4
|
+
"$id": "https://shushed.example.com/messages/order/returned.schema.json",
|
|
5
|
+
"description": "Event triggered when an order has been fully or partially returned.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"allOf": [
|
|
8
|
+
{ "$ref": "https://shushed.example.com/order.schema.json" },
|
|
9
|
+
{
|
|
10
|
+
"type": "object",
|
|
11
|
+
"properties": {
|
|
12
|
+
"status": {
|
|
13
|
+
"type": ["string"],
|
|
14
|
+
"enum": [
|
|
15
|
+
"RETURNED",
|
|
16
|
+
"PARTIALLY-RETURNED",
|
|
17
|
+
"CANCELLED"
|
|
18
|
+
],
|
|
19
|
+
"description": "Final status of the order after return processing. 'RETURNED' means all items were returned and 'PARTIALLY-RETURNED' means some were. 'CANCELLED': Order or items cancelled before return or shipment"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"required": ["shipments"]
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "OrderShipped",
|
|
4
|
+
"description": "Represents the state of an order after shipment activities, including shipment, partial shipment, returns, partial returns, and cancellations.",
|
|
5
|
+
"$id": "https://shushed.example.com/messages/order/shipped.schema.json",
|
|
6
|
+
"allOf": [
|
|
7
|
+
{ "$ref": "https://shushed.example.com/order.schema.json" },
|
|
8
|
+
{
|
|
9
|
+
"type": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"status": {
|
|
12
|
+
"type": ["string"],
|
|
13
|
+
"enum": [
|
|
14
|
+
"SHIPPED",
|
|
15
|
+
"PARTIALLY-SHIPPED",
|
|
16
|
+
"RETURNED",
|
|
17
|
+
"PARTIALLY-RETURNED",
|
|
18
|
+
"CANCELLED"
|
|
19
|
+
],
|
|
20
|
+
"description": "Current shipment or return status of the order."
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"required": ["erp_order_id", "shipments", "items", "total"]
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "ProductCategory",
|
|
4
|
+
"additionalProperties": false,
|
|
5
|
+
"$id": "https://shushed.example.com/messages/product-category.schema.json",
|
|
6
|
+
"description": "Pub/Sub message schema for product-category assignments, wrapping the core ProductCategory payload.",
|
|
7
|
+
"allOf": [
|
|
8
|
+
{
|
|
9
|
+
"$ref": "https://shushed.example.com/product-category.schema.json"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"type": "object",
|
|
13
|
+
"additionalProperties": false,
|
|
14
|
+
"required": [
|
|
15
|
+
"product_id",
|
|
16
|
+
"site_id",
|
|
17
|
+
"categories"
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "OrderReturnInitiated",
|
|
4
|
+
"additionalProperties": false,
|
|
5
|
+
"$id": "https://shushed.example.com/messages/product-draft.schema.json",
|
|
6
|
+
"allOf": [
|
|
7
|
+
{ "$ref": "https://shushed.example.com/product-draft.schema.json" },
|
|
8
|
+
{
|
|
9
|
+
"type": "object",
|
|
10
|
+
"additionalProperties": false,
|
|
11
|
+
"required": [
|
|
12
|
+
"product_name",
|
|
13
|
+
"colour_label",
|
|
14
|
+
"developement_colourway_id",
|
|
15
|
+
"colour_id",
|
|
16
|
+
"style_id",
|
|
17
|
+
"season_id",
|
|
18
|
+
"drop_name",
|
|
19
|
+
"stock_type",
|
|
20
|
+
"block",
|
|
21
|
+
"packing_method",
|
|
22
|
+
"is_bought_in_product",
|
|
23
|
+
"is_carry_over",
|
|
24
|
+
"image_url",
|
|
25
|
+
"product_type",
|
|
26
|
+
"product_category",
|
|
27
|
+
"division",
|
|
28
|
+
"care_instructions",
|
|
29
|
+
"range",
|
|
30
|
+
"main_fibre",
|
|
31
|
+
"size_range",
|
|
32
|
+
"sizes",
|
|
33
|
+
"occasion",
|
|
34
|
+
"strategy_type",
|
|
35
|
+
"pattern_name",
|
|
36
|
+
"neckline",
|
|
37
|
+
"sleeve_length",
|
|
38
|
+
"leg_length",
|
|
39
|
+
"heel_height",
|
|
40
|
+
"heel_shape",
|
|
41
|
+
"toe_shape",
|
|
42
|
+
"handle_straps",
|
|
43
|
+
"fastening",
|
|
44
|
+
"sole_code",
|
|
45
|
+
"fashionability",
|
|
46
|
+
"weight",
|
|
47
|
+
"average_weight_grams",
|
|
48
|
+
"length_measurement",
|
|
49
|
+
"fabric_composition_footwear",
|
|
50
|
+
"retail_price",
|
|
51
|
+
"current_cost",
|
|
52
|
+
"currency",
|
|
53
|
+
"moq",
|
|
54
|
+
"finishing_cost",
|
|
55
|
+
"other_costs",
|
|
56
|
+
"freight_rate",
|
|
57
|
+
"duty_rate",
|
|
58
|
+
"commodity_code_ref",
|
|
59
|
+
"country_of_origin",
|
|
60
|
+
"port_of_origin",
|
|
61
|
+
"supplier_id",
|
|
62
|
+
"factory_id"
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "ProductChange",
|
|
4
|
+
"additionalProperties": false,
|
|
5
|
+
"$id": "https://shushed.example.com/messages/product-change.schema.json",
|
|
6
|
+
"allOf": [
|
|
7
|
+
{
|
|
8
|
+
"$ref": "https://shushed.example.com/product.schema.json"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"type": "object",
|
|
12
|
+
"additionalProperties": false,
|
|
13
|
+
"required": [
|
|
14
|
+
"product_id",
|
|
15
|
+
"style_id",
|
|
16
|
+
"product_name",
|
|
17
|
+
"variants",
|
|
18
|
+
"images",
|
|
19
|
+
"attributes",
|
|
20
|
+
"is_available_to_order",
|
|
21
|
+
"created_at",
|
|
22
|
+
"last_modified_at",
|
|
23
|
+
"colour_family_name",
|
|
24
|
+
"colour_label",
|
|
25
|
+
"vat_amount"
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "Money",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"description": "Represents a monetary value with associated currency and formatting details.",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"$id": "https://shushed.example.com/money.schema.json",
|
|
8
|
+
"$comment": "LCY stands for local currency. GBP for all purposes",
|
|
9
|
+
"properties": {
|
|
10
|
+
"value": {
|
|
11
|
+
"type": "integer",
|
|
12
|
+
"minimum": 0,
|
|
13
|
+
"faker": { "commerce.price": [1000, 20000, 0] },
|
|
14
|
+
"description": "Amount in the smallest currency unit."
|
|
15
|
+
},
|
|
16
|
+
"decimal_places": {
|
|
17
|
+
"type": "integer",
|
|
18
|
+
"minimum": 0,
|
|
19
|
+
"maximum": 4,
|
|
20
|
+
"faker": { "number.between": [2, 2] },
|
|
21
|
+
"description": "Number of decimal places used by the currency."
|
|
22
|
+
},
|
|
23
|
+
"currency": {
|
|
24
|
+
"$ref": "https://shushed.example.com/currency.schema.json",
|
|
25
|
+
"title": "Currency"
|
|
26
|
+
},
|
|
27
|
+
"lcy_value": {
|
|
28
|
+
"type": "integer",
|
|
29
|
+
"minimum": 0,
|
|
30
|
+
"faker": { "commerce.price": [1000, 20000, 0] },
|
|
31
|
+
"description": "Local currency value (example: GBP) in smallest units."
|
|
32
|
+
},
|
|
33
|
+
"lcy_currency": {
|
|
34
|
+
"$ref": "https://shushed.example.com/currency.schema.json",
|
|
35
|
+
"faker": { "helpers.arrayElement": [["GBP"]] },
|
|
36
|
+
"title": "LCY Currency"
|
|
37
|
+
},
|
|
38
|
+
"lcy_decimal_places": {
|
|
39
|
+
"type": "integer",
|
|
40
|
+
"minimum": 0,
|
|
41
|
+
"maximum": 4,
|
|
42
|
+
"faker": { "number.between": [2, 2] },
|
|
43
|
+
"description": "Decimal precision for the local currency."
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"required": [
|
|
47
|
+
"value",
|
|
48
|
+
"currency",
|
|
49
|
+
"lcy_value",
|
|
50
|
+
"lcy_currency",
|
|
51
|
+
"decimal_places",
|
|
52
|
+
"lcy_decimal_places"
|
|
53
|
+
]
|
|
54
|
+
}
|