@artisan-commerce/types 0.14.0-canary.28 → 0.14.0-canary.3
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 +0 -221
- package/build/index.d.ts +26 -0
- package/build/index.js +40 -0
- package/build/index.js.map +1 -0
- package/build/types/account.types.d.ts +17 -0
- package/build/types/account.types.js +4 -0
- package/build/types/account.types.js.map +1 -0
- package/build/types/app.types.d.ts +153 -0
- package/build/types/app.types.js +4 -0
- package/build/types/app.types.js.map +1 -0
- package/build/types/artisnDB.types.d.ts +29 -0
- package/build/types/artisnDB.types.js +4 -0
- package/build/types/artisnDB.types.js.map +1 -0
- package/build/types/banner.types.d.ts +97 -0
- package/build/types/banner.types.js +4 -0
- package/build/types/banner.types.js.map +1 -0
- package/build/types/billingData.types.d.ts +39 -0
- package/build/types/billingData.types.js +4 -0
- package/build/types/billingData.types.js.map +1 -0
- package/build/types/catalogue.types.d.ts +16 -0
- package/build/types/catalogue.types.js +4 -0
- package/build/types/catalogue.types.js.map +1 -0
- package/build/types/category.types.d.ts +33 -0
- package/build/types/category.types.js +4 -0
- package/build/types/category.types.js.map +1 -0
- package/build/types/common.types.d.ts +36 -0
- package/build/types/common.types.js +4 -0
- package/build/types/common.types.js.map +1 -0
- package/build/types/country.types.d.ts +51 -0
- package/build/types/country.types.js +4 -0
- package/build/types/country.types.js.map +1 -0
- package/build/types/coupon.types.d.ts +112 -0
- package/build/types/coupon.types.js +4 -0
- package/build/types/coupon.types.js.map +1 -0
- package/build/types/currency.types.d.ts +7 -0
- package/build/types/currency.types.js +4 -0
- package/build/types/currency.types.js.map +1 -0
- 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/http.types.d.ts +64 -0
- package/build/types/http.types.js +4 -0
- package/build/types/http.types.js.map +1 -0
- package/build/types/image.types.d.ts +82 -0
- package/build/types/image.types.js +4 -0
- package/build/types/image.types.js.map +1 -0
- package/build/types/livingPlace.types.d.ts +92 -0
- package/build/types/livingPlace.types.js +4 -0
- package/build/types/livingPlace.types.js.map +1 -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 +97 -0
- package/build/types/payment.types.js +4 -0
- package/build/types/payment.types.js.map +1 -0
- package/build/types/product.types.d.ts +299 -0
- package/build/types/product.types.js +4 -0
- package/build/types/product.types.js.map +1 -0
- 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/shippingAddress.types.d.ts +73 -0
- package/build/types/shippingAddress.types.js +4 -0
- package/build/types/shippingAddress.types.js.map +1 -0
- package/build/types/shippingCost.types.d.ts +54 -0
- package/build/types/shippingCost.types.js +4 -0
- package/build/types/shippingCost.types.js.map +1 -0
- package/build/types/shoppingCart.types.d.ts +124 -0
- package/build/types/shoppingCart.types.js +4 -0
- package/build/types/shoppingCart.types.js.map +1 -0
- package/build/types/store.types.d.ts +198 -0
- package/build/types/store.types.js +4 -0
- package/build/types/store.types.js.map +1 -0
- package/build/types/user.types.d.ts +114 -0
- package/build/types/user.types.js +4 -0
- package/build/types/user.types.js.map +1 -0
- package/build/types/vendor.types.d.ts +23 -0
- package/build/types/vendor.types.js +3 -0
- package/build/types/vendor.types.js.map +1 -0
- package/build/vendors.d.ts +1 -0
- package/build/vendors.js +4 -0
- package/build/vendors.js.map +1 -0
- package/package.json +26 -18
- package/dist/bundle.d.ts +0 -3372
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"billingData.types.js","sourceRoot":"","sources":["../../src/types/billingData.types.ts"],"names":[],"mappings":";AAAA,oCAAoC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Representation of a Commerce Catalogue.
|
|
3
|
+
*
|
|
4
|
+
* @interface Catalogue
|
|
5
|
+
* @since 0.5.14
|
|
6
|
+
*/
|
|
7
|
+
export interface Catalogue {
|
|
8
|
+
/** Catalogue's id */
|
|
9
|
+
catalogueId: string;
|
|
10
|
+
/** Catalogue's name */
|
|
11
|
+
name: string;
|
|
12
|
+
/** Whether or not the catalogue is active */
|
|
13
|
+
active: boolean;
|
|
14
|
+
/** Catalogue's friendly name to use on front end */
|
|
15
|
+
friendlyName?: string;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalogue.types.js","sourceRoot":"","sources":["../../src/types/catalogue.types.ts"],"names":[],"mappings":";AAAA,iCAAiC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { CDNImage } from "./image.types";
|
|
2
|
+
import { BaseProduct } from "./product.types";
|
|
3
|
+
/**
|
|
4
|
+
* Representation of a Commerce Category.
|
|
5
|
+
*
|
|
6
|
+
* @interface Category
|
|
7
|
+
* @since 0.5.14
|
|
8
|
+
*/
|
|
9
|
+
export interface Category {
|
|
10
|
+
/** Category's id */
|
|
11
|
+
categoryId: number;
|
|
12
|
+
/** Category's name */
|
|
13
|
+
name: string;
|
|
14
|
+
/** Category image's array, see {@link CDNImage} */
|
|
15
|
+
images: CDNImage[];
|
|
16
|
+
/** Whether or not to display the category */
|
|
17
|
+
displayInMenu: boolean;
|
|
18
|
+
/** Whether or not the category should be reloaded */
|
|
19
|
+
reload: boolean;
|
|
20
|
+
/** Whether or not the category has subcategories */
|
|
21
|
+
subcategories: boolean;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Representation of a category which contains several base products.
|
|
25
|
+
*
|
|
26
|
+
* @interface CategoryWithProducts
|
|
27
|
+
* @since 0.5.14
|
|
28
|
+
* @extends {{@link Category}
|
|
29
|
+
*/
|
|
30
|
+
export interface CategoryWithProducts extends Category {
|
|
31
|
+
/** Array of base products associated with a category, see {@link BaseProduct} */
|
|
32
|
+
products: BaseProduct[];
|
|
33
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"category.types.js","sourceRoot":"","sources":["../../src/types/category.types.ts"],"names":[],"mappings":";AAAA,kCAAkC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Representation of a generic object.
|
|
3
|
+
*
|
|
4
|
+
* @interface Objectify<T>
|
|
5
|
+
* @since 0.5.14
|
|
6
|
+
* @property {T} [key: string] object key
|
|
7
|
+
*/
|
|
8
|
+
export interface Objectify<T> {
|
|
9
|
+
[key: string]: T;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The possible values of a document type.
|
|
13
|
+
*
|
|
14
|
+
* @typedef DocumentType
|
|
15
|
+
* @since 0.5.14
|
|
16
|
+
*/
|
|
17
|
+
export declare type DocumentType = "CI" | "RUC" | "PASSPORT";
|
|
18
|
+
/**
|
|
19
|
+
* Representation of the country's summary.
|
|
20
|
+
*
|
|
21
|
+
* @interface CountrySummary
|
|
22
|
+
* @since 0.5.14
|
|
23
|
+
*/
|
|
24
|
+
export interface CountrySummary {
|
|
25
|
+
/** Country's id */
|
|
26
|
+
id: number;
|
|
27
|
+
/** Country's name */
|
|
28
|
+
name: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* The possible values of a week day.
|
|
32
|
+
*
|
|
33
|
+
* @typedef BaseWeekDay
|
|
34
|
+
* @since 0.5.14
|
|
35
|
+
*/
|
|
36
|
+
export declare type BaseWeekDay = "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY" | "SUNDAY";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.types.js","sourceRoot":"","sources":["../../src/types/common.types.ts"],"names":[],"mappings":";AAAA,yCAAyC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Representation of a Commerce Country.
|
|
3
|
+
*
|
|
4
|
+
* @interface Country
|
|
5
|
+
* @since 0.5.14
|
|
6
|
+
*/
|
|
7
|
+
export interface Country {
|
|
8
|
+
/** Country's id */
|
|
9
|
+
countryId: string;
|
|
10
|
+
/** Country's name */
|
|
11
|
+
name: string;
|
|
12
|
+
/** Country ISO code, e.g.: EC */
|
|
13
|
+
code: string;
|
|
14
|
+
/** Whether or not the country is active */
|
|
15
|
+
active: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Object which contains information about country's currency,
|
|
18
|
+
* see {@link CountryCurrency}
|
|
19
|
+
*/
|
|
20
|
+
currency: CountryCurrency;
|
|
21
|
+
/** Array of taxes usually applied on the country, see {@link CountryTax} */
|
|
22
|
+
taxes: CountryTax[];
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Representation of a country's currency.
|
|
26
|
+
*
|
|
27
|
+
* @interface CountryCurrency
|
|
28
|
+
* @since 0.5.14
|
|
29
|
+
*/
|
|
30
|
+
export interface CountryCurrency {
|
|
31
|
+
/** Currency's id */
|
|
32
|
+
currencyId: string;
|
|
33
|
+
/** Currency's name */
|
|
34
|
+
name: string;
|
|
35
|
+
/** Currency's symbol */
|
|
36
|
+
sign: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Representation of a country's tax.
|
|
40
|
+
*
|
|
41
|
+
* @interface CountryTax
|
|
42
|
+
* @since 0.5.14
|
|
43
|
+
*/
|
|
44
|
+
export interface CountryTax {
|
|
45
|
+
/** Tax name */
|
|
46
|
+
tax: string;
|
|
47
|
+
/** Value added tax rate */
|
|
48
|
+
vatRate: string;
|
|
49
|
+
/** Tax percentage */
|
|
50
|
+
percentage: number;
|
|
51
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"country.types.js","sourceRoot":"","sources":["../../src/types/country.types.ts"],"names":[],"mappings":";AAAA,+BAA+B"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { ArtisnDBCollectionReference } from "./artisnDB.types";
|
|
2
|
+
import { ArtisnDBQueryDocumentSnapshot } from "./artisnDB.types";
|
|
3
|
+
import { ArtisnDBDocumentData } from "./artisnDB.types";
|
|
4
|
+
import { CDNImage } from "./image.types";
|
|
5
|
+
/**
|
|
6
|
+
* Wallet user information.
|
|
7
|
+
*
|
|
8
|
+
* @interface Wallet
|
|
9
|
+
* @since 0.5.14
|
|
10
|
+
*/
|
|
11
|
+
export interface Wallet {
|
|
12
|
+
/** {@link Benefit}'s array from firestore user wallet */
|
|
13
|
+
benefits: Benefit[];
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Benefit information.
|
|
17
|
+
*
|
|
18
|
+
* @interface Benefit
|
|
19
|
+
* @since 0.5.14
|
|
20
|
+
*/
|
|
21
|
+
export interface Benefit {
|
|
22
|
+
/** The user wallet id */
|
|
23
|
+
hash: string;
|
|
24
|
+
/** The benefit awards, see {@link Award} */
|
|
25
|
+
award: Award;
|
|
26
|
+
/** Benefit id */
|
|
27
|
+
benefitId: number;
|
|
28
|
+
/** Benefit wallet id */
|
|
29
|
+
benefitWalletId: number;
|
|
30
|
+
/** Benefit code in back-end */
|
|
31
|
+
code: null;
|
|
32
|
+
/** Combined */
|
|
33
|
+
combined: string;
|
|
34
|
+
/** Benefit creation date */
|
|
35
|
+
createdAt: string;
|
|
36
|
+
/** Benefit description */
|
|
37
|
+
description: string;
|
|
38
|
+
/** Benefit discount percentage */
|
|
39
|
+
discountPercentage: number;
|
|
40
|
+
/** Benefit expiration date */
|
|
41
|
+
expirationDate: string;
|
|
42
|
+
/** External benefit id */
|
|
43
|
+
externalId: null;
|
|
44
|
+
/** Benefit images, see {@link CDNImage} */
|
|
45
|
+
image: CDNImage[];
|
|
46
|
+
/** The award limit */
|
|
47
|
+
limitAward: null;
|
|
48
|
+
/** The benefit limit */
|
|
49
|
+
limitBenefit: number;
|
|
50
|
+
/** The logic operator of the benefit */
|
|
51
|
+
logicOperator: string;
|
|
52
|
+
/** Benefit stock */
|
|
53
|
+
quantity: number;
|
|
54
|
+
/** The rules of the benefit */
|
|
55
|
+
rules: any[];
|
|
56
|
+
/** The benefit title */
|
|
57
|
+
title: string;
|
|
58
|
+
/** Benefit type, see {@link BenefitTypes} */
|
|
59
|
+
type: BenefitTypes;
|
|
60
|
+
/** Benefit update date */
|
|
61
|
+
updatedAt: string;
|
|
62
|
+
/** The channel id of the benefit */
|
|
63
|
+
channelId: number;
|
|
64
|
+
/** The vendor id of the benefit */
|
|
65
|
+
vendorId: number;
|
|
66
|
+
/** The account id of the benefit */
|
|
67
|
+
accountId: number;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Award information.
|
|
71
|
+
*
|
|
72
|
+
* @interface Award
|
|
73
|
+
* @since 0.5.14
|
|
74
|
+
*/
|
|
75
|
+
export interface Award {
|
|
76
|
+
/** The id of the award */
|
|
77
|
+
id: number;
|
|
78
|
+
/** The id of the benefit */
|
|
79
|
+
benefitId: number;
|
|
80
|
+
/** Benefit discount percentage */
|
|
81
|
+
discountPercentage: number;
|
|
82
|
+
/** Benefit discount value */
|
|
83
|
+
discountValue: null;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Applied benefit array in shopping cart.
|
|
87
|
+
*
|
|
88
|
+
* @typedef ShoppingCartBenefits
|
|
89
|
+
* @since 0.5.14
|
|
90
|
+
*/
|
|
91
|
+
export declare type ShoppingCartBenefits = Benefit[];
|
|
92
|
+
/**
|
|
93
|
+
* A benefit DB node from a user.
|
|
94
|
+
*
|
|
95
|
+
* @typedef BenefitsByUserNode
|
|
96
|
+
* @since 0.5.14
|
|
97
|
+
*/
|
|
98
|
+
export declare type BenefitsByUserNode = ArtisnDBQueryDocumentSnapshot<ArtisnDBDocumentData>;
|
|
99
|
+
/**
|
|
100
|
+
* The complete collection of benefits DB nodes from a user.
|
|
101
|
+
*
|
|
102
|
+
* @typedef BenefitsByUserNodes
|
|
103
|
+
* @since 0.5.14
|
|
104
|
+
*/
|
|
105
|
+
export declare type BenefitsByUserNodes = ArtisnDBCollectionReference<ArtisnDBDocumentData>;
|
|
106
|
+
/**
|
|
107
|
+
* The possible values of the benefit type.
|
|
108
|
+
*
|
|
109
|
+
* @typedef BenefitTypes
|
|
110
|
+
* @since 0.5.14
|
|
111
|
+
*/
|
|
112
|
+
export declare type BenefitTypes = "ALTER_DELIVERY" | "PRODUCT" | "DISCOUNT";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coupon.types.js","sourceRoot":"","sources":["../../src/types/coupon.types.ts"],"names":[],"mappings":";AAAA,+BAA+B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"currency.types.js","sourceRoot":"","sources":["../../src/types/currency.types.ts"],"names":[],"mappings":";AAAA,gCAAgC"}
|
|
@@ -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"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Representation of a Artisn request.
|
|
3
|
+
*
|
|
4
|
+
* @interface ArtisnRequest
|
|
5
|
+
* @since 0.5.14
|
|
6
|
+
*/
|
|
7
|
+
export interface ArtisnRequest {
|
|
8
|
+
/** Request's url */
|
|
9
|
+
url: string;
|
|
10
|
+
/** Request's headers, see {@link ArtisnRequestHeaders} */
|
|
11
|
+
headers: ArtisnRequestHeaders;
|
|
12
|
+
/** Request's body, see {@link ArtisnRequestBody} */
|
|
13
|
+
body: ArtisnRequestBody;
|
|
14
|
+
/** Request's query, see {@link ArtisnQuery} */
|
|
15
|
+
query: ArtisnQuery;
|
|
16
|
+
/** Request's params, see {@link ArtisnParams} */
|
|
17
|
+
params: ArtisnParams;
|
|
18
|
+
/** Request's method, see {@link ArtisnRequestMethod} */
|
|
19
|
+
method?: ArtisnRequestMethod;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Artisn request headers based on the fetch API.
|
|
23
|
+
*
|
|
24
|
+
* @typedef ArtisnRequestHeaders
|
|
25
|
+
* @since 0.5.14
|
|
26
|
+
*/
|
|
27
|
+
export declare type ArtisnRequestHeaders = Headers;
|
|
28
|
+
/**
|
|
29
|
+
* Allowed methods for requests.
|
|
30
|
+
*
|
|
31
|
+
* @typedef ArtisnRequestMethod
|
|
32
|
+
* @since 0.5.14
|
|
33
|
+
*/
|
|
34
|
+
export declare type ArtisnRequestMethod = "POST" | "GET" | "PUT" | "DELETE" | "PATCH";
|
|
35
|
+
/**
|
|
36
|
+
* Artisn request's body.
|
|
37
|
+
*
|
|
38
|
+
* @interface ArtisnRequestBody
|
|
39
|
+
* @since 0.5.14
|
|
40
|
+
* @property {any} [key:string] Object with key-value pairs
|
|
41
|
+
*/
|
|
42
|
+
export interface ArtisnRequestBody {
|
|
43
|
+
[key: string]: any;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Artisn request's body.
|
|
47
|
+
*
|
|
48
|
+
* @interface ArtisnQuery
|
|
49
|
+
* @since 0.5.14
|
|
50
|
+
* @property {string | number | boolean} [key:string] Object with key-value pairs
|
|
51
|
+
*/
|
|
52
|
+
export interface ArtisnQuery {
|
|
53
|
+
[key: string]: string | number | boolean;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Artisn request's params.
|
|
57
|
+
*
|
|
58
|
+
* @interface ArtisnParams
|
|
59
|
+
* @since 0.5.14
|
|
60
|
+
* @property {string | number} [key:string] Object with key-value pairs
|
|
61
|
+
*/
|
|
62
|
+
export interface ArtisnParams {
|
|
63
|
+
[key: string]: string | number;
|
|
64
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.types.js","sourceRoot":"","sources":["../../src/types/http.types.ts"],"names":[],"mappings":";AAAA,2BAA2B"}
|