@wix/auto_sdk_atlas_autocomplete 1.0.1 → 1.0.3

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 (123) hide show
  1. package/build/cjs/index.d.ts +19 -1
  2. package/build/cjs/index.js +227 -15
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +116 -1
  5. package/build/cjs/index.typings.js +213 -15
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +70 -1
  8. package/build/cjs/meta.js +183 -15
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +19 -0
  11. package/build/es/index.mjs +205 -0
  12. package/build/es/index.mjs.map +1 -0
  13. package/build/{internal/cjs/src/atlas-v2-prediction-autocomplete.universal.d.ts → es/index.typings.d.mts} +18 -30
  14. package/build/es/index.typings.mjs +191 -0
  15. package/build/es/index.typings.mjs.map +1 -0
  16. package/build/es/{src/atlas-v2-prediction-autocomplete.types.d.ts → meta.d.mts} +23 -33
  17. package/build/es/meta.mjs +159 -0
  18. package/build/es/meta.mjs.map +1 -0
  19. package/build/internal/cjs/index.d.ts +19 -1
  20. package/build/internal/cjs/index.js +227 -15
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +116 -1
  23. package/build/internal/cjs/index.typings.js +213 -15
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +70 -1
  26. package/build/internal/cjs/meta.js +183 -15
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +19 -0
  29. package/build/internal/es/index.mjs +205 -0
  30. package/build/internal/es/index.mjs.map +1 -0
  31. package/build/internal/es/{src/atlas-v2-prediction-autocomplete.universal.d.ts → index.typings.d.mts} +18 -30
  32. package/build/internal/es/index.typings.mjs +191 -0
  33. package/build/internal/es/index.typings.mjs.map +1 -0
  34. package/build/internal/{cjs/src/atlas-v2-prediction-autocomplete.types.d.ts → es/meta.d.mts} +23 -33
  35. package/build/internal/es/meta.mjs +159 -0
  36. package/build/internal/es/meta.mjs.map +1 -0
  37. package/package.json +11 -10
  38. package/build/cjs/src/atlas-v2-prediction-autocomplete.context.d.ts +0 -5
  39. package/build/cjs/src/atlas-v2-prediction-autocomplete.context.js +0 -9
  40. package/build/cjs/src/atlas-v2-prediction-autocomplete.context.js.map +0 -1
  41. package/build/cjs/src/atlas-v2-prediction-autocomplete.http.d.ts +0 -3
  42. package/build/cjs/src/atlas-v2-prediction-autocomplete.http.js +0 -134
  43. package/build/cjs/src/atlas-v2-prediction-autocomplete.http.js.map +0 -1
  44. package/build/cjs/src/atlas-v2-prediction-autocomplete.meta.d.ts +0 -13
  45. package/build/cjs/src/atlas-v2-prediction-autocomplete.meta.js +0 -47
  46. package/build/cjs/src/atlas-v2-prediction-autocomplete.meta.js.map +0 -1
  47. package/build/cjs/src/atlas-v2-prediction-autocomplete.public.d.ts +0 -14
  48. package/build/cjs/src/atlas-v2-prediction-autocomplete.public.js +0 -14
  49. package/build/cjs/src/atlas-v2-prediction-autocomplete.public.js.map +0 -1
  50. package/build/cjs/src/atlas-v2-prediction-autocomplete.types.d.ts +0 -80
  51. package/build/cjs/src/atlas-v2-prediction-autocomplete.types.js +0 -11
  52. package/build/cjs/src/atlas-v2-prediction-autocomplete.types.js.map +0 -1
  53. package/build/cjs/src/atlas-v2-prediction-autocomplete.universal.d.ts +0 -128
  54. package/build/cjs/src/atlas-v2-prediction-autocomplete.universal.js +0 -100
  55. package/build/cjs/src/atlas-v2-prediction-autocomplete.universal.js.map +0 -1
  56. package/build/es/index.d.ts +0 -1
  57. package/build/es/index.js +0 -2
  58. package/build/es/index.js.map +0 -1
  59. package/build/es/index.typings.d.ts +0 -1
  60. package/build/es/index.typings.js +0 -2
  61. package/build/es/index.typings.js.map +0 -1
  62. package/build/es/meta.d.ts +0 -1
  63. package/build/es/meta.js +0 -2
  64. package/build/es/meta.js.map +0 -1
  65. package/build/es/src/atlas-v2-prediction-autocomplete.context.d.ts +0 -5
  66. package/build/es/src/atlas-v2-prediction-autocomplete.context.js +0 -5
  67. package/build/es/src/atlas-v2-prediction-autocomplete.context.js.map +0 -1
  68. package/build/es/src/atlas-v2-prediction-autocomplete.http.d.ts +0 -3
  69. package/build/es/src/atlas-v2-prediction-autocomplete.http.js +0 -130
  70. package/build/es/src/atlas-v2-prediction-autocomplete.http.js.map +0 -1
  71. package/build/es/src/atlas-v2-prediction-autocomplete.meta.d.ts +0 -13
  72. package/build/es/src/atlas-v2-prediction-autocomplete.meta.js +0 -20
  73. package/build/es/src/atlas-v2-prediction-autocomplete.meta.js.map +0 -1
  74. package/build/es/src/atlas-v2-prediction-autocomplete.public.d.ts +0 -14
  75. package/build/es/src/atlas-v2-prediction-autocomplete.public.js +0 -9
  76. package/build/es/src/atlas-v2-prediction-autocomplete.public.js.map +0 -1
  77. package/build/es/src/atlas-v2-prediction-autocomplete.types.js +0 -8
  78. package/build/es/src/atlas-v2-prediction-autocomplete.types.js.map +0 -1
  79. package/build/es/src/atlas-v2-prediction-autocomplete.universal.d.ts +0 -128
  80. package/build/es/src/atlas-v2-prediction-autocomplete.universal.js +0 -73
  81. package/build/es/src/atlas-v2-prediction-autocomplete.universal.js.map +0 -1
  82. package/build/internal/cjs/src/atlas-v2-prediction-autocomplete.context.d.ts +0 -5
  83. package/build/internal/cjs/src/atlas-v2-prediction-autocomplete.context.js +0 -9
  84. package/build/internal/cjs/src/atlas-v2-prediction-autocomplete.context.js.map +0 -1
  85. package/build/internal/cjs/src/atlas-v2-prediction-autocomplete.http.d.ts +0 -3
  86. package/build/internal/cjs/src/atlas-v2-prediction-autocomplete.http.js +0 -134
  87. package/build/internal/cjs/src/atlas-v2-prediction-autocomplete.http.js.map +0 -1
  88. package/build/internal/cjs/src/atlas-v2-prediction-autocomplete.meta.d.ts +0 -13
  89. package/build/internal/cjs/src/atlas-v2-prediction-autocomplete.meta.js +0 -47
  90. package/build/internal/cjs/src/atlas-v2-prediction-autocomplete.meta.js.map +0 -1
  91. package/build/internal/cjs/src/atlas-v2-prediction-autocomplete.public.d.ts +0 -14
  92. package/build/internal/cjs/src/atlas-v2-prediction-autocomplete.public.js +0 -14
  93. package/build/internal/cjs/src/atlas-v2-prediction-autocomplete.public.js.map +0 -1
  94. package/build/internal/cjs/src/atlas-v2-prediction-autocomplete.types.js +0 -11
  95. package/build/internal/cjs/src/atlas-v2-prediction-autocomplete.types.js.map +0 -1
  96. package/build/internal/cjs/src/atlas-v2-prediction-autocomplete.universal.js +0 -100
  97. package/build/internal/cjs/src/atlas-v2-prediction-autocomplete.universal.js.map +0 -1
  98. package/build/internal/es/index.d.ts +0 -1
  99. package/build/internal/es/index.js +0 -2
  100. package/build/internal/es/index.js.map +0 -1
  101. package/build/internal/es/index.typings.d.ts +0 -1
  102. package/build/internal/es/index.typings.js +0 -2
  103. package/build/internal/es/index.typings.js.map +0 -1
  104. package/build/internal/es/meta.d.ts +0 -1
  105. package/build/internal/es/meta.js +0 -2
  106. package/build/internal/es/meta.js.map +0 -1
  107. package/build/internal/es/src/atlas-v2-prediction-autocomplete.context.d.ts +0 -5
  108. package/build/internal/es/src/atlas-v2-prediction-autocomplete.context.js +0 -5
  109. package/build/internal/es/src/atlas-v2-prediction-autocomplete.context.js.map +0 -1
  110. package/build/internal/es/src/atlas-v2-prediction-autocomplete.http.d.ts +0 -3
  111. package/build/internal/es/src/atlas-v2-prediction-autocomplete.http.js +0 -130
  112. package/build/internal/es/src/atlas-v2-prediction-autocomplete.http.js.map +0 -1
  113. package/build/internal/es/src/atlas-v2-prediction-autocomplete.meta.d.ts +0 -13
  114. package/build/internal/es/src/atlas-v2-prediction-autocomplete.meta.js +0 -20
  115. package/build/internal/es/src/atlas-v2-prediction-autocomplete.meta.js.map +0 -1
  116. package/build/internal/es/src/atlas-v2-prediction-autocomplete.public.d.ts +0 -14
  117. package/build/internal/es/src/atlas-v2-prediction-autocomplete.public.js +0 -9
  118. package/build/internal/es/src/atlas-v2-prediction-autocomplete.public.js.map +0 -1
  119. package/build/internal/es/src/atlas-v2-prediction-autocomplete.types.d.ts +0 -80
  120. package/build/internal/es/src/atlas-v2-prediction-autocomplete.types.js +0 -8
  121. package/build/internal/es/src/atlas-v2-prediction-autocomplete.types.js.map +0 -1
  122. package/build/internal/es/src/atlas-v2-prediction-autocomplete.universal.js +0 -73
  123. package/build/internal/es/src/atlas-v2-prediction-autocomplete.universal.js.map +0 -1
@@ -0,0 +1,191 @@
1
+ // src/atlas-v2-prediction-autocomplete.universal.ts
2
+ import { transformError as sdkTransformError } from "@wix/sdk-runtime/transform-error";
3
+ import {
4
+ renameKeysFromSDKRequestToRESTRequest,
5
+ renameKeysFromRESTResponseToSDKResponse
6
+ } from "@wix/sdk-runtime/rename-all-nested-keys";
7
+
8
+ // src/atlas-v2-prediction-autocomplete.http.ts
9
+ import { transformSDKFloatToRESTFloat } from "@wix/sdk-runtime/transformations/float";
10
+ import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
11
+ import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
12
+ function resolveComWixpressViAtlasServiceV2AutocompleteServiceV2Url(opts) {
13
+ const domainToMappings = {
14
+ "api._api_base_domain_": [
15
+ {
16
+ srcPath: "/wix-atlas-service-web",
17
+ destPath: ""
18
+ }
19
+ ],
20
+ "bo._base_domain_": [
21
+ {
22
+ srcPath: "/wix-atlas-service-web",
23
+ destPath: ""
24
+ }
25
+ ],
26
+ "wixbo.ai": [
27
+ {
28
+ srcPath: "/wix-atlas-service-web",
29
+ destPath: ""
30
+ }
31
+ ],
32
+ "wix-bo.com": [
33
+ {
34
+ srcPath: "/wix-atlas-service-web",
35
+ destPath: ""
36
+ }
37
+ ],
38
+ _: [
39
+ {
40
+ srcPath: "/api/wix-atlas-service-web",
41
+ destPath: ""
42
+ },
43
+ {
44
+ srcPath: "/_api/wix-atlas-service-web",
45
+ destPath: ""
46
+ }
47
+ ],
48
+ "www._base_domain_": [
49
+ {
50
+ srcPath: "/wix-atlas-service-web",
51
+ destPath: ""
52
+ },
53
+ {
54
+ srcPath: "/_api/wix-atlas-service-web",
55
+ destPath: ""
56
+ },
57
+ {
58
+ srcPath: "/api/wix-atlas-service-web",
59
+ destPath: ""
60
+ }
61
+ ],
62
+ "manage._base_domain_": [
63
+ {
64
+ srcPath: "/wix-atlas-service-web",
65
+ destPath: ""
66
+ }
67
+ ],
68
+ "editor._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
+ "blocks._base_domain_": [
79
+ {
80
+ srcPath: "/wix-atlas-service-web",
81
+ destPath: ""
82
+ },
83
+ {
84
+ srcPath: "/api/wix-atlas-service-web",
85
+ destPath: ""
86
+ }
87
+ ],
88
+ "create.editorx": [
89
+ {
90
+ srcPath: "/wix-atlas-service-web",
91
+ destPath: ""
92
+ },
93
+ {
94
+ srcPath: "/api/wix-atlas-service-web",
95
+ destPath: ""
96
+ }
97
+ ],
98
+ "editor.wixapps.net": [
99
+ {
100
+ srcPath: "/api/wix-atlas-service-web",
101
+ destPath: ""
102
+ }
103
+ ],
104
+ "*.wixforms.com": [
105
+ {
106
+ srcPath: "/_api/wix-atlas-service-web",
107
+ destPath: ""
108
+ }
109
+ ]
110
+ };
111
+ return resolveUrl(Object.assign(opts, { domainToMappings }));
112
+ }
113
+ var PACKAGE_NAME = "@wix/auto_sdk_atlas_autocomplete";
114
+ function predict(payload) {
115
+ function __predict({ host }) {
116
+ const serializedData = transformPaths(payload, [
117
+ {
118
+ transformFn: transformSDKFloatToRESTFloat,
119
+ paths: [
120
+ { path: "origin.latitude" },
121
+ { path: "origin.longitude" },
122
+ { path: "location.latitude" },
123
+ { path: "location.longitude" }
124
+ ]
125
+ }
126
+ ]);
127
+ const metadata = {
128
+ entityFqdn: "wix.atlas.v2.prediction",
129
+ method: "POST",
130
+ methodFqn: "com.wixpress.vi.atlas.service.v2.AutocompleteServiceV2.Predict",
131
+ packageName: PACKAGE_NAME,
132
+ url: resolveComWixpressViAtlasServiceV2AutocompleteServiceV2Url({
133
+ protoPath: "/v2/predict",
134
+ data: serializedData,
135
+ host
136
+ }),
137
+ data: serializedData
138
+ };
139
+ return metadata;
140
+ }
141
+ return __predict;
142
+ }
143
+
144
+ // src/atlas-v2-prediction-autocomplete.universal.ts
145
+ var FilterType = /* @__PURE__ */ ((FilterType2) => {
146
+ FilterType2["zip_code"] = "zip_code";
147
+ FilterType2["country_code"] = "country_code";
148
+ return FilterType2;
149
+ })(FilterType || {});
150
+ async function predict2(input, options) {
151
+ const { httpClient, sideEffects } = arguments[2];
152
+ const payload = renameKeysFromSDKRequestToRESTRequest({
153
+ input,
154
+ origin: options?.origin,
155
+ location: options?.location,
156
+ radius: options?.radius,
157
+ countryCodes: options?.countryCodes,
158
+ sessionToken: options?.sessionToken
159
+ });
160
+ const reqOpts = predict(payload);
161
+ sideEffects?.onSiteCall?.();
162
+ try {
163
+ const result = await httpClient.request(reqOpts);
164
+ sideEffects?.onSuccess?.(result);
165
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
166
+ } catch (err) {
167
+ const transformedError = sdkTransformError(
168
+ err,
169
+ {
170
+ spreadPathsToArguments: {},
171
+ explicitPathsToArguments: {
172
+ input: "$[0]",
173
+ origin: "$[1].origin",
174
+ location: "$[1].location",
175
+ radius: "$[1].radius",
176
+ countryCodes: "$[1].countryCodes",
177
+ sessionToken: "$[1].sessionToken"
178
+ },
179
+ singleArgumentUnchanged: false
180
+ },
181
+ ["input", "options"]
182
+ );
183
+ sideEffects?.onError?.(err);
184
+ throw transformedError;
185
+ }
186
+ }
187
+ export {
188
+ FilterType,
189
+ predict2 as predict
190
+ };
191
+ //# sourceMappingURL=index.typings.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/atlas-v2-prediction-autocomplete.universal.ts","../../../src/atlas-v2-prediction-autocomplete.http.ts"],"sourcesContent":["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 ambassadorWixAtlasV2Prediction from './atlas-v2-prediction-autocomplete.http.js';\n\nexport interface Prediction {\n /** The human-readable name of the prediction */\n description?: string;\n /** The id of the prediction that can be use in place api. Available for short time. */\n searchId?: string;\n /** 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 */\n matchedSubstrings?: MatchedSubstrings[];\n /** Provides pre-formatted text that can be shown in your autocomplete results */\n textStructure?: TextStructure;\n /** Contains an integer indicating the straight-line distance between the predicted place, and the specified origin point, in meters. */\n distanceInMeters?: number | null;\n}\n\nexport interface MatchedSubstrings {\n length?: number;\n offset?: number;\n}\n\nexport interface TextStructure {\n /** Contains the main text of a prediction, usually the name of the place */\n mainText?: string;\n /** Contains the secondary text of a prediction, usually the location of the place */\n secondaryText?: string;\n /** 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 */\n mainTextMatchedSubstrings?: MatchedSubstrings[];\n}\n\nexport interface ListPredictionsRequest {\n /** The text the predictions will be based on. */\n input?: string;\n /** The origin point from which to calculate straight-line distance to the destination */\n origin?: AddressLocation;\n /** The point around which you wish to retrieve place information */\n location?: AddressLocation;\n /** The acceptable distance from that location (in meters) */\n radius?: string | null;\n /** Filters the user can add in order to get more accurate results */\n filterBy?: FilterBy[];\n}\n\nexport interface AddressLocation {\n /** Address latitude. */\n latitude?: number | null;\n /** Address longitude. */\n longitude?: number | null;\n}\n\nexport interface FilterBy {\n /** One of the filter types enum */\n filterType?: FilterTypeWithLiterals;\n /** Free text like \"us\" */\n filterValue?: string;\n}\n\nexport enum FilterType {\n /** Filter by zip code */\n zip_code = 'zip_code',\n /** Filter by 2-letters or 3-letters country code */\n country_code = 'country_code',\n}\n\n/** @enumType */\nexport type FilterTypeWithLiterals = FilterType | 'zip_code' | 'country_code';\n\nexport interface ListPredictionsResponse {\n predictions?: Prediction[];\n}\n\nexport interface PredictRequest {\n /**\n * The text the predictions will be based on.\n * @minLength 1\n */\n input: string;\n /** The origin point from which to calculate straight-line distance to the destination */\n origin?: AddressLocation;\n /** The point around which you wish to retrieve place information */\n location?: AddressLocation;\n /** The acceptable distance from that location (in meters) */\n radius?: string | null;\n /** alpha-2 or alpha-3 ISO-3166 country codes to filter by */\n countryCodes?: 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 PredictResponse {\n predictions?: Prediction[];\n}\n\ntype PredictionNonNullablePaths =\n | `description`\n | `searchId`\n | `matchedSubstrings`\n | `matchedSubstrings.${number}.length`\n | `matchedSubstrings.${number}.offset`\n | `textStructure.mainText`\n | `textStructure.secondaryText`\n | `textStructure.mainTextMatchedSubstrings`\n | `textStructure.mainTextMatchedSubstrings.${number}.length`\n | `textStructure.mainTextMatchedSubstrings.${number}.offset`;\n\n/**\n * A Predict end-point take an input and returns an list of Prediction object.\n * @param input - The text the predictions will be based on.\n * @public\n * @documentationMaturity preview\n * @requiredField input\n * @permissionId WIX_ATLAS.LIST_PREDICTIONS\n * @applicableIdentity APP\n * @applicableIdentity VISITOR\n * @fqn com.wixpress.vi.atlas.service.v2.AutocompleteServiceV2.Predict\n */\nexport async function predict(\n input: string,\n options?: PredictOptions\n): Promise<\n NonNullablePaths<\n PredictResponse,\n {\n [P in PredictionNonNullablePaths]: `predictions.${number}.${P}`;\n }[PredictionNonNullablePaths]\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 input: input,\n origin: options?.origin,\n location: options?.location,\n radius: options?.radius,\n countryCodes: options?.countryCodes,\n sessionToken: options?.sessionToken,\n });\n\n const reqOpts = ambassadorWixAtlasV2Prediction.predict(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n input: '$[0]',\n origin: '$[1].origin',\n location: '$[1].location',\n radius: '$[1].radius',\n countryCodes: '$[1].countryCodes',\n sessionToken: '$[1].sessionToken',\n },\n singleArgumentUnchanged: false,\n },\n ['input', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface PredictOptions {\n /** The origin point from which to calculate straight-line distance to the destination */\n origin?: AddressLocation;\n /** The point around which you wish to retrieve place information */\n location?: AddressLocation;\n /** The acceptable distance from that location (in meters) */\n radius?: string | null;\n /** alpha-2 or alpha-3 ISO-3166 country codes to filter by */\n countryCodes?: 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","import { transformSDKFloatToRESTFloat } 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 resolveComWixpressViAtlasServiceV2AutocompleteServiceV2Url(\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 '*.wixforms.com': [\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_autocomplete';\n\n/** A Predict end-point take an input and returns an list of Prediction object. */\nexport function predict(payload: object): RequestOptionsFactory<any> {\n function __predict({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'origin.latitude' },\n { path: 'origin.longitude' },\n { path: 'location.latitude' },\n { path: 'location.longitude' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.atlas.v2.prediction',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.vi.atlas.service.v2.AutocompleteServiceV2.Predict',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressViAtlasServiceV2AutocompleteServiceV2Url({\n protoPath: '/v2/predict',\n data: serializedData,\n host,\n }),\n data: serializedData,\n };\n\n return metadata;\n }\n\n return __predict;\n}\n"],"mappings":"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","names":["FilterType","predict"]}
@@ -1,4 +1,7 @@
1
- export interface Prediction {
1
+ import { PredictRequest as PredictRequest$1, PredictResponse as PredictResponse$1 } from './index.typings.mjs';
2
+ import '@wix/sdk-types';
3
+
4
+ interface Prediction {
2
5
  /** The human-readable name of the prediction */
3
6
  description?: string;
4
7
  /** The id of the prediction that can be use in place api. Available for short time. */
@@ -10,11 +13,11 @@ export interface Prediction {
10
13
  /** Contains an integer indicating the straight-line distance between the predicted place, and the specified origin point, in meters. */
11
14
  distanceInMeters?: number | null;
12
15
  }
13
- export interface MatchedSubstrings {
16
+ interface MatchedSubstrings {
14
17
  length?: number;
15
18
  offset?: number;
16
19
  }
17
- export interface TextStructure {
20
+ interface TextStructure {
18
21
  /** Contains the main text of a prediction, usually the name of the place */
19
22
  mainText?: string;
20
23
  /** Contains the secondary text of a prediction, usually the location of the place */
@@ -22,40 +25,13 @@ export interface TextStructure {
22
25
  /** 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 */
23
26
  mainTextMatchedSubstrings?: MatchedSubstrings[];
24
27
  }
25
- export interface ListPredictionsRequest {
26
- /** The text the predictions will be based on. */
27
- input?: string;
28
- /** The origin point from which to calculate straight-line distance to the destination */
29
- origin?: AddressLocation;
30
- /** The point around which you wish to retrieve place information */
31
- location?: AddressLocation;
32
- /** The acceptable distance from that location (in meters) */
33
- radius?: string | null;
34
- /** Filters the user can add in order to get more accurate results */
35
- filterBy?: FilterBy[];
36
- }
37
- export interface AddressLocation {
28
+ interface AddressLocation {
38
29
  /** Address latitude. */
39
30
  latitude?: number | null;
40
31
  /** Address longitude. */
41
32
  longitude?: number | null;
42
33
  }
43
- export interface FilterBy {
44
- /** One of the filter types enum */
45
- filterType?: FilterType;
46
- /** Free text like "us" */
47
- filterValue?: string;
48
- }
49
- export declare enum FilterType {
50
- /** Filter by zip code */
51
- zip_code = "zip_code",
52
- /** Filter by 2-letters or 3-letters country code */
53
- country_code = "country_code"
54
- }
55
- export interface ListPredictionsResponse {
56
- predictions?: Prediction[];
57
- }
58
- export interface PredictRequest {
34
+ interface PredictRequest {
59
35
  /**
60
36
  * The text the predictions will be based on.
61
37
  * @minLength 1
@@ -75,6 +51,20 @@ export interface PredictRequest {
75
51
  */
76
52
  sessionToken?: string | null;
77
53
  }
78
- export interface PredictResponse {
54
+ interface PredictResponse {
79
55
  predictions?: Prediction[];
80
56
  }
57
+
58
+ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
59
+ getUrl: (context: any) => string;
60
+ httpMethod: K;
61
+ path: string;
62
+ pathParams: M;
63
+ __requestType: T;
64
+ __originalRequestType: S;
65
+ __responseType: Q;
66
+ __originalResponseType: R;
67
+ };
68
+ declare function predict(): __PublicMethodMetaInfo<'POST', {}, PredictRequest$1, PredictRequest, PredictResponse$1, PredictResponse>;
69
+
70
+ export { type __PublicMethodMetaInfo, predict };
@@ -0,0 +1,159 @@
1
+ // src/atlas-v2-prediction-autocomplete.http.ts
2
+ import { transformSDKFloatToRESTFloat } from "@wix/sdk-runtime/transformations/float";
3
+ import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
4
+ import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
5
+ function resolveComWixpressViAtlasServiceV2AutocompleteServiceV2Url(opts) {
6
+ const domainToMappings = {
7
+ "api._api_base_domain_": [
8
+ {
9
+ srcPath: "/wix-atlas-service-web",
10
+ destPath: ""
11
+ }
12
+ ],
13
+ "bo._base_domain_": [
14
+ {
15
+ srcPath: "/wix-atlas-service-web",
16
+ destPath: ""
17
+ }
18
+ ],
19
+ "wixbo.ai": [
20
+ {
21
+ srcPath: "/wix-atlas-service-web",
22
+ destPath: ""
23
+ }
24
+ ],
25
+ "wix-bo.com": [
26
+ {
27
+ srcPath: "/wix-atlas-service-web",
28
+ destPath: ""
29
+ }
30
+ ],
31
+ _: [
32
+ {
33
+ srcPath: "/api/wix-atlas-service-web",
34
+ destPath: ""
35
+ },
36
+ {
37
+ srcPath: "/_api/wix-atlas-service-web",
38
+ destPath: ""
39
+ }
40
+ ],
41
+ "www._base_domain_": [
42
+ {
43
+ srcPath: "/wix-atlas-service-web",
44
+ destPath: ""
45
+ },
46
+ {
47
+ srcPath: "/_api/wix-atlas-service-web",
48
+ destPath: ""
49
+ },
50
+ {
51
+ srcPath: "/api/wix-atlas-service-web",
52
+ destPath: ""
53
+ }
54
+ ],
55
+ "manage._base_domain_": [
56
+ {
57
+ srcPath: "/wix-atlas-service-web",
58
+ destPath: ""
59
+ }
60
+ ],
61
+ "editor._base_domain_": [
62
+ {
63
+ srcPath: "/wix-atlas-service-web",
64
+ destPath: ""
65
+ },
66
+ {
67
+ srcPath: "/api/wix-atlas-service-web",
68
+ destPath: ""
69
+ }
70
+ ],
71
+ "blocks._base_domain_": [
72
+ {
73
+ srcPath: "/wix-atlas-service-web",
74
+ destPath: ""
75
+ },
76
+ {
77
+ srcPath: "/api/wix-atlas-service-web",
78
+ destPath: ""
79
+ }
80
+ ],
81
+ "create.editorx": [
82
+ {
83
+ srcPath: "/wix-atlas-service-web",
84
+ destPath: ""
85
+ },
86
+ {
87
+ srcPath: "/api/wix-atlas-service-web",
88
+ destPath: ""
89
+ }
90
+ ],
91
+ "editor.wixapps.net": [
92
+ {
93
+ srcPath: "/api/wix-atlas-service-web",
94
+ destPath: ""
95
+ }
96
+ ],
97
+ "*.wixforms.com": [
98
+ {
99
+ srcPath: "/_api/wix-atlas-service-web",
100
+ destPath: ""
101
+ }
102
+ ]
103
+ };
104
+ return resolveUrl(Object.assign(opts, { domainToMappings }));
105
+ }
106
+ var PACKAGE_NAME = "@wix/auto_sdk_atlas_autocomplete";
107
+ function predict(payload) {
108
+ function __predict({ host }) {
109
+ const serializedData = transformPaths(payload, [
110
+ {
111
+ transformFn: transformSDKFloatToRESTFloat,
112
+ paths: [
113
+ { path: "origin.latitude" },
114
+ { path: "origin.longitude" },
115
+ { path: "location.latitude" },
116
+ { path: "location.longitude" }
117
+ ]
118
+ }
119
+ ]);
120
+ const metadata = {
121
+ entityFqdn: "wix.atlas.v2.prediction",
122
+ method: "POST",
123
+ methodFqn: "com.wixpress.vi.atlas.service.v2.AutocompleteServiceV2.Predict",
124
+ packageName: PACKAGE_NAME,
125
+ url: resolveComWixpressViAtlasServiceV2AutocompleteServiceV2Url({
126
+ protoPath: "/v2/predict",
127
+ data: serializedData,
128
+ host
129
+ }),
130
+ data: serializedData
131
+ };
132
+ return metadata;
133
+ }
134
+ return __predict;
135
+ }
136
+
137
+ // src/atlas-v2-prediction-autocomplete.meta.ts
138
+ function predict2() {
139
+ const payload = {};
140
+ const getRequestOptions = predict(payload);
141
+ const getUrl = (context) => {
142
+ const { url } = getRequestOptions(context);
143
+ return url;
144
+ };
145
+ return {
146
+ getUrl,
147
+ httpMethod: "POST",
148
+ path: "/v2/predict",
149
+ pathParams: {},
150
+ __requestType: null,
151
+ __originalRequestType: null,
152
+ __responseType: null,
153
+ __originalResponseType: null
154
+ };
155
+ }
156
+ export {
157
+ predict2 as predict
158
+ };
159
+ //# sourceMappingURL=meta.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/atlas-v2-prediction-autocomplete.http.ts","../../../src/atlas-v2-prediction-autocomplete.meta.ts"],"sourcesContent":["import { transformSDKFloatToRESTFloat } 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 resolveComWixpressViAtlasServiceV2AutocompleteServiceV2Url(\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 '*.wixforms.com': [\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_autocomplete';\n\n/** A Predict end-point take an input and returns an list of Prediction object. */\nexport function predict(payload: object): RequestOptionsFactory<any> {\n function __predict({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'origin.latitude' },\n { path: 'origin.longitude' },\n { path: 'location.latitude' },\n { path: 'location.longitude' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.atlas.v2.prediction',\n method: 'POST' as any,\n methodFqn:\n 'com.wixpress.vi.atlas.service.v2.AutocompleteServiceV2.Predict',\n packageName: PACKAGE_NAME,\n url: resolveComWixpressViAtlasServiceV2AutocompleteServiceV2Url({\n protoPath: '/v2/predict',\n data: serializedData,\n host,\n }),\n data: serializedData,\n };\n\n return metadata;\n }\n\n return __predict;\n}\n","import * as ambassadorWixAtlasV2Prediction from './atlas-v2-prediction-autocomplete.http.js';\nimport * as ambassadorWixAtlasV2PredictionTypes from './atlas-v2-prediction-autocomplete.types.js';\nimport * as ambassadorWixAtlasV2PredictionUniversalTypes from './atlas-v2-prediction-autocomplete.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function predict(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixAtlasV2PredictionUniversalTypes.PredictRequest,\n ambassadorWixAtlasV2PredictionTypes.PredictRequest,\n ambassadorWixAtlasV2PredictionUniversalTypes.PredictResponse,\n ambassadorWixAtlasV2PredictionTypes.PredictResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions = ambassadorWixAtlasV2Prediction.predict(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v2/predict',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n"],"mappings":"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","names":["predict"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/auto_sdk_atlas_autocomplete",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -8,18 +8,18 @@
8
8
  "keywords": [],
9
9
  "sideEffects": false,
10
10
  "main": "./build/cjs/index.js",
11
- "types": "./build/es/index.d.ts",
11
+ "types": "./build/cjs/index.d.ts",
12
12
  "exports": {
13
13
  ".": {
14
- "import": "./build/es/index.js",
14
+ "import": "./build/es/index.mjs",
15
15
  "require": "./build/cjs/index.js",
16
- "types": "./build/es/index.d.ts"
16
+ "types": "./build/es/index.d.mts"
17
17
  },
18
18
  "./package.json": "./package.json",
19
19
  "./meta": {
20
- "import": "./build/es/meta.js",
20
+ "import": "./build/es/meta.mjs",
21
21
  "require": "./build/cjs/meta.js",
22
- "types": "./build/es/meta.d.ts"
22
+ "types": "./build/es/meta.d.mts"
23
23
  }
24
24
  },
25
25
  "files": [
@@ -28,14 +28,15 @@
28
28
  "service-plugins"
29
29
  ],
30
30
  "dependencies": {
31
- "@wix/sdk-runtime": "^0.3.49",
32
- "@wix/sdk-types": "^1.13.23"
31
+ "@wix/sdk-runtime": "^0.3.55",
32
+ "@wix/sdk-types": "^1.13.28"
33
33
  },
34
34
  "devDependencies": {
35
+ "tsup": "^8.4.0",
35
36
  "typescript": "^5.3.2"
36
37
  },
37
38
  "scripts": {
38
- "build": "tsc -b tsconfig.json tsconfig.esm.json tsconfig.internal.json tsconfig.internal.esm.json",
39
+ "build": "tsup",
39
40
  "test": ":"
40
41
  },
41
42
  "wix": {
@@ -48,5 +49,5 @@
48
49
  "fqdn": "wix.atlas.v2.prediction"
49
50
  }
50
51
  },
51
- "falconPackageHash": "351a845b8db0f704fea8de566cbc55159ec69448036aeb48736966df"
52
+ "falconPackageHash": "7550a587f8f91c35aeef1fbf5ae24fcc660b48d2036cc610f75d414e"
52
53
  }
@@ -1,5 +0,0 @@
1
- import { predict as publicPredict } from './atlas-v2-prediction-autocomplete.public.js';
2
- import { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';
3
- export declare const predict: MaybeContext<BuildRESTFunction<typeof publicPredict> & typeof publicPredict>;
4
- export { FilterType } from './atlas-v2-prediction-autocomplete.universal.js';
5
- export { Prediction, MatchedSubstrings, TextStructure, ListPredictionsRequest, AddressLocation, FilterBy, ListPredictionsResponse, PredictRequest, PredictResponse, PredictOptions, } from './atlas-v2-prediction-autocomplete.universal.js';
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FilterType = exports.predict = void 0;
4
- const atlas_v2_prediction_autocomplete_public_js_1 = require("./atlas-v2-prediction-autocomplete.public.js");
5
- const rest_modules_1 = require("@wix/sdk-runtime/rest-modules");
6
- exports.predict = (0, rest_modules_1.createRESTModule)(atlas_v2_prediction_autocomplete_public_js_1.predict);
7
- var atlas_v2_prediction_autocomplete_universal_js_1 = require("./atlas-v2-prediction-autocomplete.universal.js");
8
- Object.defineProperty(exports, "FilterType", { enumerable: true, get: function () { return atlas_v2_prediction_autocomplete_universal_js_1.FilterType; } });
9
- //# sourceMappingURL=atlas-v2-prediction-autocomplete.context.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"atlas-v2-prediction-autocomplete.context.js","sourceRoot":"","sources":["../../../src/atlas-v2-prediction-autocomplete.context.ts"],"names":[],"mappings":";;;AAAA,6GAAwF;AACxF,gEAAiE;AAGpD,QAAA,OAAO,GAEF,IAAA,+BAAgB,EAAC,oDAAa,CAAC,CAAC;AAElD,iHAA6E;AAApE,2IAAA,UAAU,OAAA"}
@@ -1,3 +0,0 @@
1
- import { RequestOptionsFactory } from '@wix/sdk-types';
2
- /** A Predict end-point take an input and returns an list of Prediction object. */
3
- export declare function predict(payload: object): RequestOptionsFactory<any>;