/** * @oas [post] /admin/regions/{id}/countries * operationId: "PostRegionsRegionCountries" * summary: "Add Country" * description: "Add a Country to the list of Countries in a Region" * x-authenticated: true * parameters: * - (path) id=* {string} The ID of the Region. * requestBody: * content: * application/json: * schema: * $ref: "#/components/schemas/AdminPostRegionsRegionCountriesReq" * x-codegen: * method: addCountry * x-codeSamples: * - lang: JavaScript * label: JS Client * source: | * import Medusa from "@medusajs/medusa-js" * const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) * // must be previously logged in or use api token * medusa.admin.regions.addCountry(regionId, { * country_code: "dk" * }) * .then(({ region }) => { * console.log(region.id); * }); * - lang: Shell * label: cURL * source: | * curl -X POST '{backend_url}/admin/regions/{region_id}/countries' \ * -H 'Authorization: Bearer {api_token}' \ * -H 'Content-Type: application/json' \ * --data-raw '{ * "country_code": "dk" * }' * security: * - api_token: [] * - cookie_auth: [] * tags: * - Regions * responses: * 200: * description: OK * content: * application/json: * schema: * $ref: "#/components/schemas/AdminRegionsRes" * "400": * $ref: "#/components/responses/400_error" * "401": * $ref: "#/components/responses/unauthorized" * "404": * $ref: "#/components/responses/not_found_error" * "409": * $ref: "#/components/responses/invalid_state_error" * "422": * $ref: "#/components/responses/invalid_request_error" * "500": * $ref: "#/components/responses/500_error" */ declare const _default: (req: any, res: any) => Promise; export default _default; /** * @schema AdminPostRegionsRegionCountriesReq * type: object * required: * - country_code * properties: * country_code: * description: "The 2 character ISO code for the Country." * type: string * externalDocs: * url: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements * description: See a list of codes. */ export declare class AdminPostRegionsRegionCountriesReq { country_code: string; }