@medusajs/js-sdk 3.0.0-preview-20250211091350 → 3.0.0-preview-20250406180144

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.
Files changed (229) hide show
  1. package/dist/admin/campaign.d.ts +9 -0
  2. package/dist/admin/campaign.d.ts.map +1 -1
  3. package/dist/admin/campaign.js +9 -0
  4. package/dist/admin/campaign.js.map +1 -1
  5. package/dist/admin/customer.d.ts +95 -0
  6. package/dist/admin/customer.d.ts.map +1 -1
  7. package/dist/admin/customer.js +120 -0
  8. package/dist/admin/customer.js.map +1 -1
  9. package/dist/admin/draft-order.d.ts +427 -0
  10. package/dist/admin/draft-order.d.ts.map +1 -0
  11. package/dist/admin/draft-order.js +534 -0
  12. package/dist/admin/draft-order.js.map +1 -0
  13. package/dist/admin/fulfillment-provider.d.ts +7 -1
  14. package/dist/admin/fulfillment-provider.d.ts.map +1 -1
  15. package/dist/admin/fulfillment-provider.js +7 -1
  16. package/dist/admin/fulfillment-provider.js.map +1 -1
  17. package/dist/admin/fulfillment.js +1 -1
  18. package/dist/admin/fulfillment.js.map +1 -1
  19. package/dist/admin/index.d.ts +10 -0
  20. package/dist/admin/index.d.ts.map +1 -1
  21. package/dist/admin/index.js +4 -0
  22. package/dist/admin/index.js.map +1 -1
  23. package/dist/admin/order.d.ts +2 -1
  24. package/dist/admin/order.d.ts.map +1 -1
  25. package/dist/admin/order.js +8 -0
  26. package/dist/admin/order.js.map +1 -1
  27. package/dist/admin/plugin.d.ts +9 -0
  28. package/dist/admin/plugin.d.ts.map +1 -0
  29. package/dist/admin/plugin.js +16 -0
  30. package/dist/admin/plugin.js.map +1 -0
  31. package/dist/admin/product-collection.d.ts +1 -1
  32. package/dist/admin/product-collection.js +1 -1
  33. package/dist/admin/product.d.ts +3 -2
  34. package/dist/admin/product.d.ts.map +1 -1
  35. package/dist/admin/product.js +3 -2
  36. package/dist/admin/product.js.map +1 -1
  37. package/dist/admin/promotion.d.ts +285 -1
  38. package/dist/admin/promotion.d.ts.map +1 -1
  39. package/dist/admin/promotion.js +284 -0
  40. package/dist/admin/promotion.js.map +1 -1
  41. package/dist/admin/refund-reasons.d.ts +48 -0
  42. package/dist/admin/refund-reasons.d.ts.map +1 -1
  43. package/dist/admin/refund-reasons.js +48 -0
  44. package/dist/admin/refund-reasons.js.map +1 -1
  45. package/dist/admin/region.d.ts +137 -12
  46. package/dist/admin/region.d.ts.map +1 -1
  47. package/dist/admin/region.js +133 -0
  48. package/dist/admin/region.js.map +1 -1
  49. package/dist/admin/reservation.d.ts +134 -0
  50. package/dist/admin/reservation.d.ts.map +1 -1
  51. package/dist/admin/reservation.js +134 -0
  52. package/dist/admin/reservation.js.map +1 -1
  53. package/dist/admin/return-reason.d.ts +135 -0
  54. package/dist/admin/return-reason.d.ts.map +1 -1
  55. package/dist/admin/return-reason.js +135 -0
  56. package/dist/admin/return-reason.js.map +1 -1
  57. package/dist/admin/return.d.ts +523 -1
  58. package/dist/admin/return.d.ts.map +1 -1
  59. package/dist/admin/return.js +522 -0
  60. package/dist/admin/return.js.map +1 -1
  61. package/dist/admin/sales-channel.d.ts +176 -1
  62. package/dist/admin/sales-channel.d.ts.map +1 -1
  63. package/dist/admin/sales-channel.js +175 -0
  64. package/dist/admin/sales-channel.js.map +1 -1
  65. package/dist/admin/shipping-option.d.ts +151 -0
  66. package/dist/admin/shipping-option.d.ts.map +1 -1
  67. package/dist/admin/shipping-option.js +151 -0
  68. package/dist/admin/shipping-option.js.map +1 -1
  69. package/dist/admin/shipping-profile.d.ts +132 -0
  70. package/dist/admin/shipping-profile.d.ts.map +1 -1
  71. package/dist/admin/shipping-profile.js +132 -0
  72. package/dist/admin/shipping-profile.js.map +1 -1
  73. package/dist/admin/stock-location.d.ts +190 -0
  74. package/dist/admin/stock-location.d.ts.map +1 -1
  75. package/dist/admin/stock-location.js +190 -0
  76. package/dist/admin/stock-location.js.map +1 -1
  77. package/dist/admin/store.d.ts +99 -0
  78. package/dist/admin/store.d.ts.map +1 -1
  79. package/dist/admin/store.js +99 -0
  80. package/dist/admin/store.js.map +1 -1
  81. package/dist/admin/tax-rate.d.ts +136 -0
  82. package/dist/admin/tax-rate.d.ts.map +1 -1
  83. package/dist/admin/tax-rate.js +136 -0
  84. package/dist/admin/tax-rate.js.map +1 -1
  85. package/dist/admin/tax-region.d.ts +125 -0
  86. package/dist/admin/tax-region.d.ts.map +1 -1
  87. package/dist/admin/tax-region.js +125 -1
  88. package/dist/admin/tax-region.js.map +1 -1
  89. package/dist/admin/upload.d.ts +65 -6
  90. package/dist/admin/upload.d.ts.map +1 -1
  91. package/dist/admin/upload.js +63 -1
  92. package/dist/admin/upload.js.map +1 -1
  93. package/dist/admin/user.d.ts +147 -0
  94. package/dist/admin/user.d.ts.map +1 -1
  95. package/dist/admin/user.js +147 -0
  96. package/dist/admin/user.js.map +1 -1
  97. package/dist/admin/workflow-execution.d.ts +62 -0
  98. package/dist/admin/workflow-execution.d.ts.map +1 -1
  99. package/dist/admin/workflow-execution.js +62 -0
  100. package/dist/admin/workflow-execution.js.map +1 -1
  101. package/dist/auth/index.d.ts +88 -24
  102. package/dist/auth/index.d.ts.map +1 -1
  103. package/dist/auth/index.js +89 -24
  104. package/dist/auth/index.js.map +1 -1
  105. package/dist/client.d.ts +9 -8
  106. package/dist/client.d.ts.map +1 -1
  107. package/dist/client.js +67 -48
  108. package/dist/client.js.map +1 -1
  109. package/dist/esm/admin/campaign.d.ts +9 -0
  110. package/dist/esm/admin/campaign.d.ts.map +1 -1
  111. package/dist/esm/admin/campaign.js +9 -0
  112. package/dist/esm/admin/campaign.js.map +1 -1
  113. package/dist/esm/admin/customer.d.ts +95 -0
  114. package/dist/esm/admin/customer.d.ts.map +1 -1
  115. package/dist/esm/admin/customer.js +130 -0
  116. package/dist/esm/admin/customer.js.map +1 -1
  117. package/dist/esm/admin/draft-order.d.ts +427 -0
  118. package/dist/esm/admin/draft-order.d.ts.map +1 -0
  119. package/dist/esm/admin/draft-order.js +577 -0
  120. package/dist/esm/admin/draft-order.js.map +1 -0
  121. package/dist/esm/admin/fulfillment-provider.d.ts +7 -1
  122. package/dist/esm/admin/fulfillment-provider.d.ts.map +1 -1
  123. package/dist/esm/admin/fulfillment-provider.js +7 -1
  124. package/dist/esm/admin/fulfillment-provider.js.map +1 -1
  125. package/dist/esm/admin/fulfillment.js +1 -1
  126. package/dist/esm/admin/fulfillment.js.map +1 -1
  127. package/dist/esm/admin/index.d.ts +10 -0
  128. package/dist/esm/admin/index.d.ts.map +1 -1
  129. package/dist/esm/admin/index.js +4 -0
  130. package/dist/esm/admin/index.js.map +1 -1
  131. package/dist/esm/admin/order.d.ts +2 -1
  132. package/dist/esm/admin/order.d.ts.map +1 -1
  133. package/dist/esm/admin/order.js +10 -0
  134. package/dist/esm/admin/order.js.map +1 -1
  135. package/dist/esm/admin/plugin.d.ts +9 -0
  136. package/dist/esm/admin/plugin.d.ts.map +1 -0
  137. package/dist/esm/admin/plugin.js +23 -0
  138. package/dist/esm/admin/plugin.js.map +1 -0
  139. package/dist/esm/admin/product-collection.d.ts +1 -1
  140. package/dist/esm/admin/product-collection.js +1 -1
  141. package/dist/esm/admin/product.d.ts +3 -2
  142. package/dist/esm/admin/product.d.ts.map +1 -1
  143. package/dist/esm/admin/product.js +3 -2
  144. package/dist/esm/admin/product.js.map +1 -1
  145. package/dist/esm/admin/promotion.d.ts +285 -1
  146. package/dist/esm/admin/promotion.d.ts.map +1 -1
  147. package/dist/esm/admin/promotion.js +284 -0
  148. package/dist/esm/admin/promotion.js.map +1 -1
  149. package/dist/esm/admin/refund-reasons.d.ts +48 -0
  150. package/dist/esm/admin/refund-reasons.d.ts.map +1 -1
  151. package/dist/esm/admin/refund-reasons.js +48 -0
  152. package/dist/esm/admin/refund-reasons.js.map +1 -1
  153. package/dist/esm/admin/region.d.ts +137 -12
  154. package/dist/esm/admin/region.d.ts.map +1 -1
  155. package/dist/esm/admin/region.js +133 -0
  156. package/dist/esm/admin/region.js.map +1 -1
  157. package/dist/esm/admin/reservation.d.ts +134 -0
  158. package/dist/esm/admin/reservation.d.ts.map +1 -1
  159. package/dist/esm/admin/reservation.js +134 -0
  160. package/dist/esm/admin/reservation.js.map +1 -1
  161. package/dist/esm/admin/return-reason.d.ts +135 -0
  162. package/dist/esm/admin/return-reason.d.ts.map +1 -1
  163. package/dist/esm/admin/return-reason.js +135 -0
  164. package/dist/esm/admin/return-reason.js.map +1 -1
  165. package/dist/esm/admin/return.d.ts +523 -1
  166. package/dist/esm/admin/return.d.ts.map +1 -1
  167. package/dist/esm/admin/return.js +522 -0
  168. package/dist/esm/admin/return.js.map +1 -1
  169. package/dist/esm/admin/sales-channel.d.ts +176 -1
  170. package/dist/esm/admin/sales-channel.d.ts.map +1 -1
  171. package/dist/esm/admin/sales-channel.js +175 -0
  172. package/dist/esm/admin/sales-channel.js.map +1 -1
  173. package/dist/esm/admin/shipping-option.d.ts +151 -0
  174. package/dist/esm/admin/shipping-option.d.ts.map +1 -1
  175. package/dist/esm/admin/shipping-option.js +151 -0
  176. package/dist/esm/admin/shipping-option.js.map +1 -1
  177. package/dist/esm/admin/shipping-profile.d.ts +132 -0
  178. package/dist/esm/admin/shipping-profile.d.ts.map +1 -1
  179. package/dist/esm/admin/shipping-profile.js +132 -0
  180. package/dist/esm/admin/shipping-profile.js.map +1 -1
  181. package/dist/esm/admin/stock-location.d.ts +190 -0
  182. package/dist/esm/admin/stock-location.d.ts.map +1 -1
  183. package/dist/esm/admin/stock-location.js +190 -0
  184. package/dist/esm/admin/stock-location.js.map +1 -1
  185. package/dist/esm/admin/store.d.ts +99 -0
  186. package/dist/esm/admin/store.d.ts.map +1 -1
  187. package/dist/esm/admin/store.js +99 -0
  188. package/dist/esm/admin/store.js.map +1 -1
  189. package/dist/esm/admin/tax-rate.d.ts +136 -0
  190. package/dist/esm/admin/tax-rate.d.ts.map +1 -1
  191. package/dist/esm/admin/tax-rate.js +136 -0
  192. package/dist/esm/admin/tax-rate.js.map +1 -1
  193. package/dist/esm/admin/tax-region.d.ts +125 -0
  194. package/dist/esm/admin/tax-region.d.ts.map +1 -1
  195. package/dist/esm/admin/tax-region.js +125 -1
  196. package/dist/esm/admin/tax-region.js.map +1 -1
  197. package/dist/esm/admin/upload.d.ts +65 -6
  198. package/dist/esm/admin/upload.d.ts.map +1 -1
  199. package/dist/esm/admin/upload.js +63 -1
  200. package/dist/esm/admin/upload.js.map +1 -1
  201. package/dist/esm/admin/user.d.ts +147 -0
  202. package/dist/esm/admin/user.d.ts.map +1 -1
  203. package/dist/esm/admin/user.js +147 -0
  204. package/dist/esm/admin/user.js.map +1 -1
  205. package/dist/esm/admin/workflow-execution.d.ts +62 -0
  206. package/dist/esm/admin/workflow-execution.d.ts.map +1 -1
  207. package/dist/esm/admin/workflow-execution.js +62 -0
  208. package/dist/esm/admin/workflow-execution.js.map +1 -1
  209. package/dist/esm/auth/index.d.ts +88 -24
  210. package/dist/esm/auth/index.d.ts.map +1 -1
  211. package/dist/esm/auth/index.js +89 -24
  212. package/dist/esm/auth/index.js.map +1 -1
  213. package/dist/esm/client.d.ts +9 -8
  214. package/dist/esm/client.d.ts.map +1 -1
  215. package/dist/esm/client.js +97 -63
  216. package/dist/esm/client.js.map +1 -1
  217. package/dist/esm/store/index.d.ts +19 -0
  218. package/dist/esm/store/index.d.ts.map +1 -1
  219. package/dist/esm/store/index.js +19 -0
  220. package/dist/esm/store/index.js.map +1 -1
  221. package/dist/esm/types.d.ts +8 -1
  222. package/dist/esm/types.d.ts.map +1 -1
  223. package/dist/store/index.d.ts +19 -0
  224. package/dist/store/index.d.ts.map +1 -1
  225. package/dist/store/index.js +19 -0
  226. package/dist/store/index.js.map +1 -1
  227. package/dist/types.d.ts +8 -1
  228. package/dist/types.d.ts.map +1 -1
  229. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"user.js","sourceRoot":"","sources":["../../src/admin/user.ts"],"names":[],"mappings":";;;AAIA,MAAa,IAAI;IAKf;;OAEG;IACH,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;IAED,KAAK,CAAC,MAAM,CACV,EAAU,EACV,IAA+B,EAC/B,KAAiC,EACjC,OAAuB;QAEvB,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CACtB,gBAAgB,EAAE,EAAE,EACpB;YACE,MAAM,EAAE,MAAM;YACd,OAAO;YACP,IAAI;YACJ,KAAK;SACN,CACF,CAAA;IACH,CAAC;IAED,KAAK,CAAC,IAAI,CACR,WAA2C,EAC3C,OAAuB;QAEvB,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAkC,cAAc,EAAE;YACxE,OAAO;YACP,KAAK,EAAE,WAAW;SACnB,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,QAAQ,CACZ,EAAU,EACV,KAAiC,EACjC,OAAuB;QAEvB,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CACtB,gBAAgB,EAAE,EAAE,EACpB;YACE,KAAK;YACL,OAAO;SACR,CACF,CAAA;IACH,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAU,EAAE,OAAuB;QAC9C,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CACtB,gBAAgB,EAAE,EAAE,EACpB;YACE,MAAM,EAAE,QAAQ;YAChB,OAAO;SACR,CACF,CAAA;IACH,CAAC;IAED,KAAK,CAAC,EAAE,CAAC,KAAiC,EAAE,OAAuB;QACjE,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAA8B,iBAAiB,EAAE;YACvE,KAAK;YACL,OAAO;SACR,CAAC,CAAA;IACJ,CAAC;CACF;AArED,oBAqEC"}
1
+ {"version":3,"file":"user.js","sourceRoot":"","sources":["../../src/admin/user.ts"],"names":[],"mappings":";;;AAIA,MAAa,IAAI;IAKf;;OAEG;IACH,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,KAAK,CAAC,MAAM,CACV,EAAU,EACV,IAA+B,EAC/B,KAAiC,EACjC,OAAuB;QAEvB,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CACtB,gBAAgB,EAAE,EAAE,EACpB;YACE,MAAM,EAAE,MAAM;YACd,OAAO;YACP,IAAI;YACJ,KAAK;SACN,CACF,CAAA;IACH,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8CG;IACH,KAAK,CAAC,IAAI,CACR,WAA2C,EAC3C,OAAuB;QAEvB,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAkC,cAAc,EAAE;YACxE,OAAO;YACP,KAAK,EAAE,WAAW;SACnB,CAAC,CAAA;IACJ,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgCG;IACH,KAAK,CAAC,QAAQ,CACZ,EAAU,EACV,KAAiC,EACjC,OAAuB;QAEvB,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CACtB,gBAAgB,EAAE,EAAE,EACpB;YACE,KAAK;YACL,OAAO;SACR,CACF,CAAA;IACH,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,KAAK,CAAC,MAAM,CAAC,EAAU,EAAE,OAAuB;QAC9C,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CACtB,gBAAgB,EAAE,EAAE,EACpB;YACE,MAAM,EAAE,QAAQ;YAChB,OAAO;SACR,CACF,CAAA;IACH,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,KAAK,CAAC,EAAE,CAAC,KAAiC,EAAE,OAAuB;QACjE,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAA8B,iBAAiB,EAAE;YACvE,KAAK;YACL,OAAO;SACR,CAAC,CAAA;IACJ,CAAC;CACF;AAxND,oBAwNC"}
@@ -10,7 +10,69 @@ export declare class WorkflowExecution {
10
10
  * @ignore
11
11
  */
12
12
  constructor(client: Client);
13
+ /**
14
+ * This method retrieves a list of workflow executions. It sends a request to the
15
+ * [List Workflow Executions](https://docs.medusajs.com/api/admin#workflows-executions_getworkflowsexecutions)
16
+ * API route.
17
+ *
18
+ * @param queryParams - Filters and pagination configurations.
19
+ * @param headers - Headers to pass in the request.
20
+ * @returns The list of workflow executions.
21
+ *
22
+ * @example
23
+ * To retrieve the list of workflow executions:
24
+ *
25
+ * ```ts
26
+ * sdk.admin.workflowExecution.list()
27
+ * .then(({ workflow_executions, count, limit, offset }) => {
28
+ * console.log(workflow_executions)
29
+ * })
30
+ * ```
31
+ *
32
+ * To configure the pagination, pass the `limit` and `offset` query parameters.
33
+ *
34
+ * For example, to retrieve only 10 items and skip 10 items:
35
+ *
36
+ * ```ts
37
+ * sdk.admin.workflowExecution.list({
38
+ * limit: 10,
39
+ * offset: 10
40
+ * })
41
+ * .then(({ workflow_executions, count, limit, offset }) => {
42
+ * console.log(workflow_executions)
43
+ * })
44
+ * ```
45
+ *
46
+ * Using the `fields` query parameter, you can specify the fields and relations to retrieve
47
+ * in each workflow execution:
48
+ *
49
+ * ```ts
50
+ * sdk.admin.workflowExecution.list({
51
+ * fields: "id,name"
52
+ * })
53
+ * .then(({ workflow_executions, count, limit, offset }) => {
54
+ * console.log(workflow_executions)
55
+ * })
56
+ * ```
57
+ *
58
+ * Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/admin#select-fields-and-relations).
59
+ */
13
60
  list(queryParams?: HttpTypes.AdminGetWorkflowExecutionsParams, headers?: ClientHeaders): Promise<HttpTypes.AdminWorkflowExecutionListResponse>;
61
+ /**
62
+ * This method retrieves a workflow execution by its ID. It sends a request to the
63
+ * [Get Workflow Execution](https://docs.medusajs.com/api/admin#workflows-executions_getworkflowsexecutionsworkflow_idtransaction_id)
64
+ * API route.
65
+ *
66
+ * @param id - The ID of the workflow execution to retrieve.
67
+ * @param headers - Headers to pass in the request.
68
+ * @returns The workflow execution's details.
69
+ *
70
+ * @example
71
+ * sdk.admin.workflowExecution.retrieve("wrk_123")
72
+ * .then(({ workflow_execution }) => {
73
+ * console.log(workflow_execution)
74
+ * })
75
+ */
14
76
  retrieve(id: string, headers?: ClientHeaders): Promise<HttpTypes.AdminWorkflowExecutionResponse>;
15
77
  }
16
78
  //# sourceMappingURL=workflow-execution.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"workflow-execution.d.ts","sourceRoot":"","sources":["../../src/admin/workflow-execution.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,iBAAiB;IAC5B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAQ;IACtB;;OAEG;gBACS,MAAM,EAAE,MAAM;IAIpB,IAAI,CACR,WAAW,CAAC,EAAE,SAAS,CAAC,gCAAgC,EACxD,OAAO,CAAC,EAAE,aAAa;IAWnB,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa;CAQnD"}
1
+ {"version":3,"file":"workflow-execution.d.ts","sourceRoot":"","sources":["../../src/admin/workflow-execution.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,iBAAiB;IAC5B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAQ;IACtB;;OAEG;gBACS,MAAM,EAAE,MAAM;IAI1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8CG;IACG,IAAI,CACR,WAAW,CAAC,EAAE,SAAS,CAAC,gCAAgC,EACxD,OAAO,CAAC,EAAE,aAAa;IAWzB;;;;;;;;;;;;;;OAcG;IACG,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa;CAQnD"}
@@ -8,12 +8,74 @@ class WorkflowExecution {
8
8
  constructor(client) {
9
9
  this.client = client;
10
10
  }
11
+ /**
12
+ * This method retrieves a list of workflow executions. It sends a request to the
13
+ * [List Workflow Executions](https://docs.medusajs.com/api/admin#workflows-executions_getworkflowsexecutions)
14
+ * API route.
15
+ *
16
+ * @param queryParams - Filters and pagination configurations.
17
+ * @param headers - Headers to pass in the request.
18
+ * @returns The list of workflow executions.
19
+ *
20
+ * @example
21
+ * To retrieve the list of workflow executions:
22
+ *
23
+ * ```ts
24
+ * sdk.admin.workflowExecution.list()
25
+ * .then(({ workflow_executions, count, limit, offset }) => {
26
+ * console.log(workflow_executions)
27
+ * })
28
+ * ```
29
+ *
30
+ * To configure the pagination, pass the `limit` and `offset` query parameters.
31
+ *
32
+ * For example, to retrieve only 10 items and skip 10 items:
33
+ *
34
+ * ```ts
35
+ * sdk.admin.workflowExecution.list({
36
+ * limit: 10,
37
+ * offset: 10
38
+ * })
39
+ * .then(({ workflow_executions, count, limit, offset }) => {
40
+ * console.log(workflow_executions)
41
+ * })
42
+ * ```
43
+ *
44
+ * Using the `fields` query parameter, you can specify the fields and relations to retrieve
45
+ * in each workflow execution:
46
+ *
47
+ * ```ts
48
+ * sdk.admin.workflowExecution.list({
49
+ * fields: "id,name"
50
+ * })
51
+ * .then(({ workflow_executions, count, limit, offset }) => {
52
+ * console.log(workflow_executions)
53
+ * })
54
+ * ```
55
+ *
56
+ * Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/admin#select-fields-and-relations).
57
+ */
11
58
  async list(queryParams, headers) {
12
59
  return await this.client.fetch(`/admin/workflows-executions`, {
13
60
  query: queryParams,
14
61
  headers,
15
62
  });
16
63
  }
64
+ /**
65
+ * This method retrieves a workflow execution by its ID. It sends a request to the
66
+ * [Get Workflow Execution](https://docs.medusajs.com/api/admin#workflows-executions_getworkflowsexecutionsworkflow_idtransaction_id)
67
+ * API route.
68
+ *
69
+ * @param id - The ID of the workflow execution to retrieve.
70
+ * @param headers - Headers to pass in the request.
71
+ * @returns The workflow execution's details.
72
+ *
73
+ * @example
74
+ * sdk.admin.workflowExecution.retrieve("wrk_123")
75
+ * .then(({ workflow_execution }) => {
76
+ * console.log(workflow_execution)
77
+ * })
78
+ */
17
79
  async retrieve(id, headers) {
18
80
  return await this.client.fetch(`/admin/workflows-executions/${id}`, {
19
81
  headers,
@@ -1 +1 @@
1
- {"version":3,"file":"workflow-execution.js","sourceRoot":"","sources":["../../src/admin/workflow-execution.ts"],"names":[],"mappings":";;;AAIA,MAAa,iBAAiB;IAK5B;;OAEG;IACH,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;IAED,KAAK,CAAC,IAAI,CACR,WAAwD,EACxD,OAAuB;QAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,6BAA6B,EAC7B;YACE,KAAK,EAAE,WAAW;YAClB,OAAO;SACR,CACF,CAAA;IACH,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,EAAU,EAAE,OAAuB;QAChD,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,+BAA+B,EAAE,EAAE,EACnC;YACE,OAAO;SACR,CACF,CAAA;IACH,CAAC;CACF;AAjCD,8CAiCC"}
1
+ {"version":3,"file":"workflow-execution.js","sourceRoot":"","sources":["../../src/admin/workflow-execution.ts"],"names":[],"mappings":";;;AAIA,MAAa,iBAAiB;IAK5B;;OAEG;IACH,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8CG;IACH,KAAK,CAAC,IAAI,CACR,WAAwD,EACxD,OAAuB;QAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,6BAA6B,EAC7B;YACE,KAAK,EAAE,WAAW;YAClB,OAAO;SACR,CACF,CAAA;IACH,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,KAAK,CAAC,QAAQ,CAAC,EAAU,EAAE,OAAuB;QAChD,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,+BAA+B,EAAE,EAAE,EACnC;YACE,OAAO;SACR,CACF,CAAA;IACH,CAAC;CACF;AA/FD,8CA+FC"}
@@ -9,6 +9,12 @@ export declare class Auth {
9
9
  * This method is used to retrieve a registration JWT token for a user, customer, or custom actor type. It sends a request to the
10
10
  * [Retrieve Registration Token API route](https://docs.medusajs.com/api/store#auth_postactor_typeauth_provider_register).
11
11
  *
12
+ * Then, it stores the returned token and passes it in the header of subsequent requests. So, you can call the
13
+ * [store.customer.create](https://docs.medusajs.com/resources/references/js-sdk/store/customer#create) method,
14
+ * for example, after calling this method.
15
+ *
16
+ * Learn more in the [JS SDK Authentication](https://docs.medusajs.com/resources/js-sdk/auth/overview) guide.
17
+ *
12
18
  * @param actor - The actor type. For example, `user` for admin user, or `customer` for customer.
13
19
  * @param method - The authentication provider to use. For example, `emailpass` or `google`.
14
20
  * @param payload - The data to pass in the request's body for authentication. When using the `emailpass` provider,
@@ -18,15 +24,19 @@ export declare class Auth {
18
24
  * @tags auth
19
25
  *
20
26
  * @example
21
- * sdk.auth.register(
27
+ * await sdk.auth.register(
22
28
  * "customer",
23
29
  * "emailpass",
24
30
  * {
25
31
  * email: "customer@gmail.com",
26
32
  * password: "supersecret"
27
33
  * }
28
- * ).then((token) => {
29
- * console.log(token)
34
+ * )
35
+ *
36
+ * // all subsequent requests will use the token in the header
37
+ * const { customer } = await sdk.store.customer.create({
38
+ * email: "customer@gmail.com",
39
+ * password: "supersecret"
30
40
  * })
31
41
  */
32
42
  register: (actor: string, method: string, payload: HttpTypes.AdminSignUpWithEmailPassword) => Promise<string>;
@@ -34,11 +44,32 @@ export declare class Auth {
34
44
  * This method retrieves the JWT authenticated token for an admin user, customer, or custom
35
45
  * actor type. It sends a request to the [Authenticate API Route](https://docs.medusajs.com/api/admin#auth_postactor_typeauth_provider).
36
46
  *
47
+ * ### Third-Party Authentication
48
+ *
49
+ * If the API route returns a `location` property, it means that the authentication requires additional steps,
50
+ * typically in a third-party service. The `location` property is returned so that you
51
+ * can redirect the user to the appropriate page.
52
+ *
53
+ * :::note
54
+ *
55
+ * For an example of implementing third-party authentication, refer to the
56
+ * [Third-Party Login in Storefront](https://docs.medusajs.com/resources/storefront-development/customers/third-party-login) guide.
57
+ *
58
+ * :::
59
+ *
60
+ * ### Session Authentication
61
+ *
37
62
  * If the `auth.type` of the SDK is set to `session`, this method will also send a request to the
38
63
  * [Set Authentication Session API route](https://docs.medusajs.com/api/admin#auth_postsession).
39
64
  *
40
- * Subsequent requests using the SDK will automatically have the necessary authentication headers / session
41
- * set.
65
+ * Learn more in the [JS SDK Authentication](https://docs.medusajs.com/resources/js-sdk/auth/overview) guide.
66
+ *
67
+ * ### Automatic Authentication
68
+ *
69
+ * If the authentication was successful, subsequent requests using the SDK will automatically have the necessary authentication headers / session
70
+ * set, based on your JS SDK authentication configurations.
71
+ *
72
+ * Learn more in the [JS SDK Authentication](https://docs.medusajs.com/resources/js-sdk/auth/overview) guide.
42
73
  *
43
74
  * @param actor - The actor type. For example, `user` for admin user, or `customer` for customer.
44
75
  * @param method - The authentication provider to use. For example, `emailpass` or `google`.
@@ -49,16 +80,25 @@ export declare class Auth {
49
80
  * @tags auth
50
81
  *
51
82
  * @example
52
- * sdk.auth.login(
83
+ * const result = await sdk.auth.login(
53
84
  * "customer",
54
85
  * "emailpass",
55
86
  * {
56
87
  * email: "customer@gmail.com",
57
88
  * password: "supersecret"
58
89
  * }
59
- * ).then((token) => {
60
- * console.log(token)
61
- * })
90
+ * )
91
+ *
92
+ * if (typeof result !== "string") {
93
+ * alert("Authentication requires additional steps")
94
+ * // replace with the redirect logic of your application
95
+ * window.location.href = result.location
96
+ * return
97
+ * }
98
+ *
99
+ * // customer is now authenticated
100
+ * // all subsequent requests will use the token in the header
101
+ * const { customer } = await sdk.store.customer.retrieve()
62
102
  */
63
103
  login: (actor: string, method: string, payload: HttpTypes.AdminSignInWithEmailPassword | Record<string, unknown>) => Promise<string | {
64
104
  location: string;
@@ -67,6 +107,12 @@ export declare class Auth {
67
107
  * This method is used to validate an Oauth callback from a third-party service, such as Google, for an admin user, customer, or custom actor types.
68
108
  * It sends a request to the [Validate Authentication Callback](https://docs.medusajs.com/api/admin#auth_postactor_typeauth_providercallback).
69
109
  *
110
+ * The method stores the returned token and passes it in the header of subsequent requests. So, you can call the
111
+ * [store.customer.create](https://docs.medusajs.com/resources/references/js-sdk/store/customer#create) or {@link refresh} methods,
112
+ * for example, after calling this method.
113
+ *
114
+ * Learn more in the [JS SDK Authentication](https://docs.medusajs.com/resources/js-sdk/auth/overview) guide.
115
+ *
70
116
  * @param actor - The actor type. For example, `user` for admin user, or `customer` for customer.
71
117
  * @param method - The authentication provider to use. For example, `google`.
72
118
  * @param query - The query parameters from the Oauth callback, which should be passed to the API route. This includes query parameters like
@@ -76,17 +122,20 @@ export declare class Auth {
76
122
  * @tags auth
77
123
  *
78
124
  * @example
79
- * sdk.auth.callback(
125
+ * await sdk.auth.callback(
80
126
  * "customer",
81
127
  * "google",
82
128
  * {
83
129
  * code: "123",
84
130
  * state: "456"
85
131
  * }
86
- * ).then((token) => {
87
- * console.log(token)
88
- * })
132
+ * )
89
133
  *
134
+ * // all subsequent requests will use the token in the header
135
+ * const { customer } = await sdk.store.customer.create({
136
+ * email: "customer@gmail.com",
137
+ * password: "supersecret"
138
+ * })
90
139
  *
91
140
  * @privateRemarks
92
141
  * The callback expects all query parameters from the Oauth callback to be passed to
@@ -97,28 +146,43 @@ export declare class Auth {
97
146
  * This method refreshes a JWT authentication token, which is useful after validating the Oauth callback
98
147
  * with {@link callback}. It sends a request to the [Refresh Authentication Token API route](https://docs.medusajs.com/api/admin#auth_postadminauthtokenrefresh).
99
148
  *
149
+ * The method stores the returned token and passes it in the header of subsequent requests. So, you can call other
150
+ * methods that require authentication after calling this method.
151
+ *
152
+ * Learn more in the [JS SDK Authentication](https://docs.medusajs.com/resources/js-sdk/auth/overview) guide.
153
+ *
154
+ * For an example of implementing third-party authentication, refer to the
155
+ * [Third-Party Login in Storefront](https://docs.medusajs.com/resources/storefront-development/customers/third-party-login) guide.
156
+ *
157
+ *
100
158
  * @returns The refreshed JWT authentication token.
101
159
  *
102
160
  * @tags auth
103
161
  *
104
162
  * @example
105
- * sdk.auth.refresh()
106
- * .then((token) => {
107
- * console.log(token)
108
- * })
163
+ * const token = await sdk.auth.refresh()
164
+ *
165
+ * // all subsequent requests will use the token in the header
166
+ * const { customer } = await sdk.store.customer.retrieve()
109
167
  */
110
168
  refresh: () => Promise<string>;
111
169
  /**
112
- * This method deletes the authentication session of the currently logged-in user to log them out.
113
- * It sends a request to the [Delete Authentication Session API route](https://docs.medusajs.com/api/admin#auth_deletesession).
170
+ * This method logs out the currently authenticated user based on your JS SDK authentication configurations.
171
+ *
172
+ * If the `auth.type` of the SDK is set to `session`, this method will also send a request to the
173
+ * [Delete Authentication Session API route](https://docs.medusajs.com/api/admin#auth_deletesession).
174
+ *
175
+ * The method also clears any stored tokens or sessions, based on your JS SDK authentication configurations.
176
+ *
177
+ * Learn more in the [JS SDK Authentication](https://docs.medusajs.com/resources/js-sdk/auth/overview) guide.
114
178
  *
115
179
  * @tags auth
116
180
  *
117
181
  * @example
118
- * sdk.auth.logout()
119
- * .then(() => {
120
- * // user is logged out
121
- * })
182
+ * await sdk.auth.logout()
183
+ *
184
+ * // user is now logged out
185
+ * // you can't send any requests that require authentication
122
186
  */
123
187
  logout: () => Promise<void>;
124
188
  /**
@@ -184,7 +248,7 @@ export declare class Auth {
184
248
  * // password updated
185
249
  * })
186
250
  */
187
- updateProvider: (actor: string, provider: string, body: Record<string, unknown>, token: string) => Promise<void>;
251
+ updateProvider: (actor: string, provider: string, body: HttpTypes.AdminUpdateProvider, token: string) => Promise<void>;
188
252
  /**
189
253
  * @ignore
190
254
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEjC,qBAAa,IAAI;IACf,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,MAAM,CAAQ;gBAEV,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAK1C;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,QAAQ,UACC,MAAM,UACL,MAAM,WACL,SAAS,CAAC,4BAA4B,qBAahD;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH,KAAK,UACI,MAAM,UACL,MAAM,WACL,SAAS,CAAC,4BAA4B,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;OAmB1E;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,QAAQ,UACC,MAAM,UACL,MAAM,UACN,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,qBAYhC;IAED;;;;;;;;;;;;;OAaG;IACH,OAAO,wBAYN;IAED;;;;;;;;;;;OAWG;IACH,MAAM,sBAQL;IAED;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,aAAa,UACJ,MAAM,YACH,MAAM,QACV;QACJ;;;WAGG;QACH,UAAU,EAAE,MAAM,CAAA;KACnB,mBAOF;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH,cAAc,UACL,MAAM,YACH,MAAM,QACV,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,SACtB,MAAM,mBASd;IAED;;OAEG;IACH,OAAO,CAAC,SAAS,CAUhB;CACF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEjC,qBAAa,IAAI;IACf,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,MAAM,CAAQ;gBAEV,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAK1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCG;IACH,QAAQ,UACC,MAAM,UACL,MAAM,WACL,SAAS,CAAC,4BAA4B,qBAahD;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2DG;IACH,KAAK,UACI,MAAM,UACL,MAAM,WACL,SAAS,CAAC,4BAA4B,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;OAmB1E;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAqCG;IACH,QAAQ,UACC,MAAM,UACL,MAAM,UACN,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,qBAYhC;IAED;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,OAAO,wBAYN;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,sBAQL;IAED;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,aAAa,UACJ,MAAM,YACH,MAAM,QACV;QACJ;;;WAGG;QACH,UAAU,EAAE,MAAM,CAAA;KACnB,mBAOF;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH,cAAc,UACL,MAAM,YACH,MAAM,QACV,SAAS,CAAC,mBAAmB,SAC5B,MAAM,mBAOd;IAED;;OAEG;IACH,OAAO,CAAC,SAAS,CAUhB;CACF"}
@@ -7,6 +7,12 @@ class Auth {
7
7
  * This method is used to retrieve a registration JWT token for a user, customer, or custom actor type. It sends a request to the
8
8
  * [Retrieve Registration Token API route](https://docs.medusajs.com/api/store#auth_postactor_typeauth_provider_register).
9
9
  *
10
+ * Then, it stores the returned token and passes it in the header of subsequent requests. So, you can call the
11
+ * [store.customer.create](https://docs.medusajs.com/resources/references/js-sdk/store/customer#create) method,
12
+ * for example, after calling this method.
13
+ *
14
+ * Learn more in the [JS SDK Authentication](https://docs.medusajs.com/resources/js-sdk/auth/overview) guide.
15
+ *
10
16
  * @param actor - The actor type. For example, `user` for admin user, or `customer` for customer.
11
17
  * @param method - The authentication provider to use. For example, `emailpass` or `google`.
12
18
  * @param payload - The data to pass in the request's body for authentication. When using the `emailpass` provider,
@@ -16,15 +22,19 @@ class Auth {
16
22
  * @tags auth
17
23
  *
18
24
  * @example
19
- * sdk.auth.register(
25
+ * await sdk.auth.register(
20
26
  * "customer",
21
27
  * "emailpass",
22
28
  * {
23
29
  * email: "customer@gmail.com",
24
30
  * password: "supersecret"
25
31
  * }
26
- * ).then((token) => {
27
- * console.log(token)
32
+ * )
33
+ *
34
+ * // all subsequent requests will use the token in the header
35
+ * const { customer } = await sdk.store.customer.create({
36
+ * email: "customer@gmail.com",
37
+ * password: "supersecret"
28
38
  * })
29
39
  */
30
40
  this.register = async (actor, method, payload) => {
@@ -39,11 +49,32 @@ class Auth {
39
49
  * This method retrieves the JWT authenticated token for an admin user, customer, or custom
40
50
  * actor type. It sends a request to the [Authenticate API Route](https://docs.medusajs.com/api/admin#auth_postactor_typeauth_provider).
41
51
  *
52
+ * ### Third-Party Authentication
53
+ *
54
+ * If the API route returns a `location` property, it means that the authentication requires additional steps,
55
+ * typically in a third-party service. The `location` property is returned so that you
56
+ * can redirect the user to the appropriate page.
57
+ *
58
+ * :::note
59
+ *
60
+ * For an example of implementing third-party authentication, refer to the
61
+ * [Third-Party Login in Storefront](https://docs.medusajs.com/resources/storefront-development/customers/third-party-login) guide.
62
+ *
63
+ * :::
64
+ *
65
+ * ### Session Authentication
66
+ *
42
67
  * If the `auth.type` of the SDK is set to `session`, this method will also send a request to the
43
68
  * [Set Authentication Session API route](https://docs.medusajs.com/api/admin#auth_postsession).
44
69
  *
45
- * Subsequent requests using the SDK will automatically have the necessary authentication headers / session
46
- * set.
70
+ * Learn more in the [JS SDK Authentication](https://docs.medusajs.com/resources/js-sdk/auth/overview) guide.
71
+ *
72
+ * ### Automatic Authentication
73
+ *
74
+ * If the authentication was successful, subsequent requests using the SDK will automatically have the necessary authentication headers / session
75
+ * set, based on your JS SDK authentication configurations.
76
+ *
77
+ * Learn more in the [JS SDK Authentication](https://docs.medusajs.com/resources/js-sdk/auth/overview) guide.
47
78
  *
48
79
  * @param actor - The actor type. For example, `user` for admin user, or `customer` for customer.
49
80
  * @param method - The authentication provider to use. For example, `emailpass` or `google`.
@@ -54,16 +85,25 @@ class Auth {
54
85
  * @tags auth
55
86
  *
56
87
  * @example
57
- * sdk.auth.login(
88
+ * const result = await sdk.auth.login(
58
89
  * "customer",
59
90
  * "emailpass",
60
91
  * {
61
92
  * email: "customer@gmail.com",
62
93
  * password: "supersecret"
63
94
  * }
64
- * ).then((token) => {
65
- * console.log(token)
66
- * })
95
+ * )
96
+ *
97
+ * if (typeof result !== "string") {
98
+ * alert("Authentication requires additional steps")
99
+ * // replace with the redirect logic of your application
100
+ * window.location.href = result.location
101
+ * return
102
+ * }
103
+ *
104
+ * // customer is now authenticated
105
+ * // all subsequent requests will use the token in the header
106
+ * const { customer } = await sdk.store.customer.retrieve()
67
107
  */
68
108
  this.login = async (actor, method, payload) => {
69
109
  // There will either be token or location returned from the backend.
@@ -83,6 +123,12 @@ class Auth {
83
123
  * This method is used to validate an Oauth callback from a third-party service, such as Google, for an admin user, customer, or custom actor types.
84
124
  * It sends a request to the [Validate Authentication Callback](https://docs.medusajs.com/api/admin#auth_postactor_typeauth_providercallback).
85
125
  *
126
+ * The method stores the returned token and passes it in the header of subsequent requests. So, you can call the
127
+ * [store.customer.create](https://docs.medusajs.com/resources/references/js-sdk/store/customer#create) or {@link refresh} methods,
128
+ * for example, after calling this method.
129
+ *
130
+ * Learn more in the [JS SDK Authentication](https://docs.medusajs.com/resources/js-sdk/auth/overview) guide.
131
+ *
86
132
  * @param actor - The actor type. For example, `user` for admin user, or `customer` for customer.
87
133
  * @param method - The authentication provider to use. For example, `google`.
88
134
  * @param query - The query parameters from the Oauth callback, which should be passed to the API route. This includes query parameters like
@@ -92,17 +138,20 @@ class Auth {
92
138
  * @tags auth
93
139
  *
94
140
  * @example
95
- * sdk.auth.callback(
141
+ * await sdk.auth.callback(
96
142
  * "customer",
97
143
  * "google",
98
144
  * {
99
145
  * code: "123",
100
146
  * state: "456"
101
147
  * }
102
- * ).then((token) => {
103
- * console.log(token)
104
- * })
148
+ * )
105
149
  *
150
+ * // all subsequent requests will use the token in the header
151
+ * const { customer } = await sdk.store.customer.create({
152
+ * email: "customer@gmail.com",
153
+ * password: "supersecret"
154
+ * })
106
155
  *
107
156
  * @privateRemarks
108
157
  * The callback expects all query parameters from the Oauth callback to be passed to
@@ -120,15 +169,24 @@ class Auth {
120
169
  * This method refreshes a JWT authentication token, which is useful after validating the Oauth callback
121
170
  * with {@link callback}. It sends a request to the [Refresh Authentication Token API route](https://docs.medusajs.com/api/admin#auth_postadminauthtokenrefresh).
122
171
  *
172
+ * The method stores the returned token and passes it in the header of subsequent requests. So, you can call other
173
+ * methods that require authentication after calling this method.
174
+ *
175
+ * Learn more in the [JS SDK Authentication](https://docs.medusajs.com/resources/js-sdk/auth/overview) guide.
176
+ *
177
+ * For an example of implementing third-party authentication, refer to the
178
+ * [Third-Party Login in Storefront](https://docs.medusajs.com/resources/storefront-development/customers/third-party-login) guide.
179
+ *
180
+ *
123
181
  * @returns The refreshed JWT authentication token.
124
182
  *
125
183
  * @tags auth
126
184
  *
127
185
  * @example
128
- * sdk.auth.refresh()
129
- * .then((token) => {
130
- * console.log(token)
131
- * })
186
+ * const token = await sdk.auth.refresh()
187
+ *
188
+ * // all subsequent requests will use the token in the header
189
+ * const { customer } = await sdk.store.customer.retrieve()
132
190
  */
133
191
  this.refresh = async () => {
134
192
  const { token } = await this.client.fetch("/auth/token/refresh", {
@@ -140,16 +198,22 @@ class Auth {
140
198
  return token;
141
199
  };
142
200
  /**
143
- * This method deletes the authentication session of the currently logged-in user to log them out.
144
- * It sends a request to the [Delete Authentication Session API route](https://docs.medusajs.com/api/admin#auth_deletesession).
201
+ * This method logs out the currently authenticated user based on your JS SDK authentication configurations.
202
+ *
203
+ * If the `auth.type` of the SDK is set to `session`, this method will also send a request to the
204
+ * [Delete Authentication Session API route](https://docs.medusajs.com/api/admin#auth_deletesession).
205
+ *
206
+ * The method also clears any stored tokens or sessions, based on your JS SDK authentication configurations.
207
+ *
208
+ * Learn more in the [JS SDK Authentication](https://docs.medusajs.com/resources/js-sdk/auth/overview) guide.
145
209
  *
146
210
  * @tags auth
147
211
  *
148
212
  * @example
149
- * sdk.auth.logout()
150
- * .then(() => {
151
- * // user is logged out
152
- * })
213
+ * await sdk.auth.logout()
214
+ *
215
+ * // user is now logged out
216
+ * // you can't send any requests that require authentication
153
217
  */
154
218
  this.logout = async () => {
155
219
  if (this.config?.auth?.type === "session") {
@@ -223,9 +287,10 @@ class Auth {
223
287
  * })
224
288
  */
225
289
  this.updateProvider = async (actor, provider, body, token) => {
226
- await this.client.fetch(`/auth/${actor}/${provider}/update?token=${token}`, {
290
+ await this.client.fetch(`/auth/${actor}/${provider}/update`, {
227
291
  method: "POST",
228
292
  body,
293
+ headers: { Authorization: `Bearer ${token}` },
229
294
  });
230
295
  };
231
296
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":";;;AAIA,MAAa,IAAI;IAIf,YAAY,MAAc,EAAE,MAAc;QAK1C;;;;;;;;;;;;;;;;;;;;;;;WAuBG;QACH,aAAQ,GAAG,KAAK,EACd,KAAa,EACb,MAAc,EACd,OAA+C,EAC/C,EAAE;YACF,MAAM,EAAE,KAAK,EAAE,GA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IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;YAC7B,CAAC;QACH,CAAC,CAAA;QAxWC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;CAuWF;AA9WD,oBA8WC"}
package/dist/client.d.ts CHANGED
@@ -36,9 +36,9 @@ export declare class Client {
36
36
  * @returns FetchStreamResponse
37
37
  */
38
38
  fetchStream(input: FetchInput, init?: FetchArgs): Promise<FetchStreamResponse>;
39
- setToken(token: string): void;
40
- clearToken(): void;
41
- protected clearToken_(): void;
39
+ setToken(token: string): Promise<void>;
40
+ clearToken(): Promise<void>;
41
+ protected clearToken_(): Promise<void>;
42
42
  protected initClient(): ClientFetch;
43
43
  protected getApiKeyHeader_: () => {
44
44
  Authorization: string;
@@ -46,14 +46,15 @@ export declare class Client {
46
46
  protected getPublishableKeyHeader_: () => {
47
47
  [PUBLISHABLE_KEY_HEADER]: string;
48
48
  } | {};
49
- protected getJwtHeader_: () => {
49
+ protected getJwtHeader_(): Promise<{
50
50
  Authorization: string;
51
- } | {};
52
- protected setToken_: (token: string) => void;
53
- protected getToken_: () => string | null | undefined;
51
+ } | {}>;
52
+ protected setToken_(token: string): Promise<void>;
53
+ protected getToken_(): Promise<string | null | undefined>;
54
54
  protected getTokenStorageInfo_: () => {
55
- storageMethod: "session" | "local" | "memory" | "nostore";
55
+ storageMethod: "session" | "local" | "memory" | "custom" | "nostore";
56
56
  storageKey: string;
57
57
  };
58
+ protected throwError_(message: string): void;
58
59
  }
59
60
  //# sourceMappingURL=client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,WAAW,EACX,MAAM,EACN,SAAS,EACT,UAAU,EACV,mBAAmB,EAEpB,MAAM,SAAS,CAAA;AAEhB,eAAO,MAAM,sBAAsB,0BAA0B,CAAA;AAo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