@medusajs/js-sdk 3.0.0-snapshot-20251208164410 → 3.0.0-snapshot-20251211180009

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 (49) hide show
  1. package/dist/admin/index.d.ts +10 -5
  2. package/dist/admin/index.d.ts.map +1 -1
  3. package/dist/admin/index.js +4 -2
  4. package/dist/admin/index.js.map +1 -1
  5. package/dist/admin/locale.d.ts +95 -0
  6. package/dist/admin/locale.d.ts.map +1 -0
  7. package/dist/admin/locale.js +104 -0
  8. package/dist/admin/locale.js.map +1 -0
  9. package/dist/admin/price-list.d.ts +17 -0
  10. package/dist/admin/price-list.d.ts.map +1 -1
  11. package/dist/admin/price-list.js +23 -0
  12. package/dist/admin/price-list.js.map +1 -1
  13. package/dist/admin/product.d.ts +0 -22
  14. package/dist/admin/product.d.ts.map +1 -1
  15. package/dist/admin/product.js +0 -29
  16. package/dist/admin/product.js.map +1 -1
  17. package/dist/admin/translation.d.ts +95 -0
  18. package/dist/admin/translation.d.ts.map +1 -0
  19. package/dist/admin/translation.js +106 -0
  20. package/dist/admin/translation.js.map +1 -0
  21. package/dist/esm/admin/index.d.ts +10 -5
  22. package/dist/esm/admin/index.d.ts.map +1 -1
  23. package/dist/esm/admin/index.js +4 -2
  24. package/dist/esm/admin/index.js.map +1 -1
  25. package/dist/esm/admin/locale.d.ts +95 -0
  26. package/dist/esm/admin/locale.d.ts.map +1 -0
  27. package/dist/esm/admin/locale.js +113 -0
  28. package/dist/esm/admin/locale.js.map +1 -0
  29. package/dist/esm/admin/price-list.d.ts +17 -0
  30. package/dist/esm/admin/price-list.d.ts.map +1 -1
  31. package/dist/esm/admin/price-list.js +25 -0
  32. package/dist/esm/admin/price-list.js.map +1 -1
  33. package/dist/esm/admin/product.d.ts +0 -22
  34. package/dist/esm/admin/product.d.ts.map +1 -1
  35. package/dist/esm/admin/product.js +0 -31
  36. package/dist/esm/admin/product.js.map +1 -1
  37. package/dist/esm/admin/translation.d.ts +95 -0
  38. package/dist/esm/admin/translation.d.ts.map +1 -0
  39. package/dist/esm/admin/translation.js +115 -0
  40. package/dist/esm/admin/translation.js.map +1 -0
  41. package/package.json +2 -2
  42. package/dist/admin/product-option.d.ts +0 -122
  43. package/dist/admin/product-option.d.ts.map +0 -1
  44. package/dist/admin/product-option.js +0 -150
  45. package/dist/admin/product-option.js.map +0 -1
  46. package/dist/esm/admin/product-option.d.ts +0 -122
  47. package/dist/esm/admin/product-option.d.ts.map +0 -1
  48. package/dist/esm/admin/product-option.js +0 -165
  49. package/dist/esm/admin/product-option.js.map +0 -1
@@ -1,165 +0,0 @@
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 ProductOption {
11
- /**
12
- * @ignore
13
- */
14
- constructor(client) {
15
- this.client = client;
16
- }
17
- /**
18
- * This method creates a product option. It sends a request to the
19
- * [Create Option](TODO)
20
- * API route.
21
- *
22
- * @param body - The details of the option to create.
23
- * @param query - Configure the fields to retrieve in the option.
24
- * @param headers - Headers to pass in the request
25
- * @returns The option's details.
26
- *
27
- * @example
28
- * sdk.admin.productOption.create({
29
- * title: "Size",
30
- * values: ["S", "M"]
31
- * })
32
- * .then(({ product_option }) => {
33
- * console.log(product_option)
34
- * })
35
- */
36
- create(body, query, headers) {
37
- return __awaiter(this, void 0, void 0, function* () {
38
- return this.client.fetch(`/admin/product-options`, {
39
- method: "POST",
40
- headers,
41
- body,
42
- query,
43
- });
44
- });
45
- }
46
- /**
47
- * This method updates a product option. It sends a request to the
48
- * [Update Option](TODO)
49
- * API route.
50
- *
51
- * @param id - The product option's ID.
52
- * @param body - The data to update in the option.
53
- * @param query - Configure the fields to retrieve in the option.
54
- * @param headers - Headers to pass in the request
55
- * @returns The option's details.
56
- *
57
- * @example
58
- * sdk.admin.productOption.update("opt_123", {
59
- * title: "Size"
60
- * })
61
- * .then(({ product_option }) => {
62
- * console.log(product_option)
63
- * })
64
- */
65
- update(id, body, query, headers) {
66
- return __awaiter(this, void 0, void 0, function* () {
67
- return this.client.fetch(`/admin/product-options/${id}`, {
68
- method: "POST",
69
- headers,
70
- body,
71
- query,
72
- });
73
- });
74
- }
75
- /**
76
- * This method retrieves a paginated list of product options. It sends a request to the
77
- * List Product Options API route.
78
- *
79
- * @param queryParams - Filters and pagination configurations.
80
- * @param headers - Headers to pass in the request.
81
- * @returns The paginated list of product options.
82
- *
83
- * @example
84
- * To retrieve the list of product options:
85
- *
86
- * ```ts
87
- * sdk.admin.productOption.list()
88
- * .then(({ product_options, count, limit, offset }) => {
89
- * console.log(product_options)
90
- * })
91
- * ```
92
- *
93
- * To configure the pagination, pass the `limit` and `offset` query parameters.
94
- *
95
- * For example, to retrieve only 10 items and skip 10 items:
96
- *
97
- * ```ts
98
- * sdk.admin.productOption.list({
99
- * limit: 10,
100
- * offset: 10
101
- * })
102
- * .then(({ product_options, count, limit, offset }) => {
103
- * console.log(product_options)
104
- * })
105
- * ```
106
- */
107
- list(queryParams, headers) {
108
- return __awaiter(this, void 0, void 0, function* () {
109
- return this.client.fetch(`/admin/product-options`, {
110
- headers,
111
- query: queryParams,
112
- });
113
- });
114
- }
115
- /**
116
- * This method retrieves a product option by its ID. It sends a request to the
117
- * Get Product Option API route.
118
- *
119
- * @param id - The product option's ID.
120
- * @param query - Configure the fields to retrieve in the product option.
121
- * @param headers - Headers to pass in the request
122
- * @returns The product option's details.
123
- *
124
- * @example
125
- * To retrieve a product option by its ID:
126
- *
127
- * ```ts
128
- * sdk.admin.productOption.retrieve("opt_123")
129
- * .then(({ product_option }) => {
130
- * console.log(product_option)
131
- * })
132
- * ```
133
- */
134
- retrieve(id, query, headers) {
135
- return __awaiter(this, void 0, void 0, function* () {
136
- return this.client.fetch(`/admin/product-options/${id}`, {
137
- query,
138
- headers,
139
- });
140
- });
141
- }
142
- /**
143
- * This method deletes a product option. It sends a request to the
144
- * Delete Product Option API route.
145
- *
146
- * @param id - The product option's ID.
147
- * @param headers - Headers to pass in the request
148
- * @returns The deletion's details.
149
- *
150
- * @example
151
- * sdk.admin.productOption.delete("opt_123")
152
- * .then(({ deleted }) => {
153
- * console.log(deleted)
154
- * })
155
- */
156
- delete(id, headers) {
157
- return __awaiter(this, void 0, void 0, function* () {
158
- return this.client.fetch(`/admin/product-options/${id}`, {
159
- method: "DELETE",
160
- headers,
161
- });
162
- });
163
- }
164
- }
165
- //# sourceMappingURL=product-option.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"product-option.js","sourceRoot":"","sources":["../../../src/admin/product-option.ts"],"names":[],"mappings":";;;;;;;;;AAIA,MAAM,OAAO,aAAa;IAKxB;;OAEG;IACH,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACG,MAAM,CACV,IAAwC,EACxC,KAA0C,EAC1C,OAAuB;;YAEvB,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CACtB,wBAAwB,EACxB;gBACE,MAAM,EAAE,MAAM;gBACd,OAAO;gBACP,IAAI;gBACJ,KAAK;aACN,CACF,CAAA;QACH,CAAC;KAAA;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACG,MAAM,CACV,EAAU,EACV,IAAwC,EACxC,KAA0C,EAC1C,OAAuB;;YAEvB,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CACtB,0BAA0B,EAAE,EAAE,EAC9B;gBACE,MAAM,EAAE,MAAM;gBACd,OAAO;gBACP,IAAI;gBACJ,KAAK;aACN,CACF,C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