@viu/emporix-sdk 1.0.0
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/CHANGELOG.md +407 -0
- package/LICENSE +21 -0
- package/README.md +115 -0
- package/dist/cart.cjs +214 -0
- package/dist/cart.cjs.map +1 -0
- package/dist/cart.d.cts +1807 -0
- package/dist/cart.d.ts +1807 -0
- package/dist/cart.js +4 -0
- package/dist/cart.js.map +1 -0
- package/dist/category.cjs +97 -0
- package/dist/category.cjs.map +1 -0
- package/dist/category.d.cts +313 -0
- package/dist/category.d.ts +313 -0
- package/dist/category.js +4 -0
- package/dist/category.js.map +1 -0
- package/dist/checkout.cjs +98 -0
- package/dist/checkout.cjs.map +1 -0
- package/dist/checkout.d.cts +252 -0
- package/dist/checkout.d.ts +252 -0
- package/dist/checkout.js +4 -0
- package/dist/checkout.js.map +1 -0
- package/dist/chunk-4BJUCCKJ.js +86 -0
- package/dist/chunk-4BJUCCKJ.js.map +1 -0
- package/dist/chunk-6UNFMCHZ.js +95 -0
- package/dist/chunk-6UNFMCHZ.js.map +1 -0
- package/dist/chunk-B56JZNI7.js +49 -0
- package/dist/chunk-B56JZNI7.js.map +1 -0
- package/dist/chunk-BFQ732VZ.js +11 -0
- package/dist/chunk-BFQ732VZ.js.map +1 -0
- package/dist/chunk-F3WAQH2E.js +120 -0
- package/dist/chunk-F3WAQH2E.js.map +1 -0
- package/dist/chunk-GWJ2U2CP.js +14 -0
- package/dist/chunk-GWJ2U2CP.js.map +1 -0
- package/dist/chunk-HEO34WLO.js +47 -0
- package/dist/chunk-HEO34WLO.js.map +1 -0
- package/dist/chunk-HKPZI7Y5.js +30 -0
- package/dist/chunk-HKPZI7Y5.js.map +1 -0
- package/dist/chunk-IEZHGU7F.js +171 -0
- package/dist/chunk-IEZHGU7F.js.map +1 -0
- package/dist/chunk-KTODT6DV.js +86 -0
- package/dist/chunk-KTODT6DV.js.map +1 -0
- package/dist/chunk-NM7VDXBR.js +57 -0
- package/dist/chunk-NM7VDXBR.js.map +1 -0
- package/dist/chunk-OMYVOOSX.js +57 -0
- package/dist/chunk-OMYVOOSX.js.map +1 -0
- package/dist/chunk-QDABAMVN.js +89 -0
- package/dist/chunk-QDABAMVN.js.map +1 -0
- package/dist/chunk-RXVVFNYN.js +56 -0
- package/dist/chunk-RXVVFNYN.js.map +1 -0
- package/dist/chunk-SKX7KCMH.js +23 -0
- package/dist/chunk-SKX7KCMH.js.map +1 -0
- package/dist/chunk-TLH6SLAF.js +215 -0
- package/dist/chunk-TLH6SLAF.js.map +1 -0
- package/dist/chunk-Z6PNI5VT.js +142 -0
- package/dist/chunk-Z6PNI5VT.js.map +1 -0
- package/dist/companies.cjs +58 -0
- package/dist/companies.cjs.map +1 -0
- package/dist/companies.d.cts +31 -0
- package/dist/companies.d.ts +31 -0
- package/dist/companies.js +3 -0
- package/dist/companies.js.map +1 -0
- package/dist/contacts.cjs +51 -0
- package/dist/contacts.cjs.map +1 -0
- package/dist/contacts.d.cts +28 -0
- package/dist/contacts.d.ts +28 -0
- package/dist/contacts.js +3 -0
- package/dist/contacts.js.map +1 -0
- package/dist/context-vKgzZ-5f.d.cts +329 -0
- package/dist/context-vKgzZ-5f.d.ts +329 -0
- package/dist/customer-groups.cjs +25 -0
- package/dist/customer-groups.cjs.map +1 -0
- package/dist/customer-groups.d.cts +36 -0
- package/dist/customer-groups.d.ts +36 -0
- package/dist/customer-groups.js +3 -0
- package/dist/customer-groups.js.map +1 -0
- package/dist/customer.cjs +262 -0
- package/dist/customer.cjs.map +1 -0
- package/dist/customer.d.cts +386 -0
- package/dist/customer.d.ts +386 -0
- package/dist/customer.js +5 -0
- package/dist/customer.js.map +1 -0
- package/dist/index.cjs +2075 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +218 -0
- package/dist/index.d.ts +218 -0
- package/dist/index.js +791 -0
- package/dist/index.js.map +1 -0
- package/dist/locations.cjs +59 -0
- package/dist/locations.cjs.map +1 -0
- package/dist/locations.d.cts +30 -0
- package/dist/locations.d.ts +30 -0
- package/dist/locations.js +3 -0
- package/dist/locations.js.map +1 -0
- package/dist/media.cjs +123 -0
- package/dist/media.cjs.map +1 -0
- package/dist/media.d.cts +219 -0
- package/dist/media.d.ts +219 -0
- package/dist/media.js +3 -0
- package/dist/media.js.map +1 -0
- package/dist/orders.cjs +98 -0
- package/dist/orders.cjs.map +1 -0
- package/dist/orders.d.cts +167 -0
- package/dist/orders.d.ts +167 -0
- package/dist/orders.js +3 -0
- package/dist/orders.js.map +1 -0
- package/dist/payment.cjs +77 -0
- package/dist/payment.cjs.map +1 -0
- package/dist/payment.d.cts +110 -0
- package/dist/payment.d.ts +110 -0
- package/dist/payment.js +5 -0
- package/dist/payment.js.map +1 -0
- package/dist/price.cjs +88 -0
- package/dist/price.cjs.map +1 -0
- package/dist/price.d.cts +445 -0
- package/dist/price.d.ts +445 -0
- package/dist/price.js +4 -0
- package/dist/price.js.map +1 -0
- package/dist/product.cjs +100 -0
- package/dist/product.cjs.map +1 -0
- package/dist/product.d.cts +400 -0
- package/dist/product.d.ts +400 -0
- package/dist/product.js +4 -0
- package/dist/product.js.map +1 -0
- package/dist/segment.cjs +189 -0
- package/dist/segment.cjs.map +1 -0
- package/dist/segment.d.cts +241 -0
- package/dist/segment.d.ts +241 -0
- package/dist/segment.js +5 -0
- package/dist/segment.js.map +1 -0
- package/dist/types.gen-D1QuqPLs.d.cts +166 -0
- package/dist/types.gen-D1QuqPLs.d.ts +166 -0
- package/package.json +141 -0
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hand-written mirror of the Customer Management Service OpenAPI 0.0.1
|
|
3
|
+
* schemas. The shapes below are taken directly from the documented API
|
|
4
|
+
* (Legal Entities, Contact Assignments, Locations endpoints).
|
|
5
|
+
*
|
|
6
|
+
* **Not generated.** When the OpenAPI input file lands in the repo, this
|
|
7
|
+
* file is replaced by codegen output. Keep the exported names stable so the
|
|
8
|
+
* façade re-exports don't churn.
|
|
9
|
+
*/
|
|
10
|
+
type LegalEntityType = "COMPANY" | "SUBSIDIARY";
|
|
11
|
+
interface AccountLimit {
|
|
12
|
+
currency?: string;
|
|
13
|
+
value?: number;
|
|
14
|
+
}
|
|
15
|
+
interface LegalInfo {
|
|
16
|
+
legalName?: string;
|
|
17
|
+
registrationDate?: string;
|
|
18
|
+
taxRegistrationNumber?: string;
|
|
19
|
+
registrationAgency?: string;
|
|
20
|
+
countryOfRegistration?: string;
|
|
21
|
+
registrationId?: string;
|
|
22
|
+
}
|
|
23
|
+
interface CustomerGroupRef {
|
|
24
|
+
id: string;
|
|
25
|
+
name?: Record<string, string>;
|
|
26
|
+
role?: string;
|
|
27
|
+
}
|
|
28
|
+
interface ResourceId {
|
|
29
|
+
id: string;
|
|
30
|
+
}
|
|
31
|
+
interface Metadata {
|
|
32
|
+
version?: number;
|
|
33
|
+
createdAt?: string;
|
|
34
|
+
modifiedAt?: string;
|
|
35
|
+
mixins?: Record<string, unknown>;
|
|
36
|
+
}
|
|
37
|
+
interface LegalEntity {
|
|
38
|
+
id: string;
|
|
39
|
+
name: string;
|
|
40
|
+
type: LegalEntityType;
|
|
41
|
+
parentId?: string;
|
|
42
|
+
accountLimit?: AccountLimit;
|
|
43
|
+
legalInfo?: LegalInfo;
|
|
44
|
+
customerGroups?: CustomerGroupRef[];
|
|
45
|
+
entitiesAddresses?: ResourceId[];
|
|
46
|
+
approvalGroup?: ResourceId[];
|
|
47
|
+
restrictions?: string[];
|
|
48
|
+
metadata?: Metadata;
|
|
49
|
+
mixins?: Record<string, unknown>;
|
|
50
|
+
}
|
|
51
|
+
interface LegalEntityCreate {
|
|
52
|
+
id?: string;
|
|
53
|
+
name: string;
|
|
54
|
+
type?: LegalEntityType;
|
|
55
|
+
parentId?: string;
|
|
56
|
+
accountLimit?: AccountLimit;
|
|
57
|
+
legalInfo?: LegalInfo;
|
|
58
|
+
customerGroups?: CustomerGroupRef[];
|
|
59
|
+
entitiesAddresses?: ResourceId[];
|
|
60
|
+
approvalGroup?: ResourceId[];
|
|
61
|
+
restrictions?: string[];
|
|
62
|
+
metadata?: {
|
|
63
|
+
mixins?: Record<string, unknown>;
|
|
64
|
+
};
|
|
65
|
+
mixins?: Record<string, unknown>;
|
|
66
|
+
}
|
|
67
|
+
interface LegalEntityUpdate {
|
|
68
|
+
name?: string;
|
|
69
|
+
parentId?: string;
|
|
70
|
+
accountLimit?: AccountLimit;
|
|
71
|
+
legalInfo?: LegalInfo;
|
|
72
|
+
customerGroups?: CustomerGroupRef[];
|
|
73
|
+
entitiesAddresses?: ResourceId[];
|
|
74
|
+
approvalGroup?: ResourceId[];
|
|
75
|
+
restrictions?: string[];
|
|
76
|
+
metadata?: {
|
|
77
|
+
version: number;
|
|
78
|
+
mixins?: Record<string, unknown>;
|
|
79
|
+
};
|
|
80
|
+
mixins?: Record<string, unknown>;
|
|
81
|
+
}
|
|
82
|
+
type ContactAssignmentType = "PRIMARY" | "BILLING" | "LOGISTICS" | "CONTACT";
|
|
83
|
+
interface ContactAssignment {
|
|
84
|
+
id: string;
|
|
85
|
+
legalEntity?: LegalEntity | {
|
|
86
|
+
id: string;
|
|
87
|
+
};
|
|
88
|
+
customer?: {
|
|
89
|
+
id: string;
|
|
90
|
+
name?: string;
|
|
91
|
+
surname?: string;
|
|
92
|
+
email?: string;
|
|
93
|
+
phone?: string;
|
|
94
|
+
};
|
|
95
|
+
type?: ContactAssignmentType;
|
|
96
|
+
primary?: boolean;
|
|
97
|
+
metadata?: Metadata;
|
|
98
|
+
mixins?: Record<string, unknown>;
|
|
99
|
+
}
|
|
100
|
+
interface ContactAssignmentCreate {
|
|
101
|
+
id?: string;
|
|
102
|
+
legalEntity: {
|
|
103
|
+
id: string;
|
|
104
|
+
};
|
|
105
|
+
customer: {
|
|
106
|
+
id: string;
|
|
107
|
+
};
|
|
108
|
+
type?: ContactAssignmentType;
|
|
109
|
+
primary?: boolean;
|
|
110
|
+
metadata?: {
|
|
111
|
+
mixins?: Record<string, unknown>;
|
|
112
|
+
};
|
|
113
|
+
mixins?: Record<string, unknown>;
|
|
114
|
+
}
|
|
115
|
+
interface ContactAssignmentUpdate {
|
|
116
|
+
type?: ContactAssignmentType;
|
|
117
|
+
primary?: boolean;
|
|
118
|
+
metadata?: {
|
|
119
|
+
version: number;
|
|
120
|
+
mixins?: Record<string, unknown>;
|
|
121
|
+
};
|
|
122
|
+
mixins?: Record<string, unknown>;
|
|
123
|
+
}
|
|
124
|
+
type LocationType = "HEADQUARTER" | "WAREHOUSE" | "OFFICE";
|
|
125
|
+
interface ContactDetails {
|
|
126
|
+
emails?: string[];
|
|
127
|
+
phones?: string[];
|
|
128
|
+
addressLine1?: string;
|
|
129
|
+
addressLine2?: string;
|
|
130
|
+
city?: string;
|
|
131
|
+
state?: string;
|
|
132
|
+
postcode?: string;
|
|
133
|
+
countryCode?: string;
|
|
134
|
+
tags?: string[];
|
|
135
|
+
}
|
|
136
|
+
interface Location {
|
|
137
|
+
id: string;
|
|
138
|
+
name: string;
|
|
139
|
+
type: LocationType;
|
|
140
|
+
contactDetails?: ContactDetails;
|
|
141
|
+
metadata?: Metadata;
|
|
142
|
+
mixins?: Record<string, unknown>;
|
|
143
|
+
}
|
|
144
|
+
interface LocationCreate {
|
|
145
|
+
id?: string;
|
|
146
|
+
legalEntityId: string;
|
|
147
|
+
name: string;
|
|
148
|
+
type: LocationType;
|
|
149
|
+
contactDetails?: ContactDetails;
|
|
150
|
+
metadata?: {
|
|
151
|
+
mixins?: Record<string, unknown>;
|
|
152
|
+
};
|
|
153
|
+
mixins?: Record<string, unknown>;
|
|
154
|
+
}
|
|
155
|
+
interface LocationUpdate {
|
|
156
|
+
name?: string;
|
|
157
|
+
type?: LocationType;
|
|
158
|
+
contactDetails?: ContactDetails;
|
|
159
|
+
metadata?: {
|
|
160
|
+
version: number;
|
|
161
|
+
mixins?: Record<string, unknown>;
|
|
162
|
+
};
|
|
163
|
+
mixins?: Record<string, unknown>;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export type { AccountLimit as A, ContactAssignment as C, LegalEntity as L, ContactAssignmentCreate as a, ContactAssignmentType as b, ContactAssignmentUpdate as c, ContactDetails as d, CustomerGroupRef as e, LegalEntityCreate as f, LegalEntityType as g, LegalEntityUpdate as h, LegalInfo as i, Location as j, LocationCreate as k, LocationType as l, LocationUpdate as m };
|
package/package.json
ADDED
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@viu/emporix-sdk",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "TypeScript SDK for the Emporix Commerce Engine",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "viu",
|
|
8
|
+
"url": "https://github.com/viuteam"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://github.com/viuteam/emporix-sdk#readme",
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://github.com/viuteam/emporix-sdk.git",
|
|
14
|
+
"directory": "packages/sdk"
|
|
15
|
+
},
|
|
16
|
+
"bugs": {
|
|
17
|
+
"url": "https://github.com/viuteam/emporix-sdk/issues"
|
|
18
|
+
},
|
|
19
|
+
"keywords": [
|
|
20
|
+
"emporix",
|
|
21
|
+
"ecommerce",
|
|
22
|
+
"commerce",
|
|
23
|
+
"sdk",
|
|
24
|
+
"typescript",
|
|
25
|
+
"storefront"
|
|
26
|
+
],
|
|
27
|
+
"type": "module",
|
|
28
|
+
"sideEffects": false,
|
|
29
|
+
"engines": {
|
|
30
|
+
"node": ">=20.19.0"
|
|
31
|
+
},
|
|
32
|
+
"files": [
|
|
33
|
+
"dist",
|
|
34
|
+
"README.md",
|
|
35
|
+
"CHANGELOG.md",
|
|
36
|
+
"LICENSE"
|
|
37
|
+
],
|
|
38
|
+
"exports": {
|
|
39
|
+
".": {
|
|
40
|
+
"types": "./dist/index.d.ts",
|
|
41
|
+
"import": "./dist/index.js",
|
|
42
|
+
"require": "./dist/index.cjs"
|
|
43
|
+
},
|
|
44
|
+
"./customer": {
|
|
45
|
+
"types": "./dist/customer.d.ts",
|
|
46
|
+
"import": "./dist/customer.js",
|
|
47
|
+
"require": "./dist/customer.cjs"
|
|
48
|
+
},
|
|
49
|
+
"./product": {
|
|
50
|
+
"types": "./dist/product.d.ts",
|
|
51
|
+
"import": "./dist/product.js",
|
|
52
|
+
"require": "./dist/product.cjs"
|
|
53
|
+
},
|
|
54
|
+
"./category": {
|
|
55
|
+
"types": "./dist/category.d.ts",
|
|
56
|
+
"import": "./dist/category.js",
|
|
57
|
+
"require": "./dist/category.cjs"
|
|
58
|
+
},
|
|
59
|
+
"./cart": {
|
|
60
|
+
"types": "./dist/cart.d.ts",
|
|
61
|
+
"import": "./dist/cart.js",
|
|
62
|
+
"require": "./dist/cart.cjs"
|
|
63
|
+
},
|
|
64
|
+
"./checkout": {
|
|
65
|
+
"types": "./dist/checkout.d.ts",
|
|
66
|
+
"import": "./dist/checkout.js",
|
|
67
|
+
"require": "./dist/checkout.cjs"
|
|
68
|
+
},
|
|
69
|
+
"./payment": {
|
|
70
|
+
"types": "./dist/payment.d.ts",
|
|
71
|
+
"import": "./dist/payment.js",
|
|
72
|
+
"require": "./dist/payment.cjs"
|
|
73
|
+
},
|
|
74
|
+
"./price": {
|
|
75
|
+
"types": "./dist/price.d.ts",
|
|
76
|
+
"import": "./dist/price.js",
|
|
77
|
+
"require": "./dist/price.cjs"
|
|
78
|
+
},
|
|
79
|
+
"./media": {
|
|
80
|
+
"types": "./dist/media.d.ts",
|
|
81
|
+
"import": "./dist/media.js",
|
|
82
|
+
"require": "./dist/media.cjs"
|
|
83
|
+
},
|
|
84
|
+
"./segment": {
|
|
85
|
+
"types": "./dist/segment.d.ts",
|
|
86
|
+
"import": "./dist/segment.js",
|
|
87
|
+
"require": "./dist/segment.cjs"
|
|
88
|
+
},
|
|
89
|
+
"./companies": {
|
|
90
|
+
"types": "./dist/companies.d.ts",
|
|
91
|
+
"import": "./dist/companies.js",
|
|
92
|
+
"require": "./dist/companies.cjs"
|
|
93
|
+
},
|
|
94
|
+
"./contacts": {
|
|
95
|
+
"types": "./dist/contacts.d.ts",
|
|
96
|
+
"import": "./dist/contacts.js",
|
|
97
|
+
"require": "./dist/contacts.cjs"
|
|
98
|
+
},
|
|
99
|
+
"./locations": {
|
|
100
|
+
"types": "./dist/locations.d.ts",
|
|
101
|
+
"import": "./dist/locations.js",
|
|
102
|
+
"require": "./dist/locations.cjs"
|
|
103
|
+
},
|
|
104
|
+
"./customer-groups": {
|
|
105
|
+
"types": "./dist/customer-groups.d.ts",
|
|
106
|
+
"import": "./dist/customer-groups.js",
|
|
107
|
+
"require": "./dist/customer-groups.cjs"
|
|
108
|
+
},
|
|
109
|
+
"./orders": {
|
|
110
|
+
"types": "./dist/orders.d.ts",
|
|
111
|
+
"import": "./dist/orders.js",
|
|
112
|
+
"require": "./dist/orders.cjs"
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"publishConfig": {
|
|
116
|
+
"access": "public",
|
|
117
|
+
"provenance": false
|
|
118
|
+
},
|
|
119
|
+
"devDependencies": {
|
|
120
|
+
"@hey-api/openapi-ts": "^0.64.0",
|
|
121
|
+
"@types/node": "^24.0.0",
|
|
122
|
+
"tsx": "^4.19.0",
|
|
123
|
+
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
124
|
+
"@typescript-eslint/parser": "^8.0.0",
|
|
125
|
+
"@vitest/coverage-v8": "^2.0.0",
|
|
126
|
+
"eslint": "^9.0.0",
|
|
127
|
+
"msw": "^2.4.0",
|
|
128
|
+
"prettier": "^3.3.0",
|
|
129
|
+
"tsup": "^8.2.0",
|
|
130
|
+
"typescript": "^5.6.0",
|
|
131
|
+
"vitest": "^2.0.0"
|
|
132
|
+
},
|
|
133
|
+
"scripts": {
|
|
134
|
+
"build": "tsup",
|
|
135
|
+
"test": "vitest run --coverage",
|
|
136
|
+
"lint": "eslint src",
|
|
137
|
+
"typecheck": "tsc --noEmit",
|
|
138
|
+
"fetch:specs": "tsx scripts/fetch-specs.ts",
|
|
139
|
+
"generate": "tsx scripts/generate.ts"
|
|
140
|
+
}
|
|
141
|
+
}
|