@01.software/sdk 0.1.5 → 0.1.6
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/README.md +90 -7
- package/dist/{auth-DNaV-5wt.d.ts → auth-BIQrgvB-.d.cts} +12 -1
- package/dist/{auth-DMvniYSs.d.cts → auth-CRlgtFpv.d.ts} +12 -1
- package/dist/auth.cjs.map +1 -1
- package/dist/auth.d.cts +2 -2
- package/dist/auth.d.ts +2 -2
- package/dist/auth.js.map +1 -1
- package/dist/index.cjs +815 -296
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +342 -46
- package/dist/index.d.ts +342 -46
- package/dist/index.js +815 -296
- package/dist/index.js.map +1 -1
- package/dist/{payload-types-BAZCcssT.d.cts → payload-types-XZDjUjRT.d.cts} +615 -11
- package/dist/{payload-types-BAZCcssT.d.ts → payload-types-XZDjUjRT.d.ts} +615 -11
- package/dist/{webhook-DdNkaI-f.d.cts → webhook-BkbRPVAd.d.cts} +2 -2
- package/dist/{webhook-CYJ0OPds.d.ts → webhook-CFVJAqOx.d.ts} +2 -2
- package/dist/webhook.cjs +6 -4
- package/dist/webhook.cjs.map +1 -1
- package/dist/webhook.d.cts +2 -2
- package/dist/webhook.d.ts +2 -2
- package/dist/webhook.js +6 -4
- package/dist/webhook.js.map +1 -1
- package/package.json +1 -1
|
@@ -13,6 +13,7 @@ type SupportedTimezones = 'Pacific/Midway' | 'Pacific/Niue' | 'Pacific/Honolulu'
|
|
|
13
13
|
interface Config {
|
|
14
14
|
auth: {
|
|
15
15
|
users: UserAuthOperations;
|
|
16
|
+
customers: CustomerAuthOperations;
|
|
16
17
|
};
|
|
17
18
|
blocks: {
|
|
18
19
|
Player: PlayerBlock;
|
|
@@ -43,7 +44,17 @@ interface Config {
|
|
|
43
44
|
'order-products': OrderProduct;
|
|
44
45
|
returns: Return;
|
|
45
46
|
'return-products': ReturnProduct;
|
|
47
|
+
exchanges: Exchange;
|
|
48
|
+
'exchange-products': ExchangeProduct;
|
|
49
|
+
fulfillments: Fulfillment;
|
|
50
|
+
'fulfillment-items': FulfillmentItem;
|
|
46
51
|
transactions: Transaction;
|
|
52
|
+
customers: Customer;
|
|
53
|
+
'customer-addresses': CustomerAddress;
|
|
54
|
+
carts: Cart;
|
|
55
|
+
'cart-items': CartItem;
|
|
56
|
+
discounts: Discount;
|
|
57
|
+
'shipping-policies': ShippingPolicy;
|
|
47
58
|
posts: Post;
|
|
48
59
|
'post-categories': PostCategory;
|
|
49
60
|
'post-tags': PostTag;
|
|
@@ -76,10 +87,25 @@ interface Config {
|
|
|
76
87
|
products: 'order-products';
|
|
77
88
|
transactions: 'transactions';
|
|
78
89
|
returns: 'returns';
|
|
90
|
+
exchanges: 'exchanges';
|
|
91
|
+
fulfillments: 'fulfillments';
|
|
79
92
|
};
|
|
80
93
|
returns: {
|
|
81
94
|
returnProducts: 'return-products';
|
|
82
95
|
};
|
|
96
|
+
exchanges: {
|
|
97
|
+
exchangeProducts: 'exchange-products';
|
|
98
|
+
};
|
|
99
|
+
fulfillments: {
|
|
100
|
+
items: 'fulfillment-items';
|
|
101
|
+
};
|
|
102
|
+
customers: {
|
|
103
|
+
orders: 'orders';
|
|
104
|
+
addresses: 'customer-addresses';
|
|
105
|
+
};
|
|
106
|
+
carts: {
|
|
107
|
+
items: 'cart-items';
|
|
108
|
+
};
|
|
83
109
|
authors: {
|
|
84
110
|
posts: 'posts';
|
|
85
111
|
};
|
|
@@ -111,7 +137,17 @@ interface Config {
|
|
|
111
137
|
'order-products': OrderProductsSelect<false> | OrderProductsSelect<true>;
|
|
112
138
|
returns: ReturnsSelect<false> | ReturnsSelect<true>;
|
|
113
139
|
'return-products': ReturnProductsSelect<false> | ReturnProductsSelect<true>;
|
|
140
|
+
exchanges: ExchangesSelect<false> | ExchangesSelect<true>;
|
|
141
|
+
'exchange-products': ExchangeProductsSelect<false> | ExchangeProductsSelect<true>;
|
|
142
|
+
fulfillments: FulfillmentsSelect<false> | FulfillmentsSelect<true>;
|
|
143
|
+
'fulfillment-items': FulfillmentItemsSelect<false> | FulfillmentItemsSelect<true>;
|
|
114
144
|
transactions: TransactionsSelect<false> | TransactionsSelect<true>;
|
|
145
|
+
customers: CustomersSelect<false> | CustomersSelect<true>;
|
|
146
|
+
'customer-addresses': CustomerAddressesSelect<false> | CustomerAddressesSelect<true>;
|
|
147
|
+
carts: CartsSelect<false> | CartsSelect<true>;
|
|
148
|
+
'cart-items': CartItemsSelect<false> | CartItemsSelect<true>;
|
|
149
|
+
discounts: DiscountsSelect<false> | DiscountsSelect<true>;
|
|
150
|
+
'shipping-policies': ShippingPoliciesSelect<false> | ShippingPoliciesSelect<true>;
|
|
115
151
|
posts: PostsSelect<false> | PostsSelect<true>;
|
|
116
152
|
'post-categories': PostCategoriesSelect<false> | PostCategoriesSelect<true>;
|
|
117
153
|
'post-tags': PostTagsSelect<false> | PostTagsSelect<true>;
|
|
@@ -139,7 +175,7 @@ interface Config {
|
|
|
139
175
|
globals: {};
|
|
140
176
|
globalsSelect: {};
|
|
141
177
|
locale: null;
|
|
142
|
-
user: User;
|
|
178
|
+
user: User | Customer;
|
|
143
179
|
jobs: {
|
|
144
180
|
tasks: unknown;
|
|
145
181
|
workflows: unknown;
|
|
@@ -163,6 +199,24 @@ interface UserAuthOperations {
|
|
|
163
199
|
password: string;
|
|
164
200
|
};
|
|
165
201
|
}
|
|
202
|
+
interface CustomerAuthOperations {
|
|
203
|
+
forgotPassword: {
|
|
204
|
+
email: string;
|
|
205
|
+
password: string;
|
|
206
|
+
};
|
|
207
|
+
login: {
|
|
208
|
+
email: string;
|
|
209
|
+
password: string;
|
|
210
|
+
};
|
|
211
|
+
registerFirstUser: {
|
|
212
|
+
email: string;
|
|
213
|
+
password: string;
|
|
214
|
+
};
|
|
215
|
+
unlock: {
|
|
216
|
+
email: string;
|
|
217
|
+
password: string;
|
|
218
|
+
};
|
|
219
|
+
}
|
|
166
220
|
/**
|
|
167
221
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
168
222
|
* via the `definition` "PlayerBlock".
|
|
@@ -204,7 +258,7 @@ interface CodeBlock {
|
|
|
204
258
|
*/
|
|
205
259
|
interface User {
|
|
206
260
|
id: number;
|
|
207
|
-
roles: ('super-admin' | 'user'
|
|
261
|
+
roles: ('super-admin' | 'user')[];
|
|
208
262
|
tenants?: {
|
|
209
263
|
tenant: number | Tenant;
|
|
210
264
|
roles: ('tenant-admin' | 'tenant-viewer')[];
|
|
@@ -239,7 +293,13 @@ interface User {
|
|
|
239
293
|
interface Tenant {
|
|
240
294
|
id: number;
|
|
241
295
|
name: string;
|
|
242
|
-
|
|
296
|
+
/**
|
|
297
|
+
* Allowed CORS origins for browser SDK requests. Empty = all origins allowed.
|
|
298
|
+
*/
|
|
299
|
+
cors?: {
|
|
300
|
+
origin: string;
|
|
301
|
+
id?: string | null;
|
|
302
|
+
}[] | null;
|
|
243
303
|
features?: ('ecommerce' | 'playlists' | 'links' | 'forms' | 'galleries' | 'posts' | 'documents')[] | null;
|
|
244
304
|
plan: 'free' | 'starter' | 'basic' | 'pro' | 'enterprise';
|
|
245
305
|
clientKey: string;
|
|
@@ -887,6 +947,10 @@ interface Product {
|
|
|
887
947
|
categories?: (number | ProductCategory)[] | null;
|
|
888
948
|
tags?: (number | ProductTag)[] | null;
|
|
889
949
|
brand?: (number | null) | Brand;
|
|
950
|
+
shippingPolicy?: (number | null) | ShippingPolicy;
|
|
951
|
+
metadata?: {
|
|
952
|
+
[k: string]: unknown;
|
|
953
|
+
} | unknown[] | string | number | boolean | null;
|
|
890
954
|
variants?: {
|
|
891
955
|
docs?: (number | ProductVariant)[];
|
|
892
956
|
hasNextPage?: boolean;
|
|
@@ -1024,6 +1088,38 @@ interface Brand {
|
|
|
1024
1088
|
updatedAt: string;
|
|
1025
1089
|
createdAt: string;
|
|
1026
1090
|
}
|
|
1091
|
+
/**
|
|
1092
|
+
* This interface was referenced by `Config`'s JSON-Schema
|
|
1093
|
+
* via the `definition` "shipping-policies".
|
|
1094
|
+
*/
|
|
1095
|
+
interface ShippingPolicy {
|
|
1096
|
+
id: number;
|
|
1097
|
+
_order?: string | null;
|
|
1098
|
+
tenant?: (number | null) | Tenant;
|
|
1099
|
+
/**
|
|
1100
|
+
* e.g. 기본 배송비, 대형 상품
|
|
1101
|
+
*/
|
|
1102
|
+
title: string;
|
|
1103
|
+
/**
|
|
1104
|
+
* Base shipping fee
|
|
1105
|
+
*/
|
|
1106
|
+
baseFee: number;
|
|
1107
|
+
/**
|
|
1108
|
+
* Free shipping above this amount (empty = no free shipping)
|
|
1109
|
+
*/
|
|
1110
|
+
freeShippingThreshold?: number | null;
|
|
1111
|
+
/**
|
|
1112
|
+
* Extra fee for Jeju island
|
|
1113
|
+
*/
|
|
1114
|
+
jejuExtraFee?: number | null;
|
|
1115
|
+
/**
|
|
1116
|
+
* Extra fee for remote islands
|
|
1117
|
+
*/
|
|
1118
|
+
islandExtraFee?: number | null;
|
|
1119
|
+
isDefault?: boolean | null;
|
|
1120
|
+
updatedAt: string;
|
|
1121
|
+
createdAt: string;
|
|
1122
|
+
}
|
|
1027
1123
|
/**
|
|
1028
1124
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
1029
1125
|
* via the `definition` "product-variants".
|
|
@@ -1043,8 +1139,19 @@ interface ProductVariant {
|
|
|
1043
1139
|
* Override price (uses product price if empty)
|
|
1044
1140
|
*/
|
|
1045
1141
|
price?: number | null;
|
|
1142
|
+
/**
|
|
1143
|
+
* Barcode (EAN, UPC, etc.)
|
|
1144
|
+
*/
|
|
1145
|
+
barcode?: string | null;
|
|
1146
|
+
/**
|
|
1147
|
+
* Weight in grams (g)
|
|
1148
|
+
*/
|
|
1149
|
+
weight?: number | null;
|
|
1046
1150
|
isSoldOut?: boolean | null;
|
|
1047
1151
|
images?: (number | ProductImage)[] | null;
|
|
1152
|
+
metadata?: {
|
|
1153
|
+
[k: string]: unknown;
|
|
1154
|
+
} | unknown[] | string | number | boolean | null;
|
|
1048
1155
|
productOptions?: {
|
|
1049
1156
|
docs?: (number | ProductOption)[];
|
|
1050
1157
|
hasNextPage?: boolean;
|
|
@@ -1071,6 +1178,10 @@ interface ProductOption {
|
|
|
1071
1178
|
*/
|
|
1072
1179
|
sku?: string | null;
|
|
1073
1180
|
stock: number;
|
|
1181
|
+
/**
|
|
1182
|
+
* Reserved by carts (available = stock - reservedStock)
|
|
1183
|
+
*/
|
|
1184
|
+
reservedStock?: number | null;
|
|
1074
1185
|
/**
|
|
1075
1186
|
* Price adjustment (add/subtract from base price)
|
|
1076
1187
|
*/
|
|
@@ -1087,14 +1198,18 @@ interface Order {
|
|
|
1087
1198
|
tenant?: (number | null) | Tenant;
|
|
1088
1199
|
orderNumber: string;
|
|
1089
1200
|
status: 'pending' | 'paid' | 'failed' | 'canceled' | 'preparing' | 'shipped' | 'delivered' | 'confirmed' | 'return_requested' | 'return_processing' | 'returned';
|
|
1090
|
-
customer?:
|
|
1201
|
+
customer?: (number | null) | Customer;
|
|
1202
|
+
/**
|
|
1203
|
+
* Customer info at the time of order
|
|
1204
|
+
*/
|
|
1205
|
+
customerSnapshot?: {
|
|
1091
1206
|
name?: string | null;
|
|
1092
1207
|
email?: string | null;
|
|
1093
1208
|
phone?: string | null;
|
|
1094
1209
|
};
|
|
1095
1210
|
totalAmount?: number | null;
|
|
1096
|
-
|
|
1097
|
-
|
|
1211
|
+
discountCode?: string | null;
|
|
1212
|
+
discountAmount?: number | null;
|
|
1098
1213
|
/**
|
|
1099
1214
|
* Internal notes (not visible to customers)
|
|
1100
1215
|
*/
|
|
@@ -1122,6 +1237,78 @@ interface Order {
|
|
|
1122
1237
|
hasNextPage?: boolean;
|
|
1123
1238
|
totalDocs?: number;
|
|
1124
1239
|
};
|
|
1240
|
+
exchanges?: {
|
|
1241
|
+
docs?: (number | Exchange)[];
|
|
1242
|
+
hasNextPage?: boolean;
|
|
1243
|
+
totalDocs?: number;
|
|
1244
|
+
};
|
|
1245
|
+
fulfillments?: {
|
|
1246
|
+
docs?: (number | Fulfillment)[];
|
|
1247
|
+
hasNextPage?: boolean;
|
|
1248
|
+
totalDocs?: number;
|
|
1249
|
+
};
|
|
1250
|
+
updatedAt: string;
|
|
1251
|
+
createdAt: string;
|
|
1252
|
+
}
|
|
1253
|
+
/**
|
|
1254
|
+
* This interface was referenced by `Config`'s JSON-Schema
|
|
1255
|
+
* via the `definition` "customers".
|
|
1256
|
+
*/
|
|
1257
|
+
interface Customer {
|
|
1258
|
+
id: number;
|
|
1259
|
+
tenant?: (number | null) | Tenant;
|
|
1260
|
+
name: string;
|
|
1261
|
+
email?: string | null;
|
|
1262
|
+
phone?: string | null;
|
|
1263
|
+
hashedPassword?: string | null;
|
|
1264
|
+
salt?: string | null;
|
|
1265
|
+
isGuest?: boolean | null;
|
|
1266
|
+
isVerified?: boolean | null;
|
|
1267
|
+
verificationToken?: string | null;
|
|
1268
|
+
resetPasswordToken?: string | null;
|
|
1269
|
+
resetPasswordExpiry?: string | null;
|
|
1270
|
+
loginAttempts?: number | null;
|
|
1271
|
+
lockedUntil?: string | null;
|
|
1272
|
+
/**
|
|
1273
|
+
* Internal notes (not visible to customers)
|
|
1274
|
+
*/
|
|
1275
|
+
note?: string | null;
|
|
1276
|
+
metadata?: {
|
|
1277
|
+
[k: string]: unknown;
|
|
1278
|
+
} | unknown[] | string | number | boolean | null;
|
|
1279
|
+
orders?: {
|
|
1280
|
+
docs?: (number | Order)[];
|
|
1281
|
+
hasNextPage?: boolean;
|
|
1282
|
+
totalDocs?: number;
|
|
1283
|
+
};
|
|
1284
|
+
addresses?: {
|
|
1285
|
+
docs?: (number | CustomerAddress)[];
|
|
1286
|
+
hasNextPage?: boolean;
|
|
1287
|
+
totalDocs?: number;
|
|
1288
|
+
};
|
|
1289
|
+
updatedAt: string;
|
|
1290
|
+
createdAt: string;
|
|
1291
|
+
collection: 'customers';
|
|
1292
|
+
}
|
|
1293
|
+
/**
|
|
1294
|
+
* This interface was referenced by `Config`'s JSON-Schema
|
|
1295
|
+
* via the `definition` "customer-addresses".
|
|
1296
|
+
*/
|
|
1297
|
+
interface CustomerAddress {
|
|
1298
|
+
id: number;
|
|
1299
|
+
tenant?: (number | null) | Tenant;
|
|
1300
|
+
customer: number | Customer;
|
|
1301
|
+
label?: string | null;
|
|
1302
|
+
recipientName?: string | null;
|
|
1303
|
+
phone?: string | null;
|
|
1304
|
+
postalCode?: string | null;
|
|
1305
|
+
address1?: string | null;
|
|
1306
|
+
address2?: string | null;
|
|
1307
|
+
isDefault?: boolean | null;
|
|
1308
|
+
/**
|
|
1309
|
+
* Default delivery message
|
|
1310
|
+
*/
|
|
1311
|
+
deliveryMessage?: string | null;
|
|
1125
1312
|
updatedAt: string;
|
|
1126
1313
|
createdAt: string;
|
|
1127
1314
|
}
|
|
@@ -1207,6 +1394,190 @@ interface ReturnProduct {
|
|
|
1207
1394
|
updatedAt: string;
|
|
1208
1395
|
createdAt: string;
|
|
1209
1396
|
}
|
|
1397
|
+
/**
|
|
1398
|
+
* This interface was referenced by `Config`'s JSON-Schema
|
|
1399
|
+
* via the `definition` "exchanges".
|
|
1400
|
+
*/
|
|
1401
|
+
interface Exchange {
|
|
1402
|
+
id: number;
|
|
1403
|
+
tenant?: (number | null) | Tenant;
|
|
1404
|
+
order: number | Order;
|
|
1405
|
+
status: 'requested' | 'processing' | 'shipped' | 'completed' | 'rejected';
|
|
1406
|
+
reason?: ('wrong_size' | 'wrong_color' | 'defective' | 'other') | null;
|
|
1407
|
+
/**
|
|
1408
|
+
* Detailed exchange reason
|
|
1409
|
+
*/
|
|
1410
|
+
reasonDetail?: string | null;
|
|
1411
|
+
shippingFee?: number | null;
|
|
1412
|
+
exchangeProducts?: {
|
|
1413
|
+
docs?: (number | ExchangeProduct)[];
|
|
1414
|
+
hasNextPage?: boolean;
|
|
1415
|
+
totalDocs?: number;
|
|
1416
|
+
};
|
|
1417
|
+
updatedAt: string;
|
|
1418
|
+
createdAt: string;
|
|
1419
|
+
}
|
|
1420
|
+
/**
|
|
1421
|
+
* This interface was referenced by `Config`'s JSON-Schema
|
|
1422
|
+
* via the `definition` "exchange-products".
|
|
1423
|
+
*/
|
|
1424
|
+
interface ExchangeProduct {
|
|
1425
|
+
id: number;
|
|
1426
|
+
tenant?: (number | null) | Tenant;
|
|
1427
|
+
exchange: number | Exchange;
|
|
1428
|
+
order: number | Order;
|
|
1429
|
+
orderProduct: number | OrderProduct;
|
|
1430
|
+
product: number | Product;
|
|
1431
|
+
variant?: (number | null) | ProductVariant;
|
|
1432
|
+
option?: (number | null) | ProductOption;
|
|
1433
|
+
quantity: number;
|
|
1434
|
+
/**
|
|
1435
|
+
* New variant to exchange to
|
|
1436
|
+
*/
|
|
1437
|
+
newVariant?: (number | null) | ProductVariant;
|
|
1438
|
+
/**
|
|
1439
|
+
* New option to exchange to
|
|
1440
|
+
*/
|
|
1441
|
+
newOption?: (number | null) | ProductOption;
|
|
1442
|
+
title?: string | null;
|
|
1443
|
+
updatedAt: string;
|
|
1444
|
+
createdAt: string;
|
|
1445
|
+
}
|
|
1446
|
+
/**
|
|
1447
|
+
* This interface was referenced by `Config`'s JSON-Schema
|
|
1448
|
+
* via the `definition` "fulfillments".
|
|
1449
|
+
*/
|
|
1450
|
+
interface Fulfillment {
|
|
1451
|
+
id: number;
|
|
1452
|
+
tenant?: (number | null) | Tenant;
|
|
1453
|
+
order: number | Order;
|
|
1454
|
+
status: 'pending' | 'packed' | 'shipped' | 'delivered' | 'failed';
|
|
1455
|
+
carrier?: ('cj' | 'hanjin' | 'lotte' | 'epost' | 'logen' | 'other') | null;
|
|
1456
|
+
trackingNumber?: string | null;
|
|
1457
|
+
shippedAt?: string | null;
|
|
1458
|
+
deliveredAt?: string | null;
|
|
1459
|
+
items?: {
|
|
1460
|
+
docs?: (number | FulfillmentItem)[];
|
|
1461
|
+
hasNextPage?: boolean;
|
|
1462
|
+
totalDocs?: number;
|
|
1463
|
+
};
|
|
1464
|
+
updatedAt: string;
|
|
1465
|
+
createdAt: string;
|
|
1466
|
+
}
|
|
1467
|
+
/**
|
|
1468
|
+
* This interface was referenced by `Config`'s JSON-Schema
|
|
1469
|
+
* via the `definition` "fulfillment-items".
|
|
1470
|
+
*/
|
|
1471
|
+
interface FulfillmentItem {
|
|
1472
|
+
id: number;
|
|
1473
|
+
tenant?: (number | null) | Tenant;
|
|
1474
|
+
fulfillment: number | Fulfillment;
|
|
1475
|
+
orderProduct: number | OrderProduct;
|
|
1476
|
+
quantity: number;
|
|
1477
|
+
updatedAt: string;
|
|
1478
|
+
createdAt: string;
|
|
1479
|
+
}
|
|
1480
|
+
/**
|
|
1481
|
+
* This interface was referenced by `Config`'s JSON-Schema
|
|
1482
|
+
* via the `definition` "carts".
|
|
1483
|
+
*/
|
|
1484
|
+
interface Cart {
|
|
1485
|
+
id: number;
|
|
1486
|
+
tenant?: (number | null) | Tenant;
|
|
1487
|
+
customer?: (number | null) | Customer;
|
|
1488
|
+
status: 'active' | 'completed' | 'abandoned';
|
|
1489
|
+
shippingAddress?: {
|
|
1490
|
+
recipientName?: string | null;
|
|
1491
|
+
phone?: string | null;
|
|
1492
|
+
postalCode?: string | null;
|
|
1493
|
+
address1?: string | null;
|
|
1494
|
+
address2?: string | null;
|
|
1495
|
+
deliveryMessage?: string | null;
|
|
1496
|
+
};
|
|
1497
|
+
discountCode?: string | null;
|
|
1498
|
+
itemsTotal?: number | null;
|
|
1499
|
+
shippingFee?: number | null;
|
|
1500
|
+
discountAmount?: number | null;
|
|
1501
|
+
totalAmount?: number | null;
|
|
1502
|
+
items?: {
|
|
1503
|
+
docs?: (number | CartItem)[];
|
|
1504
|
+
hasNextPage?: boolean;
|
|
1505
|
+
totalDocs?: number;
|
|
1506
|
+
};
|
|
1507
|
+
expiresAt?: string | null;
|
|
1508
|
+
updatedAt: string;
|
|
1509
|
+
createdAt: string;
|
|
1510
|
+
}
|
|
1511
|
+
/**
|
|
1512
|
+
* This interface was referenced by `Config`'s JSON-Schema
|
|
1513
|
+
* via the `definition` "cart-items".
|
|
1514
|
+
*/
|
|
1515
|
+
interface CartItem {
|
|
1516
|
+
id: number;
|
|
1517
|
+
tenant?: (number | null) | Tenant;
|
|
1518
|
+
cart: number | Cart;
|
|
1519
|
+
product: number | Product;
|
|
1520
|
+
variant?: (number | null) | ProductVariant;
|
|
1521
|
+
option?: (number | null) | ProductOption;
|
|
1522
|
+
quantity: number;
|
|
1523
|
+
/**
|
|
1524
|
+
* Price at the time of adding to cart
|
|
1525
|
+
*/
|
|
1526
|
+
unitPrice: number;
|
|
1527
|
+
updatedAt: string;
|
|
1528
|
+
createdAt: string;
|
|
1529
|
+
}
|
|
1530
|
+
/**
|
|
1531
|
+
* This interface was referenced by `Config`'s JSON-Schema
|
|
1532
|
+
* via the `definition` "discounts".
|
|
1533
|
+
*/
|
|
1534
|
+
interface Discount {
|
|
1535
|
+
id: number;
|
|
1536
|
+
tenant?: (number | null) | Tenant;
|
|
1537
|
+
/**
|
|
1538
|
+
* Unique discount code
|
|
1539
|
+
*/
|
|
1540
|
+
code: string;
|
|
1541
|
+
/**
|
|
1542
|
+
* Internal name (e.g. 신규가입 10% 할인)
|
|
1543
|
+
*/
|
|
1544
|
+
title: string;
|
|
1545
|
+
type: 'percentage' | 'fixed_amount' | 'free_shipping';
|
|
1546
|
+
/**
|
|
1547
|
+
* Discount rate (%) or fixed amount
|
|
1548
|
+
*/
|
|
1549
|
+
value: number;
|
|
1550
|
+
/**
|
|
1551
|
+
* Minimum order amount to apply
|
|
1552
|
+
*/
|
|
1553
|
+
minOrderAmount?: number | null;
|
|
1554
|
+
/**
|
|
1555
|
+
* Max discount for percentage type
|
|
1556
|
+
*/
|
|
1557
|
+
maxDiscountAmount?: number | null;
|
|
1558
|
+
startsAt?: string | null;
|
|
1559
|
+
endsAt?: string | null;
|
|
1560
|
+
/**
|
|
1561
|
+
* Total usage limit (empty = unlimited)
|
|
1562
|
+
*/
|
|
1563
|
+
usageLimit?: number | null;
|
|
1564
|
+
usageCount?: number | null;
|
|
1565
|
+
/**
|
|
1566
|
+
* Usage limit per customer (empty = unlimited)
|
|
1567
|
+
*/
|
|
1568
|
+
perCustomerLimit?: number | null;
|
|
1569
|
+
isActive?: boolean | null;
|
|
1570
|
+
/**
|
|
1571
|
+
* Leave empty to apply to all products
|
|
1572
|
+
*/
|
|
1573
|
+
applicableProducts?: (number | Product)[] | null;
|
|
1574
|
+
/**
|
|
1575
|
+
* Leave empty to apply to all categories
|
|
1576
|
+
*/
|
|
1577
|
+
applicableCategories?: (number | ProductCategory)[] | null;
|
|
1578
|
+
updatedAt: string;
|
|
1579
|
+
createdAt: string;
|
|
1580
|
+
}
|
|
1210
1581
|
/**
|
|
1211
1582
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
1212
1583
|
* via the `definition` "posts".
|
|
@@ -1930,9 +2301,39 @@ interface PayloadLockedDocument {
|
|
|
1930
2301
|
} | null) | ({
|
|
1931
2302
|
relationTo: 'return-products';
|
|
1932
2303
|
value: number | ReturnProduct;
|
|
2304
|
+
} | null) | ({
|
|
2305
|
+
relationTo: 'exchanges';
|
|
2306
|
+
value: number | Exchange;
|
|
2307
|
+
} | null) | ({
|
|
2308
|
+
relationTo: 'exchange-products';
|
|
2309
|
+
value: number | ExchangeProduct;
|
|
2310
|
+
} | null) | ({
|
|
2311
|
+
relationTo: 'fulfillments';
|
|
2312
|
+
value: number | Fulfillment;
|
|
2313
|
+
} | null) | ({
|
|
2314
|
+
relationTo: 'fulfillment-items';
|
|
2315
|
+
value: number | FulfillmentItem;
|
|
1933
2316
|
} | null) | ({
|
|
1934
2317
|
relationTo: 'transactions';
|
|
1935
2318
|
value: number | Transaction;
|
|
2319
|
+
} | null) | ({
|
|
2320
|
+
relationTo: 'customers';
|
|
2321
|
+
value: number | Customer;
|
|
2322
|
+
} | null) | ({
|
|
2323
|
+
relationTo: 'customer-addresses';
|
|
2324
|
+
value: number | CustomerAddress;
|
|
2325
|
+
} | null) | ({
|
|
2326
|
+
relationTo: 'carts';
|
|
2327
|
+
value: number | Cart;
|
|
2328
|
+
} | null) | ({
|
|
2329
|
+
relationTo: 'cart-items';
|
|
2330
|
+
value: number | CartItem;
|
|
2331
|
+
} | null) | ({
|
|
2332
|
+
relationTo: 'discounts';
|
|
2333
|
+
value: number | Discount;
|
|
2334
|
+
} | null) | ({
|
|
2335
|
+
relationTo: 'shipping-policies';
|
|
2336
|
+
value: number | ShippingPolicy;
|
|
1936
2337
|
} | null) | ({
|
|
1937
2338
|
relationTo: 'posts';
|
|
1938
2339
|
value: number | Post;
|
|
@@ -1983,6 +2384,9 @@ interface PayloadLockedDocument {
|
|
|
1983
2384
|
user: {
|
|
1984
2385
|
relationTo: 'users';
|
|
1985
2386
|
value: number | User;
|
|
2387
|
+
} | {
|
|
2388
|
+
relationTo: 'customers';
|
|
2389
|
+
value: number | Customer;
|
|
1986
2390
|
};
|
|
1987
2391
|
updatedAt: string;
|
|
1988
2392
|
createdAt: string;
|
|
@@ -1996,6 +2400,9 @@ interface PayloadPreference {
|
|
|
1996
2400
|
user: {
|
|
1997
2401
|
relationTo: 'users';
|
|
1998
2402
|
value: number | User;
|
|
2403
|
+
} | {
|
|
2404
|
+
relationTo: 'customers';
|
|
2405
|
+
value: number | Customer;
|
|
1999
2406
|
};
|
|
2000
2407
|
key?: string | null;
|
|
2001
2408
|
value?: {
|
|
@@ -2105,7 +2512,10 @@ interface EmailLogsSelect<T extends boolean = true> {
|
|
|
2105
2512
|
*/
|
|
2106
2513
|
interface TenantsSelect<T extends boolean = true> {
|
|
2107
2514
|
name?: T;
|
|
2108
|
-
|
|
2515
|
+
cors?: T | {
|
|
2516
|
+
origin?: T;
|
|
2517
|
+
id?: T;
|
|
2518
|
+
};
|
|
2109
2519
|
features?: T;
|
|
2110
2520
|
plan?: T;
|
|
2111
2521
|
clientKey?: T;
|
|
@@ -2404,6 +2814,8 @@ interface ProductsSelect<T extends boolean = true> {
|
|
|
2404
2814
|
categories?: T;
|
|
2405
2815
|
tags?: T;
|
|
2406
2816
|
brand?: T;
|
|
2817
|
+
shippingPolicy?: T;
|
|
2818
|
+
metadata?: T;
|
|
2407
2819
|
variants?: T;
|
|
2408
2820
|
options?: T;
|
|
2409
2821
|
updatedAt?: T;
|
|
@@ -2421,8 +2833,11 @@ interface ProductVariantsSelect<T extends boolean = true> {
|
|
|
2421
2833
|
title?: T;
|
|
2422
2834
|
sku?: T;
|
|
2423
2835
|
price?: T;
|
|
2836
|
+
barcode?: T;
|
|
2837
|
+
weight?: T;
|
|
2424
2838
|
isSoldOut?: T;
|
|
2425
2839
|
images?: T;
|
|
2840
|
+
metadata?: T;
|
|
2426
2841
|
productOptions?: T;
|
|
2427
2842
|
updatedAt?: T;
|
|
2428
2843
|
createdAt?: T;
|
|
@@ -2441,6 +2856,7 @@ interface ProductOptionsSelect<T extends boolean = true> {
|
|
|
2441
2856
|
title?: T;
|
|
2442
2857
|
sku?: T;
|
|
2443
2858
|
stock?: T;
|
|
2859
|
+
reservedStock?: T;
|
|
2444
2860
|
priceAdjustment?: T;
|
|
2445
2861
|
updatedAt?: T;
|
|
2446
2862
|
createdAt?: T;
|
|
@@ -2639,14 +3055,15 @@ interface OrdersSelect<T extends boolean = true> {
|
|
|
2639
3055
|
tenant?: T;
|
|
2640
3056
|
orderNumber?: T;
|
|
2641
3057
|
status?: T;
|
|
2642
|
-
customer?: T
|
|
3058
|
+
customer?: T;
|
|
3059
|
+
customerSnapshot?: T | {
|
|
2643
3060
|
name?: T;
|
|
2644
3061
|
email?: T;
|
|
2645
3062
|
phone?: T;
|
|
2646
3063
|
};
|
|
2647
3064
|
totalAmount?: T;
|
|
2648
|
-
|
|
2649
|
-
|
|
3065
|
+
discountCode?: T;
|
|
3066
|
+
discountAmount?: T;
|
|
2650
3067
|
notes?: T;
|
|
2651
3068
|
shippingAddress?: T | {
|
|
2652
3069
|
recipientName?: T;
|
|
@@ -2659,6 +3076,8 @@ interface OrdersSelect<T extends boolean = true> {
|
|
|
2659
3076
|
products?: T;
|
|
2660
3077
|
transactions?: T;
|
|
2661
3078
|
returns?: T;
|
|
3079
|
+
exchanges?: T;
|
|
3080
|
+
fulfillments?: T;
|
|
2662
3081
|
updatedAt?: T;
|
|
2663
3082
|
createdAt?: T;
|
|
2664
3083
|
}
|
|
@@ -2712,6 +3131,68 @@ interface ReturnProductsSelect<T extends boolean = true> {
|
|
|
2712
3131
|
updatedAt?: T;
|
|
2713
3132
|
createdAt?: T;
|
|
2714
3133
|
}
|
|
3134
|
+
/**
|
|
3135
|
+
* This interface was referenced by `Config`'s JSON-Schema
|
|
3136
|
+
* via the `definition` "exchanges_select".
|
|
3137
|
+
*/
|
|
3138
|
+
interface ExchangesSelect<T extends boolean = true> {
|
|
3139
|
+
tenant?: T;
|
|
3140
|
+
order?: T;
|
|
3141
|
+
status?: T;
|
|
3142
|
+
reason?: T;
|
|
3143
|
+
reasonDetail?: T;
|
|
3144
|
+
shippingFee?: T;
|
|
3145
|
+
exchangeProducts?: T;
|
|
3146
|
+
updatedAt?: T;
|
|
3147
|
+
createdAt?: T;
|
|
3148
|
+
}
|
|
3149
|
+
/**
|
|
3150
|
+
* This interface was referenced by `Config`'s JSON-Schema
|
|
3151
|
+
* via the `definition` "exchange-products_select".
|
|
3152
|
+
*/
|
|
3153
|
+
interface ExchangeProductsSelect<T extends boolean = true> {
|
|
3154
|
+
tenant?: T;
|
|
3155
|
+
exchange?: T;
|
|
3156
|
+
order?: T;
|
|
3157
|
+
orderProduct?: T;
|
|
3158
|
+
product?: T;
|
|
3159
|
+
variant?: T;
|
|
3160
|
+
option?: T;
|
|
3161
|
+
quantity?: T;
|
|
3162
|
+
newVariant?: T;
|
|
3163
|
+
newOption?: T;
|
|
3164
|
+
title?: T;
|
|
3165
|
+
updatedAt?: T;
|
|
3166
|
+
createdAt?: T;
|
|
3167
|
+
}
|
|
3168
|
+
/**
|
|
3169
|
+
* This interface was referenced by `Config`'s JSON-Schema
|
|
3170
|
+
* via the `definition` "fulfillments_select".
|
|
3171
|
+
*/
|
|
3172
|
+
interface FulfillmentsSelect<T extends boolean = true> {
|
|
3173
|
+
tenant?: T;
|
|
3174
|
+
order?: T;
|
|
3175
|
+
status?: T;
|
|
3176
|
+
carrier?: T;
|
|
3177
|
+
trackingNumber?: T;
|
|
3178
|
+
shippedAt?: T;
|
|
3179
|
+
deliveredAt?: T;
|
|
3180
|
+
items?: T;
|
|
3181
|
+
updatedAt?: T;
|
|
3182
|
+
createdAt?: T;
|
|
3183
|
+
}
|
|
3184
|
+
/**
|
|
3185
|
+
* This interface was referenced by `Config`'s JSON-Schema
|
|
3186
|
+
* via the `definition` "fulfillment-items_select".
|
|
3187
|
+
*/
|
|
3188
|
+
interface FulfillmentItemsSelect<T extends boolean = true> {
|
|
3189
|
+
tenant?: T;
|
|
3190
|
+
fulfillment?: T;
|
|
3191
|
+
orderProduct?: T;
|
|
3192
|
+
quantity?: T;
|
|
3193
|
+
updatedAt?: T;
|
|
3194
|
+
createdAt?: T;
|
|
3195
|
+
}
|
|
2715
3196
|
/**
|
|
2716
3197
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
2717
3198
|
* via the `definition` "transactions_select".
|
|
@@ -2727,6 +3208,129 @@ interface TransactionsSelect<T extends boolean = true> {
|
|
|
2727
3208
|
updatedAt?: T;
|
|
2728
3209
|
createdAt?: T;
|
|
2729
3210
|
}
|
|
3211
|
+
/**
|
|
3212
|
+
* This interface was referenced by `Config`'s JSON-Schema
|
|
3213
|
+
* via the `definition` "customers_select".
|
|
3214
|
+
*/
|
|
3215
|
+
interface CustomersSelect<T extends boolean = true> {
|
|
3216
|
+
tenant?: T;
|
|
3217
|
+
name?: T;
|
|
3218
|
+
email?: T;
|
|
3219
|
+
phone?: T;
|
|
3220
|
+
hashedPassword?: T;
|
|
3221
|
+
salt?: T;
|
|
3222
|
+
isGuest?: T;
|
|
3223
|
+
isVerified?: T;
|
|
3224
|
+
verificationToken?: T;
|
|
3225
|
+
resetPasswordToken?: T;
|
|
3226
|
+
resetPasswordExpiry?: T;
|
|
3227
|
+
loginAttempts?: T;
|
|
3228
|
+
lockedUntil?: T;
|
|
3229
|
+
note?: T;
|
|
3230
|
+
metadata?: T;
|
|
3231
|
+
orders?: T;
|
|
3232
|
+
addresses?: T;
|
|
3233
|
+
updatedAt?: T;
|
|
3234
|
+
createdAt?: T;
|
|
3235
|
+
}
|
|
3236
|
+
/**
|
|
3237
|
+
* This interface was referenced by `Config`'s JSON-Schema
|
|
3238
|
+
* via the `definition` "customer-addresses_select".
|
|
3239
|
+
*/
|
|
3240
|
+
interface CustomerAddressesSelect<T extends boolean = true> {
|
|
3241
|
+
tenant?: T;
|
|
3242
|
+
customer?: T;
|
|
3243
|
+
label?: T;
|
|
3244
|
+
recipientName?: T;
|
|
3245
|
+
phone?: T;
|
|
3246
|
+
postalCode?: T;
|
|
3247
|
+
address1?: T;
|
|
3248
|
+
address2?: T;
|
|
3249
|
+
isDefault?: T;
|
|
3250
|
+
deliveryMessage?: T;
|
|
3251
|
+
updatedAt?: T;
|
|
3252
|
+
createdAt?: T;
|
|
3253
|
+
}
|
|
3254
|
+
/**
|
|
3255
|
+
* This interface was referenced by `Config`'s JSON-Schema
|
|
3256
|
+
* via the `definition` "carts_select".
|
|
3257
|
+
*/
|
|
3258
|
+
interface CartsSelect<T extends boolean = true> {
|
|
3259
|
+
tenant?: T;
|
|
3260
|
+
customer?: T;
|
|
3261
|
+
status?: T;
|
|
3262
|
+
shippingAddress?: T | {
|
|
3263
|
+
recipientName?: T;
|
|
3264
|
+
phone?: T;
|
|
3265
|
+
postalCode?: T;
|
|
3266
|
+
address1?: T;
|
|
3267
|
+
address2?: T;
|
|
3268
|
+
deliveryMessage?: T;
|
|
3269
|
+
};
|
|
3270
|
+
discountCode?: T;
|
|
3271
|
+
itemsTotal?: T;
|
|
3272
|
+
shippingFee?: T;
|
|
3273
|
+
discountAmount?: T;
|
|
3274
|
+
totalAmount?: T;
|
|
3275
|
+
items?: T;
|
|
3276
|
+
expiresAt?: T;
|
|
3277
|
+
updatedAt?: T;
|
|
3278
|
+
createdAt?: T;
|
|
3279
|
+
}
|
|
3280
|
+
/**
|
|
3281
|
+
* This interface was referenced by `Config`'s JSON-Schema
|
|
3282
|
+
* via the `definition` "cart-items_select".
|
|
3283
|
+
*/
|
|
3284
|
+
interface CartItemsSelect<T extends boolean = true> {
|
|
3285
|
+
tenant?: T;
|
|
3286
|
+
cart?: T;
|
|
3287
|
+
product?: T;
|
|
3288
|
+
variant?: T;
|
|
3289
|
+
option?: T;
|
|
3290
|
+
quantity?: T;
|
|
3291
|
+
unitPrice?: T;
|
|
3292
|
+
updatedAt?: T;
|
|
3293
|
+
createdAt?: T;
|
|
3294
|
+
}
|
|
3295
|
+
/**
|
|
3296
|
+
* This interface was referenced by `Config`'s JSON-Schema
|
|
3297
|
+
* via the `definition` "discounts_select".
|
|
3298
|
+
*/
|
|
3299
|
+
interface DiscountsSelect<T extends boolean = true> {
|
|
3300
|
+
tenant?: T;
|
|
3301
|
+
code?: T;
|
|
3302
|
+
title?: T;
|
|
3303
|
+
type?: T;
|
|
3304
|
+
value?: T;
|
|
3305
|
+
minOrderAmount?: T;
|
|
3306
|
+
maxDiscountAmount?: T;
|
|
3307
|
+
startsAt?: T;
|
|
3308
|
+
endsAt?: T;
|
|
3309
|
+
usageLimit?: T;
|
|
3310
|
+
usageCount?: T;
|
|
3311
|
+
perCustomerLimit?: T;
|
|
3312
|
+
isActive?: T;
|
|
3313
|
+
applicableProducts?: T;
|
|
3314
|
+
applicableCategories?: T;
|
|
3315
|
+
updatedAt?: T;
|
|
3316
|
+
createdAt?: T;
|
|
3317
|
+
}
|
|
3318
|
+
/**
|
|
3319
|
+
* This interface was referenced by `Config`'s JSON-Schema
|
|
3320
|
+
* via the `definition` "shipping-policies_select".
|
|
3321
|
+
*/
|
|
3322
|
+
interface ShippingPoliciesSelect<T extends boolean = true> {
|
|
3323
|
+
_order?: T;
|
|
3324
|
+
tenant?: T;
|
|
3325
|
+
title?: T;
|
|
3326
|
+
baseFee?: T;
|
|
3327
|
+
freeShippingThreshold?: T;
|
|
3328
|
+
jejuExtraFee?: T;
|
|
3329
|
+
islandExtraFee?: T;
|
|
3330
|
+
isDefault?: T;
|
|
3331
|
+
updatedAt?: T;
|
|
3332
|
+
createdAt?: T;
|
|
3333
|
+
}
|
|
2730
3334
|
/**
|
|
2731
3335
|
* This interface was referenced by `Config`'s JSON-Schema
|
|
2732
3336
|
* via the `definition` "posts_select".
|
|
@@ -3258,4 +3862,4 @@ declare module 'payload' {
|
|
|
3258
3862
|
}
|
|
3259
3863
|
}
|
|
3260
3864
|
|
|
3261
|
-
export type {
|
|
3865
|
+
export type { GalleryImage as $, Audience as A, BrandLogo as B, CartItem as C, Cart as D, EmailLog as E, Fulfillment as F, Discount as G, Post as H, IframeBlock as I, PostImage as J, Author as K, PostCategory as L, Media as M, PostTag as N, Order as O, ProductOption as P, Document as Q, Return as R, SupportedTimezones as S, Transaction as T, UserAuthOperations as U, DocumentCategory as V, DocumentImage as W, Playlist as X, PlaylistImage as Y, Music as Z, Gallery as _, OrderProduct as a, Form as a0, FormSubmission as a1, PayloadKv as a2, PayloadLockedDocument as a3, PayloadPreference as a4, PayloadMigration as a5, UsersSelect as a6, MediaSelect as a7, AudiencesSelect as a8, EmailLogsSelect as a9, CartsSelect as aA, CartItemsSelect as aB, DiscountsSelect as aC, ShippingPoliciesSelect as aD, PostsSelect as aE, PostCategoriesSelect as aF, PostTagsSelect as aG, PostImagesSelect as aH, AuthorsSelect as aI, DocumentsSelect as aJ, DocumentCategoriesSelect as aK, DocumentImagesSelect as aL, PlaylistsSelect as aM, PlaylistImagesSelect as aN, MusicsSelect as aO, GalleriesSelect as aP, GalleryImagesSelect as aQ, FormsSelect as aR, FormSubmissionsSelect as aS, PayloadKvSelect as aT, PayloadLockedDocumentsSelect as aU, PayloadPreferencesSelect as aV, PayloadMigrationsSelect as aW, Auth as aX, TenantsSelect as aa, TenantMetadataSelect as ab, TenantLogosSelect as ac, TenantOgImagesSelect as ad, ApiUsageSelect as ae, SubscriptionsSelect as af, BillingHistorySelect as ag, ProductsSelect as ah, ProductVariantsSelect as ai, ProductOptionsSelect as aj, ProductCategoriesSelect as ak, ProductTagsSelect as al, ProductImagesSelect as am, BrandsSelect as an, BrandLogosSelect as ao, OrdersSelect as ap, OrderProductsSelect as aq, ReturnsSelect as ar, ReturnProductsSelect as as, ExchangesSelect as at, ExchangeProductsSelect as au, FulfillmentsSelect as av, FulfillmentItemsSelect as aw, TransactionsSelect as ax, CustomersSelect as ay, CustomerAddressesSelect as az, Config as b, CustomerAuthOperations as c, PlayerBlock as d, CodeBlock as e, User as f, Tenant as g, TenantMetadatum as h, TenantOgImage as i, TenantLogo as j, ApiUsage as k, Subscription as l, BillingHistory as m, Product as n, ProductImage as o, ProductCategory as p, ProductTag as q, Brand as r, ShippingPolicy as s, ProductVariant as t, Customer as u, CustomerAddress as v, ReturnProduct as w, Exchange as x, ExchangeProduct as y, FulfillmentItem as z };
|