@orchesty/connector-wix 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 +7 -0
- package/LICENSE +190 -0
- package/coverage/clover.xml +125 -0
- package/coverage/coverage-final.json +7 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +146 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +210 -0
- package/coverage/lcov-report/src/Connector/WixCreateOrderConnector.ts.html +679 -0
- package/coverage/lcov-report/src/Connector/WixCreateProductConnector.ts.html +781 -0
- package/coverage/lcov-report/src/Connector/WixGetOrderConnector.ts.html +493 -0
- package/coverage/lcov-report/src/Connector/WixUpdateProductConnector.ts.html +574 -0
- package/coverage/lcov-report/src/Connector/index.html +161 -0
- package/coverage/lcov-report/src/WixApplication.ts.html +334 -0
- package/coverage/lcov-report/src/index.html +116 -0
- package/coverage/lcov-report/test/dataProvider.ts.html +268 -0
- package/coverage/lcov-report/test/index.html +116 -0
- package/coverage/lcov.info +189 -0
- package/dist/Connector/WixCreateOrderConnector.d.ts +181 -0
- package/dist/Connector/WixCreateOrderConnector.js +21 -0
- package/dist/Connector/WixCreateProductConnector.d.ts +217 -0
- package/dist/Connector/WixCreateProductConnector.js +21 -0
- package/dist/Connector/WixGetOrderConnector.d.ts +119 -0
- package/dist/Connector/WixGetOrderConnector.js +22 -0
- package/dist/Connector/WixUpdateProductConnector.d.ts +147 -0
- package/dist/Connector/WixUpdateProductConnector.js +22 -0
- package/dist/WixApplication.d.ts +19 -0
- package/dist/WixApplication.js +97 -0
- package/dist/package.json +22 -0
- package/jest.config.js +13 -0
- package/package.json +22 -0
- package/src/Connector/WixCreateOrderConnector.ts +198 -0
- package/src/Connector/WixCreateProductConnector.ts +232 -0
- package/src/Connector/WixGetOrderConnector.ts +136 -0
- package/src/Connector/WixUpdateProductConnector.ts +163 -0
- package/src/Connector/__tests__/Data/WixCreateOrderConnector/input.json +74 -0
- package/src/Connector/__tests__/Data/WixCreateOrderConnector/mock.json +109 -0
- package/src/Connector/__tests__/Data/WixCreateOrderConnector/output.json +110 -0
- package/src/Connector/__tests__/Data/WixCreateProductConnector/input.json +43 -0
- package/src/Connector/__tests__/Data/WixCreateProductConnector/mock.json +180 -0
- package/src/Connector/__tests__/Data/WixCreateProductConnector/output.json +181 -0
- package/src/Connector/__tests__/Data/WixGetOrderConnector/input.json +8 -0
- package/src/Connector/__tests__/Data/WixGetOrderConnector/mock.json +113 -0
- package/src/Connector/__tests__/Data/WixGetOrderConnector/output.json +114 -0
- package/src/Connector/__tests__/Data/WixUpdateProductConnector/input.json +36 -0
- package/src/Connector/__tests__/Data/WixUpdateProductConnector/mock.json +115 -0
- package/src/Connector/__tests__/Data/WixUpdateProductConnector/output.json +117 -0
- package/src/Connector/__tests__/WixCreateOrderConnector.ts +17 -0
- package/src/Connector/__tests__/WixCreateProductConnector.ts +17 -0
- package/src/Connector/__tests__/WixGetOrderConnector.ts +17 -0
- package/src/Connector/__tests__/WixUpdateProductConnector.ts +17 -0
- package/src/WixApplication.ts +83 -0
- package/test/dataProvider.ts +61 -0
- package/tsconfig.json +8 -0
- package/tsconfig.prod.json +13 -0
- package/tsconfig.prod.tsbuildinfo +1 -0
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import AConnector from '@orchesty/nodejs-sdk/dist/lib/Connector/AConnector';
|
|
2
|
+
import ProcessDto from '@orchesty/nodejs-sdk/dist/lib/Utils/ProcessDto';
|
|
3
|
+
export declare const NAME = "wix-create-order-connector";
|
|
4
|
+
export default class WixCreateOrderConnector extends AConnector {
|
|
5
|
+
getName(): string;
|
|
6
|
+
processAction(dto: ProcessDto<IInput>): Promise<ProcessDto<IOutput>>;
|
|
7
|
+
}
|
|
8
|
+
export interface IOutput {
|
|
9
|
+
order: {
|
|
10
|
+
id: string;
|
|
11
|
+
number: number;
|
|
12
|
+
dateCreated: string;
|
|
13
|
+
currency: string;
|
|
14
|
+
weightUnit: string;
|
|
15
|
+
totals: {
|
|
16
|
+
subtotal: string;
|
|
17
|
+
shipping: string;
|
|
18
|
+
tax: string;
|
|
19
|
+
discount: string;
|
|
20
|
+
total: string;
|
|
21
|
+
weight: string;
|
|
22
|
+
quantity: number;
|
|
23
|
+
};
|
|
24
|
+
billingInfo: {
|
|
25
|
+
paymentMethod: string;
|
|
26
|
+
externalTransactionId: string;
|
|
27
|
+
paymentProviderTransactionId: string;
|
|
28
|
+
address: {
|
|
29
|
+
fullName: {
|
|
30
|
+
firstName: string;
|
|
31
|
+
lastName: string;
|
|
32
|
+
};
|
|
33
|
+
country: string;
|
|
34
|
+
city: string;
|
|
35
|
+
zipCode: string;
|
|
36
|
+
phone: string;
|
|
37
|
+
email: string;
|
|
38
|
+
};
|
|
39
|
+
paidDate: string;
|
|
40
|
+
};
|
|
41
|
+
shippingInfo: {
|
|
42
|
+
deliveryOption: string;
|
|
43
|
+
estimatedDeliveryTime: string;
|
|
44
|
+
shipmentDetails: {
|
|
45
|
+
address: {
|
|
46
|
+
fullName: {
|
|
47
|
+
firstName: string;
|
|
48
|
+
lastName: string;
|
|
49
|
+
};
|
|
50
|
+
country: string;
|
|
51
|
+
city: string;
|
|
52
|
+
zipCode: string;
|
|
53
|
+
phone: string;
|
|
54
|
+
email: string;
|
|
55
|
+
};
|
|
56
|
+
discount: string;
|
|
57
|
+
tax: string;
|
|
58
|
+
priceData: {
|
|
59
|
+
taxIncludedInPrice: boolean;
|
|
60
|
+
price: string;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
read: boolean;
|
|
65
|
+
archived: boolean;
|
|
66
|
+
paymentStatus: string;
|
|
67
|
+
fulfillmentStatus: string;
|
|
68
|
+
lineItems: [
|
|
69
|
+
{
|
|
70
|
+
index: number;
|
|
71
|
+
quantity: number;
|
|
72
|
+
name: string;
|
|
73
|
+
productId: string;
|
|
74
|
+
lineItemType: string;
|
|
75
|
+
options: [];
|
|
76
|
+
customTextFields: [];
|
|
77
|
+
weight: string;
|
|
78
|
+
sku: string;
|
|
79
|
+
discount: string;
|
|
80
|
+
tax: string;
|
|
81
|
+
priceData: {
|
|
82
|
+
taxIncludedInPrice: boolean;
|
|
83
|
+
price: string;
|
|
84
|
+
totalPrice: string;
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
];
|
|
88
|
+
activities: [
|
|
89
|
+
{
|
|
90
|
+
type: string;
|
|
91
|
+
timestamp: string;
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
type: string;
|
|
95
|
+
timestamp: string;
|
|
96
|
+
}
|
|
97
|
+
];
|
|
98
|
+
fulfillments: [];
|
|
99
|
+
discount: {
|
|
100
|
+
value: string;
|
|
101
|
+
};
|
|
102
|
+
buyerLanguage: string;
|
|
103
|
+
channelInfo: {
|
|
104
|
+
type: string;
|
|
105
|
+
};
|
|
106
|
+
enteredBy: {
|
|
107
|
+
id: string;
|
|
108
|
+
identityType: string;
|
|
109
|
+
};
|
|
110
|
+
lastUpdated: string;
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
export interface IInput {
|
|
114
|
+
order: {
|
|
115
|
+
totals: {
|
|
116
|
+
subtotal: string;
|
|
117
|
+
shipping: string;
|
|
118
|
+
tax: string;
|
|
119
|
+
discount: string;
|
|
120
|
+
total: string;
|
|
121
|
+
};
|
|
122
|
+
billingInfo: {
|
|
123
|
+
paymentMethod: string;
|
|
124
|
+
paymentProviderTransactionId: string;
|
|
125
|
+
address: {
|
|
126
|
+
fullName: {
|
|
127
|
+
firstName: string;
|
|
128
|
+
lastName: string;
|
|
129
|
+
};
|
|
130
|
+
country: string;
|
|
131
|
+
city: string;
|
|
132
|
+
zipCode: string;
|
|
133
|
+
phone: string;
|
|
134
|
+
email: string;
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
shippingInfo: {
|
|
138
|
+
deliveryOption: string;
|
|
139
|
+
estimatedDeliveryTime: string;
|
|
140
|
+
shippingRegion: string;
|
|
141
|
+
shipmentDetails: {
|
|
142
|
+
address: {
|
|
143
|
+
fullName: {
|
|
144
|
+
firstName: string;
|
|
145
|
+
lastName: string;
|
|
146
|
+
};
|
|
147
|
+
country: string;
|
|
148
|
+
city: string;
|
|
149
|
+
zipCode: string;
|
|
150
|
+
phone: string;
|
|
151
|
+
email: string;
|
|
152
|
+
};
|
|
153
|
+
tax: string;
|
|
154
|
+
priceData: {
|
|
155
|
+
taxIncludedInPrice: boolean;
|
|
156
|
+
price: string;
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
paymentStatus: string;
|
|
161
|
+
lineItems: [
|
|
162
|
+
{
|
|
163
|
+
quantity: number;
|
|
164
|
+
discount: string;
|
|
165
|
+
tax: string;
|
|
166
|
+
name: string;
|
|
167
|
+
productId: string;
|
|
168
|
+
lineItemType: string;
|
|
169
|
+
weight: string;
|
|
170
|
+
sku: string;
|
|
171
|
+
priceData: {
|
|
172
|
+
taxIncludedInPrice: boolean;
|
|
173
|
+
price: string;
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
];
|
|
177
|
+
channelInfo: {
|
|
178
|
+
type: string;
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
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.NAME = void 0;
|
|
7
|
+
const AConnector_1 = __importDefault(require("@orchesty/nodejs-sdk/dist/lib/Connector/AConnector"));
|
|
8
|
+
const HttpMethods_1 = require("@orchesty/nodejs-sdk/dist/lib/Transport/HttpMethods");
|
|
9
|
+
exports.NAME = 'wix-create-order-connector';
|
|
10
|
+
class WixCreateOrderConnector extends AConnector_1.default {
|
|
11
|
+
getName() {
|
|
12
|
+
return exports.NAME;
|
|
13
|
+
}
|
|
14
|
+
async processAction(dto) {
|
|
15
|
+
const appInstall = await this.getApplicationInstallFromProcess(dto);
|
|
16
|
+
const req = await this.getApplication().getRequestDto(dto, appInstall, HttpMethods_1.HttpMethods.POST, 'v2/orders', { data: dto.getJsonData() });
|
|
17
|
+
const resp = await this.getSender().send(req, [200]);
|
|
18
|
+
return dto.setNewJsonData(resp.getJsonBody());
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.default = WixCreateOrderConnector;
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import AConnector from '@orchesty/nodejs-sdk/dist/lib/Connector/AConnector';
|
|
2
|
+
import ProcessDto from '@orchesty/nodejs-sdk/dist/lib/Utils/ProcessDto';
|
|
3
|
+
export declare const NAME = "wix-create-product-connector";
|
|
4
|
+
export default class WixCreateProductConnector extends AConnector {
|
|
5
|
+
getName(): string;
|
|
6
|
+
processAction(dto: ProcessDto<IInput>): Promise<ProcessDto<IOutput>>;
|
|
7
|
+
}
|
|
8
|
+
export interface IInput {
|
|
9
|
+
product: {
|
|
10
|
+
name: string;
|
|
11
|
+
productType: string;
|
|
12
|
+
priceData: {
|
|
13
|
+
price: number;
|
|
14
|
+
};
|
|
15
|
+
costAndProfitData: {
|
|
16
|
+
itemCost: number;
|
|
17
|
+
};
|
|
18
|
+
description: string;
|
|
19
|
+
sku: string;
|
|
20
|
+
visible: boolean;
|
|
21
|
+
ribbon: string;
|
|
22
|
+
brand: string;
|
|
23
|
+
weight: number;
|
|
24
|
+
discount: {
|
|
25
|
+
type: string;
|
|
26
|
+
value: number;
|
|
27
|
+
};
|
|
28
|
+
manageVariants: boolean;
|
|
29
|
+
productOptions: [
|
|
30
|
+
{
|
|
31
|
+
name: string;
|
|
32
|
+
choices: [
|
|
33
|
+
{
|
|
34
|
+
value: string;
|
|
35
|
+
description: string;
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
value: string;
|
|
39
|
+
description: string;
|
|
40
|
+
}
|
|
41
|
+
];
|
|
42
|
+
}
|
|
43
|
+
];
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export interface IOutput {
|
|
47
|
+
product: {
|
|
48
|
+
id: string;
|
|
49
|
+
name: string;
|
|
50
|
+
slug: string;
|
|
51
|
+
visible: boolean;
|
|
52
|
+
productType: string;
|
|
53
|
+
description: string;
|
|
54
|
+
weightRange: {
|
|
55
|
+
minValue: number;
|
|
56
|
+
maxValue: number;
|
|
57
|
+
};
|
|
58
|
+
stock: {
|
|
59
|
+
trackInventory: boolean;
|
|
60
|
+
inStock: boolean;
|
|
61
|
+
inventoryStatus: string;
|
|
62
|
+
};
|
|
63
|
+
price: {
|
|
64
|
+
currency: string;
|
|
65
|
+
price: number;
|
|
66
|
+
discountedPrice: number;
|
|
67
|
+
formatted: {
|
|
68
|
+
price: string;
|
|
69
|
+
discountedPrice: string;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
priceData: {
|
|
73
|
+
currency: string;
|
|
74
|
+
price: number;
|
|
75
|
+
discountedPrice: number;
|
|
76
|
+
formatted: {
|
|
77
|
+
price: string;
|
|
78
|
+
discountedPrice: string;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
convertedPriceData: {
|
|
82
|
+
currency: string;
|
|
83
|
+
price: number;
|
|
84
|
+
discountedPrice: number;
|
|
85
|
+
formatted: {
|
|
86
|
+
price: string;
|
|
87
|
+
discountedPrice: string;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
priceRange: {
|
|
91
|
+
minValue: number;
|
|
92
|
+
maxValue: number;
|
|
93
|
+
};
|
|
94
|
+
costRange: {
|
|
95
|
+
minValue: number;
|
|
96
|
+
maxValue: number;
|
|
97
|
+
};
|
|
98
|
+
additionalInfoSections: [];
|
|
99
|
+
ribbons: {
|
|
100
|
+
text: string;
|
|
101
|
+
}[];
|
|
102
|
+
media: {
|
|
103
|
+
items: [];
|
|
104
|
+
};
|
|
105
|
+
customTextFields: [];
|
|
106
|
+
manageVariants: boolean;
|
|
107
|
+
productOptions: [
|
|
108
|
+
{
|
|
109
|
+
optionType: string;
|
|
110
|
+
name: string;
|
|
111
|
+
choices: [
|
|
112
|
+
{
|
|
113
|
+
value: string;
|
|
114
|
+
description: string;
|
|
115
|
+
inStock: boolean;
|
|
116
|
+
visible: boolean;
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
value: string;
|
|
120
|
+
description: string;
|
|
121
|
+
inStock: boolean;
|
|
122
|
+
visible: boolean;
|
|
123
|
+
}
|
|
124
|
+
];
|
|
125
|
+
}
|
|
126
|
+
];
|
|
127
|
+
productPageUrl: {
|
|
128
|
+
base: string;
|
|
129
|
+
path: string;
|
|
130
|
+
};
|
|
131
|
+
numericId: string;
|
|
132
|
+
inventoryItemId: string;
|
|
133
|
+
discount: {
|
|
134
|
+
type: string;
|
|
135
|
+
value: number;
|
|
136
|
+
};
|
|
137
|
+
collectionIds: string[];
|
|
138
|
+
variants: [
|
|
139
|
+
{
|
|
140
|
+
id: string;
|
|
141
|
+
choices: {
|
|
142
|
+
Size: string;
|
|
143
|
+
};
|
|
144
|
+
variant: {
|
|
145
|
+
priceData: {
|
|
146
|
+
currency: string;
|
|
147
|
+
price: number;
|
|
148
|
+
discountedPrice: number;
|
|
149
|
+
formatted: {
|
|
150
|
+
price: string;
|
|
151
|
+
discountedPrice: string;
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
convertedPriceData: {
|
|
155
|
+
currency: string;
|
|
156
|
+
price: number;
|
|
157
|
+
discountedPrice: number;
|
|
158
|
+
formatted: {
|
|
159
|
+
price: string;
|
|
160
|
+
discountedPrice: string;
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
costAndProfitData: {
|
|
164
|
+
itemCost: number;
|
|
165
|
+
formattedItemCost: string;
|
|
166
|
+
profit: number;
|
|
167
|
+
formattedProfit: string;
|
|
168
|
+
profitMargin: number;
|
|
169
|
+
};
|
|
170
|
+
weight: number;
|
|
171
|
+
sku: string;
|
|
172
|
+
visible: boolean;
|
|
173
|
+
};
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
id: string;
|
|
177
|
+
choices: {
|
|
178
|
+
Size: string;
|
|
179
|
+
};
|
|
180
|
+
variant: {
|
|
181
|
+
priceData: {
|
|
182
|
+
currency: string;
|
|
183
|
+
price: number;
|
|
184
|
+
discountedPrice: number;
|
|
185
|
+
formatted: {
|
|
186
|
+
price: string;
|
|
187
|
+
discountedPrice: string;
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
convertedPriceData: {
|
|
191
|
+
currency: string;
|
|
192
|
+
price: number;
|
|
193
|
+
discountedPrice: number;
|
|
194
|
+
formatted: {
|
|
195
|
+
price: string;
|
|
196
|
+
discountedPrice: string;
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
costAndProfitData: {
|
|
200
|
+
itemCost: number;
|
|
201
|
+
formattedItemCost: string;
|
|
202
|
+
profit: number;
|
|
203
|
+
formattedProfit: string;
|
|
204
|
+
profitMargin: number;
|
|
205
|
+
};
|
|
206
|
+
weight: number;
|
|
207
|
+
sku: string;
|
|
208
|
+
visible: boolean;
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
];
|
|
212
|
+
lastUpdated: string;
|
|
213
|
+
createdDate: string;
|
|
214
|
+
ribbon: string;
|
|
215
|
+
brand: string;
|
|
216
|
+
};
|
|
217
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
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.NAME = void 0;
|
|
7
|
+
const AConnector_1 = __importDefault(require("@orchesty/nodejs-sdk/dist/lib/Connector/AConnector"));
|
|
8
|
+
const HttpMethods_1 = require("@orchesty/nodejs-sdk/dist/lib/Transport/HttpMethods");
|
|
9
|
+
exports.NAME = 'wix-create-product-connector';
|
|
10
|
+
class WixCreateProductConnector extends AConnector_1.default {
|
|
11
|
+
getName() {
|
|
12
|
+
return exports.NAME;
|
|
13
|
+
}
|
|
14
|
+
async processAction(dto) {
|
|
15
|
+
const appInstall = await this.getApplicationInstallFromProcess(dto);
|
|
16
|
+
const req = await this.getApplication().getRequestDto(dto, appInstall, HttpMethods_1.HttpMethods.POST, 'v1/products', { data: dto.getJsonData() });
|
|
17
|
+
const resp = await this.getSender().send(req, [200]);
|
|
18
|
+
return dto.setNewJsonData(resp.getJsonBody());
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.default = WixCreateProductConnector;
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import AConnector from '@orchesty/nodejs-sdk/dist/lib/Connector/AConnector';
|
|
2
|
+
import ProcessDto from '@orchesty/nodejs-sdk/dist/lib/Utils/ProcessDto';
|
|
3
|
+
export declare const NAME = "wix-get-order-connector";
|
|
4
|
+
export default class WixGetOrderConnector extends AConnector {
|
|
5
|
+
getName(): string;
|
|
6
|
+
processAction(dto: ProcessDto<IInput>): Promise<ProcessDto<IOutput>>;
|
|
7
|
+
}
|
|
8
|
+
export interface IInput {
|
|
9
|
+
id: string;
|
|
10
|
+
}
|
|
11
|
+
export interface IOutput {
|
|
12
|
+
order: {
|
|
13
|
+
id: string;
|
|
14
|
+
number: number;
|
|
15
|
+
dateCreated: string;
|
|
16
|
+
currency: string;
|
|
17
|
+
weightUnit: string;
|
|
18
|
+
totals: {
|
|
19
|
+
subtotal: string;
|
|
20
|
+
shipping: string;
|
|
21
|
+
tax: string;
|
|
22
|
+
discount: string;
|
|
23
|
+
total: string;
|
|
24
|
+
weight: string;
|
|
25
|
+
quantity: number;
|
|
26
|
+
};
|
|
27
|
+
billingInfo: {
|
|
28
|
+
paymentMethod: string;
|
|
29
|
+
externalTransactionId: string;
|
|
30
|
+
paymentProviderTransactionId: string;
|
|
31
|
+
address: {
|
|
32
|
+
fullName: {
|
|
33
|
+
firstName: string;
|
|
34
|
+
lastName: string;
|
|
35
|
+
};
|
|
36
|
+
country: string;
|
|
37
|
+
city: string;
|
|
38
|
+
zipCode: string;
|
|
39
|
+
phone: string;
|
|
40
|
+
email: string;
|
|
41
|
+
};
|
|
42
|
+
paidDate: string;
|
|
43
|
+
};
|
|
44
|
+
shippingInfo: {
|
|
45
|
+
deliveryOption: string;
|
|
46
|
+
shippingRegion: string;
|
|
47
|
+
estimatedDeliveryTime: string;
|
|
48
|
+
shipmentDetails: {
|
|
49
|
+
address: {
|
|
50
|
+
fullName: {
|
|
51
|
+
firstName: string;
|
|
52
|
+
lastName: string;
|
|
53
|
+
};
|
|
54
|
+
country: string;
|
|
55
|
+
city: string;
|
|
56
|
+
zipCode: string;
|
|
57
|
+
phone: string;
|
|
58
|
+
email: string;
|
|
59
|
+
};
|
|
60
|
+
discount: string;
|
|
61
|
+
tax: string;
|
|
62
|
+
priceData: {
|
|
63
|
+
taxIncludedInPrice: boolean;
|
|
64
|
+
price: string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
read: boolean;
|
|
69
|
+
archived: boolean;
|
|
70
|
+
paymentStatus: string;
|
|
71
|
+
fulfillmentStatus: string;
|
|
72
|
+
lineItems: [
|
|
73
|
+
{
|
|
74
|
+
index: number;
|
|
75
|
+
quantity: number;
|
|
76
|
+
price: string;
|
|
77
|
+
name: string;
|
|
78
|
+
productId: string;
|
|
79
|
+
totalPrice: string;
|
|
80
|
+
lineItemType: string;
|
|
81
|
+
options: [];
|
|
82
|
+
customTextFields: [];
|
|
83
|
+
weight: string;
|
|
84
|
+
sku: string;
|
|
85
|
+
discount: string;
|
|
86
|
+
tax: string;
|
|
87
|
+
taxIncludedInPrice: boolean;
|
|
88
|
+
priceData: {
|
|
89
|
+
taxIncludedInPrice: boolean;
|
|
90
|
+
price: string;
|
|
91
|
+
totalPrice: string;
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
];
|
|
95
|
+
activities: [
|
|
96
|
+
{
|
|
97
|
+
type: string;
|
|
98
|
+
timestamp: string;
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
type: string;
|
|
102
|
+
timestamp: string;
|
|
103
|
+
}
|
|
104
|
+
];
|
|
105
|
+
fulfillments: [];
|
|
106
|
+
discount: {
|
|
107
|
+
value: string;
|
|
108
|
+
};
|
|
109
|
+
buyerLanguage: string;
|
|
110
|
+
channelInfo: {
|
|
111
|
+
type: string;
|
|
112
|
+
};
|
|
113
|
+
enteredBy: {
|
|
114
|
+
id: string;
|
|
115
|
+
identityType: string;
|
|
116
|
+
};
|
|
117
|
+
lastUpdated: string;
|
|
118
|
+
};
|
|
119
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
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.NAME = void 0;
|
|
7
|
+
const AConnector_1 = __importDefault(require("@orchesty/nodejs-sdk/dist/lib/Connector/AConnector"));
|
|
8
|
+
const HttpMethods_1 = require("@orchesty/nodejs-sdk/dist/lib/Transport/HttpMethods");
|
|
9
|
+
exports.NAME = 'wix-get-order-connector';
|
|
10
|
+
class WixGetOrderConnector extends AConnector_1.default {
|
|
11
|
+
getName() {
|
|
12
|
+
return exports.NAME;
|
|
13
|
+
}
|
|
14
|
+
async processAction(dto) {
|
|
15
|
+
const { id } = dto.getJsonData();
|
|
16
|
+
const appInstall = await this.getApplicationInstallFromProcess(dto);
|
|
17
|
+
const req = await this.getApplication().getRequestDto(dto, appInstall, HttpMethods_1.HttpMethods.GET, `v2/orders/${id}`);
|
|
18
|
+
const resp = await this.getSender().send(req, [200]);
|
|
19
|
+
return dto.setNewJsonData(resp.getJsonBody());
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.default = WixGetOrderConnector;
|