@artisan-commerce/types 0.13.0 → 0.14.0-canary.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/CHANGELOG.md +18 -0
- package/build/index.d.ts +7 -3
- package/build/index.js +7 -3
- package/build/index.js.map +1 -1
- package/build/types/account.types.d.ts +3 -3
- package/build/types/category.types.d.ts +3 -3
- package/build/types/coupon.types.d.ts +3 -3
- package/build/types/fulfillment.types.d.ts +218 -0
- package/build/types/fulfillment.types.js +4 -0
- package/build/types/fulfillment.types.js.map +1 -0
- package/build/types/image.types.d.ts +14 -0
- package/build/types/notification.types.d.ts +21 -0
- package/build/types/notification.types.js +4 -0
- package/build/types/notification.types.js.map +1 -0
- package/build/types/order.types.d.ts +157 -0
- package/build/types/order.types.js +3 -0
- package/build/types/order.types.js.map +1 -0
- package/build/types/payment.types.d.ts +16 -0
- package/build/types/product.types.d.ts +5 -5
- package/build/types/settings.types.d.ts +23 -0
- package/build/types/settings.types.js +4 -0
- package/build/types/settings.types.js.map +1 -0
- package/build/types/store.types.d.ts +3 -3
- package/build/types/vendor.types.d.ts +3 -3
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,24 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.14.0-canary.1](https://bitbucket.org/tradesystem/artisan_sdk/compare/@artisan-commerce/types@0.14.0-canary.0...@artisan-commerce/types@0.14.0-canary.1) (2021-08-06)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **builders:** add missing builders and delete unused type ([361abac](https://bitbucket.org/tradesystem/artisan_sdk/commit/361abac9996fef1b0c308b1bd940f19379f8842a))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## [0.14.0-canary.0](https://bitbucket.org/tradesystem/artisan_sdk/compare/@artisan-commerce/types@0.13.0...@artisan-commerce/types@0.14.0-canary.0) (2021-08-04)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* **global:** add and export missing builders and types ([67ad6ac](https://bitbucket.org/tradesystem/artisan_sdk/commit/67ad6ac8e563aa53c2c62dac86b65f3435a0b16a))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
6
24
|
## [0.13.0](https://bitbucket.org/tradesystem/artisan_sdk/compare/@artisan-commerce/types@0.13.0-canary.10...@artisan-commerce/types@0.13.0) (2021-07-30)
|
|
7
25
|
|
|
8
26
|
|
package/build/index.d.ts
CHANGED
|
@@ -1,19 +1,23 @@
|
|
|
1
|
-
export * from "./types/app.types";
|
|
2
1
|
export * from "./types/account.types";
|
|
2
|
+
export * from "./types/app.types";
|
|
3
3
|
export * from "./types/artisanDB.types";
|
|
4
4
|
export * from "./types/banner.types";
|
|
5
5
|
export * from "./types/billingData.types";
|
|
6
|
-
export * from "./types/category.types";
|
|
7
6
|
export * from "./types/catalogue.types";
|
|
7
|
+
export * from "./types/category.types";
|
|
8
8
|
export * from "./types/common.types";
|
|
9
|
-
export * from "./types/coupon.types";
|
|
10
9
|
export * from "./types/country.types";
|
|
10
|
+
export * from "./types/coupon.types";
|
|
11
11
|
export * from "./types/currency.types";
|
|
12
|
+
export * from "./types/fulfillment.types";
|
|
12
13
|
export * from "./types/http.types";
|
|
13
14
|
export * from "./types/image.types";
|
|
14
15
|
export * from "./types/livingPlace.types";
|
|
16
|
+
export * from "./types/notification.types";
|
|
17
|
+
export * from "./types/order.types";
|
|
15
18
|
export * from "./types/payment.types";
|
|
16
19
|
export * from "./types/product.types";
|
|
20
|
+
export * from "./types/settings.types";
|
|
17
21
|
export * from "./types/shippingAddress.types";
|
|
18
22
|
export * from "./types/shippingCost.types";
|
|
19
23
|
export * from "./types/shoppingCart.types";
|
package/build/index.js
CHANGED
|
@@ -11,22 +11,26 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
// Main
|
|
14
|
-
__exportStar(require("./types/app.types"), exports);
|
|
15
14
|
__exportStar(require("./types/account.types"), exports);
|
|
15
|
+
__exportStar(require("./types/app.types"), exports);
|
|
16
16
|
__exportStar(require("./types/artisanDB.types"), exports);
|
|
17
17
|
__exportStar(require("./types/banner.types"), exports);
|
|
18
18
|
__exportStar(require("./types/billingData.types"), exports);
|
|
19
|
-
__exportStar(require("./types/category.types"), exports);
|
|
20
19
|
__exportStar(require("./types/catalogue.types"), exports);
|
|
20
|
+
__exportStar(require("./types/category.types"), exports);
|
|
21
21
|
__exportStar(require("./types/common.types"), exports);
|
|
22
|
-
__exportStar(require("./types/coupon.types"), exports);
|
|
23
22
|
__exportStar(require("./types/country.types"), exports);
|
|
23
|
+
__exportStar(require("./types/coupon.types"), exports);
|
|
24
24
|
__exportStar(require("./types/currency.types"), exports);
|
|
25
|
+
__exportStar(require("./types/fulfillment.types"), exports);
|
|
25
26
|
__exportStar(require("./types/http.types"), exports);
|
|
26
27
|
__exportStar(require("./types/image.types"), exports);
|
|
27
28
|
__exportStar(require("./types/livingPlace.types"), exports);
|
|
29
|
+
__exportStar(require("./types/notification.types"), exports);
|
|
30
|
+
__exportStar(require("./types/order.types"), exports);
|
|
28
31
|
__exportStar(require("./types/payment.types"), exports);
|
|
29
32
|
__exportStar(require("./types/product.types"), exports);
|
|
33
|
+
__exportStar(require("./types/settings.types"), exports);
|
|
30
34
|
__exportStar(require("./types/shippingAddress.types"), exports);
|
|
31
35
|
__exportStar(require("./types/shippingCost.types"), exports);
|
|
32
36
|
__exportStar(require("./types/shoppingCart.types"), exports);
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO;AACP,oDAAkC;AAClC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO;AACP,wDAAsC;AACtC,oDAAkC;AAClC,0DAAwC;AACxC,uDAAqC;AACrC,4DAA0C;AAC1C,0DAAwC;AACxC,yDAAuC;AACvC,uDAAqC;AACrC,wDAAsC;AACtC,uDAAqC;AACrC,yDAAuC;AACvC,4DAA0C;AAC1C,qDAAmC;AACnC,sDAAoC;AACpC,4DAA0C;AAC1C,6DAA2C;AAC3C,sDAAoC;AACpC,wDAAsC;AACtC,wDAAsC;AACtC,yDAAuC;AACvC,gEAA8C;AAC9C,6DAA2C;AAC3C,6DAA2C;AAC3C,sDAAoC;AACpC,uDAAqC;AACrC,qDAAmC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CDNImage } from "./image.types";
|
|
2
2
|
/**
|
|
3
3
|
* Representation of a Commerce Account.
|
|
4
4
|
*
|
|
@@ -12,6 +12,6 @@ export interface Account {
|
|
|
12
12
|
name: string;
|
|
13
13
|
/** Account's description */
|
|
14
14
|
description?: string;
|
|
15
|
-
/** Account's images, see {@link
|
|
16
|
-
images:
|
|
15
|
+
/** Account's images, see {@link CDNImage} for further information */
|
|
16
|
+
images: CDNImage[];
|
|
17
17
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CDNImage } from "./image.types";
|
|
2
2
|
import { BaseProduct } from "./product.types";
|
|
3
3
|
/**
|
|
4
4
|
* Representation of a Commerce Category.
|
|
@@ -11,8 +11,8 @@ export interface Category {
|
|
|
11
11
|
categoryId: number;
|
|
12
12
|
/** Category's name */
|
|
13
13
|
name: string;
|
|
14
|
-
/** Category image's array, see {@link
|
|
15
|
-
images:
|
|
14
|
+
/** Category image's array, see {@link CDNImage} */
|
|
15
|
+
images: CDNImage[];
|
|
16
16
|
/** Whether or not to display the category */
|
|
17
17
|
displayInMenu: boolean;
|
|
18
18
|
/** Whether or not the category should be reloaded */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ArtisanDBCollectionReference } from "./artisanDB.types";
|
|
2
2
|
import { ArtisanDBQueryDocumentSnapshot } from "./artisanDB.types";
|
|
3
3
|
import { ArtisanDBDocumentData } from "./artisanDB.types";
|
|
4
|
-
import {
|
|
4
|
+
import { CDNImage } from "./image.types";
|
|
5
5
|
/**
|
|
6
6
|
* Wallet user information.
|
|
7
7
|
*
|
|
@@ -41,8 +41,8 @@ export interface Benefit {
|
|
|
41
41
|
expirationDate: string;
|
|
42
42
|
/** External benefit id */
|
|
43
43
|
externalId: null;
|
|
44
|
-
/** Benefit images, see {@link
|
|
45
|
-
image:
|
|
44
|
+
/** Benefit images, see {@link CDNImage} */
|
|
45
|
+
image: CDNImage[];
|
|
46
46
|
/** The award limit */
|
|
47
47
|
limitAward: null;
|
|
48
48
|
/** The benefit limit */
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fulfillment workflow.
|
|
3
|
+
*
|
|
4
|
+
* @interface Workflow
|
|
5
|
+
* @since 0.5.15
|
|
6
|
+
*/
|
|
7
|
+
export interface Workflow {
|
|
8
|
+
/** Workflow description */
|
|
9
|
+
description: string;
|
|
10
|
+
/** Workflow unique identifier */
|
|
11
|
+
id: number;
|
|
12
|
+
/** Workflow name */
|
|
13
|
+
name: string;
|
|
14
|
+
/** An array of workflow steps, see {@link StepWorkflow} */
|
|
15
|
+
steps: StepWorkflow[];
|
|
16
|
+
/** An array of webhook workflows, see {@link WebhookWorkflow} */
|
|
17
|
+
webhooks: WebhookWorkflow[];
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The possible values of the step category.
|
|
21
|
+
*
|
|
22
|
+
* @typedef StepCategory
|
|
23
|
+
* @since 0.5.15
|
|
24
|
+
*/
|
|
25
|
+
export declare type StepCategory = "TO_DO" | "PAYMENT_IN_PROGRESS" | "IN_PROGRESS" | "DONE";
|
|
26
|
+
/**
|
|
27
|
+
* The possible values of the step code.
|
|
28
|
+
*
|
|
29
|
+
* @typedef StepCode
|
|
30
|
+
* @since 0.5.15
|
|
31
|
+
*/
|
|
32
|
+
export declare type StepCode = "START" | "IN_PROGRESS" | "ORDERED" | "RECEIVED" | "TO_ASSIGN" | "ASSIGNED" | "ON_ROUTE" | "DISPATCHED" | "CANCELED" | "ERROR";
|
|
33
|
+
/**
|
|
34
|
+
* The notification associated with the step.
|
|
35
|
+
*
|
|
36
|
+
* @interface StepNotification
|
|
37
|
+
* @since 0.5.15
|
|
38
|
+
*/
|
|
39
|
+
export interface StepNotification {
|
|
40
|
+
/** Whether or not to send mail when reaching this step */
|
|
41
|
+
send_mail: boolean;
|
|
42
|
+
/** Whether or not to send push when reaching this step */
|
|
43
|
+
send_push: boolean;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* The step where the workflow is located.
|
|
47
|
+
*
|
|
48
|
+
* @interface StepWorkflow
|
|
49
|
+
* @since 0.5.15
|
|
50
|
+
*/
|
|
51
|
+
export interface StepWorkflow {
|
|
52
|
+
/** Step workflow additional info, see {@link StepWorkflowAdditionalInfo} */
|
|
53
|
+
additional_info: StepWorkflowAdditionalInfo;
|
|
54
|
+
/** Step workflow category, , see {@link StepCategory} */
|
|
55
|
+
category: StepCategory;
|
|
56
|
+
/** Step workflow code, , see {@link StepCode} */
|
|
57
|
+
code: StepCode;
|
|
58
|
+
/** Step workflow color */
|
|
59
|
+
color: string;
|
|
60
|
+
/** Step workflow description */
|
|
61
|
+
description: string;
|
|
62
|
+
/** Step workflow description to use on front end */
|
|
63
|
+
description_frontend: string | null;
|
|
64
|
+
/** Step workflow id */
|
|
65
|
+
id: number;
|
|
66
|
+
/** Step workflow name */
|
|
67
|
+
name: string;
|
|
68
|
+
/** Step workflow subtitle to use on front end */
|
|
69
|
+
subtitle_frontend: string | null;
|
|
70
|
+
/** Step workflow title to use on front end */
|
|
71
|
+
title_frontend: string | null;
|
|
72
|
+
/** Step workflow transitions, see {@link TransitionWorkflow} */
|
|
73
|
+
transitions: TransitionWorkflow[];
|
|
74
|
+
/** Step notification, see {@link StepNotification} */
|
|
75
|
+
notification: StepNotification;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Step workflow additional info.
|
|
79
|
+
*
|
|
80
|
+
* @interface StepWorkflowAdditionalInfo
|
|
81
|
+
* @since 0.5.15
|
|
82
|
+
*/
|
|
83
|
+
export interface StepWorkflowAdditionalInfo {
|
|
84
|
+
/** Whether or not to use the step workflow client on front end */
|
|
85
|
+
client_frontend: boolean;
|
|
86
|
+
/** Step workflow group, see {@link StepWorkflowGroup} */
|
|
87
|
+
group: StepWorkflowGroup;
|
|
88
|
+
/** Whether or not to use the step workflow operators to use on front end */
|
|
89
|
+
operators_frontend: boolean;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Step workflow group.
|
|
93
|
+
*
|
|
94
|
+
* @interface StepWorkflowGroup
|
|
95
|
+
* @since 0.5.15
|
|
96
|
+
*/
|
|
97
|
+
export interface StepWorkflowGroup {
|
|
98
|
+
/** Group code, see {@link StepCode} */
|
|
99
|
+
code: StepCode;
|
|
100
|
+
/** Group description */
|
|
101
|
+
description: string;
|
|
102
|
+
/** Group type */
|
|
103
|
+
type: "default";
|
|
104
|
+
/** Group weight */
|
|
105
|
+
weight: string;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* The possible transitions of the workflow.
|
|
109
|
+
*
|
|
110
|
+
* @interface TransitionWorkflow
|
|
111
|
+
* @since 0.5.15
|
|
112
|
+
*/
|
|
113
|
+
export interface TransitionWorkflow {
|
|
114
|
+
/** Channel unique identifier */
|
|
115
|
+
channel_id: number;
|
|
116
|
+
/** Transition workflow conditions */
|
|
117
|
+
conditions: any[];
|
|
118
|
+
/** Transition workflow description */
|
|
119
|
+
description: string;
|
|
120
|
+
/** The step id where the transition comes from */
|
|
121
|
+
from_step_id: number;
|
|
122
|
+
/** Transition workflow unique identifier */
|
|
123
|
+
id: number;
|
|
124
|
+
/** Transition workflow name */
|
|
125
|
+
name: string;
|
|
126
|
+
/** The step id where the transition can go */
|
|
127
|
+
to_step_id: number;
|
|
128
|
+
/** Vendor unique identifier */
|
|
129
|
+
vendor_id: number;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Workflow webhook.
|
|
133
|
+
*
|
|
134
|
+
* @interface WebhookWorkflow
|
|
135
|
+
* @since 0.5.15
|
|
136
|
+
*/
|
|
137
|
+
export interface WebhookWorkflow {
|
|
138
|
+
/** Webhook workflow unique identifier */
|
|
139
|
+
id: number;
|
|
140
|
+
/** Webhook workflow method type */
|
|
141
|
+
method: string;
|
|
142
|
+
/** Webhook workflow url */
|
|
143
|
+
url: string;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Representation of a Issue object.
|
|
147
|
+
*
|
|
148
|
+
* @interface Issue
|
|
149
|
+
* @since 0.5.15
|
|
150
|
+
*/
|
|
151
|
+
export interface IssueAdditionalInfo {
|
|
152
|
+
/** User unique identifier */
|
|
153
|
+
uid: string;
|
|
154
|
+
/** Array of stores id */
|
|
155
|
+
stores: number[];
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Representation of a Issue history.
|
|
159
|
+
*
|
|
160
|
+
* @interface Issue
|
|
161
|
+
* @since 0.5.15
|
|
162
|
+
*/
|
|
163
|
+
export interface IssueHistory {
|
|
164
|
+
/** History unique identifier */
|
|
165
|
+
id: number;
|
|
166
|
+
/** Transition unique identifier */
|
|
167
|
+
transition_id: number;
|
|
168
|
+
/** Step unique identifier */
|
|
169
|
+
step_id: number;
|
|
170
|
+
/** Step name */
|
|
171
|
+
step_name: string;
|
|
172
|
+
/** History additional info, see {@link IssueAdditionalInfo} */
|
|
173
|
+
additional_info: IssueAdditionalInfo;
|
|
174
|
+
/** History conditions */
|
|
175
|
+
conditions: any[];
|
|
176
|
+
/** History creation Date */
|
|
177
|
+
created_at: string;
|
|
178
|
+
/** History finished Date */
|
|
179
|
+
finished_at: string;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Representation of a Issue object.
|
|
183
|
+
*
|
|
184
|
+
* @interface Issue
|
|
185
|
+
* @since 0.5.15
|
|
186
|
+
*/
|
|
187
|
+
export interface Issue {
|
|
188
|
+
/** Issue unique identifier */
|
|
189
|
+
id: number;
|
|
190
|
+
/** Client issue unique identifier */
|
|
191
|
+
client_issue_id: string;
|
|
192
|
+
/** Workflow unique identifier */
|
|
193
|
+
workflow_id: number;
|
|
194
|
+
/** Parent issue unique identifier */
|
|
195
|
+
parent_issue_id: null;
|
|
196
|
+
/** Related issue unique identifier */
|
|
197
|
+
related_issue_id: null;
|
|
198
|
+
/** Step unique identifier */
|
|
199
|
+
step_id: number;
|
|
200
|
+
/** The step where the issue is located */
|
|
201
|
+
step: StepWorkflow;
|
|
202
|
+
/** Account unique identifier */
|
|
203
|
+
account_id: number;
|
|
204
|
+
/** Vendor unique identifier */
|
|
205
|
+
vendor_id: number;
|
|
206
|
+
/** Children issues */
|
|
207
|
+
children: any[];
|
|
208
|
+
/** Related issues */
|
|
209
|
+
related: any[];
|
|
210
|
+
/** Issue conditions */
|
|
211
|
+
conditions: any[];
|
|
212
|
+
/** Issue additional info, see {@link IssueAdditionalInfo} */
|
|
213
|
+
additional_info: IssueAdditionalInfo;
|
|
214
|
+
/** Issue history, see {@link IssueHistory} */
|
|
215
|
+
history: IssueHistory[];
|
|
216
|
+
/** Transaction unique identifier */
|
|
217
|
+
transaction_id: number | null;
|
|
218
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fulfillment.types.js","sourceRoot":"","sources":["../../src/types/fulfillment.types.ts"],"names":[],"mappings":";AAAA,mCAAmC"}
|
|
@@ -66,3 +66,17 @@ export declare type ImageFit = "fill" | "cover" | "contain" | "inside" | "outsid
|
|
|
66
66
|
* @since 0.5.14
|
|
67
67
|
*/
|
|
68
68
|
export declare type ImageToFormat = "jpg" | "jpeg" | "png" | "svg";
|
|
69
|
+
/**
|
|
70
|
+
* Random image configuration.
|
|
71
|
+
*
|
|
72
|
+
* @since 0.5.15
|
|
73
|
+
* @interface RandomImageConfig
|
|
74
|
+
*/
|
|
75
|
+
export interface RandomImageConfig {
|
|
76
|
+
/** A word which will be used to generate the random image */
|
|
77
|
+
query?: string | undefined;
|
|
78
|
+
/** The width to be used to generate the random image */
|
|
79
|
+
width?: number;
|
|
80
|
+
/** The height to be used to generate the random image */
|
|
81
|
+
height?: number;
|
|
82
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Notification object.
|
|
3
|
+
*
|
|
4
|
+
* @interface Notification
|
|
5
|
+
* @since 0.5.15
|
|
6
|
+
*/
|
|
7
|
+
export interface Notification {
|
|
8
|
+
/** Notification unique identifier */
|
|
9
|
+
id: number;
|
|
10
|
+
/** Notification title */
|
|
11
|
+
title: string;
|
|
12
|
+
/** Notification description */
|
|
13
|
+
description: string;
|
|
14
|
+
/**
|
|
15
|
+
* Whether or not the notification was read. Purposefully
|
|
16
|
+
* has a string type.
|
|
17
|
+
*/
|
|
18
|
+
read: string;
|
|
19
|
+
/** Notification creation date */
|
|
20
|
+
creationDate: string;
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification.types.js","sourceRoot":"","sources":["../../src/types/notification.types.ts"],"names":[],"mappings":";AAAA,iCAAiC"}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { BillTotalCategory } from "./shoppingCart.types";
|
|
2
|
+
import { ShippingAddress } from "./shippingAddress.types";
|
|
3
|
+
import { BillingData } from "./billingData.types";
|
|
4
|
+
/**
|
|
5
|
+
* Representation of common properties of the order.
|
|
6
|
+
*
|
|
7
|
+
* @interface BaseOrder
|
|
8
|
+
* @since 0.5.15
|
|
9
|
+
*/
|
|
10
|
+
export interface BaseOrder {
|
|
11
|
+
/** Order unique identifier */
|
|
12
|
+
id: number;
|
|
13
|
+
/** Order additional info */
|
|
14
|
+
additionalInfo: any[];
|
|
15
|
+
/** Order additional messages */
|
|
16
|
+
additionalMessage: string | null;
|
|
17
|
+
/** Order allocation */
|
|
18
|
+
allocation: string;
|
|
19
|
+
/** Channel unique identifier */
|
|
20
|
+
channelId: number;
|
|
21
|
+
/** Order date, e.g.: `02 Aug 2021` */
|
|
22
|
+
orderDate: string;
|
|
23
|
+
/** Order time, e.g.: `17:00 am` */
|
|
24
|
+
orderTime: string;
|
|
25
|
+
/** Pick up date, e.g.: `01 Aug 2021` */
|
|
26
|
+
pickupDate: string | null;
|
|
27
|
+
/** Pick up time, e.g.: `09:00 am` */
|
|
28
|
+
pickupTime: string | null;
|
|
29
|
+
/** Order sequence id */
|
|
30
|
+
seq_id: string;
|
|
31
|
+
/** Shopping cart associated with the order, see {@link OrderShoppingCart} */
|
|
32
|
+
shoppingCart: OrderShoppingCart;
|
|
33
|
+
/** Order step, see {@link OrderStep} */
|
|
34
|
+
step: OrderStep;
|
|
35
|
+
/** Step category */
|
|
36
|
+
stepCategory: string;
|
|
37
|
+
/** Step code */
|
|
38
|
+
stepCode: string;
|
|
39
|
+
/** Step unique identifier */
|
|
40
|
+
stepId: number;
|
|
41
|
+
/** Step name */
|
|
42
|
+
stepName: string;
|
|
43
|
+
/** Order transaction unique identifier */
|
|
44
|
+
transactionId: number | null;
|
|
45
|
+
/** Vendor unique identifier */
|
|
46
|
+
vendorId: number;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* The shopping cart associated with the order.
|
|
50
|
+
*
|
|
51
|
+
* @interface OrderShoppingCart
|
|
52
|
+
* @since 0.5.15
|
|
53
|
+
*/
|
|
54
|
+
export interface OrderShoppingCart {
|
|
55
|
+
/** Order bill total category, see {@link BillTotalCategory} */
|
|
56
|
+
billTotal: BillTotalCategory;
|
|
57
|
+
/**
|
|
58
|
+
* An array of the order paid payment methods,
|
|
59
|
+
* see {@link OrderPaidPaymentMethod}
|
|
60
|
+
*/
|
|
61
|
+
paidPaymentMethods: OrderPaidPaymentMethod[];
|
|
62
|
+
/** An array of order stores, see {@link OrderStore} */
|
|
63
|
+
stores: OrderStore[];
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Store associated with the order.
|
|
67
|
+
*
|
|
68
|
+
* @interface OrderStore
|
|
69
|
+
* @since 0.5.15
|
|
70
|
+
*/
|
|
71
|
+
export interface OrderStore {
|
|
72
|
+
/**
|
|
73
|
+
* An array of products associated with the order,
|
|
74
|
+
* see {@link OrderProduct}
|
|
75
|
+
*/
|
|
76
|
+
products: OrderProduct[];
|
|
77
|
+
/** Store name */
|
|
78
|
+
storeName: string;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Product associated with the order.
|
|
82
|
+
*
|
|
83
|
+
* @interface OrderProduct
|
|
84
|
+
* @since 0.5.15
|
|
85
|
+
*/
|
|
86
|
+
export interface OrderProduct {
|
|
87
|
+
/** Product unique identifier */
|
|
88
|
+
productId: number;
|
|
89
|
+
/** Product name */
|
|
90
|
+
productName: string;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Paid payment methods associated with the order.
|
|
94
|
+
*
|
|
95
|
+
* @interface OrderPaidPaymentMethod
|
|
96
|
+
* @since 0.5.15
|
|
97
|
+
*/
|
|
98
|
+
export interface OrderPaidPaymentMethod {
|
|
99
|
+
/** Order paid payment methods */
|
|
100
|
+
payment_method_name: string;
|
|
101
|
+
/** Order last retry, see {@link OrderLastRetry} */
|
|
102
|
+
lastRetry: OrderLastRetry;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* The last retry of the order.
|
|
106
|
+
*
|
|
107
|
+
* @interface OrderLastRetry
|
|
108
|
+
* @since 0.5.15
|
|
109
|
+
*/
|
|
110
|
+
export interface OrderLastRetry {
|
|
111
|
+
/** Order last retry step */
|
|
112
|
+
step: OrderStep;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* The step where the order is located.
|
|
116
|
+
*
|
|
117
|
+
* @interface OrderStep
|
|
118
|
+
* @since 0.5.15
|
|
119
|
+
*/
|
|
120
|
+
export interface OrderStep {
|
|
121
|
+
/** Step title to use on front end */
|
|
122
|
+
title_frontend: string;
|
|
123
|
+
/** Step description to use on front end */
|
|
124
|
+
description_frontend: string;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* The details of the order.
|
|
128
|
+
*
|
|
129
|
+
* @interface OrderDetails
|
|
130
|
+
* @since 0.5.15
|
|
131
|
+
* @extends {{@link BaseOrder}
|
|
132
|
+
*/
|
|
133
|
+
export interface OrderDetails extends BaseOrder {
|
|
134
|
+
/** Order details' shipping address */
|
|
135
|
+
shippingAddress: ShippingAddress;
|
|
136
|
+
/** Order details' shipping cost, see {@link OrderDetailShippingCost} */
|
|
137
|
+
shippingCost: OrderDetailShippingCost;
|
|
138
|
+
/** Order details' billing data */
|
|
139
|
+
billingData: BillingData;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* The shipping cost associated with the order.
|
|
143
|
+
*
|
|
144
|
+
* @interface OrderDetailShippingCost
|
|
145
|
+
* @since 0.5.15
|
|
146
|
+
*/
|
|
147
|
+
export interface OrderDetailShippingCost {
|
|
148
|
+
/** Shipping cost net price */
|
|
149
|
+
net_price: number;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Representation of a Commerce Order.
|
|
153
|
+
*
|
|
154
|
+
* @typedef Order
|
|
155
|
+
* @since 0.5.15
|
|
156
|
+
*/
|
|
157
|
+
export declare type Order = BaseOrder | OrderDetails;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"order.types.js","sourceRoot":"","sources":["../../src/types/order.types.ts"],"names":[],"mappings":""}
|
|
@@ -79,3 +79,19 @@ export declare type PaymentMethodName = "CREDIT_CARD" | "CASH";
|
|
|
79
79
|
* @since 0.5.14
|
|
80
80
|
*/
|
|
81
81
|
export declare type CardName = "Diners" | "Discover" | "American Express" | "Visa" | "MasterCard";
|
|
82
|
+
/**
|
|
83
|
+
* Representation of a card inscription.
|
|
84
|
+
*
|
|
85
|
+
* @interface CardInscription
|
|
86
|
+
* @since 0.5.15
|
|
87
|
+
*/
|
|
88
|
+
export interface CardInscription {
|
|
89
|
+
id: number;
|
|
90
|
+
uid: string;
|
|
91
|
+
number: string;
|
|
92
|
+
type: string;
|
|
93
|
+
authCode?: string;
|
|
94
|
+
bin: string;
|
|
95
|
+
paymentToken: string;
|
|
96
|
+
createdAt?: string;
|
|
97
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseWeekDay } from "./common.types";
|
|
2
|
-
import {
|
|
2
|
+
import { CDNImage } from "./image.types";
|
|
3
3
|
import { Alert } from "./shoppingCart.types";
|
|
4
4
|
/**
|
|
5
5
|
* Representation of a Commerce Product.
|
|
@@ -43,8 +43,8 @@ export interface BaseProduct {
|
|
|
43
43
|
suggestedPrice: string;
|
|
44
44
|
/** Indicates if a product is available */
|
|
45
45
|
available: boolean;
|
|
46
|
-
/** Array of product images, see {@link
|
|
47
|
-
images:
|
|
46
|
+
/** Array of product images, see {@link CDNImage} */
|
|
47
|
+
images: CDNImage[];
|
|
48
48
|
/** The standard time of the product */
|
|
49
49
|
standardTime: string;
|
|
50
50
|
/** Indicates if a product is sponsored */
|
|
@@ -192,8 +192,8 @@ export interface ProductQuestion {
|
|
|
192
192
|
* see {@link ProductAnswer}
|
|
193
193
|
*/
|
|
194
194
|
answers: ProductAnswer[];
|
|
195
|
-
/** Array of product question images to display, see {@link
|
|
196
|
-
images:
|
|
195
|
+
/** Array of product question images to display, see {@link CDNImage} */
|
|
196
|
+
images: CDNImage[] | undefined;
|
|
197
197
|
}
|
|
198
198
|
/**
|
|
199
199
|
* Common props for products and answers.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* User preferences.
|
|
3
|
+
*
|
|
4
|
+
* @interface UserSettings
|
|
5
|
+
* @since 0.5.15
|
|
6
|
+
*/
|
|
7
|
+
export interface UserSettings {
|
|
8
|
+
/** Individual settings, see {@link Settings} */
|
|
9
|
+
settings: Settings;
|
|
10
|
+
/** User unique identifier */
|
|
11
|
+
uid: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Individual user settings.
|
|
15
|
+
*
|
|
16
|
+
* @typedef Settings
|
|
17
|
+
* @since 0.5.15
|
|
18
|
+
* @property {boolean} `[key: string]` An object where its key is a string
|
|
19
|
+
* and its value is a boolean
|
|
20
|
+
*/
|
|
21
|
+
export declare type Settings = {
|
|
22
|
+
[key: string]: boolean;
|
|
23
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.types.js","sourceRoot":"","sources":["../../src/types/settings.types.ts"],"names":[],"mappings":";AAAA,4BAA4B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CDNImage } from "./image.types";
|
|
2
2
|
import { Vendor } from "./vendor.types";
|
|
3
3
|
import { Catalogue } from "./catalogue.types";
|
|
4
4
|
import { BaseWeekDay } from "./common.types";
|
|
@@ -78,8 +78,8 @@ export interface Store {
|
|
|
78
78
|
location: StoreLocation;
|
|
79
79
|
/** Array of catalogues, see {@link Catalogue} */
|
|
80
80
|
catalogues: Catalogue[];
|
|
81
|
-
/** Array of store images, see {@link
|
|
82
|
-
images:
|
|
81
|
+
/** Array of store images, see {@link CDNImage}*/
|
|
82
|
+
images: CDNImage[];
|
|
83
83
|
/** The distance between the user and the store, roughly in metres */
|
|
84
84
|
distance: number;
|
|
85
85
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CDNImage } from "./image.types";
|
|
2
2
|
/**
|
|
3
3
|
* Representation of a Commerce Vendor.
|
|
4
4
|
*
|
|
@@ -8,8 +8,8 @@ import { Image } from "./image.types";
|
|
|
8
8
|
export interface Vendor {
|
|
9
9
|
/** Artisan's vendor unique identifier */
|
|
10
10
|
id: number;
|
|
11
|
-
/** Vendor's images, see {@link
|
|
12
|
-
images:
|
|
11
|
+
/** Vendor's images, see {@link CDNImage} */
|
|
12
|
+
images: CDNImage[];
|
|
13
13
|
/** Vendor's name */
|
|
14
14
|
name: string;
|
|
15
15
|
/** Vendor's maximum purchase value */
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@artisan-commerce/types",
|
|
3
3
|
"description": "Artisan's types and interfaces library",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.14.0-canary.1",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"prettier": "^2.1.2",
|
|
43
43
|
"webpack-bundle-analyzer": "^3.9.0"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "caa730307125598ed71f2a24e10c7843a06e600d"
|
|
46
46
|
}
|