merchi_sdk_ts 0.0.1
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/.babelrc +13 -0
- package/.eslintrc.cjs +43 -0
- package/LICENSE +21 -0
- package/README.md +2 -0
- package/jest.config.js +17 -0
- package/package.json +44 -0
- package/src/constants/auto_assign_production_on_actions.ts +6 -0
- package/src/constants/call_to_actions.test.ts +5 -0
- package/src/constants/call_to_actions.ts +14 -0
- package/src/constants/discount_types.test.ts +5 -0
- package/src/constants/discount_types.ts +3 -0
- package/src/constants/domain_types.test.ts +5 -0
- package/src/constants/domain_types.ts +12 -0
- package/src/constants/errors.ts +32 -0
- package/src/constants/event_types.test.ts +5 -0
- package/src/constants/event_types.ts +5 -0
- package/src/constants/field_types.test.ts +5 -0
- package/src/constants/field_types.ts +13 -0
- package/src/constants/input_types.test.ts +5 -0
- package/src/constants/input_types.ts +13 -0
- package/src/constants/inventory_status.test.ts +5 -0
- package/src/constants/inventory_statuses.ts +6 -0
- package/src/constants/invoice_types.test.ts +5 -0
- package/src/constants/invoice_types.ts +5 -0
- package/src/constants/item_types.test.ts +5 -0
- package/src/constants/item_types.ts +5 -0
- package/src/constants/job/drafting_status.test.ts +5 -0
- package/src/constants/job/drafting_status.ts +7 -0
- package/src/constants/job/payment_status.test.ts +5 -0
- package/src/constants/job/payment_status.ts +7 -0
- package/src/constants/job/production_status.test.ts +5 -0
- package/src/constants/job/production_status.ts +12 -0
- package/src/constants/job/shipment_status.test.ts +5 -0
- package/src/constants/job/shipment_status.ts +11 -0
- package/src/constants/job/supply_chain_request_status.test.ts +5 -0
- package/src/constants/job/supply_chain_request_status.ts +6 -0
- package/src/constants/job_priorities.test.ts +5 -0
- package/src/constants/job_priorities.ts +6 -0
- package/src/constants/job_status.test.ts +5 -0
- package/src/constants/job_status.ts +49 -0
- package/src/constants/job_types.test.ts +5 -0
- package/src/constants/job_types.ts +15 -0
- package/src/constants/notification_sections.test.ts +5 -0
- package/src/constants/notification_sections.ts +13 -0
- package/src/constants/notification_types.test.ts +5 -0
- package/src/constants/notification_types.ts +97 -0
- package/src/constants/notification_urgencies.test.ts +5 -0
- package/src/constants/notification_urgencies.ts +7 -0
- package/src/constants/payment_types.test.ts +5 -0
- package/src/constants/payment_types.ts +10 -0
- package/src/constants/platform.test.ts +15 -0
- package/src/constants/platform.ts +6 -0
- package/src/constants/product_types.test.ts +6 -0
- package/src/constants/product_types.ts +25 -0
- package/src/constants/rights.test.ts +5 -0
- package/src/constants/rights.ts +5 -0
- package/src/constants/robots_meta_directives.test.ts +5 -0
- package/src/constants/robots_meta_directives.ts +11 -0
- package/src/constants/roles.test.ts +5 -0
- package/src/constants/roles.ts +38 -0
- package/src/constants/shipment_companies.test.ts +5 -0
- package/src/constants/shipment_companies.ts +18 -0
- package/src/constants/shipment_services.test.ts +5 -0
- package/src/constants/shipment_services.ts +3 -0
- package/src/constants/system_roles.test.ts +5 -0
- package/src/constants/system_roles.ts +3 -0
- package/src/constants/theme_foundations.test.ts +5 -0
- package/src/constants/theme_foundations.ts +6 -0
- package/src/constants/theme_status.test.ts +5 -0
- package/src/constants/theme_status.ts +5 -0
- package/src/constants/user_types.test.ts +5 -0
- package/src/constants/user_types.ts +17 -0
- package/src/constants/white_label_accessibilities.test.ts +5 -0
- package/src/constants/white_label_accessibilities.ts +6 -0
- package/src/cookie.test.ts +11 -0
- package/src/cookie.ts +16 -0
- package/src/entities/address.test.ts +7 -0
- package/src/entities/address.ts +65 -0
- package/src/entities/assignment.test.ts +39 -0
- package/src/entities/assignment.ts +92 -0
- package/src/entities/automatic_payment_relationship.test.ts +8 -0
- package/src/entities/automatic_payment_relationship.ts +26 -0
- package/src/entities/backup.test.ts +7 -0
- package/src/entities/backup.ts +14 -0
- package/src/entities/bank.test.ts +7 -0
- package/src/entities/bank.ts +45 -0
- package/src/entities/cart.test.ts +50 -0
- package/src/entities/cart.ts +89 -0
- package/src/entities/cart_item.test.ts +33 -0
- package/src/entities/cart_item.ts +77 -0
- package/src/entities/cart_shipment_group.ts +21 -0
- package/src/entities/cart_shipment_quote.ts +33 -0
- package/src/entities/category.test.ts +57 -0
- package/src/entities/category.ts +37 -0
- package/src/entities/company.test.ts +7 -0
- package/src/entities/company.ts +275 -0
- package/src/entities/company_invitation.test.ts +7 -0
- package/src/entities/company_invitation.ts +33 -0
- package/src/entities/component.test.ts +14 -0
- package/src/entities/component.ts +92 -0
- package/src/entities/component_tag.test.ts +7 -0
- package/src/entities/component_tag.ts +17 -0
- package/src/entities/component_version.test.ts +7 -0
- package/src/entities/component_version.ts +30 -0
- package/src/entities/country_tax.test.ts +13 -0
- package/src/entities/country_tax.ts +46 -0
- package/src/entities/discount.test.ts +18 -0
- package/src/entities/discount.ts +34 -0
- package/src/entities/discount_group.test.ts +7 -0
- package/src/entities/discount_group.ts +28 -0
- package/src/entities/domain.test.ts +79 -0
- package/src/entities/domain.ts +246 -0
- package/src/entities/domain_invitation.test.ts +7 -0
- package/src/entities/domain_invitation.ts +36 -0
- package/src/entities/domain_tag.test.ts +7 -0
- package/src/entities/domain_tag.ts +42 -0
- package/src/entities/draft.test.ts +43 -0
- package/src/entities/draft.ts +88 -0
- package/src/entities/draft_comment.test.ts +7 -0
- package/src/entities/draft_comment.ts +54 -0
- package/src/entities/draft_template.test.ts +7 -0
- package/src/entities/draft_template.ts +40 -0
- package/src/entities/email_address.test.ts +7 -0
- package/src/entities/email_address.ts +24 -0
- package/src/entities/email_counter.test.ts +7 -0
- package/src/entities/email_counter.ts +20 -0
- package/src/entities/enrolled_domain.test.ts +7 -0
- package/src/entities/enrolled_domain.ts +40 -0
- package/src/entities/exchange_rate.test.ts +7 -0
- package/src/entities/exchange_rate.ts +22 -0
- package/src/entities/file.test.ts +43 -0
- package/src/entities/file.ts +172 -0
- package/src/entities/internal_tag.test.ts +7 -0
- package/src/entities/internal_tag.ts +51 -0
- package/src/entities/inventory.test.ts +28 -0
- package/src/entities/inventory.ts +56 -0
- package/src/entities/inventory_unit_variation.test.ts +7 -0
- package/src/entities/inventory_unit_variation.ts +29 -0
- package/src/entities/invoice.test.ts +43 -0
- package/src/entities/invoice.ts +179 -0
- package/src/entities/item.test.ts +19 -0
- package/src/entities/item.ts +44 -0
- package/src/entities/job.test.ts +95 -0
- package/src/entities/job.ts +349 -0
- package/src/entities/job_comment.test.ts +7 -0
- package/src/entities/job_comment.ts +50 -0
- package/src/entities/matching_inventory.ts +29 -0
- package/src/entities/menu.test.ts +7 -0
- package/src/entities/menu.ts +30 -0
- package/src/entities/menu_item.test.ts +7 -0
- package/src/entities/menu_item.ts +29 -0
- package/src/entities/notification.test.ts +7 -0
- package/src/entities/notification.ts +99 -0
- package/src/entities/page.test.ts +7 -0
- package/src/entities/page.ts +32 -0
- package/src/entities/payment.test.ts +19 -0
- package/src/entities/payment.ts +65 -0
- package/src/entities/payment_device.test.ts +7 -0
- package/src/entities/payment_device.ts +30 -0
- package/src/entities/phone_number.test.ts +7 -0
- package/src/entities/phone_number.ts +36 -0
- package/src/entities/product.test.ts +750 -0
- package/src/entities/product.ts +427 -0
- package/src/entities/production_comment.test.ts +7 -0
- package/src/entities/production_comment.ts +50 -0
- package/src/entities/quote.test.ts +98 -0
- package/src/entities/quote.ts +140 -0
- package/src/entities/quote_item.test.ts +50 -0
- package/src/entities/quote_item.ts +71 -0
- package/src/entities/seo_domain_page.test.ts +7 -0
- package/src/entities/seo_domain_page.ts +33 -0
- package/src/entities/session.test.ts +7 -0
- package/src/entities/session.ts +28 -0
- package/src/entities/shipment.test.ts +24 -0
- package/src/entities/shipment.ts +185 -0
- package/src/entities/shipment_item.test.ts +7 -0
- package/src/entities/shipment_item.ts +15 -0
- package/src/entities/shipment_item_fulfillment.test.ts +8 -0
- package/src/entities/shipment_item_fulfillment.ts +15 -0
- package/src/entities/shipment_method.test.ts +7 -0
- package/src/entities/shipment_method.ts +61 -0
- package/src/entities/shipment_method_variation.test.ts +7 -0
- package/src/entities/shipment_method_variation.ts +39 -0
- package/src/entities/short_url.test.ts +7 -0
- package/src/entities/short_url.ts +36 -0
- package/src/entities/subscription_plan.test.ts +7 -0
- package/src/entities/subscription_plan.ts +73 -0
- package/src/entities/supply_domain.test.ts +7 -0
- package/src/entities/supply_domain.ts +27 -0
- package/src/entities/system_role.test.ts +7 -0
- package/src/entities/system_role.ts +17 -0
- package/src/entities/theme.test.ts +38 -0
- package/src/entities/theme.ts +267 -0
- package/src/entities/theme_css_setting.test.ts +7 -0
- package/src/entities/theme_css_setting.ts +23 -0
- package/src/entities/user.test.ts +154 -0
- package/src/entities/user.ts +394 -0
- package/src/entities/user_company.test.ts +7 -0
- package/src/entities/user_company.ts +27 -0
- package/src/entities/variation.test.ts +7 -0
- package/src/entities/variation.ts +61 -0
- package/src/entities/variation_field.test.ts +76 -0
- package/src/entities/variation_field.ts +169 -0
- package/src/entities/variation_fields_option.test.ts +46 -0
- package/src/entities/variation_fields_option.ts +95 -0
- package/src/entities/variation_option.test.ts +7 -0
- package/src/entities/variation_option.ts +52 -0
- package/src/entities/variations_group.test.ts +7 -0
- package/src/entities/variations_group.ts +41 -0
- package/src/entity.ts +1002 -0
- package/src/merchi.test.ts +25 -0
- package/src/merchi.ts +379 -0
- package/src/request.test.ts +43 -0
- package/src/request.ts +124 -0
- package/src/test_util.ts +18 -0
- package/src/toasts.test.ts +38 -0
- package/src/toasts.ts +34 -0
- package/src/util/float.ts +12 -0
- package/src/util/query_string.test.ts +7 -0
- package/src/util/query_string.ts +11 -0
- package/src/util/validation.test.ts +16 -0
- package/src/util/validation.ts +2 -0
- package/src/uuid.test.ts +15 -0
- package/src/uuid.ts +8 -0
- package/tsconfig.json +23 -0
- package/webpack.config.cjs +27 -0
package/.babelrc
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"presets": [
|
|
3
|
+
["@babel/preset-env", {"modules": false}],
|
|
4
|
+
"@babel/preset-react",
|
|
5
|
+
"@babel/preset-typescript"
|
|
6
|
+
],
|
|
7
|
+
"plugins": [
|
|
8
|
+
["@babel/plugin-proposal-decorators", { "legacy": true }],
|
|
9
|
+
["@babel/plugin-transform-react-jsx", {
|
|
10
|
+
"runtime": "automatic"
|
|
11
|
+
}]
|
|
12
|
+
]
|
|
13
|
+
}
|
package/.eslintrc.cjs
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
'parser': '@typescript-eslint/parser',
|
|
3
|
+
'plugins': ['@typescript-eslint'],
|
|
4
|
+
'env': {
|
|
5
|
+
'browser': true,
|
|
6
|
+
'es6': true,
|
|
7
|
+
'jest': true
|
|
8
|
+
},
|
|
9
|
+
'extends': ['eslint:recommended',
|
|
10
|
+
'plugin:@typescript-eslint/eslint-recommended',
|
|
11
|
+
'plugin:@typescript-eslint/recommended'],
|
|
12
|
+
'globals': {
|
|
13
|
+
'Atomics': 'readonly',
|
|
14
|
+
'SharedArrayBuffer': 'readonly',
|
|
15
|
+
'global': 'writable'
|
|
16
|
+
},
|
|
17
|
+
'parserOptions': {
|
|
18
|
+
'ecmaVersion': 2018,
|
|
19
|
+
'sourceType': 'module'
|
|
20
|
+
},
|
|
21
|
+
'rules': {
|
|
22
|
+
'indent': 'off',
|
|
23
|
+
'@typescript-eslint/indent': ['error', 2],
|
|
24
|
+
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
25
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
26
|
+
'@typescript-eslint/no-non-null-assertion': 'off',
|
|
27
|
+
'@typescript-eslint/no-empty-function': 'off',
|
|
28
|
+
'@typescript-eslint/no-this-alias': 'off',
|
|
29
|
+
'@typescript-eslint/ban-types': 'off',
|
|
30
|
+
'linebreak-style': [
|
|
31
|
+
'error',
|
|
32
|
+
'unix'
|
|
33
|
+
],
|
|
34
|
+
'quotes': [
|
|
35
|
+
'error',
|
|
36
|
+
'single'
|
|
37
|
+
],
|
|
38
|
+
'semi': [
|
|
39
|
+
'error',
|
|
40
|
+
'always'
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
};
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Merchi
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
package/jest.config.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
"roots": ["<rootDir>/src"],
|
|
3
|
+
"transform": {
|
|
4
|
+
"^.+\\.tsx?$": "ts-jest"
|
|
5
|
+
},
|
|
6
|
+
"testEnvironment": 'jsdom',
|
|
7
|
+
"collectCoverage": true,
|
|
8
|
+
"collectCoverageFrom": ["src/**"],
|
|
9
|
+
"coverageThreshold": {
|
|
10
|
+
"global": {
|
|
11
|
+
"branches": 100,
|
|
12
|
+
"functions": 100,
|
|
13
|
+
"lines": 100,
|
|
14
|
+
"statements": 100
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "merchi_sdk_ts",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"main": "src/index.js",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"repository": "git@github.com:merchisdk/merchi_sdk_ts.git",
|
|
7
|
+
"author": "Daniel Collins <mail@dcollins.info>, James Campton <james@merchi.co>, Cheng Yu <s3341458@gmail.com>",
|
|
8
|
+
"license": "GPL-3.0",
|
|
9
|
+
"scripts": {
|
|
10
|
+
"build": "webpack",
|
|
11
|
+
"test": "jest --coverage"
|
|
12
|
+
},
|
|
13
|
+
"devDependencies": {
|
|
14
|
+
"@babel/cli": "^7.23.0",
|
|
15
|
+
"@babel/core": "^7.23.0",
|
|
16
|
+
"@babel/plugin-transform-react-jsx": "^7.22.15",
|
|
17
|
+
"@babel/plugin-transform-runtime": "^7.23.3",
|
|
18
|
+
"@babel/preset-env": "^7.23.3",
|
|
19
|
+
"@babel/preset-react": "^7.23.3",
|
|
20
|
+
"@babel/preset-typescript": "^7.23.3",
|
|
21
|
+
"@types/jest": "^28.0.0",
|
|
22
|
+
"@typescript-eslint/eslint-plugin": "^5.0.0",
|
|
23
|
+
"@typescript-eslint/parser": "^5.30.5",
|
|
24
|
+
"eslint": "^8.19.0",
|
|
25
|
+
"jest": "^28.0.0",
|
|
26
|
+
"ts-jest": "^28.0.0",
|
|
27
|
+
"typescript": "^4.3.0"
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@babel/plugin-proposal-decorators": "^7.23.9",
|
|
31
|
+
"@types/lodash": "^4.14.141",
|
|
32
|
+
"@types/moment-timezone": "^0.5.12",
|
|
33
|
+
"@types/node": "^16.0.0",
|
|
34
|
+
"browser-or-node": "2.1.1",
|
|
35
|
+
"jest-environment-jsdom": "^28.1.3",
|
|
36
|
+
"lodash": "^4.17.15",
|
|
37
|
+
"moment": "^2.24.0",
|
|
38
|
+
"moment-timezone": "^0.5.27",
|
|
39
|
+
"path": "^0.12.7",
|
|
40
|
+
"reflect-metadata": "^0.1.13",
|
|
41
|
+
"webpack": "^5.90.0",
|
|
42
|
+
"webpack-cli": "^5.1.4"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export enum CallToActions {
|
|
2
|
+
COMPLETE_COMPANY_PROFILE_AND_UPGRADE_SUBSCRIPTION_PLAN = 0,
|
|
3
|
+
COMPLETE_COMPANY_PROFILE = 1,
|
|
4
|
+
UPGRADE_SUBSCRIPTION_PLAN = 2,
|
|
5
|
+
COMPANY_ADD_PAYMENT_DETAILS_TO_UNLOCK_MORE_FEATURES = 3,
|
|
6
|
+
COMPANY_SUBSCRIPTION_OUTSTANDING = 4,
|
|
7
|
+
COMPANY_OWNERSHIP_NEEDS_CONFIRMATION = 5,
|
|
8
|
+
MOD_PRODUCT_READY_FOR_SALE = 6,
|
|
9
|
+
CREATE_STORE_FOR_SELLING = 7,
|
|
10
|
+
COMPANY_NEEDS_TO_ADD_PAYMENT_METHOD = 8,
|
|
11
|
+
YOUR_COMPANIES_NEED_STRIPE_TO_COLLECT_PAYMENT = 9,
|
|
12
|
+
SUPPLIER_PRODUCT_READY_FOR_SALE = 10,
|
|
13
|
+
SET_PASSWORD = 11,
|
|
14
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export enum DomainType {
|
|
2
|
+
UNRESTRICTED = 0,
|
|
3
|
+
SELLER = 1,
|
|
4
|
+
SELLER_PLUS = 2,
|
|
5
|
+
SUPPLIER = 3,
|
|
6
|
+
RESTRICTED_SUPPLIER = 4,
|
|
7
|
+
DOMAIN_SUPPLIER = 5,
|
|
8
|
+
DOMAIN_CLIENT_CATALOGUE = 6,
|
|
9
|
+
DOMAIN_SHOPIFY_SELLER = 7,
|
|
10
|
+
UNRESTRICTED_SHOPIFY_APP = 8,
|
|
11
|
+
RESERVED = 9,
|
|
12
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export enum ErrorType {
|
|
2
|
+
UNKNOWN_ERROR = 0,
|
|
3
|
+
SERVER_ERROR = 1,
|
|
4
|
+
CLIENT_ERROR = 2,
|
|
5
|
+
EMAIL_ALREADY_EXISTS = 3,
|
|
6
|
+
SUPPLIER_NOT_ADDED_TO_PRODUCT = 4,
|
|
7
|
+
EMAIL_NOT_FOUND = 5,
|
|
8
|
+
INVALID_PHONE_NUMBER = 6,
|
|
9
|
+
INVALID_PASSWORD = 7,
|
|
10
|
+
RESOURCE_NOT_FOUND = 8,
|
|
11
|
+
RESOURCE_GONE = 9,
|
|
12
|
+
REQUEST_TOO_LARGE = 10,
|
|
13
|
+
UNKNOWN_DOMAIN = 11,
|
|
14
|
+
UNSUPPORTED_METHOD = 12,
|
|
15
|
+
MISSING_EVENT_TYPES = 13,
|
|
16
|
+
INVALID_EVENT_TYPES = 14,
|
|
17
|
+
MISSING_URI = 15,
|
|
18
|
+
MISSING_SID = 16,
|
|
19
|
+
MISSING_SECRET_KEY = 17,
|
|
20
|
+
MISSING_SUBSCRIPTION_TOKEN = 18,
|
|
21
|
+
WRONG_SECRET_KEY = 19,
|
|
22
|
+
DUPLICATE_SUBSCRIPTION_TOKEN = 20,
|
|
23
|
+
BAD_SMS_TOKEN = 21,
|
|
24
|
+
DOMAIN_NOT_FOUND = 22,
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function getErrorFromCode(code: number): ErrorType {
|
|
28
|
+
if (code in ErrorType) {
|
|
29
|
+
return code;
|
|
30
|
+
}
|
|
31
|
+
return ErrorType.UNKNOWN_ERROR;
|
|
32
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export enum DraftingStatus {
|
|
2
|
+
INIT = 0,
|
|
3
|
+
WAIT_DRAFTING = 1,
|
|
4
|
+
CHANGES_REQUESTED = 2,
|
|
5
|
+
DRAFTING_UPLOADED = 3,
|
|
6
|
+
DRAFTING_APPROVED = 4,
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export enum PaymentStatus {
|
|
10
|
+
INIT = 0,
|
|
11
|
+
ISSUED = 1,
|
|
12
|
+
OVERDUE = 2,
|
|
13
|
+
PARTIAL_PAID = 3,
|
|
14
|
+
FULLY_PAID = 4,
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export enum ProductionStatus {
|
|
18
|
+
INIT = 0,
|
|
19
|
+
REJECTED = 1,
|
|
20
|
+
QUOTING = 2,
|
|
21
|
+
ASSIGN_SENT = 3,
|
|
22
|
+
ASSIGN_DEADLINE_REACHED = 4,
|
|
23
|
+
ASSIGN_COMPLETE = 5,
|
|
24
|
+
QUESTIONING = 6,
|
|
25
|
+
COMMENCED = 7,
|
|
26
|
+
FINISHED = 8,
|
|
27
|
+
SHIPPED = 9,
|
|
28
|
+
COMPLETED = 10,
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export enum ShipmentStatus {
|
|
32
|
+
NOT_ASSIGNED = 0,
|
|
33
|
+
ASSIGNED = 1,
|
|
34
|
+
DISPATCH_SET = 2,
|
|
35
|
+
DISPATCH_WARNING = 3,
|
|
36
|
+
DISPATCH_LATE = 4,
|
|
37
|
+
DISPATCHED = 5,
|
|
38
|
+
EXPECTED_RECEIVE_DATE_WARNING = 6,
|
|
39
|
+
EXPECTED_RECEIVE_DATE_PAST = 7,
|
|
40
|
+
RECEIVED = 8,
|
|
41
|
+
PICKED_UP = 9,
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export enum SupplyChainRequestStatus {
|
|
45
|
+
NO_REQUEST = 0,
|
|
46
|
+
REQUESTED = 1,
|
|
47
|
+
DECLINED = 2,
|
|
48
|
+
ACCEPTED = 3,
|
|
49
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export enum JobType {
|
|
2
|
+
PRODUCT_CREATION_MOD = 0, // SUPPLIER_MOD, CLONED_SUPPLIER_MOD
|
|
3
|
+
PRODUCT_CREATION = 1, // SUPPLIER, // CLONED_SUPPLIER
|
|
4
|
+
PRODUCT_RESELL_CREATION_MOD = 2, // SUPPLIER_RESELL_MOD, CLONED_SUPPLIER_RESELL_MOD
|
|
5
|
+
PRODUCT_RESELL_CREATION = 3, // SUPPLIER_RESELL, CLONED_SUPPLIER_RESELL
|
|
6
|
+
SELLER = 4, // SELLER, INVENTORY_SELLER, CLONED_INVENTORY_SELLER
|
|
7
|
+
SELLER_MOD = 5, // CLONED_SELLER_MOD
|
|
8
|
+
SELLER_GROUP_BUY = 6, // SELLER_GROUP_BUY, CLONED_SELLER_GROUP_BUY_INVENTORY
|
|
9
|
+
SELLER_FILE_DOWNLOAD = 7, // SELLER_FILE_DOWNLOAD
|
|
10
|
+
SUPPLIER_FULFILLMENT = 8, // PRODUCTION_MOD // SUPPLY_DOMAIN_REFERENCE
|
|
11
|
+
SUPPLIER_FULFILLMENT_RESELL = 9, // SUPPLIER_TO_SUPPLIER_RESELL_MOD
|
|
12
|
+
SUPPLIER_FULFILLMENT_INVENTORY = 10, // INVENTORY_SUPPLIER
|
|
13
|
+
SUPPLIER_FULFILLMENT_INVENTORY_GROUP_BUY = 11, // SUPPLIER_GROUP_BUY_INVENTORY
|
|
14
|
+
SUPPLY_CHAIN_CREATION = 12 // USED TO ID JOBS WHICH ARE TO CREATE A NEW SUPPLY CHAIN
|
|
15
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
export enum NotificationType {
|
|
2
|
+
NO_TYPE = 0,
|
|
3
|
+
DRAFT_SENT = 1,
|
|
4
|
+
DRAFT_CHANGE_REQUEST = 2,
|
|
5
|
+
DRAFT_APPROVED = 3,
|
|
6
|
+
DESIGNER_ASSIGNED = 4,
|
|
7
|
+
DESIGNER_CHANGED = 5,
|
|
8
|
+
DRAFT_COMMENT = 6,
|
|
9
|
+
JOB_PAID = 7,
|
|
10
|
+
INVOICE_PAID = 8,
|
|
11
|
+
PAYMENT_ACCEPTED = 9,
|
|
12
|
+
SEND_INVOICE = 10,
|
|
13
|
+
JOB_COMMENT = 11,
|
|
14
|
+
PRODUCTION_COMMENT = 12,
|
|
15
|
+
JOB_STALE = 13,
|
|
16
|
+
MANAGER_ASSIGNED = 14,
|
|
17
|
+
ORDER_RECEIVED = 15,
|
|
18
|
+
CLIENT_CHANGED = 16,
|
|
19
|
+
PRODUCTION_FILE_UPLOADED = 17,
|
|
20
|
+
PRODUCTION_CANCELLED = 18,
|
|
21
|
+
PRODUCTION_FINISHED = 19,
|
|
22
|
+
PRODUCTION_COMMENCED = 20,
|
|
23
|
+
QUOTE_APPROVED = 21,
|
|
24
|
+
QUOTE_REFUSED = 22,
|
|
25
|
+
QUOTE_SUBMITTED = 23,
|
|
26
|
+
QUOTE_FAILED = 24,
|
|
27
|
+
QUOTE_COMMENCED = 25,
|
|
28
|
+
QUOTE_EXPIRED = 26,
|
|
29
|
+
SUPPLIER_ASSIGNED = 27,
|
|
30
|
+
SUPPLIER_REFUSED = 28,
|
|
31
|
+
READY_FOR_SHIPPING = 29,
|
|
32
|
+
SHIPMENT_UPDATE = 30,
|
|
33
|
+
SIGN_UP_CONFIRMATION = 31,
|
|
34
|
+
AUTOMATIC_JOB_RESPONSE = 32,
|
|
35
|
+
CRASH_EVENT = 33,
|
|
36
|
+
MANAGER_SUMMARY = 34,
|
|
37
|
+
PASSWORD_RESET = 35,
|
|
38
|
+
MANAGER_REASSIGNED = 36,
|
|
39
|
+
EMAIL_RESPONSE = 37,
|
|
40
|
+
JOB_NOTIFICATION = 38,
|
|
41
|
+
JOB_REMINDER = 39,
|
|
42
|
+
GENERAL_REMINDER = 40,
|
|
43
|
+
INVOICE_EMAIL_RESPONSE = 41,
|
|
44
|
+
AUTOMATIC_INVOICE_RESPONSE = 42,
|
|
45
|
+
SHIPMENT_DISPATCH_CLOSE = 43,
|
|
46
|
+
SHIPMENT_NOT_DISPATCHED = 44,
|
|
47
|
+
SHIPMENT_EXPECTED_DATE_WARNING = 45,
|
|
48
|
+
JOB_ADDED_TO_SHIPMENT = 46,
|
|
49
|
+
JOB_REMOVED_FROM_SHIPMENT = 47,
|
|
50
|
+
ASSIGNMENT_REMOVED_FROM_SHIPMENT = 48,
|
|
51
|
+
ASSIGNMENT_ADDED_TO_SHIPMENT = 49,
|
|
52
|
+
SHIPMENT_EXPECTED_DATE_PAST = 50,
|
|
53
|
+
JOB_FILE_UPLOADED = 51,
|
|
54
|
+
DOMAIN_INVITATION = 52,
|
|
55
|
+
QUOTE_JOB_SUBMITTED = 53,
|
|
56
|
+
QUOTE_JOB_RECEIVED = 54,
|
|
57
|
+
QUOTE_JOB_UPDATED = 55,
|
|
58
|
+
QUOTE_JOB_SENT = 56,
|
|
59
|
+
QUOTE_JOB_APPROVED = 57,
|
|
60
|
+
QUOTE_JOB_APPROVED_SENT = 58,
|
|
61
|
+
JOB_NOTIFICATION_COMMENT = 59,
|
|
62
|
+
PRODUCTION_SHIPPED = 60,
|
|
63
|
+
SELLER_STORE_CREATED = 61,
|
|
64
|
+
WEB_FORM = 62,
|
|
65
|
+
CREATE_DOMAIN_FOR_MOD_PRODUCT = 63,
|
|
66
|
+
RESELL_REQUEST_SUBMITTED = 64,
|
|
67
|
+
RESELL_REQUEST_RECEIVED = 65,
|
|
68
|
+
MOD_PRODUCT_READY_FOR_SALE = 66,
|
|
69
|
+
ADDED_TO_COMPANY = 67,
|
|
70
|
+
PRODUCTION_COMPLETED = 68,
|
|
71
|
+
SUPPLIER_PRODUCT_READY_FOR_SALE = 69,
|
|
72
|
+
STORE_ASSIGNED_TO_YOU = 70,
|
|
73
|
+
CLIENT_STORE_CREATED = 71,
|
|
74
|
+
MOD_SELLER_SUMMARY = 72,
|
|
75
|
+
MOD_SUPPLIER_SUMMARY = 73,
|
|
76
|
+
PRODUCT_GROUP_BUY_CREATED_SELLER = 74,
|
|
77
|
+
PRODUCT_GROUP_BUY_CREATED_SUPPLIER = 75,
|
|
78
|
+
PRODUCT_GROUP_BUY_PROGRESS = 76,
|
|
79
|
+
PRODUCT_GROUP_BUY_MOQ_TARGET_REACHED = 77,
|
|
80
|
+
PRODUCT_GROUP_BUY_MOQ_TARGET_REACHED_BUYER = 78,
|
|
81
|
+
PRODUCT_GROUP_BUY_BUYER_PURCHASE = 79,
|
|
82
|
+
PRODUCT_GROUP_BUY_CANCELLED_SELLER = 80,
|
|
83
|
+
PRODUCT_GROUP_BUY_CANCELLED_SUPPLIER = 81,
|
|
84
|
+
PRODUCT_GROUP_BUY_CANCELLED_BUYER = 82,
|
|
85
|
+
PRODUCT_GROUP_BUY_FEATURE_DEADLINE_PASSED_SELLER = 83,
|
|
86
|
+
PRODUCT_GROUP_BUY_FEATURE_DEADLINE_PASSED_SUPPLIER = 84,
|
|
87
|
+
SUBSCRIPTION_INVOICE_AUTOPAY_FAILED = 85,
|
|
88
|
+
TRIAL_WELCOME = 86,
|
|
89
|
+
DOMAIN_USER_NEW_ADDED = 87,
|
|
90
|
+
DOMAIN_USER_EXISTING_ADDED = 88,
|
|
91
|
+
CLIENT_CATALOGUE_CREATED = 89,
|
|
92
|
+
SHOPIFY_PLUGIN_SIGN_UP = 90,
|
|
93
|
+
JOB_CLIENT_PRODUCTION_FILES_SENT = 91,
|
|
94
|
+
PRODUCT_RESELL_READY_FOR_SALE = 92,
|
|
95
|
+
PRODUCT_RESELL_CREATED = 93,
|
|
96
|
+
PRODUCT_SUPPLY_CHAIN_UPDATED = 94,
|
|
97
|
+
}
|