@wix/atlas 1.0.11 → 1.0.12

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 (101) hide show
  1. package/build/cjs/context.d.ts +3 -0
  2. package/build/cjs/context.js +30 -0
  3. package/build/cjs/context.js.map +1 -0
  4. package/build/cjs/index.d.ts +3 -3
  5. package/build/cjs/index.js +8 -4
  6. package/build/cjs/index.js.map +1 -1
  7. package/build/cjs/meta.d.ts +3 -0
  8. package/build/cjs/{index.typings.js → meta.js} +9 -5
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/es/context.d.ts +3 -0
  11. package/build/es/context.js +4 -0
  12. package/build/es/context.js.map +1 -0
  13. package/build/es/index.d.ts +3 -3
  14. package/build/es/index.js +3 -3
  15. package/build/es/index.js.map +1 -1
  16. package/build/es/meta.d.ts +3 -0
  17. package/build/es/meta.js +4 -0
  18. package/build/es/meta.js.map +1 -0
  19. package/context/package.json +7 -0
  20. package/meta/package.json +7 -0
  21. package/package.json +25 -8
  22. package/type-bundles/context.bundle.d.ts +249 -0
  23. package/type-bundles/index.bundle.d.ts +405 -0
  24. package/type-bundles/meta.bundle.d.ts +507 -0
  25. package/build/cjs/index.typings.d.ts +0 -3
  26. package/build/cjs/index.typings.js.map +0 -1
  27. package/build/cjs/src/atlas-v2-place.http.d.ts +0 -4
  28. package/build/cjs/src/atlas-v2-place.http.js +0 -126
  29. package/build/cjs/src/atlas-v2-place.http.js.map +0 -1
  30. package/build/cjs/src/atlas-v2-place.public.d.ts +0 -8
  31. package/build/cjs/src/atlas-v2-place.public.js +0 -14
  32. package/build/cjs/src/atlas-v2-place.public.js.map +0 -1
  33. package/build/cjs/src/atlas-v2-place.types.d.ts +0 -73
  34. package/build/cjs/src/atlas-v2-place.types.js +0 -20
  35. package/build/cjs/src/atlas-v2-place.types.js.map +0 -1
  36. package/build/cjs/src/atlas-v2-place.universal.d.ts +0 -93
  37. package/build/cjs/src/atlas-v2-place.universal.js +0 -125
  38. package/build/cjs/src/atlas-v2-place.universal.js.map +0 -1
  39. package/build/cjs/src/atlas-v2-prediction.http.d.ts +0 -4
  40. package/build/cjs/src/atlas-v2-prediction.http.js +0 -124
  41. package/build/cjs/src/atlas-v2-prediction.http.js.map +0 -1
  42. package/build/cjs/src/atlas-v2-prediction.public.d.ts +0 -8
  43. package/build/cjs/src/atlas-v2-prediction.public.js +0 -14
  44. package/build/cjs/src/atlas-v2-prediction.public.js.map +0 -1
  45. package/build/cjs/src/atlas-v2-prediction.types.d.ts +0 -74
  46. package/build/cjs/src/atlas-v2-prediction.types.js +0 -11
  47. package/build/cjs/src/atlas-v2-prediction.types.js.map +0 -1
  48. package/build/cjs/src/atlas-v2-prediction.universal.d.ts +0 -103
  49. package/build/cjs/src/atlas-v2-prediction.universal.js +0 -120
  50. package/build/cjs/src/atlas-v2-prediction.universal.js.map +0 -1
  51. package/build/cjs/src/atlas-v2-search-result.http.d.ts +0 -4
  52. package/build/cjs/src/atlas-v2-search-result.http.js +0 -137
  53. package/build/cjs/src/atlas-v2-search-result.http.js.map +0 -1
  54. package/build/cjs/src/atlas-v2-search-result.public.d.ts +0 -8
  55. package/build/cjs/src/atlas-v2-search-result.public.js +0 -16
  56. package/build/cjs/src/atlas-v2-search-result.public.js.map +0 -1
  57. package/build/cjs/src/atlas-v2-search-result.types.d.ts +0 -106
  58. package/build/cjs/src/atlas-v2-search-result.types.js +0 -37
  59. package/build/cjs/src/atlas-v2-search-result.types.js.map +0 -1
  60. package/build/cjs/src/atlas-v2-search-result.universal.d.ts +0 -131
  61. package/build/cjs/src/atlas-v2-search-result.universal.js +0 -142
  62. package/build/cjs/src/atlas-v2-search-result.universal.js.map +0 -1
  63. package/build/es/index.typings.d.ts +0 -3
  64. package/build/es/index.typings.js +0 -4
  65. package/build/es/index.typings.js.map +0 -1
  66. package/build/es/src/atlas-v2-place.http.d.ts +0 -4
  67. package/build/es/src/atlas-v2-place.http.js +0 -122
  68. package/build/es/src/atlas-v2-place.http.js.map +0 -1
  69. package/build/es/src/atlas-v2-place.public.d.ts +0 -8
  70. package/build/es/src/atlas-v2-place.public.js +0 -9
  71. package/build/es/src/atlas-v2-place.public.js.map +0 -1
  72. package/build/es/src/atlas-v2-place.types.d.ts +0 -73
  73. package/build/es/src/atlas-v2-place.types.js +0 -17
  74. package/build/es/src/atlas-v2-place.types.js.map +0 -1
  75. package/build/es/src/atlas-v2-place.universal.d.ts +0 -93
  76. package/build/es/src/atlas-v2-place.universal.js +0 -102
  77. package/build/es/src/atlas-v2-place.universal.js.map +0 -1
  78. package/build/es/src/atlas-v2-prediction.http.d.ts +0 -4
  79. package/build/es/src/atlas-v2-prediction.http.js +0 -120
  80. package/build/es/src/atlas-v2-prediction.http.js.map +0 -1
  81. package/build/es/src/atlas-v2-prediction.public.d.ts +0 -8
  82. package/build/es/src/atlas-v2-prediction.public.js +0 -9
  83. package/build/es/src/atlas-v2-prediction.public.js.map +0 -1
  84. package/build/es/src/atlas-v2-prediction.types.d.ts +0 -74
  85. package/build/es/src/atlas-v2-prediction.types.js +0 -8
  86. package/build/es/src/atlas-v2-prediction.types.js.map +0 -1
  87. package/build/es/src/atlas-v2-prediction.universal.d.ts +0 -103
  88. package/build/es/src/atlas-v2-prediction.universal.js +0 -97
  89. package/build/es/src/atlas-v2-prediction.universal.js.map +0 -1
  90. package/build/es/src/atlas-v2-search-result.http.d.ts +0 -4
  91. package/build/es/src/atlas-v2-search-result.http.js +0 -133
  92. package/build/es/src/atlas-v2-search-result.http.js.map +0 -1
  93. package/build/es/src/atlas-v2-search-result.public.d.ts +0 -8
  94. package/build/es/src/atlas-v2-search-result.public.js +0 -9
  95. package/build/es/src/atlas-v2-search-result.public.js.map +0 -1
  96. package/build/es/src/atlas-v2-search-result.types.d.ts +0 -106
  97. package/build/es/src/atlas-v2-search-result.types.js +0 -34
  98. package/build/es/src/atlas-v2-search-result.types.js.map +0 -1
  99. package/build/es/src/atlas-v2-search-result.universal.d.ts +0 -131
  100. package/build/es/src/atlas-v2-search-result.universal.js +0 -119
  101. package/build/es/src/atlas-v2-search-result.universal.js.map +0 -1
@@ -1,103 +0,0 @@
1
- export declare const __debug: {
2
- verboseLogging: {
3
- on: () => boolean;
4
- off: () => boolean;
5
- };
6
- };
7
- export interface Prediction {
8
- /** The human-readable name of the prediction */
9
- description?: string;
10
- /** The id of the prediction that can be use in place api. Available for short time. */
11
- searchId?: string;
12
- /** Contains an array with offset value and length. These describe the location of the entered term in the prediction result text, so that the term can be highlighted if desired */
13
- matchedSubstrings?: MatchedSubstrings[];
14
- /** Provides pre-formatted text that can be shown in your autocomplete results */
15
- textStructure?: TextStructure;
16
- /** Contains an integer indicating the straight-line distance between the predicted place, and the specified origin point, in meters. */
17
- distanceInMeters?: number | null;
18
- }
19
- export interface MatchedSubstrings {
20
- length?: number;
21
- offset?: number;
22
- }
23
- export interface TextStructure {
24
- /** Contains the main text of a prediction, usually the name of the place */
25
- mainText?: string;
26
- /** Contains the secondary text of a prediction, usually the location of the place */
27
- secondaryText?: string;
28
- /** Contains an array with offset value and length. These describe the location of the entered term in the prediction result text, so that the term can be highlighted if desired */
29
- mainTextMatchedSubstrings?: MatchedSubstrings[];
30
- }
31
- export interface ListPredictionsRequest {
32
- /** The text the predictions will be based on. */
33
- input?: string;
34
- /** The origin point from which to calculate straight-line distance to the destination */
35
- origin?: AddressLocation;
36
- /** The point around which you wish to retrieve place information */
37
- location?: AddressLocation;
38
- /** The acceptable distance from that location (in meters) */
39
- radius?: string | null;
40
- /** Filters the user can add in order to get more accurate results */
41
- filterBy?: FilterBy[];
42
- }
43
- export interface AddressLocation {
44
- /** Address latitude. */
45
- latitude?: number | null;
46
- /** Address longitude. */
47
- longitude?: number | null;
48
- }
49
- export interface FilterBy {
50
- /** One of the filter types enum */
51
- filterType?: FilterType;
52
- /** Free text like "us" */
53
- filterValue?: string;
54
- }
55
- export declare enum FilterType {
56
- /** Filter by zip code */
57
- zip_code = "zip_code",
58
- /** Filter by 2-letters or 3-letters country code */
59
- country_code = "country_code"
60
- }
61
- export interface ListPredictionsResponse {
62
- predictions?: Prediction[];
63
- }
64
- export interface PredictRequest {
65
- /** The text the predictions will be based on. */
66
- input: string;
67
- /** The origin point from which to calculate straight-line distance to the destination */
68
- origin?: AddressLocation;
69
- /** The point around which you wish to retrieve place information */
70
- location?: AddressLocation;
71
- /** The acceptable distance from that location (in meters) */
72
- radius?: string | null;
73
- /** alpha-2 or alpha-3 ISO-3166 country codes to filter by */
74
- countryCodes?: string[];
75
- /** A random string which identifies an autocomplete session for billing purposes. The session begins when the user starts typing a query, and concludes when they select a place and a call to Get Place is made. Once a session has concluded, the token is no longer valid. your app must generate a fresh token for each session. */
76
- sessionToken?: string | null;
77
- }
78
- export interface PredictResponse {
79
- predictions?: Prediction[];
80
- }
81
- /**
82
- * A Predict end-point take an input and returns an list of Prediction object.
83
- * @param input - The text the predictions will be based on.
84
- * @public
85
- * @documentationMaturity preview
86
- * @requiredField input
87
- * @applicableIdentity APP
88
- * @applicableIdentity MEMBER
89
- * @applicableIdentity VISITOR
90
- */
91
- export declare function predict(input: string, options?: PredictOptions): Promise<PredictResponse>;
92
- export interface PredictOptions {
93
- /** The origin point from which to calculate straight-line distance to the destination */
94
- origin?: AddressLocation;
95
- /** The point around which you wish to retrieve place information */
96
- location?: AddressLocation;
97
- /** The acceptable distance from that location (in meters) */
98
- radius?: string | null;
99
- /** alpha-2 or alpha-3 ISO-3166 country codes to filter by */
100
- countryCodes?: string[];
101
- /** A random string which identifies an autocomplete session for billing purposes. The session begins when the user starts typing a query, and concludes when they select a place and a call to Get Place is made. Once a session has concluded, the token is no longer valid. your app must generate a fresh token for each session. */
102
- sessionToken?: string | null;
103
- }
@@ -1,120 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
- Object.defineProperty(o, "default", { enumerable: true, value: v });
11
- }) : function(o, v) {
12
- o["default"] = v;
13
- });
14
- var __importStar = (this && this.__importStar) || function (mod) {
15
- if (mod && mod.__esModule) return mod;
16
- var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
- __setModuleDefault(result, mod);
19
- return result;
20
- };
21
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
22
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
23
- return new (P || (P = Promise))(function (resolve, reject) {
24
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
25
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
26
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
27
- step((generator = generator.apply(thisArg, _arguments || [])).next());
28
- });
29
- };
30
- Object.defineProperty(exports, "__esModule", { value: true });
31
- exports.predict = exports.FilterType = exports.__debug = void 0;
32
- const velo_1 = require("@wix/metro-runtime/velo");
33
- const ambassadorWixAtlasV2Prediction = __importStar(require("./atlas-v2-prediction.http"));
34
- let __verbose = false;
35
- function __log(...args) {
36
- __verbose && console.log(...args);
37
- }
38
- function __inspect(obj) {
39
- return obj;
40
- }
41
- exports.__debug = {
42
- verboseLogging: {
43
- on: () => (__verbose = true),
44
- off: () => (__verbose = false),
45
- },
46
- };
47
- const _toVeloEntity = '$';
48
- const _fromVeloEntity = '$';
49
- var FilterType;
50
- (function (FilterType) {
51
- /** Filter by zip code */
52
- FilterType["zip_code"] = "zip_code";
53
- /** Filter by 2-letters or 3-letters country code */
54
- FilterType["country_code"] = "country_code";
55
- })(FilterType = exports.FilterType || (exports.FilterType = {}));
56
- const _predictRequest = {};
57
- const _predictResponse = {};
58
- /**
59
- * A Predict end-point take an input and returns an list of Prediction object.
60
- * @param input - The text the predictions will be based on.
61
- * @public
62
- * @documentationMaturity preview
63
- * @requiredField input
64
- * @applicableIdentity APP
65
- * @applicableIdentity MEMBER
66
- * @applicableIdentity VISITOR
67
- */
68
- function predict(input, options) {
69
- var _a, _b, _c;
70
- return __awaiter(this, arguments, void 0, function* () {
71
- const requestTransformation = {
72
- input: '$[0]',
73
- origin: '$[1].origin',
74
- location: '$[1].location',
75
- radius: '$[1].radius',
76
- countryCodes: '$[1].countryCodes',
77
- sessionToken: '$[1].sessionToken',
78
- };
79
- const responseTransformation = '$';
80
- // @ts-ignore
81
- const { httpClient, sideEffects } = arguments[2];
82
- const { toAmbassadorRequest } = (0, velo_1.serializer)({
83
- rootSchema: _predictRequest,
84
- depSchemas: {},
85
- fqdnTransformation: {
86
- paths: [],
87
- transformation: _fromVeloEntity,
88
- },
89
- customTransformation: requestTransformation,
90
- });
91
- const { fromJSON } = (0, velo_1.serializer)({
92
- rootSchema: _predictResponse,
93
- depSchemas: {},
94
- fqdnTransformation: {
95
- paths: [...['Array#predictions']],
96
- transformation: _toVeloEntity,
97
- },
98
- customTransformation: responseTransformation,
99
- });
100
- const payload = toAmbassadorRequest([input, options]);
101
- const reqOpts = ambassadorWixAtlasV2Prediction.predict(payload);
102
- __log(`"Predict" sending request with: ${__inspect(reqOpts)}`);
103
- (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
104
- try {
105
- const result = yield httpClient.request(reqOpts);
106
- (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
107
- return fromJSON(result.data);
108
- }
109
- catch (err) {
110
- const transformedError = (0, velo_1.transformError)(err, requestTransformation, [
111
- 'input',
112
- 'options',
113
- ]);
114
- (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
115
- throw transformedError;
116
- }
117
- });
118
- }
119
- exports.predict = predict;
120
- //# sourceMappingURL=atlas-v2-prediction.universal.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"atlas-v2-prediction.universal.js","sourceRoot":"","sources":["../../../src/atlas-v2-prediction.universal.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAqE;AAErE,2FAA6E;AAE7E,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,SAAS,KAAK,CAAC,GAAG,IAAW;IAC3B,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,SAAS,CAAC,GAAQ;IACzB,OAAO,GAAG,CAAC;AACb,CAAC;AAEY,QAAA,OAAO,GAAG;IACrB,cAAc,EAAE;QACd,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,IAAI,CAAC;QAC5B,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,KAAK,CAAC;KAC/B;CACF,CAAC;AACF,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B,MAAM,eAAe,GAAG,GAAG,CAAC;AAwD5B,IAAY,UAKX;AALD,WAAY,UAAU;IACpB,yBAAyB;IACzB,mCAAqB,CAAA;IACrB,oDAAoD;IACpD,2CAA6B,CAAA;AAC/B,CAAC,EALW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAKrB;AAyBD,MAAM,eAAe,GAAG,EAAE,CAAC;AAC3B,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAE5B;;;;;;;;;GASG;AACH,SAAsB,OAAO,CAC3B,KAAa,EACb,OAAwB;;;QAExB,MAAM,qBAAqB,GAAG;YAC5B,KAAK,EAAE,MAAM;YACb,MAAM,EAAE,aAAa;YACrB,QAAQ,EAAE,eAAe;YACzB,MAAM,EAAE,aAAa;YACrB,YAAY,EAAE,mBAA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AAE;YACjB,MAAM,gBAAgB,GAAG,IAAA,qBAAc,EAAC,GAAG,EAAE,qBAAqB,EAAE;gBAClE,OAAO;gBACP,SAAS;aACV,CAAC,CAAC;YACH,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAAO,+CAApB,WAAW,EAAY,GAAG,CAAC,CAAC;YAE5B,MAAM,gBAAgB,CAAC;SACxB;;CACF;AA7DD,0BA6DC"}
@@ -1,4 +0,0 @@
1
- import { RequestOptionsFactory } from '@wix/sdk-types';
2
- import { SearchRequest, SearchResponse } from './atlas-v2-search-result.types';
3
- /** A Search request takes a free text as an input and returns a list of 'Address' objects. */
4
- export declare function search(payload: SearchRequest): RequestOptionsFactory<SearchResponse>;
@@ -1,137 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.search = void 0;
4
- const metro_runtime_1 = require("@wix/metro-runtime");
5
- const ambassador_1 = require("@wix/metro-runtime/ambassador");
6
- const metro_runtime_2 = require("@wix/metro-runtime");
7
- const _address = { geocode: '_addressLocation' };
8
- const _addressLocation = {
9
- latitude: 'google.protobuf.DoubleValue',
10
- longitude: 'google.protobuf.DoubleValue',
11
- };
12
- const _searchRequest = {};
13
- const _searchResponse = { searchResults: '_searchResult' };
14
- const _searchResult = { address: '_address' };
15
- function resolveComWixpressViAtlasServiceV2LocationServiceV2Url(opts) {
16
- const domainToMappings = {
17
- 'api._api_base_domain_': [
18
- {
19
- srcPath: '/wix-atlas-service-web',
20
- destPath: '',
21
- },
22
- ],
23
- 'bo._base_domain_': [
24
- {
25
- srcPath: '/wix-atlas-service-web',
26
- destPath: '',
27
- },
28
- ],
29
- _: [
30
- {
31
- srcPath: '/api/wix-atlas-service-web',
32
- destPath: '',
33
- },
34
- {
35
- srcPath: '/_api/wix-atlas-service-web',
36
- destPath: '',
37
- },
38
- ],
39
- 'www._base_domain_': [
40
- {
41
- srcPath: '/wix-atlas-service-web',
42
- destPath: '',
43
- },
44
- {
45
- srcPath: '/_api/wix-atlas-service-web',
46
- destPath: '',
47
- },
48
- {
49
- srcPath: '/api/wix-atlas-service-web',
50
- destPath: '',
51
- },
52
- ],
53
- 'manage._base_domain_': [
54
- {
55
- srcPath: '/wix-atlas-service-web',
56
- destPath: '',
57
- },
58
- ],
59
- 'editor._base_domain_': [
60
- {
61
- srcPath: '/wix-atlas-service-web',
62
- destPath: '',
63
- },
64
- {
65
- srcPath: '/api/wix-atlas-service-web',
66
- destPath: '',
67
- },
68
- ],
69
- 'blocks._base_domain_': [
70
- {
71
- srcPath: '/wix-atlas-service-web',
72
- destPath: '',
73
- },
74
- {
75
- srcPath: '/api/wix-atlas-service-web',
76
- destPath: '',
77
- },
78
- ],
79
- 'create.editorx': [
80
- {
81
- srcPath: '/wix-atlas-service-web',
82
- destPath: '',
83
- },
84
- {
85
- srcPath: '/api/wix-atlas-service-web',
86
- destPath: '',
87
- },
88
- ],
89
- 'editor.wixapps.net': [
90
- {
91
- srcPath: '/api/wix-atlas-service-web',
92
- destPath: '',
93
- },
94
- ],
95
- };
96
- return (0, metro_runtime_2.resolveUrl)(Object.assign(opts, { domainToMappings }));
97
- }
98
- /** A Search request takes a free text as an input and returns a list of 'Address' objects. */
99
- function search(payload) {
100
- const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_searchRequest, {});
101
- const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_searchResponse, {
102
- _address,
103
- _addressLocation,
104
- _searchResult,
105
- });
106
- function __search({ host }) {
107
- const serializedData = toReq(payload);
108
- const metadata = {
109
- entityFqdn: 'wix.atlas.v2.search_result',
110
- method: 'GET',
111
- methodFqn: 'com.wixpress.vi.atlas.service.v2.LocationServiceV2.Search',
112
- url: resolveComWixpressViAtlasServiceV2LocationServiceV2Url({
113
- protoPath: '/v2/location/search',
114
- data: serializedData,
115
- host,
116
- }),
117
- params: (0, metro_runtime_1.toURLSearchParams)(serializedData),
118
- transformResponse: fromRes,
119
- fallback: [
120
- {
121
- method: 'GET',
122
- url: resolveComWixpressViAtlasServiceV2LocationServiceV2Url({
123
- protoPath: '/v2/search',
124
- data: serializedData,
125
- host,
126
- }),
127
- params: (0, metro_runtime_1.toURLSearchParams)(serializedData),
128
- },
129
- ],
130
- };
131
- return metadata;
132
- }
133
- __search.fromReq = fromReq;
134
- return __search;
135
- }
136
- exports.search = search;
137
- //# sourceMappingURL=atlas-v2-search-result.http.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"atlas-v2-search-result.http.js","sourceRoot":"","sources":["../../../src/atlas-v2-search-result.http.ts"],"names":[],"mappings":";;;AAAA,sDAAuD;AACvD,8DAA2D;AAC3D,sDAAgD;AAKhD,MAAM,QAAQ,GAAG,EAAE,OAAO,EAAE,kBAAkB,EAAE,CAAC;AACjD,MAAM,gBAAgB,GAAG;IACvB,QAAQ,EAAE,6BAA6B;IACvC,SAAS,EAAE,6BAA6B;CACzC,CAAC;AACF,MAAM,cAAc,GAAG,EAAE,CAAC;AAC1B,MAAM,eAAe,GAAG,EAAE,aAAa,EAAE,eAAe,EAAE,CAAC;AAC3D,MAAM,aAAa,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;AAE9C,SAAS,sDAAsD,CAC7D,IAA8C;IAE9C,MAAM,gBAAgB,GAAG;QACvB,uBAAuB,EAAE;YACvB;gBACE,OAAO,EAAE,wBAAwB;gBACjC,QAAQ,EAAE,EAAE;aACb;SACF;QACD,kBAAkB,EAAE;YAClB;gBACE,OAAO,EAAE,wBAAwB;gBACjC,QAAQ,EAAE,EAAE;aACb;SACF;QACD,CAAC,EAAE;YACD;gBACE,OAAO,EAAE,4BAA4B;gBACrC,QAAQ,EAAE,EAAE;aACb;YACD;gBACE,OAAO,EAAE,6BAA6B;gBACtC,QAAQ,EAAE,EAAE;aACb;SACF;QACD,mBAAmB,EAAE;YACnB;gBACE,OAAO,EAAE,wBAAwB;gBACjC,QAAQ,EAAE,EAAE;aACb;YACD;gBACE,OAAO,EAAE,6BAA6B;gBACt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,CAAC,OAAO,CAAC,CAAC;QACtC,MAAM,QAAQ,GAAG;YACf,UAAU,EAAE,4BAA4B;YACxC,MAAM,EAAE,KAAY;YACpB,SAAS,EAAE,2DAA2D;YACtE,GAAG,EAAE,sDAAsD,CAAC;gBAC1D,SAAS,EAAE,qBAAqB;gBAChC,IAAI,EAAE,cAAc;gBACpB,IAAI;aACL,CAAC;YACF,MAAM,EAAE,IAAA,iCAAiB,EAAC,cAAc,CAAC;YACzC,iBAAiB,EAAE,OAAO;YAC1B,QAAQ,EAAE;gBACR;oBACE,MAAM,EAAE,KAAY;oBACpB,GAAG,EAAE,sDAAsD,CAAC;wBAC1D,SAAS,EAAE,YAAY;wBACvB,IAAI,EAAE,cAAc;wBACpB,IAAI;qBACL,CAAC;oBACF,MAAM,EAAE,IAAA,iCAAiB,EAAC,cAAc,CAAC;iBAC1C;aACF;SACF,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,QAAQ,CAAC,OAAO,GAAG,OAAO,CAAC;IAE3B,OAAO,QAAQ,CAAC;AAClB,CAAC;AA1CD,wBA0CC"}
@@ -1,8 +0,0 @@
1
- import { HttpClient } from '@wix/sdk-types';
2
- import { SearchOptions } from './atlas-v2-search-result.universal';
3
- export declare const __metadata: {
4
- PACKAGE_NAME: string;
5
- };
6
- export declare function search(httpClient: HttpClient): (options?: SearchOptions | undefined) => Promise<import("./atlas-v2-search-result.universal").SearchResponse>;
7
- export { SubdivisionType, Proximity, FilterType, } from './atlas-v2-search-result.universal';
8
- export { SearchResult, Address, AddressStreetOneOf, StreetAddress, AddressLocation, Subdivision, SearchRequest, FilterBy, SearchResponse, ReverseGeocodingRequest, ReverseGeocodingResponse, SearchOptions, } from './atlas-v2-search-result.universal';
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FilterType = exports.Proximity = exports.SubdivisionType = exports.search = exports.__metadata = void 0;
4
- const atlas_v2_search_result_universal_1 = require("./atlas-v2-search-result.universal");
5
- exports.__metadata = { PACKAGE_NAME: '@wix/atlas' };
6
- function search(httpClient) {
7
- return (options) => (0, atlas_v2_search_result_universal_1.search)(options,
8
- // @ts-ignore
9
- { httpClient });
10
- }
11
- exports.search = search;
12
- var atlas_v2_search_result_universal_2 = require("./atlas-v2-search-result.universal");
13
- Object.defineProperty(exports, "SubdivisionType", { enumerable: true, get: function () { return atlas_v2_search_result_universal_2.SubdivisionType; } });
14
- Object.defineProperty(exports, "Proximity", { enumerable: true, get: function () { return atlas_v2_search_result_universal_2.Proximity; } });
15
- Object.defineProperty(exports, "FilterType", { enumerable: true, get: function () { return atlas_v2_search_result_universal_2.FilterType; } });
16
- //# sourceMappingURL=atlas-v2-search-result.public.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"atlas-v2-search-result.public.js","sourceRoot":"","sources":["../../../src/atlas-v2-search-result.public.ts"],"names":[],"mappings":";;;AACA,yFAG4C;AAE/B,QAAA,UAAU,GAAG,EAAE,YAAY,EAAE,YAAY,EAAE,CAAC;AAEzD,SAAgB,MAAM,CAAC,UAAsB;IAC3C,OAAO,CAAC,OAAuB,EAAE,EAAE,CACjC,IAAA,yCAAe,EACb,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAPD,wBAOC;AAED,uFAI4C;AAH1C,mIAAA,eAAe,OAAA;AACf,6HAAA,SAAS,OAAA;AACT,8HAAA,UAAU,OAAA"}
@@ -1,106 +0,0 @@
1
- export interface SearchResult {
2
- /** The Address object */
3
- address?: Address;
4
- /** stores additional data about the proximity to the specified location */
5
- proximity?: Proximity;
6
- }
7
- /** Physical address */
8
- export interface Address extends AddressStreetOneOf {
9
- /** Street name and number. */
10
- streetAddress?: StreetAddress;
11
- /** Main address line, usually street and number as free text. */
12
- addressLine?: string | null;
13
- /** Country code. */
14
- country?: string | null;
15
- /** Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */
16
- subdivision?: string | null;
17
- /** City name. */
18
- city?: string | null;
19
- /** Zip/postal code. */
20
- postalCode?: string | null;
21
- /** Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */
22
- addressLine2?: string | null;
23
- }
24
- /** @oneof */
25
- export interface AddressStreetOneOf {
26
- /** Street name and number. */
27
- streetAddress?: StreetAddress;
28
- /** Main address line, usually street and number as free text. */
29
- addressLine?: string | null;
30
- }
31
- export interface StreetAddress {
32
- /** Street number. */
33
- number?: string;
34
- /** Street name. */
35
- name?: string;
36
- }
37
- export interface AddressLocation {
38
- /** Address latitude. */
39
- latitude?: number | null;
40
- /** Address longitude. */
41
- longitude?: number | null;
42
- }
43
- export interface Subdivision {
44
- /** Short subdivision code. */
45
- code?: string;
46
- /** Subdivision full name. */
47
- name?: string;
48
- }
49
- export declare enum SubdivisionType {
50
- UNKNOWN_SUBDIVISION_TYPE = "UNKNOWN_SUBDIVISION_TYPE",
51
- /** State */
52
- ADMINISTRATIVE_AREA_LEVEL_1 = "ADMINISTRATIVE_AREA_LEVEL_1",
53
- /** County */
54
- ADMINISTRATIVE_AREA_LEVEL_2 = "ADMINISTRATIVE_AREA_LEVEL_2",
55
- /** City/town */
56
- ADMINISTRATIVE_AREA_LEVEL_3 = "ADMINISTRATIVE_AREA_LEVEL_3",
57
- /** Neighborhood/quarter */
58
- ADMINISTRATIVE_AREA_LEVEL_4 = "ADMINISTRATIVE_AREA_LEVEL_4",
59
- /** Street/block */
60
- ADMINISTRATIVE_AREA_LEVEL_5 = "ADMINISTRATIVE_AREA_LEVEL_5",
61
- /** ADMINISTRATIVE_AREA_LEVEL_0. Indicates the national political entity, and is typically the highest order type returned by the Geocoder. */
62
- COUNTRY = "COUNTRY"
63
- }
64
- export declare enum Proximity {
65
- UNKNOWN_PROXIMITY = "UNKNOWN_PROXIMITY",
66
- /** indicates that the returned result is a precise geocode for which we have location information accurate down to street address precision */
67
- PINPOINT = "PINPOINT",
68
- /** indicates that the returned result is the geometric center of a result */
69
- APPROXIMATE = "APPROXIMATE",
70
- /** indicates that the returned result is around an area */
71
- GENERAL_AREA = "GENERAL_AREA"
72
- }
73
- /** User must provide query or filter by parameters */
74
- export interface SearchRequest {
75
- /** Free text */
76
- query?: string | null;
77
- /** Deprecate! - Please use 'zipCode' and 'countryCodes' fields */
78
- filterBy?: FilterBy[];
79
- /** Zip code filter the user can add in order to get more accurate results */
80
- zipCode?: string | null;
81
- /** Country codes filter the user can add in order to get more accurate results */
82
- countryCodes?: string[];
83
- }
84
- export interface FilterBy {
85
- /** One of the filter types enum */
86
- filterType?: FilterType;
87
- /** Free text like "us" */
88
- filterValue?: string;
89
- }
90
- export declare enum FilterType {
91
- /** Filter by zip code */
92
- zip_code = "zip_code",
93
- /** Filter by 2-letters or 3-letters country code */
94
- country_code = "country_code"
95
- }
96
- export interface SearchResponse {
97
- /** List of 'Address' objects */
98
- searchResults?: SearchResult[];
99
- }
100
- export interface ReverseGeocodingRequest {
101
- /** The latitude and longitude values specifying the location for which you wish to obtain the closest, human-readable address. */
102
- addressLocation?: AddressLocation;
103
- }
104
- export interface ReverseGeocodingResponse {
105
- searchResults?: SearchResult[];
106
- }
@@ -1,37 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FilterType = exports.Proximity = exports.SubdivisionType = void 0;
4
- var SubdivisionType;
5
- (function (SubdivisionType) {
6
- SubdivisionType["UNKNOWN_SUBDIVISION_TYPE"] = "UNKNOWN_SUBDIVISION_TYPE";
7
- /** State */
8
- SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_1"] = "ADMINISTRATIVE_AREA_LEVEL_1";
9
- /** County */
10
- SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_2"] = "ADMINISTRATIVE_AREA_LEVEL_2";
11
- /** City/town */
12
- SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_3"] = "ADMINISTRATIVE_AREA_LEVEL_3";
13
- /** Neighborhood/quarter */
14
- SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_4"] = "ADMINISTRATIVE_AREA_LEVEL_4";
15
- /** Street/block */
16
- SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_5"] = "ADMINISTRATIVE_AREA_LEVEL_5";
17
- /** ADMINISTRATIVE_AREA_LEVEL_0. Indicates the national political entity, and is typically the highest order type returned by the Geocoder. */
18
- SubdivisionType["COUNTRY"] = "COUNTRY";
19
- })(SubdivisionType = exports.SubdivisionType || (exports.SubdivisionType = {}));
20
- var Proximity;
21
- (function (Proximity) {
22
- Proximity["UNKNOWN_PROXIMITY"] = "UNKNOWN_PROXIMITY";
23
- /** indicates that the returned result is a precise geocode for which we have location information accurate down to street address precision */
24
- Proximity["PINPOINT"] = "PINPOINT";
25
- /** indicates that the returned result is the geometric center of a result */
26
- Proximity["APPROXIMATE"] = "APPROXIMATE";
27
- /** indicates that the returned result is around an area */
28
- Proximity["GENERAL_AREA"] = "GENERAL_AREA";
29
- })(Proximity = exports.Proximity || (exports.Proximity = {}));
30
- var FilterType;
31
- (function (FilterType) {
32
- /** Filter by zip code */
33
- FilterType["zip_code"] = "zip_code";
34
- /** Filter by 2-letters or 3-letters country code */
35
- FilterType["country_code"] = "country_code";
36
- })(FilterType = exports.FilterType || (exports.FilterType = {}));
37
- //# sourceMappingURL=atlas-v2-search-result.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"atlas-v2-search-result.types.js","sourceRoot":"","sources":["../../../src/atlas-v2-search-result.types.ts"],"names":[],"mappings":";;;AAsDA,IAAY,eAcX;AAdD,WAAY,eAAe;IACzB,wEAAqD,CAAA;IACrD,YAAY;IACZ,8EAA2D,CAAA;IAC3D,aAAa;IACb,8EAA2D,CAAA;IAC3D,gBAAgB;IAChB,8EAA2D,CAAA;IAC3D,2BAA2B;IAC3B,8EAA2D,CAAA;IAC3D,mBAAmB;IACnB,8EAA2D,CAAA;IAC3D,8IAA8I;IAC9I,sCAAmB,CAAA;AACrB,CAAC,EAdW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAc1B;AAED,IAAY,SAQX;AARD,WAAY,SAAS;IACnB,oDAAuC,CAAA;IACvC,+IAA+I;IAC/I,kCAAqB,CAAA;IACrB,6EAA6E;IAC7E,wCAA2B,CAAA;IAC3B,2DAA2D;IAC3D,0CAA6B,CAAA;AAC/B,CAAC,EARW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAQpB;AAqBD,IAAY,UAKX;AALD,WAAY,UAAU;IACpB,yBAAyB;IACzB,mCAAqB,CAAA;IACrB,oDAAoD;IACpD,2CAA6B,CAAA;AAC/B,CAAC,EALW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAKrB"}