@wix/auto_sdk_atlas_location 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 +18 -1
  2. package/build/cjs/index.js +262 -15
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +148 -1
  5. package/build/cjs/index.typings.js +249 -15
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +99 -1
  8. package/build/cjs/meta.js +193 -15
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +18 -0
  11. package/build/es/index.mjs +238 -0
  12. package/build/es/index.mjs.map +1 -0
  13. package/build/{internal/cjs/src/atlas-v2-search-result-location.universal.d.ts → es/index.typings.d.mts} +27 -35
  14. package/build/es/index.typings.mjs +225 -0
  15. package/build/es/index.typings.mjs.map +1 -0
  16. package/build/{internal/cjs/src/atlas-v2-search-result-location.types.d.ts → es/meta.d.mts} +32 -45
  17. package/build/es/meta.mjs +169 -0
  18. package/build/es/meta.mjs.map +1 -0
  19. package/build/internal/cjs/index.d.ts +18 -1
  20. package/build/internal/cjs/index.js +262 -15
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +148 -1
  23. package/build/internal/cjs/index.typings.js +249 -15
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +99 -1
  26. package/build/internal/cjs/meta.js +193 -15
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +18 -0
  29. package/build/internal/es/index.mjs +238 -0
  30. package/build/internal/es/index.mjs.map +1 -0
  31. package/build/internal/es/{src/atlas-v2-search-result-location.universal.d.ts → index.typings.d.mts} +27 -35
  32. package/build/internal/es/index.typings.mjs +225 -0
  33. package/build/internal/es/index.typings.mjs.map +1 -0
  34. package/build/{es/src/atlas-v2-search-result-location.types.d.ts → internal/es/meta.d.mts} +32 -45
  35. package/build/internal/es/meta.mjs +169 -0
  36. package/build/internal/es/meta.mjs.map +1 -0
  37. package/package.json +11 -10
  38. package/build/cjs/src/atlas-v2-search-result-location.context.d.ts +0 -5
  39. package/build/cjs/src/atlas-v2-search-result-location.context.js +0 -11
  40. package/build/cjs/src/atlas-v2-search-result-location.context.js.map +0 -1
  41. package/build/cjs/src/atlas-v2-search-result-location.http.d.ts +0 -3
  42. package/build/cjs/src/atlas-v2-search-result-location.http.js +0 -144
  43. package/build/cjs/src/atlas-v2-search-result-location.http.js.map +0 -1
  44. package/build/cjs/src/atlas-v2-search-result-location.meta.d.ts +0 -13
  45. package/build/cjs/src/atlas-v2-search-result-location.meta.js +0 -47
  46. package/build/cjs/src/atlas-v2-search-result-location.meta.js.map +0 -1
  47. package/build/cjs/src/atlas-v2-search-result-location.public.d.ts +0 -13
  48. package/build/cjs/src/atlas-v2-search-result-location.public.js +0 -16
  49. package/build/cjs/src/atlas-v2-search-result-location.public.js.map +0 -1
  50. package/build/cjs/src/atlas-v2-search-result-location.types.d.ts +0 -112
  51. package/build/cjs/src/atlas-v2-search-result-location.types.js +0 -37
  52. package/build/cjs/src/atlas-v2-search-result-location.types.js.map +0 -1
  53. package/build/cjs/src/atlas-v2-search-result-location.universal.d.ts +0 -156
  54. package/build/cjs/src/atlas-v2-search-result-location.universal.js +0 -127
  55. package/build/cjs/src/atlas-v2-search-result-location.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-search-result-location.context.d.ts +0 -5
  66. package/build/es/src/atlas-v2-search-result-location.context.js +0 -5
  67. package/build/es/src/atlas-v2-search-result-location.context.js.map +0 -1
  68. package/build/es/src/atlas-v2-search-result-location.http.d.ts +0 -3
  69. package/build/es/src/atlas-v2-search-result-location.http.js +0 -140
  70. package/build/es/src/atlas-v2-search-result-location.http.js.map +0 -1
  71. package/build/es/src/atlas-v2-search-result-location.meta.d.ts +0 -13
  72. package/build/es/src/atlas-v2-search-result-location.meta.js +0 -20
  73. package/build/es/src/atlas-v2-search-result-location.meta.js.map +0 -1
  74. package/build/es/src/atlas-v2-search-result-location.public.d.ts +0 -13
  75. package/build/es/src/atlas-v2-search-result-location.public.js +0 -9
  76. package/build/es/src/atlas-v2-search-result-location.public.js.map +0 -1
  77. package/build/es/src/atlas-v2-search-result-location.types.js +0 -34
  78. package/build/es/src/atlas-v2-search-result-location.types.js.map +0 -1
  79. package/build/es/src/atlas-v2-search-result-location.universal.d.ts +0 -156
  80. package/build/es/src/atlas-v2-search-result-location.universal.js +0 -100
  81. package/build/es/src/atlas-v2-search-result-location.universal.js.map +0 -1
  82. package/build/internal/cjs/src/atlas-v2-search-result-location.context.d.ts +0 -5
  83. package/build/internal/cjs/src/atlas-v2-search-result-location.context.js +0 -11
  84. package/build/internal/cjs/src/atlas-v2-search-result-location.context.js.map +0 -1
  85. package/build/internal/cjs/src/atlas-v2-search-result-location.http.d.ts +0 -3
  86. package/build/internal/cjs/src/atlas-v2-search-result-location.http.js +0 -144
  87. package/build/internal/cjs/src/atlas-v2-search-result-location.http.js.map +0 -1
  88. package/build/internal/cjs/src/atlas-v2-search-result-location.meta.d.ts +0 -13
  89. package/build/internal/cjs/src/atlas-v2-search-result-location.meta.js +0 -47
  90. package/build/internal/cjs/src/atlas-v2-search-result-location.meta.js.map +0 -1
  91. package/build/internal/cjs/src/atlas-v2-search-result-location.public.d.ts +0 -13
  92. package/build/internal/cjs/src/atlas-v2-search-result-location.public.js +0 -16
  93. package/build/internal/cjs/src/atlas-v2-search-result-location.public.js.map +0 -1
  94. package/build/internal/cjs/src/atlas-v2-search-result-location.types.js +0 -37
  95. package/build/internal/cjs/src/atlas-v2-search-result-location.types.js.map +0 -1
  96. package/build/internal/cjs/src/atlas-v2-search-result-location.universal.js +0 -127
  97. package/build/internal/cjs/src/atlas-v2-search-result-location.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-search-result-location.context.d.ts +0 -5
  108. package/build/internal/es/src/atlas-v2-search-result-location.context.js +0 -5
  109. package/build/internal/es/src/atlas-v2-search-result-location.context.js.map +0 -1
  110. package/build/internal/es/src/atlas-v2-search-result-location.http.d.ts +0 -3
  111. package/build/internal/es/src/atlas-v2-search-result-location.http.js +0 -140
  112. package/build/internal/es/src/atlas-v2-search-result-location.http.js.map +0 -1
  113. package/build/internal/es/src/atlas-v2-search-result-location.meta.d.ts +0 -13
  114. package/build/internal/es/src/atlas-v2-search-result-location.meta.js +0 -20
  115. package/build/internal/es/src/atlas-v2-search-result-location.meta.js.map +0 -1
  116. package/build/internal/es/src/atlas-v2-search-result-location.public.d.ts +0 -13
  117. package/build/internal/es/src/atlas-v2-search-result-location.public.js +0 -9
  118. package/build/internal/es/src/atlas-v2-search-result-location.public.js.map +0 -1
  119. package/build/internal/es/src/atlas-v2-search-result-location.types.d.ts +0 -112
  120. package/build/internal/es/src/atlas-v2-search-result-location.types.js +0 -34
  121. package/build/internal/es/src/atlas-v2-search-result-location.types.js.map +0 -1
  122. package/build/internal/es/src/atlas-v2-search-result-location.universal.js +0 -100
  123. package/build/internal/es/src/atlas-v2-search-result-location.universal.js.map +0 -1
@@ -1,100 +0,0 @@
1
- import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';
2
- import { renameKeysFromSDKRequestToRESTRequest, renameKeysFromRESTResponseToSDKResponse, } from '@wix/sdk-runtime/rename-all-nested-keys';
3
- import * as ambassadorWixAtlasV2SearchResult from './atlas-v2-search-result-location.http.js';
4
- import { transformRESTAddressToSDKAddress } from '@wix/sdk-runtime/transformations/address';
5
- import { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';
6
- export var SubdivisionType;
7
- (function (SubdivisionType) {
8
- SubdivisionType["UNKNOWN_SUBDIVISION_TYPE"] = "UNKNOWN_SUBDIVISION_TYPE";
9
- /** State */
10
- SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_1"] = "ADMINISTRATIVE_AREA_LEVEL_1";
11
- /** County */
12
- SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_2"] = "ADMINISTRATIVE_AREA_LEVEL_2";
13
- /** City/town */
14
- SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_3"] = "ADMINISTRATIVE_AREA_LEVEL_3";
15
- /** Neighborhood/quarter */
16
- SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_4"] = "ADMINISTRATIVE_AREA_LEVEL_4";
17
- /** Street/block */
18
- SubdivisionType["ADMINISTRATIVE_AREA_LEVEL_5"] = "ADMINISTRATIVE_AREA_LEVEL_5";
19
- /** ADMINISTRATIVE_AREA_LEVEL_0. Indicates the national political entity, and is typically the highest order type returned by the Geocoder. */
20
- SubdivisionType["COUNTRY"] = "COUNTRY";
21
- })(SubdivisionType || (SubdivisionType = {}));
22
- export var Proximity;
23
- (function (Proximity) {
24
- Proximity["UNKNOWN_PROXIMITY"] = "UNKNOWN_PROXIMITY";
25
- /** indicates that the returned result is a precise geocode for which we have location information accurate down to street address precision */
26
- Proximity["PINPOINT"] = "PINPOINT";
27
- /** indicates that the returned result is the geometric center of a result */
28
- Proximity["APPROXIMATE"] = "APPROXIMATE";
29
- /** indicates that the returned result is around an area */
30
- Proximity["GENERAL_AREA"] = "GENERAL_AREA";
31
- })(Proximity || (Proximity = {}));
32
- export var FilterType;
33
- (function (FilterType) {
34
- /** Filter by zip code */
35
- FilterType["zip_code"] = "zip_code";
36
- /** Filter by 2-letters or 3-letters country code */
37
- FilterType["country_code"] = "country_code";
38
- })(FilterType || (FilterType = {}));
39
- /**
40
- * A Search request takes a free text as an input and returns a list of 'Address' objects.
41
- * @public
42
- * @documentationMaturity preview
43
- * @permissionId WIX_ATLAS.SEARCH
44
- * @permissionScope Manage Stores
45
- * @permissionScopeId SCOPE.STORES.MANAGE-STORES
46
- * @permissionScope Manage Bookings Services and Settings
47
- * @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
48
- * @permissionScope Manage Events
49
- * @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
50
- * @permissionScope Manage Challenges
51
- * @permissionScopeId SCOPE.CHALLENGES.MANAGE
52
- * @permissionScope Manage Portfolio
53
- * @permissionScopeId SCOPE.PORTFOLIO.MANAGE-PORTFOLIO
54
- * @permissionScope Access Verticals by Automations
55
- * @permissionScopeId SCOPE.CRM.ACCESS-VERTICALS-BY-AUTOMATIONS
56
- * @permissionScope Manage Restaurants - all permissions
57
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
58
- * @permissionScope Set Up Automations
59
- * @permissionScopeId SCOPE.CRM.SETUP-AUTOMATIONS
60
- * @applicableIdentity APP
61
- * @applicableIdentity VISITOR
62
- * @fqn com.wixpress.vi.atlas.service.v2.LocationServiceV2.Search
63
- */
64
- export async function search(options) {
65
- // @ts-ignore
66
- const { httpClient, sideEffects } = arguments[1];
67
- const payload = renameKeysFromSDKRequestToRESTRequest({
68
- query: options?.query,
69
- filterBy: options?.filterBy,
70
- zipCode: options?.zipCode,
71
- countryCodes: options?.countryCodes,
72
- });
73
- const reqOpts = ambassadorWixAtlasV2SearchResult.search(payload);
74
- sideEffects?.onSiteCall?.();
75
- try {
76
- const result = await httpClient.request(reqOpts);
77
- sideEffects?.onSuccess?.(result);
78
- return renameKeysFromRESTResponseToSDKResponse(transformPaths(result.data, [
79
- {
80
- transformFn: transformRESTAddressToSDKAddress,
81
- paths: [{ path: 'searchResults.address' }],
82
- },
83
- ]));
84
- }
85
- catch (err) {
86
- const transformedError = sdkTransformError(err, {
87
- spreadPathsToArguments: {},
88
- explicitPathsToArguments: {
89
- query: '$[0].query',
90
- filterBy: '$[0].filterBy',
91
- zipCode: '$[0].zipCode',
92
- countryCodes: '$[0].countryCodes',
93
- },
94
- singleArgumentUnchanged: false,
95
- }, ['options']);
96
- sideEffects?.onError?.(err);
97
- throw transformedError;
98
- }
99
- }
100
- //# sourceMappingURL=atlas-v2-search-result-location.universal.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"atlas-v2-search-result-location.universal.js","sourceRoot":"","sources":["../../../../src/atlas-v2-search-result-location.universal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,IAAI,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACvF,OAAO,EACL,qCAAqC,EACrC,uCAAuC,GACxC,MAAM,yCAAyC,CAAC;AAEjD,OAAO,KAAK,gCAAgC,MAAM,2CAA2C,CAAC;AAC9F,OAAO,EAAE,gCAAgC,EAAE,MAAM,0CAA0C,CAAC;AAC5F,OAAO,EAAE,cAAc,EAAE,MAAM,kDAAkD,CAAC;AA2DlF,MAAM,CAAN,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,KAAf,eAAe,QAc1B;AAED,MAAM,CAAN,IAAY,SAQX;AARD,WAAY,SAAS;IACnB,oDAAuC,CAAA;IACvC,+IAA+I;IAC/I,kCAAqB,CAAA;IACrB,6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