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

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 (72) hide show
  1. package/CHANGELOG.md +19 -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 +52 -0
  17. package/build/browser/object/formatting/applyPropertyFormatter.js.map +1 -0
  18. package/build/browser/object/formatting/applyPropertyFormatter.test.js +423 -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/formatNumber.js +242 -0
  23. package/build/browser/object/formatting/formatNumber.js.map +1 -0
  24. package/build/browser/object/formatting/propertyFormattingUtils.js +39 -0
  25. package/build/browser/object/formatting/propertyFormattingUtils.js.map +1 -0
  26. package/build/browser/util/UserAgent.js +2 -2
  27. package/build/cjs/{chunk-DCEFUXFS.cjs → chunk-6L3MX4LH.cjs} +35 -15
  28. package/build/cjs/chunk-6L3MX4LH.cjs.map +1 -0
  29. package/build/cjs/{chunk-BP7BR5FZ.cjs → chunk-X7WMWKLM.cjs} +298 -54
  30. package/build/cjs/chunk-X7WMWKLM.cjs.map +1 -0
  31. package/build/cjs/index.cjs +8 -8
  32. package/build/cjs/public/internal.cjs +8 -8
  33. package/build/cjs/public/unstable-do-not-use.cjs +31 -31
  34. package/build/esm/Client.js +1 -1
  35. package/build/esm/Client.js.map +1 -1
  36. package/build/esm/fetchMetadata.test.js +11 -0
  37. package/build/esm/fetchMetadata.test.js.map +1 -1
  38. package/build/esm/internal/conversions/modernToLegacyWhereClause.js +15 -0
  39. package/build/esm/internal/conversions/modernToLegacyWhereClause.js.map +1 -1
  40. package/build/esm/object/convertWireToOsdkObjects/BaseHolder.js.map +1 -1
  41. package/build/esm/object/convertWireToOsdkObjects/InterfaceHolder.js.map +1 -1
  42. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.js +4 -0
  43. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.js.map +1 -1
  44. package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.js +10 -0
  45. package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.js.map +1 -1
  46. package/build/esm/object/convertWireToOsdkObjects.test.js +12 -0
  47. package/build/esm/object/convertWireToOsdkObjects.test.js.map +1 -1
  48. package/build/esm/object/formatting/applyPropertyFormatter.js +52 -0
  49. package/build/esm/object/formatting/applyPropertyFormatter.js.map +1 -0
  50. package/build/esm/object/formatting/applyPropertyFormatter.test.js +423 -0
  51. package/build/esm/object/formatting/applyPropertyFormatter.test.js.map +1 -0
  52. package/build/esm/object/formatting/formatBoolean.js +23 -0
  53. package/build/esm/object/formatting/formatBoolean.js.map +1 -0
  54. package/build/esm/object/formatting/formatNumber.js +242 -0
  55. package/build/esm/object/formatting/formatNumber.js.map +1 -0
  56. package/build/esm/object/formatting/propertyFormattingUtils.js +39 -0
  57. package/build/esm/object/formatting/propertyFormattingUtils.js.map +1 -0
  58. package/build/esm/util/UserAgent.js +2 -2
  59. package/build/types/Client.d.ts +1 -1
  60. package/build/types/object/formatting/applyPropertyFormatter.d.ts +18 -0
  61. package/build/types/object/formatting/applyPropertyFormatter.d.ts.map +1 -0
  62. package/build/types/object/formatting/applyPropertyFormatter.test.d.ts +1 -0
  63. package/build/types/object/formatting/applyPropertyFormatter.test.d.ts.map +1 -0
  64. package/build/types/object/formatting/formatBoolean.d.ts +5 -0
  65. package/build/types/object/formatting/formatBoolean.d.ts.map +1 -0
  66. package/build/types/object/formatting/formatNumber.d.ts +15 -0
  67. package/build/types/object/formatting/formatNumber.d.ts.map +1 -0
  68. package/build/types/object/formatting/propertyFormattingUtils.d.ts +10 -0
  69. package/build/types/object/formatting/propertyFormattingUtils.d.ts.map +1 -0
  70. package/package.json +7 -7
  71. package/build/cjs/chunk-BP7BR5FZ.cjs.map +0 -1
  72. package/build/cjs/chunk-DCEFUXFS.cjs.map +0 -1
@@ -0,0 +1,423 @@
1
+ /*
2
+ * Copyright 2025 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
+
17
+ import { describe, expect, it } from "vitest";
18
+ import { InterfaceDefinitions } from "../../ontology/OntologyProvider.js";
19
+ import { createOsdkObject } from "../convertWireToOsdkObjects/createOsdkObject.js";
20
+ describe("getFormattedValue", () => {
21
+ const mockClient = {};
22
+ const EN_US = {
23
+ locale: "en-US"
24
+ };
25
+ const DE_DE = {
26
+ locale: "de-DE"
27
+ };
28
+ const FR_FR = {
29
+ locale: "fr-FR"
30
+ };
31
+
32
+ // Single object definition with properties for testing
33
+ const OBJECT_DEF = {
34
+ apiName: "TestObject",
35
+ type: "object",
36
+ primaryKeyApiName: "id",
37
+ titleProperty: "id",
38
+ rid: "ri.test.object",
39
+ displayName: "Test Object",
40
+ description: "A test object",
41
+ primaryKeyType: "string",
42
+ icon: undefined,
43
+ visibility: "NORMAL",
44
+ pluralDisplayName: "Test Objects",
45
+ status: "ACTIVE",
46
+ interfaceMap: {},
47
+ inverseInterfaceMap: {},
48
+ links: {},
49
+ implements: [],
50
+ [InterfaceDefinitions]: {},
51
+ properties: {
52
+ id: {
53
+ type: "string",
54
+ nullable: false,
55
+ multiplicity: false
56
+ },
57
+ stringPropertyNoFormatting: {
58
+ type: "string",
59
+ nullable: true,
60
+ multiplicity: false
61
+ },
62
+ booleanPropertyCustomLabels: {
63
+ type: "boolean",
64
+ nullable: false,
65
+ multiplicity: false,
66
+ valueFormatting: {
67
+ type: "boolean",
68
+ valueIfTrue: "Active",
69
+ valueIfFalse: "Inactive"
70
+ }
71
+ },
72
+ nullableBooleanProperty: {
73
+ type: "boolean",
74
+ nullable: true,
75
+ multiplicity: false,
76
+ valueFormatting: {
77
+ type: "boolean",
78
+ valueIfTrue: "Yes",
79
+ valueIfFalse: "No"
80
+ }
81
+ },
82
+ priceStandard: {
83
+ type: "double",
84
+ nullable: false,
85
+ multiplicity: false,
86
+ valueFormatting: {
87
+ type: "number",
88
+ numberType: {
89
+ type: "standard",
90
+ baseFormatOptions: {
91
+ minimumFractionDigits: 2,
92
+ maximumFractionDigits: 2,
93
+ useGrouping: true
94
+ }
95
+ }
96
+ }
97
+ },
98
+ priceWithParenthesis: {
99
+ type: "double",
100
+ nullable: false,
101
+ multiplicity: false,
102
+ valueFormatting: {
103
+ type: "number",
104
+ numberType: {
105
+ type: "standard",
106
+ baseFormatOptions: {
107
+ minimumFractionDigits: 2,
108
+ maximumFractionDigits: 2,
109
+ convertNegativeToParenthesis: true
110
+ }
111
+ }
112
+ }
113
+ },
114
+ amount: {
115
+ type: "double",
116
+ nullable: false,
117
+ multiplicity: false,
118
+ valueFormatting: {
119
+ type: "number",
120
+ numberType: {
121
+ type: "currency",
122
+ style: "STANDARD",
123
+ currencyCode: {
124
+ type: "constant",
125
+ value: "USD"
126
+ },
127
+ baseFormatOptions: {
128
+ minimumFractionDigits: 2,
129
+ maximumFractionDigits: 2
130
+ }
131
+ }
132
+ }
133
+ },
134
+ dynamicCurrencyAmount: {
135
+ type: "double",
136
+ nullable: false,
137
+ multiplicity: false,
138
+ valueFormatting: {
139
+ type: "number",
140
+ numberType: {
141
+ type: "currency",
142
+ style: "COMPACT",
143
+ currencyCode: {
144
+ type: "propertyType",
145
+ propertyApiName: "currencyCode"
146
+ },
147
+ baseFormatOptions: {
148
+ minimumFractionDigits: 2,
149
+ maximumFractionDigits: 2
150
+ }
151
+ }
152
+ }
153
+ },
154
+ distance: {
155
+ type: "double",
156
+ nullable: false,
157
+ multiplicity: false,
158
+ valueFormatting: {
159
+ type: "number",
160
+ numberType: {
161
+ type: "standardUnit",
162
+ unit: {
163
+ type: "constant",
164
+ value: "kilometer"
165
+ },
166
+ baseFormatOptions: {
167
+ minimumFractionDigits: 1,
168
+ maximumFractionDigits: 1
169
+ }
170
+ }
171
+ }
172
+ },
173
+ customQuantity: {
174
+ type: "double",
175
+ nullable: false,
176
+ multiplicity: false,
177
+ valueFormatting: {
178
+ type: "number",
179
+ numberType: {
180
+ type: "customUnit",
181
+ unit: {
182
+ type: "constant",
183
+ value: "widgets"
184
+ },
185
+ baseFormatOptions: {
186
+ minimumFractionDigits: 0,
187
+ maximumFractionDigits: 0
188
+ }
189
+ }
190
+ }
191
+ },
192
+ prefixedNumber: {
193
+ type: "double",
194
+ nullable: false,
195
+ multiplicity: false,
196
+ valueFormatting: {
197
+ type: "number",
198
+ numberType: {
199
+ type: "affix",
200
+ affix: {
201
+ prefix: {
202
+ type: "constant",
203
+ value: "ID-"
204
+ },
205
+ postfix: {
206
+ type: "constant",
207
+ value: "-END"
208
+ }
209
+ },
210
+ baseFormatOptions: {
211
+ minimumIntegerDigits: 4,
212
+ useGrouping: false
213
+ }
214
+ }
215
+ }
216
+ },
217
+ largeNumber: {
218
+ type: "double",
219
+ nullable: false,
220
+ multiplicity: false,
221
+ valueFormatting: {
222
+ type: "number",
223
+ numberType: {
224
+ type: "scale",
225
+ scaleType: "MILLIONS",
226
+ baseFormatOptions: {
227
+ minimumFractionDigits: 2,
228
+ maximumFractionDigits: 2
229
+ }
230
+ }
231
+ }
232
+ },
233
+ thousandsNumber: {
234
+ type: "double",
235
+ nullable: false,
236
+ multiplicity: false,
237
+ valueFormatting: {
238
+ type: "number",
239
+ numberType: {
240
+ type: "scale",
241
+ scaleType: "THOUSANDS",
242
+ baseFormatOptions: {
243
+ minimumFractionDigits: 1,
244
+ maximumFractionDigits: 1
245
+ }
246
+ }
247
+ }
248
+ },
249
+ billionsNumber: {
250
+ type: "double",
251
+ nullable: false,
252
+ multiplicity: false,
253
+ valueFormatting: {
254
+ type: "number",
255
+ numberType: {
256
+ type: "scale",
257
+ scaleType: "BILLIONS",
258
+ baseFormatOptions: {
259
+ minimumFractionDigits: 2,
260
+ maximumFractionDigits: 2
261
+ }
262
+ }
263
+ }
264
+ },
265
+ percentage: {
266
+ type: "double",
267
+ nullable: false,
268
+ multiplicity: false,
269
+ valueFormatting: {
270
+ type: "number",
271
+ numberType: {
272
+ type: "ratio",
273
+ ratioType: "PERCENTAGE",
274
+ baseFormatOptions: {
275
+ minimumFractionDigits: 1,
276
+ maximumFractionDigits: 1
277
+ }
278
+ }
279
+ }
280
+ },
281
+ basisPoints: {
282
+ type: "double",
283
+ nullable: false,
284
+ multiplicity: false,
285
+ valueFormatting: {
286
+ type: "number",
287
+ numberType: {
288
+ type: "ratio",
289
+ ratioType: "BASIS_POINTS",
290
+ baseFormatOptions: {
291
+ minimumFractionDigits: 0,
292
+ maximumFractionDigits: 0
293
+ }
294
+ }
295
+ }
296
+ },
297
+ currencyCode: {
298
+ type: "string",
299
+ nullable: true,
300
+ multiplicity: false
301
+ }
302
+ }
303
+ };
304
+
305
+ // Default object data with properties populated
306
+ const DEFAULT_OBJECT_DATA = {
307
+ $apiName: "TestObject",
308
+ $primaryKey: "test-123",
309
+ $title: "Test Object",
310
+ $objectType: "TestObject",
311
+ id: "test-123",
312
+ stringPropertyNoFormatting: "Plain text",
313
+ booleanPropertyCustomLabels: true,
314
+ nullableBooleanProperty: undefined,
315
+ priceStandard: 1234.56,
316
+ priceWithParenthesis: -1234.56,
317
+ amount: 1234.56,
318
+ dynamicCurrencyAmount: 1234.56,
319
+ distance: 42.7,
320
+ customQuantity: 150,
321
+ prefixedNumber: 42,
322
+ largeNumber: 5000000,
323
+ thousandsNumber: 5000,
324
+ billionsNumber: 3000000000,
325
+ percentage: 0.125,
326
+ basisPoints: 0.125,
327
+ currencyCode: "EUR"
328
+ };
329
+
330
+ // Helper to create an OSDK object with optional data overrides
331
+ function getObject(dataOverrides) {
332
+ const objectData = {
333
+ ...DEFAULT_OBJECT_DATA,
334
+ ...dataOverrides
335
+ };
336
+ return createOsdkObject(mockClient, OBJECT_DEF, objectData);
337
+ }
338
+ it("formats boolean true with custom label", () => {
339
+ const obj = getObject();
340
+ const formatted = obj.$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue("booleanPropertyCustomLabels");
341
+ expect(formatted).toBe("Active");
342
+ });
343
+ it("formats boolean false with custom label", () => {
344
+ const obj = getObject({
345
+ booleanPropertyCustomLabels: false
346
+ });
347
+ const formatted = obj.$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue("booleanPropertyCustomLabels");
348
+ expect(formatted).toBe("Inactive");
349
+ });
350
+ it("returns undefined for property without formatting rules", () => {
351
+ const obj = getObject();
352
+ const formatted = obj.$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue("stringPropertyNoFormatting");
353
+ expect(formatted).toBeUndefined();
354
+ });
355
+ it("returns undefined for undefined values", () => {
356
+ const obj = getObject();
357
+ const formatted = obj.$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue("nullableBooleanProperty");
358
+ expect(formatted).toBeUndefined();
359
+ });
360
+ describe("Number formatting", () => {
361
+ it("formats standard number with grouping and decimals", () => {
362
+ const obj = getObject();
363
+ expect(obj.$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue("priceStandard", EN_US)).toBe("1,234.56");
364
+ });
365
+ it("converts negative to parenthesis when configured", () => {
366
+ const obj = getObject();
367
+ expect(obj.$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue("priceWithParenthesis", EN_US)).toBe("(1,234.56)");
368
+ });
369
+ it("formats currency with constant currency code", () => {
370
+ const obj = getObject();
371
+ expect(obj.$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue("amount", EN_US)).toBe("$1,234.56");
372
+ });
373
+ it("formats currency with dynamic currency code from property reference", () => {
374
+ const obj = getObject({
375
+ currencyCode: "EUR"
376
+ });
377
+ expect(obj.$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue("dynamicCurrencyAmount", EN_US)).toBe("€1,234.56");
378
+ });
379
+ it("falls back to standard formatting when currency code is null", () => {
380
+ const obj = getObject({
381
+ currencyCode: undefined
382
+ });
383
+ expect(obj.$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue("dynamicCurrencyAmount", EN_US)).toBe("1,234.56");
384
+ });
385
+ it("formats with standard unit", () => {
386
+ const obj = getObject();
387
+ expect(obj.$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue("distance", EN_US)).toBe("42.7 km");
388
+ });
389
+ it("formats with custom unit", () => {
390
+ const obj = getObject();
391
+ expect(obj.$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue("customQuantity", EN_US)).toBe("150 widgets");
392
+ });
393
+ it("formats with prefix and suffix", () => {
394
+ const obj = getObject();
395
+ expect(obj.$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue("prefixedNumber", EN_US)).toBe("ID-0042-END");
396
+ });
397
+ it("formats scaled millions in en-US", () => {
398
+ const obj = getObject();
399
+ expect(obj.$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue("largeNumber", EN_US)).toBe("5.00M");
400
+ });
401
+ it("formats scaled millions in de-DE", () => {
402
+ const obj = getObject();
403
+ expect(obj.$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue("largeNumber", DE_DE)).toBe("5,00Mio.");
404
+ });
405
+ it("formats scaled thousands in en-US", () => {
406
+ const obj = getObject();
407
+ expect(obj.$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue("thousandsNumber", EN_US)).toBe("5.0K");
408
+ });
409
+ it("formats scaled billions in fr-FR", () => {
410
+ const obj = getObject();
411
+ expect(obj.$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue("billionsNumber", FR_FR)).toBe("3,00Md");
412
+ });
413
+ it("formats percentage", () => {
414
+ const obj = getObject();
415
+ expect(obj.$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue("percentage", EN_US)).toBe("12.5%");
416
+ });
417
+ it("formats basis points", () => {
418
+ const obj = getObject();
419
+ expect(obj.$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue("basisPoints", EN_US)).toBe("1,250 bps");
420
+ });
421
+ });
422
+ });
423
+ //# sourceMappingURL=applyPropertyFormatter.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"applyPropertyFormatter.test.js","names":["describe","expect","it","InterfaceDefinitions","createOsdkObject","mockClient","EN_US","locale","DE_DE","FR_FR","OBJECT_DEF","apiName","type","primaryKeyApiName","titleProperty","rid","displayName","description","primaryKeyType","icon","undefined","visibility","pluralDisplayName","status","interfaceMap","inverseInterfaceMap","links","implements","properties","id","nullable","multiplicity","stringPropertyNoFormatting","booleanPropertyCustomLabels","valueFormatting","valueIfTrue","valueIfFalse","nullableBooleanProperty","priceStandard","numberType","baseFormatOptions","minimumFractionDigits","maximumFractionDigits","useGrouping","priceWithParenthesis","convertNegativeToParenthesis","amount","style","currencyCode","value","dynamicCurrencyAmount","propertyApiName","distance","unit","customQuantity","prefixedNumber","affix","prefix","postfix","minimumIntegerDigits","largeNumber","scaleType","thousandsNumber","billionsNumber","percentage","ratioType","basisPoints","DEFAULT_OBJECT_DATA","$apiName","$primaryKey","$title","$objectType","getObject","dataOverrides","objectData","obj","formatted","$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue","toBe","toBeUndefined"],"sources":["applyPropertyFormatter.test.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 { describe, expect, it } from \"vitest\";\nimport type { MinimalClient } from \"../../MinimalClientContext.js\";\nimport type { FetchedObjectTypeDefinition } from \"../../ontology/OntologyProvider.js\";\nimport { InterfaceDefinitions } from \"../../ontology/OntologyProvider.js\";\nimport { createOsdkObject } from \"../convertWireToOsdkObjects/createOsdkObject.js\";\nimport type { SimpleOsdkProperties } from \"../SimpleOsdkProperties.js\";\n\ndescribe(\"getFormattedValue\", () => {\n const mockClient = {} as MinimalClient;\n const EN_US = { locale: \"en-US\" };\n const DE_DE = { locale: \"de-DE\" };\n const FR_FR = { locale: \"fr-FR\" };\n\n // Single object definition with properties for testing\n const OBJECT_DEF: FetchedObjectTypeDefinition = {\n apiName: \"TestObject\",\n type: \"object\",\n primaryKeyApiName: \"id\",\n titleProperty: \"id\",\n rid: \"ri.test.object\",\n displayName: \"Test Object\",\n description: \"A test object\",\n primaryKeyType: \"string\",\n icon: undefined,\n visibility: \"NORMAL\",\n pluralDisplayName: \"Test Objects\",\n status: \"ACTIVE\",\n interfaceMap: {},\n inverseInterfaceMap: {},\n links: {},\n implements: [],\n [InterfaceDefinitions]: {},\n properties: {\n id: {\n type: \"string\",\n nullable: false,\n multiplicity: false,\n },\n stringPropertyNoFormatting: {\n type: \"string\",\n nullable: true,\n multiplicity: false,\n },\n booleanPropertyCustomLabels: {\n type: \"boolean\",\n nullable: false,\n multiplicity: false,\n valueFormatting: {\n type: \"boolean\",\n valueIfTrue: \"Active\",\n valueIfFalse: \"Inactive\",\n },\n },\n nullableBooleanProperty: {\n type: \"boolean\",\n nullable: true,\n multiplicity: false,\n valueFormatting: {\n type: \"boolean\",\n valueIfTrue: \"Yes\",\n valueIfFalse: \"No\",\n },\n },\n priceStandard: {\n type: \"double\",\n nullable: false,\n multiplicity: false,\n valueFormatting: {\n type: \"number\",\n numberType: {\n type: \"standard\",\n baseFormatOptions: {\n minimumFractionDigits: 2,\n maximumFractionDigits: 2,\n useGrouping: true,\n },\n },\n },\n },\n priceWithParenthesis: {\n type: \"double\",\n nullable: false,\n multiplicity: false,\n valueFormatting: {\n type: \"number\",\n numberType: {\n type: \"standard\",\n baseFormatOptions: {\n minimumFractionDigits: 2,\n maximumFractionDigits: 2,\n convertNegativeToParenthesis: true,\n },\n },\n },\n },\n amount: {\n type: \"double\",\n nullable: false,\n multiplicity: false,\n valueFormatting: {\n type: \"number\",\n numberType: {\n type: \"currency\",\n style: \"STANDARD\",\n currencyCode: { type: \"constant\", value: \"USD\" },\n baseFormatOptions: {\n minimumFractionDigits: 2,\n maximumFractionDigits: 2,\n },\n },\n },\n },\n dynamicCurrencyAmount: {\n type: \"double\",\n nullable: false,\n multiplicity: false,\n valueFormatting: {\n type: \"number\",\n numberType: {\n type: \"currency\",\n style: \"COMPACT\",\n currencyCode: {\n type: \"propertyType\",\n propertyApiName: \"currencyCode\",\n },\n baseFormatOptions: {\n minimumFractionDigits: 2,\n maximumFractionDigits: 2,\n },\n },\n },\n },\n distance: {\n type: \"double\",\n nullable: false,\n multiplicity: false,\n valueFormatting: {\n type: \"number\",\n numberType: {\n type: \"standardUnit\",\n unit: { type: \"constant\", value: \"kilometer\" },\n baseFormatOptions: {\n minimumFractionDigits: 1,\n maximumFractionDigits: 1,\n },\n },\n },\n },\n customQuantity: {\n type: \"double\",\n nullable: false,\n multiplicity: false,\n valueFormatting: {\n type: \"number\",\n numberType: {\n type: \"customUnit\",\n unit: { type: \"constant\", value: \"widgets\" },\n baseFormatOptions: {\n minimumFractionDigits: 0,\n maximumFractionDigits: 0,\n },\n },\n },\n },\n prefixedNumber: {\n type: \"double\",\n nullable: false,\n multiplicity: false,\n valueFormatting: {\n type: \"number\",\n numberType: {\n type: \"affix\",\n affix: {\n prefix: { type: \"constant\", value: \"ID-\" },\n postfix: { type: \"constant\", value: \"-END\" },\n },\n baseFormatOptions: {\n minimumIntegerDigits: 4,\n useGrouping: false,\n },\n },\n },\n },\n largeNumber: {\n type: \"double\",\n nullable: false,\n multiplicity: false,\n valueFormatting: {\n type: \"number\",\n numberType: {\n type: \"scale\",\n scaleType: \"MILLIONS\",\n baseFormatOptions: {\n minimumFractionDigits: 2,\n maximumFractionDigits: 2,\n },\n },\n },\n },\n thousandsNumber: {\n type: \"double\",\n nullable: false,\n multiplicity: false,\n valueFormatting: {\n type: \"number\",\n numberType: {\n type: \"scale\",\n scaleType: \"THOUSANDS\",\n baseFormatOptions: {\n minimumFractionDigits: 1,\n maximumFractionDigits: 1,\n },\n },\n },\n },\n billionsNumber: {\n type: \"double\",\n nullable: false,\n multiplicity: false,\n valueFormatting: {\n type: \"number\",\n numberType: {\n type: \"scale\",\n scaleType: \"BILLIONS\",\n baseFormatOptions: {\n minimumFractionDigits: 2,\n maximumFractionDigits: 2,\n },\n },\n },\n },\n percentage: {\n type: \"double\",\n nullable: false,\n multiplicity: false,\n valueFormatting: {\n type: \"number\",\n numberType: {\n type: \"ratio\",\n ratioType: \"PERCENTAGE\",\n baseFormatOptions: {\n minimumFractionDigits: 1,\n maximumFractionDigits: 1,\n },\n },\n },\n },\n basisPoints: {\n type: \"double\",\n nullable: false,\n multiplicity: false,\n valueFormatting: {\n type: \"number\",\n numberType: {\n type: \"ratio\",\n ratioType: \"BASIS_POINTS\",\n baseFormatOptions: {\n minimumFractionDigits: 0,\n maximumFractionDigits: 0,\n },\n },\n },\n },\n currencyCode: {\n type: \"string\",\n nullable: true,\n multiplicity: false,\n },\n },\n };\n\n // Default object data with properties populated\n const DEFAULT_OBJECT_DATA: SimpleOsdkProperties = {\n $apiName: \"TestObject\",\n $primaryKey: \"test-123\",\n $title: \"Test Object\",\n $objectType: \"TestObject\",\n id: \"test-123\",\n stringPropertyNoFormatting: \"Plain text\",\n booleanPropertyCustomLabels: true,\n nullableBooleanProperty: undefined,\n priceStandard: 1234.56,\n priceWithParenthesis: -1234.56,\n amount: 1234.56,\n dynamicCurrencyAmount: 1234.56,\n distance: 42.7,\n customQuantity: 150,\n prefixedNumber: 42,\n largeNumber: 5000000,\n thousandsNumber: 5000,\n billionsNumber: 3000000000,\n percentage: 0.125,\n basisPoints: 0.125,\n currencyCode: \"EUR\",\n };\n\n // Helper to create an OSDK object with optional data overrides\n function getObject(dataOverrides?: Partial<SimpleOsdkProperties>) {\n const objectData = { ...DEFAULT_OBJECT_DATA, ...dataOverrides };\n return createOsdkObject(mockClient, OBJECT_DEF, objectData);\n }\n\n it(\"formats boolean true with custom label\", () => {\n const obj = getObject();\n const formatted = obj.$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue(\n \"booleanPropertyCustomLabels\",\n );\n\n expect(formatted).toBe(\"Active\");\n });\n\n it(\"formats boolean false with custom label\", () => {\n const obj = getObject({ booleanPropertyCustomLabels: false });\n const formatted = obj.$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue(\n \"booleanPropertyCustomLabels\",\n );\n\n expect(formatted).toBe(\"Inactive\");\n });\n\n it(\"returns undefined for property without formatting rules\", () => {\n const obj = getObject();\n const formatted = obj.$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue(\n \"stringPropertyNoFormatting\",\n );\n\n expect(formatted).toBeUndefined();\n });\n\n it(\"returns undefined for undefined values\", () => {\n const obj = getObject();\n const formatted = obj.$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue(\n \"nullableBooleanProperty\",\n );\n\n expect(formatted).toBeUndefined();\n });\n\n describe(\"Number formatting\", () => {\n it(\"formats standard number with grouping and decimals\", () => {\n const obj = getObject();\n expect(\n obj.$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue(\n \"priceStandard\",\n EN_US,\n ),\n ).toBe(\"1,234.56\");\n });\n\n it(\"converts negative to parenthesis when configured\", () => {\n const obj = getObject();\n expect(\n obj.$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue(\n \"priceWithParenthesis\",\n EN_US,\n ),\n ).toBe(\"(1,234.56)\");\n });\n\n it(\"formats currency with constant currency code\", () => {\n const obj = getObject();\n expect(\n obj.$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue(\n \"amount\",\n EN_US,\n ),\n ).toBe(\"$1,234.56\");\n });\n\n it(\"formats currency with dynamic currency code from property reference\", () => {\n const obj = getObject({ currencyCode: \"EUR\" });\n expect(\n obj.$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue(\n \"dynamicCurrencyAmount\",\n EN_US,\n ),\n ).toBe(\"€1,234.56\");\n });\n\n it(\"falls back to standard formatting when currency code is null\", () => {\n const obj = getObject({ currencyCode: undefined });\n expect(\n obj.$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue(\n \"dynamicCurrencyAmount\",\n EN_US,\n ),\n ).toBe(\"1,234.56\");\n });\n\n it(\"formats with standard unit\", () => {\n const obj = getObject();\n expect(\n obj.$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue(\n \"distance\",\n EN_US,\n ),\n ).toBe(\"42.7 km\");\n });\n\n it(\"formats with custom unit\", () => {\n const obj = getObject();\n expect(\n obj.$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue(\n \"customQuantity\",\n EN_US,\n ),\n ).toBe(\"150 widgets\");\n });\n\n it(\"formats with prefix and suffix\", () => {\n const obj = getObject();\n expect(\n obj.$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue(\n \"prefixedNumber\",\n EN_US,\n ),\n ).toBe(\"ID-0042-END\");\n });\n\n it(\"formats scaled millions in en-US\", () => {\n const obj = getObject();\n expect(\n obj.$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue(\n \"largeNumber\",\n EN_US,\n ),\n ).toBe(\"5.00M\");\n });\n\n it(\"formats scaled millions in de-DE\", () => {\n const obj = getObject();\n expect(\n obj.$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue(\n \"largeNumber\",\n DE_DE,\n ),\n ).toBe(\"5,00Mio.\");\n });\n\n it(\"formats scaled thousands in en-US\", () => {\n const obj = getObject();\n expect(\n obj.$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue(\n \"thousandsNumber\",\n EN_US,\n ),\n ).toBe(\"5.0K\");\n });\n\n it(\"formats scaled billions in fr-FR\", () => {\n const obj = getObject();\n expect(\n obj.$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue(\n \"billionsNumber\",\n FR_FR,\n ),\n ).toBe(\"3,00Md\");\n });\n\n it(\"formats percentage\", () => {\n const obj = getObject();\n expect(\n obj.$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue(\n \"percentage\",\n EN_US,\n ),\n ).toBe(\"12.5%\");\n });\n\n it(\"formats basis points\", () => {\n const obj = getObject();\n expect(\n obj.$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue(\n \"basisPoints\",\n EN_US,\n ),\n ).toBe(\"1,250 bps\");\n });\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC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AM;MAC5C,MAAMyE,GAAG,GAAGH,SAAS,CAAC,CAAC;MACvBvE,MAAM,CACJ0E,GAAG,CAACE,qDAAqD,CACvD,iBAAiB,EACjBvE,KACF,CACF,CAAC,CAACwE,IAAI,CAAC,MAAM,CAAC;IAChB,CAAC,CAAC;IAEF5E,EAAE,CAAC,kCAAkC,EAAE,MAAM;MAC3C,MAAMyE,GAAG,GAAGH,SAAS,CAAC,CAAC;MACvBvE,MAAM,CACJ0E,GAAG,CAACE,qDAAqD,CACvD,gBAAgB,EAChBpE,KACF,CACF,CAAC,CAACqE,IAAI,CAAC,QAAQ,CAAC;IAClB,CAAC,CAAC;IAEF5E,EAAE,CAAC,oBAAoB,EAAE,MAAM;MAC7B,MAAMyE,GAAG,GAAGH,SAAS,CAAC,CAAC;MACvBvE,MAAM,CACJ0E,GAAG,CAACE,qDAAqD,CACvD,YAAY,EACZvE,KACF,CACF,CAAC,CAACwE,IAAI,CAAC,OAAO,CAAC;IACjB,CAAC,CAAC;IAEF5E,EAAE,CAAC,sBAAsB,EAAE,MAAM;MAC/B,MAAMyE,GAAG,GAAGH,SAAS,CAAC,CAAC;MACvBvE,MAAM,CACJ0E,GAAG,CAACE,qDAAqD,CACvD,aAAa,EACbvE,KACF,CACF,CAAC,CAACwE,IAAI,CAAC,WAAW,CAAC;IACrB,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright 2025 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
+
17
+ /**
18
+ * Formats a boolean value according to the specified formatting rule
19
+ */
20
+ export function formatBoolean(value, rule) {
21
+ return value ? rule.valueIfTrue : rule.valueIfFalse;
22
+ }
23
+ //# sourceMappingURL=formatBoolean.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formatBoolean.js","names":["formatBoolean","value","rule","valueIfTrue","valueIfFalse"],"sources":["formatBoolean.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 { PropertyBooleanFormattingRule } from \"@osdk/api\";\n\n/**\n * Formats a boolean value according to the specified formatting rule\n */\nexport function formatBoolean(\n value: boolean,\n rule: PropertyBooleanFormattingRule,\n): string {\n return value ? rule.valueIfTrue : rule.valueIfFalse;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA;AACA;AACA;AACA,OAAO,SAASA,aAAaA,CAC3BC,KAAc,EACdC,IAAmC,EAC3B;EACR,OAAOD,KAAK,GAAGC,IAAI,CAACC,WAAW,GAAGD,IAAI,CAACE,YAAY;AACrD","ignoreList":[]}