@osdk/client 2.0.10 → 2.0.11

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 (34) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/build/browser/Client.d.ts +1 -1
  3. package/build/browser/Client.js +1 -1
  4. package/build/browser/Client.js.map +1 -1
  5. package/build/browser/index.d.ts +1 -0
  6. package/build/browser/index.d.ts.map +1 -1
  7. package/build/browser/index.js +1 -0
  8. package/build/browser/index.js.map +1 -1
  9. package/build/browser/util/UserAgent.js +1 -1
  10. package/build/browser/util/datetimeConverters.d.ts +22 -0
  11. package/build/browser/util/datetimeConverters.d.ts.map +1 -0
  12. package/build/browser/util/datetimeConverters.js +55 -0
  13. package/build/browser/util/datetimeConverters.js.map +1 -0
  14. package/build/browser/util/datetimeConverters.test.d.ts +2 -0
  15. package/build/browser/util/datetimeConverters.test.d.ts.map +1 -0
  16. package/build/browser/util/datetimeConverters.test.js +75 -0
  17. package/build/browser/util/datetimeConverters.test.js.map +1 -0
  18. package/build/esm/Client.d.ts +1 -1
  19. package/build/esm/Client.js +1 -1
  20. package/build/esm/Client.js.map +1 -1
  21. package/build/esm/index.d.ts +1 -0
  22. package/build/esm/index.d.ts.map +1 -1
  23. package/build/esm/index.js +1 -0
  24. package/build/esm/index.js.map +1 -1
  25. package/build/esm/util/UserAgent.js +1 -1
  26. package/build/esm/util/datetimeConverters.d.ts +22 -0
  27. package/build/esm/util/datetimeConverters.d.ts.map +1 -0
  28. package/build/esm/util/datetimeConverters.js +55 -0
  29. package/build/esm/util/datetimeConverters.js.map +1 -0
  30. package/build/esm/util/datetimeConverters.test.d.ts +2 -0
  31. package/build/esm/util/datetimeConverters.test.d.ts.map +1 -0
  32. package/build/esm/util/datetimeConverters.test.js +75 -0
  33. package/build/esm/util/datetimeConverters.test.js.map +1 -0
  34. package/package.json +9 -8
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @osdk/client
2
2
 
3
+ ## 2.0.11
4
+
5
+ ### Patch Changes
6
+
7
+ - c0b8206: Adds methods to extract date strings from Dates and ISO-8601 strings
8
+ - @osdk/api@2.0.11
9
+ - @osdk/client.unstable@2.0.11
10
+ - @osdk/generator-converters@2.0.11
11
+
3
12
  ## 2.0.10
4
13
 
5
14
  ### Patch Changes
@@ -19,7 +19,7 @@ export interface Client extends SharedClient, OldSharedClient {
19
19
  [additionalContext]: MinimalClient;
20
20
  }
21
21
  export declare const additionalContext: unique symbol;
22
- declare const MaxOsdkVersion = "2.0.10";
22
+ declare const MaxOsdkVersion = "2.0.11";
23
23
  export type MaxOsdkVersion = typeof MaxOsdkVersion;
24
24
  declare const ErrorMessage: unique symbol;
25
25
  export {};
@@ -16,6 +16,6 @@
16
16
  // DO NOT EXPORT FROM PACKAGE
17
17
  export const additionalContext = Symbol("additionalContext");
18
18
  // BEGIN: THIS IS GENERATED CODE. DO NOT EDIT.
19
- const MaxOsdkVersion = "2.0.10";
19
+ const MaxOsdkVersion = "2.0.11";
20
20
  const ErrorMessage = Symbol("ErrorMessage");
21
21
  //# sourceMappingURL=Client.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Client.js","names":["additionalContext","Symbol","MaxOsdkVersion","ErrorMessage"],"sources":["Client.js"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// DO NOT EXPORT FROM PACKAGE\nexport const additionalContext = Symbol(\"additionalContext\");\n// BEGIN: THIS IS GENERATED CODE. DO NOT EDIT.\nconst MaxOsdkVersion = \"2.0.10\";\nconst ErrorMessage = Symbol(\"ErrorMessage\");\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,iBAAiB,GAAGC,MAAM,CAAC,mBAAmB,CAAC;AAC5D;AACA,MAAMC,cAAc,GAAG,QAAQ;AAC/B,MAAMC,YAAY,GAAGF,MAAM,CAAC,cAAc,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"Client.js","names":["additionalContext","Symbol","MaxOsdkVersion","ErrorMessage"],"sources":["Client.js"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// DO NOT EXPORT FROM PACKAGE\nexport const additionalContext = Symbol(\"additionalContext\");\n// BEGIN: THIS IS GENERATED CODE. DO NOT EDIT.\nconst MaxOsdkVersion = \"2.0.11\";\nconst ErrorMessage = Symbol(\"ErrorMessage\");\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,iBAAiB,GAAGC,MAAM,CAAC,mBAAmB,CAAC;AAC5D;AACA,MAAMC,cAAc,GAAG,QAAQ;AAC/B,MAAMC,YAAY,GAAGF,MAAM,CAAC,cAAc,CAAC","ignoreList":[]}
@@ -9,4 +9,5 @@ export type { PlatformClient } from "./createPlatformClient.js";
9
9
  export type { Logger } from "./Logger.js";
10
10
  export { createAttachmentUpload } from "./object/AttachmentUpload.js";
11
11
  export type { ResultOrError } from "./ResultOrError.js";
12
+ export { extractDate, extractDateInLocalTime, extractDateInUTC, } from "./util/datetimeConverters.js";
12
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAgBA,YAAY,EACV,kBAAkB,EAClB,0BAA0B,EAC1B,wBAAwB,EACxB,kBAAkB,EAClB,uBAAuB,EACvB,SAAS,EACT,IAAI,EACJ,UAAU,EACV,UAAU,EACV,MAAM,EACN,WAAW,GACZ,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,YAAY,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,YAAY,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,YAAY,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAgBA,YAAY,EACV,kBAAkB,EAClB,0BAA0B,EAC1B,wBAAwB,EACxB,kBAAkB,EAClB,uBAAuB,EACvB,SAAS,EACT,IAAI,EACJ,UAAU,EACV,UAAU,EACV,MAAM,EACN,WAAW,GACZ,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,YAAY,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,YAAY,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,YAAY,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,OAAO,EACL,WAAW,EACX,sBAAsB,EACtB,gBAAgB,GACjB,MAAM,8BAA8B,CAAC"}
@@ -19,4 +19,5 @@ export { ActionValidationError } from "./actions/ActionValidationError.js";
19
19
  export { createClient } from "./createClient.js";
20
20
  export { createPlatformClient } from "./createPlatformClient.js";
21
21
  export { createAttachmentUpload } from "./object/AttachmentUpload.js";
22
+ export { extractDate, extractDateInLocalTime, extractDateInUTC } from "./util/datetimeConverters.js";
22
23
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["isOk","PalantirApiError","ActionValidationError","createClient","createPlatformClient","createAttachmentUpload"],"sources":["index.js"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport { isOk } from \"@osdk/api\";\nexport { PalantirApiError } from \"@osdk/shared.net.errors\";\nexport { ActionValidationError } from \"./actions/ActionValidationError.js\";\nexport { createClient } from \"./createClient.js\";\nexport { createPlatformClient } from \"./createPlatformClient.js\";\nexport { createAttachmentUpload } from \"./object/AttachmentUpload.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,IAAI,QAAQ,WAAW;AAChC,SAASC,gBAAgB,QAAQ,yBAAyB;AAC1D,SAASC,qBAAqB,QAAQ,oCAAoC;AAC1E,SAASC,YAAY,QAAQ,mBAAmB;AAChD,SAASC,oBAAoB,QAAQ,2BAA2B;AAChE,SAASC,sBAAsB,QAAQ,8BAA8B","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["isOk","PalantirApiError","ActionValidationError","createClient","createPlatformClient","createAttachmentUpload","extractDate","extractDateInLocalTime","extractDateInUTC"],"sources":["index.js"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport { isOk } from \"@osdk/api\";\nexport { PalantirApiError } from \"@osdk/shared.net.errors\";\nexport { ActionValidationError } from \"./actions/ActionValidationError.js\";\nexport { createClient } from \"./createClient.js\";\nexport { createPlatformClient } from \"./createPlatformClient.js\";\nexport { createAttachmentUpload } from \"./object/AttachmentUpload.js\";\nexport { extractDate, extractDateInLocalTime, extractDateInUTC, } from \"./util/datetimeConverters.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,IAAI,QAAQ,WAAW;AAChC,SAASC,gBAAgB,QAAQ,yBAAyB;AAC1D,SAASC,qBAAqB,QAAQ,oCAAoC;AAC1E,SAASC,YAAY,QAAQ,mBAAmB;AAChD,SAASC,oBAAoB,QAAQ,2BAA2B;AAChE,SAASC,sBAAsB,QAAQ,8BAA8B;AACrE,SAASC,WAAW,EAAEC,sBAAsB,EAAEC,gBAAgB,QAAS,8BAA8B","ignoreList":[]}
@@ -13,5 +13,5 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- export const USER_AGENT = `osdk-client/${"2.0.10"}`;
16
+ export const USER_AGENT = `osdk-client/${"2.0.11"}`;
17
17
  //# sourceMappingURL=UserAgent.js.map
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Extracts the date from a ISO 8601 formatted date time string. Throws if the input is not in the correct format.
3
+ *
4
+ * @param dateTime An ISO 8601 formatted date time string
5
+ * @returns The date part of the input string
6
+ */
7
+ export declare const extractDate: (dateTime: string) => string;
8
+ /**
9
+ * Generates a string representation of the input date (YYYY-MM-DD). The resulting date string reflects the given date in UTC time.
10
+ *
11
+ * @param date
12
+ * @returns The date part of a ISO 8601 formatted date time string
13
+ */
14
+ export declare const extractDateInUTC: (date: Date) => string;
15
+ /**
16
+ * Generates a string representation of the input date (YYYY-MM-DD). The resulting date string reflects the given date in the local time zone.
17
+ *
18
+ * @param date
19
+ * @returns The date part of a ISO 8601 formatted date time string
20
+ */
21
+ export declare const extractDateInLocalTime: (date: Date) => string;
22
+ //# sourceMappingURL=datetimeConverters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datetimeConverters.d.ts","sourceRoot":"","sources":["../../../src/util/datetimeConverters.ts"],"names":[],"mappings":"AAqBA;;;;;GAKG;AACH,eAAO,MAAM,WAAW,aAAc,MAAM,WAU3C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,SAAU,IAAI,WAE1C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,SAAU,IAAI,WAEhD,CAAC"}
@@ -0,0 +1,55 @@
1
+ /*
2
+ * Copyright 2024 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import invariant from "tiny-invariant";
17
+ const isoRegex = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?$/;
18
+ /**
19
+ * Extracts the date from a ISO 8601 formatted date time string. Throws if the input is not in the correct format.
20
+ *
21
+ * @param dateTime An ISO 8601 formatted date time string
22
+ * @returns The date part of the input string
23
+ */
24
+ export const extractDate = dateTime => {
25
+ !(dateTime.length < 33) ? process.env.NODE_ENV !== "production" ? invariant(false, "Invalid date format. Provided input is too long.") : invariant(false) : void 0;
26
+ !isoRegex.test(dateTime) ? process.env.NODE_ENV !== "production" ? invariant(false, `Invalid date format. Expected ISO 8601 format, but received ${dateTime}`) : invariant(false) : void 0;
27
+ return extractDateFromIsoString(dateTime);
28
+ };
29
+ /**
30
+ * Generates a string representation of the input date (YYYY-MM-DD). The resulting date string reflects the given date in UTC time.
31
+ *
32
+ * @param date
33
+ * @returns The date part of a ISO 8601 formatted date time string
34
+ */
35
+ export const extractDateInUTC = date => {
36
+ return extractDateFromIsoString(date.toISOString());
37
+ };
38
+ /**
39
+ * Generates a string representation of the input date (YYYY-MM-DD). The resulting date string reflects the given date in the local time zone.
40
+ *
41
+ * @param date
42
+ * @returns The date part of a ISO 8601 formatted date time string
43
+ */
44
+ export const extractDateInLocalTime = date => {
45
+ return extractDateFromIsoString(generateOffsetUtcString(date));
46
+ };
47
+ /** @internal */
48
+ export const generateOffsetUtcString = date => {
49
+ const offsetMs = date.getTimezoneOffset() * 60 * 1000;
50
+ return new Date(date.getTime() - offsetMs).toISOString();
51
+ };
52
+ const extractDateFromIsoString = dateTime => {
53
+ return dateTime.split("T")[0];
54
+ };
55
+ //# sourceMappingURL=datetimeConverters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datetimeConverters.js","names":["invariant","isoRegex","extractDate","dateTime","length","process","env","NODE_ENV","test","extractDateFromIsoString","extractDateInUTC","date","toISOString","extractDateInLocalTime","generateOffsetUtcString","offsetMs","getTimezoneOffset","Date","getTime","split"],"sources":["datetimeConverters.js"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport invariant from \"tiny-invariant\";\nconst isoRegex = /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[+-]\\d{2}:\\d{2})?$/;\n/**\n * Extracts the date from a ISO 8601 formatted date time string. Throws if the input is not in the correct format.\n *\n * @param dateTime An ISO 8601 formatted date time string\n * @returns The date part of the input string\n */\nexport const extractDate = (dateTime) => {\n invariant(dateTime.length < 33, \"Invalid date format. Provided input is too long.\");\n invariant(isoRegex.test(dateTime), `Invalid date format. Expected ISO 8601 format, but received ${dateTime}`);\n return extractDateFromIsoString(dateTime);\n};\n/**\n * Generates a string representation of the input date (YYYY-MM-DD). The resulting date string reflects the given date in UTC time.\n *\n * @param date\n * @returns The date part of a ISO 8601 formatted date time string\n */\nexport const extractDateInUTC = (date) => {\n return extractDateFromIsoString(date.toISOString());\n};\n/**\n * Generates a string representation of the input date (YYYY-MM-DD). The resulting date string reflects the given date in the local time zone.\n *\n * @param date\n * @returns The date part of a ISO 8601 formatted date time string\n */\nexport const extractDateInLocalTime = (date) => {\n return extractDateFromIsoString(generateOffsetUtcString(date));\n};\n/** @internal */\nexport const generateOffsetUtcString = (date) => {\n const offsetMs = date.getTimezoneOffset() * 60 * 1000;\n return new Date(date.getTime() - offsetMs).toISOString();\n};\nconst extractDateFromIsoString = (dateTime) => {\n return dateTime.split(\"T\")[0];\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAOA,SAAS,MAAM,gBAAgB;AACtC,MAAMC,QAAQ,GAAG,uEAAuE;AACxF;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,WAAW,GAAIC,QAAQ,IAAK;EACrC,EAAUA,QAAQ,CAACC,MAAM,GAAG,EAAE,IAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAA9BP,SAAS,QAAuB,kDAAkD,IAAlFA,SAAS;EACT,CAAUC,QAAQ,CAACO,IAAI,CAACL,QAAQ,CAAC,GAAAE,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAjCP,SAAS,QAA0B,+DAA+DG,QAAQ,EAAE,IAA5GH,SAAS;EACT,OAAOS,wBAAwB,CAACN,QAAQ,CAAC;AAC7C,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMO,gBAAgB,GAAIC,IAAI,IAAK;EACtC,OAAOF,wBAAwB,CAACE,IAAI,CAACC,WAAW,CAAC,CAAC,CAAC;AACvD,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,sBAAsB,GAAIF,IAAI,IAAK;EAC5C,OAAOF,wBAAwB,CAACK,uBAAuB,CAACH,IAAI,CAAC,CAAC;AAClE,CAAC;AACD;AACA,OAAO,MAAMG,uBAAuB,GAAIH,IAAI,IAAK;EAC7C,MAAMI,QAAQ,GAAGJ,IAAI,CAACK,iBAAiB,CAAC,CAAC,GAAG,EAAE,GAAG,IAAI;EACrD,OAAO,IAAIC,IAAI,CAACN,IAAI,CAACO,OAAO,CAAC,CAAC,GAAGH,QAAQ,CAAC,CAACH,WAAW,CAAC,CAAC;AAC5D,CAAC;AACD,MAAMH,wBAAwB,GAAIN,QAAQ,IAAK;EAC3C,OAAOA,QAAQ,CAACgB,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACjC,CAAC","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=datetimeConverters.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datetimeConverters.test.d.ts","sourceRoot":"","sources":["../../../src/util/datetimeConverters.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,75 @@
1
+ /*
2
+ * Copyright 2023 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { register, unregister } from "timezone-mock";
17
+ import { afterAll, beforeAll, describe, expect, it } from "vitest";
18
+ import { extractDate, extractDateInLocalTime, extractDateInUTC, generateOffsetUtcString } from "./datetimeConverters.js";
19
+ describe("test datetime converters", () => {
20
+ beforeAll(() => {
21
+ register("Etc/GMT+5");
22
+ });
23
+ afterAll(() => {
24
+ unregister();
25
+ });
26
+ describe("test extractDate", () => {
27
+ it("should error if the date is not in UTC format", () => {
28
+ expect(() => extractDate("2021-01-01")).toThrowError("Invariant failed: Invalid date format. Expected ISO 8601 format, but received 2021-01-01");
29
+ expect(() => extractDate("2021-01-01T00:0000.000Z")).toThrowError("Invariant failed: Invalid date format. Expected ISO 8601 format, but received 2021-01-01");
30
+ });
31
+ it("should return the date part of the input string", () => {
32
+ const result = extractDate("2021-01-01T00:00:00.000Z");
33
+ expect(result).toBe("2021-01-01");
34
+ });
35
+ });
36
+ describe("test extractDateInUTC", () => {
37
+ it("should return the date in UTC given Date constructed with UTC time", () => {
38
+ const date = new Date("2021-01-01T00:00:00.000Z");
39
+ expect(date.getDate()).toBe(31);
40
+ expect(date.getUTCDate()).toBe(1);
41
+ const result = extractDateInUTC(date);
42
+ expect(result).toBe("2021-01-01");
43
+ });
44
+ it("should return the date in UTC given Date constructed with a local time", () => {
45
+ const date = new Date("2020-12-31T23:00:00.000");
46
+ expect(date.getDate()).toBe(31);
47
+ expect(date.getUTCDate()).toBe(1);
48
+ const result = extractDateInUTC(date);
49
+ expect(result).toBe("2021-01-01");
50
+ });
51
+ });
52
+ describe("test extractDateInLocalTime", () => {
53
+ it("should return the date in local time given Date constructed with local time", () => {
54
+ const date = new Date("2020-12-31T23:00:00.000");
55
+ expect(date.getDate()).toBe(31);
56
+ const result = extractDateInLocalTime(date);
57
+ expect(result).toBe("2020-12-31");
58
+ });
59
+ describe("test generating ISO String", () => {
60
+ it("should return a correct ISO 8601 string that is offset correctly", () => {
61
+ const date = new Date("2021-01-01T00:00:00.000Z");
62
+ expect(date.getDate()).toBe(31);
63
+ const result = generateOffsetUtcString(date);
64
+ expect(result).toBe("2020-12-31T19:00:00.000Z");
65
+ });
66
+ });
67
+ it("should return the date in local time given Date constructed with UTC time", () => {
68
+ const date = new Date("2021-01-01T00:00:00.000Z");
69
+ expect(date.getDate()).toBe(31);
70
+ const result = extractDateInLocalTime(date);
71
+ expect(result).toBe("2020-12-31");
72
+ });
73
+ });
74
+ });
75
+ //# sourceMappingURL=datetimeConverters.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datetimeConverters.test.js","names":["register","unregister","afterAll","beforeAll","describe","expect","it","extractDate","extractDateInLocalTime","extractDateInUTC","generateOffsetUtcString","toThrowError","result","toBe","date","Date","getDate","getUTCDate"],"sources":["datetimeConverters.test.js"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { register, unregister } from \"timezone-mock\";\nimport { afterAll, beforeAll, describe, expect, it, } from \"vitest\";\nimport { extractDate, extractDateInLocalTime, extractDateInUTC, generateOffsetUtcString, } from \"./datetimeConverters.js\";\ndescribe(\"test datetime converters\", () => {\n beforeAll(() => {\n register(\"Etc/GMT+5\");\n });\n afterAll(() => {\n unregister();\n });\n describe(\"test extractDate\", () => {\n it(\"should error if the date is not in UTC format\", () => {\n expect(() => extractDate(\"2021-01-01\")).toThrowError(\"Invariant failed: Invalid date format. Expected ISO 8601 format, but received 2021-01-01\");\n expect(() => extractDate(\"2021-01-01T00:0000.000Z\")).toThrowError(\"Invariant failed: Invalid date format. Expected ISO 8601 format, but received 2021-01-01\");\n });\n it(\"should return the date part of the input string\", () => {\n const result = extractDate(\"2021-01-01T00:00:00.000Z\");\n expect(result).toBe(\"2021-01-01\");\n });\n });\n describe(\"test extractDateInUTC\", () => {\n it(\"should return the date in UTC given Date constructed with UTC time\", () => {\n const date = new Date(\"2021-01-01T00:00:00.000Z\");\n expect(date.getDate()).toBe(31);\n expect(date.getUTCDate()).toBe(1);\n const result = extractDateInUTC(date);\n expect(result).toBe(\"2021-01-01\");\n });\n it(\"should return the date in UTC given Date constructed with a local time\", () => {\n const date = new Date(\"2020-12-31T23:00:00.000\");\n expect(date.getDate()).toBe(31);\n expect(date.getUTCDate()).toBe(1);\n const result = extractDateInUTC(date);\n expect(result).toBe(\"2021-01-01\");\n });\n });\n describe(\"test extractDateInLocalTime\", () => {\n it(\"should return the date in local time given Date constructed with local time\", () => {\n const date = new Date(\"2020-12-31T23:00:00.000\");\n expect(date.getDate()).toBe(31);\n const result = extractDateInLocalTime(date);\n expect(result).toBe(\"2020-12-31\");\n });\n describe(\"test generating ISO String\", () => {\n it(\"should return a correct ISO 8601 string that is offset correctly\", () => {\n const date = new Date(\"2021-01-01T00:00:00.000Z\");\n expect(date.getDate()).toBe(31);\n const result = generateOffsetUtcString(date);\n expect(result).toBe(\"2020-12-31T19:00:00.000Z\");\n });\n });\n it(\"should return the date in local time given Date constructed with UTC time\", () => {\n const date = new Date(\"2021-01-01T00:00:00.000Z\");\n expect(date.getDate()).toBe(31);\n const result = extractDateInLocalTime(date);\n expect(result).toBe(\"2020-12-31\");\n });\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,QAAQ,EAAEC,UAAU,QAAQ,eAAe;AACpD,SAASC,QAAQ,EAAEC,SAAS,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,EAAE,QAAS,QAAQ;AACnE,SAASC,WAAW,EAAEC,sBAAsB,EAAEC,gBAAgB,EAAEC,uBAAuB,QAAS,yBAAyB;AACzHN,QAAQ,CAAC,0BAA0B,EAAE,MAAM;EACvCD,SAAS,CAAC,MAAM;IACZH,QAAQ,CAAC,WAAW,CAAC;EACzB,CAAC,CAAC;EACFE,QAAQ,CAAC,MAAM;IACXD,UAAU,CAAC,CAAC;EAChB,CAAC,CAAC;EACFG,QAAQ,CAAC,kBAAkB,EAAE,MAAM;IAC/BE,EAAE,CAAC,+CAA+C,EAAE,MAAM;MACtDD,MAAM,CAAC,MAAME,WAAW,CAAC,YAAY,CAAC,CAAC,CAACI,YAAY,CAAC,0FAA0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,6EAA6E,EAAE,MAAM;MACpF,MAAMQ,IAAI,GAAG,IAAIC,IAAI,CAAC,yBAAyB,CAAC;MAChDV,MAAM,CAACS,IAAI,CAACE,OAAO,CAAC,CAAC,CAAC,CAACH,IAAI,CAAC,EAAE,CAAC;MAC/B,MAAMD,MAAM,GAAGJ,sBAAsB,CAACM,IAAI,CAAC;MAC3CT,MAAM,CAACO,MAAM,CAAC,CAACC,IAAI,CAAC,YAAY,CAAC;IACrC,CAAC,CAAC;IACFT,QAAQ,CAAC,4BAA4B,EAAE,MAAM;MACzCE,EAAE,CAAC,kEAAkE,EAAE,MAAM;QACzE,MAAMQ,IAAI,GAAG,IAAIC,IAAI,CAAC,0BAA0B,CAAC;QACjDV,MAAM,CAACS,IAAI,CAACE,OAAO,CAAC,CAAC,CAAC,CAACH,IAAI,CAAC,EAAE,CAAC;QAC/B,MAAMD,MAAM,GAAGF,uBAAuB,CAACI,IAAI,CAAC;QAC5CT,MAAM,CAACO,MAAM,CAAC,CAACC,IAAI,CAAC,0BAA0B,CAAC;MACnD,CAAC,CAAC;IACN,CAAC,CAAC;IACFP,EAAE,CAAC,2EAA2E,EAAE,MAAM;MAClF,MAAMQ,IAAI,GAAG,IAAIC,IAAI,CAAC,0BAA0B,CAAC;MACjDV,MAAM,CAACS,IAAI,CAACE,OAAO,CAAC,CAAC,CAAC,CAACH,IAAI,CAAC,EAAE,CAAC;MAC/B,MAAMD,MAAM,GAAGJ,sBAAsB,CAACM,IAAI,CAAC;MAC3CT,MAAM,CAACO,MAAM,CAAC,CAACC,IAAI,CAAC,YAAY,CAAC;IACrC,CAAC,CAAC;EACN,CAAC,CAAC;AACN,CAAC,CAAC","ignoreList":[]}
@@ -19,7 +19,7 @@ export interface Client extends SharedClient, OldSharedClient {
19
19
  [additionalContext]: MinimalClient;
20
20
  }
21
21
  export declare const additionalContext: unique symbol;
22
- declare const MaxOsdkVersion = "2.0.10";
22
+ declare const MaxOsdkVersion = "2.0.11";
23
23
  export type MaxOsdkVersion = typeof MaxOsdkVersion;
24
24
  declare const ErrorMessage: unique symbol;
25
25
  export {};
@@ -16,6 +16,6 @@
16
16
  // DO NOT EXPORT FROM PACKAGE
17
17
  export const additionalContext = Symbol("additionalContext");
18
18
  // BEGIN: THIS IS GENERATED CODE. DO NOT EDIT.
19
- const MaxOsdkVersion = "2.0.10";
19
+ const MaxOsdkVersion = "2.0.11";
20
20
  const ErrorMessage = Symbol("ErrorMessage");
21
21
  //# sourceMappingURL=Client.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Client.js","names":["additionalContext","Symbol","MaxOsdkVersion","ErrorMessage"],"sources":["Client.js"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// DO NOT EXPORT FROM PACKAGE\nexport const additionalContext = Symbol(\"additionalContext\");\n// BEGIN: THIS IS GENERATED CODE. DO NOT EDIT.\nconst MaxOsdkVersion = \"2.0.10\";\nconst ErrorMessage = Symbol(\"ErrorMessage\");\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,iBAAiB,GAAGC,MAAM,CAAC,mBAAmB,CAAC;AAC5D;AACA,MAAMC,cAAc,GAAG,QAAQ;AAC/B,MAAMC,YAAY,GAAGF,MAAM,CAAC,cAAc,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"Client.js","names":["additionalContext","Symbol","MaxOsdkVersion","ErrorMessage"],"sources":["Client.js"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// DO NOT EXPORT FROM PACKAGE\nexport const additionalContext = Symbol(\"additionalContext\");\n// BEGIN: THIS IS GENERATED CODE. DO NOT EDIT.\nconst MaxOsdkVersion = \"2.0.11\";\nconst ErrorMessage = Symbol(\"ErrorMessage\");\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,iBAAiB,GAAGC,MAAM,CAAC,mBAAmB,CAAC;AAC5D;AACA,MAAMC,cAAc,GAAG,QAAQ;AAC/B,MAAMC,YAAY,GAAGF,MAAM,CAAC,cAAc,CAAC","ignoreList":[]}
@@ -9,4 +9,5 @@ export type { PlatformClient } from "./createPlatformClient.js";
9
9
  export type { Logger } from "./Logger.js";
10
10
  export { createAttachmentUpload } from "./object/AttachmentUpload.js";
11
11
  export type { ResultOrError } from "./ResultOrError.js";
12
+ export { extractDate, extractDateInLocalTime, extractDateInUTC, } from "./util/datetimeConverters.js";
12
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAgBA,YAAY,EACV,kBAAkB,EAClB,0BAA0B,EAC1B,wBAAwB,EACxB,kBAAkB,EAClB,uBAAuB,EACvB,SAAS,EACT,IAAI,EACJ,UAAU,EACV,UAAU,EACV,MAAM,EACN,WAAW,GACZ,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAA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AW,EACX,sBAAsB,EACtB,gBAAgB,GACjB,MAAM,8BAA8B,CAAC"}
@@ -19,4 +19,5 @@ export { ActionValidationError } from "./actions/ActionValidationError.js";
19
19
  export { createClient } from "./createClient.js";
20
20
  export { createPlatformClient } from "./createPlatformClient.js";
21
21
  export { createAttachmentUpload } from "./object/AttachmentUpload.js";
22
+ export { extractDate, extractDateInLocalTime, extractDateInUTC } from "./util/datetimeConverters.js";
22
23
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["isOk","PalantirApiError","ActionValidationError","createClient","createPlatformClient","createAttachmentUpload"],"sources":["index.js"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport { isOk } from \"@osdk/api\";\nexport { PalantirApiError } from \"@osdk/shared.net.errors\";\nexport { ActionValidationError } from \"./actions/ActionValidationError.js\";\nexport { createClient } from \"./createClient.js\";\nexport { createPlatformClient } from \"./createPlatformClient.js\";\nexport { createAttachmentUpload } from \"./object/AttachmentUpload.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,IAAI,QAAQ,WAAW;AAChC,SAASC,gBAAgB,QAAQ,yBAAyB;AAC1D,SAASC,qBAAqB,QAAQ,oCAAoC;AAC1E,SAASC,YAAY,QAAQ,mBAAmB;AAChD,SAASC,oBAAoB,QAAQ,2BAA2B;AAChE,SAASC,sBAAsB,QAAQ,8BAA8B","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["isOk","PalantirApiError","ActionValidationError","createClient","createPlatformClient","createAttachmentUpload","extractDate","extractDateInLocalTime","extractDateInUTC"],"sources":["index.js"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport { isOk } from \"@osdk/api\";\nexport { PalantirApiError } from \"@osdk/shared.net.errors\";\nexport { ActionValidationError } from \"./actions/ActionValidationError.js\";\nexport { createClient } from \"./createClient.js\";\nexport { createPlatformClient } from \"./createPlatformClient.js\";\nexport { createAttachmentUpload } from \"./object/AttachmentUpload.js\";\nexport { extractDate, extractDateInLocalTime, extractDateInUTC, } from \"./util/datetimeConverters.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,IAAI,QAAQ,WAAW;AAChC,SAASC,gBAAgB,QAAQ,yBAAyB;AAC1D,SAASC,qBAAqB,QAAQ,oCAAoC;AAC1E,SAASC,YAAY,QAAQ,mBAAmB;AAChD,SAASC,oBAAoB,QAAQ,2BAA2B;AAChE,SAASC,sBAAsB,QAAQ,8BAA8B;AACrE,SAASC,WAAW,EAAEC,sBAAsB,EAAEC,gBAAgB,QAAS,8BAA8B","ignoreList":[]}
@@ -13,5 +13,5 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- export const USER_AGENT = `osdk-client/${"2.0.10"}`;
16
+ export const USER_AGENT = `osdk-client/${"2.0.11"}`;
17
17
  //# sourceMappingURL=UserAgent.js.map
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Extracts the date from a ISO 8601 formatted date time string. Throws if the input is not in the correct format.
3
+ *
4
+ * @param dateTime An ISO 8601 formatted date time string
5
+ * @returns The date part of the input string
6
+ */
7
+ export declare const extractDate: (dateTime: string) => string;
8
+ /**
9
+ * Generates a string representation of the input date (YYYY-MM-DD). The resulting date string reflects the given date in UTC time.
10
+ *
11
+ * @param date
12
+ * @returns The date part of a ISO 8601 formatted date time string
13
+ */
14
+ export declare const extractDateInUTC: (date: Date) => string;
15
+ /**
16
+ * Generates a string representation of the input date (YYYY-MM-DD). The resulting date string reflects the given date in the local time zone.
17
+ *
18
+ * @param date
19
+ * @returns The date part of a ISO 8601 formatted date time string
20
+ */
21
+ export declare const extractDateInLocalTime: (date: Date) => string;
22
+ //# sourceMappingURL=datetimeConverters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datetimeConverters.d.ts","sourceRoot":"","sources":["../../../src/util/datetimeConverters.ts"],"names":[],"mappings":"AAqBA;;;;;GAKG;AACH,eAAO,MAAM,WAAW,aAAc,MAAM,WAU3C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,SAAU,IAAI,WAE1C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,SAAU,IAAI,WAEhD,CAAC"}
@@ -0,0 +1,55 @@
1
+ /*
2
+ * Copyright 2024 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import invariant from "tiny-invariant";
17
+ const isoRegex = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?$/;
18
+ /**
19
+ * Extracts the date from a ISO 8601 formatted date time string. Throws if the input is not in the correct format.
20
+ *
21
+ * @param dateTime An ISO 8601 formatted date time string
22
+ * @returns The date part of the input string
23
+ */
24
+ export const extractDate = dateTime => {
25
+ !(dateTime.length < 33) ? process.env.NODE_ENV !== "production" ? invariant(false, "Invalid date format. Provided input is too long.") : invariant(false) : void 0;
26
+ !isoRegex.test(dateTime) ? process.env.NODE_ENV !== "production" ? invariant(false, `Invalid date format. Expected ISO 8601 format, but received ${dateTime}`) : invariant(false) : void 0;
27
+ return extractDateFromIsoString(dateTime);
28
+ };
29
+ /**
30
+ * Generates a string representation of the input date (YYYY-MM-DD). The resulting date string reflects the given date in UTC time.
31
+ *
32
+ * @param date
33
+ * @returns The date part of a ISO 8601 formatted date time string
34
+ */
35
+ export const extractDateInUTC = date => {
36
+ return extractDateFromIsoString(date.toISOString());
37
+ };
38
+ /**
39
+ * Generates a string representation of the input date (YYYY-MM-DD). The resulting date string reflects the given date in the local time zone.
40
+ *
41
+ * @param date
42
+ * @returns The date part of a ISO 8601 formatted date time string
43
+ */
44
+ export const extractDateInLocalTime = date => {
45
+ return extractDateFromIsoString(generateOffsetUtcString(date));
46
+ };
47
+ /** @internal */
48
+ export const generateOffsetUtcString = date => {
49
+ const offsetMs = date.getTimezoneOffset() * 60 * 1000;
50
+ return new Date(date.getTime() - offsetMs).toISOString();
51
+ };
52
+ const extractDateFromIsoString = dateTime => {
53
+ return dateTime.split("T")[0];
54
+ };
55
+ //# sourceMappingURL=datetimeConverters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datetimeConverters.js","names":["invariant","isoRegex","extractDate","dateTime","length","process","env","NODE_ENV","test","extractDateFromIsoString","extractDateInUTC","date","toISOString","extractDateInLocalTime","generateOffsetUtcString","offsetMs","getTimezoneOffset","Date","getTime","split"],"sources":["datetimeConverters.js"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport invariant from \"tiny-invariant\";\nconst isoRegex = /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[+-]\\d{2}:\\d{2})?$/;\n/**\n * Extracts the date from a ISO 8601 formatted date time string. Throws if the input is not in the correct format.\n *\n * @param dateTime An ISO 8601 formatted date time string\n * @returns The date part of the input string\n */\nexport const extractDate = (dateTime) => {\n invariant(dateTime.length < 33, \"Invalid date format. Provided input is too long.\");\n invariant(isoRegex.test(dateTime), `Invalid date format. Expected ISO 8601 format, but received ${dateTime}`);\n return extractDateFromIsoString(dateTime);\n};\n/**\n * Generates a string representation of the input date (YYYY-MM-DD). The resulting date string reflects the given date in UTC time.\n *\n * @param date\n * @returns The date part of a ISO 8601 formatted date time string\n */\nexport const extractDateInUTC = (date) => {\n return extractDateFromIsoString(date.toISOString());\n};\n/**\n * Generates a string representation of the input date (YYYY-MM-DD). The resulting date string reflects the given date in the local time zone.\n *\n * @param date\n * @returns The date part of a ISO 8601 formatted date time string\n */\nexport const extractDateInLocalTime = (date) => {\n return extractDateFromIsoString(generateOffsetUtcString(date));\n};\n/** @internal */\nexport const generateOffsetUtcString = (date) => {\n const offsetMs = date.getTimezoneOffset() * 60 * 1000;\n return new Date(date.getTime() - offsetMs).toISOString();\n};\nconst extractDateFromIsoString = (dateTime) => {\n return dateTime.split(\"T\")[0];\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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Converters.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datetimeConverters.test.d.ts","sourceRoot":"","sources":["../../../src/util/datetimeConverters.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,75 @@
1
+ /*
2
+ * Copyright 2023 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { register, unregister } from "timezone-mock";
17
+ import { afterAll, beforeAll, describe, expect, it } from "vitest";
18
+ import { extractDate, extractDateInLocalTime, extractDateInUTC, generateOffsetUtcString } from "./datetimeConverters.js";
19
+ describe("test datetime converters", () => {
20
+ beforeAll(() => {
21
+ register("Etc/GMT+5");
22
+ });
23
+ afterAll(() => {
24
+ unregister();
25
+ });
26
+ describe("test extractDate", () => {
27
+ it("should error if the date is not in UTC format", () => {
28
+ expect(() => extractDate("2021-01-01")).toThrowError("Invariant failed: Invalid date format. Expected ISO 8601 format, but received 2021-01-01");
29
+ expect(() => extractDate("2021-01-01T00:0000.000Z")).toThrowError("Invariant failed: Invalid date format. Expected ISO 8601 format, but received 2021-01-01");
30
+ });
31
+ it("should return the date part of the input string", () => {
32
+ const result = extractDate("2021-01-01T00:00:00.000Z");
33
+ expect(result).toBe("2021-01-01");
34
+ });
35
+ });
36
+ describe("test extractDateInUTC", () => {
37
+ it("should return the date in UTC given Date constructed with UTC time", () => {
38
+ const date = new Date("2021-01-01T00:00:00.000Z");
39
+ expect(date.getDate()).toBe(31);
40
+ expect(date.getUTCDate()).toBe(1);
41
+ const result = extractDateInUTC(date);
42
+ expect(result).toBe("2021-01-01");
43
+ });
44
+ it("should return the date in UTC given Date constructed with a local time", () => {
45
+ const date = new Date("2020-12-31T23:00:00.000");
46
+ expect(date.getDate()).toBe(31);
47
+ expect(date.getUTCDate()).toBe(1);
48
+ const result = extractDateInUTC(date);
49
+ expect(result).toBe("2021-01-01");
50
+ });
51
+ });
52
+ describe("test extractDateInLocalTime", () => {
53
+ it("should return the date in local time given Date constructed with local time", () => {
54
+ const date = new Date("2020-12-31T23:00:00.000");
55
+ expect(date.getDate()).toBe(31);
56
+ const result = extractDateInLocalTime(date);
57
+ expect(result).toBe("2020-12-31");
58
+ });
59
+ describe("test generating ISO String", () => {
60
+ it("should return a correct ISO 8601 string that is offset correctly", () => {
61
+ const date = new Date("2021-01-01T00:00:00.000Z");
62
+ expect(date.getDate()).toBe(31);
63
+ const result = generateOffsetUtcString(date);
64
+ expect(result).toBe("2020-12-31T19:00:00.000Z");
65
+ });
66
+ });
67
+ it("should return the date in local time given Date constructed with UTC time", () => {
68
+ const date = new Date("2021-01-01T00:00:00.000Z");
69
+ expect(date.getDate()).toBe(31);
70
+ const result = extractDateInLocalTime(date);
71
+ expect(result).toBe("2020-12-31");
72
+ });
73
+ });
74
+ });
75
+ //# sourceMappingURL=datetimeConverters.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datetimeConverters.test.js","names":["register","unregister","afterAll","beforeAll","describe","expect","it","extractDate","extractDateInLocalTime","extractDateInUTC","generateOffsetUtcString","toThrowError","result","toBe","date","Date","getDate","getUTCDate"],"sources":["datetimeConverters.test.js"],"sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { register, unregister } from \"timezone-mock\";\nimport { afterAll, beforeAll, describe, expect, it, } from \"vitest\";\nimport { extractDate, extractDateInLocalTime, extractDateInUTC, generateOffsetUtcString, } from \"./datetimeConverters.js\";\ndescribe(\"test datetime converters\", () => {\n beforeAll(() => {\n register(\"Etc/GMT+5\");\n });\n afterAll(() => {\n unregister();\n });\n describe(\"test extractDate\", () => {\n it(\"should error if the date is not in UTC format\", () => {\n expect(() => extractDate(\"2021-01-01\")).toThrowError(\"Invariant failed: Invalid date format. Expected ISO 8601 format, but received 2021-01-01\");\n expect(() => extractDate(\"2021-01-01T00:0000.000Z\")).toThrowError(\"Invariant failed: Invalid date format. Expected ISO 8601 format, but received 2021-01-01\");\n });\n it(\"should return the date part of the input string\", () => {\n const result = extractDate(\"2021-01-01T00:00:00.000Z\");\n expect(result).toBe(\"2021-01-01\");\n });\n });\n describe(\"test extractDateInUTC\", () => {\n it(\"should return the date in UTC given Date constructed with UTC time\", () => {\n const date = new Date(\"2021-01-01T00:00:00.000Z\");\n expect(date.getDate()).toBe(31);\n expect(date.getUTCDate()).toBe(1);\n const result = extractDateInUTC(date);\n expect(result).toBe(\"2021-01-01\");\n });\n it(\"should return the date in UTC given Date constructed with a local time\", () => {\n const date = new Date(\"2020-12-31T23:00:00.000\");\n expect(date.getDate()).toBe(31);\n expect(date.getUTCDate()).toBe(1);\n const result = extractDateInUTC(date);\n expect(result).toBe(\"2021-01-01\");\n });\n });\n describe(\"test extractDateInLocalTime\", () => {\n it(\"should return the date in local time given Date constructed with local time\", () => {\n const date = new Date(\"2020-12-31T23:00:00.000\");\n expect(date.getDate()).toBe(31);\n const result = extractDateInLocalTime(date);\n expect(result).toBe(\"2020-12-31\");\n });\n describe(\"test generating ISO String\", () => {\n it(\"should return a correct ISO 8601 string that is offset correctly\", () => {\n const date = new Date(\"2021-01-01T00:00:00.000Z\");\n expect(date.getDate()).toBe(31);\n const result = generateOffsetUtcString(date);\n expect(result).toBe(\"2020-12-31T19:00:00.000Z\");\n });\n });\n it(\"should return the date in local time given Date constructed with UTC time\", () => {\n const date = new Date(\"2021-01-01T00:00:00.000Z\");\n expect(date.getDate()).toBe(31);\n const result = extractDateInLocalTime(date);\n expect(result).toBe(\"2020-12-31\");\n });\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,QAAQ,EAAEC,UAAU,QAAQ,eAAe;AACpD,SAASC,QAAQ,EAAEC,SAAS,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,EAAE,QAAS,QAAQ;AACnE,SAASC,WAAW,EAAEC,sBAAsB,EAAEC,gBAAgB,EAAEC,uBAAuB,QAAS,yBAAyB;AACzHN,QAAQ,CAAC,0BAA0B,EAAE,MAAM;EACvCD,SAAS,CAAC,MAAM;IACZH,QAAQ,CAAC,WAAW,CAAC;EACzB,CAAC,CAAC;EACFE,QAAQ,CAAC,MAAM;IACXD,UAAU,CAAC,CAAC;EAChB,CAAC,CAAC;EACFG,QAAQ,CAAC,kBAAkB,EAAE,MAAM;IAC/BE,EAAE,CAAC,+CAA+C,EAAE,MAAM;MACtDD,MAAM,CAAC,MAAME,WAAW,CAAC,YAAY,CAAC,CAAC,CAACI,YAAY,CAAC,0FAA0F,CAAC;MAChJN,MAAM,CAAC,MAAME,WAAW,CAAC,yBAAyB,CAAC,CAAC,CAACI,YAAY,CAAC,0FAA0F,CAAC;IACjK,CAAC,CAAC;IACFL,EAAE,CAAC,iDAAiD,EAAE,MAAM;MACxD,MAAMM,MAAM,GAAGL,WAAW,CAAC,0BAA0B,CAAC;MACtDF,MAAM,CAACO,MAAM,CAAC,CAACC,IAAI,CAAC,YAAY,CAAC;IACrC,CAAC,CAAC;EACN,CAAC,CAAC;EACFT,QAAQ,CAAC,uBAAuB,EAAE,MAAM;IACpCE,EAAE,CAAC,oEAAoE,EAAE,MAAM;MAC3E,MA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Q,IAAI,GAAG,IAAIC,IAAI,CAAC,0BAA0B,CAAC;QACjDV,MAAM,CAACS,IAAI,CAACE,OAAO,CAAC,CAAC,CAAC,CAACH,IAAI,CAAC,EAAE,CAAC;QAC/B,MAAMD,MAAM,GAAGF,uBAAuB,CAACI,IAAI,CAAC;QAC5CT,MAAM,CAACO,MAAM,CAAC,CAACC,IAAI,CAAC,0BAA0B,CAAC;MACnD,CAAC,CAAC;IACN,CAAC,CAAC;IACFP,EAAE,CAAC,2EAA2E,EAAE,MAAM;MAClF,MAAMQ,IAAI,GAAG,IAAIC,IAAI,CAAC,0BAA0B,CAAC;MACjDV,MAAM,CAACS,IAAI,CAACE,OAAO,CAAC,CAAC,CAAC,CAACH,IAAI,CAAC,EAAE,CAAC;MAC/B,MAAMD,MAAM,GAAGJ,sBAAsB,CAACM,IAAI,CAAC;MAC3CT,MAAM,CAACO,MAAM,CAAC,CAACC,IAAI,CAAC,YAAY,CAAC;IACrC,CAAC,CAAC;EACN,CAAC,CAAC;AACN,CAAC,CAAC","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osdk/client",
3
- "version": "2.0.10",
3
+ "version": "2.0.11",
4
4
  "description": "",
5
5
  "access": "public",
6
6
  "license": "Apache-2.0",
@@ -32,13 +32,13 @@
32
32
  "tiny-invariant": "^1.3.1",
33
33
  "type-fest": "^4.18.2",
34
34
  "ws": "^8.18.0",
35
+ "@osdk/api": "~2.0.11",
36
+ "@osdk/client.unstable": "2.0.11",
35
37
  "@osdk/client.unstable.osw": "0.2.0",
36
- "@osdk/generator-converters": "2.0.10",
38
+ "@osdk/shared.net.fetch": "~1.0.1",
37
39
  "@osdk/shared.client.impl": "~1.0.4",
38
- "@osdk/client.unstable": "2.0.10",
39
- "@osdk/api": "~2.0.10",
40
40
  "@osdk/shared.net.errors": "~2.0.1",
41
- "@osdk/shared.net.fetch": "~1.0.1"
41
+ "@osdk/generator-converters": "2.0.11"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@microsoft/api-documenter": "^7.25.3",
@@ -54,14 +54,15 @@
54
54
  "p-state": "^2.0.1",
55
55
  "pino": "^9.1.0",
56
56
  "pino-pretty": "^11.2.1",
57
+ "timezone-mock": "^1.3.6",
57
58
  "ts-expect": "^1.3.0",
58
59
  "typescript": "~5.5.4",
59
60
  "zod": "^3.23.8",
61
+ "@osdk/client.test.ontology": "~2.0.11",
60
62
  "@osdk/monorepo.api-extractor": "~0.0.0",
61
- "@osdk/client.test.ontology": "~2.0.10",
62
- "@osdk/monorepo.tsup": "~0.0.0",
63
63
  "@osdk/monorepo.tsconfig": "~0.0.0",
64
- "@osdk/shared.test": "~2.0.10"
64
+ "@osdk/shared.test": "~2.0.11",
65
+ "@osdk/monorepo.tsup": "~0.0.0"
65
66
  },
66
67
  "publishConfig": {
67
68
  "access": "public"