@osdk/client 2.6.0-beta.1 → 2.6.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/build/browser/Client.js +1 -1
  3. package/build/browser/Client.js.map +1 -1
  4. package/build/browser/fetchMetadata.test.js +11 -0
  5. package/build/browser/fetchMetadata.test.js.map +1 -1
  6. package/build/browser/internal/conversions/modernToLegacyWhereClause.js +15 -0
  7. package/build/browser/internal/conversions/modernToLegacyWhereClause.js.map +1 -1
  8. package/build/browser/object/convertWireToOsdkObjects/BaseHolder.js.map +1 -1
  9. package/build/browser/object/convertWireToOsdkObjects/InterfaceHolder.js.map +1 -1
  10. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.js +4 -0
  11. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.js.map +1 -1
  12. package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.js +10 -0
  13. package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.js.map +1 -1
  14. package/build/browser/object/convertWireToOsdkObjects.test.js +12 -0
  15. package/build/browser/object/convertWireToOsdkObjects.test.js.map +1 -1
  16. package/build/browser/object/formatting/applyPropertyFormatter.js +58 -0
  17. package/build/browser/object/formatting/applyPropertyFormatter.js.map +1 -0
  18. package/build/browser/object/formatting/applyPropertyFormatter.test.js +726 -0
  19. package/build/browser/object/formatting/applyPropertyFormatter.test.js.map +1 -0
  20. package/build/browser/object/formatting/formatBoolean.js +23 -0
  21. package/build/browser/object/formatting/formatBoolean.js.map +1 -0
  22. package/build/browser/object/formatting/formatDateTime.js +158 -0
  23. package/build/browser/object/formatting/formatDateTime.js.map +1 -0
  24. package/build/browser/object/formatting/formatNumber.js +242 -0
  25. package/build/browser/object/formatting/formatNumber.js.map +1 -0
  26. package/build/browser/object/formatting/propertyFormattingUtils.js +39 -0
  27. package/build/browser/object/formatting/propertyFormattingUtils.js.map +1 -0
  28. package/build/browser/util/UserAgent.js +2 -2
  29. package/build/cjs/{chunk-DCEFUXFS.cjs → chunk-6L3MX4LH.cjs} +35 -15
  30. package/build/cjs/chunk-6L3MX4LH.cjs.map +1 -0
  31. package/build/cjs/{chunk-BP7BR5FZ.cjs → chunk-BRYZR53E.cjs} +435 -54
  32. package/build/cjs/chunk-BRYZR53E.cjs.map +1 -0
  33. package/build/cjs/index.cjs +8 -8
  34. package/build/cjs/public/internal.cjs +8 -8
  35. package/build/cjs/public/unstable-do-not-use.cjs +31 -31
  36. package/build/esm/Client.js +1 -1
  37. package/build/esm/Client.js.map +1 -1
  38. package/build/esm/fetchMetadata.test.js +11 -0
  39. package/build/esm/fetchMetadata.test.js.map +1 -1
  40. package/build/esm/internal/conversions/modernToLegacyWhereClause.js +15 -0
  41. package/build/esm/internal/conversions/modernToLegacyWhereClause.js.map +1 -1
  42. package/build/esm/object/convertWireToOsdkObjects/BaseHolder.js.map +1 -1
  43. package/build/esm/object/convertWireToOsdkObjects/InterfaceHolder.js.map +1 -1
  44. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.js +4 -0
  45. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.js.map +1 -1
  46. package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.js +10 -0
  47. package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.js.map +1 -1
  48. package/build/esm/object/convertWireToOsdkObjects.test.js +12 -0
  49. package/build/esm/object/convertWireToOsdkObjects.test.js.map +1 -1
  50. package/build/esm/object/formatting/applyPropertyFormatter.js +58 -0
  51. package/build/esm/object/formatting/applyPropertyFormatter.js.map +1 -0
  52. package/build/esm/object/formatting/applyPropertyFormatter.test.js +726 -0
  53. package/build/esm/object/formatting/applyPropertyFormatter.test.js.map +1 -0
  54. package/build/esm/object/formatting/formatBoolean.js +23 -0
  55. package/build/esm/object/formatting/formatBoolean.js.map +1 -0
  56. package/build/esm/object/formatting/formatDateTime.js +158 -0
  57. package/build/esm/object/formatting/formatDateTime.js.map +1 -0
  58. package/build/esm/object/formatting/formatNumber.js +242 -0
  59. package/build/esm/object/formatting/formatNumber.js.map +1 -0
  60. package/build/esm/object/formatting/propertyFormattingUtils.js +39 -0
  61. package/build/esm/object/formatting/propertyFormattingUtils.js.map +1 -0
  62. package/build/esm/util/UserAgent.js +2 -2
  63. package/build/types/Client.d.ts +1 -1
  64. package/build/types/object/formatting/applyPropertyFormatter.d.ts +18 -0
  65. package/build/types/object/formatting/applyPropertyFormatter.d.ts.map +1 -0
  66. package/build/types/object/formatting/applyPropertyFormatter.test.d.ts +1 -0
  67. package/build/types/object/formatting/applyPropertyFormatter.test.d.ts.map +1 -0
  68. package/build/types/object/formatting/formatBoolean.d.ts +5 -0
  69. package/build/types/object/formatting/formatBoolean.d.ts.map +1 -0
  70. package/build/types/object/formatting/formatDateTime.d.ts +6 -0
  71. package/build/types/object/formatting/formatDateTime.d.ts.map +1 -0
  72. package/build/types/object/formatting/formatNumber.d.ts +15 -0
  73. package/build/types/object/formatting/formatNumber.d.ts.map +1 -0
  74. package/build/types/object/formatting/propertyFormattingUtils.d.ts +10 -0
  75. package/build/types/object/formatting/propertyFormattingUtils.d.ts.map +1 -0
  76. package/package.json +8 -8
  77. package/build/cjs/chunk-BP7BR5FZ.cjs.map +0 -1
  78. package/build/cjs/chunk-DCEFUXFS.cjs.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"propertyFormattingUtils.js","names":["resolvePropertyReference","ref","objectData","type","value","propertyApiName","String","undefined","getBrowserLocale","navigator","language"],"sources":["propertyFormattingUtils.ts"],"sourcesContent":["/*\n * Copyright 2025 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\nimport type { PropertyTypeReferenceOrStringConstant } from \"@osdk/api\";\nimport type { SimpleOsdkProperties } from \"../SimpleOsdkProperties.js\";\n\n/**\n * Resolves a property reference or string constant to its actual value\n */\n\nexport function resolvePropertyReference(\n ref: PropertyTypeReferenceOrStringConstant,\n objectData: SimpleOsdkProperties,\n): string | undefined {\n if (ref.type === \"constant\") {\n return ref.value;\n } else if (ref.type === \"propertyType\") {\n const value = objectData[ref.propertyApiName];\n return value != null ? String(value) : undefined;\n }\n return undefined;\n}\n/**\n * Gets the browser's current locale\n */\nexport function getBrowserLocale(): string {\n if (typeof navigator !== \"undefined\" && navigator.language != null) {\n return navigator.language;\n }\n return \"en-US\";\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA;AACA;AACA;;AAEA,OAAO,SAASA,wBAAwBA,CACtCC,GAA0C,EAC1CC,UAAgC,EACZ;EACpB,IAAID,GAAG,CAACE,IAAI,KAAK,UAAU,EAAE;IAC3B,OAAOF,GAAG,CAACG,KAAK;EAClB,CAAC,MAAM,IAAIH,GAAG,CAACE,IAAI,KAAK,cAAc,EAAE;IACtC,MAAMC,KAAK,GAAGF,UAAU,CAACD,GAAG,CAACI,eAAe,CAAC;IAC7C,OAAOD,KAAK,IAAI,IAAI,GAAGE,MAAM,CAACF,KAAK,CAAC,GAAGG,SAAS;EAClD;EACA,OAAOA,SAAS;AAClB;AACA;AACA;AACA;AACA,OAAO,SAASC,gBAAgBA,CAAA,EAAW;EACzC,IAAI,OAAOC,SAAS,KAAK,WAAW,IAAIA,SAAS,CAACC,QAAQ,IAAI,IAAI,EAAE;IAClE,OAAOD,SAAS,CAACC,QAAQ;EAC3B;EACA,OAAO,OAAO;AAChB","ignoreList":[]}
@@ -14,6 +14,6 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- export const USER_AGENT = `osdk-client/${"2.6.0-beta.1"}`;
18
- export const OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.6.0-beta.1"}`;
17
+ export const USER_AGENT = `osdk-client/${"2.6.0-beta.3"}`;
18
+ export const OBSERVABLE_USER_AGENT = `osdk-observable-client/${"2.6.0-beta.3"}`;
19
19
  //# sourceMappingURL=UserAgent.js.map
@@ -16,7 +16,7 @@ export interface Client extends SharedClient, OldSharedClient {
16
16
  <Q extends Experiment<"2.0.8"> | Experiment<"2.1.0"> | Experiment<"2.2.0">>(experiment: Q): ExperimentFns<Q>;
17
17
  fetchMetadata<Q extends (ObjectTypeDefinition | InterfaceDefinition | ActionDefinition<any> | QueryDefinition<any>)>(o: Q): Promise<Q extends ObjectTypeDefinition ? ObjectMetadata : Q extends InterfaceDefinition ? InterfaceMetadata : Q extends ActionDefinition<any> ? ActionMetadata : Q extends QueryDefinition<any> ? QueryMetadata : never>;
18
18
  }
19
- declare const MaxOsdkVersion = "2.5.0";
19
+ declare const MaxOsdkVersion = "2.6.0";
20
20
  export type MaxOsdkVersion = typeof MaxOsdkVersion;
21
21
  declare const ErrorMessage: unique symbol;
22
22
  export {};
@@ -0,0 +1,18 @@
1
+ import type { ObjectMetadata } from "@osdk/api";
2
+ import type { SimpleOsdkProperties } from "../SimpleOsdkProperties.js";
3
+ export interface FormatPropertyOptions {
4
+ locale?: string;
5
+ timezoneId?: string;
6
+ }
7
+ type PropertyValue = string | Array<string> | number | Array<number> | boolean | Array<boolean> | undefined;
8
+ /**
9
+ * Applies formatting rules to a property value and returns the formatted string value.
10
+ *
11
+ * @param propertyValue - The value of the property to format
12
+ * @returns The formatted string value, or undefined if the property cannot be formatted
13
+ *
14
+ * @experimental This is a stub implementation that returns undefined.
15
+ * The actual formatting logic will be implemented later.
16
+ */
17
+ export declare function applyPropertyFormatter(propertyValue: PropertyValue, propertyDefinition: ObjectMetadata.Property | undefined, objectData: SimpleOsdkProperties, options?: FormatPropertyOptions): string | undefined;
18
+ export {};
@@ -0,0 +1 @@
1
+ {"mappings":"AAgBA,cAAc,sBAAmD,WAAY;AAC7E,cAAc,4BAA4B,4BAA6B;AAMvE,iBAAiB,sBAAsB;CACrC;CACA;AACD;KAEI,yBAED,yBAEA,0BAEA;;;;;;;;;;AAcJ,OAAO,iBAAS,uBACdA,eAAe,eACfC,oBAAoB,eAAe,sBACnCC,YAAY,sBACZC,UAAS","names":["propertyValue: PropertyValue","propertyDefinition: ObjectMetadata.Property | undefined","objectData: SimpleOsdkProperties","options: FormatPropertyOptions"],"sources":["../../../../src/object/formatting/applyPropertyFormatter.ts"],"version":3,"file":"applyPropertyFormatter.d.ts"}
@@ -0,0 +1 @@
1
+ {"mappings":"","names":[],"sources":["../../../../src/object/formatting/applyPropertyFormatter.test.ts"],"version":3,"file":"applyPropertyFormatter.test.d.ts"}
@@ -0,0 +1,5 @@
1
+ import type { PropertyBooleanFormattingRule } from "@osdk/api";
2
+ /**
3
+ * Formats a boolean value according to the specified formatting rule
4
+ */
5
+ export declare function formatBoolean(value: boolean, rule: PropertyBooleanFormattingRule): string;
@@ -0,0 +1 @@
1
+ {"mappings":"AAgBA,cAAc,qCAAqC,WAAY;;;;AAK/D,OAAO,iBAAS,cACdA,gBACAC,MAAM","names":["value: boolean","rule: PropertyBooleanFormattingRule"],"sources":["../../../../src/object/formatting/formatBoolean.ts"],"version":3,"file":"formatBoolean.d.ts"}
@@ -0,0 +1,6 @@
1
+ import type { DatetimeFormat, DatetimeTimezone } from "@osdk/api";
2
+ import type { SimpleOsdkProperties } from "../SimpleOsdkProperties.js";
3
+ /**
4
+ * Formats a date/timestamp value according to the specified formatting rule
5
+ */
6
+ export declare function formatDateTime(value: Date, format: DatetimeFormat, timezone: DatetimeTimezone | undefined, objectData: SimpleOsdkProperties, locale: string, userTimezoneOverride?: string): string | undefined;
@@ -0,0 +1 @@
1
+ {"mappings":"AAgBA,cACE,gBAEA,wBACK,WAAY;AAEnB,cAAc,4BAA4B,4BAA6B;;;;AAMvE,OAAO,iBAAS,eACdA,OAAO,MACPC,QAAQ,gBACRC,UAAU,8BACVC,YAAY,sBACZC,gBACAC","names":["value: Date","format: DatetimeFormat","timezone: DatetimeTimezone | undefined","objectData: SimpleOsdkProperties","locale: string","userTimezoneOverride?: string"],"sources":["../../../../src/object/formatting/formatDateTime.ts"],"version":3,"file":"formatDateTime.d.ts"}
@@ -0,0 +1,15 @@
1
+ import type { PropertyNumberFormattingRuleType } from "@osdk/api";
2
+ import type { SimpleOsdkProperties } from "../SimpleOsdkProperties.js";
3
+ /**
4
+ * Extended NumberFormatOptions that includes rounding mode support
5
+ * which is available in modern browsers but not yet in TypeScript types.
6
+ * Only includes modes that are actually supported by Intl.NumberFormat and used in our API.
7
+ */
8
+ export interface ExtendedNumberFormatOptions extends Intl.NumberFormatOptions {
9
+ roundingMode?: "ceil" | "floor" | "halfExpand";
10
+ convertNegativeToParenthesis?: boolean;
11
+ }
12
+ /**
13
+ * Formats a number value according to the specified formatting rule
14
+ */
15
+ export declare function formatNumber(value: number, numberType: PropertyNumberFormattingRuleType, objectData: SimpleOsdkProperties, locale: string): string | undefined;
@@ -0,0 +1 @@
1
+ {"mappings":"AAgBA,cAUE,wCACK,WAAY;AACnB,cAAc,4BAA4B,4BAA6B;;;;;;AAQvE,iBAAiB,oCAAoC,KAAK,oBAAoB;CAC5E,eAAe,SAAS,UAAU;CAClC;AACD;;;;AAKD,OAAO,iBAAS,aACdA,eACAC,YAAY,kCACZC,YAAY,sBACZC","names":["value: number","numberType: PropertyNumberFormattingRuleType","objectData: SimpleOsdkProperties","locale: string"],"sources":["../../../../src/object/formatting/formatNumber.ts"],"version":3,"file":"formatNumber.d.ts"}
@@ -0,0 +1,10 @@
1
+ import type { PropertyTypeReferenceOrStringConstant } from "@osdk/api";
2
+ import type { SimpleOsdkProperties } from "../SimpleOsdkProperties.js";
3
+ /**
4
+ * Resolves a property reference or string constant to its actual value
5
+ */
6
+ export declare function resolvePropertyReference(ref: PropertyTypeReferenceOrStringConstant, objectData: SimpleOsdkProperties): string | undefined;
7
+ /**
8
+ * Gets the browser's current locale
9
+ */
10
+ export declare function getBrowserLocale(): string;
@@ -0,0 +1 @@
1
+ {"mappings":"AAgBA,cAAc,6CAA6C,WAAY;AACvE,cAAc,4BAA4B,4BAA6B;;;;AAMvE,OAAO,iBAAS,yBACdA,KAAK,uCACLC,YAAY;;;;AAad,OAAO,iBAAS","names":["ref: PropertyTypeReferenceOrStringConstant","objectData: SimpleOsdkProperties"],"sources":["../../../../src/object/formatting/propertyFormattingUtils.ts"],"version":3,"file":"propertyFormattingUtils.d.ts"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osdk/client",
3
- "version": "2.6.0-beta.1",
3
+ "version": "2.6.0-beta.3",
4
4
  "description": "",
5
5
  "access": "public",
6
6
  "license": "Apache-2.0",
@@ -48,7 +48,7 @@
48
48
  },
49
49
  "dependencies": {
50
50
  "@osdk/foundry.core": "2.30.0",
51
- "@osdk/foundry.ontologies": "2.30.0",
51
+ "@osdk/foundry.ontologies": "2.35.0",
52
52
  "@osdk/shared.client": "^1.0.1",
53
53
  "@osdk/shared.client2": "^1.0.0",
54
54
  "@types/geojson": "^7946.0.16",
@@ -65,10 +65,10 @@
65
65
  "tiny-invariant": "^1.3.3",
66
66
  "type-fest": "^4.41.0",
67
67
  "ws": "^8.18.3",
68
- "@osdk/client.unstable": "2.6.0-beta.1",
69
- "@osdk/generator-converters": "2.6.0-beta.1",
70
- "@osdk/api": "2.6.0-beta.1",
68
+ "@osdk/api": "2.6.0-beta.3",
69
+ "@osdk/client.unstable": "2.6.0-beta.3",
71
70
  "@osdk/shared.client.impl": "~1.6.0-beta.1",
71
+ "@osdk/generator-converters": "2.6.0-beta.3",
72
72
  "@osdk/shared.net.errors": "~2.6.0-beta.1",
73
73
  "@osdk/shared.net.fetch": "~1.6.0-beta.1"
74
74
  },
@@ -91,10 +91,10 @@
91
91
  "ts-expect": "^1.3.0",
92
92
  "typescript": "~5.5.4",
93
93
  "zod": "^3.25.76",
94
- "@osdk/monorepo.api-extractor": "~0.5.0-beta.1",
94
+ "@osdk/client.test.ontology": "~2.6.0-beta.3",
95
95
  "@osdk/monorepo.tsconfig": "~0.5.0-beta.1",
96
- "@osdk/shared.test": "~2.6.0-beta.1",
97
- "@osdk/client.test.ontology": "~2.6.0-beta.1"
96
+ "@osdk/monorepo.api-extractor": "~0.5.0-beta.1",
97
+ "@osdk/shared.test": "~2.6.0-beta.2"
98
98
  },
99
99
  "publishConfig": {
100
100
  "access": "public"