1 /**
2 * @oas [get] /admin/tax-providers
3 * operationId: GetTaxProviders
4 * summary: List Tax Providers
5 * description: Retrieve a list of tax providers installed in the Medusa application through Tax Module Providers. The tax providers can be filtered by fields such as `id`. The tax providers can also be
6 * sorted or paginated.
7 * x-authenticated: true
8 * parameters:
9 * - name: fields
10 * in: query
11 * description: |-
12 * Comma-separated fields that should be included in the returned data.
13 * if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields.
14 * without prefix it will replace the entire default fields.
15 * required: false
16 * schema:
17 * type: string
18 * title: fields
19 * description: Comma-separated fields that should be included in the returned data. If a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
20 * fields. Without prefix it will replace the entire default fields.
21 * externalDocs:
22 * url: "#select-fields-and-relations"
23 * - name: offset
24 * in: query
25 * description: The number of items to skip when retrieving a list.
26 * required: false
27 * schema:
28 * type: number
29 * title: offset
30 * description: The number of items to skip when retrieving a list.
31 * externalDocs:
32 * url: "#pagination"
33 * - name: limit
34 * in: query
35 * description: Limit the number of items returned in the list.
36 * required: false
37 * schema:
38 * type: number
39 * title: limit
40 * description: Limit the number of items returned in the list.
41 * externalDocs:
42 * url: "#pagination"
43 * - name: order
44 * in: query
45 * description: The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`.
46 * required: false
47 * schema:
48 * type: string
49 * title: order
50 * description: The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`.
51 * externalDocs:
52 * url: "#pagination"
53 * - name: id
54 * in: query
55 * required: false
56 * schema:
57 * oneOf:
58 * - type: string
59 * title: id
60 * description: Filter by a tax provider's ID.
61 * - type: array
62 * description: Filter by tax provider IDs.
63 * items:
64 * type: string
65 * title: id
66 * description: A tax provider's ID.
67 * - name: is_enabled
68 * in: query
69 * description: Filter by whether the tax provider is enabled.
70 * required: false
71 * schema:
72 * type: boolean
73 * title: is_enabled
74 * description: Filter by whether the tax provider is enabled.
75 * - name: $and
76 * in: query
77 * description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
78 * required: false
79 * schema:
80 * type: array
81 * description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
82 * items:
83 * type: object
84 * title: $and
85 * - name: $or
86 * in: query
87 * description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
88 * required: false
89 * schema:
90 * type: array
91 * description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
92 * items:
93 * type: object
94 * title: $or
95 * - name: with_deleted
96 * in: query
97 * description: Whether to include deleted records in the result.
98 * required: false
99 * schema:
100 * type: boolean
101 * title: with_deleted
102 * description: Whether to include deleted records in the result.
103 * security:
104 * - api_token: []
105 * - cookie_auth: []
106 * - jwt_token: []
107 * x-codeSamples:
108 * - lang: JavaScript
109 * label: JS SDK
110 * source: |-
111 * import Medusa from "@medusajs/js-sdk"
112 *
113 * export const sdk = new Medusa({
114 * baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
115 * debug: import.meta.env.DEV,
116 * auth: {
117 * type: "session",
118 * },
119 * })
120 *
121 * sdk.admin.taxProvider.list()
122 * .then(({ tax_providers, count, limit, offset }) => {
123 * console.log(tax_providers)
124 * })
125 * - lang: Shell
126 * label: cURL
127 * source: |-
128 * curl '{backend_url}/admin/tax-providers' \
129 * -H 'Authorization: Bearer {jwt_token}'
130 * tags:
131 * - Tax Providers
132 * responses:
133 * "200":
134 * description: OK
135 * content:
136 * application/json:
137 * schema:
138 * allOf:
139 * - type: object
140 * description: The pagination details.
141 * required:
142 * - limit
143 * - offset
144 * - count
145 * properties:
146 * limit:
147 * type: number
148 * title: limit
149 * description: The maximum number of items retrieved.
150 * offset:
151 * type: number
152 * title: offset
153 * description: The number of items skipped before retrieving the returned items.
154 * count:
155 * type: number
156 * title: count
157 * description: The total number of items available.
158 * estimate_count:
159 * type: number
160 * title: estimate_count
161 * description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
162 * x-featureFlag: index_engine
163 * - type: object
164 * description: The list of tax providers.
165 * required:
166 * - tax_providers
167 * properties:
168 * tax_providers:
169 * type: array
170 * description: The list of tax providers.
171 * items:
172 * $ref: "#/components/schemas/AdminTaxProvider"
173 * "400":
174 * $ref: "#/components/responses/400_error"
175 * "401":
176 * $ref: "#/components/responses/unauthorized"
177 * "404":
178 * $ref: "#/components/responses/not_found_error"
179 * "409":
180 * $ref: "#/components/responses/invalid_state_error"
181 * "422":
182 * $ref: "#/components/responses/invalid_request_error"
183 * "500":
184 * $ref: "#/components/responses/500_error"
185 * x-since: 2.8.0
186 *
187 */
188