@osdk/client 2.6.0-beta.9 → 2.6.0-rc.14

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 (194) hide show
  1. package/CHANGELOG.md +163 -0
  2. package/build/browser/MinimalClientContext.js.map +1 -1
  3. package/build/browser/actions/applyAction.js +0 -4
  4. package/build/browser/actions/applyAction.js.map +1 -1
  5. package/build/browser/createClient.js +1 -2
  6. package/build/browser/createClient.js.map +1 -1
  7. package/build/browser/createClient.test.js +19 -1
  8. package/build/browser/createClient.test.js.map +1 -1
  9. package/build/browser/createMinimalClient.js +2 -3
  10. package/build/browser/createMinimalClient.js.map +1 -1
  11. package/build/browser/derivedProperties/createWithPropertiesObjectSet.js +1 -17
  12. package/build/browser/derivedProperties/createWithPropertiesObjectSet.js.map +1 -1
  13. package/build/browser/fetchMetadata.test.js +0 -11
  14. package/build/browser/fetchMetadata.test.js.map +1 -1
  15. package/build/browser/index.js +1 -1
  16. package/build/browser/index.js.map +1 -1
  17. package/build/browser/object/aggregate.js +1 -1
  18. package/build/browser/object/aggregate.js.map +1 -1
  19. package/build/browser/object/convertWireToOsdkObjects/BaseHolder.js.map +1 -1
  20. package/build/browser/object/convertWireToOsdkObjects/InterfaceHolder.js.map +1 -1
  21. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.js +0 -4
  22. package/build/browser/object/convertWireToOsdkObjects/createOsdkInterface.js.map +1 -1
  23. package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.js +0 -10
  24. package/build/browser/object/convertWireToOsdkObjects/createOsdkObject.js.map +1 -1
  25. package/build/browser/object/convertWireToOsdkObjects.test.js +0 -12
  26. package/build/browser/object/convertWireToOsdkObjects.test.js.map +1 -1
  27. package/build/browser/object/fetchPage.js +6 -3
  28. package/build/browser/object/fetchPage.js.map +1 -1
  29. package/build/browser/objectSet/createObjectSet.js +3 -3
  30. package/build/browser/objectSet/createObjectSet.js.map +1 -1
  31. package/build/browser/observable/ObservableClient.js.map +1 -1
  32. package/build/browser/observable/internal/base-list/BaseListQuery.js +4 -2
  33. package/build/browser/observable/internal/base-list/BaseListQuery.js.map +1 -1
  34. package/build/browser/observable/internal/getObjectTypesThatInvalidate.test.js +1 -1
  35. package/build/browser/observable/internal/getObjectTypesThatInvalidate.test.js.map +1 -1
  36. package/build/browser/observable/internal/list/ListQuery.js +7 -2
  37. package/build/browser/observable/internal/list/ListQuery.js.map +1 -1
  38. package/build/browser/observable/internal/list/ListQuery.test.js +277 -0
  39. package/build/browser/observable/internal/list/ListQuery.test.js.map +1 -0
  40. package/build/browser/observable/internal/list/ListQueryOptions.js.map +1 -1
  41. package/build/browser/observable/internal/objectset/ObjectSetQuery.js +7 -1
  42. package/build/browser/observable/internal/objectset/ObjectSetQuery.js.map +1 -1
  43. package/build/browser/observable/internal/objectset/ObjectSetQueryOptions.js.map +1 -1
  44. package/build/browser/observable/internal/testUtils.js +3 -1
  45. package/build/browser/observable/internal/testUtils.js.map +1 -1
  46. package/build/browser/ontology/loadActionMetadata.js +1 -3
  47. package/build/browser/ontology/loadActionMetadata.js.map +1 -1
  48. package/build/browser/ontology/loadFullObjectMetadata.js +1 -2
  49. package/build/browser/ontology/loadFullObjectMetadata.js.map +1 -1
  50. package/build/browser/ontology/loadInterfaceMetadata.js +1 -2
  51. package/build/browser/ontology/loadInterfaceMetadata.js.map +1 -1
  52. package/build/browser/queries/applyQuery.js +7 -12
  53. package/build/browser/queries/applyQuery.js.map +1 -1
  54. package/build/browser/queries/types.js.map +1 -1
  55. package/build/browser/util/UserAgent.js +2 -2
  56. package/build/browser/util/UserAgent.js.map +1 -1
  57. package/build/browser/util/extractObjectOrInterfaceType.js +1 -1
  58. package/build/browser/util/extractObjectOrInterfaceType.js.map +1 -1
  59. package/build/browser/util/extractObjectOrInterfaceType.test.js +2 -2
  60. package/build/browser/util/extractObjectOrInterfaceType.test.js.map +1 -1
  61. package/build/cjs/{Client-CF85LpFu.d.cts → Client-DaUJl7jZ.d.cts} +1 -1
  62. package/build/cjs/{chunk-S4JPAF56.cjs → chunk-6P7VLXH3.cjs} +78 -482
  63. package/build/cjs/chunk-6P7VLXH3.cjs.map +1 -0
  64. package/build/cjs/{chunk-DZE6IAUU.cjs → chunk-S3HJUSQ7.cjs} +50 -49
  65. package/build/cjs/chunk-S3HJUSQ7.cjs.map +1 -0
  66. package/build/cjs/{createClient-mOlFts15.d.cts → createClient-MAHmo-Nv.d.cts} +1 -2
  67. package/build/cjs/index.cjs +8 -12
  68. package/build/cjs/index.cjs.map +1 -1
  69. package/build/cjs/index.d.cts +3 -3
  70. package/build/cjs/public/internal.cjs +8 -8
  71. package/build/cjs/public/internal.d.cts +1 -1
  72. package/build/cjs/public/unstable-do-not-use.cjs +50 -36
  73. package/build/cjs/public/unstable-do-not-use.cjs.map +1 -1
  74. package/build/cjs/public/unstable-do-not-use.d.cts +33 -2
  75. package/build/esm/MinimalClientContext.js.map +1 -1
  76. package/build/esm/actions/applyAction.js +0 -4
  77. package/build/esm/actions/applyAction.js.map +1 -1
  78. package/build/esm/createClient.js +1 -2
  79. package/build/esm/createClient.js.map +1 -1
  80. package/build/esm/createClient.test.js +19 -1
  81. package/build/esm/createClient.test.js.map +1 -1
  82. package/build/esm/createMinimalClient.js +2 -3
  83. package/build/esm/createMinimalClient.js.map +1 -1
  84. package/build/esm/derivedProperties/createWithPropertiesObjectSet.js +1 -17
  85. package/build/esm/derivedProperties/createWithPropertiesObjectSet.js.map +1 -1
  86. package/build/esm/fetchMetadata.test.js +0 -11
  87. package/build/esm/fetchMetadata.test.js.map +1 -1
  88. package/build/esm/index.js +1 -1
  89. package/build/esm/index.js.map +1 -1
  90. package/build/esm/object/aggregate.js +1 -1
  91. package/build/esm/object/aggregate.js.map +1 -1
  92. package/build/esm/object/convertWireToOsdkObjects/BaseHolder.js.map +1 -1
  93. package/build/esm/object/convertWireToOsdkObjects/InterfaceHolder.js.map +1 -1
  94. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.js +0 -4
  95. package/build/esm/object/convertWireToOsdkObjects/createOsdkInterface.js.map +1 -1
  96. package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.js +0 -10
  97. package/build/esm/object/convertWireToOsdkObjects/createOsdkObject.js.map +1 -1
  98. package/build/esm/object/convertWireToOsdkObjects.test.js +0 -12
  99. package/build/esm/object/convertWireToOsdkObjects.test.js.map +1 -1
  100. package/build/esm/object/fetchPage.js +6 -3
  101. package/build/esm/object/fetchPage.js.map +1 -1
  102. package/build/esm/objectSet/createObjectSet.js +3 -3
  103. package/build/esm/objectSet/createObjectSet.js.map +1 -1
  104. package/build/esm/observable/ObservableClient.js.map +1 -1
  105. package/build/esm/observable/internal/base-list/BaseListQuery.js +4 -2
  106. package/build/esm/observable/internal/base-list/BaseListQuery.js.map +1 -1
  107. package/build/esm/observable/internal/getObjectTypesThatInvalidate.test.js +1 -1
  108. package/build/esm/observable/internal/getObjectTypesThatInvalidate.test.js.map +1 -1
  109. package/build/esm/observable/internal/list/ListQuery.js +7 -2
  110. package/build/esm/observable/internal/list/ListQuery.js.map +1 -1
  111. package/build/esm/observable/internal/list/ListQuery.test.js +277 -0
  112. package/build/esm/observable/internal/list/ListQuery.test.js.map +1 -0
  113. package/build/esm/observable/internal/list/ListQueryOptions.js.map +1 -1
  114. package/build/esm/observable/internal/objectset/ObjectSetQuery.js +7 -1
  115. package/build/esm/observable/internal/objectset/ObjectSetQuery.js.map +1 -1
  116. package/build/esm/observable/internal/objectset/ObjectSetQueryOptions.js.map +1 -1
  117. package/build/esm/observable/internal/testUtils.js +3 -1
  118. package/build/esm/observable/internal/testUtils.js.map +1 -1
  119. package/build/esm/ontology/loadActionMetadata.js +1 -3
  120. package/build/esm/ontology/loadActionMetadata.js.map +1 -1
  121. package/build/esm/ontology/loadFullObjectMetadata.js +1 -2
  122. package/build/esm/ontology/loadFullObjectMetadata.js.map +1 -1
  123. package/build/esm/ontology/loadInterfaceMetadata.js +1 -2
  124. package/build/esm/ontology/loadInterfaceMetadata.js.map +1 -1
  125. package/build/esm/queries/applyQuery.js +7 -12
  126. package/build/esm/queries/applyQuery.js.map +1 -1
  127. package/build/esm/queries/types.js.map +1 -1
  128. package/build/esm/util/UserAgent.js +2 -2
  129. package/build/esm/util/UserAgent.js.map +1 -1
  130. package/build/esm/util/extractObjectOrInterfaceType.js +1 -1
  131. package/build/esm/util/extractObjectOrInterfaceType.js.map +1 -1
  132. package/build/esm/util/extractObjectOrInterfaceType.test.js +2 -2
  133. package/build/esm/util/extractObjectOrInterfaceType.test.js.map +1 -1
  134. package/build/types/MinimalClientContext.d.ts +2 -3
  135. package/build/types/MinimalClientContext.d.ts.map +1 -1
  136. package/build/types/actions/applyAction.d.ts.map +1 -1
  137. package/build/types/createClient.d.ts +0 -1
  138. package/build/types/createClient.d.ts.map +1 -1
  139. package/build/types/index.d.ts +1 -1
  140. package/build/types/index.d.ts.map +1 -1
  141. package/build/types/observable/ObservableClient.d.ts +16 -0
  142. package/build/types/observable/ObservableClient.d.ts.map +1 -1
  143. package/build/types/observable/internal/base-list/BaseListQuery.d.ts.map +1 -1
  144. package/build/types/observable/internal/list/ListQuery.d.ts.map +1 -1
  145. package/build/types/observable/internal/list/ListQuery.test.d.ts.map +1 -0
  146. package/build/types/observable/internal/list/ListQueryOptions.d.ts +1 -0
  147. package/build/types/observable/internal/list/ListQueryOptions.d.ts.map +1 -1
  148. package/build/types/observable/internal/objectset/ObjectSetQuery.d.ts.map +1 -1
  149. package/build/types/observable/internal/objectset/ObjectSetQueryOptions.d.ts +15 -0
  150. package/build/types/observable/internal/objectset/ObjectSetQueryOptions.d.ts.map +1 -1
  151. package/build/types/observable/internal/testUtils.d.ts +1 -1
  152. package/build/types/observable/internal/testUtils.d.ts.map +1 -1
  153. package/build/types/queries/applyQuery.d.ts.map +1 -1
  154. package/build/types/queries/types.d.ts +1 -1
  155. package/build/types/queries/types.d.ts.map +1 -1
  156. package/package.json +13 -13
  157. package/build/browser/object/formatting/applyPropertyFormatter.js +0 -58
  158. package/build/browser/object/formatting/applyPropertyFormatter.js.map +0 -1
  159. package/build/browser/object/formatting/applyPropertyFormatter.test.js +0 -726
  160. package/build/browser/object/formatting/applyPropertyFormatter.test.js.map +0 -1
  161. package/build/browser/object/formatting/formatBoolean.js +0 -23
  162. package/build/browser/object/formatting/formatBoolean.js.map +0 -1
  163. package/build/browser/object/formatting/formatDateTime.js +0 -158
  164. package/build/browser/object/formatting/formatDateTime.js.map +0 -1
  165. package/build/browser/object/formatting/formatNumber.js +0 -242
  166. package/build/browser/object/formatting/formatNumber.js.map +0 -1
  167. package/build/browser/object/formatting/propertyFormattingUtils.js +0 -39
  168. package/build/browser/object/formatting/propertyFormattingUtils.js.map +0 -1
  169. package/build/cjs/chunk-DZE6IAUU.cjs.map +0 -1
  170. package/build/cjs/chunk-S4JPAF56.cjs.map +0 -1
  171. package/build/esm/object/formatting/applyPropertyFormatter.js +0 -58
  172. package/build/esm/object/formatting/applyPropertyFormatter.js.map +0 -1
  173. package/build/esm/object/formatting/applyPropertyFormatter.test.js +0 -726
  174. package/build/esm/object/formatting/applyPropertyFormatter.test.js.map +0 -1
  175. package/build/esm/object/formatting/formatBoolean.js +0 -23
  176. package/build/esm/object/formatting/formatBoolean.js.map +0 -1
  177. package/build/esm/object/formatting/formatDateTime.js +0 -158
  178. package/build/esm/object/formatting/formatDateTime.js.map +0 -1
  179. package/build/esm/object/formatting/formatNumber.js +0 -242
  180. package/build/esm/object/formatting/formatNumber.js.map +0 -1
  181. package/build/esm/object/formatting/propertyFormattingUtils.js +0 -39
  182. package/build/esm/object/formatting/propertyFormattingUtils.js.map +0 -1
  183. package/build/types/object/formatting/applyPropertyFormatter.d.ts +0 -18
  184. package/build/types/object/formatting/applyPropertyFormatter.d.ts.map +0 -1
  185. package/build/types/object/formatting/applyPropertyFormatter.test.d.ts.map +0 -1
  186. package/build/types/object/formatting/formatBoolean.d.ts +0 -5
  187. package/build/types/object/formatting/formatBoolean.d.ts.map +0 -1
  188. package/build/types/object/formatting/formatDateTime.d.ts +0 -6
  189. package/build/types/object/formatting/formatDateTime.d.ts.map +0 -1
  190. package/build/types/object/formatting/formatNumber.d.ts +0 -15
  191. package/build/types/object/formatting/formatNumber.d.ts.map +0 -1
  192. package/build/types/object/formatting/propertyFormattingUtils.d.ts +0 -10
  193. package/build/types/object/formatting/propertyFormattingUtils.d.ts.map +0 -1
  194. /package/build/types/{object/formatting/applyPropertyFormatter.test.d.ts → observable/internal/list/ListQuery.test.d.ts} +0 -0
@@ -85,7 +85,6 @@ describe("FetchMetadata", () => {
85
85
  "multiplicity": false,
86
86
  "nullable": true,
87
87
  "type": "string",
88
- "valueFormatting": undefined,
89
88
  "valueTypeApiName": undefined,
90
89
  },
91
90
  "employeeId": {
@@ -94,7 +93,6 @@ describe("FetchMetadata", () => {
94
93
  "multiplicity": false,
95
94
  "nullable": false,
96
95
  "type": "integer",
97
- "valueFormatting": undefined,
98
96
  "valueTypeApiName": undefined,
99
97
  },
100
98
  "employeeLocation": {
@@ -103,7 +101,6 @@ describe("FetchMetadata", () => {
103
101
  "multiplicity": false,
104
102
  "nullable": true,
105
103
  "type": "geotimeSeriesReference",
106
- "valueFormatting": undefined,
107
104
  "valueTypeApiName": undefined,
108
105
  },
109
106
  "employeeSensor": {
@@ -112,7 +109,6 @@ describe("FetchMetadata", () => {
112
109
  "multiplicity": false,
113
110
  "nullable": true,
114
111
  "type": "sensorTimeseries",
115
- "valueFormatting": undefined,
116
112
  "valueTypeApiName": undefined,
117
113
  },
118
114
  "employeeStatus": {
@@ -121,7 +117,6 @@ describe("FetchMetadata", () => {
121
117
  "multiplicity": false,
122
118
  "nullable": true,
123
119
  "type": "stringTimeseries",
124
- "valueFormatting": undefined,
125
120
  "valueTypeApiName": undefined,
126
121
  },
127
122
  "fullName": {
@@ -130,7 +125,6 @@ describe("FetchMetadata", () => {
130
125
  "multiplicity": false,
131
126
  "nullable": true,
132
127
  "type": "string",
133
- "valueFormatting": undefined,
134
128
  "valueTypeApiName": undefined,
135
129
  },
136
130
  "office": {
@@ -140,7 +134,6 @@ describe("FetchMetadata", () => {
140
134
  "multiplicity": false,
141
135
  "nullable": true,
142
136
  "type": "string",
143
- "valueFormatting": undefined,
144
137
  "valueTypeApiName": undefined,
145
138
  },
146
139
  "skillSet": {
@@ -149,7 +142,6 @@ describe("FetchMetadata", () => {
149
142
  "multiplicity": false,
150
143
  "nullable": true,
151
144
  "type": "string",
152
- "valueFormatting": undefined,
153
145
  "valueTypeApiName": undefined,
154
146
  },
155
147
  "skillSetEmbedding": {
@@ -158,7 +150,6 @@ describe("FetchMetadata", () => {
158
150
  "multiplicity": false,
159
151
  "nullable": true,
160
152
  "type": "vector",
161
- "valueFormatting": undefined,
162
153
  "valueTypeApiName": undefined,
163
154
  },
164
155
  "startDate": {
@@ -167,7 +158,6 @@ describe("FetchMetadata", () => {
167
158
  "multiplicity": false,
168
159
  "nullable": true,
169
160
  "type": "datetime",
170
- "valueFormatting": undefined,
171
161
  "valueTypeApiName": undefined,
172
162
  },
173
163
  },
@@ -206,7 +196,6 @@ describe("FetchMetadata", () => {
206
196
  "multiplicity": false,
207
197
  "nullable": true,
208
198
  "type": "string",
209
- "valueFormatting": undefined,
210
199
  "valueTypeApiName": undefined,
211
200
  },
212
201
  },
@@ -1 +1 @@
1
- {"version":3,"file":"fetchMetadata.test.js","names":["$Actions","$Interfaces","$Objects","$Queries","LegacyFauxFoundry","startNodeApiServer","beforeAll","describe","expect","expectTypeOf","it","createClient","client","testSetup","apiServer","close","objectMetadata","fetchMetadata","Employee","toEqualTypeOf","toMatchInlineSnapshot","interfaceMetadata","FooInterface","actionMetadata","moveOffice","queryMetadata","queryAcceptsObject"],"sources":["fetchMetadata.test.ts"],"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 */\n\nimport type {\n ActionMetadata,\n InterfaceMetadata,\n ObjectMetadata,\n QueryMetadata,\n} from \"@osdk/api\";\nimport {\n $Actions,\n $Interfaces,\n $Objects,\n $Queries,\n} from \"@osdk/client.test.ontology\";\nimport { LegacyFauxFoundry, startNodeApiServer } from \"@osdk/shared.test\";\nimport { beforeAll, describe, expect, expectTypeOf, it } from \"vitest\";\nimport type { Client } from \"./Client.js\";\nimport { createClient } from \"./createClient.js\";\n\ndescribe(\"FetchMetadata\", () => {\n let client: Client;\n\n beforeAll(() => {\n const testSetup = startNodeApiServer(new LegacyFauxFoundry(), createClient);\n ({ client } = testSetup);\n return () => {\n testSetup.apiServer.close();\n };\n });\n\n it(\"fetches object metadata correctly\", async () => {\n const objectMetadata = await client.fetchMetadata($Objects.Employee);\n\n expectTypeOf(objectMetadata).toEqualTypeOf<\n ObjectMetadata\n >();\n\n expect(objectMetadata).toMatchInlineSnapshot(`\n {\n \"apiName\": \"Employee\",\n \"description\": \"A full-time or part-time \n\n employee of our firm\",\n \"displayName\": \"Employee\",\n \"icon\": {\n \"color\": \"blue\",\n \"name\": \"person\",\n \"type\": \"blueprint\",\n },\n \"implements\": [\n \"FooInterface\",\n ],\n \"interfaceMap\": {\n \"FooInterface\": {\n \"fooSpt\": \"fullName\",\n },\n },\n \"inverseInterfaceMap\": {\n \"FooInterface\": {\n \"fullName\": \"fooSpt\",\n },\n },\n \"links\": {\n \"lead\": {\n \"multiplicity\": false,\n \"targetType\": \"Employee\",\n },\n \"officeLink\": {\n \"multiplicity\": false,\n \"targetType\": \"Office\",\n },\n \"peeps\": {\n \"multiplicity\": true,\n \"targetType\": \"Employee\",\n },\n \"visitedOffices\": {\n \"multiplicity\": true,\n \"targetType\": \"Office\",\n },\n },\n \"pluralDisplayName\": \"Employees\",\n \"primaryKeyApiName\": \"employeeId\",\n \"primaryKeyType\": \"integer\",\n \"properties\": {\n \"class\": {\n \"description\": \"\",\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"string\",\n \"valueFormatting\": undefined,\n \"valueTypeApiName\": undefined,\n },\n \"employeeId\": {\n \"description\": undefined,\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": false,\n \"type\": \"integer\",\n \"valueFormatting\": undefined,\n \"valueTypeApiName\": undefined,\n },\n \"employeeLocation\": {\n \"description\": \"Geotime series reference of the location of the employee\",\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"geotimeSeriesReference\",\n \"valueFormatting\": undefined,\n \"valueTypeApiName\": undefined,\n },\n \"employeeSensor\": {\n \"description\": \"TimeSeries sensor of the status of the employee\",\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"sensorTimeseries\",\n \"valueFormatting\": undefined,\n \"valueTypeApiName\": undefined,\n },\n \"employeeStatus\": {\n \"description\": \"TimeSeries of the status of the employee\",\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"stringTimeseries\",\n \"valueFormatting\": undefined,\n \"valueTypeApiName\": undefined,\n },\n \"fullName\": {\n \"description\": undefined,\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"string\",\n \"valueFormatting\": undefined,\n \"valueTypeApiName\": undefined,\n },\n \"office\": {\n \"description\": \"The unique \"ID\" of the employee's \\\\\"primary\\\\\" assigned office.\n This is some more text.\",\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"string\",\n \"valueFormatting\": undefined,\n \"valueTypeApiName\": undefined,\n },\n \"skillSet\": {\n \"description\": \"The skills of the employee\",\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"string\",\n \"valueFormatting\": undefined,\n \"valueTypeApiName\": undefined,\n },\n \"skillSetEmbedding\": {\n \"description\": \"Vectorized skill set\",\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"vector\",\n \"valueFormatting\": undefined,\n \"valueTypeApiName\": undefined,\n },\n \"startDate\": {\n \"description\": \"The date the employee was hired (most recently, if they were re-hired)\",\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"datetime\",\n \"valueFormatting\": undefined,\n \"valueTypeApiName\": undefined,\n },\n },\n \"rid\": \"ri.ontology.main.object-type.401ac022-89eb-4591-8b7e-0a912b9efb44\",\n \"status\": \"ACTIVE\",\n \"titleProperty\": \"fullName\",\n \"type\": \"object\",\n \"visibility\": \"NORMAL\",\n }\n `);\n });\n\n it(\"fetches interface metadata correctly\", async () => {\n const interfaceMetadata = await client.fetchMetadata(\n $Interfaces.FooInterface,\n );\n\n expectTypeOf(interfaceMetadata).toEqualTypeOf<\n InterfaceMetadata\n >();\n\n expect(interfaceMetadata).toMatchInlineSnapshot(`\n {\n \"apiName\": \"FooInterface\",\n \"description\": \"Interface for Foo\",\n \"displayName\": \"Foo Interface\",\n \"implementedBy\": [\n \"Employee\",\n \"Person\",\n ],\n \"implements\": [],\n \"links\": {\n \"toBar\": {\n \"multiplicity\": true,\n \"targetType\": \"interface\",\n \"targetTypeApiName\": \"BarInterface\",\n },\n },\n \"properties\": {\n \"fooSpt\": {\n \"description\": \"A foo\",\n \"displayName\": \"Foo\",\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"string\",\n \"valueFormatting\": undefined,\n \"valueTypeApiName\": undefined,\n },\n },\n \"rid\": \"ri.interface.main.interface.1\",\n \"type\": \"interface\",\n }\n `);\n });\n\n it(\"fetches action metadata correctly\", async () => {\n const actionMetadata = await client.fetchMetadata(\n $Actions.moveOffice,\n );\n\n expectTypeOf(actionMetadata).toEqualTypeOf<ActionMetadata>();\n\n expect(actionMetadata).toMatchInlineSnapshot(`\n {\n \"apiName\": \"moveOffice\",\n \"description\": \"Update an office's physical location\",\n \"displayName\": \"move-office\",\n \"modifiedEntities\": {\n \"Office\": {\n \"created\": false,\n \"modified\": true,\n },\n },\n \"parameters\": {\n \"newAddress\": {\n \"description\": \"The office's new physical address (not necessarily shipping address)\",\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"string\",\n },\n \"newCapacity\": {\n \"description\": \"The maximum seated-at-desk capacity of the new office (maximum fire-safe capacity may be higher)\",\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"integer\",\n },\n \"officeId\": {\n \"description\": undefined,\n \"multiplicity\": false,\n \"nullable\": false,\n \"type\": \"string\",\n },\n \"officeNames\": {\n \"description\": \"A list of all office names\",\n \"multiplicity\": true,\n \"nullable\": true,\n \"type\": \"integer\",\n },\n },\n \"rid\": \"ri.ontology.main.action-type.9f84017d-cf17-4fa8-84c3-8e01e5d594f2\",\n \"status\": \"ACTIVE\",\n \"type\": \"action\",\n }\n `);\n });\n\n it(\"fetches query metadata correctly\", async () => {\n const queryMetadata = await client.fetchMetadata(\n $Queries.queryAcceptsObject,\n );\n\n expectTypeOf(queryMetadata).toEqualTypeOf<QueryMetadata>();\n\n expect(queryMetadata).toMatchInlineSnapshot(`\n {\n \"apiName\": \"queryAcceptsObject\",\n \"description\": \"description of the query that takes object types\",\n \"displayName\": \"QueryAcceptsObject\",\n \"output\": {\n \"nullable\": false,\n \"object\": \"Employee\",\n \"type\": \"object\",\n },\n \"parameters\": {\n \"object\": {\n \"description\": undefined,\n \"nullable\": false,\n \"object\": \"Employee\",\n \"type\": \"object\",\n },\n },\n \"rid\": \"ri.function-registry.main.function.9b55870a-63c7-4d48-8f06-9627c0805968\",\n \"type\": \"query\",\n \"version\": \"0.11.0\",\n }\n `);\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA,SACEA,QAAQ,EACRC,WAAW,EACXC,QAAQ,EACRC,QAAQ,QACH,4BAA4B;AACnC,SAASC,iBAAiB,EAAEC,kBAAkB,QAAQ,mBAAmB;AACzE,SAASC,SAAS,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,YAAY,EAAEC,EAAE,QAAQ,QAAQ;AAEtE,SAASC,YAAY,QAAQ,mBAAmB;AAEhDJ,QAAQ,CAAC,eAAe,EAAE,MAAM;EAC9B,IAAIK,MAAc;EAElBN,SAAS,CAAC,MAAM;IACd,MAAMO,SAAS,GAAGR,kBAAkB,CAAC,IAAID,iBAAiB,CAAC,CAAC,EAAEO,YAAY,CAAC;IAC3E,CAAC;MAAEC;IAAO,CAAC,GAAGC,SAAS;IACvB,OAAO,MAAM;MACXA,SAAS,CAACC,SAAS,CAACC,KAAK,CAAC,CAAC;IAC7B,CAAC;EACH,CAAC,CAAC;EAEFL,EAAE,CAAC,mCAAmC,EAAE,YAAY;IAClD,MAAMM,cAAc,GAAG,MAAMJ,MAAM,CAACK,aAAa,CAACf,QAAQ,CAACgB,QAAQ,CAAC;IAEpET,YAAY,CAACO,cAAc,CAAC,CAACG,aAAa,CAExC,CAAC;IAEHX,MAAM,CAACQ,cAAc,CAAC,CAACI,qBAAqB,CAAC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,CAAC;EACJ,CAAC,CAAC;EAEFV,EAAE,CAAC,sCAAsC,EAAE,YAAY;IACrD,MAAMW,iBAAiB,GAAG,MAAMT,MAAM,CAACK,aAAa,CAClDhB,WAAW,CAACqB,YACd,CAAC;IAEDb,YAAY,CAACY,iBAAiB,CAAC,CAACF,aAAa,CAE3C,CAAC;IAEHX,MAAM,CAACa,iBAAiB,CAAC,CAACD,qBAAqB,CAAC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,CAAC;EACJ,CAAC,CAAC;EAEFV,EAAE,CAAC,mCAAmC,EAAE,YAAY;IAClD,MAAMa,cAAc,GAAG,MAAMX,MAAM,CAACK,aAAa,CAC/CjB,QAAQ,CAACwB,UACX,CAAC;IAEDf,YAAY,CAACc,cAAc,CAAC,CAACJ,aAAa,CAAiB,CAAC;IAE5DX,MAAM,CAACe,cAAc,CAAC,CAACH,qBAAqB,CAAC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,CAAC;EACJ,CAAC,CAAC;EAEFV,EAAE,CAAC,kCAAkC,EAAE,YAAY;IACjD,MAAMe,aAAa,GAAG,MAAMb,MAAM,CAACK,aAAa,CAC9Cd,QAAQ,CAACuB,kBACX,CAAC;IAEDjB,YAAY,CAACgB,aAAa,CAAC,CAACN,aAAa,CAAgB,CAAC;IAE1DX,MAAM,CAACiB,aAAa,CAAC,CAACL,qBAAqB,CAAC;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"fetchMetadata.test.js","names":["$Actions","$Interfaces","$Objects","$Queries","LegacyFauxFoundry","startNodeApiServer","beforeAll","describe","expect","expectTypeOf","it","createClient","client","testSetup","apiServer","close","objectMetadata","fetchMetadata","Employee","toEqualTypeOf","toMatchInlineSnapshot","interfaceMetadata","FooInterface","actionMetadata","moveOffice","queryMetadata","queryAcceptsObject"],"sources":["fetchMetadata.test.ts"],"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 */\n\nimport type {\n ActionMetadata,\n InterfaceMetadata,\n ObjectMetadata,\n QueryMetadata,\n} from \"@osdk/api\";\nimport {\n $Actions,\n $Interfaces,\n $Objects,\n $Queries,\n} from \"@osdk/client.test.ontology\";\nimport { LegacyFauxFoundry, startNodeApiServer } from \"@osdk/shared.test\";\nimport { beforeAll, describe, expect, expectTypeOf, it } from \"vitest\";\nimport type { Client } from \"./Client.js\";\nimport { createClient } from \"./createClient.js\";\n\ndescribe(\"FetchMetadata\", () => {\n let client: Client;\n\n beforeAll(() => {\n const testSetup = startNodeApiServer(new LegacyFauxFoundry(), createClient);\n ({ client } = testSetup);\n return () => {\n testSetup.apiServer.close();\n };\n });\n\n it(\"fetches object metadata correctly\", async () => {\n const objectMetadata = await client.fetchMetadata($Objects.Employee);\n\n expectTypeOf(objectMetadata).toEqualTypeOf<\n ObjectMetadata\n >();\n\n expect(objectMetadata).toMatchInlineSnapshot(`\n {\n \"apiName\": \"Employee\",\n \"description\": \"A full-time or part-time \n\n employee of our firm\",\n \"displayName\": \"Employee\",\n \"icon\": {\n \"color\": \"blue\",\n \"name\": \"person\",\n \"type\": \"blueprint\",\n },\n \"implements\": [\n \"FooInterface\",\n ],\n \"interfaceMap\": {\n \"FooInterface\": {\n \"fooSpt\": \"fullName\",\n },\n },\n \"inverseInterfaceMap\": {\n \"FooInterface\": {\n \"fullName\": \"fooSpt\",\n },\n },\n \"links\": {\n \"lead\": {\n \"multiplicity\": false,\n \"targetType\": \"Employee\",\n },\n \"officeLink\": {\n \"multiplicity\": false,\n \"targetType\": \"Office\",\n },\n \"peeps\": {\n \"multiplicity\": true,\n \"targetType\": \"Employee\",\n },\n \"visitedOffices\": {\n \"multiplicity\": true,\n \"targetType\": \"Office\",\n },\n },\n \"pluralDisplayName\": \"Employees\",\n \"primaryKeyApiName\": \"employeeId\",\n \"primaryKeyType\": \"integer\",\n \"properties\": {\n \"class\": {\n \"description\": \"\",\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"string\",\n \"valueTypeApiName\": undefined,\n },\n \"employeeId\": {\n \"description\": undefined,\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": false,\n \"type\": \"integer\",\n \"valueTypeApiName\": undefined,\n },\n \"employeeLocation\": {\n \"description\": \"Geotime series reference of the location of the employee\",\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"geotimeSeriesReference\",\n \"valueTypeApiName\": undefined,\n },\n \"employeeSensor\": {\n \"description\": \"TimeSeries sensor of the status of the employee\",\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"sensorTimeseries\",\n \"valueTypeApiName\": undefined,\n },\n \"employeeStatus\": {\n \"description\": \"TimeSeries of the status of the employee\",\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"stringTimeseries\",\n \"valueTypeApiName\": undefined,\n },\n \"fullName\": {\n \"description\": undefined,\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"string\",\n \"valueTypeApiName\": undefined,\n },\n \"office\": {\n \"description\": \"The unique \"ID\" of the employee's \\\\\"primary\\\\\" assigned office.\n This is some more text.\",\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"string\",\n \"valueTypeApiName\": undefined,\n },\n \"skillSet\": {\n \"description\": \"The skills of the employee\",\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"string\",\n \"valueTypeApiName\": undefined,\n },\n \"skillSetEmbedding\": {\n \"description\": \"Vectorized skill set\",\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"vector\",\n \"valueTypeApiName\": undefined,\n },\n \"startDate\": {\n \"description\": \"The date the employee was hired (most recently, if they were re-hired)\",\n \"displayName\": undefined,\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"datetime\",\n \"valueTypeApiName\": undefined,\n },\n },\n \"rid\": \"ri.ontology.main.object-type.401ac022-89eb-4591-8b7e-0a912b9efb44\",\n \"status\": \"ACTIVE\",\n \"titleProperty\": \"fullName\",\n \"type\": \"object\",\n \"visibility\": \"NORMAL\",\n }\n `);\n });\n\n it(\"fetches interface metadata correctly\", async () => {\n const interfaceMetadata = await client.fetchMetadata(\n $Interfaces.FooInterface,\n );\n\n expectTypeOf(interfaceMetadata).toEqualTypeOf<\n InterfaceMetadata\n >();\n\n expect(interfaceMetadata).toMatchInlineSnapshot(`\n {\n \"apiName\": \"FooInterface\",\n \"description\": \"Interface for Foo\",\n \"displayName\": \"Foo Interface\",\n \"implementedBy\": [\n \"Employee\",\n \"Person\",\n ],\n \"implements\": [],\n \"links\": {\n \"toBar\": {\n \"multiplicity\": true,\n \"targetType\": \"interface\",\n \"targetTypeApiName\": \"BarInterface\",\n },\n },\n \"properties\": {\n \"fooSpt\": {\n \"description\": \"A foo\",\n \"displayName\": \"Foo\",\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"string\",\n \"valueTypeApiName\": undefined,\n },\n },\n \"rid\": \"ri.interface.main.interface.1\",\n \"type\": \"interface\",\n }\n `);\n });\n\n it(\"fetches action metadata correctly\", async () => {\n const actionMetadata = await client.fetchMetadata(\n $Actions.moveOffice,\n );\n\n expectTypeOf(actionMetadata).toEqualTypeOf<ActionMetadata>();\n\n expect(actionMetadata).toMatchInlineSnapshot(`\n {\n \"apiName\": \"moveOffice\",\n \"description\": \"Update an office's physical location\",\n \"displayName\": \"move-office\",\n \"modifiedEntities\": {\n \"Office\": {\n \"created\": false,\n \"modified\": true,\n },\n },\n \"parameters\": {\n \"newAddress\": {\n \"description\": \"The office's new physical address (not necessarily shipping address)\",\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"string\",\n },\n \"newCapacity\": {\n \"description\": \"The maximum seated-at-desk capacity of the new office (maximum fire-safe capacity may be higher)\",\n \"multiplicity\": false,\n \"nullable\": true,\n \"type\": \"integer\",\n },\n \"officeId\": {\n \"description\": undefined,\n \"multiplicity\": false,\n \"nullable\": false,\n \"type\": \"string\",\n },\n \"officeNames\": {\n \"description\": \"A list of all office names\",\n \"multiplicity\": true,\n \"nullable\": true,\n \"type\": \"integer\",\n },\n },\n \"rid\": \"ri.ontology.main.action-type.9f84017d-cf17-4fa8-84c3-8e01e5d594f2\",\n \"status\": \"ACTIVE\",\n \"type\": \"action\",\n }\n `);\n });\n\n it(\"fetches query metadata correctly\", async () => {\n const queryMetadata = await client.fetchMetadata(\n $Queries.queryAcceptsObject,\n );\n\n expectTypeOf(queryMetadata).toEqualTypeOf<QueryMetadata>();\n\n expect(queryMetadata).toMatchInlineSnapshot(`\n {\n \"apiName\": \"queryAcceptsObject\",\n \"description\": \"description of the query that takes object types\",\n \"displayName\": \"QueryAcceptsObject\",\n \"output\": {\n \"nullable\": false,\n \"object\": \"Employee\",\n \"type\": \"object\",\n },\n \"parameters\": {\n \"object\": {\n \"description\": undefined,\n \"nullable\": false,\n \"object\": \"Employee\",\n \"type\": \"object\",\n },\n },\n \"rid\": \"ri.function-registry.main.function.9b55870a-63c7-4d48-8f06-9627c0805968\",\n \"type\": \"query\",\n \"version\": \"0.11.0\",\n }\n `);\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA,SACEA,QAAQ,EACRC,WAAW,EACXC,QAAQ,EACRC,QAAQ,QACH,4BAA4B;AACnC,SAASC,iBAAiB,EAAEC,kBAAkB,QAAQ,mBAAmB;AACzE,SAASC,SAAS,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,YAAY,EAAEC,EAAE,QAAQ,QAAQ;AAEtE,SAASC,YAAY,QAAQ,mBAAmB;AAEhDJ,QAAQ,CAAC,eAAe,EAAE,MAAM;EAC9B,IAAIK,MAAc;EAElBN,SAAS,CAAC,MAAM;IACd,MAAMO,SAAS,GAAGR,kBAAkB,CAAC,IAAID,iBAAiB,CAAC,CAAC,EAAEO,YAAY,CAAC;IAC3E,CAAC;MAAEC;IAAO,CAAC,GAAGC,SAAS;IACvB,OAAO,MAAM;MACXA,SAAS,CAACC,SAAS,CAACC,KAAK,CAAC,CAAC;IAC7B,CAAC;EACH,CAAC,CAAC;EAEFL,EAAE,CAAC,mCAAmC,EAAE,YAAY;IAClD,MAAMM,cAAc,GAAG,MAAMJ,MAAM,CAACK,aAAa,CAACf,QAAQ,CAACgB,QAAQ,CAAC;IAEpET,YAAY,CAACO,cAAc,CAAC,CAACG,aAAa,CAExC,CAAC;IAEHX,MAAM,CAACQ,cAAc,CAAC,CAACI,qBAAqB,CAAC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,CAAC;EACJ,CAAC,CAAC;EAEFV,EAAE,CAAC,sCAAsC,EAAE,YAAY;IACrD,MAAMW,iBAAiB,GAAG,MAAMT,MAAM,CAACK,aAAa,CAClDhB,WAAW,CAACqB,YACd,CAAC;IAEDb,YAAY,CAACY,iBAAiB,CAAC,CAACF,aAAa,CAE3C,CAAC;IAEHX,MAAM,CAACa,iBAAiB,CAAC,CAACD,qBAAqB,CAAC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,CAAC;EACJ,CAAC,CAAC;EAEFV,EAAE,CAAC,mCAAmC,EAAE,YAAY;IAClD,MAAMa,cAAc,GAAG,MAAMX,MAAM,CAACK,aAAa,CAC/CjB,QAAQ,CAACwB,UACX,CAAC;IAEDf,YAAY,CAACc,cAAc,CAAC,CAACJ,aAAa,CAAiB,CAAC;IAE5DX,MAAM,CAACe,cAAc,CAAC,CAACH,qBAAqB,CAAC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,CAAC;EACJ,CAAC,CAAC;EAEFV,EAAE,CAAC,kCAAkC,EAAE,YAAY;IACjD,MAAMe,aAAa,GAAG,MAAMb,MAAM,CAACK,aAAa,CAC9Cd,QAAQ,CAACuB,kBACX,CAAC;IAEDjB,YAAY,CAACgB,aAAa,CAAC,CAACN,aAAa,CAAgB,CAAC;IAE1DX,MAAM,CAACiB,aAAa,CAAC,CAACL,qBAAqB,CAAC;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -16,7 +16,7 @@
16
16
 
17
17
  /* eslint-disable @typescript-eslint/no-deprecated */
18
18
 
19
- export { isOk, NULL_VALUE } from "@osdk/api";
19
+ export { isOk } from "@osdk/api";
20
20
  export { PalantirApiError } from "@osdk/shared.net.errors";
21
21
  export { ActionValidationError } from "./actions/ActionValidationError.js";
22
22
  export { createClient } from "./createClient.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["isOk","NULL_VALUE","PalantirApiError","ActionValidationError","createClient","createPlatformClient","createAttachmentUpload","extractDate","extractDateInLocalTime","extractDateInUTC","createObjectSpecifierFromPrimaryKey","extractPrimaryKeyFromObjectSpecifier"],"sources":["index.ts"],"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\n/* eslint-disable @typescript-eslint/no-deprecated */\n\nexport { isOk, NULL_VALUE } from \"@osdk/api\";\nexport type {\n ActionDefinition,\n ActionEditResponse,\n ActionMetadata,\n ActionParam,\n ActionReturnTypeForOptions,\n ActionValidationResponse,\n ApplyActionOptions,\n ApplyBatchActionOptions,\n Attachment,\n CompileTimeMetadata,\n DerivedProperty,\n InterfaceDefinition,\n InterfaceMetadata,\n Logger,\n MediaReference,\n MediaUpload,\n ObjectMetadata,\n ObjectSet,\n ObjectSpecifier,\n ObjectTypeDefinition,\n Osdk,\n OsdkObject,\n OsdkObjectCreatePropertyType,\n OsdkObjectPropertyType,\n PageResult,\n PropertyDef,\n PropertyKeys,\n PropertyValueWireToClient,\n QueryDefinition,\n QueryParam,\n QueryResult,\n Range,\n Result,\n SingleLinkAccessor,\n ThreeDimensionalAggregation,\n TwoDimensionalAggregation,\n VersionBound,\n WhereClause,\n} from \"@osdk/api\";\nexport { PalantirApiError } from \"@osdk/shared.net.errors\";\n\nexport { ActionValidationError } from \"./actions/ActionValidationError.js\";\nexport type { Client } from \"./Client.js\";\nexport { createClient } from \"./createClient.js\";\nexport { createPlatformClient } from \"./createPlatformClient.js\";\nexport type { PlatformClient } from \"./createPlatformClient.js\";\nexport { createAttachmentUpload } from \"./object/AttachmentUpload.js\";\nexport type { ResultOrError } from \"./ResultOrError.js\";\n\nexport {\n extractDate,\n extractDateInLocalTime,\n extractDateInUTC,\n} from \"./util/datetimeConverters.js\";\n\nexport {\n createObjectSpecifierFromPrimaryKey,\n extractPrimaryKeyFromObjectSpecifier,\n} from \"./util/objectSpecifierUtils.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,SAASA,IAAI,EAAEC,UAAU,QAAQ,WAAW;AAyC5C,SAASC,gBAAgB,QAAQ,yBAAyB;AAE1D,SAASC,qBAAqB,QAAQ,oCAAoC;AAE1E,SAASC,YAAY,QAAQ,mBAAmB;AAChD,SAASC,oBAAoB,QAAQ,2BAA2B;AAEhE,SAASC,sBAAsB,QAAQ,8BAA8B;AAGrE,SACEC,WAAW,EACXC,sBAAsB,EACtBC,gBAAgB,QACX,8BAA8B;AAErC,SACEC,mCAAmC,EACnCC,oCAAoC,QAC/B,gCAAgC","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["isOk","PalantirApiError","ActionValidationError","createClient","createPlatformClient","createAttachmentUpload","extractDate","extractDateInLocalTime","extractDateInUTC","createObjectSpecifierFromPrimaryKey","extractPrimaryKeyFromObjectSpecifier"],"sources":["index.ts"],"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\n/* eslint-disable @typescript-eslint/no-deprecated */\n\nexport { isOk } from \"@osdk/api\";\nexport type {\n ActionDefinition,\n ActionEditResponse,\n ActionMetadata,\n ActionParam,\n ActionReturnTypeForOptions,\n ActionValidationResponse,\n ApplyActionOptions,\n ApplyBatchActionOptions,\n Attachment,\n CompileTimeMetadata,\n DerivedProperty,\n InterfaceDefinition,\n InterfaceMetadata,\n Logger,\n MediaReference,\n MediaUpload,\n ObjectMetadata,\n ObjectSet,\n ObjectSpecifier,\n ObjectTypeDefinition,\n Osdk,\n OsdkObject,\n OsdkObjectCreatePropertyType,\n OsdkObjectPropertyType,\n PageResult,\n PropertyDef,\n PropertyKeys,\n PropertyValueWireToClient,\n QueryDefinition,\n QueryParam,\n QueryResult,\n Range,\n Result,\n SingleLinkAccessor,\n ThreeDimensionalAggregation,\n TwoDimensionalAggregation,\n VersionBound,\n WhereClause,\n} from \"@osdk/api\";\nexport { PalantirApiError } from \"@osdk/shared.net.errors\";\n\nexport { ActionValidationError } from \"./actions/ActionValidationError.js\";\nexport type { Client } from \"./Client.js\";\nexport { createClient } from \"./createClient.js\";\nexport { createPlatformClient } from \"./createPlatformClient.js\";\nexport type { PlatformClient } from \"./createPlatformClient.js\";\nexport { createAttachmentUpload } from \"./object/AttachmentUpload.js\";\nexport type { ResultOrError } from \"./ResultOrError.js\";\n\nexport {\n extractDate,\n extractDateInLocalTime,\n extractDateInUTC,\n} from \"./util/datetimeConverters.js\";\n\nexport {\n createObjectSpecifierFromPrimaryKey,\n extractPrimaryKeyFromObjectSpecifier,\n} from \"./util/objectSpecifierUtils.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,SAASA,IAAI,QAAQ,WAAW;AAyChC,SAASC,gBAAgB,QAAQ,yBAAyB;AAE1D,SAASC,qBAAqB,QAAQ,oCAAoC;AAE1E,SAASC,YAAY,QAAQ,mBAAmB;AAChD,SAASC,oBAAoB,QAAQ,2BAA2B;AAEhE,SAASC,sBAAsB,QAAQ,8BAA8B;AAGrE,SACEC,WAAW,EACXC,sBAAsB,EACtBC,gBAAgB,QACX,8BAA8B;AAErC,SACEC,mCAAmC,EACnCC,oCAAoC,QAC/B,gCAAgC","ignoreList":[]}
@@ -38,7 +38,7 @@ export async function aggregate(clientCtx, objectType, objectSet = resolveBaseOb
38
38
  groupBy: body.groupBy,
39
39
  aggregation: body.aggregation
40
40
  }, {
41
- branch: clientCtx.branch
41
+ transactionId: clientCtx.transactionId
42
42
  });
43
43
  if (!req.$groupBy) {
44
44
  !(result.data.length === 1) ? process.env.NODE_ENV !== "production" ? invariant(false, "no group by clause should mean only one data result") : invariant(false) : void 0;
@@ -1 +1 @@
1
- {"version":3,"file":"aggregate.js","names":["OntologiesV2","invariant","legacyToModernSingleAggregationResult","modernToLegacyAggregationClause","modernToLegacyGroupByClause","addUserAgentAndRequestContextHeaders","resolveBaseObjectSetType","aggregate","clientCtx","objectType","objectSet","req","body","aggregation","$select","groupBy","where","undefined","$groupBy","result","OntologyObjectSets","ontologyRid","branch","data","length","process","env","NODE_ENV","aggregationToCountResult","ret","map","entry","$group","group","aggregateResult","metrics","name","$count","value"],"sources":["aggregate.ts"],"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\nimport type {\n AggregateOpts,\n AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy,\n AggregationResultsWithGroups,\n AggregationsResults,\n ObjectOrInterfaceDefinition,\n} from \"@osdk/api\";\nimport type {\n AggregateObjectsRequestV2,\n AggregateObjectsResponseV2,\n ObjectSet,\n} from \"@osdk/foundry.ontologies\";\nimport * as OntologiesV2 from \"@osdk/foundry.ontologies\";\nimport invariant from \"tiny-invariant\";\nimport { legacyToModernSingleAggregationResult } from \"../internal/conversions/legacyToModernSingleAggregationResult.js\";\nimport { modernToLegacyAggregationClause } from \"../internal/conversions/modernToLegacyAggregationClause.js\";\nimport { modernToLegacyGroupByClause } from \"../internal/conversions/modernToLegacyGroupByClause.js\";\nimport type { MinimalClient } from \"../MinimalClientContext.js\";\nimport { addUserAgentAndRequestContextHeaders } from \"../util/addUserAgentAndRequestContextHeaders.js\";\nimport type { ArrayElement } from \"../util/ArrayElement.js\";\nimport { resolveBaseObjectSetType } from \"../util/objectSetUtils.js\";\n\n/** @internal */\nexport async function aggregate<\n Q extends ObjectOrInterfaceDefinition,\n AO extends AggregateOpts<Q>,\n>(\n clientCtx: MinimalClient,\n objectType: Q,\n objectSet: ObjectSet = resolveBaseObjectSetType(objectType),\n req: AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy<Q, AO>,\n): Promise<AggregationsResults<Q, AO>> {\n const resolvedObjectSet = resolveBaseObjectSetType(objectType);\n const body: AggregateObjectsRequestV2 = {\n aggregation: modernToLegacyAggregationClause<AO[\"$select\"]>(\n req.$select,\n ),\n groupBy: [],\n where: undefined,\n };\n\n if (req.$groupBy) {\n body.groupBy = modernToLegacyGroupByClause(req.$groupBy);\n }\n\n const result = await OntologiesV2.OntologyObjectSets.aggregate(\n addUserAgentAndRequestContextHeaders(clientCtx, objectType),\n await clientCtx.ontologyRid,\n {\n objectSet,\n groupBy: body.groupBy,\n aggregation: body.aggregation,\n },\n { branch: clientCtx.branch },\n );\n\n if (!req.$groupBy) {\n invariant(\n result.data.length === 1,\n \"no group by clause should mean only one data result\",\n );\n\n return {\n ...aggregationToCountResult(result.data[0]),\n ...legacyToModernSingleAggregationResult(\n result.data[0],\n ),\n } as any;\n }\n\n const ret: AggregationResultsWithGroups<Q, AO[\"$select\"], any> = result.data\n .map((entry) => {\n return {\n $group: entry.group as any,\n ...aggregationToCountResult(entry),\n ...legacyToModernSingleAggregationResult(entry),\n };\n }) as any; // fixme\n\n return ret as any; // FIXME\n}\n\nfunction aggregationToCountResult(\n entry: ArrayElement<AggregateObjectsResponseV2[\"data\"]>,\n): { $count: number } | undefined {\n for (const aggregateResult of entry.metrics) {\n if (aggregateResult.name === \"count\") {\n return { $count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AD1B1B,SAAS,QAEP,qDAAqD,IAFvDA,SAAS;IAKT,OAAO;MACL,GAAG2B,wBAAwB,CAACT,MAAM,CAACI,IAAI,CAAC,CAAC,CAAC,CAAC;MAC3C,GAAGrB,qCAAqC,CACtCiB,MAAM,CAACI,IAAI,CAAC,CAAC,CACf;IACF,CAAC;EACH;EAEA,MAAMM,GAAwD,GAAGV,MAAM,CAACI,IAAI,CACzEO,GAAG,CAAEC,KAAK,IAAK;IACd,OAAO;MACLC,MAAM,EAAED,KAAK,CAACE,KAAY;MAC1B,GAAGL,wBAAwB,CAACG,KAAK,CAAC;MAClC,GAAG7B,qCAAqC,CAAC6B,KAAK;IAChD,CAAC;EACH,CAAC,CAAQ,CAAC,CAAC;;EAEb,OAAOF,GAAG,CAAQ,CAAC;AACrB;AAEA,SAASD,wBAAwBA,CAC/BG,KAAuD,EACvB;EAChC,KAAK,MAAMG,eAAe,IAAIH,KAAK,CAACI,OAAO,EAAE;IAC3C,IAAID,eAAe,CAACE,IAAI,KAAK,OAAO,EAAE;MACpC,OAAO;QAAEC,MAAM,EAAEH,eAAe,CAACI;MAAM,CAAC;IAC1C;EACF;AACF","ignoreList":[]}
1
+ {"version":3,"file":"aggregate.js","names":["OntologiesV2","invariant","legacyToModernSingleAggregationResult","modernToLegacyAggregationClause","modernToLegacyGroupByClause","addUserAgentAndRequestContextHeaders","resolveBaseObjectSetType","aggregate","clientCtx","objectType","objectSet","req","body","aggregation","$select","groupBy","where","undefined","$groupBy","result","OntologyObjectSets","ontologyRid","transactionId","data","length","process","env","NODE_ENV","aggregationToCountResult","ret","map","entry","$group","group","aggregateResult","metrics","name","$count","value"],"sources":["aggregate.ts"],"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\nimport type {\n AggregateOpts,\n AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy,\n AggregationResultsWithGroups,\n AggregationsResults,\n ObjectOrInterfaceDefinition,\n} from \"@osdk/api\";\nimport type {\n AggregateObjectsRequestV2,\n AggregateObjectsResponseV2,\n ObjectSet,\n} from \"@osdk/foundry.ontologies\";\nimport * as OntologiesV2 from \"@osdk/foundry.ontologies\";\nimport invariant from \"tiny-invariant\";\nimport { legacyToModernSingleAggregationResult } from \"../internal/conversions/legacyToModernSingleAggregationResult.js\";\nimport { modernToLegacyAggregationClause } from \"../internal/conversions/modernToLegacyAggregationClause.js\";\nimport { modernToLegacyGroupByClause } from \"../internal/conversions/modernToLegacyGroupByClause.js\";\nimport type { MinimalClient } from \"../MinimalClientContext.js\";\nimport { addUserAgentAndRequestContextHeaders } from \"../util/addUserAgentAndRequestContextHeaders.js\";\nimport type { ArrayElement } from \"../util/ArrayElement.js\";\nimport { resolveBaseObjectSetType } from \"../util/objectSetUtils.js\";\n\n/** @internal */\nexport async function aggregate<\n Q extends ObjectOrInterfaceDefinition,\n AO extends AggregateOpts<Q>,\n>(\n clientCtx: MinimalClient,\n objectType: Q,\n objectSet: ObjectSet = resolveBaseObjectSetType(objectType),\n req: AggregateOptsThatErrorsAndDisallowsOrderingWithMultipleGroupBy<Q, AO>,\n): Promise<AggregationsResults<Q, AO>> {\n const resolvedObjectSet = resolveBaseObjectSetType(objectType);\n const body: AggregateObjectsRequestV2 = {\n aggregation: modernToLegacyAggregationClause<AO[\"$select\"]>(\n req.$select,\n ),\n groupBy: [],\n where: undefined,\n };\n\n if (req.$groupBy) {\n body.groupBy = modernToLegacyGroupByClause(req.$groupBy);\n }\n\n const result = await OntologiesV2.OntologyObjectSets.aggregate(\n addUserAgentAndRequestContextHeaders(clientCtx, objectType),\n await clientCtx.ontologyRid,\n {\n objectSet,\n groupBy: body.groupBy,\n aggregation: body.aggregation,\n },\n { transactionId: clientCtx.transactionId },\n );\n\n if (!req.$groupBy) {\n invariant(\n result.data.length === 1,\n \"no group by clause should mean only one data result\",\n );\n\n return {\n ...aggregationToCountResult(result.data[0]),\n ...legacyToModernSingleAggregationResult(\n result.data[0],\n ),\n } as any;\n }\n\n const ret: AggregationResultsWithGroups<Q, AO[\"$select\"], any> = result.data\n .map((entry) => {\n return {\n $group: entry.group as any,\n ...aggregationToCountResult(entry),\n ...legacyToModernSingleAggregationResult(entry),\n };\n }) as any; // fixme\n\n return ret as any; // FIXME\n}\n\nfunction aggregationToCountResult(\n entry: ArrayElement<AggregateObjectsResponseV2[\"data\"]>,\n): { $count: number } | undefined {\n for (const aggregateResult of entry.metrics) {\n if (aggregateResult.name === \"count\") {\n return { $count: aggregateResult.value };\n }\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAcA,OAAO,KAAKA,YAAY,MAAM,0BAA0B;AACxD,OAAOC,SAAS,MAAM,gBAAgB;AACtC,SAASC,qCAAqC,QAAQ,kEAAkE;AACxH,SAASC,+BAA+B,QAAQ,4DAA4D;AAC5G,SAASC,2BAA2B,QAAQ,wDAAwD;AAEpG,SAASC,oCAAoC,QAAQ,iDAAiD;AAEtG,SAASC,wBAAwB,QAAQ,2BAA2B;;AAEpE;AACA,OAAO,eAAeC,SAASA,CAI7BC,SAAwB,EACxBC,UAAa,EACbC,SAAoB,GAAGJ,wBAAwB,CAACG,UAAU,CAAC,EAC3DE,GAA0E,EACrC;EACXL,wBAAwB,CAACG,UAAU,CAAC;EAC9D,MAAMG,IAA+B,GAAG;IACtCC,WAAW,EAAEV,+BAA+B,CAC1CQ,GAAG,CAACG,OACN,CAAC;IACDC,OAAO,EAAE,EAAE;IACXC,KAAK,EAAEC;EACT,CAAC;EAED,IAAIN,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;MAAM,CAAC;IAC1C;EACF;AACF","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"BaseHolder.js","names":[],"sources":["BaseHolder.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 {\n ObjectMetadata,\n ObjectOrInterfaceDefinition,\n ObjectSpecifier,\n} from \"@osdk/api\";\nimport type { FormatPropertyOptions } from \"../formatting/applyPropertyFormatter.js\";\nimport type { InterfaceHolder } from \"./InterfaceHolder.js\";\nimport type { UnderlyingOsdkObject } from \"./InternalSymbols.js\";\nimport type { ObjectHolder } from \"./ObjectHolder.js\";\n\n/** @internal */\n\nexport interface BaseHolder {\n readonly [UnderlyingOsdkObject]: ObjectHolder;\n\n readonly $apiName: string;\n readonly $objectType: string;\n readonly $primaryKey: string | number;\n readonly $title: string | undefined;\n readonly $objectSpecifier: ObjectSpecifier<any>;\n\n readonly \"$as\": (\n newDef: string | ObjectOrInterfaceDefinition,\n ) => ObjectHolder | InterfaceHolder;\n\n readonly \"$clone\": (\n newProps?: Record<string, any>,\n ) => this;\n\n readonly \"$__EXPERIMENTAL__NOT_SUPPORTED_YET__metadata\": {\n readonly ObjectMetadata: ObjectMetadata;\n };\n\n readonly \"$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue\": <\n PropertyApiName extends string,\n >(\n propertyApiName: PropertyApiName,\n options?: FormatPropertyOptions,\n ) => string | undefined;\n\n // [key: `$$${string}`]: any;\n // Unlike SimpleOsdkProperties, all of our remaining types are unknown as the full\n // union is basically `any` when you consider the above fields.\n [key: string]: unknown;\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"BaseHolder.js","names":[],"sources":["BaseHolder.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 {\n ObjectMetadata,\n ObjectOrInterfaceDefinition,\n ObjectSpecifier,\n} from \"@osdk/api\";\nimport type { InterfaceHolder } from \"./InterfaceHolder.js\";\nimport type { UnderlyingOsdkObject } from \"./InternalSymbols.js\";\nimport type { ObjectHolder } from \"./ObjectHolder.js\";\n\n/** @internal */\n\nexport interface BaseHolder {\n readonly [UnderlyingOsdkObject]: ObjectHolder;\n\n readonly $apiName: string;\n readonly $objectType: string;\n readonly $primaryKey: string | number;\n readonly $title: string | undefined;\n readonly $objectSpecifier: ObjectSpecifier<any>;\n\n readonly \"$as\": (\n newDef: string | ObjectOrInterfaceDefinition,\n ) => ObjectHolder | InterfaceHolder;\n\n readonly \"$clone\": (\n newProps?: Record<string, any>,\n ) => this;\n\n readonly \"$__EXPERIMENTAL__NOT_SUPPORTED_YET__metadata\": {\n readonly ObjectMetadata: ObjectMetadata;\n };\n\n // [key: `$$${string}`]: any;\n // Unlike SimpleOsdkProperties, all of our remaining types are unknown as the full\n // union is basically `any` when you consider the above fields.\n [key: string]: unknown;\n}\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"InterfaceHolder.js","names":[],"sources":["InterfaceHolder.ts"],"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 */\n\nimport type { InterfaceMetadata, ObjectMetadata, Osdk } from \"@osdk/api\";\nimport type { FormatPropertyOptions } from \"../formatting/applyPropertyFormatter.js\";\nimport type { BaseHolder } from \"./BaseHolder.js\";\nimport type { InterfaceDefRef } from \"./InternalSymbols.js\";\n\n/** @internal */\nexport interface InterfaceHolder<\n _Q extends Osdk.Instance<any> = never,\n> extends BaseHolder {\n [InterfaceDefRef]: InterfaceMetadata;\n\n readonly \"$__EXPERIMENTAL__NOT_SUPPORTED_YET__metadata\": {\n readonly ObjectMetadata: ObjectMetadata;\n readonly InterfaceMetadata: InterfaceMetadata;\n };\n\n readonly \"$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue\": <\n PropertyApiName extends string,\n >(\n propertyApiName: PropertyApiName,\n options?: FormatPropertyOptions,\n ) => string | undefined;\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"InterfaceHolder.js","names":[],"sources":["InterfaceHolder.ts"],"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 */\n\nimport type { InterfaceMetadata, ObjectMetadata, Osdk } from \"@osdk/api\";\nimport type { BaseHolder } from \"./BaseHolder.js\";\nimport type { InterfaceDefRef } from \"./InternalSymbols.js\";\n\n/** @internal */\nexport interface InterfaceHolder<\n _Q extends Osdk.Instance<any> = never,\n> extends BaseHolder {\n [InterfaceDefRef]: InterfaceMetadata;\n\n readonly \"$__EXPERIMENTAL__NOT_SUPPORTED_YET__metadata\": {\n readonly ObjectMetadata: ObjectMetadata;\n readonly InterfaceMetadata: InterfaceMetadata;\n };\n}\n"],"mappings":"","ignoreList":[]}
@@ -64,10 +64,6 @@ export function createOsdkInterface(underlying, interfaceDef) {
64
64
  },
65
65
  enumerable: false
66
66
  },
67
- "$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue": {
68
- value: underlying.$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue,
69
- enumerable: false
70
- },
71
67
  "$link": {
72
68
  get: function () {
73
69
  return get$linkForInterface(this);
@@ -1 +1 @@
1
- {"version":3,"file":"createOsdkInterface.js","names":["extractNamespace","get$linkForInterface","InterfaceDefRef","ObjectDefRef","UnderlyingOsdkObject","createOsdkInterface","underlying","interfaceDef","objApiNamespace","apiName","Object","freeze","defineProperties","value","enumerable","$as","$objectType","$primaryKey","$objectSpecifier","$title","$rid","clone","$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue","get","fromEntries","keys","properties","map","p","objDef","apiNamespace","targetPropName","interfaceMap","update","$clone","key","Error","remappedProps","mapProperty","filter","x","propertyName"],"sources":["createOsdkInterface.ts"],"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 */\n\nimport type { InterfaceMetadata } from \"@osdk/api\";\nimport { extractNamespace } from \"../../internal/conversions/extractNamespace.js\";\nimport type { FetchedObjectTypeDefinition } from \"../../ontology/OntologyProvider.js\";\nimport { get$linkForInterface } from \"./getDollarLink.js\";\nimport type { InterfaceHolder } from \"./InterfaceHolder.js\";\nimport {\n InterfaceDefRef,\n ObjectDefRef,\n UnderlyingOsdkObject,\n} from \"./InternalSymbols.js\";\nimport type { ObjectHolder } from \"./ObjectHolder.js\";\n\n/** @internal */\nexport function createOsdkInterface<\n Q extends FetchedObjectTypeDefinition,\n>(\n underlying: ObjectHolder,\n interfaceDef: InterfaceMetadata,\n): InterfaceHolder {\n const [objApiNamespace] = extractNamespace(interfaceDef.apiName);\n\n return Object.freeze(\n Object.defineProperties({}, {\n // first to minimize hidden classes\n [UnderlyingOsdkObject]: { value: underlying },\n\n \"$apiName\": { value: interfaceDef.apiName, enumerable: true },\n \"$as\": {\n value: underlying.$as,\n enumerable: false,\n },\n \"$objectType\": {\n value: underlying.$objectType,\n enumerable: \"$objectType\" in underlying,\n },\n \"$primaryKey\": {\n value: underlying.$primaryKey,\n enumerable: \"$primaryKey\" in underlying,\n },\n \"$objectSpecifier\": {\n value: underlying.$objectSpecifier,\n enumerable: \"$objectSpecifier\" in underlying,\n },\n \"$title\": {\n value: underlying.$title,\n enumerable: \"$title\" in underlying,\n },\n \"$rid\": {\n value: (underlying as any).$rid,\n enumerable: \"$rid\" in underlying,\n },\n \"$clone\": {\n value: clone,\n enumerable: false,\n },\n \"$__EXPERIMENTAL__NOT_SUPPORTED_YET__metadata\": {\n value: {\n \"ObjectMetadata\": underlying[ObjectDefRef],\n \"InterfaceMetadata\": interfaceDef,\n },\n enumerable: false,\n },\n \"$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue\": {\n value: underlying.$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue,\n enumerable: false,\n },\n\n \"$link\": {\n get: function(this: InterfaceHolder) {\n return get$linkForInterface(this);\n },\n },\n\n [InterfaceDefRef]: { value: interfaceDef },\n\n ...Object.fromEntries(\n Object.keys(interfaceDef.properties).map(p => {\n const objDef = underlying[ObjectDefRef];\n\n const [apiNamespace, apiName] = extractNamespace(p);\n\n const targetPropName = objDef\n .interfaceMap![interfaceDef.apiName][p];\n\n return [apiNamespace === objApiNamespace ? apiName : p, {\n enumerable: targetPropName in underlying,\n value: underlying[targetPropName as keyof typeof underlying],\n }];\n }),\n ),\n }) as InterfaceHolder,\n );\n function clone(update: Record<string, any> | undefined) {\n if (update == null) {\n return underlying.$clone().$as(interfaceDef);\n }\n\n for (const key of Object.keys(update)) {\n if (!(key in interfaceDef.properties)) {\n throw new Error(\n `Invalid property ${key} for interface ${interfaceDef.apiName}`,\n );\n }\n }\n\n const remappedProps = Object.fromEntries(\n Object.keys(update).map(p => mapProperty(p, update[p])).filter(x =>\n x != null\n ),\n );\n\n return underlying.$clone(remappedProps).$as(interfaceDef);\n }\n function mapProperty(propertyName: string, value: any) {\n const objDef = underlying[ObjectDefRef];\n const targetPropName =\n objDef.interfaceMap![interfaceDef.apiName][propertyName];\n // If the underlying object does not implement the SPT, throw errors\n if (targetPropName == null) {\n throw new Error(\n `Cannot clone interface with ${propertyName} as property is not implemented by the underlying object type ${objDef.apiName}`,\n );\n }\n return [targetPropName, value];\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,gBAAgB,QAAQ,gDAAgD;AAEjF,SAASC,oBAAoB,QAAQ,oBAAoB;AAEzD,SACEC,eAAe,EACfC,YAAY,EACZC,oBAAoB,QACf,sBAAsB;AAG7B;AACA,OAAO,SAASC,mBAAmBA,CAGjCC,UAAwB,EACxBC,YAA+B,EACd;EACjB,MAAM,CAACC,eAAe,CAAC,GAAGR,gBAAgB,CAACO,YAAY,CAACE,OAAO,CAAC;EAEhE,OAAOC,MAAM,CAACC,MAAM,CAClBD,MAAM,CAACE,gBAAgB,CAAC,CAAC,CAAC,EAAE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,CAAC4B,MAAM,CAACG,aAAa,CAAC,CAACtB,GAAG,CAACR,YAAY,CAAC;EAC3D;EACA,SAAS+B,WAAWA,CAACG,YAAoB,EAAE5B,KAAU,EAAE;IACrD,MAAMgB,MAAM,GAAGvB,UAAU,CAACH,YAAY,CAAC;IACvC,MAAM4B,cAAc,GAClBF,MAAM,CAACG,YAAY,CAAEzB,YAAY,CAACE,OAAO,CAAC,CAACgC,YAAY,CAAC;IAC1D;IACA,IAAIV,cAAc,IAAI,IAAI,EAAE;MAC1B,MAAM,IAAIK,KAAK,CACb,+BAA+BK,YAAY,iEAAiEZ,MAAM,CAACpB,OAAO,EAC5H,CAAC;IACH;IACA,OAAO,CAACsB,cAAc,EAAElB,KAAK,CAAC;EAChC;AACF","ignoreList":[]}
1
+ {"version":3,"file":"createOsdkInterface.js","names":["extractNamespace","get$linkForInterface","InterfaceDefRef","ObjectDefRef","UnderlyingOsdkObject","createOsdkInterface","underlying","interfaceDef","objApiNamespace","apiName","Object","freeze","defineProperties","value","enumerable","$as","$objectType","$primaryKey","$objectSpecifier","$title","$rid","clone","get","fromEntries","keys","properties","map","p","objDef","apiNamespace","targetPropName","interfaceMap","update","$clone","key","Error","remappedProps","mapProperty","filter","x","propertyName"],"sources":["createOsdkInterface.ts"],"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 */\n\nimport type { InterfaceMetadata } from \"@osdk/api\";\nimport { extractNamespace } from \"../../internal/conversions/extractNamespace.js\";\nimport type { FetchedObjectTypeDefinition } from \"../../ontology/OntologyProvider.js\";\nimport { get$linkForInterface } from \"./getDollarLink.js\";\nimport type { InterfaceHolder } from \"./InterfaceHolder.js\";\nimport {\n InterfaceDefRef,\n ObjectDefRef,\n UnderlyingOsdkObject,\n} from \"./InternalSymbols.js\";\nimport type { ObjectHolder } from \"./ObjectHolder.js\";\n\n/** @internal */\nexport function createOsdkInterface<\n Q extends FetchedObjectTypeDefinition,\n>(\n underlying: ObjectHolder,\n interfaceDef: InterfaceMetadata,\n): InterfaceHolder {\n const [objApiNamespace] = extractNamespace(interfaceDef.apiName);\n\n return Object.freeze(\n Object.defineProperties({}, {\n // first to minimize hidden classes\n [UnderlyingOsdkObject]: { value: underlying },\n\n \"$apiName\": { value: interfaceDef.apiName, enumerable: true },\n \"$as\": {\n value: underlying.$as,\n enumerable: false,\n },\n \"$objectType\": {\n value: underlying.$objectType,\n enumerable: \"$objectType\" in underlying,\n },\n \"$primaryKey\": {\n value: underlying.$primaryKey,\n enumerable: \"$primaryKey\" in underlying,\n },\n \"$objectSpecifier\": {\n value: underlying.$objectSpecifier,\n enumerable: \"$objectSpecifier\" in underlying,\n },\n \"$title\": {\n value: underlying.$title,\n enumerable: \"$title\" in underlying,\n },\n \"$rid\": {\n value: (underlying as any).$rid,\n enumerable: \"$rid\" in underlying,\n },\n \"$clone\": {\n value: clone,\n enumerable: false,\n },\n \"$__EXPERIMENTAL__NOT_SUPPORTED_YET__metadata\": {\n value: {\n \"ObjectMetadata\": underlying[ObjectDefRef],\n \"InterfaceMetadata\": interfaceDef,\n },\n enumerable: false,\n },\n\n \"$link\": {\n get: function(this: InterfaceHolder) {\n return get$linkForInterface(this);\n },\n },\n\n [InterfaceDefRef]: { value: interfaceDef },\n\n ...Object.fromEntries(\n Object.keys(interfaceDef.properties).map(p => {\n const objDef = underlying[ObjectDefRef];\n\n const [apiNamespace, apiName] = extractNamespace(p);\n\n const targetPropName = objDef\n .interfaceMap![interfaceDef.apiName][p];\n\n return [apiNamespace === objApiNamespace ? apiName : p, {\n enumerable: targetPropName in underlying,\n value: underlying[targetPropName as keyof typeof underlying],\n }];\n }),\n ),\n }) as InterfaceHolder,\n );\n function clone(update: Record<string, any> | undefined) {\n if (update == null) {\n return underlying.$clone().$as(interfaceDef);\n }\n\n for (const key of Object.keys(update)) {\n if (!(key in interfaceDef.properties)) {\n throw new Error(\n `Invalid property ${key} for interface ${interfaceDef.apiName}`,\n );\n }\n }\n\n const remappedProps = Object.fromEntries(\n Object.keys(update).map(p => mapProperty(p, update[p])).filter(x =>\n x != null\n ),\n );\n\n return underlying.$clone(remappedProps).$as(interfaceDef);\n }\n function mapProperty(propertyName: string, value: any) {\n const objDef = underlying[ObjectDefRef];\n const targetPropName =\n objDef.interfaceMap![interfaceDef.apiName][propertyName];\n // If the underlying object does not implement the SPT, throw errors\n if (targetPropName == null) {\n throw new Error(\n `Cannot clone interface with ${propertyName} as property is not implemented by the underlying object type ${objDef.apiName}`,\n );\n }\n return [targetPropName, value];\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,gBAAgB,QAAQ,gDAAgD;AAEjF,SAASC,oBAAoB,QAAQ,oBAAoB;AAEzD,SACEC,eAAe,EACfC,YAAY,EACZC,oBAAoB,QACf,sBAAsB;AAG7B;AACA,OAAO,SAASC,mBAAmBA,CAGjCC,UAAwB,EACxBC,YAA+B,EACd;EACjB,MAAM,CAACC,eAAe,CAAC,GAAGR,gBAAgB,CAACO,YAAY,CAACE,OAAO,CAAC;EAEhE,OAAOC,MAAM,CAACC,MAAM,CAClBD,MAAM,CAACE,gBAAgB,CAAC,CAAC,CAAC,EAAE;IAC1B;IACA,CAACR,oBAAoB,GAAG;MAAES,KAAK,EAAEP;IAAW,CAAC;IAE7C,UAAU,EAAE;MAAEO,KAAK,EAAEN,YAAY,CAACE,OAAO;MAAEK,UAAU,EAAE;IAAK,CAAC;IAC7D,KAAK,EAAE;MACLD,KAAK,EAAEP,UAAU,CAACS,GAAG;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,IAAI,IAAI,EAAE;MAC1B,MAAM,IAAIK,KAAK,CACb,+BAA+BK,YAAY,iEAAiEZ,MAAM,CAACnB,OAAO,EAC5H,CAAC;IACH;IACA,OAAO,CAACqB,cAAc,EAAEjB,KAAK,CAAC;EAChC;AACF","ignoreList":[]}
@@ -20,7 +20,6 @@ import { MediaReferencePropertyImpl } from "../../createMediaReferenceProperty.j
20
20
  import { TimeSeriesPropertyImpl } from "../../createTimeseriesProperty.js";
21
21
  import { hydrateAttachmentFromRidInternal } from "../../public-utils/hydrateAttachmentFromRid.js";
22
22
  import { createObjectSpecifierFromPrimaryKey } from "../../util/objectSpecifierUtils.js";
23
- import { applyPropertyFormatter } from "../formatting/applyPropertyFormatter.js";
24
23
  import { get$as } from "./getDollarAs.js";
25
24
  import { get$link } from "./getDollarLink.js";
26
25
  import { ClientRef, ObjectDefRef, UnderlyingOsdkObject } from "./InternalSymbols.js";
@@ -76,15 +75,6 @@ const basePropDefs = {
76
75
  };
77
76
  },
78
77
  enumerable: false
79
- },
80
- "$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue": {
81
- value: function (propertyApiName, options) {
82
- const rawObj = this[UnderlyingOsdkObject];
83
- const def = this[ObjectDefRef];
84
- const propertyValue = rawObj[propertyApiName];
85
- return applyPropertyFormatter(propertyValue, def.properties[propertyApiName], rawObj, options);
86
- },
87
- enumerable: false
88
78
  }
89
79
  };
90
80
 
@@ -1 +1 @@
1
- {"version":3,"file":"createOsdkObject.js","names":["invariant","GeotimeSeriesPropertyImpl","MediaReferencePropertyImpl","TimeSeriesPropertyImpl","hydrateAttachmentFromRidInternal","createObjectSpecifierFromPrimaryKey","applyPropertyFormatter","get$as","get$link","ClientRef","ObjectDefRef","UnderlyingOsdkObject","specialPropertyTypes","Set","basePropDefs","get","value","update","rawObj","def","createOsdkObject","primaryKeyApiName","Error","apiName","titleProperty","$title","newObject","$primaryKey","enumerable","ObjectMetadata","propertyApiName","options","propertyValue","properties","client","objectDef","simpleOsdkProperties","derivedPropertyTypeByName","Object","defineProperties","propKey","keys","type","has","createSpecialProperty","modifyRdpProperties","freeze","rawValue","definition","operation","num","Number","isSafeInteger","process","env","NODE_ENV","selectedOrCollectedPropertyType","Array","isArray","map","a","rid","rawObject","p","propDef","time","timestamp","coordinates","position","undefined","objectApiName","primaryKey","propertyName","mediaReference"],"sources":["createOsdkObject.ts"],"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 */\n\nimport type { MediaReference } from \"@osdk/foundry.core\";\nimport type { Attachment, ReferenceValue } from \"@osdk/foundry.ontologies\";\nimport invariant from \"tiny-invariant\";\nimport { GeotimeSeriesPropertyImpl } from \"../../createGeotimeSeriesProperty.js\";\nimport { MediaReferencePropertyImpl } from \"../../createMediaReferenceProperty.js\";\nimport { TimeSeriesPropertyImpl } from \"../../createTimeseriesProperty.js\";\nimport type { DerivedPropertyRuntimeMetadata } from \"../../derivedProperties/derivedPropertyRuntimeMetadata.js\";\nimport type { MinimalClient } from \"../../MinimalClientContext.js\";\nimport type { FetchedObjectTypeDefinition } from \"../../ontology/OntologyProvider.js\";\nimport { hydrateAttachmentFromRidInternal } from \"../../public-utils/hydrateAttachmentFromRid.js\";\nimport { createObjectSpecifierFromPrimaryKey } from \"../../util/objectSpecifierUtils.js\";\nimport {\n applyPropertyFormatter,\n type FormatPropertyOptions,\n} from \"../formatting/applyPropertyFormatter.js\";\nimport type { SimpleOsdkProperties } from \"../SimpleOsdkProperties.js\";\nimport { get$as } from \"./getDollarAs.js\";\nimport { get$link } from \"./getDollarLink.js\";\nimport {\n ClientRef,\n ObjectDefRef,\n UnderlyingOsdkObject,\n} from \"./InternalSymbols.js\";\nimport type { ObjectHolder } from \"./ObjectHolder.js\";\n\nconst specialPropertyTypes = new Set(\n [\n \"attachment\",\n \"geotimeSeriesReference\",\n \"mediaReference\",\n \"numericTimeseries\",\n \"stringTimeseries\",\n \"sensorTimeseries\",\n ],\n);\n\n// kept separate so we are not redefining these functions\n// every time an object is created.\nconst basePropDefs = {\n \"$as\": {\n get: function(this: ObjectHolder) {\n return get$as(this[ObjectDefRef]);\n },\n },\n \"$link\": {\n get: function(this: ObjectHolder) {\n return get$link(this);\n },\n },\n \"$clone\": {\n value: function(\n this: ObjectHolder,\n update: Record<string, any> | undefined,\n ) {\n // I think `rawObj` is the same thing as `this` and can be removed?\n const rawObj = this[UnderlyingOsdkObject] as SimpleOsdkProperties;\n const def = this[ObjectDefRef];\n\n if (update == null) {\n return createOsdkObject(this[ClientRef], def, { ...rawObj });\n }\n\n if (\n def.primaryKeyApiName in update\n && rawObj[def.primaryKeyApiName] !== update[def.primaryKeyApiName]\n ) {\n throw new Error(\n `Cannot update ${def.apiName} object with differing primary key values `,\n );\n }\n\n if (def.titleProperty in update && !(\"$title\" in update)) {\n update.$title = update[def.titleProperty];\n }\n\n const newObject = { ...this[UnderlyingOsdkObject], ...update };\n return createOsdkObject(this[ClientRef], this[ObjectDefRef], newObject);\n },\n },\n \"$objectSpecifier\": {\n get: function(this: ObjectHolder) {\n const rawObj = this[UnderlyingOsdkObject];\n return createObjectSpecifierFromPrimaryKey(\n this[ObjectDefRef],\n rawObj.$primaryKey,\n );\n },\n enumerable: true,\n },\n \"$__EXPERIMENTAL__NOT_SUPPORTED_YET__metadata\": {\n get: function(this: ObjectHolder) {\n return {\n ObjectMetadata: this[ObjectDefRef],\n };\n },\n enumerable: false,\n },\n \"$__EXPERIMENTAL__NOT_SUPPORTED_YET__getFormattedValue\": {\n value: function(\n this: ObjectHolder,\n propertyApiName: string,\n options?: FormatPropertyOptions,\n ): string | undefined {\n const rawObj = this[UnderlyingOsdkObject] as SimpleOsdkProperties;\n const def = this[ObjectDefRef];\n const propertyValue = rawObj[propertyApiName];\n\n return applyPropertyFormatter(\n propertyValue,\n def.properties[propertyApiName],\n rawObj,\n options,\n );\n },\n enumerable: false,\n },\n};\n\n/**\n * @internal\n * @param client\n * @param objectDef\n * @param simpleOsdkProperties\n */\nexport function createOsdkObject(\n client: MinimalClient,\n objectDef: FetchedObjectTypeDefinition,\n simpleOsdkProperties: SimpleOsdkProperties,\n derivedPropertyTypeByName: DerivedPropertyRuntimeMetadata = {},\n): ObjectHolder {\n // updates the object's \"hidden class/map\".\n const rawObj = simpleOsdkProperties as ObjectHolder;\n Object.defineProperties(\n rawObj,\n {\n [UnderlyingOsdkObject]: {\n enumerable: false,\n value: simpleOsdkProperties,\n },\n [ObjectDefRef]: { value: objectDef, enumerable: false }, // TODO: Potentially update when GA metadata field\n [ClientRef]: { value: client, enumerable: false },\n ...basePropDefs,\n } satisfies Record<keyof ObjectHolder, PropertyDescriptor>,\n );\n\n // Assign the special values\n for (const propKey of Object.keys(rawObj)) {\n if (\n propKey in objectDef.properties\n && typeof (objectDef.properties[propKey].type) === \"string\"\n && specialPropertyTypes.has(objectDef.properties[propKey].type)\n ) {\n rawObj[propKey] = createSpecialProperty(\n client,\n objectDef,\n rawObj,\n propKey,\n );\n } else if (propKey in derivedPropertyTypeByName) {\n rawObj[propKey] = modifyRdpProperties(\n client,\n derivedPropertyTypeByName,\n rawObj[propKey],\n propKey,\n );\n }\n }\n\n return Object.freeze(rawObj);\n}\n\nfunction modifyRdpProperties(\n client: MinimalClient,\n derivedPropertyTypeByName: DerivedPropertyRuntimeMetadata,\n rawValue: any,\n propKey: string,\n): any {\n if (\n derivedPropertyTypeByName[propKey].definition.type === \"selection\"\n && derivedPropertyTypeByName[propKey].definition.operation.type\n === \"count\"\n ) {\n const num = Number(rawValue);\n invariant(\n Number.isSafeInteger(num),\n \"Count aggregation for derived property \" + propKey\n + \" returned a value larger than safe integer.\",\n );\n return num;\n } // Selected or collected properties need to be deserialized specially when constructed with RDP\n else if (\n derivedPropertyTypeByName[propKey].selectedOrCollectedPropertyType\n != null\n && typeof (derivedPropertyTypeByName[propKey]\n .selectedOrCollectedPropertyType.type)\n === \"string\"\n && specialPropertyTypes.has(\n derivedPropertyTypeByName[propKey].selectedOrCollectedPropertyType\n .type,\n )\n ) {\n switch (\n derivedPropertyTypeByName[propKey].selectedOrCollectedPropertyType\n ?.type\n ) {\n case \"attachment\":\n if (Array.isArray(rawValue)) {\n return rawValue.map(a =>\n hydrateAttachmentFromRidInternal(client, a.rid)\n );\n } else {\n return hydrateAttachmentFromRidInternal(\n client,\n (rawValue as Attachment).rid,\n );\n }\n break;\n default:\n invariant(\n false,\n \"Derived property aggregations for Timeseries and Media are not supported\",\n );\n }\n }\n return rawValue;\n}\n\nfunction createSpecialProperty(\n client: MinimalClient,\n objectDef: FetchedObjectTypeDefinition,\n rawObject: ObjectHolder,\n p: keyof typeof rawObject & string | symbol,\n) {\n const rawValue = rawObject[p as any];\n const propDef = objectDef.properties[p as any];\n if (process.env.NODE_ENV !== \"production\") {\n invariant(\n propDef != null && typeof propDef.type === \"string\"\n && specialPropertyTypes.has(propDef.type),\n );\n }\n if (propDef.type === \"attachment\") {\n if (Array.isArray(rawValue)) {\n return rawValue.map(a => hydrateAttachmentFromRidInternal(client, a.rid));\n }\n return hydrateAttachmentFromRidInternal(\n client,\n (rawValue as Attachment).rid,\n );\n }\n\n if (\n propDef.type === \"numericTimeseries\"\n || propDef.type === \"stringTimeseries\"\n || propDef.type === \"sensorTimeseries\"\n ) {\n return new TimeSeriesPropertyImpl<\n (typeof propDef)[\"type\"] extends \"numericTimeseries\" ? number\n : (typeof propDef)[\"type\"] extends \"stringTimeseries\" ? string\n : number | string\n >(\n client,\n objectDef.apiName,\n rawObject[objectDef.primaryKeyApiName as string],\n p as string,\n );\n }\n\n if (propDef.type === \"geotimeSeriesReference\") {\n return new GeotimeSeriesPropertyImpl<GeoJSON.Point>(\n client,\n objectDef.apiName,\n rawObject[objectDef.primaryKeyApiName as string],\n p as string,\n (rawValue as ReferenceValue).type === \"geotimeSeriesValue\"\n ? {\n time: (rawValue as ReferenceValue).timestamp,\n value: {\n type: \"Point\",\n coordinates: (rawValue as ReferenceValue).position,\n },\n }\n : undefined,\n );\n }\n if (propDef.type === \"mediaReference\") {\n return new MediaReferencePropertyImpl({\n client,\n objectApiName: objectDef.apiName,\n primaryKey: rawObject[objectDef.primaryKeyApiName as string],\n propertyName: p as string,\n mediaReference: rawValue as MediaReference,\n });\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,OAAOA,SAAS,MAAM,gBAAgB;AACtC,SAASC,yBAAyB,QAAQ,sCAAsC;AAChF,SAASC,0BAA0B,QAAQ,uCAAuC;AAClF,SAASC,sBAAsB,QAAQ,mCAAmC;AAI1E,SAASC,gCAAgC,QAAQ,gDAAgD;AACjG,SAASC,mCAAmC,QAAQ,oCAAoC;AACxF,SACEC,sBAAsB,QAEjB,yCAAyC;AAEhD,SAASC,MAAM,QAAQ,kBAAkB;AACzC,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SACEC,SAAS,EACTC,YAAY,EACZC,oBAAoB,QACf,sBAAsB;AAG7B,MAAMC,oBAAoB,GAAG,IAAIC,GAAG,CAClC,CACE,YAAY,EACZ,wBAAwB,EACxB,gBAAgB,EAChB,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,CAEtB,CAAC;;AAED;AACA;AACA,MAAMC,YAAY,GAAG;EACnB,KAAK,EAAE;IACLC,GAAG,EAAE,SAAAA,CAAA,EAA6B;MAChC,OAAOR,MAAM,CAAC,IAAI,CAACG,YAAY,CAAC,CAAC;IACnC;EACF,CAAC;EACD,OAAO,EAAE;IACPK,GAAG,EAAE,SAAAA,CAAA,EAA6B;MAChC,OAAOP,QAAQ,CAAC,IAAI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C3B,CAAC;EACH;EAEA,IACEG,OAAO,CAACtB,IAAI,KAAK,mBAAmB,IACjCsB,OAAO,CAACtB,IAAI,KAAK,kBAAkB,IACnCsB,OAAO,CAACtB,IAAI,KAAK,kBAAkB,EACtC;IACA,OAAO,IAAIvC,sBAAsB,CAK/B+B,MAAM,EACNC,SAAS,CAACZ,OAAO,EACjBuC,SAAS,CAAC3B,SAAS,CAACd,iBAAiB,CAAW,EAChD0C,CACF,CAAC;EACH;EAEA,IAAIC,OAAO,CAACtB,IAAI,KAAK,wBAAwB,EAAE;IAC7C,OAAO,IAAIzC,yBAAyB,CAClCiC,MAAM,EACNC,SAAS,CAACZ,OAAO,EACjBuC,SAAS,CAAC3B,SAAS,CAACd,iBAAiB,CAAW,EAChD0C,CAAC,EACAhB,QAAQ,CAAoBL,IAAI,KAAK,oBAAoB,GACtD;MACAuB,IAAI,EAAGlB,QAAQ,CAAoBmB,SAAS;MAC5ClD,KAAK,EAAE;QACL0B,IAAI,EAAE,OAAO;QACbyB,WAAW,EAAGpB,QAAQ,CAAoBqB;MAC5C;IACF,CAAC,GACCC,SACN,CAAC;EACH;EACA,IAAIL,OAAO,CAACtB,IAAI,KAAK,gBAAgB,EAAE;IACrC,OAAO,IAAIxC,0BAA0B,CAAC;MACpCgC,MAAM;MACNoC,aAAa,EAAEnC,SAAS,CAACZ,OAAO;MAChCgD,UAAU,EAAET,SAAS,CAAC3B,SAAS,CAACd,iBAAiB,CAAW;MAC5DmD,YAAY,EAAET,CAAW;MACzBU,cAAc,EAAE1B;IAClB,CAAC,CAAC;EACJ;AACF","ignoreList":[]}
1
+ {"version":3,"file":"createOsdkObject.js","names":["invariant","GeotimeSeriesPropertyImpl","MediaReferencePropertyImpl","TimeSeriesPropertyImpl","hydrateAttachmentFromRidInternal","createObjectSpecifierFromPrimaryKey","get$as","get$link","ClientRef","ObjectDefRef","UnderlyingOsdkObject","specialPropertyTypes","Set","basePropDefs","get","value","update","rawObj","def","createOsdkObject","primaryKeyApiName","Error","apiName","titleProperty","$title","newObject","$primaryKey","enumerable","ObjectMetadata","client","objectDef","simpleOsdkProperties","derivedPropertyTypeByName","Object","defineProperties","propKey","keys","properties","type","has","createSpecialProperty","modifyRdpProperties","freeze","rawValue","definition","operation","num","Number","isSafeInteger","process","env","NODE_ENV","selectedOrCollectedPropertyType","Array","isArray","map","a","rid","rawObject","p","propDef","time","timestamp","coordinates","position","undefined","objectApiName","primaryKey","propertyName","mediaReference"],"sources":["createOsdkObject.ts"],"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 */\n\nimport type { MediaReference } from \"@osdk/foundry.core\";\nimport type { Attachment, ReferenceValue } from \"@osdk/foundry.ontologies\";\nimport invariant from \"tiny-invariant\";\nimport { GeotimeSeriesPropertyImpl } from \"../../createGeotimeSeriesProperty.js\";\nimport { MediaReferencePropertyImpl } from \"../../createMediaReferenceProperty.js\";\nimport { TimeSeriesPropertyImpl } from \"../../createTimeseriesProperty.js\";\nimport type { DerivedPropertyRuntimeMetadata } from \"../../derivedProperties/derivedPropertyRuntimeMetadata.js\";\nimport type { MinimalClient } from \"../../MinimalClientContext.js\";\nimport type { FetchedObjectTypeDefinition } from \"../../ontology/OntologyProvider.js\";\nimport { hydrateAttachmentFromRidInternal } from \"../../public-utils/hydrateAttachmentFromRid.js\";\nimport { createObjectSpecifierFromPrimaryKey } from \"../../util/objectSpecifierUtils.js\";\nimport type { SimpleOsdkProperties } from \"../SimpleOsdkProperties.js\";\nimport { get$as } from \"./getDollarAs.js\";\nimport { get$link } from \"./getDollarLink.js\";\nimport {\n ClientRef,\n ObjectDefRef,\n UnderlyingOsdkObject,\n} from \"./InternalSymbols.js\";\nimport type { ObjectHolder } from \"./ObjectHolder.js\";\n\nconst specialPropertyTypes = new Set(\n [\n \"attachment\",\n \"geotimeSeriesReference\",\n \"mediaReference\",\n \"numericTimeseries\",\n \"stringTimeseries\",\n \"sensorTimeseries\",\n ],\n);\n\n// kept separate so we are not redefining these functions\n// every time an object is created.\nconst basePropDefs = {\n \"$as\": {\n get: function(this: ObjectHolder) {\n return get$as(this[ObjectDefRef]);\n },\n },\n \"$link\": {\n get: function(this: ObjectHolder) {\n return get$link(this);\n },\n },\n \"$clone\": {\n value: function(\n this: ObjectHolder,\n update: Record<string, any> | undefined,\n ) {\n // I think `rawObj` is the same thing as `this` and can be removed?\n const rawObj = this[UnderlyingOsdkObject] as SimpleOsdkProperties;\n const def = this[ObjectDefRef];\n\n if (update == null) {\n return createOsdkObject(this[ClientRef], def, { ...rawObj });\n }\n\n if (\n def.primaryKeyApiName in update\n && rawObj[def.primaryKeyApiName] !== update[def.primaryKeyApiName]\n ) {\n throw new Error(\n `Cannot update ${def.apiName} object with differing primary key values `,\n );\n }\n\n if (def.titleProperty in update && !(\"$title\" in update)) {\n update.$title = update[def.titleProperty];\n }\n\n const newObject = { ...this[UnderlyingOsdkObject], ...update };\n return createOsdkObject(this[ClientRef], this[ObjectDefRef], newObject);\n },\n },\n \"$objectSpecifier\": {\n get: function(this: ObjectHolder) {\n const rawObj = this[UnderlyingOsdkObject];\n return createObjectSpecifierFromPrimaryKey(\n this[ObjectDefRef],\n rawObj.$primaryKey,\n );\n },\n enumerable: true,\n },\n \"$__EXPERIMENTAL__NOT_SUPPORTED_YET__metadata\": {\n get: function(this: ObjectHolder) {\n return {\n ObjectMetadata: this[ObjectDefRef],\n };\n },\n enumerable: false,\n },\n};\n\n/**\n * @internal\n * @param client\n * @param objectDef\n * @param simpleOsdkProperties\n */\nexport function createOsdkObject(\n client: MinimalClient,\n objectDef: FetchedObjectTypeDefinition,\n simpleOsdkProperties: SimpleOsdkProperties,\n derivedPropertyTypeByName: DerivedPropertyRuntimeMetadata = {},\n): ObjectHolder {\n // updates the object's \"hidden class/map\".\n const rawObj = simpleOsdkProperties as ObjectHolder;\n Object.defineProperties(\n rawObj,\n {\n [UnderlyingOsdkObject]: {\n enumerable: false,\n value: simpleOsdkProperties,\n },\n [ObjectDefRef]: { value: objectDef, enumerable: false }, // TODO: Potentially update when GA metadata field\n [ClientRef]: { value: client, enumerable: false },\n ...basePropDefs,\n } satisfies Record<keyof ObjectHolder, PropertyDescriptor>,\n );\n\n // Assign the special values\n for (const propKey of Object.keys(rawObj)) {\n if (\n propKey in objectDef.properties\n && typeof (objectDef.properties[propKey].type) === \"string\"\n && specialPropertyTypes.has(objectDef.properties[propKey].type)\n ) {\n rawObj[propKey] = createSpecialProperty(\n client,\n objectDef,\n rawObj,\n propKey,\n );\n } else if (propKey in derivedPropertyTypeByName) {\n rawObj[propKey] = modifyRdpProperties(\n client,\n derivedPropertyTypeByName,\n rawObj[propKey],\n propKey,\n );\n }\n }\n\n return Object.freeze(rawObj);\n}\n\nfunction modifyRdpProperties(\n client: MinimalClient,\n derivedPropertyTypeByName: DerivedPropertyRuntimeMetadata,\n rawValue: any,\n propKey: string,\n): any {\n if (\n derivedPropertyTypeByName[propKey].definition.type === \"selection\"\n && derivedPropertyTypeByName[propKey].definition.operation.type\n === \"count\"\n ) {\n const num = Number(rawValue);\n invariant(\n Number.isSafeInteger(num),\n \"Count aggregation for derived property \" + propKey\n + \" returned a value larger than safe integer.\",\n );\n return num;\n } // Selected or collected properties need to be deserialized specially when constructed with RDP\n else if (\n derivedPropertyTypeByName[propKey].selectedOrCollectedPropertyType\n != null\n && typeof (derivedPropertyTypeByName[propKey]\n .selectedOrCollectedPropertyType.type)\n === \"string\"\n && specialPropertyTypes.has(\n derivedPropertyTypeByName[propKey].selectedOrCollectedPropertyType\n .type,\n )\n ) {\n switch (\n derivedPropertyTypeByName[propKey].selectedOrCollectedPropertyType\n ?.type\n ) {\n case \"attachment\":\n if (Array.isArray(rawValue)) {\n return rawValue.map(a =>\n hydrateAttachmentFromRidInternal(client, a.rid)\n );\n } else {\n return hydrateAttachmentFromRidInternal(\n client,\n (rawValue as Attachment).rid,\n );\n }\n break;\n default:\n invariant(\n false,\n \"Derived property aggregations for Timeseries and Media are not supported\",\n );\n }\n }\n return rawValue;\n}\n\nfunction createSpecialProperty(\n client: MinimalClient,\n objectDef: FetchedObjectTypeDefinition,\n rawObject: ObjectHolder,\n p: keyof typeof rawObject & string | symbol,\n) {\n const rawValue = rawObject[p as any];\n const propDef = objectDef.properties[p as any];\n if (process.env.NODE_ENV !== \"production\") {\n invariant(\n propDef != null && typeof propDef.type === \"string\"\n && specialPropertyTypes.has(propDef.type),\n );\n }\n if (propDef.type === \"attachment\") {\n if (Array.isArray(rawValue)) {\n return rawValue.map(a => hydrateAttachmentFromRidInternal(client, a.rid));\n }\n return hydrateAttachmentFromRidInternal(\n client,\n (rawValue as Attachment).rid,\n );\n }\n\n if (\n propDef.type === \"numericTimeseries\"\n || propDef.type === \"stringTimeseries\"\n || propDef.type === \"sensorTimeseries\"\n ) {\n return new TimeSeriesPropertyImpl<\n (typeof propDef)[\"type\"] extends \"numericTimeseries\" ? number\n : (typeof propDef)[\"type\"] extends \"stringTimeseries\" ? string\n : number | string\n >(\n client,\n objectDef.apiName,\n rawObject[objectDef.primaryKeyApiName as string],\n p as string,\n );\n }\n\n if (propDef.type === \"geotimeSeriesReference\") {\n return new GeotimeSeriesPropertyImpl<GeoJSON.Point>(\n client,\n objectDef.apiName,\n rawObject[objectDef.primaryKeyApiName as string],\n p as string,\n (rawValue as ReferenceValue).type === \"geotimeSeriesValue\"\n ? {\n time: (rawValue as ReferenceValue).timestamp,\n value: {\n type: \"Point\",\n coordinates: (rawValue as ReferenceValue).position,\n },\n }\n : undefined,\n );\n }\n if (propDef.type === \"mediaReference\") {\n return new MediaReferencePropertyImpl({\n client,\n objectApiName: objectDef.apiName,\n primaryKey: rawObject[objectDef.primaryKeyApiName as string],\n propertyName: p as string,\n mediaReference: rawValue as MediaReference,\n });\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,OAAOA,SAAS,MAAM,gBAAgB;AACtC,SAASC,yBAAyB,QAAQ,sCAAsC;AAChF,SAASC,0BAA0B,QAAQ,uCAAuC;AAClF,SAASC,sBAAsB,QAAQ,mCAAmC;AAI1E,SAASC,gCAAgC,QAAQ,gDAAgD;AACjG,SAASC,mCAAmC,QAAQ,oCAAoC;AAExF,SAASC,MAAM,QAAQ,kBAAkB;AACzC,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SACEC,SAAS,EACTC,YAAY,EACZC,oBAAoB,QACf,sBAAsB;AAG7B,MAAMC,oBAAoB,GAAG,IAAIC,GAAG,CAClC,CACE,YAAY,EACZ,wBAAwB,EACxB,gBAAgB,EAChB,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,CAEtB,CAAC;;AAED;AACA;AACA,MAAMC,YAAY,GAAG;EACnB,KAAK,EAAE;IACLC,GAAG,EAAE,SAAAA,CAAA,EAA6B;MAChC,OAAOR,MAAM,CAAC,IAAI,CAACG,YAAY,CAAC,CAAC;IACnC;EACF,CAAC;EACD,OAAO,EAAE;IACPK,GAAG,EAAE,SAAAA,CAAA,EAA6B;MAChC,OAAOP,QAAQ,CAAC,IAAI,CAAC;IACvB;EACF,CAAC;EACD,QAAQ,EAAE;IACRQ,KAAK,EAAE,SAAAA,CAELC,MAAuC,EACvC;MACA;MACA,MAAMC,MAAM,GAAG,IAAI,CAACP,oBAAoB,CAAyB;MACjE,MAAMQ,GAAG,GAAG,IAAI,CAACT,YAAY,CAAC;MAE9B,IAAIO,MAAM,IAAI,IAAI,EAAE;QAClB,OAAOG,gBAAgB,CAAC,IAAI,CAACX,SAAS,CAAC,EAAEU,GAAG,EAAE;UAAE,GAAGD;QAA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AAK,gBAAgB,EAAE;IACrC,OAAO,IAAIpC,0BAA0B,CAAC;MACpC2B,MAAM;MACNqC,aAAa,EAAEpC,SAAS,CAACR,OAAO;MAChC6C,UAAU,EAAET,SAAS,CAAC5B,SAAS,CAACV,iBAAiB,CAAW;MAC5DgD,YAAY,EAAET,CAAW;MACzBU,cAAc,EAAE1B;IAClB,CAAC,CAAC;EACJ;AACF","ignoreList":[]}
@@ -499,7 +499,6 @@ describe("convertWireToOsdkObjects", () => {
499
499
  "multiplicity": false,
500
500
  "nullable": true,
501
501
  "type": "string",
502
- "valueFormatting": undefined,
503
502
  "valueTypeApiName": undefined,
504
503
  },
505
504
  "employeeId": {
@@ -508,7 +507,6 @@ describe("convertWireToOsdkObjects", () => {
508
507
  "multiplicity": false,
509
508
  "nullable": false,
510
509
  "type": "integer",
511
- "valueFormatting": undefined,
512
510
  "valueTypeApiName": undefined,
513
511
  },
514
512
  "employeeLocation": {
@@ -517,7 +515,6 @@ describe("convertWireToOsdkObjects", () => {
517
515
  "multiplicity": false,
518
516
  "nullable": true,
519
517
  "type": "geotimeSeriesReference",
520
- "valueFormatting": undefined,
521
518
  "valueTypeApiName": undefined,
522
519
  },
523
520
  "employeeSensor": {
@@ -526,7 +523,6 @@ describe("convertWireToOsdkObjects", () => {
526
523
  "multiplicity": false,
527
524
  "nullable": true,
528
525
  "type": "sensorTimeseries",
529
- "valueFormatting": undefined,
530
526
  "valueTypeApiName": undefined,
531
527
  },
532
528
  "employeeStatus": {
@@ -535,7 +531,6 @@ describe("convertWireToOsdkObjects", () => {
535
531
  "multiplicity": false,
536
532
  "nullable": true,
537
533
  "type": "stringTimeseries",
538
- "valueFormatting": undefined,
539
534
  "valueTypeApiName": undefined,
540
535
  },
541
536
  "fullName": {
@@ -544,7 +539,6 @@ describe("convertWireToOsdkObjects", () => {
544
539
  "multiplicity": false,
545
540
  "nullable": true,
546
541
  "type": "string",
547
- "valueFormatting": undefined,
548
542
  "valueTypeApiName": undefined,
549
543
  },
550
544
  "office": {
@@ -554,7 +548,6 @@ describe("convertWireToOsdkObjects", () => {
554
548
  "multiplicity": false,
555
549
  "nullable": true,
556
550
  "type": "string",
557
- "valueFormatting": undefined,
558
551
  "valueTypeApiName": undefined,
559
552
  },
560
553
  "skillSet": {
@@ -563,7 +556,6 @@ describe("convertWireToOsdkObjects", () => {
563
556
  "multiplicity": false,
564
557
  "nullable": true,
565
558
  "type": "string",
566
- "valueFormatting": undefined,
567
559
  "valueTypeApiName": undefined,
568
560
  },
569
561
  "skillSetEmbedding": {
@@ -572,7 +564,6 @@ describe("convertWireToOsdkObjects", () => {
572
564
  "multiplicity": false,
573
565
  "nullable": true,
574
566
  "type": "vector",
575
- "valueFormatting": undefined,
576
567
  "valueTypeApiName": undefined,
577
568
  },
578
569
  "startDate": {
@@ -581,7 +572,6 @@ describe("convertWireToOsdkObjects", () => {
581
572
  "multiplicity": false,
582
573
  "nullable": true,
583
574
  "type": "datetime",
584
- "valueFormatting": undefined,
585
575
  "valueTypeApiName": undefined,
586
576
  },
587
577
  },
@@ -615,7 +605,6 @@ describe("convertWireToOsdkObjects", () => {
615
605
  "multiplicity": false,
616
606
  "nullable": true,
617
607
  "type": "string",
618
- "valueFormatting": undefined,
619
608
  "valueTypeApiName": undefined,
620
609
  },
621
610
  },
@@ -682,7 +671,6 @@ describe("convertWireToOsdkObjects", () => {
682
671
  "multiplicity": false,
683
672
  "nullable": true,
684
673
  "type": "string",
685
- "valueFormatting": undefined,
686
674
  "valueTypeApiName": undefined,
687
675
  },
688
676
  },