@commercengine/storefront-sdk 0.3.0 → 0.3.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/dist/index.d.ts +70 -38
- package/dist/index.js +146 -127
- package/dist/lib/auth.d.ts +105 -194
- package/dist/lib/auth.js +222 -651
- package/dist/lib/cart.d.ts +78 -80
- package/dist/lib/cart.js +183 -221
- package/dist/lib/catalog.d.ts +36 -69
- package/dist/lib/catalog.js +109 -118
- package/dist/lib/client.d.ts +38 -43
- package/dist/lib/client.js +88 -145
- package/dist/lib/customer.d.ts +91 -0
- package/dist/lib/customer.js +156 -0
- package/dist/lib/helper.d.ts +28 -0
- package/dist/lib/helper.js +43 -0
- package/dist/lib/jwt-utils.d.ts +75 -0
- package/dist/lib/jwt-utils.js +84 -0
- package/dist/lib/middleware.d.ts +83 -0
- package/dist/lib/middleware.js +257 -0
- package/dist/lib/order.d.ts +73 -0
- package/dist/lib/order.js +128 -0
- package/dist/lib/shipping.d.ts +15 -0
- package/dist/lib/shipping.js +20 -0
- package/dist/types/storefront-api-types.d.ts +359 -0
- package/dist/types/storefront-api-types.js +3 -0
- package/dist/types/storefront.d.ts +7976 -7369
- package/package.json +21 -12
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ApiResult, ShippingMethodsBody, ShippingMethodsContent } from "../types/storefront-api-types";
|
|
2
|
+
import { StorefrontAPIClient, StorefrontAPIConfig } from "./client";
|
|
3
|
+
/**
|
|
4
|
+
* Client for interacting with shipping endpoints
|
|
5
|
+
*/
|
|
6
|
+
export declare class ShippingClient extends StorefrontAPIClient {
|
|
7
|
+
constructor(config: StorefrontAPIConfig);
|
|
8
|
+
/**
|
|
9
|
+
* Get shipping options for an order
|
|
10
|
+
*
|
|
11
|
+
* @param body - Shipping methods body
|
|
12
|
+
* @returns Promise with shipping options
|
|
13
|
+
*/
|
|
14
|
+
getShippingMethods(body: ShippingMethodsBody): Promise<ApiResult<ShippingMethodsContent>>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { StorefrontAPIClient } from "./client";
|
|
2
|
+
/**
|
|
3
|
+
* Client for interacting with shipping endpoints
|
|
4
|
+
*/
|
|
5
|
+
export class ShippingClient extends StorefrontAPIClient {
|
|
6
|
+
constructor(config) {
|
|
7
|
+
super(config);
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Get shipping options for an order
|
|
11
|
+
*
|
|
12
|
+
* @param body - Shipping methods body
|
|
13
|
+
* @returns Promise with shipping options
|
|
14
|
+
*/
|
|
15
|
+
async getShippingMethods(body) {
|
|
16
|
+
return this.executeRequest(() => this.client.POST("/shipping/shipping-methods", {
|
|
17
|
+
body: body,
|
|
18
|
+
}));
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
import type { paths } from './storefront';
|
|
2
|
+
export type ApiResult<T> = {
|
|
3
|
+
data: {
|
|
4
|
+
message?: string;
|
|
5
|
+
success?: boolean;
|
|
6
|
+
content?: T;
|
|
7
|
+
};
|
|
8
|
+
error: null;
|
|
9
|
+
} | {
|
|
10
|
+
data: null;
|
|
11
|
+
error: ApiErrorResponse;
|
|
12
|
+
};
|
|
13
|
+
export type ApiErrorResponse = {
|
|
14
|
+
success?: boolean;
|
|
15
|
+
error?: any;
|
|
16
|
+
code?: string;
|
|
17
|
+
message?: string;
|
|
18
|
+
};
|
|
19
|
+
export type ListProductsResponse = paths['/catalog/products']['get']['responses'][200]['content']['application/json'];
|
|
20
|
+
export type ListProductsContent = ListProductsResponse['content'];
|
|
21
|
+
export type ListProductsQuery = paths['/catalog/products']['get']['parameters']['query'];
|
|
22
|
+
export type ListSkusResponse = paths['/catalog/skus']['get']['responses'][200]['content']['application/json'];
|
|
23
|
+
export type ListSkusContent = ListSkusResponse['content'];
|
|
24
|
+
export type ListSkusQuery = paths['/catalog/skus']['get']['parameters']['query'];
|
|
25
|
+
export type GetProductDetailResponse = paths['/catalog/products/{product_id}']['get']['responses'][200]['content']['application/json'];
|
|
26
|
+
export type GetProductDetailContent = GetProductDetailResponse['content'];
|
|
27
|
+
export type GetProductDetailQuery = paths['/catalog/products/{product_id}']['get']['parameters']['query'];
|
|
28
|
+
export type GetProductDetailPathParams = paths['/catalog/products/{product_id}']['get']['parameters']['path'];
|
|
29
|
+
export type ListProductVariantsResponse = paths['/catalog/products/{product_id}/variants']['get']['responses'][200]['content']['application/json'];
|
|
30
|
+
export type ListProductVariantsContent = ListProductVariantsResponse['content'];
|
|
31
|
+
export type ListProductVariantsQuery = paths['/catalog/products/{product_id}/variants']['get']['parameters']['query'];
|
|
32
|
+
export type ListProductVariantsPathParams = paths['/catalog/products/{product_id}/variants']['get']['parameters']['path'];
|
|
33
|
+
export type GetVariantDetailResponse = paths['/catalog/products/{product_id}/variants/{variant_id}']['get']['responses'][200]['content']['application/json'];
|
|
34
|
+
export type GetVariantDetailContent = GetVariantDetailResponse['content'];
|
|
35
|
+
export type GetVariantDetailQuery = paths['/catalog/products/{product_id}/variants/{variant_id}']['get']['parameters']['query'];
|
|
36
|
+
export type GetVariantDetailPathParams = paths['/catalog/products/{product_id}/variants/{variant_id}']['get']['parameters']['path'];
|
|
37
|
+
export type ListCategoriesResponse = paths['/catalog/categories']['get']['responses'][200]['content']['application/json'];
|
|
38
|
+
export type ListCategoriesContent = ListCategoriesResponse['content'];
|
|
39
|
+
export type ListCategoriesQuery = paths['/catalog/categories']['get']['parameters']['query'];
|
|
40
|
+
export type ListProductReviewsResponse = paths['/catalog/products/{product_id}/reviews']['get']['responses'][200]['content']['application/json'];
|
|
41
|
+
export type ListProductReviewsContent = ListProductReviewsResponse['content'];
|
|
42
|
+
export type ListProductReviewsQuery = paths['/catalog/products/{product_id}/reviews']['get']['parameters']['query'];
|
|
43
|
+
export type ListProductReviewsPathParams = paths['/catalog/products/{product_id}/reviews']['get']['parameters']['path'];
|
|
44
|
+
export type CreateProductReviewResponse = paths['/catalog/products/{product_id}/reviews']['post']['responses'][200]['content']['application/json'];
|
|
45
|
+
export type CreateProductReviewPathParams = paths['/catalog/products/{product_id}/reviews']['post']['parameters']['path'];
|
|
46
|
+
export type CreateProductReviewFormData = NonNullable<paths['/catalog/products/{product_id}/reviews']['post']['requestBody']>['content']['multipart/form-data'];
|
|
47
|
+
export type ListSimilarProductsResponse = paths['/catalog/products/similar']['get']['responses'][200]['content']['application/json'];
|
|
48
|
+
export type ListSimilarProductsContent = ListSimilarProductsResponse['content'];
|
|
49
|
+
export type ListSimilarProductsQuery = paths['/catalog/products/similar']['get']['parameters']['query'];
|
|
50
|
+
export type ListUpsellProductsResponse = paths['/catalog/products/up-sell']['get']['responses'][200]['content']['application/json'];
|
|
51
|
+
export type ListUpsellProductsContent = ListUpsellProductsResponse['content'];
|
|
52
|
+
export type ListUpsellProductsQuery = paths['/catalog/products/up-sell']['get']['parameters']['query'];
|
|
53
|
+
export type ListCrosssellProductsResponse = paths['/catalog/products/cross-sell']['get']['responses'][200]['content']['application/json'];
|
|
54
|
+
export type ListCrosssellProductsContent = ListCrosssellProductsResponse['content'];
|
|
55
|
+
export type ListCrosssellProductsQuery = paths['/catalog/products/cross-sell']['get']['parameters']['query'];
|
|
56
|
+
export type SearchProductsResponse = paths['/catalog/products/search']['post']['responses'][200]['content']['application/json'];
|
|
57
|
+
export type SearchProductsContent = SearchProductsResponse['content'];
|
|
58
|
+
export type SearchProductsBody = NonNullable<paths['/catalog/products/search']['post']['requestBody']>['content']['application/json'];
|
|
59
|
+
export type CreateCartResponse = paths['/carts']['post']['responses'][200]['content']['application/json'];
|
|
60
|
+
export type CreateCartContent = CreateCartResponse['content'];
|
|
61
|
+
export type CreateCartBody = NonNullable<paths['/carts']['post']['requestBody']>['content']['application/json'];
|
|
62
|
+
export type GetCartResponse = paths['/carts/{id}']['get']['responses'][200]['content']['application/json'];
|
|
63
|
+
export type GetCartContent = GetCartResponse['content'];
|
|
64
|
+
export type GetCartPathParams = paths['/carts/{id}']['get']['parameters']['path'];
|
|
65
|
+
export type DeleteCartResponse = paths['/carts/{id}']['delete']['responses'][200]['content']['application/json'];
|
|
66
|
+
export type DeleteCartPathParams = paths['/carts/{id}']['delete']['parameters']['path'];
|
|
67
|
+
export type GetUserCartResponse = paths['/carts/users/{user_id}']['get']['responses'][200]['content']['application/json'];
|
|
68
|
+
export type GetUserCartContent = GetUserCartResponse['content'];
|
|
69
|
+
export type GetUserCartPathParams = paths['/carts/users/{user_id}']['get']['parameters']['path'];
|
|
70
|
+
export type DeleteUserCartResponse = paths['/carts/users/{user_id}']['delete']['responses'][200]['content']['application/json'];
|
|
71
|
+
export type DeleteUserCartPathParams = paths['/carts/users/{user_id}']['delete']['parameters']['path'];
|
|
72
|
+
export type UpdateCartResponse = paths['/carts/{id}/items']['post']['responses'][200]['content']['application/json'];
|
|
73
|
+
export type UpdateCartContent = UpdateCartResponse['content'];
|
|
74
|
+
export type UpdateCartPathParams = paths['/carts/{id}/items']['post']['parameters']['path'];
|
|
75
|
+
export type UpdateCartBody = NonNullable<paths['/carts/{id}/items']['post']['requestBody']>['content']['application/json'];
|
|
76
|
+
export type CreateCartAddressResponse = paths['/carts/{id}/address']['post']['responses'][200]['content']['application/json'];
|
|
77
|
+
export type CreateCartAddressContent = CreateCartAddressResponse['content'];
|
|
78
|
+
export type CreateCartAddressPathParams = paths['/carts/{id}/address']['post']['parameters']['path'];
|
|
79
|
+
export type CreateCartAddressBody = NonNullable<paths['/carts/{id}/address']['post']['requestBody']>['content']['application/json'];
|
|
80
|
+
export type UpdateShippingMethodResponse = paths['/carts/{id}/shipping-method']['post']['responses'][200]['content']['application/json'];
|
|
81
|
+
export type UpdateShippingMethodContent = UpdateShippingMethodResponse['content'];
|
|
82
|
+
export type UpdateShippingMethodPathParams = paths['/carts/{id}/shipping-method']['post']['parameters']['path'];
|
|
83
|
+
export type UpdateShippingMethodBody = NonNullable<paths['/carts/{id}/shipping-method']['post']['requestBody']>['content']['application/json'];
|
|
84
|
+
export type ApplyCouponResponse = paths['/carts/{id}/coupon']['post']['responses'][200]['content']['application/json'];
|
|
85
|
+
export type ApplyCouponContent = ApplyCouponResponse['content'];
|
|
86
|
+
export type ApplyCouponPathParams = paths['/carts/{id}/coupon']['post']['parameters']['path'];
|
|
87
|
+
export type ApplyCouponBody = NonNullable<paths['/carts/{id}/coupon']['post']['requestBody']>['content']['application/json'];
|
|
88
|
+
export type RemoveCouponResponse = paths['/carts/{id}/coupon']['delete']['responses'][200]['content']['application/json'];
|
|
89
|
+
export type RemoveCouponContent = RemoveCouponResponse['content'];
|
|
90
|
+
export type RemoveCouponPathParams = paths['/carts/{id}/coupon']['delete']['parameters']['path'];
|
|
91
|
+
export type RedeemLoyaltyPointsResponse = paths['/carts/{id}/loyalty-points']['post']['responses'][200]['content']['application/json'];
|
|
92
|
+
export type RedeemLoyaltyPointsContent = RedeemLoyaltyPointsResponse['content'];
|
|
93
|
+
export type RedeemLoyaltyPointsPathParams = paths['/carts/{id}/loyalty-points']['post']['parameters']['path'];
|
|
94
|
+
export type RedeemLoyaltyPointsBody = NonNullable<paths['/carts/{id}/loyalty-points']['post']['requestBody']>['content']['application/json'];
|
|
95
|
+
export type RemoveLoyaltyPointsResponse = paths['/carts/{id}/loyalty-points']['delete']['responses'][200]['content']['application/json'];
|
|
96
|
+
export type RemoveLoyaltyPointsContent = RemoveLoyaltyPointsResponse['content'];
|
|
97
|
+
export type RemoveLoyaltyPointsPathParams = paths['/carts/{id}/loyalty-points']['delete']['parameters']['path'];
|
|
98
|
+
export type RedeemCreditBalanceResponse = paths['/carts/{id}/credit-balance']['post']['responses'][200]['content']['application/json'];
|
|
99
|
+
export type RedeemCreditBalanceContent = RedeemCreditBalanceResponse['content'];
|
|
100
|
+
export type RedeemCreditBalancePathParams = paths['/carts/{id}/credit-balance']['post']['parameters']['path'];
|
|
101
|
+
export type RedeemCreditBalanceBody = NonNullable<paths['/carts/{id}/credit-balance']['post']['requestBody']>['content']['application/json'];
|
|
102
|
+
export type RemoveCreditBalanceResponse = paths['/carts/{id}/credit-balance']['delete']['responses'][200]['content']['application/json'];
|
|
103
|
+
export type RemoveCreditBalanceContent = RemoveCreditBalanceResponse['content'];
|
|
104
|
+
export type RemoveCreditBalancePathParams = paths['/carts/{id}/credit-balance']['delete']['parameters']['path'];
|
|
105
|
+
export type RedeemGiftCardResponse = paths['/carts/{id}/gift-card']['post']['responses'][200]['content']['application/json'];
|
|
106
|
+
export type RedeemGiftCardContent = RedeemGiftCardResponse['content'];
|
|
107
|
+
export type RedeemGiftCardPathParams = paths['/carts/{id}/gift-card']['post']['parameters']['path'];
|
|
108
|
+
export type RedeemGiftCardBody = NonNullable<paths['/carts/{id}/gift-card']['post']['requestBody']>['content']['application/json'];
|
|
109
|
+
export type RemoveGiftCardResponse = paths['/carts/{id}/gift-card']['delete']['responses'][200]['content']['application/json'];
|
|
110
|
+
export type RemoveGiftCardContent = RemoveGiftCardResponse['content'];
|
|
111
|
+
export type RemoveGiftCardPathParams = paths['/carts/{id}/gift-card']['delete']['parameters']['path'];
|
|
112
|
+
export type ListCouponsResponse = paths['/offer/coupons']['get']['responses'][200]['content']['application/json'];
|
|
113
|
+
export type ListCouponsContent = ListCouponsResponse['content'];
|
|
114
|
+
export type ListPromotionsResponse = paths['/offer/promotions']['get']['responses'][200]['content']['application/json'];
|
|
115
|
+
export type ListPromotionsContent = ListPromotionsResponse['content'];
|
|
116
|
+
export type GetWishlistResponse = paths['/wishlist/{user_id}']['get']['responses'][200]['content']['application/json'];
|
|
117
|
+
export type GetWishlistContent = GetWishlistResponse['content'];
|
|
118
|
+
export type GetWishlistPathParams = paths['/wishlist/{user_id}']['get']['parameters']['path'];
|
|
119
|
+
export type AddToWishlistResponse = paths['/wishlist/{user_id}']['post']['responses'][200]['content']['application/json'];
|
|
120
|
+
export type AddToWishlistContent = AddToWishlistResponse['content'];
|
|
121
|
+
export type AddToWishlistPathParams = paths['/wishlist/{user_id}']['post']['parameters']['path'];
|
|
122
|
+
export type AddToWishlistBody = NonNullable<paths['/wishlist/{user_id}']['post']['requestBody']>['content']['application/json'];
|
|
123
|
+
export type DeleteFromWishlistResponse = paths['/wishlist/{user_id}']['delete']['responses'][200]['content']['application/json'];
|
|
124
|
+
export type DeleteFromWishlistContent = DeleteFromWishlistResponse['content'];
|
|
125
|
+
export type DeleteFromWishlistPathParams = paths['/wishlist/{user_id}']['delete']['parameters']['path'];
|
|
126
|
+
export type DeleteFromWishlistBody = NonNullable<paths['/wishlist/{user_id}']['delete']['requestBody']>['content']['application/json'];
|
|
127
|
+
export type CreateCustomerResponse = paths['/customers']['post']['responses'][200]['content']['application/json'];
|
|
128
|
+
export type CreateCustomerContent = CreateCustomerResponse['content'];
|
|
129
|
+
export type CreateCustomerBody = NonNullable<paths['/customers']['post']['requestBody']>['content']['application/json'];
|
|
130
|
+
export type GetCustomerDetailResponse = paths['/customers/{id}']['get']['responses'][200]['content']['application/json'];
|
|
131
|
+
export type GetCustomerDetailContent = GetCustomerDetailResponse['content'];
|
|
132
|
+
export type GetCustomerDetailPathParams = paths['/customers/{id}']['get']['parameters']['path'];
|
|
133
|
+
export type UpdateCustomerResponse = paths['/customers/{id}']['put']['responses'][200]['content']['application/json'];
|
|
134
|
+
export type UpdateCustomerContent = UpdateCustomerResponse['content'];
|
|
135
|
+
export type UpdateCustomerPathParams = paths['/customers/{id}']['put']['parameters']['path'];
|
|
136
|
+
export type UpdateCustomerBody = NonNullable<paths['/customers/{id}']['put']['requestBody']>['content']['application/json'];
|
|
137
|
+
export type ListAddressesResponse = paths['/customers/{user_id}/addresses']['get']['responses'][200]['content']['application/json'];
|
|
138
|
+
export type ListAddressesContent = ListAddressesResponse['content'];
|
|
139
|
+
export type ListAddressesQuery = paths['/customers/{user_id}/addresses']['get']['parameters']['query'];
|
|
140
|
+
export type ListAddressesPathParams = paths['/customers/{user_id}/addresses']['get']['parameters']['path'];
|
|
141
|
+
export type CreateAddressResponse = paths['/customers/{user_id}/addresses']['post']['responses'][200]['content']['application/json'];
|
|
142
|
+
export type CreateAddressContent = CreateAddressResponse['content'];
|
|
143
|
+
export type CreateAddressPathParams = paths['/customers/{user_id}/addresses']['post']['parameters']['path'];
|
|
144
|
+
export type CreateAddressBody = NonNullable<paths['/customers/{user_id}/addresses']['post']['requestBody']>['content']['application/json'];
|
|
145
|
+
export type GetAddressDetailResponse = paths['/customers/{user_id}/addresses/{address_id}']['get']['responses'][200]['content']['application/json'];
|
|
146
|
+
export type GetAddressDetailContent = GetAddressDetailResponse['content'];
|
|
147
|
+
export type GetAddressDetailPathParams = paths['/customers/{user_id}/addresses/{address_id}']['get']['parameters']['path'];
|
|
148
|
+
export type UpdateAddressDetailResponse = paths['/customers/{user_id}/addresses/{address_id}']['put']['responses'][200]['content']['application/json'];
|
|
149
|
+
export type UpdateAddressDetailContent = UpdateAddressDetailResponse['content'];
|
|
150
|
+
export type UpdateAddressDetailPathParams = paths['/customers/{user_id}/addresses/{address_id}']['put']['parameters']['path'];
|
|
151
|
+
export type UpdateAddressDetailBody = NonNullable<paths['/customers/{user_id}/addresses/{address_id}']['put']['requestBody']>['content']['application/json'];
|
|
152
|
+
export type DeleteAddressResponse = paths['/customers/{user_id}/addresses/{address_id}']['delete']['responses'][200]['content']['application/json'];
|
|
153
|
+
export type DeleteAddressPathParams = paths['/customers/{user_id}/addresses/{address_id}']['delete']['parameters']['path'];
|
|
154
|
+
export type ListKycDocumentResponse = paths['/store/kyc-document']['get']['responses'][200]['content']['application/json'];
|
|
155
|
+
export type ListKycDocumentContent = ListKycDocumentResponse['content'];
|
|
156
|
+
export type ListDocumentsResponse = paths['/customers/{id}/documents']['get']['responses'][200]['content']['application/json'];
|
|
157
|
+
export type ListDocumentsContent = ListDocumentsResponse['content'];
|
|
158
|
+
export type ListDocumentsPathParams = paths['/customers/{id}/documents']['get']['parameters']['path'];
|
|
159
|
+
export type CreateDocumentResponse = paths['/customers/{id}/documents']['post']['responses'][200]['content']['application/json'];
|
|
160
|
+
export type CreateDocumentContent = CreateDocumentResponse['content'];
|
|
161
|
+
export type CreateDocumentPathParams = paths['/customers/{id}/documents']['post']['parameters']['path'];
|
|
162
|
+
export type CreateDocumentFormData = NonNullable<paths['/customers/{id}/documents']['post']['requestBody']>['content']['multipart/form-data'];
|
|
163
|
+
export type GetDocumentResponse = paths['/customers/{id}/documents/{document_id}']['get']['responses'][200]['content']['application/json'];
|
|
164
|
+
export type GetDocumentContent = GetDocumentResponse['content'];
|
|
165
|
+
export type GetDocumentPathParams = paths['/customers/{id}/documents/{document_id}']['get']['parameters']['path'];
|
|
166
|
+
export type UpdateDocumentResponse = paths['/customers/{id}/documents/{document_id}']['put']['responses'][200]['content']['application/json'];
|
|
167
|
+
export type UpdateDocumentContent = UpdateDocumentResponse['content'];
|
|
168
|
+
export type UpdateDocumentPathParams = paths['/customers/{id}/documents/{document_id}']['put']['parameters']['path'];
|
|
169
|
+
export type UpdateDocumentFormData = NonNullable<paths['/customers/{id}/documents/{document_id}']['put']['requestBody']>['content']['multipart/form-data'];
|
|
170
|
+
export type DeleteDocumentResponse = paths['/customers/{id}/documents/{document_id}']['delete']['responses'][200]['content']['application/json'];
|
|
171
|
+
export type DeleteDocumentPathParams = paths['/customers/{id}/documents/{document_id}']['delete']['parameters']['path'];
|
|
172
|
+
export type VerifyDocumentResponse = paths['/customers/{id}/documents/verify']['post']['responses'][200]['content']['application/json'];
|
|
173
|
+
export type VerifyDocumentContent = VerifyDocumentResponse['content'];
|
|
174
|
+
export type VerifyDocumentPathParams = paths['/customers/{id}/documents/verify']['post']['parameters']['path'];
|
|
175
|
+
export type VerifyDocumentBody = NonNullable<paths['/customers/{id}/documents/verify']['post']['requestBody']>['content']['application/json'];
|
|
176
|
+
export type GetLoyaltyDetailsResponse = paths['/customers/{user_id}/loyalty']['get']['responses'][200]['content']['application/json'];
|
|
177
|
+
export type GetLoyaltyDetailsContent = GetLoyaltyDetailsResponse['content'];
|
|
178
|
+
export type GetLoyaltyDetailsPathParams = paths['/customers/{user_id}/loyalty']['get']['parameters']['path'];
|
|
179
|
+
export type ListLoyaltyActivitiesResponse = paths['/customers/{user_id}/loyalty-points-activity']['get']['responses'][200]['content']['application/json'];
|
|
180
|
+
export type ListLoyaltyActivitiesContent = ListLoyaltyActivitiesResponse['content'];
|
|
181
|
+
export type ListLoyaltyActivitiesQuery = paths['/customers/{user_id}/loyalty-points-activity']['get']['parameters']['query'];
|
|
182
|
+
export type ListLoyaltyActivitiesPathParams = paths['/customers/{user_id}/loyalty-points-activity']['get']['parameters']['path'];
|
|
183
|
+
export type ListOrdersResponse = paths['/orders']['get']['responses'][200]['content']['application/json'];
|
|
184
|
+
export type ListOrdersContent = ListOrdersResponse['content'];
|
|
185
|
+
export type ListOrdersQuery = paths['/orders']['get']['parameters']['query'];
|
|
186
|
+
export type CreateOrderResponse = paths['/orders']['post']['responses'][200]['content']['application/json'];
|
|
187
|
+
export type CreateOrderContent = CreateOrderResponse['content'];
|
|
188
|
+
export type CreateOrderBody = NonNullable<paths['/orders']['post']['requestBody']>['content']['application/json'];
|
|
189
|
+
export type GetOrderDetailResponse = paths['/orders/{order_number}']['get']['responses'][200]['content']['application/json'];
|
|
190
|
+
export type GetOrderDetailContent = GetOrderDetailResponse['content'];
|
|
191
|
+
export type GetOrderDetailPathParams = paths['/orders/{order_number}']['get']['parameters']['path'];
|
|
192
|
+
export type GetPaymentStatusResponse = paths['/orders/{order_number}/payment-status']['get']['responses'][200]['content']['application/json'];
|
|
193
|
+
export type GetPaymentStatusContent = GetPaymentStatusResponse['content'];
|
|
194
|
+
export type GetPaymentStatusPathParams = paths['/orders/{order_number}/payment-status']['get']['parameters']['path'];
|
|
195
|
+
export type ListOrderShipmentsResponse = paths['/orders/{order_number}/shipments']['get']['responses'][200]['content']['application/json'];
|
|
196
|
+
export type ListOrderShipmentsContent = ListOrderShipmentsResponse['content'];
|
|
197
|
+
export type ListOrderShipmentsPathParams = paths['/orders/{order_number}/shipments']['get']['parameters']['path'];
|
|
198
|
+
export type ListOrderRefundsResponse = paths['/orders/{order_number}/refunds']['get']['responses'][200]['content']['application/json'];
|
|
199
|
+
export type ListOrderRefundsContent = ListOrderRefundsResponse['content'];
|
|
200
|
+
export type ListOrderRefundsPathParams = paths['/orders/{order_number}/refunds']['get']['parameters']['path'];
|
|
201
|
+
export type ListOrderPaymentsResponse = paths['/orders/{order_number}/payments']['get']['responses'][200]['content']['application/json'];
|
|
202
|
+
export type ListOrderPaymentsContent = ListOrderPaymentsResponse['content'];
|
|
203
|
+
export type ListOrderPaymentsPathParams = paths['/orders/{order_number}/payments']['get']['parameters']['path'];
|
|
204
|
+
export type CreateOrderReturnResponse = paths['/orders/{order_number}/return']['post']['responses'][200]['content']['application/json'];
|
|
205
|
+
export type CreateOrderReturnContent = CreateOrderReturnResponse['content'];
|
|
206
|
+
export type CreateOrderReturnPathParams = paths['/orders/{order_number}/return']['post']['parameters']['path'];
|
|
207
|
+
export type CreateOrderReturnBody = NonNullable<paths['/orders/{order_number}/return']['post']['requestBody']>['content']['application/json'];
|
|
208
|
+
export type GetOrderReturnDetailResponse = paths['/orders/{order_number}/return/{return_id}']['get']['responses'][200]['content']['application/json'];
|
|
209
|
+
export type GetOrderReturnDetailContent = GetOrderReturnDetailResponse['content'];
|
|
210
|
+
export type GetOrderReturnDetailPathParams = paths['/orders/{order_number}/return/{return_id}']['get']['parameters']['path'];
|
|
211
|
+
export type CancelOrderResponse = paths['/orders/{order_number}/cancel']['post']['responses'][200]['content']['application/json'];
|
|
212
|
+
export type CancelOrderContent = CancelOrderResponse['content'];
|
|
213
|
+
export type CancelOrderPathParams = paths['/orders/{order_number}/cancel']['post']['parameters']['path'];
|
|
214
|
+
export type CancelOrderBody = NonNullable<paths['/orders/{order_number}/cancel']['post']['requestBody']>['content']['application/json'];
|
|
215
|
+
export type RetryOrderPaymentResponse = paths['/orders/{order_number}/retry-payment']['post']['responses'][200]['content']['application/json'];
|
|
216
|
+
export type RetryOrderPaymentContent = RetryOrderPaymentResponse['content'];
|
|
217
|
+
export type RetryOrderPaymentPathParams = paths['/orders/{order_number}/retry-payment']['post']['parameters']['path'];
|
|
218
|
+
export type RetryOrderPaymentBody = NonNullable<paths['/orders/{order_number}/retry-payment']['post']['requestBody']>['content']['application/json'];
|
|
219
|
+
export type CheckDeliveryAvailabilityResponse = paths['/shipment/pincode-serviceability/{pincode}']['get']['responses'][200]['content']['application/json'];
|
|
220
|
+
export type CheckDeliveryAvailabilityPathParams = paths['/shipment/pincode-serviceability/{pincode}']['get']['parameters']['path'];
|
|
221
|
+
export type ShippingMethodsResponse = paths['/shipping/shipping-methods']['post']['responses'][200]['content']['application/json'];
|
|
222
|
+
export type ShippingMethodsContent = ShippingMethodsResponse['content'];
|
|
223
|
+
export type ShippingMethodsBody = NonNullable<paths['/shipping/shipping-methods']['post']['requestBody']>['content']['application/json'];
|
|
224
|
+
export type GetAnonymousTokenResponse = paths['/auth/anonymous']['post']['responses'][200]['content']['application/json'];
|
|
225
|
+
export type GetAnonymousTokenContent = GetAnonymousTokenResponse['content'];
|
|
226
|
+
export type LoginWithPhoneResponse = paths['/auth/login/phone']['post']['responses'][200]['content']['application/json'];
|
|
227
|
+
export type LoginWithPhoneContent = LoginWithPhoneResponse['content'];
|
|
228
|
+
export type LoginWithPhoneBody = NonNullable<paths['/auth/login/phone']['post']['requestBody']>['content']['application/json'];
|
|
229
|
+
export type LoginWithEmailResponse = paths['/auth/login/email']['post']['responses'][200]['content']['application/json'];
|
|
230
|
+
export type LoginWithEmailContent = LoginWithEmailResponse['content'];
|
|
231
|
+
export type LoginWithEmailBody = NonNullable<paths['/auth/login/email']['post']['requestBody']>['content']['application/json'];
|
|
232
|
+
export type LoginWithWhatsappResponse = paths['/auth/login/whatsapp']['post']['responses'][200]['content']['application/json'];
|
|
233
|
+
export type LoginWithWhatsappContent = LoginWithWhatsappResponse['content'];
|
|
234
|
+
export type LoginWithWhatsappBody = NonNullable<paths['/auth/login/whatsapp']['post']['requestBody']>['content']['application/json'];
|
|
235
|
+
export type LoginWithPasswordResponse = paths['/auth/login/password']['post']['responses'][200]['content']['application/json'];
|
|
236
|
+
export type LoginWithPasswordContent = LoginWithPasswordResponse['content'];
|
|
237
|
+
export type LoginWithPasswordBody = NonNullable<paths['/auth/login/password']['post']['requestBody']>['content']['application/json'];
|
|
238
|
+
export type VerifyOtpResponse = paths['/auth/verify-otp']['post']['responses'][200]['content']['application/json'];
|
|
239
|
+
export type VerifyOtpContent = VerifyOtpResponse['content'];
|
|
240
|
+
export type VerifyOtpBody = NonNullable<paths['/auth/verify-otp']['post']['requestBody']>['content']['application/json'];
|
|
241
|
+
export type RegisterWithPhoneResponse = paths['/auth/register/phone']['post']['responses'][200]['content']['application/json'];
|
|
242
|
+
export type RegisterWithPhoneContent = RegisterWithPhoneResponse['content'];
|
|
243
|
+
export type RegisterWithPhoneBody = NonNullable<paths['/auth/register/phone']['post']['requestBody']>['content']['application/json'];
|
|
244
|
+
export type RegisterWithEmailResponse = paths['/auth/register/email']['post']['responses'][200]['content']['application/json'];
|
|
245
|
+
export type RegisterWithEmailContent = RegisterWithEmailResponse['content'];
|
|
246
|
+
export type RegisterWithEmailBody = NonNullable<paths['/auth/register/email']['post']['requestBody']>['content']['application/json'];
|
|
247
|
+
export type RegisterWithWhatsappResponse = paths['/auth/register/whatsapp']['post']['responses'][200]['content']['application/json'];
|
|
248
|
+
export type RegisterWithWhatsappContent = RegisterWithWhatsappResponse['content'];
|
|
249
|
+
export type RegisterWithWhatsappBody = NonNullable<paths['/auth/register/whatsapp']['post']['requestBody']>['content']['application/json'];
|
|
250
|
+
export type RegisterWithPasswordResponse = paths['/auth/register/password']['post']['responses'][200]['content']['application/json'];
|
|
251
|
+
export type RegisterWithPasswordContent = RegisterWithPasswordResponse['content'];
|
|
252
|
+
export type RegisterWithPasswordBody = NonNullable<paths['/auth/register/password']['post']['requestBody']>['content']['application/json'];
|
|
253
|
+
export type GetUserDetailResponse = paths['/auth/user/{id}']['get']['responses'][200]['content']['application/json'];
|
|
254
|
+
export type GetUserDetailContent = GetUserDetailResponse['content'];
|
|
255
|
+
export type GetUserDetailPathParams = paths['/auth/user/{id}']['get']['parameters']['path'];
|
|
256
|
+
export type UpdateUserResponse = paths['/auth/user/{id}']['put']['responses'][200]['content']['application/json'];
|
|
257
|
+
export type UpdateUserContent = UpdateUserResponse['content'];
|
|
258
|
+
export type UpdateUserPathParams = paths['/auth/user/{id}']['put']['parameters']['path'];
|
|
259
|
+
export type UpdateUserBody = NonNullable<paths['/auth/user/{id}']['put']['requestBody']>['content']['application/json'];
|
|
260
|
+
export type GetProfileImageResponse = paths['/auth/user/{id}/profile-image']['get']['responses'][200]['content']['application/json'];
|
|
261
|
+
export type GetProfileImageContent = GetProfileImageResponse['content'];
|
|
262
|
+
export type GetProfileImagePathParams = paths['/auth/user/{id}/profile-image']['get']['parameters']['path'];
|
|
263
|
+
export type UpdateProfileImageResponse = paths['/auth/user/{id}/profile-image']['put']['responses'][200]['content']['application/json'];
|
|
264
|
+
export type UpdateProfileImageContent = UpdateProfileImageResponse['content'];
|
|
265
|
+
export type UpdateProfileImagePathParams = paths['/auth/user/{id}/profile-image']['put']['parameters']['path'];
|
|
266
|
+
export type UpdateProfileImageFormData = NonNullable<paths['/auth/user/{id}/profile-image']['put']['requestBody']>['content']['multipart/form-data'];
|
|
267
|
+
export type AddProfileImageResponse = paths['/auth/user/{id}/profile-image']['post']['responses'][200]['content']['application/json'];
|
|
268
|
+
export type AddProfileImageContent = AddProfileImageResponse['content'];
|
|
269
|
+
export type AddProfileImagePathParams = paths['/auth/user/{id}/profile-image']['post']['parameters']['path'];
|
|
270
|
+
export type AddProfileImageFormData = NonNullable<paths['/auth/user/{id}/profile-image']['post']['requestBody']>['content']['multipart/form-data'];
|
|
271
|
+
export type RemoveProfileImageResponse = paths['/auth/user/{id}/profile-image']['delete']['responses'][200]['content']['application/json'];
|
|
272
|
+
export type RemoveProfileImagePathParams = paths['/auth/user/{id}/profile-image']['delete']['parameters']['path'];
|
|
273
|
+
export type DeactivateUserResponse = paths['/auth/user/{id}/deactivate']['put']['responses'][200]['content']['application/json'];
|
|
274
|
+
export type DeactivateUserPathParams = paths['/auth/user/{id}/deactivate']['put']['parameters']['path'];
|
|
275
|
+
export type RefreshTokenResponse = paths['/auth/refresh-token']['post']['responses'][200]['content']['application/json'];
|
|
276
|
+
export type RefreshTokenContent = RefreshTokenResponse['content'];
|
|
277
|
+
export type RefreshTokenBody = NonNullable<paths['/auth/refresh-token']['post']['requestBody']>['content']['application/json'];
|
|
278
|
+
export type ChangePasswordResponse = paths['/auth/change-password']['post']['responses'][200]['content']['application/json'];
|
|
279
|
+
export type ChangePasswordContent = ChangePasswordResponse['content'];
|
|
280
|
+
export type ChangePasswordBody = NonNullable<paths['/auth/change-password']['post']['requestBody']>['content']['application/json'];
|
|
281
|
+
export type ForgotPasswordResponse = paths['/auth/forgot-password']['post']['responses'][200]['content']['application/json'];
|
|
282
|
+
export type ForgotPasswordContent = ForgotPasswordResponse['content'];
|
|
283
|
+
export type ForgotPasswordBody = NonNullable<paths['/auth/forgot-password']['post']['requestBody']>['content']['application/json'];
|
|
284
|
+
export type ResetPasswordResponse = paths['/auth/reset-password']['post']['responses'][200]['content']['application/json'];
|
|
285
|
+
export type ResetPasswordContent = ResetPasswordResponse['content'];
|
|
286
|
+
export type ResetPasswordBody = NonNullable<paths['/auth/reset-password']['post']['requestBody']>['content']['application/json'];
|
|
287
|
+
export type GetNotificationPreferencesResponse = paths['/auth/user/{id}/notification-preferences']['get']['responses'][200]['content']['application/json'];
|
|
288
|
+
export type GetNotificationPreferencesContent = GetNotificationPreferencesResponse['content'];
|
|
289
|
+
export type GetNotificationPreferencesPathParams = paths['/auth/user/{id}/notification-preferences']['get']['parameters']['path'];
|
|
290
|
+
export type UpdateNotificationPreferencesResponse = paths['/auth/user/{id}/notification-preferences']['put']['responses'][200]['content']['application/json'];
|
|
291
|
+
export type UpdateNotificationPreferencesContent = UpdateNotificationPreferencesResponse['content'];
|
|
292
|
+
export type UpdateNotificationPreferencesPathParams = paths['/auth/user/{id}/notification-preferences']['put']['parameters']['path'];
|
|
293
|
+
export type UpdateNotificationPreferencesBody = NonNullable<paths['/auth/user/{id}/notification-preferences']['put']['requestBody']>['content']['application/json'];
|
|
294
|
+
export type CreateNotificationPreferencesResponse = paths['/auth/user/{id}/notification-preferences']['post']['responses'][200]['content']['application/json'];
|
|
295
|
+
export type CreateNotificationPreferencesContent = CreateNotificationPreferencesResponse['content'];
|
|
296
|
+
export type CreateNotificationPreferencesPathParams = paths['/auth/user/{id}/notification-preferences']['post']['parameters']['path'];
|
|
297
|
+
export type CreateNotificationPreferencesBody = NonNullable<paths['/auth/user/{id}/notification-preferences']['post']['requestBody']>['content']['application/json'];
|
|
298
|
+
export type GenerateOtpResponse = paths['/auth/generate-otp']['post']['responses'][200]['content']['application/json'];
|
|
299
|
+
export type GenerateOtpContent = GenerateOtpResponse['content'];
|
|
300
|
+
export type GenerateOtpBody = NonNullable<paths['/auth/generate-otp']['post']['requestBody']>['content']['application/json'];
|
|
301
|
+
export type LogoutResponse = paths['/auth/logout']['post']['responses'][200]['content']['application/json'];
|
|
302
|
+
export type LogoutContent = LogoutResponse['content'];
|
|
303
|
+
export type ListUserReviewsResponse = paths['/customers/{user_id}/reviews']['get']['responses'][200]['content']['application/json'];
|
|
304
|
+
export type ListUserReviewsContent = ListUserReviewsResponse['content'];
|
|
305
|
+
export type ListUserReviewsPathParams = paths['/customers/{user_id}/reviews']['get']['parameters']['path'];
|
|
306
|
+
export type CheckVerificationStatusResponse = paths['/auth/verified-email-phone']['post']['responses'][200]['content']['application/json'];
|
|
307
|
+
export type CheckVerificationStatusContent = CheckVerificationStatusResponse['content'];
|
|
308
|
+
export type CheckVerificationStatusBody = NonNullable<paths['/auth/verified-email-phone']['post']['requestBody']>['content']['application/json'];
|
|
309
|
+
export type GenerateHashResponse = paths['/payments/generate-hash']['post']['responses'][200]['content']['application/json'];
|
|
310
|
+
export type GenerateHashContent = GenerateHashResponse['content'];
|
|
311
|
+
export type GenerateHashBody = NonNullable<paths['/payments/generate-hash']['post']['requestBody']>['content']['application/json'];
|
|
312
|
+
export type ListPaymentMethodsResponse = paths['/payments/payment-methods']['get']['responses'][200]['content']['application/json'];
|
|
313
|
+
export type ListPaymentMethodsContent = ListPaymentMethodsResponse['content'];
|
|
314
|
+
export type ListPaymentMethodsQuery = paths['/payments/payment-methods']['get']['parameters']['query'];
|
|
315
|
+
export type ListSavedCardsResponse = paths['/payments/cards']['get']['responses'][200]['content']['application/json'];
|
|
316
|
+
export type ListSavedCardsContent = ListSavedCardsResponse['content'];
|
|
317
|
+
export type ListSavedCardsQuery = paths['/payments/cards']['get']['parameters']['query'];
|
|
318
|
+
export type AddCardResponse = paths['/payments/cards']['post']['responses'][200]['content']['application/json'];
|
|
319
|
+
export type AddCardContent = AddCardResponse['content'];
|
|
320
|
+
export type AddCardBody = NonNullable<paths['/payments/cards']['post']['requestBody']>['content']['application/json'];
|
|
321
|
+
export type VerifyVpaResponse = paths['/payments/verify-vpa']['get']['responses'][200]['content']['application/json'];
|
|
322
|
+
export type VerifyVpaContent = VerifyVpaResponse['content'];
|
|
323
|
+
export type VerifyVpaQuery = paths['/payments/verify-vpa']['get']['parameters']['query'];
|
|
324
|
+
export type CreateJuspayOrderResponse = paths['/payments/juspay/create-order']['post']['responses'][200]['content']['application/json'];
|
|
325
|
+
export type CreateJuspayOrderContent = CreateJuspayOrderResponse['content'];
|
|
326
|
+
export type CreateJuspayOrderBody = NonNullable<paths['/payments/juspay/create-order']['post']['requestBody']>['content']['application/json'];
|
|
327
|
+
export type CreateJuspayCustomerResponse = paths['/payments/juspay/customers']['post']['responses'][200]['content']['application/json'];
|
|
328
|
+
export type CreateJuspayCustomerContent = CreateJuspayCustomerResponse['content'];
|
|
329
|
+
export type CreateJuspayCustomerBody = NonNullable<paths['/payments/juspay/customers']['post']['requestBody']>['content']['application/json'];
|
|
330
|
+
export type GetJuspayCustomerResponse = paths['/payments/juspay/customers/{user-id}']['get']['responses'][200]['content']['application/json'];
|
|
331
|
+
export type GetJuspayCustomerContent = GetJuspayCustomerResponse['content'];
|
|
332
|
+
export type GetJuspayCustomerPathParams = paths['/payments/juspay/customers/{user-id}']['get']['parameters']['path'];
|
|
333
|
+
export type ListCountriesResponse = paths['/common/countries']['get']['responses'][200]['content']['application/json'];
|
|
334
|
+
export type ListCountriesContent = ListCountriesResponse['content'];
|
|
335
|
+
export type ListCountryStatesResponse = paths['/common/countries/{country_iso_code}/states']['get']['responses'][200]['content']['application/json'];
|
|
336
|
+
export type ListCountryStatesContent = ListCountryStatesResponse['content'];
|
|
337
|
+
export type ListCountryStatesPathParams = paths['/common/countries/{country_iso_code}/states']['get']['parameters']['path'];
|
|
338
|
+
export type ListCountryPincodesResponse = paths['/common/countries/{country_iso_code}/pincodes']['get']['responses'][200]['content']['application/json'];
|
|
339
|
+
export type ListCountryPincodesContent = ListCountryPincodesResponse['content'];
|
|
340
|
+
export type ListCountryPincodesQuery = paths['/common/countries/{country_iso_code}/pincodes']['get']['parameters']['query'];
|
|
341
|
+
export type ListCountryPincodesPathParams = paths['/common/countries/{country_iso_code}/pincodes']['get']['parameters']['path'];
|
|
342
|
+
export type ListReturnsResponse = paths['/orders/returns']['get']['responses'][200]['content']['application/json'];
|
|
343
|
+
export type ListReturnsContent = ListReturnsResponse['content'];
|
|
344
|
+
export type TrackAnalyticsEventResponse = paths['/analytics/track']['post']['responses'][200]['content']['application/json'];
|
|
345
|
+
export type TrackAnalyticsEventBody = NonNullable<paths['/analytics/track']['post']['requestBody']>['content']['application/json'];
|
|
346
|
+
export type SubscribeNewsletterResponse = paths['/campaigns/newsletter-subscribe']['post']['responses'][200]['content']['application/json'];
|
|
347
|
+
export type SubscribeNewsletterBody = NonNullable<paths['/campaigns/newsletter-subscribe']['post']['requestBody']>['content']['application/json'];
|
|
348
|
+
export type ListSubscriptionsResponse = paths['/subscriptions']['get']['responses'][200]['content']['application/json'];
|
|
349
|
+
export type ListSubscriptionsContent = ListSubscriptionsResponse['content'];
|
|
350
|
+
export type CreateSubscriptionResponse = paths['/subscriptions']['post']['responses'][200]['content']['application/json'];
|
|
351
|
+
export type CreateSubscriptionContent = CreateSubscriptionResponse['content'];
|
|
352
|
+
export type CreateSubscriptionBody = NonNullable<paths['/subscriptions']['post']['requestBody']>['content']['application/json'];
|
|
353
|
+
export type GetSubscriptionResponse = paths['/subscriptions/{id}']['get']['responses'][200]['content']['application/json'];
|
|
354
|
+
export type GetSubscriptionContent = GetSubscriptionResponse['content'];
|
|
355
|
+
export type GetSubscriptionPathParams = paths['/subscriptions/{id}']['get']['parameters']['path'];
|
|
356
|
+
export type UpdateSubscriptionResponse = paths['/subscriptions/{id}']['put']['responses'][200]['content']['application/json'];
|
|
357
|
+
export type UpdateSubscriptionContent = UpdateSubscriptionResponse['content'];
|
|
358
|
+
export type UpdateSubscriptionPathParams = paths['/subscriptions/{id}']['put']['parameters']['path'];
|
|
359
|
+
export type UpdateSubscriptionBody = NonNullable<paths['/subscriptions/{id}']['put']['requestBody']>['content']['application/json'];
|