@communecter/cocolight-api-client 1.0.45 → 1.0.46
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.
- package/dist/cocolight-api-client.browser.js +3 -3
- package/dist/cocolight-api-client.cjs +1 -1
- package/dist/cocolight-api-client.mjs.js +1 -1
- package/dist/cocolight-api-client.vite.mjs.js +1 -1
- package/dist/cocolight-api-client.vite.mjs.js.map +1 -1
- package/package.json +1 -1
- package/src/api/EndpointApi.js +15 -0
- package/src/api/EndpointApi.types.d.ts +12 -0
- package/src/endpoints.module.js +1 -1
package/package.json
CHANGED
package/src/api/EndpointApi.js
CHANGED
|
@@ -573,6 +573,21 @@ class EndpointApi {
|
|
|
573
573
|
return this.call("CITY_AUTOCOMPLETE", data);
|
|
574
574
|
}
|
|
575
575
|
|
|
576
|
+
/**
|
|
577
|
+
* Recherche de villes par pays : Recherche de villes par pays avec autocomplétion.
|
|
578
|
+
* Constant : CITY_AUTOCOMPLETE_BY_COUNTRY
|
|
579
|
+
* @param {import("./EndpointApi.types").CityAutocompleteByCountryData} data - Données envoyées à l'API
|
|
580
|
+
* @returns {Promise<Object>} - Les données de réponse.
|
|
581
|
+
* @throws {ApiResponseError} - En cas d'erreur détectée dans la réponse.
|
|
582
|
+
* @throws {Error} - En cas d'erreur inattendue.
|
|
583
|
+
*/
|
|
584
|
+
async cityAutocompleteByCountry(data) {
|
|
585
|
+
if (!data || typeof data !== "object") {
|
|
586
|
+
throw new TypeError("Le paramètre data doit être un objet.");
|
|
587
|
+
}
|
|
588
|
+
return this.call("CITY_AUTOCOMPLETE_BY_COUNTRY", data);
|
|
589
|
+
}
|
|
590
|
+
|
|
576
591
|
/**
|
|
577
592
|
* Suggestions d'entrée : Fournit des suggestions basées sur le nom recherché, etc.
|
|
578
593
|
* Constant : SUGGESTION_INPUT
|
|
@@ -1069,6 +1069,18 @@ export interface CityAutocompleteData {
|
|
|
1069
1069
|
}
|
|
1070
1070
|
|
|
1071
1071
|
|
|
1072
|
+
export interface CityAutocompleteByCountryData {
|
|
1073
|
+
type: "locality";
|
|
1074
|
+
scopeValue: string;
|
|
1075
|
+
formInMap: boolean;
|
|
1076
|
+
/**
|
|
1077
|
+
* Code du pays pour la recherche de localités
|
|
1078
|
+
*/
|
|
1079
|
+
countryCode: string;
|
|
1080
|
+
[k: string]: unknown;
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
|
|
1072
1084
|
export interface SuggestionInputData {
|
|
1073
1085
|
/**
|
|
1074
1086
|
* Nom ou terme recherché
|