@artisan-commerce/types 0.14.0-canary.23 → 0.14.0-canary.25
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 +19 -0
- package/dist/bundle.d.ts +229 -3
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
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.25](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/types@0.14.0-canary.24...@artisan-commerce/types@0.14.0-canary.25) (2021-11-05)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **global:** fix types and builders for store coupon and add condition to shipping cost ([2800a87](https://bitbucket.org/tradesystem/artisn_sdk/commit/2800a87a326c9f0ca5e0f1fbe202e15768fc32c9))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## [0.14.0-canary.24](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/types@0.14.0-canary.23...@artisan-commerce/types@0.14.0-canary.24) (2021-10-22)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* **global:** add interfaces, functions and services for store coupons ([7e8a959](https://bitbucket.org/tradesystem/artisn_sdk/commit/7e8a95998982e8c8b892b61eb709e98ac7671a09))
|
|
21
|
+
* **global:** add missing interface and docs ([e7fca2f](https://bitbucket.org/tradesystem/artisn_sdk/commit/e7fca2f5a608a592380b8cd9aafab04cc32ce13d))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [0.14.0-canary.23](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/types@0.14.0-canary.22...@artisan-commerce/types@0.14.0-canary.23) (2021-10-21)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @artisan-commerce/types
|
package/dist/bundle.d.ts
CHANGED
|
@@ -965,7 +965,7 @@ interface Benefit {
|
|
|
965
965
|
/** Benefit update date */
|
|
966
966
|
updatedAt: string;
|
|
967
967
|
/** The vendor id of the benefit */
|
|
968
|
-
vendorId:
|
|
968
|
+
vendorId: Vendor["id"];
|
|
969
969
|
}
|
|
970
970
|
/**
|
|
971
971
|
* Award information.
|
|
@@ -989,7 +989,7 @@ interface Award {
|
|
|
989
989
|
/** Product unique identifier associated with the benefit award */
|
|
990
990
|
productId: number;
|
|
991
991
|
/** The vendor id of the award */
|
|
992
|
-
vendorId:
|
|
992
|
+
vendorId: Vendor["id"];
|
|
993
993
|
}
|
|
994
994
|
/**
|
|
995
995
|
* Applied benefit array in shopping cart.
|
|
@@ -1019,6 +1019,231 @@ declare type BenefitsByUserNodes = ArtisnDBCollectionReference<ArtisnDBDocumentD
|
|
|
1019
1019
|
* @since 0.5.14
|
|
1020
1020
|
*/
|
|
1021
1021
|
declare type BenefitTypes = "ALTER_DELIVERY" | "PRODUCT" | "DISCOUNT";
|
|
1022
|
+
/**
|
|
1023
|
+
* Redeemed coupon related data.
|
|
1024
|
+
*
|
|
1025
|
+
* @interface RedeemCouponData
|
|
1026
|
+
* @since 0.1.0
|
|
1027
|
+
*/
|
|
1028
|
+
interface BenefitData {
|
|
1029
|
+
/** Benefit account unique identifier */
|
|
1030
|
+
account_id: number;
|
|
1031
|
+
/** Benefit data amount */
|
|
1032
|
+
amount: number | null;
|
|
1033
|
+
/** Indicates if the benefit is redeemed automatically */
|
|
1034
|
+
automatic_redeemed: string;
|
|
1035
|
+
/** Benefit code */
|
|
1036
|
+
code: string | null;
|
|
1037
|
+
/** Indicates if the benefit is combined or not */
|
|
1038
|
+
combined: string;
|
|
1039
|
+
/** Benefit days */
|
|
1040
|
+
days: null;
|
|
1041
|
+
/** Benefit description */
|
|
1042
|
+
description: string;
|
|
1043
|
+
/** Benefit discount percentage */
|
|
1044
|
+
discount_percentage: number;
|
|
1045
|
+
/** Benefit end date */
|
|
1046
|
+
end_date: string;
|
|
1047
|
+
/** Benefit error validation */
|
|
1048
|
+
error_validation: string;
|
|
1049
|
+
/** Benefit expired date */
|
|
1050
|
+
expiration_date: string;
|
|
1051
|
+
/** Benefit external id */
|
|
1052
|
+
external_id: string | null;
|
|
1053
|
+
/** Benefit data unique identifier */
|
|
1054
|
+
id: number;
|
|
1055
|
+
/** Benefit image */
|
|
1056
|
+
image: null;
|
|
1057
|
+
/** Benefit instruction */
|
|
1058
|
+
instruction: null;
|
|
1059
|
+
/** Benefit award limit */
|
|
1060
|
+
limit_award: null;
|
|
1061
|
+
/** Benefit limit */
|
|
1062
|
+
limit_benefit: number;
|
|
1063
|
+
/** Benefit logic operator */
|
|
1064
|
+
logic_operator: string;
|
|
1065
|
+
/** Benefit name */
|
|
1066
|
+
name: string;
|
|
1067
|
+
/** Benefit quantity */
|
|
1068
|
+
quantity: number;
|
|
1069
|
+
/** An array of coupon products, see {@link BenefitData} */
|
|
1070
|
+
products: ProductCoupon[];
|
|
1071
|
+
/** Array of benefit rules */
|
|
1072
|
+
rules: any[];
|
|
1073
|
+
/** Benefit spend */
|
|
1074
|
+
spend: number;
|
|
1075
|
+
/** Benefit start date */
|
|
1076
|
+
start_date: string;
|
|
1077
|
+
/** Benefit status */
|
|
1078
|
+
status: string;
|
|
1079
|
+
/** Benefit stock */
|
|
1080
|
+
stock: number;
|
|
1081
|
+
/** Benefit success message */
|
|
1082
|
+
success_message: string;
|
|
1083
|
+
/** Benefit term and condition */
|
|
1084
|
+
term_and_condition: string;
|
|
1085
|
+
/** Benefit type */
|
|
1086
|
+
type: string;
|
|
1087
|
+
/** Benefit type alias */
|
|
1088
|
+
type_alias: string;
|
|
1089
|
+
/** Benefit unit */
|
|
1090
|
+
unit: null;
|
|
1091
|
+
/** Coupon vendor unique identifier */
|
|
1092
|
+
vendor_id: Vendor["id"];
|
|
1093
|
+
}
|
|
1094
|
+
/**
|
|
1095
|
+
* Product coupon associated with a benefit.
|
|
1096
|
+
*
|
|
1097
|
+
* @interface ProductCoupon
|
|
1098
|
+
* @since 0.1.0
|
|
1099
|
+
*/
|
|
1100
|
+
interface ProductCoupon {
|
|
1101
|
+
/** Product coupon amount */
|
|
1102
|
+
amount: number;
|
|
1103
|
+
/** Product coupon benefit unique identifier */
|
|
1104
|
+
benefitId: number;
|
|
1105
|
+
/** Product coupon discount percentage */
|
|
1106
|
+
discountPercentage: number;
|
|
1107
|
+
/** Product coupon discount */
|
|
1108
|
+
discountValue: number | null;
|
|
1109
|
+
/** Product coupon id */
|
|
1110
|
+
id: number;
|
|
1111
|
+
/** Product description */
|
|
1112
|
+
productDescription: string | null;
|
|
1113
|
+
/** Product unique identifier */
|
|
1114
|
+
productId: number | null;
|
|
1115
|
+
/** Coupon swap product unique identifier */
|
|
1116
|
+
swapProductId: null;
|
|
1117
|
+
/** Coupon vendor unique identifier */
|
|
1118
|
+
vendorId: Vendor["id"];
|
|
1119
|
+
}
|
|
1120
|
+
/**
|
|
1121
|
+
* Representation of a store coupon.
|
|
1122
|
+
*
|
|
1123
|
+
* @interface StoreCoupon
|
|
1124
|
+
* @since 0.1.0
|
|
1125
|
+
*/
|
|
1126
|
+
interface StoreCoupon {
|
|
1127
|
+
/** An array of coupons, see {@link Coupon} */
|
|
1128
|
+
coupons: Coupon[];
|
|
1129
|
+
/** Whether or not the store coupon is featured */
|
|
1130
|
+
featured: boolean;
|
|
1131
|
+
/** Store coupon unique identifier */
|
|
1132
|
+
id: number;
|
|
1133
|
+
/** Store coupon name */
|
|
1134
|
+
name: string;
|
|
1135
|
+
/** Store coupon vendor unique identifier */
|
|
1136
|
+
vendor_id: Vendor["id"];
|
|
1137
|
+
}
|
|
1138
|
+
/**
|
|
1139
|
+
* Representation of a coupon associated to the store.
|
|
1140
|
+
*
|
|
1141
|
+
* @interface Coupon
|
|
1142
|
+
* @since 0.1.0
|
|
1143
|
+
*/
|
|
1144
|
+
interface Coupon {
|
|
1145
|
+
/**
|
|
1146
|
+
* An array of benefits associated with the coupon,
|
|
1147
|
+
* see {@link BenefitData}
|
|
1148
|
+
*/
|
|
1149
|
+
benefits: BenefitData[];
|
|
1150
|
+
/** Coupon category, see {@link CouponCategory} */
|
|
1151
|
+
category: CouponCategory;
|
|
1152
|
+
/** An array of codes associated with the coupon, see {@link Code} */
|
|
1153
|
+
codes: Code[];
|
|
1154
|
+
/** Coupon end date */
|
|
1155
|
+
end_date: string;
|
|
1156
|
+
/** Coupon unique identifier */
|
|
1157
|
+
id: number;
|
|
1158
|
+
/** Coupon image */
|
|
1159
|
+
image: URLImage | null;
|
|
1160
|
+
/** Coupon name */
|
|
1161
|
+
name: string;
|
|
1162
|
+
/** Whether or not the coupon is exclusive to one store */
|
|
1163
|
+
only_store: boolean;
|
|
1164
|
+
/** Coupon spend quantity */
|
|
1165
|
+
spend: number;
|
|
1166
|
+
/** Coupon start date */
|
|
1167
|
+
start_date: string;
|
|
1168
|
+
/** Coupon status, see {@link ProductStatus} */
|
|
1169
|
+
status: ProductStatus;
|
|
1170
|
+
/** Coupon stock */
|
|
1171
|
+
stock: number;
|
|
1172
|
+
/** Coupon term and condition */
|
|
1173
|
+
term_and_condition: string;
|
|
1174
|
+
/** Coupon text */
|
|
1175
|
+
text: string;
|
|
1176
|
+
/** Coupon type, see {@link CouponType} */
|
|
1177
|
+
type: CouponType;
|
|
1178
|
+
/** Coupon vendor unique identifier */
|
|
1179
|
+
vendor_id: Vendor["id"];
|
|
1180
|
+
}
|
|
1181
|
+
/**
|
|
1182
|
+
* The possible values of a coupon type.
|
|
1183
|
+
*
|
|
1184
|
+
* @typedef CouponType
|
|
1185
|
+
* @since 0.1.0
|
|
1186
|
+
*/
|
|
1187
|
+
declare type CouponType = "COUPON" | "MIX";
|
|
1188
|
+
/**
|
|
1189
|
+
* Coupon category object associated with a store coupon.
|
|
1190
|
+
*
|
|
1191
|
+
* @interface CouponCategory
|
|
1192
|
+
* @since 0.1.0
|
|
1193
|
+
*/
|
|
1194
|
+
interface CouponCategory {
|
|
1195
|
+
/** Whether or not the store coupon category is featured */
|
|
1196
|
+
featured: boolean;
|
|
1197
|
+
/** Coupon category unique identifier */
|
|
1198
|
+
id: number;
|
|
1199
|
+
/** Coupon category name */
|
|
1200
|
+
name: string;
|
|
1201
|
+
}
|
|
1202
|
+
/**
|
|
1203
|
+
* Code object associated with a coupon.
|
|
1204
|
+
*
|
|
1205
|
+
* @interface Code
|
|
1206
|
+
* @since 0.1.0
|
|
1207
|
+
*/
|
|
1208
|
+
interface Code {
|
|
1209
|
+
/** The code associated with the coupon */
|
|
1210
|
+
code: string;
|
|
1211
|
+
/** Coupon code unique identifier */
|
|
1212
|
+
coupon_id: number;
|
|
1213
|
+
/** Code unique identifier */
|
|
1214
|
+
id: number;
|
|
1215
|
+
/** The token corresponding to a QR code */
|
|
1216
|
+
jwt: Token | null;
|
|
1217
|
+
/** The status of the code, see {@link ProductStatus} */
|
|
1218
|
+
status: ProductStatus;
|
|
1219
|
+
/** Whether or not the code has been used */
|
|
1220
|
+
used: boolean;
|
|
1221
|
+
}
|
|
1222
|
+
/**
|
|
1223
|
+
* An object which contains the token corresponding to a QR code.
|
|
1224
|
+
*
|
|
1225
|
+
* @interface Token
|
|
1226
|
+
* @since 0.1.0
|
|
1227
|
+
*/
|
|
1228
|
+
interface Token {
|
|
1229
|
+
/** Token associated with the coupon code */
|
|
1230
|
+
token: string;
|
|
1231
|
+
/** Coupon QR code expiration time */
|
|
1232
|
+
dif: number;
|
|
1233
|
+
/** Coupon expiration date */
|
|
1234
|
+
exp: number;
|
|
1235
|
+
/** Coupon international atomic time */
|
|
1236
|
+
iat: number;
|
|
1237
|
+
}
|
|
1238
|
+
/**
|
|
1239
|
+
* Representation of a store coupon detail, omits the coupon category.
|
|
1240
|
+
*
|
|
1241
|
+
* @interface StoreCouponDetail
|
|
1242
|
+
* @since 0.1.0
|
|
1243
|
+
* @extends {{@link Coupon}
|
|
1244
|
+
*/
|
|
1245
|
+
interface StoreCouponDetail extends Omit<Coupon, "category"> {
|
|
1246
|
+
}
|
|
1022
1247
|
|
|
1023
1248
|
/**
|
|
1024
1249
|
* Representation of a Commerce Shopping Cart.
|
|
@@ -1357,6 +1582,7 @@ interface ProductDetails extends BaseProduct {
|
|
|
1357
1582
|
questions: ProductQuestion[];
|
|
1358
1583
|
/** The benefit id of the product */
|
|
1359
1584
|
benefitId: number | null;
|
|
1585
|
+
/** An array of categories which the product belongs to, see {@link Category} */
|
|
1360
1586
|
categories: Category[] | null;
|
|
1361
1587
|
}
|
|
1362
1588
|
/**
|
|
@@ -2942,4 +3168,4 @@ interface CardInscription {
|
|
|
2942
3168
|
createdAt?: string;
|
|
2943
3169
|
}
|
|
2944
3170
|
|
|
2945
|
-
export { ARDocumentType, Account, AdditionalInfo, AdditionalStoreInformation, Alert, Allocation, ArtisnApp, ArtisnDB, ArtisnDBCollectionReference, ArtisnDBDocumentData, ArtisnDBQueryDocumentSnapshot, ArtisnHeaders, ArtisnHints, ArtisnParams, ArtisnPlatform, ArtisnQuery, ArtisnRNApp, ArtisnRNAuth, ArtisnRNAuthInstance, ArtisnRNSettings, ArtisnRequest, ArtisnRequestBody, ArtisnRequestHeaders, ArtisnRequestMethod, ArtisnRestrictedHeaders, ArtisnWebApp, ArtisnWebAuth, ArtisnWebAuthInstance, ArtisnWebSettings, Award, BODocumentType, BRDocumentType, Banner, BannerImage, BannerScope, BannerType, BaseBillingData, BaseField, BaseLivingPlace, BaseOrder, BasePaymentMethod, BaseProduct, BaseShippingAddress, BaseUser, BaseWeekDay, Benefit, BenefitTypes, BenefitsByUserNode, BenefitsByUserNodes, BillTotal, BillTotalCategory, BillingData, CDNImage, CLDocumentType, CODocumentType, CardInscription, CardName, CartProduct, CartProductAnswer, CartProductQuestion, CartStore, CartTotals, Catalogue, Category, CategoryWithProducts, CommonDocumentType, Country, CountryCode, CountryCurrency, CountrySummary, CreditCardMapping, CurrencyCodes, DayOfWeek, Days, Delivery, DeliveryTimeUnit, DocumentType, ECDocumentType, Field, FieldRecord, Gender, GenericStoreLocation, Image, ImageFit, ImageManipulationConfig, ImageToFormat, Injection, InjectionDetail, IntegrationMessage, Issue, IssueAdditionalInfo, IssueHistory, LivingPlace, LivingPlaceToSave, MaritalStatus, Message, MetadataShipping, NewShippingAddress, Notification, Objectify, OperatorInformation, Order, OrderAdditionalInfo, OrderBillProduct, OrderBillProductAdditionalInfo, OrderBillTotal, OrderCommonFields, OrderDetailShippingCost, OrderDetails, OrderPaymentMethod, OrderProduct, OrderProductAdditionalInfo, OrderProductAttributes, OrderProductImage, OrderProductPriceCategory, OrderRetry, OrderRetryPaymentMethod, OrderShoppingCart, OrderStatus, OrderStep, OrderStepAdditionalInfo, OrderStepAdditionalInfoGroup, OrderStore, OrderUser, PEDocumentType, PYDocumentType, PaymentMethod, PaymentMethodByOrder, PaymentMethodName, PaymentProvider, Phone, PriceCategory, PriceCategoryTax, PriceCategoryType, Product, ProductAnswer, ProductAttributes, ProductDetails, ProductPrices, ProductQuestion, ProductStatus, ProductType, RandomImageConfig, Rule, Schedule, Service, Settings, ShippingAddress, ShippingCost, ShippingCostTax, ShoppingCart, ShoppingCartBenefits, ShoppingCartNode, ShoppingCartNodes, Status, StepCategory, StepCode, StepNotification, StepWorkflow, StepWorkflowAdditionalInfo, StepWorkflowGroup, Store, StoreLocation, StorePolygons, Suborder, TaxCalculation, TaxCalculations, TaxType, TransitionWorkflow, URLImage, USDocumentType, UYDocumentType, UpdatedShippingAddress, User, UserCountry, UserSettings, UserType, VEDocumentType, Vendor, Wallet, WebhookWorkflow, Workflow, ZipCodeField };
|
|
3171
|
+
export { ARDocumentType, Account, AdditionalInfo, AdditionalStoreInformation, Alert, Allocation, ArtisnApp, ArtisnDB, ArtisnDBCollectionReference, ArtisnDBDocumentData, ArtisnDBQueryDocumentSnapshot, ArtisnHeaders, ArtisnHints, ArtisnParams, ArtisnPlatform, ArtisnQuery, ArtisnRNApp, ArtisnRNAuth, ArtisnRNAuthInstance, ArtisnRNSettings, ArtisnRequest, ArtisnRequestBody, ArtisnRequestHeaders, ArtisnRequestMethod, ArtisnRestrictedHeaders, ArtisnWebApp, ArtisnWebAuth, ArtisnWebAuthInstance, ArtisnWebSettings, Award, BODocumentType, BRDocumentType, Banner, BannerImage, BannerScope, BannerType, BaseBillingData, BaseField, BaseLivingPlace, BaseOrder, BasePaymentMethod, BaseProduct, BaseShippingAddress, BaseUser, BaseWeekDay, Benefit, BenefitData, BenefitTypes, BenefitsByUserNode, BenefitsByUserNodes, BillTotal, BillTotalCategory, BillingData, CDNImage, CLDocumentType, CODocumentType, CardInscription, CardName, CartProduct, CartProductAnswer, CartProductQuestion, CartStore, CartTotals, Catalogue, Category, CategoryWithProducts, Code, CommonDocumentType, Country, CountryCode, CountryCurrency, CountrySummary, Coupon, CouponCategory, CouponType, CreditCardMapping, CurrencyCodes, DayOfWeek, Days, Delivery, DeliveryTimeUnit, DocumentType, ECDocumentType, Field, FieldRecord, Gender, GenericStoreLocation, Image, ImageFit, ImageManipulationConfig, ImageToFormat, Injection, InjectionDetail, IntegrationMessage, Issue, IssueAdditionalInfo, IssueHistory, LivingPlace, LivingPlaceToSave, MaritalStatus, Message, MetadataShipping, NewShippingAddress, Notification, Objectify, OperatorInformation, Order, OrderAdditionalInfo, OrderBillProduct, OrderBillProductAdditionalInfo, OrderBillTotal, OrderCommonFields, OrderDetailShippingCost, OrderDetails, OrderPaymentMethod, OrderProduct, OrderProductAdditionalInfo, OrderProductAttributes, OrderProductImage, OrderProductPriceCategory, OrderRetry, OrderRetryPaymentMethod, OrderShoppingCart, OrderStatus, OrderStep, OrderStepAdditionalInfo, OrderStepAdditionalInfoGroup, OrderStore, OrderUser, PEDocumentType, PYDocumentType, PaymentMethod, PaymentMethodByOrder, PaymentMethodName, PaymentProvider, Phone, PriceCategory, PriceCategoryTax, PriceCategoryType, Product, ProductAnswer, ProductAttributes, ProductCoupon, ProductDetails, ProductPrices, ProductQuestion, ProductStatus, ProductType, RandomImageConfig, Rule, Schedule, Service, Settings, ShippingAddress, ShippingCost, ShippingCostTax, ShoppingCart, ShoppingCartBenefits, ShoppingCartNode, ShoppingCartNodes, Status, StepCategory, StepCode, StepNotification, StepWorkflow, StepWorkflowAdditionalInfo, StepWorkflowGroup, Store, StoreCoupon, StoreCouponDetail, StoreLocation, StorePolygons, Suborder, TaxCalculation, TaxCalculations, TaxType, Token, TransitionWorkflow, URLImage, USDocumentType, UYDocumentType, UpdatedShippingAddress, User, UserCountry, UserSettings, UserType, VEDocumentType, Vendor, Wallet, WebhookWorkflow, Workflow, ZipCodeField };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@artisan-commerce/types",
|
|
3
3
|
"description": "Artisn's types and interfaces library",
|
|
4
|
-
"version": "0.14.0-canary.
|
|
4
|
+
"version": "0.14.0-canary.25",
|
|
5
5
|
"main": "./dist/bundle.d.ts",
|
|
6
6
|
"module": "./dist/bundle.d.ts",
|
|
7
7
|
"types": "./dist/bundle.d.ts",
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"@react-native-firebase/firestore": "^12.8.0",
|
|
35
35
|
"firebase": "^8.1.1"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "b388e92c72e306a3f446181f11d0cb05ca55bbf3"
|
|
38
38
|
}
|