@azure-rest/maps-timezone 1.0.0-beta.1

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 (168) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +247 -0
  3. package/dist/browser/MapsTimeZone.d.ts +52 -0
  4. package/dist/browser/MapsTimeZone.d.ts.map +1 -0
  5. package/dist/browser/MapsTimeZone.js +40 -0
  6. package/dist/browser/MapsTimeZone.js.map +1 -0
  7. package/dist/browser/generated/clientDefinitions.d.ts +63 -0
  8. package/dist/browser/generated/clientDefinitions.d.ts.map +1 -0
  9. package/dist/browser/generated/clientDefinitions.js +4 -0
  10. package/dist/browser/generated/clientDefinitions.js.map +1 -0
  11. package/dist/browser/generated/index.d.ts +9 -0
  12. package/dist/browser/generated/index.d.ts.map +1 -0
  13. package/dist/browser/generated/index.js +11 -0
  14. package/dist/browser/generated/index.js.map +1 -0
  15. package/dist/browser/generated/isUnexpected.d.ts +8 -0
  16. package/dist/browser/generated/isUnexpected.d.ts.map +1 -0
  17. package/dist/browser/generated/isUnexpected.js +76 -0
  18. package/dist/browser/generated/isUnexpected.js.map +1 -0
  19. package/dist/browser/generated/logger.d.ts +2 -0
  20. package/dist/browser/generated/logger.d.ts.map +1 -0
  21. package/dist/browser/generated/logger.js +5 -0
  22. package/dist/browser/generated/logger.js.map +1 -0
  23. package/dist/browser/generated/mapsTimeZoneClient.d.ts +15 -0
  24. package/dist/browser/generated/mapsTimeZoneClient.d.ts.map +1 -0
  25. package/dist/browser/generated/mapsTimeZoneClient.js +42 -0
  26. package/dist/browser/generated/mapsTimeZoneClient.js.map +1 -0
  27. package/dist/browser/generated/outputModels.d.ts +134 -0
  28. package/dist/browser/generated/outputModels.d.ts.map +1 -0
  29. package/dist/browser/generated/outputModels.js +4 -0
  30. package/dist/browser/generated/outputModels.js.map +1 -0
  31. package/dist/browser/generated/parameters.d.ts +62 -0
  32. package/dist/browser/generated/parameters.d.ts.map +1 -0
  33. package/dist/browser/generated/parameters.js +4 -0
  34. package/dist/browser/generated/parameters.js.map +1 -0
  35. package/dist/browser/generated/responses.d.ts +99 -0
  36. package/dist/browser/generated/responses.d.ts.map +1 -0
  37. package/dist/browser/generated/responses.js +4 -0
  38. package/dist/browser/generated/responses.js.map +1 -0
  39. package/dist/browser/index.d.ts +4 -0
  40. package/dist/browser/index.d.ts.map +1 -0
  41. package/dist/browser/index.js +6 -0
  42. package/dist/browser/index.js.map +1 -0
  43. package/dist/browser/package.json +3 -0
  44. package/dist/commonjs/MapsTimeZone.d.ts +52 -0
  45. package/dist/commonjs/MapsTimeZone.d.ts.map +1 -0
  46. package/dist/commonjs/MapsTimeZone.js +44 -0
  47. package/dist/commonjs/MapsTimeZone.js.map +1 -0
  48. package/dist/commonjs/generated/clientDefinitions.d.ts +63 -0
  49. package/dist/commonjs/generated/clientDefinitions.d.ts.map +1 -0
  50. package/dist/commonjs/generated/clientDefinitions.js +5 -0
  51. package/dist/commonjs/generated/clientDefinitions.js.map +1 -0
  52. package/dist/commonjs/generated/index.d.ts +9 -0
  53. package/dist/commonjs/generated/index.d.ts.map +1 -0
  54. package/dist/commonjs/generated/index.js +14 -0
  55. package/dist/commonjs/generated/index.js.map +1 -0
  56. package/dist/commonjs/generated/isUnexpected.d.ts +8 -0
  57. package/dist/commonjs/generated/isUnexpected.d.ts.map +1 -0
  58. package/dist/commonjs/generated/isUnexpected.js +79 -0
  59. package/dist/commonjs/generated/isUnexpected.js.map +1 -0
  60. package/dist/commonjs/generated/logger.d.ts +2 -0
  61. package/dist/commonjs/generated/logger.d.ts.map +1 -0
  62. package/dist/commonjs/generated/logger.js +8 -0
  63. package/dist/commonjs/generated/logger.js.map +1 -0
  64. package/dist/commonjs/generated/mapsTimeZoneClient.d.ts +15 -0
  65. package/dist/commonjs/generated/mapsTimeZoneClient.d.ts.map +1 -0
  66. package/dist/commonjs/generated/mapsTimeZoneClient.js +45 -0
  67. package/dist/commonjs/generated/mapsTimeZoneClient.js.map +1 -0
  68. package/dist/commonjs/generated/outputModels.d.ts +134 -0
  69. package/dist/commonjs/generated/outputModels.d.ts.map +1 -0
  70. package/dist/commonjs/generated/outputModels.js +5 -0
  71. package/dist/commonjs/generated/outputModels.js.map +1 -0
  72. package/dist/commonjs/generated/parameters.d.ts +62 -0
  73. package/dist/commonjs/generated/parameters.d.ts.map +1 -0
  74. package/dist/commonjs/generated/parameters.js +5 -0
  75. package/dist/commonjs/generated/parameters.js.map +1 -0
  76. package/dist/commonjs/generated/responses.d.ts +99 -0
  77. package/dist/commonjs/generated/responses.d.ts.map +1 -0
  78. package/dist/commonjs/generated/responses.js +5 -0
  79. package/dist/commonjs/generated/responses.js.map +1 -0
  80. package/dist/commonjs/index.d.ts +4 -0
  81. package/dist/commonjs/index.d.ts.map +1 -0
  82. package/dist/commonjs/index.js +9 -0
  83. package/dist/commonjs/index.js.map +1 -0
  84. package/dist/commonjs/package.json +3 -0
  85. package/dist/commonjs/tsdoc-metadata.json +11 -0
  86. package/dist/esm/MapsTimeZone.d.ts +52 -0
  87. package/dist/esm/MapsTimeZone.d.ts.map +1 -0
  88. package/dist/esm/MapsTimeZone.js +40 -0
  89. package/dist/esm/MapsTimeZone.js.map +1 -0
  90. package/dist/esm/generated/clientDefinitions.d.ts +63 -0
  91. package/dist/esm/generated/clientDefinitions.d.ts.map +1 -0
  92. package/dist/esm/generated/clientDefinitions.js +4 -0
  93. package/dist/esm/generated/clientDefinitions.js.map +1 -0
  94. package/dist/esm/generated/index.d.ts +9 -0
  95. package/dist/esm/generated/index.d.ts.map +1 -0
  96. package/dist/esm/generated/index.js +11 -0
  97. package/dist/esm/generated/index.js.map +1 -0
  98. package/dist/esm/generated/isUnexpected.d.ts +8 -0
  99. package/dist/esm/generated/isUnexpected.d.ts.map +1 -0
  100. package/dist/esm/generated/isUnexpected.js +76 -0
  101. package/dist/esm/generated/isUnexpected.js.map +1 -0
  102. package/dist/esm/generated/logger.d.ts +2 -0
  103. package/dist/esm/generated/logger.d.ts.map +1 -0
  104. package/dist/esm/generated/logger.js +5 -0
  105. package/dist/esm/generated/logger.js.map +1 -0
  106. package/dist/esm/generated/mapsTimeZoneClient.d.ts +15 -0
  107. package/dist/esm/generated/mapsTimeZoneClient.d.ts.map +1 -0
  108. package/dist/esm/generated/mapsTimeZoneClient.js +42 -0
  109. package/dist/esm/generated/mapsTimeZoneClient.js.map +1 -0
  110. package/dist/esm/generated/outputModels.d.ts +134 -0
  111. package/dist/esm/generated/outputModels.d.ts.map +1 -0
  112. package/dist/esm/generated/outputModels.js +4 -0
  113. package/dist/esm/generated/outputModels.js.map +1 -0
  114. package/dist/esm/generated/parameters.d.ts +62 -0
  115. package/dist/esm/generated/parameters.d.ts.map +1 -0
  116. package/dist/esm/generated/parameters.js +4 -0
  117. package/dist/esm/generated/parameters.js.map +1 -0
  118. package/dist/esm/generated/responses.d.ts +99 -0
  119. package/dist/esm/generated/responses.d.ts.map +1 -0
  120. package/dist/esm/generated/responses.js +4 -0
  121. package/dist/esm/generated/responses.js.map +1 -0
  122. package/dist/esm/index.d.ts +4 -0
  123. package/dist/esm/index.d.ts.map +1 -0
  124. package/dist/esm/index.js +6 -0
  125. package/dist/esm/index.js.map +1 -0
  126. package/dist/esm/package.json +3 -0
  127. package/dist/react-native/MapsTimeZone.d.ts +52 -0
  128. package/dist/react-native/MapsTimeZone.d.ts.map +1 -0
  129. package/dist/react-native/MapsTimeZone.js +40 -0
  130. package/dist/react-native/MapsTimeZone.js.map +1 -0
  131. package/dist/react-native/generated/clientDefinitions.d.ts +63 -0
  132. package/dist/react-native/generated/clientDefinitions.d.ts.map +1 -0
  133. package/dist/react-native/generated/clientDefinitions.js +4 -0
  134. package/dist/react-native/generated/clientDefinitions.js.map +1 -0
  135. package/dist/react-native/generated/index.d.ts +9 -0
  136. package/dist/react-native/generated/index.d.ts.map +1 -0
  137. package/dist/react-native/generated/index.js +11 -0
  138. package/dist/react-native/generated/index.js.map +1 -0
  139. package/dist/react-native/generated/isUnexpected.d.ts +8 -0
  140. package/dist/react-native/generated/isUnexpected.d.ts.map +1 -0
  141. package/dist/react-native/generated/isUnexpected.js +76 -0
  142. package/dist/react-native/generated/isUnexpected.js.map +1 -0
  143. package/dist/react-native/generated/logger.d.ts +2 -0
  144. package/dist/react-native/generated/logger.d.ts.map +1 -0
  145. package/dist/react-native/generated/logger.js +5 -0
  146. package/dist/react-native/generated/logger.js.map +1 -0
  147. package/dist/react-native/generated/mapsTimeZoneClient.d.ts +15 -0
  148. package/dist/react-native/generated/mapsTimeZoneClient.d.ts.map +1 -0
  149. package/dist/react-native/generated/mapsTimeZoneClient.js +42 -0
  150. package/dist/react-native/generated/mapsTimeZoneClient.js.map +1 -0
  151. package/dist/react-native/generated/outputModels.d.ts +134 -0
  152. package/dist/react-native/generated/outputModels.d.ts.map +1 -0
  153. package/dist/react-native/generated/outputModels.js +4 -0
  154. package/dist/react-native/generated/outputModels.js.map +1 -0
  155. package/dist/react-native/generated/parameters.d.ts +62 -0
  156. package/dist/react-native/generated/parameters.d.ts.map +1 -0
  157. package/dist/react-native/generated/parameters.js +4 -0
  158. package/dist/react-native/generated/parameters.js.map +1 -0
  159. package/dist/react-native/generated/responses.d.ts +99 -0
  160. package/dist/react-native/generated/responses.d.ts.map +1 -0
  161. package/dist/react-native/generated/responses.js +4 -0
  162. package/dist/react-native/generated/responses.js.map +1 -0
  163. package/dist/react-native/index.d.ts +4 -0
  164. package/dist/react-native/index.d.ts.map +1 -0
  165. package/dist/react-native/index.js +6 -0
  166. package/dist/react-native/index.js.map +1 -0
  167. package/dist/react-native/package.json +3 -0
  168. package/package.json +133 -0
@@ -0,0 +1,99 @@
1
+ import { HttpResponse } from "@azure-rest/core-client";
2
+ import { TimeZoneResultOutput, ErrorResponseOutput, WindowsTimeZoneOutput, IanaIdOutput, TimeZoneIanaVersionResultOutput } from "./outputModels.js";
3
+ /**
4
+ *
5
+ * The `Get Timezone By ID` API is an HTTP `GET` request that returns current, historical, and future time zone information for the specified IANA time zone ID.
6
+ */
7
+ export interface TimeZoneGetTimeZoneByID200Response extends HttpResponse {
8
+ status: "200";
9
+ body: TimeZoneResultOutput;
10
+ }
11
+ /**
12
+ *
13
+ * The `Get Timezone By ID` API is an HTTP `GET` request that returns current, historical, and future time zone information for the specified IANA time zone ID.
14
+ */
15
+ export interface TimeZoneGetTimeZoneByIDDefaultResponse extends HttpResponse {
16
+ status: string;
17
+ body: ErrorResponseOutput;
18
+ }
19
+ /**
20
+ *
21
+ * The `Get Timezone By Coordinates` API is an HTTP `GET` request that returns current, historical, and future time zone information for a specified latitude-longitude pair. In addition, the API provides sunset and sunrise times for a given location, with the exception of regions that observe solar days.
22
+ */
23
+ export interface TimeZoneGetTimeZoneByCoordinates200Response extends HttpResponse {
24
+ status: "200";
25
+ body: TimeZoneResultOutput;
26
+ }
27
+ /**
28
+ *
29
+ * The `Get Timezone By Coordinates` API is an HTTP `GET` request that returns current, historical, and future time zone information for a specified latitude-longitude pair. In addition, the API provides sunset and sunrise times for a given location, with the exception of regions that observe solar days.
30
+ */
31
+ export interface TimeZoneGetTimeZoneByCoordinatesDefaultResponse extends HttpResponse {
32
+ status: string;
33
+ body: ErrorResponseOutput;
34
+ }
35
+ /**
36
+ *
37
+ * The `Get Windows Time Zones` API is an HTTP `GET` request that returns a full list of Windows Time Zone IDs.
38
+ */
39
+ export interface TimeZoneGetWindowsTimezoneIds200Response extends HttpResponse {
40
+ status: "200";
41
+ body: Array<WindowsTimeZoneOutput>;
42
+ }
43
+ /**
44
+ *
45
+ * The `Get Windows Time Zones` API is an HTTP `GET` request that returns a full list of Windows Time Zone IDs.
46
+ */
47
+ export interface TimeZoneGetWindowsTimezoneIdsDefaultResponse extends HttpResponse {
48
+ status: string;
49
+ body: ErrorResponseOutput;
50
+ }
51
+ /**
52
+ *
53
+ * The `Get IANA Time Zones` API is an HTTP `GET` request that returns a full list of Internet Assigned Numbers Authority (IANA) time zone IDs. Updates to the IANA service are reflected in the system within one day.
54
+ */
55
+ export interface TimeZoneGetIanaTimezoneIds200Response extends HttpResponse {
56
+ status: "200";
57
+ body: Array<IanaIdOutput>;
58
+ }
59
+ /**
60
+ *
61
+ * The `Get IANA Time Zones` API is an HTTP `GET` request that returns a full list of Internet Assigned Numbers Authority (IANA) time zone IDs. Updates to the IANA service are reflected in the system within one day.
62
+ */
63
+ export interface TimeZoneGetIanaTimezoneIdsDefaultResponse extends HttpResponse {
64
+ status: string;
65
+ body: ErrorResponseOutput;
66
+ }
67
+ /**
68
+ *
69
+ * The `Get Time Zone IANA Version` API is an HTTP `GET` request that returns the current Internet Assigned Numbers Authority (IANA) version number as Metadata.
70
+ */
71
+ export interface TimeZoneGetIanaVersion200Response extends HttpResponse {
72
+ status: "200";
73
+ body: TimeZoneIanaVersionResultOutput;
74
+ }
75
+ /**
76
+ *
77
+ * The `Get Time Zone IANA Version` API is an HTTP `GET` request that returns the current Internet Assigned Numbers Authority (IANA) version number as Metadata.
78
+ */
79
+ export interface TimeZoneGetIanaVersionDefaultResponse extends HttpResponse {
80
+ status: string;
81
+ body: ErrorResponseOutput;
82
+ }
83
+ /**
84
+ *
85
+ * The `Get Windows to IANA Time Zone` API is an HTTP `GET` request that returns a corresponding Internet Assigned Numbers Authority (IANA) ID, given a valid Windows Time Zone ID. Multiple IANA IDs may be returned for a single Windows ID. It is possible to narrow these results by adding an optional territory parameter.
86
+ */
87
+ export interface TimeZoneConvertWindowsTimezoneToIana200Response extends HttpResponse {
88
+ status: "200";
89
+ body: Array<IanaIdOutput>;
90
+ }
91
+ /**
92
+ *
93
+ * The `Get Windows to IANA Time Zone` API is an HTTP `GET` request that returns a corresponding Internet Assigned Numbers Authority (IANA) ID, given a valid Windows Time Zone ID. Multiple IANA IDs may be returned for a single Windows ID. It is possible to narrow these results by adding an optional territory parameter.
94
+ */
95
+ export interface TimeZoneConvertWindowsTimezoneToIanaDefaultResponse extends HttpResponse {
96
+ status: string;
97
+ body: ErrorResponseOutput;
98
+ }
99
+ //# sourceMappingURL=responses.d.ts.map
@@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3B;AAED;;;GAGG;AACH,MAAM,WAAW,iCAAkC,SAAQ,YAAY;IACrE,MAAM,EAAE,KAAK,CAAC;IACd,IAAI,EAAE,+BAA+B,CAAC;CACvC;AAED;;;GAGG;AACH,MAAM,WAAW,qCAAsC,SAAQ,YAAY;IACzE,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,mBAAmB,CAAC;CAC3B;AAED;;;GAGG;AACH,MAAM,WAAW,+CACf,SAAQ,YAAY;IACpB,MAAM,EAAE,KAAK,CAAC;IACd,IAAI,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;CAC3B;AAED;;;GAGG;AACH,MAAM,WAAW,mDACf,SAAQ,YAAY;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,mBAAmB,CAAC;CAC3B"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ //# sourceMappingURL=responses.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"responses.js","sourceRoot":"","sources":["../../../src/generated/responses.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { HttpResponse } from \"@azure-rest/core-client\";\nimport {\n TimeZoneResultOutput,\n ErrorResponseOutput,\n WindowsTimeZoneOutput,\n IanaIdOutput,\n TimeZoneIanaVersionResultOutput,\n} from \"./outputModels.js\";\n\n/**\n *\n * The `Get Timezone By ID` API is an HTTP `GET` request that returns current, historical, and future time zone information for the specified IANA time zone ID.\n */\nexport interface TimeZoneGetTimeZoneByID200Response extends HttpResponse {\n status: \"200\";\n body: TimeZoneResultOutput;\n}\n\n/**\n *\n * The `Get Timezone By ID` API is an HTTP `GET` request that returns current, historical, and future time zone information for the specified IANA time zone ID.\n */\nexport interface TimeZoneGetTimeZoneByIDDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\n/**\n *\n * The `Get Timezone By Coordinates` API is an HTTP `GET` request that returns current, historical, and future time zone information for a specified latitude-longitude pair. In addition, the API provides sunset and sunrise times for a given location, with the exception of regions that observe solar days.\n */\nexport interface TimeZoneGetTimeZoneByCoordinates200Response\n extends HttpResponse {\n status: \"200\";\n body: TimeZoneResultOutput;\n}\n\n/**\n *\n * The `Get Timezone By Coordinates` API is an HTTP `GET` request that returns current, historical, and future time zone information for a specified latitude-longitude pair. In addition, the API provides sunset and sunrise times for a given location, with the exception of regions that observe solar days.\n */\nexport interface TimeZoneGetTimeZoneByCoordinatesDefaultResponse\n extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\n/**\n *\n * The `Get Windows Time Zones` API is an HTTP `GET` request that returns a full list of Windows Time Zone IDs.\n */\nexport interface TimeZoneGetWindowsTimezoneIds200Response extends HttpResponse {\n status: \"200\";\n body: Array<WindowsTimeZoneOutput>;\n}\n\n/**\n *\n * The `Get Windows Time Zones` API is an HTTP `GET` request that returns a full list of Windows Time Zone IDs.\n */\nexport interface TimeZoneGetWindowsTimezoneIdsDefaultResponse\n extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\n/**\n *\n * The `Get IANA Time Zones` API is an HTTP `GET` request that returns a full list of Internet Assigned Numbers Authority (IANA) time zone IDs. Updates to the IANA service are reflected in the system within one day.\n */\nexport interface TimeZoneGetIanaTimezoneIds200Response extends HttpResponse {\n status: \"200\";\n body: Array<IanaIdOutput>;\n}\n\n/**\n *\n * The `Get IANA Time Zones` API is an HTTP `GET` request that returns a full list of Internet Assigned Numbers Authority (IANA) time zone IDs. Updates to the IANA service are reflected in the system within one day.\n */\nexport interface TimeZoneGetIanaTimezoneIdsDefaultResponse\n extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\n/**\n *\n * The `Get Time Zone IANA Version` API is an HTTP `GET` request that returns the current Internet Assigned Numbers Authority (IANA) version number as Metadata.\n */\nexport interface TimeZoneGetIanaVersion200Response extends HttpResponse {\n status: \"200\";\n body: TimeZoneIanaVersionResultOutput;\n}\n\n/**\n *\n * The `Get Time Zone IANA Version` API is an HTTP `GET` request that returns the current Internet Assigned Numbers Authority (IANA) version number as Metadata.\n */\nexport interface TimeZoneGetIanaVersionDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n\n/**\n *\n * The `Get Windows to IANA Time Zone` API is an HTTP `GET` request that returns a corresponding Internet Assigned Numbers Authority (IANA) ID, given a valid Windows Time Zone ID. Multiple IANA IDs may be returned for a single Windows ID. It is possible to narrow these results by adding an optional territory parameter.\n */\nexport interface TimeZoneConvertWindowsTimezoneToIana200Response\n extends HttpResponse {\n status: \"200\";\n body: Array<IanaIdOutput>;\n}\n\n/**\n *\n * The `Get Windows to IANA Time Zone` API is an HTTP `GET` request that returns a corresponding Internet Assigned Numbers Authority (IANA) ID, given a valid Windows Time Zone ID. Multiple IANA IDs may be returned for a single Windows ID. It is possible to narrow these results by adding an optional territory parameter.\n */\nexport interface TimeZoneConvertWindowsTimezoneToIanaDefaultResponse\n extends HttpResponse {\n status: string;\n body: ErrorResponseOutput;\n}\n"]}
@@ -0,0 +1,4 @@
1
+ import MapsTimeZone from "./MapsTimeZone.js";
2
+ export * from "./generated/index.js";
3
+ export default MapsTimeZone;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAE7C,cAAc,sBAAsB,CAAC;AACrC,eAAe,YAAY,CAAC"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ const tslib_1 = require("tslib");
6
+ const MapsTimeZone_js_1 = tslib_1.__importDefault(require("./MapsTimeZone.js"));
7
+ tslib_1.__exportStar(require("./generated/index.js"), exports);
8
+ exports.default = MapsTimeZone_js_1.default;
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,gFAA6C;AAE7C,+DAAqC;AACrC,kBAAe,yBAAY,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport MapsTimeZone from \"./MapsTimeZone.js\";\n\nexport * from \"./generated/index.js\";\nexport default MapsTimeZone;\n"]}
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "commonjs"
3
+ }
@@ -0,0 +1,11 @@
1
+ // This file is read by tools that parse documentation comments conforming to the TSDoc standard.
2
+ // It should be published with your NPM package. It should not be tracked by Git.
3
+ {
4
+ "tsdocVersion": "0.12",
5
+ "toolPackages": [
6
+ {
7
+ "packageName": "@microsoft/api-extractor",
8
+ "packageVersion": "7.48.0"
9
+ }
10
+ ]
11
+ }
@@ -0,0 +1,52 @@
1
+ import type { ClientOptions } from "@azure-rest/core-client";
2
+ import type { AzureKeyCredential, AzureSASCredential, TokenCredential } from "@azure/core-auth";
3
+ import type { MapsTimeZoneClient } from "./generated/index.js";
4
+ /**
5
+ * Creates an instance of MapsTimeZoneClient from a subscription key.
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * import MapsTimeZone from "@azure-rest/maps-timezone";
10
+ *
11
+ * const credential = new AzureKeyCredential("<subscription-key>");
12
+ * const client = MapsTimeZone(credential);
13
+ *```
14
+ *
15
+ * @param credential - An AzureKeyCredential instance used to authenticate requests to the service
16
+ * @param options - Options used to configure the TimeZone Client
17
+ */
18
+ export default function MapsTimeZone(credential: AzureKeyCredential, options?: ClientOptions): MapsTimeZoneClient;
19
+ /**
20
+ * Creates an instance of MapsTimeZone from an Azure Identity `TokenCredential`.
21
+ *
22
+ * @example
23
+ * ```ts
24
+ * import MapsTimeZoneClient from "@azure-rest/maps-timezone";
25
+ * import { DefaultAzureCredential } from "@azure/identity";
26
+ *
27
+ * const credential = new DefaultAzureCredential();
28
+ * const client = MapsTimeZone(credential, "<maps-account-client-id>");
29
+ *```
30
+ *
31
+ * @param credential - An TokenCredential instance used to authenticate requests to the service
32
+ * @param mapsAccountClientId - The Azure Maps client id of a specific map resource
33
+ * @param options - Options used to configure the TimeZone Client
34
+ */
35
+ export default function MapsTimeZone(credential: TokenCredential, mapsAccountClientId: string, options?: ClientOptions): MapsTimeZoneClient;
36
+ /**
37
+ * Creates an instance of MapsTimeZone from an Azure Identity `AzureSASCredential`.
38
+ *
39
+ * @example
40
+ * ```ts
41
+ * import MapsTimeZone from "@azure-rest/maps-timezone";
42
+ * import { AzureSASCredential } from "@azure/core-auth";
43
+ *
44
+ * const credential = new AzureSASCredential("<SAS Token>");
45
+ * const client = MapsTimeZone(credential);
46
+ * ```
47
+ *
48
+ * @param credential - An AzureSASCredential instance used to authenticate requests to the service
49
+ * @param options - Options used to configure the TimeZone Client
50
+ */
51
+ export default function MapsTimeZone(credential: AzureSASCredential, options?: ClientOptions): MapsTimeZoneClient;
52
+ //# sourceMappingURL=MapsTimeZone.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MapsTimeZone.d.ts","sourceRoot":"","sources":["../../src/MapsTimeZone.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAIhG,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAG/D;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,UAAU,EAAE,kBAAkB,EAC9B,OAAO,CAAC,EAAE,aAAa,GACtB,kBAAkB,CAAC;AACtB;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,UAAU,EAAE,eAAe,EAC3B,mBAAmB,EAAE,MAAM,EAC3B,OAAO,CAAC,EAAE,aAAa,GACtB,kBAAkB,CAAC;AACtB;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,UAAU,EAAE,kBAAkB,EAC9B,OAAO,CAAC,EAAE,aAAa,GACtB,kBAAkB,CAAC"}
@@ -0,0 +1,40 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ import { isSASCredential, isTokenCredential } from "@azure/core-auth";
4
+ import { bearerTokenAuthenticationPolicy } from "@azure/core-rest-pipeline";
5
+ import { createMapsClientIdPolicy } from "@azure/maps-common";
6
+ import createClient from "./generated/mapsTimeZoneClient.js";
7
+ export default function MapsTimeZone(credential, clientIdOrOptions = {}, maybeOptions = {}) {
8
+ const options = typeof clientIdOrOptions === "string" ? maybeOptions : clientIdOrOptions;
9
+ /**
10
+ * maps service requires a header "ms-x-client-id", which is different from the standard Microsoft Entra ID.
11
+ * So we need to do our own implementation.
12
+ * This customized authentication is following by this guide: https://github.com/Azure/azure-sdk-for-js/blob/main/documentation/RLC-customization.md#custom-authentication
13
+ */
14
+ if (isTokenCredential(credential)) {
15
+ const clientId = typeof clientIdOrOptions === "string" ? clientIdOrOptions : "";
16
+ if (!clientId) {
17
+ throw Error("Client id is needed for TokenCredential");
18
+ }
19
+ const client = createClient(undefined, options);
20
+ client.pipeline.addPolicy(bearerTokenAuthenticationPolicy({
21
+ credential,
22
+ scopes: "https://atlas.microsoft.com/.default",
23
+ }));
24
+ client.pipeline.addPolicy(createMapsClientIdPolicy(clientId));
25
+ return client;
26
+ }
27
+ if (isSASCredential(credential)) {
28
+ const client = createClient(undefined, options);
29
+ client.pipeline.addPolicy({
30
+ name: "mapsSASCredentialPolicy",
31
+ async sendRequest(request, next) {
32
+ request.headers.set("Authorization", `jwt-sas ${credential.signature}`);
33
+ return next(request);
34
+ },
35
+ });
36
+ return client;
37
+ }
38
+ return createClient(credential, options);
39
+ }
40
+ //# sourceMappingURL=MapsTimeZone.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MapsTimeZone.js","sourceRoot":"","sources":["../../src/MapsTimeZone.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,CAAC;AAC5E,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAE9D,OAAO,YAAY,MAAM,mCAAmC,CAAC;AA4D7D,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,UAAqE,EACrE,oBAA4C,EAAE,EAC9C,eAA8B,EAAE;IAEhC,MAAM,OAAO,GAAG,OAAO,iBAAiB,KAAK,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,iBAAiB,CAAC;IAEzF;;;;OAIG;IACH,IAAI,iBAAiB,CAAC,UAAU,CAAC,EAAE,CAAC;QAClC,MAAM,QAAQ,GAAG,OAAO,iBAAiB,KAAK,QAAQ,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,CAAC;QAChF,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,MAAM,KAAK,CAAC,yCAAyC,CAAC,CAAC;QACzD,CAAC;QACD,MAAM,MAAM,GAAG,YAAY,CAAC,SAAgB,EAAE,OAAO,CAAC,CAAC;QACvD,MAAM,CAAC,QAAQ,CAAC,SAAS,CACvB,+BAA+B,CAAC;YAC9B,UAAU;YACV,MAAM,EAAE,sCAAsC;SAC/C,CAAC,CACH,CAAC;QACF,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,wBAAwB,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC9D,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,IAAI,eAAe,CAAC,UAAU,CAAC,EAAE,CAAC;QAChC,MAAM,MAAM,GAAG,YAAY,CAAC,SAAgB,EAAE,OAAO,CAAC,CAAC;QACvD,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC;YACxB,IAAI,EAAE,yBAAyB;YAC/B,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI;gBAC7B,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,WAAW,UAAU,CAAC,SAAS,EAAE,CAAC,CAAC;gBACxE,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;SACF,CAAC,CAAC;QACH,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,OAAO,YAAY,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;AAC3C,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ClientOptions } from \"@azure-rest/core-client\";\nimport type { AzureKeyCredential, AzureSASCredential, TokenCredential } from \"@azure/core-auth\";\nimport { isSASCredential, isTokenCredential } from \"@azure/core-auth\";\nimport { bearerTokenAuthenticationPolicy } from \"@azure/core-rest-pipeline\";\nimport { createMapsClientIdPolicy } from \"@azure/maps-common\";\nimport type { MapsTimeZoneClient } from \"./generated/index.js\";\nimport createClient from \"./generated/mapsTimeZoneClient.js\";\n\n/**\n * Creates an instance of MapsTimeZoneClient from a subscription key.\n *\n * @example\n * ```ts\n * import MapsTimeZone from \"@azure-rest/maps-timezone\";\n *\n * const credential = new AzureKeyCredential(\"<subscription-key>\");\n * const client = MapsTimeZone(credential);\n *```\n *\n * @param credential - An AzureKeyCredential instance used to authenticate requests to the service\n * @param options - Options used to configure the TimeZone Client\n */\nexport default function MapsTimeZone(\n credential: AzureKeyCredential,\n options?: ClientOptions,\n): MapsTimeZoneClient;\n/**\n * Creates an instance of MapsTimeZone from an Azure Identity `TokenCredential`.\n *\n * @example\n * ```ts\n * import MapsTimeZoneClient from \"@azure-rest/maps-timezone\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const credential = new DefaultAzureCredential();\n * const client = MapsTimeZone(credential, \"<maps-account-client-id>\");\n *```\n *\n * @param credential - An TokenCredential instance used to authenticate requests to the service\n * @param mapsAccountClientId - The Azure Maps client id of a specific map resource\n * @param options - Options used to configure the TimeZone Client\n */\nexport default function MapsTimeZone(\n credential: TokenCredential,\n mapsAccountClientId: string,\n options?: ClientOptions,\n): MapsTimeZoneClient;\n/**\n * Creates an instance of MapsTimeZone from an Azure Identity `AzureSASCredential`.\n *\n * @example\n * ```ts\n * import MapsTimeZone from \"@azure-rest/maps-timezone\";\n * import { AzureSASCredential } from \"@azure/core-auth\";\n *\n * const credential = new AzureSASCredential(\"<SAS Token>\");\n * const client = MapsTimeZone(credential);\n * ```\n *\n * @param credential - An AzureSASCredential instance used to authenticate requests to the service\n * @param options - Options used to configure the TimeZone Client\n */\nexport default function MapsTimeZone(\n credential: AzureSASCredential,\n options?: ClientOptions,\n): MapsTimeZoneClient;\nexport default function MapsTimeZone(\n credential: TokenCredential | AzureKeyCredential | AzureSASCredential,\n clientIdOrOptions: string | ClientOptions = {},\n maybeOptions: ClientOptions = {},\n): MapsTimeZoneClient {\n const options = typeof clientIdOrOptions === \"string\" ? maybeOptions : clientIdOrOptions;\n\n /**\n * maps service requires a header \"ms-x-client-id\", which is different from the standard Microsoft Entra ID.\n * So we need to do our own implementation.\n * This customized authentication is following by this guide: https://github.com/Azure/azure-sdk-for-js/blob/main/documentation/RLC-customization.md#custom-authentication\n */\n if (isTokenCredential(credential)) {\n const clientId = typeof clientIdOrOptions === \"string\" ? clientIdOrOptions : \"\";\n if (!clientId) {\n throw Error(\"Client id is needed for TokenCredential\");\n }\n const client = createClient(undefined as any, options);\n client.pipeline.addPolicy(\n bearerTokenAuthenticationPolicy({\n credential,\n scopes: \"https://atlas.microsoft.com/.default\",\n }),\n );\n client.pipeline.addPolicy(createMapsClientIdPolicy(clientId));\n return client;\n }\n\n if (isSASCredential(credential)) {\n const client = createClient(undefined as any, options);\n client.pipeline.addPolicy({\n name: \"mapsSASCredentialPolicy\",\n async sendRequest(request, next) {\n request.headers.set(\"Authorization\", `jwt-sas ${credential.signature}`);\n return next(request);\n },\n });\n return client;\n }\n\n return createClient(credential, options);\n}\n"]}
@@ -0,0 +1,63 @@
1
+ import { TimeZoneGetTimeZoneByIDParameters, TimeZoneGetTimeZoneByCoordinatesParameters, TimeZoneGetWindowsTimezoneIdsParameters, TimeZoneGetIanaTimezoneIdsParameters, TimeZoneGetIanaVersionParameters, TimeZoneConvertWindowsTimezoneToIanaParameters } from "./parameters.js";
2
+ import { TimeZoneGetTimeZoneByID200Response, TimeZoneGetTimeZoneByIDDefaultResponse, TimeZoneGetTimeZoneByCoordinates200Response, TimeZoneGetTimeZoneByCoordinatesDefaultResponse, TimeZoneGetWindowsTimezoneIds200Response, TimeZoneGetWindowsTimezoneIdsDefaultResponse, TimeZoneGetIanaTimezoneIds200Response, TimeZoneGetIanaTimezoneIdsDefaultResponse, TimeZoneGetIanaVersion200Response, TimeZoneGetIanaVersionDefaultResponse, TimeZoneConvertWindowsTimezoneToIana200Response, TimeZoneConvertWindowsTimezoneToIanaDefaultResponse } from "./responses.js";
3
+ import { Client, StreamableMethod } from "@azure-rest/core-client";
4
+ export interface GetTimeZoneByID {
5
+ /**
6
+ *
7
+ * The `Get Timezone By ID` API is an HTTP `GET` request that returns current, historical, and future time zone information for the specified IANA time zone ID.
8
+ */
9
+ get(options: TimeZoneGetTimeZoneByIDParameters): StreamableMethod<TimeZoneGetTimeZoneByID200Response | TimeZoneGetTimeZoneByIDDefaultResponse>;
10
+ }
11
+ export interface GetTimeZoneByCoordinates {
12
+ /**
13
+ *
14
+ * The `Get Timezone By Coordinates` API is an HTTP `GET` request that returns current, historical, and future time zone information for a specified latitude-longitude pair. In addition, the API provides sunset and sunrise times for a given location, with the exception of regions that observe solar days.
15
+ */
16
+ get(options: TimeZoneGetTimeZoneByCoordinatesParameters): StreamableMethod<TimeZoneGetTimeZoneByCoordinates200Response | TimeZoneGetTimeZoneByCoordinatesDefaultResponse>;
17
+ }
18
+ export interface GetWindowsTimezoneIds {
19
+ /**
20
+ *
21
+ * The `Get Windows Time Zones` API is an HTTP `GET` request that returns a full list of Windows Time Zone IDs.
22
+ */
23
+ get(options?: TimeZoneGetWindowsTimezoneIdsParameters): StreamableMethod<TimeZoneGetWindowsTimezoneIds200Response | TimeZoneGetWindowsTimezoneIdsDefaultResponse>;
24
+ }
25
+ export interface GetIanaTimezoneIds {
26
+ /**
27
+ *
28
+ * The `Get IANA Time Zones` API is an HTTP `GET` request that returns a full list of Internet Assigned Numbers Authority (IANA) time zone IDs. Updates to the IANA service are reflected in the system within one day.
29
+ */
30
+ get(options?: TimeZoneGetIanaTimezoneIdsParameters): StreamableMethod<TimeZoneGetIanaTimezoneIds200Response | TimeZoneGetIanaTimezoneIdsDefaultResponse>;
31
+ }
32
+ export interface GetIanaVersion {
33
+ /**
34
+ *
35
+ * The `Get Time Zone IANA Version` API is an HTTP `GET` request that returns the current Internet Assigned Numbers Authority (IANA) version number as Metadata.
36
+ */
37
+ get(options?: TimeZoneGetIanaVersionParameters): StreamableMethod<TimeZoneGetIanaVersion200Response | TimeZoneGetIanaVersionDefaultResponse>;
38
+ }
39
+ export interface ConvertWindowsTimezoneToIana {
40
+ /**
41
+ *
42
+ * The `Get Windows to IANA Time Zone` API is an HTTP `GET` request that returns a corresponding Internet Assigned Numbers Authority (IANA) ID, given a valid Windows Time Zone ID. Multiple IANA IDs may be returned for a single Windows ID. It is possible to narrow these results by adding an optional territory parameter.
43
+ */
44
+ get(options: TimeZoneConvertWindowsTimezoneToIanaParameters): StreamableMethod<TimeZoneConvertWindowsTimezoneToIana200Response | TimeZoneConvertWindowsTimezoneToIanaDefaultResponse>;
45
+ }
46
+ export interface Routes {
47
+ /** Resource for '/timezone/byId/\{format\}' has methods for the following verbs: get */
48
+ (path: "/timezone/byId/{format}", format: "json"): GetTimeZoneByID;
49
+ /** Resource for '/timezone/byCoordinates/\{format\}' has methods for the following verbs: get */
50
+ (path: "/timezone/byCoordinates/{format}", format: "json"): GetTimeZoneByCoordinates;
51
+ /** Resource for '/timezone/enumWindows/\{format\}' has methods for the following verbs: get */
52
+ (path: "/timezone/enumWindows/{format}", format: "json"): GetWindowsTimezoneIds;
53
+ /** Resource for '/timezone/enumIana/\{format\}' has methods for the following verbs: get */
54
+ (path: "/timezone/enumIana/{format}", format: "json"): GetIanaTimezoneIds;
55
+ /** Resource for '/timezone/ianaVersion/\{format\}' has methods for the following verbs: get */
56
+ (path: "/timezone/ianaVersion/{format}", format: "json"): GetIanaVersion;
57
+ /** Resource for '/timezone/windowsToIana/\{format\}' has methods for the following verbs: get */
58
+ (path: "/timezone/windowsToIana/{format}", format: "json"): ConvertWindowsTimezoneToIana;
59
+ }
60
+ export type MapsTimeZoneClient = Client & {
61
+ path: Routes;
62
+ };
63
+ //# sourceMappingURL=clientDefinitions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clientDefinitions.d.ts","sourceRoot":"","sources":["../../../src/generated/clientDefinitions.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,iCAAiC,EACjC,0CAA0C,EAC1C,uCAAuC,EACvC,oCAAoC,EACpC,gCAAgC,EAChC,8CAA8C,EAC/C,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,kCAAkC,EAClC,sCAAsC,EACtC,2CAA2C,EAC3C,+CAA+C,EAC/C,wCAAwC,EACxC,4CAA4C,EAC5C,qCAAqC,EACrC,yCAAyC,EACzC,iCAAiC,EACjC,qCAAqC,EACrC,+CAA+C,EAC/C,mDAAmD,EACpD,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEnE,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,GAAG,CACD,OAAO,EAAE,iCAAiC,GACzC,gBAAgB,CACjB,kCAAkC,GAAG,sCAAsC,CAC5E,CAAC;CACH;AAED,MAAM,W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M,GACb,4BAA4B,CAAC;CACjC;AAED,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG;IACxC,IAAI,EAAE,MAAM,CAAC;CACd,CAAC"}
@@ -0,0 +1,4 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ export {};
4
+ //# sourceMappingURL=clientDefinitions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clientDefinitions.js","sourceRoot":"","sources":["../../../src/generated/clientDefinitions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n TimeZoneGetTimeZoneByIDParameters,\n TimeZoneGetTimeZoneByCoordinatesParameters,\n TimeZoneGetWindowsTimezoneIdsParameters,\n TimeZoneGetIanaTimezoneIdsParameters,\n TimeZoneGetIanaVersionParameters,\n TimeZoneConvertWindowsTimezoneToIanaParameters,\n} from \"./parameters.js\";\nimport {\n TimeZoneGetTimeZoneByID200Response,\n TimeZoneGetTimeZoneByIDDefaultResponse,\n TimeZoneGetTimeZoneByCoordinates200Response,\n TimeZoneGetTimeZoneByCoordinatesDefaultResponse,\n TimeZoneGetWindowsTimezoneIds200Response,\n TimeZoneGetWindowsTimezoneIdsDefaultResponse,\n TimeZoneGetIanaTimezoneIds200Response,\n TimeZoneGetIanaTimezoneIdsDefaultResponse,\n TimeZoneGetIanaVersion200Response,\n TimeZoneGetIanaVersionDefaultResponse,\n TimeZoneConvertWindowsTimezoneToIana200Response,\n TimeZoneConvertWindowsTimezoneToIanaDefaultResponse,\n} from \"./responses.js\";\nimport { Client, StreamableMethod } from \"@azure-rest/core-client\";\n\nexport interface GetTimeZoneByID {\n /**\n *\n * The `Get Timezone By ID` API is an HTTP `GET` request that returns current, historical, and future time zone information for the specified IANA time zone ID.\n */\n get(\n options: TimeZoneGetTimeZoneByIDParameters,\n ): StreamableMethod<\n TimeZoneGetTimeZoneByID200Response | TimeZoneGetTimeZoneByIDDefaultResponse\n >;\n}\n\nexport interface GetTimeZoneByCoordinates {\n /**\n *\n * The `Get Timezone By Coordinates` API is an HTTP `GET` request that returns current, historical, and future time zone information for a specified latitude-longitude pair. In addition, the API provides sunset and sunrise times for a given location, with the exception of regions that observe solar days.\n */\n get(\n options: TimeZoneGetTimeZoneByCoordinatesParameters,\n ): StreamableMethod<\n | TimeZoneGetTimeZoneByCoordinates200Response\n | TimeZoneGetTimeZoneByCoordinatesDefaultResponse\n >;\n}\n\nexport interface GetWindowsTimezoneIds {\n /**\n *\n * The `Get Windows Time Zones` API is an HTTP `GET` request that returns a full list of Windows Time Zone IDs.\n */\n get(\n options?: TimeZoneGetWindowsTimezoneIdsParameters,\n ): StreamableMethod<\n | TimeZoneGetWindowsTimezoneIds200Response\n | TimeZoneGetWindowsTimezoneIdsDefaultResponse\n >;\n}\n\nexport interface GetIanaTimezoneIds {\n /**\n *\n * The `Get IANA Time Zones` API is an HTTP `GET` request that returns a full list of Internet Assigned Numbers Authority (IANA) time zone IDs. Updates to the IANA service are reflected in the system within one day.\n */\n get(\n options?: TimeZoneGetIanaTimezoneIdsParameters,\n ): StreamableMethod<\n | TimeZoneGetIanaTimezoneIds200Response\n | TimeZoneGetIanaTimezoneIdsDefaultResponse\n >;\n}\n\nexport interface GetIanaVersion {\n /**\n *\n * The `Get Time Zone IANA Version` API is an HTTP `GET` request that returns the current Internet Assigned Numbers Authority (IANA) version number as Metadata.\n */\n get(\n options?: TimeZoneGetIanaVersionParameters,\n ): StreamableMethod<\n TimeZoneGetIanaVersion200Response | TimeZoneGetIanaVersionDefaultResponse\n >;\n}\n\nexport interface ConvertWindowsTimezoneToIana {\n /**\n *\n * The `Get Windows to IANA Time Zone` API is an HTTP `GET` request that returns a corresponding Internet Assigned Numbers Authority (IANA) ID, given a valid Windows Time Zone ID. Multiple IANA IDs may be returned for a single Windows ID. It is possible to narrow these results by adding an optional territory parameter.\n */\n get(\n options: TimeZoneConvertWindowsTimezoneToIanaParameters,\n ): StreamableMethod<\n | TimeZoneConvertWindowsTimezoneToIana200Response\n | TimeZoneConvertWindowsTimezoneToIanaDefaultResponse\n >;\n}\n\nexport interface Routes {\n /** Resource for '/timezone/byId/\\{format\\}' has methods for the following verbs: get */\n (path: \"/timezone/byId/{format}\", format: \"json\"): GetTimeZoneByID;\n /** Resource for '/timezone/byCoordinates/\\{format\\}' has methods for the following verbs: get */\n (\n path: \"/timezone/byCoordinates/{format}\",\n format: \"json\",\n ): GetTimeZoneByCoordinates;\n /** Resource for '/timezone/enumWindows/\\{format\\}' has methods for the following verbs: get */\n (\n path: \"/timezone/enumWindows/{format}\",\n format: \"json\",\n ): GetWindowsTimezoneIds;\n /** Resource for '/timezone/enumIana/\\{format\\}' has methods for the following verbs: get */\n (path: \"/timezone/enumIana/{format}\", format: \"json\"): GetIanaTimezoneIds;\n /** Resource for '/timezone/ianaVersion/\\{format\\}' has methods for the following verbs: get */\n (path: \"/timezone/ianaVersion/{format}\", format: \"json\"): GetIanaVersion;\n /** Resource for '/timezone/windowsToIana/\\{format\\}' has methods for the following verbs: get */\n (\n path: \"/timezone/windowsToIana/{format}\",\n format: \"json\",\n ): ConvertWindowsTimezoneToIana;\n}\n\nexport type MapsTimeZoneClient = Client & {\n path: Routes;\n};\n"]}
@@ -0,0 +1,9 @@
1
+ import MapsTimeZoneClient from "./mapsTimeZoneClient.js";
2
+ export * from "./mapsTimeZoneClient.js";
3
+ export * from "./parameters.js";
4
+ export * from "./responses.js";
5
+ export * from "./clientDefinitions.js";
6
+ export * from "./isUnexpected.js";
7
+ export * from "./outputModels.js";
8
+ export default MapsTimeZoneClient;
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generated/index.ts"],"names":[],"mappings":"AAGA,OAAO,kBAAkB,MAAM,yBAAyB,CAAC;AAEzD,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAElC,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,11 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ import MapsTimeZoneClient from "./mapsTimeZoneClient.js";
4
+ export * from "./mapsTimeZoneClient.js";
5
+ export * from "./parameters.js";
6
+ export * from "./responses.js";
7
+ export * from "./clientDefinitions.js";
8
+ export * from "./isUnexpected.js";
9
+ export * from "./outputModels.js";
10
+ export default MapsTimeZoneClient;
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/generated/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,kBAAkB,MAAM,yBAAyB,CAAC;AAEzD,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAElC,eAAe,kBAAkB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport MapsTimeZoneClient from \"./mapsTimeZoneClient.js\";\n\nexport * from \"./mapsTimeZoneClient.js\";\nexport * from \"./parameters.js\";\nexport * from \"./responses.js\";\nexport * from \"./clientDefinitions.js\";\nexport * from \"./isUnexpected.js\";\nexport * from \"./outputModels.js\";\n\nexport default MapsTimeZoneClient;\n"]}
@@ -0,0 +1,8 @@
1
+ import { TimeZoneGetTimeZoneByID200Response, TimeZoneGetTimeZoneByIDDefaultResponse, TimeZoneGetTimeZoneByCoordinates200Response, TimeZoneGetTimeZoneByCoordinatesDefaultResponse, TimeZoneGetWindowsTimezoneIds200Response, TimeZoneGetWindowsTimezoneIdsDefaultResponse, TimeZoneGetIanaTimezoneIds200Response, TimeZoneGetIanaTimezoneIdsDefaultResponse, TimeZoneGetIanaVersion200Response, TimeZoneGetIanaVersionDefaultResponse, TimeZoneConvertWindowsTimezoneToIana200Response, TimeZoneConvertWindowsTimezoneToIanaDefaultResponse } from "./responses.js";
2
+ export declare function isUnexpected(response: TimeZoneGetTimeZoneByID200Response | TimeZoneGetTimeZoneByIDDefaultResponse): response is TimeZoneGetTimeZoneByIDDefaultResponse;
3
+ export declare function isUnexpected(response: TimeZoneGetTimeZoneByCoordinates200Response | TimeZoneGetTimeZoneByCoordinatesDefaultResponse): response is TimeZoneGetTimeZoneByCoordinatesDefaultResponse;
4
+ export declare function isUnexpected(response: TimeZoneGetWindowsTimezoneIds200Response | TimeZoneGetWindowsTimezoneIdsDefaultResponse): response is TimeZoneGetWindowsTimezoneIdsDefaultResponse;
5
+ export declare function isUnexpected(response: TimeZoneGetIanaTimezoneIds200Response | TimeZoneGetIanaTimezoneIdsDefaultResponse): response is TimeZoneGetIanaTimezoneIdsDefaultResponse;
6
+ export declare function isUnexpected(response: TimeZoneGetIanaVersion200Response | TimeZoneGetIanaVersionDefaultResponse): response is TimeZoneGetIanaVersionDefaultResponse;
7
+ export declare function isUnexpected(response: TimeZoneConvertWindowsTimezoneToIana200Response | TimeZoneConvertWindowsTimezoneToIanaDefaultResponse): response is TimeZoneConvertWindowsTimezoneToIanaDefaultResponse;
8
+ //# sourceMappingURL=isUnexpected.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isUnexpected.d.ts","sourceRoot":"","sources":["../../../src/generated/isUnexpected.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,kCAAkC,EAClC,sCAAsC,EACtC,2CAA2C,EAC3C,+CAA+C,EAC/C,wCAAwC,EACxC,4CAA4C,EAC5C,qCAAqC,EACrC,yCAAyC,EACzC,iCAAiC,EACjC,qCAAqC,EACrC,+CAA+C,EAC/C,mDAAmD,EACpD,MAAM,gBAAgB,CAAC;AAWxB,wBAAgB,YAAY,CAC1B,QAAQ,EACJ,kCAAkC,GAClC,sCAAsC,GACzC,QAAQ,IAAI,sCAAsC,CAAC;AACtD,wBAAgB,YAAY,CAC1B,QAAQ,EACJ,2CAA2C,GAC3C,+CAA+C,GAClD,QAAQ,IAAI,+CAA+C,CAAC;AAC/D,wBAAgB,YAAY,CAC1B,QAAQ,EACJ,wCAAwC,GACxC,4CAA4C,GAC/C,QAAQ,IAAI,4CAA4C,CAAC;AAC5D,wBAAgB,YAAY,CAC1B,QAAQ,EACJ,qCAAqC,GACrC,yCAAyC,GAC5C,QAAQ,IAAI,yCAAyC,CAAC;AACzD,wBAAgB,YAAY,CAC1B,QAAQ,EACJ,iCAAiC,GACjC,qCAAqC,GACxC,QAAQ,IAAI,qCAAqC,CAAC;AACrD,wBAAgB,YAAY,CAC1B,QAAQ,EACJ,+CAA+C,GAC/C,mDAAmD,GACtD,QAAQ,IAAI,mDAAmD,CAAC"}
@@ -0,0 +1,76 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ const responseMap = {
4
+ "GET /timezone/byId/{format}": ["200"],
5
+ "GET /timezone/byCoordinates/{format}": ["200"],
6
+ "GET /timezone/enumWindows/{format}": ["200"],
7
+ "GET /timezone/enumIana/{format}": ["200"],
8
+ "GET /timezone/ianaVersion/{format}": ["200"],
9
+ "GET /timezone/windowsToIana/{format}": ["200"],
10
+ };
11
+ export function isUnexpected(response) {
12
+ const lroOriginal = response.headers["x-ms-original-url"];
13
+ const url = new URL(lroOriginal !== null && lroOriginal !== void 0 ? lroOriginal : response.request.url);
14
+ const method = response.request.method;
15
+ let pathDetails = responseMap[`${method} ${url.pathname}`];
16
+ if (!pathDetails) {
17
+ pathDetails = getParametrizedPathSuccess(method, url.pathname);
18
+ }
19
+ return !pathDetails.includes(response.status);
20
+ }
21
+ function getParametrizedPathSuccess(method, path) {
22
+ var _a, _b, _c, _d;
23
+ const pathParts = path.split("/");
24
+ // Traverse list to match the longest candidate
25
+ // matchedLen: the length of candidate path
26
+ // matchedValue: the matched status code array
27
+ let matchedLen = -1, matchedValue = [];
28
+ // Iterate the responseMap to find a match
29
+ for (const [key, value] of Object.entries(responseMap)) {
30
+ // Extracting the path from the map key which is in format
31
+ // GET /path/foo
32
+ if (!key.startsWith(method)) {
33
+ continue;
34
+ }
35
+ const candidatePath = getPathFromMapKey(key);
36
+ // Get each part of the url path
37
+ const candidateParts = candidatePath.split("/");
38
+ // track if we have found a match to return the values found.
39
+ let found = true;
40
+ for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {
41
+ if (((_a = candidateParts[i]) === null || _a === void 0 ? void 0 : _a.startsWith("{")) &&
42
+ ((_b = candidateParts[i]) === null || _b === void 0 ? void 0 : _b.indexOf("}")) !== -1) {
43
+ const start = candidateParts[i].indexOf("}") + 1, end = (_c = candidateParts[i]) === null || _c === void 0 ? void 0 : _c.length;
44
+ // If the current part of the candidate is a "template" part
45
+ // Try to use the suffix of pattern to match the path
46
+ // {guid} ==> $
47
+ // {guid}:export ==> :export$
48
+ const isMatched = new RegExp(`${(_d = candidateParts[i]) === null || _d === void 0 ? void 0 : _d.slice(start, end)}`).test(pathParts[j] || "");
49
+ if (!isMatched) {
50
+ found = false;
51
+ break;
52
+ }
53
+ continue;
54
+ }
55
+ // If the candidate part is not a template and
56
+ // the parts don't match mark the candidate as not found
57
+ // to move on with the next candidate path.
58
+ if (candidateParts[i] !== pathParts[j]) {
59
+ found = false;
60
+ break;
61
+ }
62
+ }
63
+ // We finished evaluating the current candidate parts
64
+ // Update the matched value if and only if we found the longer pattern
65
+ if (found && candidatePath.length > matchedLen) {
66
+ matchedLen = candidatePath.length;
67
+ matchedValue = value;
68
+ }
69
+ }
70
+ return matchedValue;
71
+ }
72
+ function getPathFromMapKey(mapKey) {
73
+ const pathStart = mapKey.indexOf("/");
74
+ return mapKey.slice(pathStart);
75
+ }
76
+ //# sourceMappingURL=isUnexpected.js.map
@@ -0,0 +1 @@
1
+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AS,EAAE,CAAC;oBACf,KAAK,GAAG,KAAK,CAAC;oBACd,MAAM;gBACR,CAAC;gBACD,SAAS;YACX,CAAC;YAED,8CAA8C;YAC9C,wDAAwD;YACxD,2CAA2C;YAC3C,IAAI,cAAc,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;gBACvC,KAAK,GAAG,KAAK,CAAC;gBACd,MAAM;YACR,CAAC;QACH,CAAC;QAED,qDAAqD;QACrD,sEAAsE;QACtE,IAAI,KAAK,IAAI,aAAa,CAAC,MAAM,GAAG,UAAU,EAAE,CAAC;YAC/C,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC;YAClC,YAAY,GAAG,KAAK,CAAC;QACvB,CAAC;IACH,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,SAAS,iBAAiB,CAAC,MAAc;IACvC,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACtC,OAAO,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n TimeZoneGetTimeZoneByID200Response,\n TimeZoneGetTimeZoneByIDDefaultResponse,\n TimeZoneGetTimeZoneByCoordinates200Response,\n TimeZoneGetTimeZoneByCoordinatesDefaultResponse,\n TimeZoneGetWindowsTimezoneIds200Response,\n TimeZoneGetWindowsTimezoneIdsDefaultResponse,\n TimeZoneGetIanaTimezoneIds200Response,\n TimeZoneGetIanaTimezoneIdsDefaultResponse,\n TimeZoneGetIanaVersion200Response,\n TimeZoneGetIanaVersionDefaultResponse,\n TimeZoneConvertWindowsTimezoneToIana200Response,\n TimeZoneConvertWindowsTimezoneToIanaDefaultResponse,\n} from \"./responses.js\";\n\nconst responseMap: Record<string, string[]> = {\n \"GET /timezone/byId/{format}\": [\"200\"],\n \"GET /timezone/byCoordinates/{format}\": [\"200\"],\n \"GET /timezone/enumWindows/{format}\": [\"200\"],\n \"GET /timezone/enumIana/{format}\": [\"200\"],\n \"GET /timezone/ianaVersion/{format}\": [\"200\"],\n \"GET /timezone/windowsToIana/{format}\": [\"200\"],\n};\n\nexport function isUnexpected(\n response:\n | TimeZoneGetTimeZoneByID200Response\n | TimeZoneGetTimeZoneByIDDefaultResponse,\n): response is TimeZoneGetTimeZoneByIDDefaultResponse;\nexport function isUnexpected(\n response:\n | TimeZoneGetTimeZoneByCoordinates200Response\n | TimeZoneGetTimeZoneByCoordinatesDefaultResponse,\n): response is TimeZoneGetTimeZoneByCoordinatesDefaultResponse;\nexport function isUnexpected(\n response:\n | TimeZoneGetWindowsTimezoneIds200Response\n | TimeZoneGetWindowsTimezoneIdsDefaultResponse,\n): response is TimeZoneGetWindowsTimezoneIdsDefaultResponse;\nexport function isUnexpected(\n response:\n | TimeZoneGetIanaTimezoneIds200Response\n | TimeZoneGetIanaTimezoneIdsDefaultResponse,\n): response is TimeZoneGetIanaTimezoneIdsDefaultResponse;\nexport function isUnexpected(\n response:\n | TimeZoneGetIanaVersion200Response\n | TimeZoneGetIanaVersionDefaultResponse,\n): response is TimeZoneGetIanaVersionDefaultResponse;\nexport function isUnexpected(\n response:\n | TimeZoneConvertWindowsTimezoneToIana200Response\n | TimeZoneConvertWindowsTimezoneToIanaDefaultResponse,\n): response is TimeZoneConvertWindowsTimezoneToIanaDefaultResponse;\nexport function isUnexpected(\n response:\n | TimeZoneGetTimeZoneByID200Response\n | TimeZoneGetTimeZoneByIDDefaultResponse\n | TimeZoneGetTimeZoneByCoordinates200Response\n | TimeZoneGetTimeZoneByCoordinatesDefaultResponse\n | TimeZoneGetWindowsTimezoneIds200Response\n | TimeZoneGetWindowsTimezoneIdsDefaultResponse\n | TimeZoneGetIanaTimezoneIds200Response\n | TimeZoneGetIanaTimezoneIdsDefaultResponse\n | TimeZoneGetIanaVersion200Response\n | TimeZoneGetIanaVersionDefaultResponse\n | TimeZoneConvertWindowsTimezoneToIana200Response\n | TimeZoneConvertWindowsTimezoneToIanaDefaultResponse,\n): response is\n | TimeZoneGetTimeZoneByIDDefaultResponse\n | TimeZoneGetTimeZoneByCoordinatesDefaultResponse\n | TimeZoneGetWindowsTimezoneIdsDefaultResponse\n | TimeZoneGetIanaTimezoneIdsDefaultResponse\n | TimeZoneGetIanaVersionDefaultResponse\n | TimeZoneConvertWindowsTimezoneToIanaDefaultResponse {\n const lroOriginal = response.headers[\"x-ms-original-url\"];\n const url = new URL(lroOriginal ?? response.request.url);\n const method = response.request.method;\n let pathDetails = responseMap[`${method} ${url.pathname}`];\n if (!pathDetails) {\n pathDetails = getParametrizedPathSuccess(method, url.pathname);\n }\n return !pathDetails.includes(response.status);\n}\n\nfunction getParametrizedPathSuccess(method: string, path: string): string[] {\n const pathParts = path.split(\"/\");\n\n // Traverse list to match the longest candidate\n // matchedLen: the length of candidate path\n // matchedValue: the matched status code array\n let matchedLen = -1,\n matchedValue: string[] = [];\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(responseMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // track if we have found a match to return the values found.\n let found = true;\n for (\n let i = candidateParts.length - 1, j = pathParts.length - 1;\n i >= 1 && j >= 1;\n i--, j--\n ) {\n if (\n candidateParts[i]?.startsWith(\"{\") &&\n candidateParts[i]?.indexOf(\"}\") !== -1\n ) {\n const start = candidateParts[i]!.indexOf(\"}\") + 1,\n end = candidateParts[i]?.length;\n // If the current part of the candidate is a \"template\" part\n // Try to use the suffix of pattern to match the path\n // {guid} ==> $\n // {guid}:export ==> :export$\n const isMatched = new RegExp(\n `${candidateParts[i]?.slice(start, end)}`,\n ).test(pathParts[j] || \"\");\n\n if (!isMatched) {\n found = false;\n break;\n }\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[j]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // Update the matched value if and only if we found the longer pattern\n if (found && candidatePath.length > matchedLen) {\n matchedLen = candidatePath.length;\n matchedValue = value;\n }\n }\n\n return matchedValue;\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export declare const logger: import("@azure/logger").AzureLogger;
2
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/generated/logger.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM,qCAAsC,CAAC"}
@@ -0,0 +1,5 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ import { createClientLogger } from "@azure/logger";
4
+ export const logger = createClientLogger("maps-timezone");
5
+ //# sourceMappingURL=logger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../src/generated/logger.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,MAAM,CAAC,MAAM,MAAM,GAAG,kBAAkB,CAAC,eAAe,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createClientLogger } from \"@azure/logger\";\nexport const logger = createClientLogger(\"maps-timezone\");\n"]}
@@ -0,0 +1,15 @@
1
+ import { ClientOptions } from "@azure-rest/core-client";
2
+ import { KeyCredential } from "@azure/core-auth";
3
+ import { MapsTimeZoneClient } from "./clientDefinitions.js";
4
+ /** The optional parameters for the client */
5
+ export interface MapsTimeZoneClientOptions extends ClientOptions {
6
+ /** The api version option of the client */
7
+ apiVersion?: string;
8
+ }
9
+ /**
10
+ * Initialize a new instance of `MapsTimeZoneClient`
11
+ * @param credentials - uniquely identify client credential
12
+ * @param options - the parameter for all optional parameters
13
+ */
14
+ export default function createClient(credentials: KeyCredential, { apiVersion, ...options }?: MapsTimeZoneClientOptions): MapsTimeZoneClient;
15
+ //# sourceMappingURL=mapsTimeZoneClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mapsTimeZoneClient.d.ts","sourceRoot":"","sources":["../../../src/generated/mapsTimeZoneClient.ts"],"names":[],"mappings":"AAGA,OAAO,EAAa,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAEnE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,6CAA6C;AAC7C,MAAM,WAAW,yBAA0B,SAAQ,aAAa;IAC9D,2CAA2C;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,WAAW,EAAE,aAAa,EAC1B,EAAE,UAAkB,EAAE,GAAG,OAAO,EAAE,GAAE,yBAA8B,GACjE,kBAAkB,CA6CpB"}
@@ -0,0 +1,42 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ import { __rest } from "tslib";
4
+ import { getClient } from "@azure-rest/core-client";
5
+ import { logger } from "./logger.js";
6
+ /**
7
+ * Initialize a new instance of `MapsTimeZoneClient`
8
+ * @param credentials - uniquely identify client credential
9
+ * @param options - the parameter for all optional parameters
10
+ */
11
+ export default function createClient(credentials, _a = {}) {
12
+ var _b, _c, _d, _e, _f, _g;
13
+ var { apiVersion = "1.0" } = _a, options = __rest(_a, ["apiVersion"]);
14
+ const endpointUrl = (_c = (_b = options.endpoint) !== null && _b !== void 0 ? _b : options.baseUrl) !== null && _c !== void 0 ? _c : `https://atlas.microsoft.com`;
15
+ const userAgentInfo = `azsdk-js-maps-timezone-rest/1.0.0-beta.1`;
16
+ const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
17
+ ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`
18
+ : `${userAgentInfo}`;
19
+ options = Object.assign(Object.assign({}, options), { userAgentOptions: {
20
+ userAgentPrefix,
21
+ }, loggingOptions: {
22
+ logger: (_e = (_d = options.loggingOptions) === null || _d === void 0 ? void 0 : _d.logger) !== null && _e !== void 0 ? _e : logger.info,
23
+ }, credentials: {
24
+ apiKeyHeaderName: (_g = (_f = options.credentials) === null || _f === void 0 ? void 0 : _f.apiKeyHeaderName) !== null && _g !== void 0 ? _g : "subscription-key",
25
+ } });
26
+ const client = getClient(endpointUrl, credentials, options);
27
+ client.pipeline.removePolicy({ name: "ApiVersionPolicy" });
28
+ client.pipeline.addPolicy({
29
+ name: "ClientApiVersionPolicy",
30
+ sendRequest: (req, next) => {
31
+ // Use the apiVersion defined in request url directly
32
+ // Append one if there is no apiVersion and we have one at client options
33
+ const url = new URL(req.url);
34
+ if (!url.searchParams.get("api-version") && apiVersion) {
35
+ req.url = `${req.url}${Array.from(url.searchParams.keys()).length > 0 ? "&" : "?"}api-version=${apiVersion}`;
36
+ }
37
+ return next(req);
38
+ },
39
+ });
40
+ return client;
41
+ }
42
+ //# sourceMappingURL=mapsTimeZoneClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mapsTimeZoneClient.js","sourceRoot":"","sources":["../../../src/generated/mapsTimeZoneClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAElC,OAAO,EAAE,SAAS,EAAiB,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAUrC;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,WAA0B,EAC1B,KAAgE,EAAE;;QAAlE,EAAE,UAAU,GAAG,KAAK,OAA8C,EAAzC,OAAO,cAAhC,cAAkC,CAAF;IAEhC,MAAM,WAAW,GACf,MAA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C,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GACzD,eAAe,UAAU,EAAE,CAAC;YAC9B,CAAC;YAED,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;KACF,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { getClient, ClientOptions } from \"@azure-rest/core-client\";\nimport { logger } from \"./logger.js\";\nimport { KeyCredential } from \"@azure/core-auth\";\nimport { MapsTimeZoneClient } from \"./clientDefinitions.js\";\n\n/** The optional parameters for the client */\nexport interface MapsTimeZoneClientOptions extends ClientOptions {\n /** The api version option of the client */\n apiVersion?: string;\n}\n\n/**\n * Initialize a new instance of `MapsTimeZoneClient`\n * @param credentials - uniquely identify client credential\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n credentials: KeyCredential,\n { apiVersion = \"1.0\", ...options }: MapsTimeZoneClientOptions = {},\n): MapsTimeZoneClient {\n const endpointUrl =\n options.endpoint ?? options.baseUrl ?? `https://atlas.microsoft.com`;\n const userAgentInfo = `azsdk-js-maps-timezone-rest/1.0.0-beta.1`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`\n : `${userAgentInfo}`;\n options = {\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n loggingOptions: {\n logger: options.loggingOptions?.logger ?? logger.info,\n },\n credentials: {\n apiKeyHeaderName:\n options.credentials?.apiKeyHeaderName ?? \"subscription-key\",\n },\n };\n const client = getClient(\n endpointUrl,\n credentials,\n options,\n ) as MapsTimeZoneClient;\n\n client.pipeline.removePolicy({ name: \"ApiVersionPolicy\" });\n client.pipeline.addPolicy({\n name: \"ClientApiVersionPolicy\",\n sendRequest: (req, next) => {\n // Use the apiVersion defined in request url directly\n // Append one if there is no apiVersion and we have one at client options\n const url = new URL(req.url);\n if (!url.searchParams.get(\"api-version\") && apiVersion) {\n req.url = `${req.url}${\n Array.from(url.searchParams.keys()).length > 0 ? \"&\" : \"?\"\n }api-version=${apiVersion}`;\n }\n\n return next(req);\n },\n });\n\n return client;\n}\n"]}