@wix/auto_sdk_atlas_places 1.0.0 → 1.0.2

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 (121) hide show
  1. package/build/{es/src/atlas-v2-place-places.types.d.ts → cjs/atlas-v2-place-places.universal-8GIzacBO.d.ts} +18 -32
  2. package/build/cjs/index.d.ts +15 -1
  3. package/build/cjs/index.js +226 -15
  4. package/build/cjs/index.js.map +1 -1
  5. package/build/cjs/meta.d.ts +68 -1
  6. package/build/cjs/meta.js +176 -15
  7. package/build/cjs/meta.js.map +1 -1
  8. package/build/{internal/cjs/src/atlas-v2-place-places.types.d.ts → es/atlas-v2-place-places.universal-8GIzacBO.d.mts} +18 -32
  9. package/build/es/index.d.mts +15 -0
  10. package/build/es/index.mjs +204 -0
  11. package/build/es/index.mjs.map +1 -0
  12. package/build/es/meta.d.mts +68 -0
  13. package/build/es/meta.mjs +152 -0
  14. package/build/es/meta.mjs.map +1 -0
  15. package/build/{cjs/src/atlas-v2-place-places.types.d.ts → internal/cjs/atlas-v2-place-places.universal-8GIzacBO.d.ts} +18 -32
  16. package/build/internal/cjs/index.d.ts +15 -1
  17. package/build/internal/cjs/index.js +226 -15
  18. package/build/internal/cjs/index.js.map +1 -1
  19. package/build/internal/cjs/meta.d.ts +68 -1
  20. package/build/internal/cjs/meta.js +176 -15
  21. package/build/internal/cjs/meta.js.map +1 -1
  22. package/build/internal/es/{src/atlas-v2-place-places.types.d.ts → atlas-v2-place-places.universal-8GIzacBO.d.mts} +18 -32
  23. package/build/internal/es/index.d.mts +15 -0
  24. package/build/internal/es/index.mjs +204 -0
  25. package/build/internal/es/index.mjs.map +1 -0
  26. package/build/internal/es/meta.d.mts +68 -0
  27. package/build/internal/es/meta.mjs +152 -0
  28. package/build/internal/es/meta.mjs.map +1 -0
  29. package/package.json +11 -10
  30. package/build/cjs/index.typings.d.ts +0 -1
  31. package/build/cjs/index.typings.js +0 -18
  32. package/build/cjs/index.typings.js.map +0 -1
  33. package/build/cjs/src/atlas-v2-place-places.context.d.ts +0 -5
  34. package/build/cjs/src/atlas-v2-place-places.context.js +0 -9
  35. package/build/cjs/src/atlas-v2-place-places.context.js.map +0 -1
  36. package/build/cjs/src/atlas-v2-place-places.http.d.ts +0 -3
  37. package/build/cjs/src/atlas-v2-place-places.http.js +0 -133
  38. package/build/cjs/src/atlas-v2-place-places.http.js.map +0 -1
  39. package/build/cjs/src/atlas-v2-place-places.meta.d.ts +0 -13
  40. package/build/cjs/src/atlas-v2-place-places.meta.js +0 -47
  41. package/build/cjs/src/atlas-v2-place-places.meta.js.map +0 -1
  42. package/build/cjs/src/atlas-v2-place-places.public.d.ts +0 -13
  43. package/build/cjs/src/atlas-v2-place-places.public.js +0 -14
  44. package/build/cjs/src/atlas-v2-place-places.public.js.map +0 -1
  45. package/build/cjs/src/atlas-v2-place-places.types.js +0 -20
  46. package/build/cjs/src/atlas-v2-place-places.types.js.map +0 -1
  47. package/build/cjs/src/atlas-v2-place-places.universal.d.ts +0 -132
  48. package/build/cjs/src/atlas-v2-place-places.universal.js +0 -105
  49. package/build/cjs/src/atlas-v2-place-places.universal.js.map +0 -1
  50. package/build/es/index.d.ts +0 -1
  51. package/build/es/index.js +0 -2
  52. package/build/es/index.js.map +0 -1
  53. package/build/es/index.typings.d.ts +0 -1
  54. package/build/es/index.typings.js +0 -2
  55. package/build/es/index.typings.js.map +0 -1
  56. package/build/es/meta.d.ts +0 -1
  57. package/build/es/meta.js +0 -2
  58. package/build/es/meta.js.map +0 -1
  59. package/build/es/src/atlas-v2-place-places.context.d.ts +0 -5
  60. package/build/es/src/atlas-v2-place-places.context.js +0 -5
  61. package/build/es/src/atlas-v2-place-places.context.js.map +0 -1
  62. package/build/es/src/atlas-v2-place-places.http.d.ts +0 -3
  63. package/build/es/src/atlas-v2-place-places.http.js +0 -129
  64. package/build/es/src/atlas-v2-place-places.http.js.map +0 -1
  65. package/build/es/src/atlas-v2-place-places.meta.d.ts +0 -13
  66. package/build/es/src/atlas-v2-place-places.meta.js +0 -20
  67. package/build/es/src/atlas-v2-place-places.meta.js.map +0 -1
  68. package/build/es/src/atlas-v2-place-places.public.d.ts +0 -13
  69. package/build/es/src/atlas-v2-place-places.public.js +0 -9
  70. package/build/es/src/atlas-v2-place-places.public.js.map +0 -1
  71. package/build/es/src/atlas-v2-place-places.types.js +0 -17
  72. package/build/es/src/atlas-v2-place-places.types.js.map +0 -1
  73. package/build/es/src/atlas-v2-place-places.universal.d.ts +0 -132
  74. package/build/es/src/atlas-v2-place-places.universal.js +0 -78
  75. package/build/es/src/atlas-v2-place-places.universal.js.map +0 -1
  76. package/build/internal/cjs/index.typings.d.ts +0 -1
  77. package/build/internal/cjs/index.typings.js +0 -18
  78. package/build/internal/cjs/index.typings.js.map +0 -1
  79. package/build/internal/cjs/src/atlas-v2-place-places.context.d.ts +0 -5
  80. package/build/internal/cjs/src/atlas-v2-place-places.context.js +0 -9
  81. package/build/internal/cjs/src/atlas-v2-place-places.context.js.map +0 -1
  82. package/build/internal/cjs/src/atlas-v2-place-places.http.d.ts +0 -3
  83. package/build/internal/cjs/src/atlas-v2-place-places.http.js +0 -133
  84. package/build/internal/cjs/src/atlas-v2-place-places.http.js.map +0 -1
  85. package/build/internal/cjs/src/atlas-v2-place-places.meta.d.ts +0 -13
  86. package/build/internal/cjs/src/atlas-v2-place-places.meta.js +0 -47
  87. package/build/internal/cjs/src/atlas-v2-place-places.meta.js.map +0 -1
  88. package/build/internal/cjs/src/atlas-v2-place-places.public.d.ts +0 -13
  89. package/build/internal/cjs/src/atlas-v2-place-places.public.js +0 -14
  90. package/build/internal/cjs/src/atlas-v2-place-places.public.js.map +0 -1
  91. package/build/internal/cjs/src/atlas-v2-place-places.types.js +0 -20
  92. package/build/internal/cjs/src/atlas-v2-place-places.types.js.map +0 -1
  93. package/build/internal/cjs/src/atlas-v2-place-places.universal.d.ts +0 -132
  94. package/build/internal/cjs/src/atlas-v2-place-places.universal.js +0 -105
  95. package/build/internal/cjs/src/atlas-v2-place-places.universal.js.map +0 -1
  96. package/build/internal/es/index.d.ts +0 -1
  97. package/build/internal/es/index.js +0 -2
  98. package/build/internal/es/index.js.map +0 -1
  99. package/build/internal/es/index.typings.d.ts +0 -1
  100. package/build/internal/es/index.typings.js +0 -2
  101. package/build/internal/es/index.typings.js.map +0 -1
  102. package/build/internal/es/meta.d.ts +0 -1
  103. package/build/internal/es/meta.js +0 -2
  104. package/build/internal/es/meta.js.map +0 -1
  105. package/build/internal/es/src/atlas-v2-place-places.context.d.ts +0 -5
  106. package/build/internal/es/src/atlas-v2-place-places.context.js +0 -5
  107. package/build/internal/es/src/atlas-v2-place-places.context.js.map +0 -1
  108. package/build/internal/es/src/atlas-v2-place-places.http.d.ts +0 -3
  109. package/build/internal/es/src/atlas-v2-place-places.http.js +0 -129
  110. package/build/internal/es/src/atlas-v2-place-places.http.js.map +0 -1
  111. package/build/internal/es/src/atlas-v2-place-places.meta.d.ts +0 -13
  112. package/build/internal/es/src/atlas-v2-place-places.meta.js +0 -20
  113. package/build/internal/es/src/atlas-v2-place-places.meta.js.map +0 -1
  114. package/build/internal/es/src/atlas-v2-place-places.public.d.ts +0 -13
  115. package/build/internal/es/src/atlas-v2-place-places.public.js +0 -9
  116. package/build/internal/es/src/atlas-v2-place-places.public.js.map +0 -1
  117. package/build/internal/es/src/atlas-v2-place-places.types.js +0 -17
  118. package/build/internal/es/src/atlas-v2-place-places.types.js.map +0 -1
  119. package/build/internal/es/src/atlas-v2-place-places.universal.d.ts +0 -132
  120. package/build/internal/es/src/atlas-v2-place-places.universal.js +0 -78
  121. package/build/internal/es/src/atlas-v2-place-places.universal.js.map +0 -1
@@ -1,4 +1,4 @@
1
- export interface Place {
1
+ interface Place {
2
2
  /** The given place id */
3
3
  placeId?: string;
4
4
  /** The Address object */
@@ -7,11 +7,11 @@ export interface Place {
7
7
  types?: string[];
8
8
  }
9
9
  /** Physical address */
10
- export interface Address extends AddressStreetOneOf {
10
+ interface Address extends AddressStreetOneOf {
11
11
  /** Street name and number. */
12
12
  streetAddress?: StreetAddress;
13
13
  /** Main address line, usually street and number as free text. */
14
- addressLine?: string | null;
14
+ addressLine1?: string | null;
15
15
  /**
16
16
  * Country code.
17
17
  * @format COUNTRY
@@ -27,31 +27,31 @@ export interface Address extends AddressStreetOneOf {
27
27
  addressLine2?: string | null;
28
28
  }
29
29
  /** @oneof */
30
- export interface AddressStreetOneOf {
30
+ interface AddressStreetOneOf {
31
31
  /** Street name and number. */
32
32
  streetAddress?: StreetAddress;
33
33
  /** Main address line, usually street and number as free text. */
34
34
  addressLine?: string | null;
35
35
  }
36
- export interface StreetAddress {
36
+ interface StreetAddress {
37
37
  /** Street number. */
38
38
  number?: string;
39
39
  /** Street name. */
40
40
  name?: string;
41
41
  }
42
- export interface AddressLocation {
42
+ interface AddressLocation {
43
43
  /** Address latitude. */
44
44
  latitude?: number | null;
45
45
  /** Address longitude. */
46
46
  longitude?: number | null;
47
47
  }
48
- export interface Subdivision {
48
+ interface Subdivision {
49
49
  /** Short subdivision code. */
50
50
  code?: string;
51
51
  /** Subdivision full name. */
52
52
  name?: string;
53
53
  }
54
- export declare enum SubdivisionType {
54
+ declare enum SubdivisionType {
55
55
  UNKNOWN_SUBDIVISION_TYPE = "UNKNOWN_SUBDIVISION_TYPE",
56
56
  /** State */
57
57
  ADMINISTRATIVE_AREA_LEVEL_1 = "ADMINISTRATIVE_AREA_LEVEL_1",
@@ -66,7 +66,7 @@ export declare enum SubdivisionType {
66
66
  /** ADMINISTRATIVE_AREA_LEVEL_0. Indicates the national political entity, and is typically the highest order type returned by the Geocoder. */
67
67
  COUNTRY = "COUNTRY"
68
68
  }
69
- export interface GetPlaceRequest {
69
+ interface GetPlaceRequest {
70
70
  searchId: string;
71
71
  /**
72
72
  * 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.
@@ -74,29 +74,15 @@ export interface GetPlaceRequest {
74
74
  */
75
75
  sessionToken?: string | null;
76
76
  }
77
- export interface GetPlaceResponse {
77
+ interface GetPlaceResponse {
78
78
  place?: Place;
79
79
  }
80
- interface StreetAddressNonNullableFields {
81
- number: string;
82
- name: string;
83
- apt: string;
84
- }
85
- interface SubdivisionNonNullableFields {
86
- code: string;
87
- name: string;
88
- type: SubdivisionType;
89
- }
90
- interface AddressNonNullableFields {
91
- streetAddress?: StreetAddressNonNullableFields;
92
- subdivisions: SubdivisionNonNullableFields[];
93
- }
94
- interface PlaceNonNullableFields {
95
- placeId: string;
96
- address?: AddressNonNullableFields;
97
- types: string[];
98
- }
99
- export interface GetPlaceResponseNonNullableFields {
100
- place?: PlaceNonNullableFields;
80
+ interface GetPlaceOptions {
81
+ /**
82
+ * 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.
83
+ * @format GUID
84
+ */
85
+ sessionToken?: string | null;
101
86
  }
102
- export {};
87
+
88
+ export { type Address as A, type GetPlaceOptions as G, type Place as P, SubdivisionType as S, type GetPlaceResponse as a, type AddressStreetOneOf as b, type StreetAddress as c, type AddressLocation as d, type Subdivision as e, type GetPlaceRequest as f };
@@ -1 +1,15 @@
1
- export * from './src/atlas-v2-place-places.context.js';
1
+ import { HttpClient, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
+ import { G as GetPlaceOptions, a as GetPlaceResponse } from './atlas-v2-place-places.universal-8GIzacBO.js';
3
+ export { A as Address, d as AddressLocation, b as AddressStreetOneOf, f as GetPlaceRequest, P as Place, c as StreetAddress, e as Subdivision, S as SubdivisionType } from './atlas-v2-place-places.universal-8GIzacBO.js';
4
+
5
+ declare function getPlace$1(httpClient: HttpClient): GetPlaceSignature;
6
+ interface GetPlaceSignature {
7
+ /**
8
+ * Once you have a search_id from a autocomplete Search, you can request more details about a particular establishment or point of interest by initiating a get place request.
9
+ */
10
+ (searchId: string, options?: GetPlaceOptions | undefined): Promise<GetPlaceResponse>;
11
+ }
12
+
13
+ declare const getPlace: MaybeContext<BuildRESTFunction<typeof getPlace$1> & typeof getPlace$1>;
14
+
15
+ export { GetPlaceOptions, GetPlaceResponse, getPlace };
@@ -1,18 +1,229 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
15
9
  };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./src/atlas-v2-place-places.context.js"), exports);
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ SubdivisionType: () => SubdivisionType,
24
+ getPlace: () => getPlace4
25
+ });
26
+ module.exports = __toCommonJS(index_exports);
27
+
28
+ // src/atlas-v2-place-places.universal.ts
29
+ var import_transform_error = require("@wix/sdk-runtime/transform-error");
30
+ var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
31
+
32
+ // src/atlas-v2-place-places.http.ts
33
+ var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
34
+ var import_float = require("@wix/sdk-runtime/transformations/float");
35
+ var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
36
+ var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
37
+ function resolveComWixpressViAtlasServiceV2PlacesServiceV2Url(opts) {
38
+ const domainToMappings = {
39
+ "api._api_base_domain_": [
40
+ {
41
+ srcPath: "/wix-atlas-service-web",
42
+ destPath: ""
43
+ }
44
+ ],
45
+ "bo._base_domain_": [
46
+ {
47
+ srcPath: "/wix-atlas-service-web",
48
+ destPath: ""
49
+ }
50
+ ],
51
+ "wixbo.ai": [
52
+ {
53
+ srcPath: "/wix-atlas-service-web",
54
+ destPath: ""
55
+ }
56
+ ],
57
+ "wix-bo.com": [
58
+ {
59
+ srcPath: "/wix-atlas-service-web",
60
+ destPath: ""
61
+ }
62
+ ],
63
+ _: [
64
+ {
65
+ srcPath: "/api/wix-atlas-service-web",
66
+ destPath: ""
67
+ },
68
+ {
69
+ srcPath: "/_api/wix-atlas-service-web",
70
+ destPath: ""
71
+ }
72
+ ],
73
+ "www._base_domain_": [
74
+ {
75
+ srcPath: "/wix-atlas-service-web",
76
+ destPath: ""
77
+ },
78
+ {
79
+ srcPath: "/_api/wix-atlas-service-web",
80
+ destPath: ""
81
+ },
82
+ {
83
+ srcPath: "/api/wix-atlas-service-web",
84
+ destPath: ""
85
+ }
86
+ ],
87
+ "manage._base_domain_": [
88
+ {
89
+ srcPath: "/wix-atlas-service-web",
90
+ destPath: ""
91
+ }
92
+ ],
93
+ "editor._base_domain_": [
94
+ {
95
+ srcPath: "/wix-atlas-service-web",
96
+ destPath: ""
97
+ },
98
+ {
99
+ srcPath: "/api/wix-atlas-service-web",
100
+ destPath: ""
101
+ }
102
+ ],
103
+ "blocks._base_domain_": [
104
+ {
105
+ srcPath: "/wix-atlas-service-web",
106
+ destPath: ""
107
+ },
108
+ {
109
+ srcPath: "/api/wix-atlas-service-web",
110
+ destPath: ""
111
+ }
112
+ ],
113
+ "create.editorx": [
114
+ {
115
+ srcPath: "/wix-atlas-service-web",
116
+ destPath: ""
117
+ },
118
+ {
119
+ srcPath: "/api/wix-atlas-service-web",
120
+ destPath: ""
121
+ }
122
+ ],
123
+ "editor.wixapps.net": [
124
+ {
125
+ srcPath: "/api/wix-atlas-service-web",
126
+ destPath: ""
127
+ }
128
+ ]
129
+ };
130
+ return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
131
+ }
132
+ var PACKAGE_NAME = "@wix/auto_sdk_atlas_places";
133
+ function getPlace(payload) {
134
+ function __getPlace({ host }) {
135
+ const metadata = {
136
+ entityFqdn: "wix.atlas.v2.place",
137
+ method: "GET",
138
+ methodFqn: "com.wixpress.vi.atlas.service.v2.PlacesServiceV2.GetPlace",
139
+ packageName: PACKAGE_NAME,
140
+ url: resolveComWixpressViAtlasServiceV2PlacesServiceV2Url({
141
+ protoPath: "/v2/place",
142
+ data: payload,
143
+ host
144
+ }),
145
+ params: (0, import_rest_modules.toURLSearchParams)(payload),
146
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
147
+ {
148
+ transformFn: import_float.transformRESTFloatToSDKFloat,
149
+ paths: [
150
+ { path: "place.address.geocode.latitude" },
151
+ { path: "place.address.geocode.longitude" }
152
+ ]
153
+ }
154
+ ])
155
+ };
156
+ return metadata;
157
+ }
158
+ return __getPlace;
159
+ }
160
+
161
+ // src/atlas-v2-place-places.universal.ts
162
+ var import_address = require("@wix/sdk-runtime/transformations/address");
163
+ var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
164
+ var SubdivisionType = /* @__PURE__ */ ((SubdivisionType2) => {
165
+ SubdivisionType2["UNKNOWN_SUBDIVISION_TYPE"] = "UNKNOWN_SUBDIVISION_TYPE";
166
+ SubdivisionType2["ADMINISTRATIVE_AREA_LEVEL_1"] = "ADMINISTRATIVE_AREA_LEVEL_1";
167
+ SubdivisionType2["ADMINISTRATIVE_AREA_LEVEL_2"] = "ADMINISTRATIVE_AREA_LEVEL_2";
168
+ SubdivisionType2["ADMINISTRATIVE_AREA_LEVEL_3"] = "ADMINISTRATIVE_AREA_LEVEL_3";
169
+ SubdivisionType2["ADMINISTRATIVE_AREA_LEVEL_4"] = "ADMINISTRATIVE_AREA_LEVEL_4";
170
+ SubdivisionType2["ADMINISTRATIVE_AREA_LEVEL_5"] = "ADMINISTRATIVE_AREA_LEVEL_5";
171
+ SubdivisionType2["COUNTRY"] = "COUNTRY";
172
+ return SubdivisionType2;
173
+ })(SubdivisionType || {});
174
+ async function getPlace2(searchId, options) {
175
+ const { httpClient, sideEffects } = arguments[2];
176
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
177
+ searchId,
178
+ sessionToken: options?.sessionToken
179
+ });
180
+ const reqOpts = getPlace(payload);
181
+ sideEffects?.onSiteCall?.();
182
+ try {
183
+ const result = await httpClient.request(reqOpts);
184
+ sideEffects?.onSuccess?.(result);
185
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
186
+ (0, import_transform_paths2.transformPaths)(result.data, [
187
+ {
188
+ transformFn: import_address.transformRESTAddressToSDKAddress,
189
+ paths: [{ path: "place.address" }]
190
+ }
191
+ ])
192
+ );
193
+ } catch (err) {
194
+ const transformedError = (0, import_transform_error.transformError)(
195
+ err,
196
+ {
197
+ spreadPathsToArguments: {},
198
+ explicitPathsToArguments: {
199
+ searchId: "$[0]",
200
+ sessionToken: "$[1].sessionToken"
201
+ },
202
+ singleArgumentUnchanged: false
203
+ },
204
+ ["searchId", "options"]
205
+ );
206
+ sideEffects?.onError?.(err);
207
+ throw transformedError;
208
+ }
209
+ }
210
+
211
+ // src/atlas-v2-place-places.public.ts
212
+ function getPlace3(httpClient) {
213
+ return (searchId, options) => getPlace2(
214
+ searchId,
215
+ options,
216
+ // @ts-ignore
217
+ { httpClient }
218
+ );
219
+ }
220
+
221
+ // src/atlas-v2-place-places.context.ts
222
+ var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
223
+ var getPlace4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getPlace3);
224
+ // Annotate the CommonJS export names for ESM import in node:
225
+ 0 && (module.exports = {
226
+ SubdivisionType,
227
+ getPlace
228
+ });
18
229
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yEAAuD"}
1
+ {"version":3,"sources":["../../index.ts","../../src/atlas-v2-place-places.universal.ts","../../src/atlas-v2-place-places.http.ts","../../src/atlas-v2-place-places.public.ts","../../src/atlas-v2-place-places.context.ts"],"sourcesContent":["export * from './src/atlas-v2-place-places.context.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixAtlasV2Place from './atlas-v2-place-places.http.js';\nimport { transformRESTAddressToSDKAddress } from '@wix/sdk-runtime/transformations/address';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\nexport interface Place {\n /** The given place id */\n placeId?: string;\n /** The Address object */\n address?: Address;\n /** The Place type. For example: airport, library etc... */\n types?: string[];\n}\n\n/** Physical address */\nexport interface Address extends AddressStreetOneOf {\n /** Street name and number. */\n streetAddress?: StreetAddress;\n /** Main address line, usually street and number as free text. */\n addressLine1?: string | null;\n /**\n * Country code.\n * @format COUNTRY\n */\n country?: string | null;\n /** Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */\n subdivision?: string | null;\n /** City name. */\n city?: string | null;\n /** Zip/postal code. */\n postalCode?: string | null;\n /** Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */\n addressLine2?: string | null;\n}\n\n/** @oneof */\nexport interface AddressStreetOneOf {\n /** Street name and number. */\n streetAddress?: StreetAddress;\n /** Main address line, usually street and number as free text. */\n addressLine?: string | null;\n}\n\nexport interface StreetAddress {\n /** Street number. */\n number?: string;\n /** Street name. */\n name?: string;\n}\n\nexport interface AddressLocation {\n /** Address latitude. */\n latitude?: number | null;\n /** Address longitude. */\n longitude?: number | null;\n}\n\nexport interface Subdivision {\n /** Short subdivision code. */\n code?: string;\n /** Subdivision full name. */\n name?: string;\n}\n\nexport enum SubdivisionType {\n UNKNOWN_SUBDIVISION_TYPE = 'UNKNOWN_SUBDIVISION_TYPE',\n /** State */\n ADMINISTRATIVE_AREA_LEVEL_1 = 'ADMINISTRATIVE_AREA_LEVEL_1',\n /** County */\n ADMINISTRATIVE_AREA_LEVEL_2 = 'ADMINISTRATIVE_AREA_LEVEL_2',\n /** City/town */\n ADMINISTRATIVE_AREA_LEVEL_3 = 'ADMINISTRATIVE_AREA_LEVEL_3',\n /** Neighborhood/quarter */\n ADMINISTRATIVE_AREA_LEVEL_4 = 'ADMINISTRATIVE_AREA_LEVEL_4',\n /** Street/block */\n ADMINISTRATIVE_AREA_LEVEL_5 = 'ADMINISTRATIVE_AREA_LEVEL_5',\n /** ADMINISTRATIVE_AREA_LEVEL_0. Indicates the national political entity, and is typically the highest order type returned by the Geocoder. */\n COUNTRY = 'COUNTRY',\n}\n\n/** @enumType */\nexport type SubdivisionTypeWithLiterals =\n | SubdivisionType\n | 'UNKNOWN_SUBDIVISION_TYPE'\n | 'ADMINISTRATIVE_AREA_LEVEL_1'\n | 'ADMINISTRATIVE_AREA_LEVEL_2'\n | 'ADMINISTRATIVE_AREA_LEVEL_3'\n | 'ADMINISTRATIVE_AREA_LEVEL_4'\n | 'ADMINISTRATIVE_AREA_LEVEL_5'\n | 'COUNTRY';\n\nexport interface GetPlaceRequest {\n searchId: string;\n /**\n * 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.\n * @format GUID\n */\n sessionToken?: string | null;\n}\n\nexport interface GetPlaceResponse {\n place?: Place;\n}\n\ntype PlaceNonNullablePaths =\n | `placeId`\n | `address.streetAddress.number`\n | `address.streetAddress.name`\n | `types`;\n\n/**\n * Once you have a search_id from a autocomplete Search, you can request more details about a particular establishment or point of interest by initiating a get place request.\n * @public\n * @documentationMaturity preview\n * @requiredField searchId\n * @permissionId WIX_ATLAS.GET_PLACE\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn com.wixpress.vi.atlas.service.v2.PlacesServiceV2.GetPlace\n */\nexport async function getPlace(\n searchId: string,\n options?: GetPlaceOptions\n): Promise<\n NonNullablePaths<\n GetPlaceResponse,\n { [P in PlaceNonNullablePaths]: `place.${P}` }[PlaceNonNullablePaths]\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n searchId: searchId,\n sessionToken: options?.sessionToken,\n });\n\n const reqOpts = ambassadorWixAtlasV2Place.getPlace(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: [{ path: 'place.address' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n searchId: '$[0]',\n sessionToken: '$[1].sessionToken',\n },\n singleArgumentUnchanged: false,\n },\n ['searchId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetPlaceOptions {\n /**\n * 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.\n * @format GUID\n */\n sessionToken?: string | null;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressViAtlasServiceV2PlacesServiceV2Url(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/wix-atlas-service-web',\n destPath: '',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/wix-atlas-service-web',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/wix-atlas-service-web',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/wix-atlas-service-web',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/api/wix-atlas-service-web',\n destPath: '',\n },\n {\n srcPath: '/_api/wix-atlas-service-web',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/wix-atlas-service-web',\n destPath: '',\n },\n {\n srcPath: '/_api/wix-atlas-service-web',\n destPath: '',\n },\n {\n srcPath: '/api/wix-atlas-service-web',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/wix-atlas-service-web',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/wix-atlas-service-web',\n destPath: '',\n },\n {\n srcPath: '/api/wix-atlas-service-web',\n destPath: '',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/wix-atlas-service-web',\n destPath: '',\n },\n {\n srcPath: '/api/wix-atlas-service-web',\n destPath: '',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/wix-atlas-service-web',\n destPath: '',\n },\n {\n srcPath: '/api/wix-atlas-service-web',\n destPath: '',\n },\n ],\n 'editor.wixapps.net': [\n {\n srcPath: '/api/wix-atlas-service-web',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_atlas_places';\n\n/** Once you have a search_id from a autocomplete Search, you can request more details about a particular establishment or point of interest by initiating a get place request. */\nexport function getPlace(payload: object): RequestOptionsFactory<any> {\n function __getPlace({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.atlas.v2.place',\n method: 'GET' as any,\n methodFqn: 'com.wixpress.vi.atlas.service.v2.PlacesServiceV2.GetPlace',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressViAtlasServiceV2PlacesServiceV2Url({\n protoPath: '/v2/place',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'place.address.geocode.latitude' },\n { path: 'place.address.geocode.longitude' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getPlace;\n}\n","import { HttpClient } from '@wix/sdk-types';\nimport {\n GetPlaceOptions,\n GetPlaceResponse,\n getPlace as universalGetPlace,\n} from './atlas-v2-place-places.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/atlas' };\n\nexport function getPlace(httpClient: HttpClient): GetPlaceSignature {\n return (searchId: string, options?: GetPlaceOptions) =>\n universalGetPlace(\n searchId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetPlaceSignature {\n /**\n * Once you have a search_id from a autocomplete Search, you can request more details about a particular establishment or point of interest by initiating a get place request.\n */\n (\n searchId: string,\n options?: GetPlaceOptions | undefined\n ): Promise<GetPlaceResponse>;\n}\n\nexport {\n Address,\n AddressLocation,\n AddressStreetOneOf,\n GetPlaceOptions,\n GetPlaceRequest,\n GetPlaceResponse,\n Place,\n StreetAddress,\n Subdivision,\n SubdivisionType,\n} from './atlas-v2-place-places.universal.js';\n","import { getPlace as publicGetPlace } from './atlas-v2-place-places.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const getPlace: MaybeContext<\n BuildRESTFunction<typeof publicGetPlace> & typeof publicGetPlace\n> = /*#__PURE__*/ createRESTModule(publicGetPlace);\n\nexport { SubdivisionType } from './atlas-v2-place-places.universal.js';\nexport {\n Place,\n Address,\n AddressStreetOneOf,\n StreetAddress,\n AddressLocation,\n Subdivision,\n GetPlaceRequest,\n GetPlaceResponse,\n GetPlaceOptions,\n} from './atlas-v2-place-places.universal.js';\n"],"mappings":"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","names":["getPlace","import_rest_modules","payload","import_transform_paths","SubdivisionType","getPlace","sdkTransformError","getPlace","import_rest_modules","getPlace"]}
@@ -1 +1,68 @@
1
- export * from './src/atlas-v2-place-places.meta.js';
1
+ import { f as GetPlaceRequest$1, a as GetPlaceResponse$1 } from './atlas-v2-place-places.universal-8GIzacBO.js';
2
+
3
+ interface Place {
4
+ /** The given place id */
5
+ placeId?: string;
6
+ /** The Address object */
7
+ address?: Address;
8
+ /** The Place type. For example: airport, library etc... */
9
+ types?: string[];
10
+ }
11
+ /** Physical address */
12
+ interface Address extends AddressStreetOneOf {
13
+ /** Street name and number. */
14
+ streetAddress?: StreetAddress;
15
+ /** Main address line, usually street and number as free text. */
16
+ addressLine?: string | null;
17
+ /**
18
+ * Country code.
19
+ * @format COUNTRY
20
+ */
21
+ country?: string | null;
22
+ /** Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */
23
+ subdivision?: string | null;
24
+ /** City name. */
25
+ city?: string | null;
26
+ /** Zip/postal code. */
27
+ postalCode?: string | null;
28
+ /** Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */
29
+ addressLine2?: string | null;
30
+ }
31
+ /** @oneof */
32
+ interface AddressStreetOneOf {
33
+ /** Street name and number. */
34
+ streetAddress?: StreetAddress;
35
+ /** Main address line, usually street and number as free text. */
36
+ addressLine?: string | null;
37
+ }
38
+ interface StreetAddress {
39
+ /** Street number. */
40
+ number?: string;
41
+ /** Street name. */
42
+ name?: string;
43
+ }
44
+ interface GetPlaceRequest {
45
+ searchId: string;
46
+ /**
47
+ * 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.
48
+ * @format GUID
49
+ */
50
+ sessionToken?: string | null;
51
+ }
52
+ interface GetPlaceResponse {
53
+ place?: Place;
54
+ }
55
+
56
+ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
57
+ getUrl: (context: any) => string;
58
+ httpMethod: K;
59
+ path: string;
60
+ pathParams: M;
61
+ __requestType: T;
62
+ __originalRequestType: S;
63
+ __responseType: Q;
64
+ __originalResponseType: R;
65
+ };
66
+ declare function getPlace(): __PublicMethodMetaInfo<'GET', {}, GetPlaceRequest$1, GetPlaceRequest, GetPlaceResponse$1, GetPlaceResponse>;
67
+
68
+ export { type __PublicMethodMetaInfo, getPlace };
package/build/cjs/meta.js CHANGED
@@ -1,18 +1,179 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
15
9
  };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./src/atlas-v2-place-places.meta.js"), exports);
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // meta.ts
21
+ var meta_exports = {};
22
+ __export(meta_exports, {
23
+ getPlace: () => getPlace2
24
+ });
25
+ module.exports = __toCommonJS(meta_exports);
26
+
27
+ // src/atlas-v2-place-places.http.ts
28
+ var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
29
+ var import_float = require("@wix/sdk-runtime/transformations/float");
30
+ var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
31
+ var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
32
+ function resolveComWixpressViAtlasServiceV2PlacesServiceV2Url(opts) {
33
+ const domainToMappings = {
34
+ "api._api_base_domain_": [
35
+ {
36
+ srcPath: "/wix-atlas-service-web",
37
+ destPath: ""
38
+ }
39
+ ],
40
+ "bo._base_domain_": [
41
+ {
42
+ srcPath: "/wix-atlas-service-web",
43
+ destPath: ""
44
+ }
45
+ ],
46
+ "wixbo.ai": [
47
+ {
48
+ srcPath: "/wix-atlas-service-web",
49
+ destPath: ""
50
+ }
51
+ ],
52
+ "wix-bo.com": [
53
+ {
54
+ srcPath: "/wix-atlas-service-web",
55
+ destPath: ""
56
+ }
57
+ ],
58
+ _: [
59
+ {
60
+ srcPath: "/api/wix-atlas-service-web",
61
+ destPath: ""
62
+ },
63
+ {
64
+ srcPath: "/_api/wix-atlas-service-web",
65
+ destPath: ""
66
+ }
67
+ ],
68
+ "www._base_domain_": [
69
+ {
70
+ srcPath: "/wix-atlas-service-web",
71
+ destPath: ""
72
+ },
73
+ {
74
+ srcPath: "/_api/wix-atlas-service-web",
75
+ destPath: ""
76
+ },
77
+ {
78
+ srcPath: "/api/wix-atlas-service-web",
79
+ destPath: ""
80
+ }
81
+ ],
82
+ "manage._base_domain_": [
83
+ {
84
+ srcPath: "/wix-atlas-service-web",
85
+ destPath: ""
86
+ }
87
+ ],
88
+ "editor._base_domain_": [
89
+ {
90
+ srcPath: "/wix-atlas-service-web",
91
+ destPath: ""
92
+ },
93
+ {
94
+ srcPath: "/api/wix-atlas-service-web",
95
+ destPath: ""
96
+ }
97
+ ],
98
+ "blocks._base_domain_": [
99
+ {
100
+ srcPath: "/wix-atlas-service-web",
101
+ destPath: ""
102
+ },
103
+ {
104
+ srcPath: "/api/wix-atlas-service-web",
105
+ destPath: ""
106
+ }
107
+ ],
108
+ "create.editorx": [
109
+ {
110
+ srcPath: "/wix-atlas-service-web",
111
+ destPath: ""
112
+ },
113
+ {
114
+ srcPath: "/api/wix-atlas-service-web",
115
+ destPath: ""
116
+ }
117
+ ],
118
+ "editor.wixapps.net": [
119
+ {
120
+ srcPath: "/api/wix-atlas-service-web",
121
+ destPath: ""
122
+ }
123
+ ]
124
+ };
125
+ return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
126
+ }
127
+ var PACKAGE_NAME = "@wix/auto_sdk_atlas_places";
128
+ function getPlace(payload) {
129
+ function __getPlace({ host }) {
130
+ const metadata = {
131
+ entityFqdn: "wix.atlas.v2.place",
132
+ method: "GET",
133
+ methodFqn: "com.wixpress.vi.atlas.service.v2.PlacesServiceV2.GetPlace",
134
+ packageName: PACKAGE_NAME,
135
+ url: resolveComWixpressViAtlasServiceV2PlacesServiceV2Url({
136
+ protoPath: "/v2/place",
137
+ data: payload,
138
+ host
139
+ }),
140
+ params: (0, import_rest_modules.toURLSearchParams)(payload),
141
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
142
+ {
143
+ transformFn: import_float.transformRESTFloatToSDKFloat,
144
+ paths: [
145
+ { path: "place.address.geocode.latitude" },
146
+ { path: "place.address.geocode.longitude" }
147
+ ]
148
+ }
149
+ ])
150
+ };
151
+ return metadata;
152
+ }
153
+ return __getPlace;
154
+ }
155
+
156
+ // src/atlas-v2-place-places.meta.ts
157
+ function getPlace2() {
158
+ const payload = {};
159
+ const getRequestOptions = getPlace(payload);
160
+ const getUrl = (context) => {
161
+ const { url } = getRequestOptions(context);
162
+ return url;
163
+ };
164
+ return {
165
+ getUrl,
166
+ httpMethod: "GET",
167
+ path: "/v2/place",
168
+ pathParams: {},
169
+ __requestType: null,
170
+ __originalRequestType: null,
171
+ __responseType: null,
172
+ __originalResponseType: null
173
+ };
174
+ }
175
+ // Annotate the CommonJS export names for ESM import in node:
176
+ 0 && (module.exports = {
177
+ getPlace
178
+ });
18
179
  //# sourceMappingURL=meta.js.map