@cloudcommerce/types 0.0.35

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.
@@ -0,0 +1,402 @@
1
+ /* tslint:disable */
2
+ /**
3
+ * This file was automatically generated by json-schema-to-typescript.
4
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
5
+ * and run json-schema-to-typescript to regenerate this file.
6
+ */
7
+
8
+ /**
9
+ * Response - Triggered to calculate shipping options, must return calculated values and times
10
+ */
11
+ export interface CalculateShippingResponse {
12
+ /**
13
+ * Optional minimum cart subtotal to earn free shipping with some shipping service
14
+ */
15
+ free_shipping_from_value?: number;
16
+ /**
17
+ * Shipping method options list
18
+ *
19
+ * @maxItems 30
20
+ */
21
+ shipping_services: {
22
+ /**
23
+ * Name of shipping method shown to customers
24
+ */
25
+ label: string;
26
+ /**
27
+ * Carrier name
28
+ */
29
+ carrier?: string;
30
+ /**
31
+ * Carrier document number (only numbers)
32
+ */
33
+ carrier_doc_number?: string;
34
+ /**
35
+ * Name of service (shipping method) defined by carrier
36
+ */
37
+ service_name?: string;
38
+ /**
39
+ * Code of service defined by carrier
40
+ */
41
+ service_code?: string;
42
+ /**
43
+ * Contract number of the shop with carrier, if exists
44
+ */
45
+ contract?: string;
46
+ /**
47
+ * Shipping method icon image URI
48
+ */
49
+ icon?: string;
50
+ /**
51
+ * Order shipping line object
52
+ */
53
+ shipping_line: {
54
+ from: Address;
55
+ to: Address1;
56
+ /**
57
+ * Shipping object information
58
+ */
59
+ package?: {
60
+ /**
61
+ * Package dimensions
62
+ */
63
+ dimensions?: {
64
+ /**
65
+ * Package width, height and length
66
+ *
67
+ * This interface was referenced by `undefined`'s JSON-Schema definition
68
+ * via the `patternProperty` "^width|height|length$".
69
+ */
70
+ [k: string]: {
71
+ /**
72
+ * Size in specified unit
73
+ */
74
+ value: number;
75
+ /**
76
+ * Unit of measurement
77
+ */
78
+ unit?: 'mm' | 'cm' | 'm' | 'ft' | 'in' | 'yd' | 'mi';
79
+ };
80
+ };
81
+ /**
82
+ * Package weight for freight calculation
83
+ */
84
+ weight?: {
85
+ /**
86
+ * Size in specified unit
87
+ */
88
+ value: number;
89
+ /**
90
+ * Unit of measurement
91
+ */
92
+ unit?: 'mg' | 'g' | 'kg' | 'lb' | 'oz';
93
+ };
94
+ };
95
+ /**
96
+ * Pick up option when no (or optional) freight
97
+ */
98
+ pick_up?: 'store' | 'locker' | 'point' | 'other';
99
+ /**
100
+ * Freight cost for this shipping line, without additionals
101
+ */
102
+ price?: number;
103
+ /**
104
+ * The package value declared to carrier, generally the sum of all items prices
105
+ */
106
+ declared_value?: number;
107
+ /**
108
+ * Cost for the "declared value" additional service
109
+ */
110
+ declared_value_price?: number;
111
+ /**
112
+ * Whether the package must be delivered with additional service "own hand"
113
+ */
114
+ own_hand?: boolean;
115
+ /**
116
+ * Cost for the "own hand" additional service
117
+ */
118
+ own_hand_price?: number;
119
+ /**
120
+ * If the package will be delivered with acknowledgment of receipt
121
+ */
122
+ receipt?: boolean;
123
+ /**
124
+ * Cost for the "acknowledgment of receipt" additional service
125
+ */
126
+ receipt_price?: number;
127
+ /**
128
+ * List of other additional services for this shipping line
129
+ *
130
+ * @maxItems 30
131
+ */
132
+ other_additionals?: {
133
+ /**
134
+ * Tag to identify object, use only lowercase letters, digits and underscore
135
+ */
136
+ tag?: string;
137
+ /**
138
+ * Name of the additional service
139
+ */
140
+ label: string;
141
+ /**
142
+ * Cost for this additional service
143
+ */
144
+ price?: number;
145
+ }[];
146
+ /**
147
+ * List of taxes or other additional services for this shipping line
148
+ *
149
+ * @maxItems 30
150
+ */
151
+ taxes?: {
152
+ /**
153
+ * Tag to identify object, use only lowercase letters, digits and underscore
154
+ */
155
+ tag?: string;
156
+ /**
157
+ * Tax title
158
+ */
159
+ label: string;
160
+ /**
161
+ * Tax value applied
162
+ */
163
+ price?: number;
164
+ /**
165
+ * Tax rate as a function of package value
166
+ */
167
+ rate?: number;
168
+ }[];
169
+ /**
170
+ * Discount on shipping price, negative if value was additionated (not discounted)
171
+ */
172
+ discount?: number;
173
+ /**
174
+ * Total cost for this shipping line, with additionals and taxes
175
+ */
176
+ total_price?: number;
177
+ /**
178
+ * Deadline for sending the package
179
+ */
180
+ posting_deadline?: {
181
+ /**
182
+ * Number of days to post the product after purchase
183
+ */
184
+ days: number;
185
+ /**
186
+ * If the deadline is calculated in working days
187
+ */
188
+ working_days?: boolean;
189
+ /**
190
+ * Whether days will be counted after payment approval
191
+ */
192
+ after_approval?: boolean;
193
+ };
194
+ /**
195
+ * Estimated delivery time
196
+ */
197
+ delivery_time?: {
198
+ /**
199
+ * Number of days for delivery after shipping
200
+ */
201
+ days: number;
202
+ /**
203
+ * If the deadline is calculated in working days
204
+ */
205
+ working_days?: boolean;
206
+ };
207
+ /**
208
+ * Date range when delivery will be made
209
+ */
210
+ scheduled_delivery?: {
211
+ /**
212
+ * Scheduled date and time on the ISO 8601 representation
213
+ *
214
+ * This interface was referenced by `undefined`'s JSON-Schema definition
215
+ * via the `patternProperty` "^start|end$".
216
+ */
217
+ [k: string]: string;
218
+ };
219
+ /**
220
+ * Additional text instructions for pick up or custom delivery process
221
+ */
222
+ delivery_instructions?: string;
223
+ /**
224
+ * For multi DC, set warehouse where the stock will be handled
225
+ */
226
+ warehouse_code?: string;
227
+ /**
228
+ * Flags to associate additional info
229
+ *
230
+ * @maxItems 10
231
+ */
232
+ flags?: string[];
233
+ /**
234
+ * List of custom fields
235
+ *
236
+ * @maxItems 10
237
+ */
238
+ custom_fields?: {
239
+ /**
240
+ * Field name
241
+ */
242
+ field: string;
243
+ /**
244
+ * Field value
245
+ */
246
+ value: string;
247
+ }[];
248
+ /**
249
+ * Optional notes with additional info about this shipping line
250
+ */
251
+ notes?: string;
252
+ };
253
+ }[];
254
+ }
255
+ /**
256
+ * Sender's address
257
+ */
258
+ export interface Address {
259
+ /**
260
+ * ZIP (CEP, postal...) code
261
+ */
262
+ zip: string;
263
+ /**
264
+ * Street or public place name
265
+ */
266
+ street?: string;
267
+ /**
268
+ * House or building street number
269
+ */
270
+ number?: number;
271
+ /**
272
+ * Address complement or second line, such as apartment number
273
+ */
274
+ complement?: string;
275
+ /**
276
+ * Borough name
277
+ */
278
+ borough?: string;
279
+ /**
280
+ * Some optional other reference for this address
281
+ */
282
+ near_to?: string;
283
+ /**
284
+ * Full in line mailing address, should include street, number and borough
285
+ */
286
+ line_address?: string;
287
+ /**
288
+ * City name
289
+ */
290
+ city?: string;
291
+ /**
292
+ * Country name
293
+ */
294
+ country?: string;
295
+ /**
296
+ * An ISO 3166-2 country code
297
+ */
298
+ country_code?: string;
299
+ /**
300
+ * Province or state name
301
+ */
302
+ province?: string;
303
+ /**
304
+ * The two-letter code for the province or state
305
+ */
306
+ province_code?: string;
307
+ /**
308
+ * The name of recipient, generally is the customer's name
309
+ */
310
+ name?: string;
311
+ /**
312
+ * The recipient's last name
313
+ */
314
+ last_name?: string;
315
+ /**
316
+ * Customer phone number for this mailing address
317
+ */
318
+ phone?: {
319
+ /**
320
+ * Country calling code (without +), defined by standards E.123 and E.164
321
+ */
322
+ country_code?: number;
323
+ /**
324
+ * The actual phone number, digits only
325
+ */
326
+ number: string;
327
+ };
328
+ }
329
+ /**
330
+ * Shipping address (recipient)
331
+ */
332
+ export interface Address1 {
333
+ /**
334
+ * ZIP (CEP, postal...) code
335
+ */
336
+ zip: string;
337
+ /**
338
+ * Street or public place name
339
+ */
340
+ street?: string;
341
+ /**
342
+ * House or building street number
343
+ */
344
+ number?: number;
345
+ /**
346
+ * Address complement or second line, such as apartment number
347
+ */
348
+ complement?: string;
349
+ /**
350
+ * Borough name
351
+ */
352
+ borough?: string;
353
+ /**
354
+ * Some optional other reference for this address
355
+ */
356
+ near_to?: string;
357
+ /**
358
+ * Full in line mailing address, should include street, number and borough
359
+ */
360
+ line_address?: string;
361
+ /**
362
+ * City name
363
+ */
364
+ city?: string;
365
+ /**
366
+ * Country name
367
+ */
368
+ country?: string;
369
+ /**
370
+ * An ISO 3166-2 country code
371
+ */
372
+ country_code?: string;
373
+ /**
374
+ * Province or state name
375
+ */
376
+ province?: string;
377
+ /**
378
+ * The two-letter code for the province or state
379
+ */
380
+ province_code?: string;
381
+ /**
382
+ * The name of recipient, generally is the customer's name
383
+ */
384
+ name?: string;
385
+ /**
386
+ * The recipient's last name
387
+ */
388
+ last_name?: string;
389
+ /**
390
+ * Customer phone number for this mailing address
391
+ */
392
+ phone?: {
393
+ /**
394
+ * Country calling code (without +), defined by standards E.123 and E.164
395
+ */
396
+ country_code?: number;
397
+ /**
398
+ * The actual phone number, digits only
399
+ */
400
+ number: string;
401
+ };
402
+ }