@medusajs/js-sdk 0.0.2-snapshot-20240925111619 → 0.0.2-snapshot-20240927035525

Sign up to get free protection for your applications and to get access to all the features.
Files changed (291) hide show
  1. package/dist/admin/api-key.js +5 -1
  2. package/dist/admin/api-key.js.map +1 -1
  3. package/dist/admin/campaign.js +5 -1
  4. package/dist/admin/campaign.js.map +1 -1
  5. package/dist/admin/claim.js +5 -1
  6. package/dist/admin/claim.js.map +1 -1
  7. package/dist/admin/currency.js +5 -1
  8. package/dist/admin/currency.js.map +1 -1
  9. package/dist/admin/customer-group.js +5 -1
  10. package/dist/admin/customer-group.js.map +1 -1
  11. package/dist/admin/customer.d.ts.map +1 -1
  12. package/dist/admin/customer.js +5 -1
  13. package/dist/admin/customer.js.map +1 -1
  14. package/dist/admin/exchange.js +5 -1
  15. package/dist/admin/exchange.js.map +1 -1
  16. package/dist/admin/fulfillment-provider.js +5 -1
  17. package/dist/admin/fulfillment-provider.js.map +1 -1
  18. package/dist/admin/fulfillment-set.js +5 -1
  19. package/dist/admin/fulfillment-set.js.map +1 -1
  20. package/dist/admin/fulfillment.d.ts.map +1 -1
  21. package/dist/admin/fulfillment.js +5 -1
  22. package/dist/admin/fulfillment.js.map +1 -1
  23. package/dist/admin/index.js +90 -83
  24. package/dist/admin/index.js.map +1 -1
  25. package/dist/admin/inventory-item.js +5 -1
  26. package/dist/admin/inventory-item.js.map +1 -1
  27. package/dist/admin/invite.d.ts.map +1 -1
  28. package/dist/admin/invite.js +5 -1
  29. package/dist/admin/invite.js.map +1 -1
  30. package/dist/admin/notification.js +5 -1
  31. package/dist/admin/notification.js.map +1 -1
  32. package/dist/admin/order-edit.js +5 -1
  33. package/dist/admin/order-edit.js.map +1 -1
  34. package/dist/admin/order.d.ts.map +1 -1
  35. package/dist/admin/order.js +5 -1
  36. package/dist/admin/order.js.map +1 -1
  37. package/dist/admin/payment-collection.js +5 -1
  38. package/dist/admin/payment-collection.js.map +1 -1
  39. package/dist/admin/payment.js +5 -1
  40. package/dist/admin/payment.js.map +1 -1
  41. package/dist/admin/price-list.js +5 -1
  42. package/dist/admin/price-list.js.map +1 -1
  43. package/dist/admin/price-preference.js +5 -1
  44. package/dist/admin/price-preference.js.map +1 -1
  45. package/dist/admin/product-category.js +5 -1
  46. package/dist/admin/product-category.js.map +1 -1
  47. package/dist/admin/product-collection.js +5 -1
  48. package/dist/admin/product-collection.js.map +1 -1
  49. package/dist/admin/product-tag.js +5 -1
  50. package/dist/admin/product-tag.js.map +1 -1
  51. package/dist/admin/product-type.js +5 -1
  52. package/dist/admin/product-type.js.map +1 -1
  53. package/dist/admin/product-variant.js +5 -1
  54. package/dist/admin/product-variant.js.map +1 -1
  55. package/dist/admin/product.js +5 -1
  56. package/dist/admin/product.js.map +1 -1
  57. package/dist/admin/promotion.js +5 -1
  58. package/dist/admin/promotion.js.map +1 -1
  59. package/dist/admin/refund-reasons.js +5 -1
  60. package/dist/admin/refund-reasons.js.map +1 -1
  61. package/dist/admin/region.d.ts.map +1 -1
  62. package/dist/admin/region.js +5 -1
  63. package/dist/admin/region.js.map +1 -1
  64. package/dist/admin/reservation.js +3 -1
  65. package/dist/admin/reservation.js.map +1 -1
  66. package/dist/admin/return-reason.js +5 -1
  67. package/dist/admin/return-reason.js.map +1 -1
  68. package/dist/admin/return.js +5 -1
  69. package/dist/admin/return.js.map +1 -1
  70. package/dist/admin/sales-channel.js +5 -1
  71. package/dist/admin/sales-channel.js.map +1 -1
  72. package/dist/admin/shipping-option.js +5 -1
  73. package/dist/admin/shipping-option.js.map +1 -1
  74. package/dist/admin/shipping-profile.js +5 -1
  75. package/dist/admin/shipping-profile.js.map +1 -1
  76. package/dist/admin/stock-location.js +5 -1
  77. package/dist/admin/stock-location.js.map +1 -1
  78. package/dist/admin/store.js +5 -1
  79. package/dist/admin/store.js.map +1 -1
  80. package/dist/admin/tax-rate.js +5 -1
  81. package/dist/admin/tax-rate.js.map +1 -1
  82. package/dist/admin/tax-region.js +5 -1
  83. package/dist/admin/tax-region.js.map +1 -1
  84. package/dist/admin/upload.d.ts.map +1 -1
  85. package/dist/admin/upload.js +5 -1
  86. package/dist/admin/upload.js.map +1 -1
  87. package/dist/admin/user.js +5 -1
  88. package/dist/admin/user.js.map +1 -1
  89. package/dist/admin/workflow-execution.js +5 -1
  90. package/dist/admin/workflow-execution.js.map +1 -1
  91. package/dist/auth/index.d.ts.map +1 -1
  92. package/dist/auth/index.js +5 -1
  93. package/dist/auth/index.js.map +1 -1
  94. package/dist/client.d.ts.map +1 -1
  95. package/dist/client.js +16 -8
  96. package/dist/client.js.map +1 -1
  97. package/dist/esm/admin/api-key.d.ts +15 -0
  98. package/dist/esm/admin/api-key.d.ts.map +1 -0
  99. package/dist/esm/admin/api-key.js +75 -0
  100. package/dist/esm/admin/api-key.js.map +1 -0
  101. package/dist/esm/admin/campaign.d.ts +14 -0
  102. package/dist/esm/admin/campaign.d.ts.map +1 -0
  103. package/dist/esm/admin/campaign.js +66 -0
  104. package/dist/esm/admin/campaign.js.map +1 -0
  105. package/dist/esm/admin/claim.d.ts +30 -0
  106. package/dist/esm/admin/claim.d.ts.map +1 -0
  107. package/dist/esm/admin/claim.js +223 -0
  108. package/dist/esm/admin/claim.js.map +1 -0
  109. package/dist/esm/admin/currency.d.ts +10 -0
  110. package/dist/esm/admin/currency.d.ts.map +1 -0
  111. package/dist/esm/admin/currency.js +31 -0
  112. package/dist/esm/admin/currency.js.map +1 -0
  113. package/dist/esm/admin/customer-group.d.ts +14 -0
  114. package/dist/esm/admin/customer-group.d.ts.map +1 -0
  115. package/dist/esm/admin/customer-group.js +70 -0
  116. package/dist/esm/admin/customer-group.js.map +1 -0
  117. package/dist/esm/admin/customer.d.ts +21 -0
  118. package/dist/esm/admin/customer.d.ts.map +1 -0
  119. package/dist/esm/admin/customer.js +59 -0
  120. package/dist/esm/admin/customer.js.map +1 -0
  121. package/dist/esm/admin/exchange.d.ts +30 -0
  122. package/dist/esm/admin/exchange.d.ts.map +1 -0
  123. package/dist/esm/admin/exchange.js +223 -0
  124. package/dist/esm/admin/exchange.js.map +1 -0
  125. package/dist/esm/admin/fulfillment-provider.d.ts +9 -0
  126. package/dist/esm/admin/fulfillment-provider.d.ts.map +1 -0
  127. package/dist/esm/admin/fulfillment-provider.js +24 -0
  128. package/dist/esm/admin/fulfillment-provider.js.map +1 -0
  129. package/dist/esm/admin/fulfillment-set.d.ts +13 -0
  130. package/dist/esm/admin/fulfillment-set.d.ts.map +1 -0
  131. package/dist/esm/admin/fulfillment-set.js +60 -0
  132. package/dist/esm/admin/fulfillment-set.js.map +1 -0
  133. package/dist/esm/admin/fulfillment.d.ts +11 -0
  134. package/dist/esm/admin/fulfillment.d.ts.map +1 -0
  135. package/dist/esm/admin/fulfillment.js +44 -0
  136. package/dist/esm/admin/fulfillment.js.map +1 -0
  137. package/dist/esm/admin/index.d.ts +87 -0
  138. package/dist/esm/admin/index.d.ts.map +1 -0
  139. package/dist/esm/admin/index.js +87 -0
  140. package/dist/esm/admin/index.js.map +1 -0
  141. package/dist/esm/admin/inventory-item.d.ts +17 -0
  142. package/dist/esm/admin/inventory-item.d.ts.map +1 -0
  143. package/dist/esm/admin/inventory-item.js +95 -0
  144. package/dist/esm/admin/inventory-item.js.map +1 -0
  145. package/dist/esm/admin/invite.d.ts +26 -0
  146. package/dist/esm/admin/invite.d.ts.map +1 -0
  147. package/dist/esm/admin/invite.js +79 -0
  148. package/dist/esm/admin/invite.js.map +1 -0
  149. package/dist/esm/admin/notification.d.ts +10 -0
  150. package/dist/esm/admin/notification.d.ts.map +1 -0
  151. package/dist/esm/admin/notification.js +33 -0
  152. package/dist/esm/admin/notification.js.map +1 -0
  153. package/dist/esm/admin/order-edit.d.ts +16 -0
  154. package/dist/esm/admin/order-edit.d.ts.map +1 -0
  155. package/dist/esm/admin/order-edit.js +91 -0
  156. package/dist/esm/admin/order-edit.js.map +1 -0
  157. package/dist/esm/admin/order.d.ts +32 -0
  158. package/dist/esm/admin/order.d.ts.map +1 -0
  159. package/dist/esm/admin/order.js +94 -0
  160. package/dist/esm/admin/order.js.map +1 -0
  161. package/dist/esm/admin/payment-collection.d.ts +13 -0
  162. package/dist/esm/admin/payment-collection.d.ts.map +1 -0
  163. package/dist/esm/admin/payment-collection.js +59 -0
  164. package/dist/esm/admin/payment-collection.js.map +1 -0
  165. package/dist/esm/admin/payment.d.ts +13 -0
  166. package/dist/esm/admin/payment.d.ts.map +1 -0
  167. package/dist/esm/admin/payment.js +59 -0
  168. package/dist/esm/admin/payment.js.map +1 -0
  169. package/dist/esm/admin/price-list.d.ts +15 -0
  170. package/dist/esm/admin/price-list.d.ts.map +1 -0
  171. package/dist/esm/admin/price-list.js +81 -0
  172. package/dist/esm/admin/price-list.js.map +1 -0
  173. package/dist/esm/admin/price-preference.d.ts +13 -0
  174. package/dist/esm/admin/price-preference.d.ts.map +1 -0
  175. package/dist/esm/admin/price-preference.js +61 -0
  176. package/dist/esm/admin/price-preference.js.map +1 -0
  177. package/dist/esm/admin/product-category.d.ts +14 -0
  178. package/dist/esm/admin/product-category.d.ts.map +1 -0
  179. package/dist/esm/admin/product-category.js +69 -0
  180. package/dist/esm/admin/product-category.js.map +1 -0
  181. package/dist/esm/admin/product-collection.d.ts +14 -0
  182. package/dist/esm/admin/product-collection.d.ts.map +1 -0
  183. package/dist/esm/admin/product-collection.js +68 -0
  184. package/dist/esm/admin/product-collection.js.map +1 -0
  185. package/dist/esm/admin/product-tag.d.ts +13 -0
  186. package/dist/esm/admin/product-tag.d.ts.map +1 -0
  187. package/dist/esm/admin/product-tag.js +59 -0
  188. package/dist/esm/admin/product-tag.js.map +1 -0
  189. package/dist/esm/admin/product-type.d.ts +13 -0
  190. package/dist/esm/admin/product-type.d.ts.map +1 -0
  191. package/dist/esm/admin/product-type.js +59 -0
  192. package/dist/esm/admin/product-type.js.map +1 -0
  193. package/dist/esm/admin/product-variant.d.ts +9 -0
  194. package/dist/esm/admin/product-variant.d.ts.map +1 -0
  195. package/dist/esm/admin/product-variant.js +23 -0
  196. package/dist/esm/admin/product-variant.js.map +1 -0
  197. package/dist/esm/admin/product.d.ts +29 -0
  198. package/dist/esm/admin/product.d.ts.map +1 -0
  199. package/dist/esm/admin/product.js +211 -0
  200. package/dist/esm/admin/product.js.map +1 -0
  201. package/dist/esm/admin/promotion.d.ts +19 -0
  202. package/dist/esm/admin/promotion.d.ts.map +1 -0
  203. package/dist/esm/admin/promotion.js +110 -0
  204. package/dist/esm/admin/promotion.js.map +1 -0
  205. package/dist/esm/admin/refund-reasons.d.ts +9 -0
  206. package/dist/esm/admin/refund-reasons.d.ts.map +1 -0
  207. package/dist/esm/admin/refund-reasons.js +23 -0
  208. package/dist/esm/admin/refund-reasons.js.map +1 -0
  209. package/dist/esm/admin/region.d.ts +21 -0
  210. package/dist/esm/admin/region.d.ts.map +1 -0
  211. package/dist/esm/admin/region.js +59 -0
  212. package/dist/esm/admin/region.js.map +1 -0
  213. package/dist/esm/admin/reservation.d.ts +14 -0
  214. package/dist/esm/admin/reservation.d.ts.map +1 -0
  215. package/dist/esm/admin/reservation.js +62 -0
  216. package/dist/esm/admin/reservation.js.map +1 -0
  217. package/dist/esm/admin/return-reason.d.ts +13 -0
  218. package/dist/esm/admin/return-reason.d.ts.map +1 -0
  219. package/dist/esm/admin/return-reason.js +60 -0
  220. package/dist/esm/admin/return-reason.js.map +1 -0
  221. package/dist/esm/admin/return.d.ts +30 -0
  222. package/dist/esm/admin/return.d.ts.map +1 -0
  223. package/dist/esm/admin/return.js +224 -0
  224. package/dist/esm/admin/return.js.map +1 -0
  225. package/dist/esm/admin/sales-channel.d.ts +15 -0
  226. package/dist/esm/admin/sales-channel.d.ts.map +1 -0
  227. package/dist/esm/admin/sales-channel.js +79 -0
  228. package/dist/esm/admin/sales-channel.js.map +1 -0
  229. package/dist/esm/admin/shipping-option.d.ts +13 -0
  230. package/dist/esm/admin/shipping-option.d.ts.map +1 -0
  231. package/dist/esm/admin/shipping-option.js +61 -0
  232. package/dist/esm/admin/shipping-option.js.map +1 -0
  233. package/dist/esm/admin/shipping-profile.d.ts +13 -0
  234. package/dist/esm/admin/shipping-profile.d.ts.map +1 -0
  235. package/dist/esm/admin/shipping-profile.js +61 -0
  236. package/dist/esm/admin/shipping-profile.js.map +1 -0
  237. package/dist/esm/admin/stock-location.d.ts +16 -0
  238. package/dist/esm/admin/stock-location.d.ts.map +1 -0
  239. package/dist/esm/admin/stock-location.js +88 -0
  240. package/dist/esm/admin/stock-location.js.map +1 -0
  241. package/dist/esm/admin/store.d.ts +11 -0
  242. package/dist/esm/admin/store.d.ts.map +1 -0
  243. package/dist/esm/admin/store.js +43 -0
  244. package/dist/esm/admin/store.js.map +1 -0
  245. package/dist/esm/admin/tax-rate.d.ts +13 -0
  246. package/dist/esm/admin/tax-rate.d.ts.map +1 -0
  247. package/dist/esm/admin/tax-rate.js +62 -0
  248. package/dist/esm/admin/tax-rate.js.map +1 -0
  249. package/dist/esm/admin/tax-region.d.ts +12 -0
  250. package/dist/esm/admin/tax-region.d.ts.map +1 -0
  251. package/dist/esm/admin/tax-region.js +53 -0
  252. package/dist/esm/admin/tax-region.js.map +1 -0
  253. package/dist/esm/admin/upload.d.ts +15 -0
  254. package/dist/esm/admin/upload.d.ts.map +1 -0
  255. package/dist/esm/admin/upload.js +59 -0
  256. package/dist/esm/admin/upload.js.map +1 -0
  257. package/dist/esm/admin/user.d.ts +14 -0
  258. package/dist/esm/admin/user.d.ts.map +1 -0
  259. package/dist/esm/admin/user.js +67 -0
  260. package/dist/esm/admin/user.js.map +1 -0
  261. package/dist/esm/admin/workflow-execution.d.ts +10 -0
  262. package/dist/esm/admin/workflow-execution.d.ts.map +1 -0
  263. package/dist/esm/admin/workflow-execution.js +30 -0
  264. package/dist/esm/admin/workflow-execution.js.map +1 -0
  265. package/dist/esm/auth/index.d.ts +17 -0
  266. package/dist/esm/auth/index.d.ts.map +1 -0
  267. package/dist/esm/auth/index.js +78 -0
  268. package/dist/esm/auth/index.js.map +1 -0
  269. package/dist/esm/client.d.ts +59 -0
  270. package/dist/esm/client.d.ts.map +1 -0
  271. package/dist/esm/client.js +229 -0
  272. package/dist/esm/client.js.map +1 -0
  273. package/dist/esm/index.d.ts +15 -0
  274. package/dist/esm/index.d.ts.map +1 -0
  275. package/dist/esm/index.js +15 -0
  276. package/dist/esm/index.js.map +1 -0
  277. package/dist/esm/store/index.d.ts +116 -0
  278. package/dist/esm/store/index.d.ts.map +1 -0
  279. package/dist/esm/store/index.js +240 -0
  280. package/dist/esm/store/index.js.map +1 -0
  281. package/dist/esm/types.d.ts +47 -0
  282. package/dist/esm/types.d.ts.map +1 -0
  283. package/dist/esm/types.js +2 -0
  284. package/dist/esm/types.js.map +1 -0
  285. package/dist/index.js +14 -10
  286. package/dist/index.js.map +1 -1
  287. package/dist/store/index.d.ts.map +1 -1
  288. package/dist/store/index.js +5 -1
  289. package/dist/store/index.js.map +1 -1
  290. package/dist/types.js +2 -1
  291. package/package.json +15 -7
@@ -0,0 +1,23 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ export class ProductVariant {
11
+ constructor(client) {
12
+ this.client = client;
13
+ }
14
+ list(queryParams, headers) {
15
+ return __awaiter(this, void 0, void 0, function* () {
16
+ return yield this.client.fetch(`/admin/product-variants`, {
17
+ headers,
18
+ query: queryParams,
19
+ });
20
+ });
21
+ }
22
+ }
23
+ //# sourceMappingURL=product-variant.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product-variant.js","sourceRoot":"","sources":["../../../src/admin/product-variant.ts"],"names":[],"mappings":";;;;;;;;;AAIA,MAAM,OAAO,cAAc;IAEzB,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;IAEK,IAAI,CACR,WAAiD,EACjD,OAAuB;;YAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,yBAAyB,EACzB;gBACE,OAAO;gBACP,KAAK,EAAE,WAAW;aACnB,CACF,CAAA;QACH,CAAC;KAAA;CACF"}
@@ -0,0 +1,29 @@
1
+ import { HttpTypes, SelectParams } from "@medusajs/types";
2
+ import { Client } from "../client";
3
+ import { ClientHeaders } from "../types";
4
+ export declare class Product {
5
+ private client;
6
+ constructor(client: Client);
7
+ import(body: HttpTypes.AdminImportProductRequest, query?: {}, headers?: ClientHeaders): Promise<HttpTypes.AdminImportProductResponse>;
8
+ confirmImport(transactionId: string, query?: {}, headers?: ClientHeaders): Promise<{}>;
9
+ export(body: HttpTypes.AdminExportProductRequest, query?: HttpTypes.AdminProductListParams, headers?: ClientHeaders): Promise<HttpTypes.AdminExportProductResponse>;
10
+ batch(body: HttpTypes.AdminBatchProductRequest, query?: SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminBatchProductResponse>;
11
+ create(body: HttpTypes.AdminCreateProduct, query?: SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminProductResponse>;
12
+ update(id: string, body: HttpTypes.AdminUpdateProduct, query?: SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminProductResponse>;
13
+ list(queryParams?: HttpTypes.AdminProductListParams, headers?: ClientHeaders): Promise<HttpTypes.AdminProductListResponse>;
14
+ retrieve(id: string, query?: SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminProductResponse>;
15
+ delete(id: string, headers?: ClientHeaders): Promise<HttpTypes.AdminProductDeleteResponse>;
16
+ batchVariants(productId: string, body: HttpTypes.AdminBatchProductVariantRequest, query?: SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminBatchProductVariantResponse>;
17
+ createVariant(productId: string, body: HttpTypes.AdminCreateProductVariant, query?: SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminProductResponse>;
18
+ updateVariant(productId: string, id: string, body: HttpTypes.AdminUpdateProductVariant, query?: SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminProductResponse>;
19
+ listVariants(productId: string, queryParams?: HttpTypes.AdminProductVariantParams, headers?: ClientHeaders): Promise<HttpTypes.AdminProductVariantListResponse>;
20
+ retrieveVariant(productId: string, id: string, query?: SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminProductVariantResponse>;
21
+ deleteVariant(productId: string, id: string, headers?: ClientHeaders): Promise<HttpTypes.AdminProductVariantDeleteResponse>;
22
+ batchVariantInventoryItems(productId: string, body: HttpTypes.AdminBatchProductVariantInventoryItemRequest, query?: SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminBatchProductVariantInventoryItemResponse>;
23
+ createOption(productId: string, body: HttpTypes.AdminCreateProductOption, query?: SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminProductResponse>;
24
+ updateOption(productId: string, id: string, body: HttpTypes.AdminUpdateProductOption, query?: SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminProductResponse>;
25
+ listOptions(productId: string, queryParams?: HttpTypes.AdminProductOptionParams, headers?: ClientHeaders): Promise<HttpTypes.AdminProductOptionListResponse>;
26
+ retrieveOption(productId: string, id: string, query?: SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminProductOptionResponse>;
27
+ deleteOption(productId: string, id: string, headers?: ClientHeaders): Promise<HttpTypes.AdminProductOptionDeleteResponse>;
28
+ }
29
+ //# sourceMappingURL=product.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product.d.ts","sourceRoot":"","sources":["../../../src/admin/product.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAClC,OAA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IAWnB,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa;CAS1E"}
@@ -0,0 +1,211 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ export class Product {
11
+ constructor(client) {
12
+ this.client = client;
13
+ }
14
+ import(body, query, headers) {
15
+ return __awaiter(this, void 0, void 0, function* () {
16
+ const form = new FormData();
17
+ form.append("file", body.file);
18
+ return yield this.client.fetch(`/admin/products/import`, {
19
+ method: "POST",
20
+ headers: Object.assign(Object.assign({}, headers), {
21
+ // Let the browser determine the content type.
22
+ "content-type": null }),
23
+ body: form,
24
+ query,
25
+ });
26
+ });
27
+ }
28
+ confirmImport(transactionId, query, headers) {
29
+ return __awaiter(this, void 0, void 0, function* () {
30
+ return yield this.client.fetch(`/admin/products/import/${transactionId}/confirm`, {
31
+ method: "POST",
32
+ headers,
33
+ body: {},
34
+ query,
35
+ });
36
+ });
37
+ }
38
+ export(body, query, headers) {
39
+ return __awaiter(this, void 0, void 0, function* () {
40
+ return yield this.client.fetch(`/admin/products/export`, {
41
+ method: "POST",
42
+ headers,
43
+ body,
44
+ query,
45
+ });
46
+ });
47
+ }
48
+ batch(body, query, headers) {
49
+ return __awaiter(this, void 0, void 0, function* () {
50
+ return yield this.client.fetch(`/admin/products/batch`, {
51
+ method: "POST",
52
+ headers,
53
+ body,
54
+ query,
55
+ });
56
+ });
57
+ }
58
+ create(body, query, headers) {
59
+ return __awaiter(this, void 0, void 0, function* () {
60
+ return yield this.client.fetch(`/admin/products`, {
61
+ method: "POST",
62
+ headers,
63
+ body,
64
+ query,
65
+ });
66
+ });
67
+ }
68
+ update(id, body, query, headers) {
69
+ return __awaiter(this, void 0, void 0, function* () {
70
+ return yield this.client.fetch(`/admin/products/${id}`, {
71
+ method: "POST",
72
+ headers,
73
+ body,
74
+ query,
75
+ });
76
+ });
77
+ }
78
+ list(queryParams, headers) {
79
+ return __awaiter(this, void 0, void 0, function* () {
80
+ return yield this.client.fetch(`/admin/products`, {
81
+ headers,
82
+ query: queryParams,
83
+ });
84
+ });
85
+ }
86
+ retrieve(id, query, headers) {
87
+ return __awaiter(this, void 0, void 0, function* () {
88
+ return yield this.client.fetch(`/admin/products/${id}`, {
89
+ query,
90
+ headers,
91
+ });
92
+ });
93
+ }
94
+ delete(id, headers) {
95
+ return __awaiter(this, void 0, void 0, function* () {
96
+ return yield this.client.fetch(`/admin/products/${id}`, {
97
+ method: "DELETE",
98
+ headers,
99
+ });
100
+ });
101
+ }
102
+ batchVariants(productId, body, query, headers) {
103
+ return __awaiter(this, void 0, void 0, function* () {
104
+ return yield this.client.fetch(`/admin/products/${productId}/variants/batch`, {
105
+ method: "POST",
106
+ headers,
107
+ body,
108
+ query,
109
+ });
110
+ });
111
+ }
112
+ createVariant(productId, body, query, headers) {
113
+ return __awaiter(this, void 0, void 0, function* () {
114
+ return yield this.client.fetch(`/admin/products/${productId}/variants`, {
115
+ method: "POST",
116
+ headers,
117
+ body,
118
+ query,
119
+ });
120
+ });
121
+ }
122
+ updateVariant(productId, id, body, query, headers) {
123
+ return __awaiter(this, void 0, void 0, function* () {
124
+ return yield this.client.fetch(`/admin/products/${productId}/variants/${id}`, {
125
+ method: "POST",
126
+ headers,
127
+ body,
128
+ query,
129
+ });
130
+ });
131
+ }
132
+ listVariants(productId, queryParams, headers) {
133
+ return __awaiter(this, void 0, void 0, function* () {
134
+ return yield this.client.fetch(`/admin/products/${productId}/variants`, {
135
+ headers,
136
+ query: queryParams,
137
+ });
138
+ });
139
+ }
140
+ retrieveVariant(productId, id, query, headers) {
141
+ return __awaiter(this, void 0, void 0, function* () {
142
+ return yield this.client.fetch(`/admin/products/${productId}/variants/${id}`, {
143
+ query,
144
+ headers,
145
+ });
146
+ });
147
+ }
148
+ deleteVariant(productId, id, headers) {
149
+ return __awaiter(this, void 0, void 0, function* () {
150
+ return yield this.client.fetch(`/admin/products/${productId}/variants/${id}`, {
151
+ method: "DELETE",
152
+ headers,
153
+ });
154
+ });
155
+ }
156
+ batchVariantInventoryItems(productId, body, query, headers) {
157
+ return __awaiter(this, void 0, void 0, function* () {
158
+ return yield this.client.fetch(`/admin/products/${productId}/variants/inventory-items/batch`, {
159
+ method: "POST",
160
+ headers,
161
+ body,
162
+ query,
163
+ });
164
+ });
165
+ }
166
+ createOption(productId, body, query, headers) {
167
+ return __awaiter(this, void 0, void 0, function* () {
168
+ return yield this.client.fetch(`/admin/products/${productId}/options`, {
169
+ method: "POST",
170
+ headers,
171
+ body,
172
+ query,
173
+ });
174
+ });
175
+ }
176
+ updateOption(productId, id, body, query, headers) {
177
+ return __awaiter(this, void 0, void 0, function* () {
178
+ return yield this.client.fetch(`/admin/products/${productId}/options/${id}`, {
179
+ method: "POST",
180
+ headers,
181
+ body,
182
+ query,
183
+ });
184
+ });
185
+ }
186
+ listOptions(productId, queryParams, headers) {
187
+ return __awaiter(this, void 0, void 0, function* () {
188
+ return yield this.client.fetch(`/admin/products/${productId}/options`, {
189
+ headers,
190
+ query: queryParams,
191
+ });
192
+ });
193
+ }
194
+ retrieveOption(productId, id, query, headers) {
195
+ return __awaiter(this, void 0, void 0, function* () {
196
+ return yield this.client.fetch(`/admin/products/${productId}/options/${id}`, {
197
+ query,
198
+ headers,
199
+ });
200
+ });
201
+ }
202
+ deleteOption(productId, id, headers) {
203
+ return __awaiter(this, void 0, void 0, function* () {
204
+ return yield this.client.fetch(`/admin/products/${productId}/options/${id}`, {
205
+ method: "DELETE",
206
+ headers,
207
+ });
208
+ });
209
+ }
210
+ }
211
+ //# sourceMappingURL=product.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product.js","sourceRoot":"","sources":["../../../src/admin/product.ts"],"names":[],"mappings":";;;;;;;;;AAIA,MAAM,OAAO,OAAO;IAElB,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;IAEK,MAAM,CACV,IAAyC,EACzC,KAAU,EACV,OAAuB;;YAEvB,MAAM,IAAI,GAAG,IAAI,QAAQ,EAAE,CAAA;YAC3B,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA;YAE9B,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,wBAAwB,EACxB;gBACE,MAAM,EAAE,MAAM;gBACd,OAAO,kCACF,OAAO;oBACV,8CAA8C;oBAC9C,cAAc,EAAE,IAAI,GACrB;gBACD,IAAI,EAAE,IAAI;gBACV,KAAK;aACN,CACF,CAAA;QACH,CAAC;KAAA;IAEK,aAAa,CACjB,aAAqB,EACrB,KAAU,EACV,OAAuB;;YAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,0BAA0B,aAAa,UAAU,EACjD;gBACE,MAAM,EAAE,MAAM;gBACd,OAAO;gBACP,IAAI,EAAE,EAAE;gBACR,KAAK;aACN,CACF,CAAA;QACH,CAAC;KAAA;IAEK,MAAM,CACV,IAAyC,EACzC,KAAwC,EACxC,OAAuB;;YAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,wBAAwB,EACxB;gBACE,MAAM,EAAE,MAAM;gBACd,OAAO;gBACP,IAAI;gBACJ,KAAK;aACN,CACF,CAAA;QACH,CAAC;KAAA;IAEK,KAAK,CACT,IAAwC,EACxC,KAAoB,EACpB,OAAuB;;YAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,uBAAuB,EACvB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,YAAY,CAAC,SAAiB,EAAE,EAAU,EAAE,OAAuB;;YACvE,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,mBAAmB,SAAS,YAAY,EAAE,EAAE,EAC5C;gBACE,MAAM,EAAE,QAAQ;gBAChB,OAAO;aACR,CACF,CAAA;QACH,CAAC;KAAA;CACF"}
@@ -0,0 +1,19 @@
1
+ import { HttpTypes } from "@medusajs/types";
2
+ import { Client } from "../client";
3
+ import { ClientHeaders } from "../types";
4
+ export declare class Promotion {
5
+ private client;
6
+ constructor(client: Client);
7
+ retrieve(id: string, query?: HttpTypes.AdminGetPromotionParams, headers?: ClientHeaders): Promise<HttpTypes.AdminPromotionResponse>;
8
+ list(query?: HttpTypes.AdminGetPromotionsParams, headers?: ClientHeaders): Promise<HttpTypes.AdminPromotionListResponse>;
9
+ create(payload: HttpTypes.AdminCreatePromotion, headers?: ClientHeaders): Promise<HttpTypes.AdminPromotionResponse>;
10
+ update(id: string, payload: HttpTypes.AdminUpdatePromotion, headers?: ClientHeaders): Promise<HttpTypes.AdminPromotionResponse>;
11
+ delete(id: string, headers?: ClientHeaders): Promise<HttpTypes.DeleteResponse<"promotion">>;
12
+ addRules(id: string, ruleType: string, payload: HttpTypes.BatchAddPromotionRulesReq, headers?: ClientHeaders): Promise<HttpTypes.AdminPromotionResponse>;
13
+ updateRules(id: string, ruleType: string, payload: HttpTypes.BatchUpdatePromotionRulesReq, headers?: ClientHeaders): Promise<HttpTypes.AdminPromotionResponse>;
14
+ removeRules(id: string, ruleType: string, payload: HttpTypes.BatchRemovePromotionRulesReq, headers?: ClientHeaders): Promise<HttpTypes.AdminPromotionResponse>;
15
+ listRules(id: string | null, ruleType: string, query?: HttpTypes.AdminGetPromotionRuleParams, headers?: ClientHeaders): Promise<HttpTypes.AdminRuleAttributeOptionsListResponse>;
16
+ listRuleAttributes(ruleType: string, promotionType?: string, headers?: ClientHeaders): Promise<HttpTypes.AdminRuleAttributeOptionsListResponse>;
17
+ listRuleValues(ruleType: string, ruleValue: string, query?: HttpTypes.AdminGetPromotionsRuleValueParams, headers?: ClientHeaders): Promise<HttpTypes.AdminRuleValueOptionsListResponse>;
18
+ }
19
+ //# sourceMappingURL=promotion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"promotion.d.ts","sourceRoot":"","sources":["../../../src/admin/promotion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,qBAAa,SAAS;IACpB,OAAO,CAAC,MAAM,CAAQ;gBACV,MAAM,EAAE,MAAM;IAIpB,QAAQ,CACZ,EAAE,EAAE,MAAM,EACV,KAAK,CAAC,EAAE,SAAS,CAAC,uBAAuB,EACzC,OAAO,CAAC,EAAE,aAAa;IAWnB,IAAI,CACR,KAAK,CAAC,EAAE,SAAS,CAAC,wBAAwB,EAC1C,OAAO,CAAC,EAAE,aAAa;IAWnB,MAAM,CACV,OAAO,EAAE,SAAS,CAAC,oBAAoB,EACvC,OAAO,CAAC,EAAE,aAAa;IAYnB,MAAM,CACV,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,SAAS,CAAC,oBAAoB,EACvC,OAAO,CAAC,EAAE,aAAa;IAYnB,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa;IAU1C,QAAQ,CACZ,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,SAAS,CAAC,yBAAyB,EAC5C,OAAO,CAAC,EAAE,aAAa;IAYnB,WAAW,CACf,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,SAAS,CAAC,4BAA4B,EAC/C,OAAO,CAAC,EAAE,aAAa;IAYnB,WAAW,CACf,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,SAAS,CAAC,4BAA4B,EAC/C,OAAO,CAAC,EAAE,aAAa;IAYnB,SAAS,CACb,EAAE,EAAE,MAAM,GAAG,IAAI,EACjB,QAAQ,EAAE,MAAM,EAChB,KAAK,CAAC,EAAE,SAAS,CAAC,2BAA2B,EAC7C,OAAO,CAAC,EAAE,aAAa;IAYnB,kBAAkB,CACtB,QAAQ,EAAE,MAAM,EAChB,aAAa,CAAC,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,aAAa;IAYnB,cAAc,CAClB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,KAAK,CAAC,EAAE,SAAS,CAAC,iCAAiC,EACnD,OAAO,CAAC,EAAE,aAAa;CAU1B"}
@@ -0,0 +1,110 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ export class Promotion {
11
+ constructor(client) {
12
+ this.client = client;
13
+ }
14
+ retrieve(id, query, headers) {
15
+ return __awaiter(this, void 0, void 0, function* () {
16
+ return yield this.client.fetch(`/admin/promotions/${id}`, {
17
+ headers,
18
+ query,
19
+ });
20
+ });
21
+ }
22
+ list(query, headers) {
23
+ return __awaiter(this, void 0, void 0, function* () {
24
+ return yield this.client.fetch(`/admin/promotions`, {
25
+ headers,
26
+ query,
27
+ });
28
+ });
29
+ }
30
+ create(payload, headers) {
31
+ return __awaiter(this, void 0, void 0, function* () {
32
+ return yield this.client.fetch(`/admin/promotions`, {
33
+ method: "POST",
34
+ headers,
35
+ body: payload,
36
+ });
37
+ });
38
+ }
39
+ update(id, payload, headers) {
40
+ return __awaiter(this, void 0, void 0, function* () {
41
+ return yield this.client.fetch(`/admin/promotions/${id}`, {
42
+ method: "POST",
43
+ headers,
44
+ body: payload,
45
+ });
46
+ });
47
+ }
48
+ delete(id, headers) {
49
+ return __awaiter(this, void 0, void 0, function* () {
50
+ return yield this.client.fetch(`/admin/promotions/${id}`, {
51
+ method: "DELETE",
52
+ headers,
53
+ });
54
+ });
55
+ }
56
+ addRules(id, ruleType, payload, headers) {
57
+ return __awaiter(this, void 0, void 0, function* () {
58
+ return yield this.client.fetch(`/admin/promotions/${id}/${ruleType}/batch`, {
59
+ method: "POST",
60
+ headers,
61
+ body: { create: payload.rules },
62
+ });
63
+ });
64
+ }
65
+ updateRules(id, ruleType, payload, headers) {
66
+ return __awaiter(this, void 0, void 0, function* () {
67
+ return yield this.client.fetch(`/admin/promotions/${id}/${ruleType}/batch`, {
68
+ method: "POST",
69
+ headers,
70
+ body: { update: payload.rules },
71
+ });
72
+ });
73
+ }
74
+ removeRules(id, ruleType, payload, headers) {
75
+ return __awaiter(this, void 0, void 0, function* () {
76
+ return yield this.client.fetch(`/admin/promotions/${id}/${ruleType}/batch`, {
77
+ method: "POST",
78
+ headers,
79
+ body: { delete: payload.rule_ids },
80
+ });
81
+ });
82
+ }
83
+ listRules(id, ruleType, query, headers) {
84
+ return __awaiter(this, void 0, void 0, function* () {
85
+ // eslint-disable-next-line max-len
86
+ return yield this.client.fetch(`/admin/promotions/${id}/${ruleType}`, {
87
+ headers,
88
+ query,
89
+ });
90
+ });
91
+ }
92
+ listRuleAttributes(ruleType, promotionType, headers) {
93
+ return __awaiter(this, void 0, void 0, function* () {
94
+ // eslint-disable-next-line max-len
95
+ return yield this.client.fetch(`/admin/promotions/rule-attribute-options/${ruleType}`, {
96
+ headers,
97
+ query: { promotion_type: promotionType },
98
+ });
99
+ });
100
+ }
101
+ listRuleValues(ruleType, ruleValue, query, headers) {
102
+ return __awaiter(this, void 0, void 0, function* () {
103
+ return yield this.client.fetch(`/admin/promotions/rule-value-options/${ruleType}/${ruleValue}`, {
104
+ headers,
105
+ query,
106
+ });
107
+ });
108
+ }
109
+ }
110
+ //# sourceMappingURL=promotion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"promotion.js","sourceRoot":"","sources":["../../../src/admin/promotion.ts"],"names":[],"mappings":";;;;;;;;;AAIA,MAAM,OAAO,SAAS;IAEpB,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;IAEK,QAAQ,CACZ,EAAU,EACV,KAAyC,EACzC,OAAuB;;YAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,qBAAqB,EAAE,EAAE,EACzB;gBACE,OAAO;gBACP,KAAK;aACN,CACF,CAAA;QACH,CAAC;KAAA;IAEK,IAAI,CACR,KAA0C,EAC1C,OAAuB;;YAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,mBAAmB,EACnB;gBACE,OAAO;gBACP,KAAK;aACN,CACF,CAAA;QACH,CAAC;KAAA;IAEK,MAAM,CACV,OAAuC,EACvC,OAAuB;;YAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,mBAAmB,EACnB;gBACE,MAAM,EAAE,MAAM;gBACd,OAAO;gBACP,IAAI,EAAE,OAAO;aACd,CACF,CAAA;QACH,CAAC;KAAA;IAEK,MAAM,CACV,EAAU,EACV,OAAuC,EACvC,OAAuB;;YAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,qBAAqB,EAAE,EAAE,EACzB;gBACE,MAAM,EAAE,MAAM;gBACd,OAAO;gBACP,IAAI,EAAE,OAAO;aACd,CACF,CAAA;QACH,CAAC;KAAA;IAEK,MAAM,CAAC,EAAU,EAAE,OAAuB;;YAC9C,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK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B,CACtB,QAAgB,EAChB,aAAsB,EACtB,OAAuB;;YAEvB,mCAAmC;YACnC,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,4CAA4C,QAAQ,EAAE,EACtD;gBACE,OAAO;gBACP,KAAK,EAAE,EAAE,cAAc,EAAE,aAAa,EAAE;aACzC,CACF,CAAA;QACH,CAAC;KAAA;IAEK,cAAc,CAClB,QAAgB,EAChB,SAAiB,EACjB,KAAmD,EACnD,OAAuB;;YAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,wCAAwC,QAAQ,IAAI,SAAS,EAAE,EAC/D;gBACE,OAAO;gBACP,KAAK;aACN,CACF,CAAA;QACH,CAAC;KAAA;CACF"}
@@ -0,0 +1,9 @@
1
+ import { HttpTypes } from "@medusajs/types";
2
+ import { Client } from "../client";
3
+ import { ClientHeaders } from "../types";
4
+ export declare class RefundReason {
5
+ private client;
6
+ constructor(client: Client);
7
+ list(query?: HttpTypes.RefundReasonFilters, headers?: ClientHeaders): Promise<HttpTypes.RefundReasonsResponse>;
8
+ }
9
+ //# sourceMappingURL=refund-reasons.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"refund-reasons.d.ts","sourceRoot":"","sources":["../../../src/admin/refund-reasons.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,qBAAa,YAAY;IACvB,OAAO,CAAC,MAAM,CAAQ;gBACV,MAAM,EAAE,MAAM;IAIpB,IAAI,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,mBAAmB,EAAE,OAAO,CAAC,EAAE,aAAa;CAS1E"}
@@ -0,0 +1,23 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ export class RefundReason {
11
+ constructor(client) {
12
+ this.client = client;
13
+ }
14
+ list(query, headers) {
15
+ return __awaiter(this, void 0, void 0, function* () {
16
+ return yield this.client.fetch(`/admin/refund-reasons`, {
17
+ query,
18
+ headers,
19
+ });
20
+ });
21
+ }
22
+ }
23
+ //# sourceMappingURL=refund-reasons.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"refund-reasons.js","sourceRoot":"","sources":["../../../src/admin/refund-reasons.ts"],"names":[],"mappings":";;;;;;;;;AAIA,MAAM,OAAO,YAAY;IAEvB,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;IAEK,IAAI,CAAC,KAAqC,EAAE,OAAuB;;YACvE,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,uBAAuB,EACvB;gBACE,KAAK;gBACL,OAAO;aACR,CACF,CAAA;QACH,CAAC;KAAA;CACF"}
@@ -0,0 +1,21 @@
1
+ import { FindParams, HttpTypes, SelectParams } from "@medusajs/types";
2
+ import { Client } from "../client";
3
+ import { ClientHeaders } from "../types";
4
+ export declare class Region {
5
+ private client;
6
+ constructor(client: Client);
7
+ create(body: HttpTypes.AdminCreateRegion, query?: SelectParams, headers?: ClientHeaders): Promise<{
8
+ region: HttpTypes.AdminRegion;
9
+ }>;
10
+ update(id: string, body: HttpTypes.AdminUpdateRegion, query?: SelectParams, headers?: ClientHeaders): Promise<{
11
+ region: HttpTypes.AdminRegion;
12
+ }>;
13
+ list(queryParams?: FindParams & HttpTypes.AdminRegionFilters, headers?: ClientHeaders): Promise<HttpTypes.PaginatedResponse<{
14
+ regions: HttpTypes.AdminRegion[];
15
+ }>>;
16
+ retrieve(id: string, query?: SelectParams, headers?: ClientHeaders): Promise<{
17
+ region: HttpTypes.AdminRegion;
18
+ }>;
19
+ delete(id: string, headers?: ClientHeaders): Promise<HttpTypes.AdminRegionDeleteResponse>;
20
+ }
21
+ //# sourceMappingURL=region.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"region.d.ts","sourceRoot":"","sources":["../../../src/admin/region.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,SAAS,EAET,YAAY,EACb,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,qBAAa,MAAM;IACjB,OAAO,CAAC,MAAM,CAAQ;gBACV,MAAM,EAAE,MAAM;IAIpB,MAAM,CACV,IAAI,EAAE,SAAS,CAAC,iBAAiB,EACjC,KAAK,CAAC,EAAE,YAAY,EACpB,OAAO,CAAC,EAAE,aAAa;gBAEkB,SAAS,CAAC,WAAW;;IAW1D,MAAM,CACV,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,SAAS,CAAC,iBAAiB,EACjC,KAAK,CAAC,EAAE,YAAY,EACpB,OAAO,CAAC,EAAE,aAAa;gBAEkB,SAAS,CAAC,WAAW;;IAW1D,IAAI,CACR,WAAW,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC,kBAAkB,EACvD,OAAO,CAAC,EAAE,aAAa;iBAGQ,SAAS,CAAC,WAAW,EAAE;;IAOlD,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,aAAa;gBAC7B,SAAS,CAAC,WAAW;;IAS1D,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa;CASjD"}
@@ -0,0 +1,59 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ export class Region {
11
+ constructor(client) {
12
+ this.client = client;
13
+ }
14
+ create(body, query, headers) {
15
+ return __awaiter(this, void 0, void 0, function* () {
16
+ return yield this.client.fetch(`/admin/regions`, {
17
+ method: "POST",
18
+ headers,
19
+ body,
20
+ query,
21
+ });
22
+ });
23
+ }
24
+ update(id, body, query, headers) {
25
+ return __awaiter(this, void 0, void 0, function* () {
26
+ return yield this.client.fetch(`/admin/regions/${id}`, {
27
+ method: "POST",
28
+ headers,
29
+ body,
30
+ query,
31
+ });
32
+ });
33
+ }
34
+ list(queryParams, headers) {
35
+ return __awaiter(this, void 0, void 0, function* () {
36
+ return yield this.client.fetch(`/admin/regions`, {
37
+ query: queryParams,
38
+ headers,
39
+ });
40
+ });
41
+ }
42
+ retrieve(id, query, headers) {
43
+ return __awaiter(this, void 0, void 0, function* () {
44
+ return yield this.client.fetch(`/admin/regions/${id}`, {
45
+ query,
46
+ headers,
47
+ });
48
+ });
49
+ }
50
+ delete(id, headers) {
51
+ return __awaiter(this, void 0, void 0, function* () {
52
+ return yield this.client.fetch(`/admin/regions/${id}`, {
53
+ method: "DELETE",
54
+ headers,
55
+ });
56
+ });
57
+ }
58
+ }
59
+ //# sourceMappingURL=region.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"region.js","sourceRoot":"","sources":["../../../src/admin/region.ts"],"names":[],"mappings":";;;;;;;;;AASA,MAAM,OAAO,MAAM;IAEjB,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;IAEK,MAAM,CACV,IAAiC,EACjC,KAAoB,EACpB,OAAuB;;YAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,gBAAgB,EAChB;gBACE,MAAM,EAAE,MAAM;gBACd,OAAO;gBACP,IAAI;gBACJ,KAAK;aACN,CACF,CAAA;QACH,CAAC;KAAA;IAEK,MAAM,CACV,EAAU,EACV,IAAiC,EACjC,KAAoB,EACpB,OAAuB;;YAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,kBAAkB,EAAE,EAAE,EACtB;gBACE,MAAM,EAAE,MAAM;gBACd,OAAO;gBACP,IAAI;gBACJ,KAAK;aACN,CACF,CAAA;QACH,CAAC;KAAA;IAEK,IAAI,CACR,WAAuD,EACvD,OAAuB;;YAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAE5B,gBAAgB,EAAE;gBAClB,KAAK,EAAE,WAAW;gBAClB,OAAO;aACR,CAAC,CAAA;QACJ,CAAC;KAAA;IAEK,QAAQ,CAAC,EAAU,EAAE,KAAoB,EAAE,OAAuB;;YACtE,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,kBAAkB,EAAE,EAAE,EACtB;gBACE,KAAK;gBACL,OAAO;aACR,CACF,CAAA;QACH,CAAC;KAAA;IAEK,MAAM,CAAC,EAAU,EAAE,OAAuB;;YAC9C,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,kBAAkB,EAAE,EAAE,EACtB;gBACE,MAAM,EAAE,QAAQ;gBAChB,OAAO;aACR,CACF,CAAA;QACH,CAAC;KAAA;CACF"}
@@ -0,0 +1,14 @@
1
+ import { HttpTypes } from "@medusajs/types";
2
+ import { Client } from "../client";
3
+ import { ClientHeaders } from "../types";
4
+ declare class Reservation {
5
+ private client;
6
+ constructor(client: Client);
7
+ retrieve(id: string, query?: HttpTypes.AdminReservationParams, headers?: ClientHeaders): Promise<HttpTypes.AdminReservationResponse>;
8
+ list(query?: HttpTypes.AdminGetReservationsParams, headers?: ClientHeaders): Promise<HttpTypes.AdminReservationListResponse>;
9
+ create(body: HttpTypes.AdminCreateReservation, query?: HttpTypes.AdminGetReservationsParams, headers?: ClientHeaders): Promise<HttpTypes.AdminReservationResponse>;
10
+ update(id: string, body: HttpTypes.AdminUpdateReservation, query?: HttpTypes.AdminGetReservationsParams, headers?: ClientHeaders): Promise<HttpTypes.AdminReservationResponse>;
11
+ delete(id: string, headers?: ClientHeaders): Promise<HttpTypes.AdminReservationDeleteResponse>;
12
+ }
13
+ export default Reservation;
14
+ //# sourceMappingURL=reservation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reservation.d.ts","sourceRoot":"","sources":["../../../src/admin/reservation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,cAAM,WAAW;IACf,OAAO,CAAC,MAAM,CAAQ;gBACV,MAAM,EAAE,MAAM;IAIpB,QAAQ,CACZ,EAAE,EAAE,MAAM,EACV,KAAK,CAAC,EAAE,SAAS,CAAC,sBAAsB,EACxC,OAAO,CAAC,EAAE,aAAa;IAYnB,IAAI,CACR,KAAK,CAAC,EAAE,SAAS,CAAC,0BAA0B,EAC5C,OAAO,CAAC,EAAE,aAAa;IAYnB,MAAM,CACV,IAAI,EAAE,SAAS,CAAC,sBAAsB,EACtC,KAAK,CAAC,EAAE,SAAS,CAAC,0BAA0B,EAC5C,OAAO,CAAC,EAAE,aAAa;IAanB,MAAM,CACV,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,SAAS,CAAC,sBAAsB,EACtC,KAAK,CAAC,EAAE,SAAS,CAAC,0BAA0B,EAC5C,OAAO,CAAC,EAAE,aAAa;IAanB,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa;CASjD;AAED,eAAe,WAAW,CAAA"}
@@ -0,0 +1,62 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ class Reservation {
11
+ constructor(client) {
12
+ this.client = client;
13
+ }
14
+ retrieve(id, query, headers) {
15
+ return __awaiter(this, void 0, void 0, function* () {
16
+ return yield this.client.fetch(`/admin/reservations/${id}`, {
17
+ method: "GET",
18
+ headers,
19
+ query,
20
+ });
21
+ });
22
+ }
23
+ list(query, headers) {
24
+ return __awaiter(this, void 0, void 0, function* () {
25
+ return yield this.client.fetch("/admin/reservations", {
26
+ method: "GET",
27
+ query,
28
+ headers,
29
+ });
30
+ });
31
+ }
32
+ create(body, query, headers) {
33
+ return __awaiter(this, void 0, void 0, function* () {
34
+ return yield this.client.fetch("/admin/reservations", {
35
+ method: "POST",
36
+ body,
37
+ query,
38
+ headers,
39
+ });
40
+ });
41
+ }
42
+ update(id, body, query, headers) {
43
+ return __awaiter(this, void 0, void 0, function* () {
44
+ return yield this.client.fetch(`/admin/reservations/${id}`, {
45
+ method: "POST",
46
+ body,
47
+ query,
48
+ headers,
49
+ });
50
+ });
51
+ }
52
+ delete(id, headers) {
53
+ return __awaiter(this, void 0, void 0, function* () {
54
+ return yield this.client.fetch(`/admin/reservations/${id}`, {
55
+ method: "DELETE",
56
+ headers,
57
+ });
58
+ });
59
+ }
60
+ }
61
+ export default Reservation;
62
+ //# sourceMappingURL=reservation.js.map