@osdk/client 2.2.0-rc.25 → 2.2.0

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,125 @@
1
1
  # @osdk/client
2
2
 
3
+ ## 2.2.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 322c5bc: Simulated release
8
+ - b61e9f5: Make Query Map Types Optional
9
+ - 7416ce4: Adds deleted objects and links returned from applyAction
10
+ - 1ba3871: Support $clone for interface objects
11
+ - 12843cb: Add ability to load all underlying properties of an interface.
12
+ - 18ba34f: Adds the ability to generate and execute functions at pinned versions
13
+ - cdd3154: Revert allowing explicitly passing undefined values to reset on actions
14
+ - 56aa502: Improves exposed APIs
15
+ - abe4897: Removes support for boolean primary keys
16
+ - 63b2e63: Update Platform SDK Dependencies
17
+ - cddfbf9: Adds default value option to group by
18
+ - 5a12181: Quick fix for geohash params.
19
+ - 2ce3659: Update underlying pagination size for async iter.
20
+ - 7416ce4: Update Platform SDK Dependencies
21
+ - 26c2d95: Add experimental function to load page of objects by rid.
22
+ - 430dee3: JSdoc for object properties are generated
23
+ - 397f906: Ensure count operations return numbers
24
+ - 488b51c: Add support for using aggregations and GeoJSON types from runtime derived properties
25
+ - fccd9ac: "Allow selecting derived properties"
26
+ - 5665b18: Remove selection RDPs from the API
27
+ - 761e69d: Added type safety to createMediaReference
28
+ - 889e84b: Release
29
+ - 62e5965: Removed unneeded lint statements.
30
+ - ed69666: Update conjure-lite to 0.7.1
31
+ - c92fe73: Add OsdkConfig utils to client/unstable
32
+ - 2517750: observeList should work for interfaces and have the fully loaded content
33
+ - 4183a55: Refactor OsdkBase to avoid breaks with type not being discoverable
34
+ - 1e16dcb: Exposes MinimalLogger and BrowserLogger via @osdk/client/internal
35
+ - 70b4464: Fix types for RDPs
36
+ - 2f6206c: Improvements to @osdk/react
37
+ - 81c0d8c: Client will now provide a default logger to console.error if none is provided
38
+ - 81c0d8c: ObservableClient now queues up object loads for bulk processing
39
+ - 791e655: Add support for geoshape and geohash action parameters.
40
+ - 317b555: Release
41
+ - 879b6c3: Include a more descriptive error message for multiple filters on a single property filter clause
42
+ - 63b2e63: Supports generating queries for entrySet function types
43
+ - 2517750: Provides efficient OrderByCanonicalizer
44
+ - 1e16dcb: Default logging is error level only
45
+ - f4370e3: Fixes error when using intersection, subtraction, or union object sets
46
+ - ea4e4b1: Fix attachments to be upload sequentially rather than in parallel.
47
+ - a146ce4: Cleanup RDP API
48
+ - cc380b5: Use the latest Platform APIs
49
+ - e873024: Fixes issues requiring msw and p-defer
50
+ - 88591f7: Small fixes for ObjectSpecifier
51
+ - 751e5b3: Use client as peer dep in functions package.
52
+ - 805df40: Fix interface action types.
53
+ - fe0cc43: Experimental react changes
54
+ - 2517750: Initial internal architecture document for ObservableClient
55
+ - 5467a0f: Fix orderBy argument on object load methods
56
+ - 2517750: subscribe in ObservableClient now uses Observer
57
+ - 63b2e63: Adds ObjectSpecifiers to generated OSDK objects
58
+ - Updated dependencies [322c5bc]
59
+ - Updated dependencies [322c5bc]
60
+ - Updated dependencies [322c5bc]
61
+ - Updated dependencies [322c5bc]
62
+ - Updated dependencies [322c5bc]
63
+ - Updated dependencies [322c5bc]
64
+ - Updated dependencies [b68adea]
65
+ - Updated dependencies [c6bee50]
66
+ - Updated dependencies [7416ce4]
67
+ - Updated dependencies [6eeb423]
68
+ - Updated dependencies [7170fd1]
69
+ - Updated dependencies [12843cb]
70
+ - Updated dependencies [ad93d55]
71
+ - Updated dependencies [a08bdfb]
72
+ - Updated dependencies [18ba34f]
73
+ - Updated dependencies [6abf078]
74
+ - Updated dependencies [f82767c]
75
+ - Updated dependencies [56aa502]
76
+ - Updated dependencies [0e874b1]
77
+ - Updated dependencies [abe4897]
78
+ - Updated dependencies [63b2e63]
79
+ - Updated dependencies [cddfbf9]
80
+ - Updated dependencies [7416ce4]
81
+ - Updated dependencies [23ea0e4]
82
+ - Updated dependencies [26c2d95]
83
+ - Updated dependencies [10da391]
84
+ - Updated dependencies [488b51c]
85
+ - Updated dependencies [71462e9]
86
+ - Updated dependencies [6ac8f0b]
87
+ - Updated dependencies [fccd9ac]
88
+ - Updated dependencies [5e8e839]
89
+ - Updated dependencies [5665b18]
90
+ - Updated dependencies [46cede4]
91
+ - Updated dependencies [761e69d]
92
+ - Updated dependencies [889e84b]
93
+ - Updated dependencies [a6e5f89]
94
+ - Updated dependencies [ed69666]
95
+ - Updated dependencies [4183a55]
96
+ - Updated dependencies [70b4464]
97
+ - Updated dependencies [395ae07]
98
+ - Updated dependencies [37f8e60]
99
+ - Updated dependencies [791e655]
100
+ - Updated dependencies [317b555]
101
+ - Updated dependencies [63b2e63]
102
+ - Updated dependencies [a146ce4]
103
+ - Updated dependencies [3d0ab11]
104
+ - Updated dependencies [805df40]
105
+ - Updated dependencies [5467a0f]
106
+ - Updated dependencies [63b2e63]
107
+ - @osdk/api@2.2.0
108
+ - @osdk/client.unstable@2.2.0
109
+ - @osdk/generator-converters@2.2.0
110
+ - @osdk/shared.client.impl@1.2.0
111
+ - @osdk/shared.net.errors@2.2.0
112
+ - @osdk/shared.net.fetch@1.2.0
113
+
114
+ ## 2.2.0-rc.26
115
+
116
+ ### Patch Changes
117
+
118
+ - Updated dependencies [3d0ab11]
119
+ - @osdk/generator-converters@2.2.0-rc.26
120
+ - @osdk/api@2.2.0-rc.26
121
+ - @osdk/client.unstable@2.2.0-rc.26
122
+
3
123
  ## 2.2.0-rc.25
4
124
 
5
125
  ### Patch Changes
@@ -22,19 +22,7 @@ describe(modernToLegacyWhereClause, () => {
22
22
  describe("api namespaces", () => {
23
23
  describe("interfaces", () => {
24
24
  it("properly converts shortname to fqApiName", () => {
25
- const r = modernToLegacyWhereClause({
26
- $and: [{
27
- prop: {
28
- $eq: 5
29
- }
30
- }, {
31
- prop2: {
32
- innerProp1: {
33
- $eq: "myProp"
34
- }
35
- }
36
- }]
37
- }, {
25
+ const T = {
38
26
  type: "interface",
39
27
  apiName: "a.Foo",
40
28
  __DefinitionMetadata: {
@@ -53,9 +41,23 @@ describe(modernToLegacyWhereClause, () => {
53
41
  apiName: "a.Foo",
54
42
  displayName: "",
55
43
  links: {},
56
- rid: ""
44
+ rid: "",
45
+ description: undefined
57
46
  }
58
- });
47
+ };
48
+ const r = modernToLegacyWhereClause({
49
+ $and: [{
50
+ prop: {
51
+ $eq: 5
52
+ }
53
+ }, {
54
+ prop2: {
55
+ innerProp1: {
56
+ $eq: "myProp"
57
+ }
58
+ }
59
+ }]
60
+ }, T);
59
61
  expect(r).toMatchInlineSnapshot(`
60
62
  {
61
63
  "type": "and",
@@ -80,15 +82,7 @@ describe(modernToLegacyWhereClause, () => {
80
82
  `);
81
83
  });
82
84
  it("properly does not convert when interface has no apiNamespace", () => {
83
- const r = modernToLegacyWhereClause({
84
- "b.prop": 5,
85
- foo: 6,
86
- "c.prop2": {
87
- innerProp1: {
88
- $eq: "myProp"
89
- }
90
- }
91
- }, {
85
+ const T = {
92
86
  type: "interface",
93
87
  apiName: "Foo",
94
88
  __DefinitionMetadata: {
@@ -113,9 +107,19 @@ describe(modernToLegacyWhereClause, () => {
113
107
  apiName: "Foo",
114
108
  displayName: "",
115
109
  links: {},
116
- rid: ""
110
+ rid: "",
111
+ description: undefined
117
112
  }
118
- });
113
+ };
114
+ const r = modernToLegacyWhereClause({
115
+ "b.prop": 5,
116
+ foo: 6,
117
+ "c.prop2": {
118
+ innerProp1: {
119
+ $eq: "myProp"
120
+ }
121
+ }
122
+ }, T);
119
123
  expect(r).toMatchInlineSnapshot(`
120
124
  {
121
125
  "type": "and",
@@ -145,15 +149,7 @@ describe(modernToLegacyWhereClause, () => {
145
149
  `);
146
150
  });
147
151
  it("gracefully handles redundant apiNamespace in property", () => {
148
- const r = modernToLegacyWhereClause({
149
- "b.prop": 5,
150
- "a.foo": 6,
151
- "c.prop2": {
152
- innerProp1: {
153
- $eq: "myProp"
154
- }
155
- }
156
- }, {
152
+ const T = {
157
153
  type: "interface",
158
154
  apiName: "a.Foo",
159
155
  __DefinitionMetadata: {
@@ -178,9 +174,19 @@ describe(modernToLegacyWhereClause, () => {
178
174
  apiName: "a.Foo",
179
175
  displayName: "",
180
176
  links: {},
181
- rid: ""
177
+ rid: "",
178
+ description: undefined
182
179
  }
183
- });
180
+ };
181
+ const r = modernToLegacyWhereClause({
182
+ "b.prop": 5,
183
+ "a.foo": 6,
184
+ "c.prop2": {
185
+ innerProp1: {
186
+ $eq: "myProp"
187
+ }
188
+ }
189
+ }, T);
184
190
  expect(r).toMatchInlineSnapshot(`
185
191
  {
186
192
  "type": "and",
@@ -210,9 +216,7 @@ describe(modernToLegacyWhereClause, () => {
210
216
  `);
211
217
  });
212
218
  it("properly does not convert different apiNamespaces", () => {
213
- expect(modernToLegacyWhereClause({
214
- "b.prop": 5
215
- }, {
219
+ const T = {
216
220
  type: "interface",
217
221
  apiName: "a.Foo",
218
222
  __DefinitionMetadata: {
@@ -231,9 +235,13 @@ describe(modernToLegacyWhereClause, () => {
231
235
  apiName: "a.Foo",
232
236
  displayName: "",
233
237
  links: {},
234
- rid: ""
238
+ rid: "",
239
+ description: undefined
235
240
  }
236
- })).toMatchInlineSnapshot(`
241
+ };
242
+ expect(modernToLegacyWhereClause({
243
+ "b.prop": 5
244
+ }, T)).toMatchInlineSnapshot(`
237
245
  {
238
246
  "field": "b.prop",
239
247
  "type": "eq",
@@ -244,9 +252,7 @@ describe(modernToLegacyWhereClause, () => {
244
252
  });
245
253
  describe("objects", () => {
246
254
  it("does not convert object short property names to fq", () => {
247
- const r = modernToLegacyWhereClause({
248
- prop: 5
249
- }, {
255
+ const T = {
250
256
  type: "interface",
251
257
  apiName: "a.Foo",
252
258
  __DefinitionMetadata: {
@@ -262,9 +268,13 @@ describe(modernToLegacyWhereClause, () => {
262
268
  apiName: "a.Foo",
263
269
  displayName: "",
264
270
  links: {},
265
- rid: ""
271
+ rid: "",
272
+ description: undefined
266
273
  }
267
- });
274
+ };
275
+ const r = modernToLegacyWhereClause({
276
+ prop: 5
277
+ }, T);
268
278
  expect(r).toMatchInlineSnapshot(`
269
279
  {
270
280
  "field": "a.prop",
@@ -1 +1 @@
1
- {"version":3,"file":"modernToLegacyWhereClause.test.js","names":["BgaoNflPlayer","objectTypeWithAllPropertyTypes","expectType","describe","expect","it","modernToLegacyWhereClause","r","$and","prop","$eq","prop2","innerProp1","type","apiName","__DefinitionMetadata","properties","displayName","links","rid","toMatchInlineSnapshot","foo","geoPoint","$within","$bbox","$distance","$of","coordinates","$polygon","geoShape","$intersects","integer","$ne","string","$containsAllTerms","term","fuzzySearch","$containsAnyTerm","address","state","city","$or","gamesPlayed","$gt","decimal"],"sources":["modernToLegacyWhereClause.test.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 { ObjectOrInterfaceDefinition, WhereClause } from \"@osdk/api\";\nimport {\n BgaoNflPlayer,\n objectTypeWithAllPropertyTypes,\n} from \"@osdk/client.test.ontology\";\nimport type { Point } from \"geojson\";\nimport { expectType } from \"ts-expect\";\nimport { describe, expect, it } from \"vitest\";\nimport { modernToLegacyWhereClause } from \"./modernToLegacyWhereClause.js\";\n\ntype ObjAllProps = objectTypeWithAllPropertyTypes;\ntype structObj = BgaoNflPlayer;\ndescribe(modernToLegacyWhereClause, () => {\n describe(\"api namespaces\", () => {\n describe(\"interfaces\", () => {\n it(\"properly converts shortname to fqApiName\", () => {\n const T = {\n type: \"interface\",\n apiName: \"a.Foo\",\n __DefinitionMetadata: {\n type: \"interface\",\n properties: {\n \"prop\": { type: \"integer\" },\n \"prop2\": {\n type: { \"innerProp1\": \"string\", \"innerProp2\": \"float\" },\n },\n },\n apiName: \"a.Foo\",\n displayName: \"\",\n links: {},\n rid: \"\",\n },\n } as const satisfies ObjectOrInterfaceDefinition;\n\n const r = modernToLegacyWhereClause({\n $and: [\n { prop: { $eq: 5 } },\n { prop2: { innerProp1: { $eq: \"myProp\" } } },\n ],\n }, T);\n\n expect(r).toMatchInlineSnapshot(`\n {\n \"type\": \"and\",\n \"value\": [\n {\n \"field\": \"a.prop\",\n \"type\": \"eq\",\n \"value\": 5,\n },\n {\n \"field\": undefined,\n \"propertyIdentifier\": {\n \"propertyApiName\": \"a.prop2\",\n \"structFieldApiName\": \"innerProp1\",\n \"type\": \"structField\",\n },\n \"type\": \"eq\",\n \"value\": \"myProp\",\n },\n ],\n }\n `);\n });\n\n it(\"properly does not convert when interface has no apiNamespace\", () => {\n const T = {\n type: \"interface\",\n apiName: \"Foo\",\n __DefinitionMetadata: {\n type: \"interface\",\n properties: {\n \"foo\": { type: \"integer\" },\n \"b.prop\": { type: \"integer\" },\n \"prop\": { type: \"integer\" },\n \"c.prop2\": {\n type: { \"innerProp1\": \"string\", \"innerProp2\": \"float\" },\n },\n },\n apiName: \"Foo\",\n displayName: \"\",\n links: {},\n rid: \"\",\n },\n } as const satisfies ObjectOrInterfaceDefinition;\n\n const r = modernToLegacyWhereClause({\n \"b.prop\": 5,\n foo: 6,\n \"c.prop2\": { innerProp1: { $eq: \"myProp\" } },\n }, T);\n\n expect(r).toMatchInlineSnapshot(`\n {\n \"type\": \"and\",\n \"value\": [\n {\n \"field\": \"b.prop\",\n \"type\": \"eq\",\n \"value\": 5,\n },\n {\n \"field\": \"foo\",\n \"type\": \"eq\",\n \"value\": 6,\n },\n {\n \"field\": undefined,\n \"propertyIdentifier\": {\n \"propertyApiName\": \"c.prop2\",\n \"structFieldApiName\": \"innerProp1\",\n \"type\": \"structField\",\n },\n \"type\": \"eq\",\n \"value\": \"myProp\",\n },\n ],\n }\n `);\n });\n\n it(\"gracefully handles redundant apiNamespace in property\", () => {\n const T = {\n type: \"interface\",\n apiName: \"a.Foo\",\n __DefinitionMetadata: {\n type: \"interface\",\n properties: {\n \"a.foo\": { type: \"integer\" },\n \"b.prop\": { type: \"integer\" },\n \"prop\": { type: \"integer\" },\n \"c.prop2\": {\n type: { \"innerProp1\": \"string\", \"innerProp2\": \"float\" },\n },\n },\n apiName: \"a.Foo\",\n displayName: \"\",\n links: {},\n rid: \"\",\n },\n } as const satisfies ObjectOrInterfaceDefinition;\n\n const r = modernToLegacyWhereClause({\n \"b.prop\": 5,\n \"a.foo\": 6,\n \"c.prop2\": { innerProp1: { $eq: \"myProp\" } },\n }, T);\n\n expect(r).toMatchInlineSnapshot(`\n {\n \"type\": \"and\",\n \"value\": [\n {\n \"field\": \"b.prop\",\n \"type\": \"eq\",\n \"value\": 5,\n },\n {\n \"field\": \"a.foo\",\n \"type\": \"eq\",\n \"value\": 6,\n },\n {\n \"field\": undefined,\n \"propertyIdentifier\": {\n \"propertyApiName\": \"c.prop2\",\n \"structFieldApiName\": \"innerProp1\",\n \"type\": \"structField\",\n },\n \"type\": \"eq\",\n \"value\": \"myProp\",\n },\n ],\n }\n `);\n });\n\n it(\"properly does not convert different apiNamespaces\", () => {\n const T = {\n type: \"interface\",\n apiName: \"a.Foo\",\n __DefinitionMetadata: {\n type: \"interface\",\n properties: {\n \"a.foo\": { type: \"integer\" },\n \"b.prop\": { type: \"integer\" },\n \"prop\": { type: \"integer\" },\n },\n apiName: \"a.Foo\",\n displayName: \"\",\n links: {},\n rid: \"\",\n },\n } as const satisfies ObjectOrInterfaceDefinition;\n\n expect(modernToLegacyWhereClause({\n \"b.prop\": 5,\n }, T)).toMatchInlineSnapshot(`\n {\n \"field\": \"b.prop\",\n \"type\": \"eq\",\n \"value\": 5,\n }\n `);\n });\n });\n\n describe(\"objects\", () => {\n it(\"does not convert object short property names to fq\", () => {\n const T = {\n type: \"interface\",\n apiName: \"a.Foo\",\n __DefinitionMetadata: {\n type: \"interface\",\n properties: {\n \"a.foo\": { type: \"integer\" },\n \"prop\": { type: \"integer\" },\n },\n apiName: \"a.Foo\",\n displayName: \"\",\n links: {},\n rid: \"\",\n },\n } as const satisfies ObjectOrInterfaceDefinition;\n const r = modernToLegacyWhereClause({\n prop: 5,\n }, T);\n\n expect(r).toMatchInlineSnapshot(`\n {\n \"field\": \"a.prop\",\n \"type\": \"eq\",\n \"value\": 5,\n }\n `);\n });\n });\n });\n\n describe(\"single checks\", () => {\n describe(\"$within\", () => {\n it(\"properly generates bbox shortcut\", async () => {\n expect(modernToLegacyWhereClause<ObjAllProps>(\n {\n geoPoint: {\n $within: [-5, 5, -10, 10],\n },\n },\n objectTypeWithAllPropertyTypes,\n )).toMatchInlineSnapshot(`\n {\n \"field\": \"geoPoint\",\n \"type\": \"withinBoundingBox\",\n \"value\": {\n \"bottomRight\": {\n \"coordinates\": [\n -10,\n 5,\n ],\n \"type\": \"Point\",\n },\n \"topLeft\": {\n \"coordinates\": [\n -5,\n 10,\n ],\n \"type\": \"Point\",\n },\n },\n }\n `);\n });\n\n it(\"properly generates bbox long form\", async () => {\n expect(modernToLegacyWhereClause<ObjAllProps>(\n {\n geoPoint: {\n $within: {\n $bbox: [-5, 5, -10, 10],\n },\n },\n },\n objectTypeWithAllPropertyTypes,\n )).toMatchInlineSnapshot(`\n {\n \"field\": \"geoPoint\",\n \"type\": \"withinBoundingBox\",\n \"value\": {\n \"bottomRight\": {\n \"coordinates\": [\n -10,\n 5,\n ],\n \"type\": \"Point\",\n },\n \"topLeft\": {\n \"coordinates\": [\n -5,\n 10,\n ],\n \"type\": \"Point\",\n },\n },\n }\n `);\n });\n\n it(\"properly generates within radius\", async () => {\n expect(modernToLegacyWhereClause<ObjAllProps>(\n {\n geoPoint: {\n $within: { $distance: [5, \"km\"], $of: [-5, 5] },\n },\n },\n objectTypeWithAllPropertyTypes,\n )).toMatchInlineSnapshot(`\n {\n \"field\": \"geoPoint\",\n \"type\": \"withinDistanceOf\",\n \"value\": {\n \"center\": {\n \"coordinates\": [\n -5,\n 5,\n ],\n \"type\": \"Point\",\n },\n \"distance\": {\n \"unit\": \"KILOMETERS\",\n \"value\": 5,\n },\n },\n }\n `);\n });\n\n it(\"properly generates within radius of geopoint\", async () => {\n // suppose you loaded an object with a geopoint field\n // and you want to find all objects within 5 km of that point\n const pointAsGeoJsonPoint: Point = {\n type: \"Point\",\n coordinates: [-5, 5],\n };\n expect(modernToLegacyWhereClause<ObjAllProps>(\n {\n geoPoint: {\n $within: { $distance: [5, \"km\"], $of: pointAsGeoJsonPoint },\n },\n },\n objectTypeWithAllPropertyTypes,\n )).toMatchInlineSnapshot(`\n {\n \"field\": \"geoPoint\",\n \"type\": \"withinDistanceOf\",\n \"value\": {\n \"center\": {\n \"coordinates\": [\n -5,\n 5,\n ],\n \"type\": \"Point\",\n },\n \"distance\": {\n \"unit\": \"KILOMETERS\",\n \"value\": 5,\n },\n },\n }\n `);\n });\n\n it(\"properly generates within polygon\", async () => {\n expect(modernToLegacyWhereClause<ObjAllProps>(\n {\n geoPoint: {\n $within: { $polygon: [[[0, 1], [3, 2], [0, 1]]] },\n },\n },\n objectTypeWithAllPropertyTypes,\n )).toMatchInlineSnapshot(`\n {\n \"field\": \"geoPoint\",\n \"type\": \"withinPolygon\",\n \"value\": {\n \"coordinates\": [\n [\n [\n 0,\n 1,\n ],\n [\n 3,\n 2,\n ],\n [\n 0,\n 1,\n ],\n ],\n ],\n \"type\": \"Polygon\",\n },\n }\n `);\n });\n\n it(\"properly generates within polygon geojson\", async () => {\n expect(modernToLegacyWhereClause<ObjAllProps>(\n {\n geoPoint: {\n $within: {\n type: \"Polygon\",\n coordinates: [[[0, 1], [3, 2], [0, 1]]],\n },\n },\n },\n objectTypeWithAllPropertyTypes,\n )).toMatchInlineSnapshot(`\n {\n \"field\": \"geoPoint\",\n \"type\": \"withinPolygon\",\n \"value\": {\n \"coordinates\": [\n [\n [\n 0,\n 1,\n ],\n [\n 3,\n 2,\n ],\n [\n 0,\n 1,\n ],\n ],\n ],\n \"type\": \"Polygon\",\n },\n }\n `);\n });\n it(\"check types\", async () => {\n expectType<WhereClause<ObjAllProps>>({\n geoPoint: {\n $within: [-5, 5, -10, 10],\n },\n });\n\n expectType<WhereClause<ObjAllProps>>({\n geoPoint: {\n $within: { $distance: [2, \"centimeter\"], $of: [2, 2] },\n },\n });\n\n expectType<WhereClause<ObjAllProps>>({\n geoPoint: {\n $within: { $polygon: [[[0, 1], [3, 2], [0, 1]]] },\n },\n });\n\n expectType<WhereClause<ObjAllProps>>({\n geoPoint: {\n $within: {\n type: \"Polygon\",\n coordinates: [[[0, 1], [3, 2], [0, 1]]],\n },\n },\n });\n\n expectType<WhereClause<ObjAllProps>>({\n geoPoint: {\n $within: { $bbox: [-5, 5, -10, 10] },\n },\n });\n\n expectType<WhereClause<ObjAllProps>>({\n geoPoint: {\n $within: {\n $bbox: [-5, 5, -10, 10],\n // @ts-expect-error\n $distance: [2, \"centimeter\"],\n // @ts-expect-error\n $of: [2, 2],\n },\n },\n });\n expectType<WhereClause<ObjAllProps>>({\n geoPoint: {\n $within: {\n $polygon: [[[0, 1], [3, 2], [0, 1]]],\n // @ts-expect-error\n $bbox: [2, 2, 2, 2],\n },\n },\n });\n });\n describe(\"$intersects\", () => {\n it(\"properly generates bbox shortcut\", async () => {\n expect(modernToLegacyWhereClause<ObjAllProps>(\n {\n geoShape: {\n $intersects: [-5, 5, -10, 10],\n },\n },\n objectTypeWithAllPropertyTypes,\n )).toMatchInlineSnapshot(`\n {\n \"field\": \"geoShape\",\n \"type\": \"intersectsBoundingBox\",\n \"value\": {\n \"bottomRight\": {\n \"coordinates\": [\n -10,\n 5,\n ],\n \"type\": \"Point\",\n },\n \"topLeft\": {\n \"coordinates\": [\n -5,\n 10,\n ],\n \"type\": \"Point\",\n },\n },\n }\n `);\n });\n it(\"properly generates bbox long form\", async () => {\n expect(modernToLegacyWhereClause<ObjAllProps>(\n {\n geoShape: {\n $intersects: {\n $bbox: [-5, 5, -10, 10],\n },\n },\n },\n objectTypeWithAllPropertyTypes,\n )).toMatchInlineSnapshot(`\n {\n \"field\": \"geoShape\",\n \"type\": \"intersectsBoundingBox\",\n \"value\": {\n \"bottomRight\": {\n \"coordinates\": [\n -10,\n 5,\n ],\n \"type\": \"Point\",\n },\n \"topLeft\": {\n \"coordinates\": [\n -5,\n 10,\n ],\n \"type\": \"Point\",\n },\n },\n }\n `);\n });\n\n it(\"properly generates intersects polygon\", async () => {\n expect(modernToLegacyWhereClause<ObjAllProps>(\n {\n geoShape: {\n $intersects: { $polygon: [[[0, 1], [3, 2], [0, 1]]] },\n },\n },\n objectTypeWithAllPropertyTypes,\n )).toMatchInlineSnapshot(`\n {\n \"field\": \"geoShape\",\n \"type\": \"intersectsPolygon\",\n \"value\": {\n \"coordinates\": [\n [\n [\n 0,\n 1,\n ],\n [\n 3,\n 2,\n ],\n [\n 0,\n 1,\n ],\n ],\n ],\n \"type\": \"Polygon\",\n },\n }\n `);\n });\n\n it(\"properly generates within polygon geojson\", async () => {\n expect(modernToLegacyWhereClause<ObjAllProps>(\n {\n geoShape: {\n $intersects: {\n type: \"Polygon\",\n coordinates: [[[0, 1], [3, 2], [0, 1]]],\n },\n },\n },\n objectTypeWithAllPropertyTypes,\n )).toMatchInlineSnapshot(`\n {\n \"field\": \"geoShape\",\n \"type\": \"intersectsPolygon\",\n \"value\": {\n \"coordinates\": [\n [\n [\n 0,\n 1,\n ],\n [\n 3,\n 2,\n ],\n [\n 0,\n 1,\n ],\n ],\n ],\n \"type\": \"Polygon\",\n },\n }\n `);\n });\n });\n\n it(\"inverts ne short hand properly\", () => {\n expect(modernToLegacyWhereClause<ObjAllProps>({\n integer: { $ne: 5 },\n }, objectTypeWithAllPropertyTypes)).toMatchInlineSnapshot(`\n {\n \"type\": \"not\",\n \"value\": {\n \"field\": \"integer\",\n \"type\": \"eq\",\n \"value\": 5,\n },\n }\n `);\n });\n it(\"converts $containsAllTerms correctly if using new type\", () => {\n expect(modernToLegacyWhereClause<ObjAllProps>({\n string: { $containsAllTerms: { term: \"test\", fuzzySearch: true } },\n }, objectTypeWithAllPropertyTypes)).toMatchInlineSnapshot(`\n {\n \"field\": \"string\",\n \"fuzzy\": true,\n \"type\": \"containsAllTerms\",\n \"value\": \"test\",\n }\n `);\n\n expect(modernToLegacyWhereClause<ObjAllProps>({\n string: { $containsAllTerms: { term: \"test\", fuzzySearch: false } },\n }, objectTypeWithAllPropertyTypes)).toMatchInlineSnapshot(`\n {\n \"field\": \"string\",\n \"fuzzy\": false,\n \"type\": \"containsAllTerms\",\n \"value\": \"test\",\n }\n `);\n\n expect(modernToLegacyWhereClause<ObjAllProps>({\n string: { $containsAllTerms: { term: \"test\" } },\n }, objectTypeWithAllPropertyTypes)).toMatchInlineSnapshot(`\n {\n \"field\": \"string\",\n \"fuzzy\": false,\n \"type\": \"containsAllTerms\",\n \"value\": \"test\",\n }\n `);\n });\n\n it(\"converts $containsAllTerms correctly if using old type\", () => {\n expect(modernToLegacyWhereClause<ObjAllProps>({\n string: { $containsAllTerms: \"test\" },\n }, objectTypeWithAllPropertyTypes)).toMatchInlineSnapshot(`\n {\n \"field\": \"string\",\n \"fuzzy\": false,\n \"type\": \"containsAllTerms\",\n \"value\": \"test\",\n }\n `);\n });\n it(\"converts $containsAnyTerm correctly if using new type\", () => {\n expect(modernToLegacyWhereClause<ObjAllProps>({\n string: { $containsAnyTerm: { term: \"test\", fuzzySearch: true } },\n }, objectTypeWithAllPropertyTypes)).toMatchInlineSnapshot(`\n {\n \"field\": \"string\",\n \"fuzzy\": true,\n \"type\": \"containsAnyTerm\",\n \"value\": \"test\",\n }\n `);\n\n expect(modernToLegacyWhereClause<ObjAllProps>({\n string: { $containsAnyTerm: { term: \"test\", fuzzySearch: false } },\n }, objectTypeWithAllPropertyTypes)).toMatchInlineSnapshot(`\n {\n \"field\": \"string\",\n \"fuzzy\": false,\n \"type\": \"containsAnyTerm\",\n \"value\": \"test\",\n }\n `);\n\n expect(modernToLegacyWhereClause<ObjAllProps>({\n string: { $containsAnyTerm: { term: \"test\" } },\n }, objectTypeWithAllPropertyTypes)).toMatchInlineSnapshot(`\n {\n \"field\": \"string\",\n \"fuzzy\": false,\n \"type\": \"containsAnyTerm\",\n \"value\": \"test\",\n }\n `);\n });\n\n it(\"converts $containsAnyTerm correctly if using old type\", () => {\n expect(modernToLegacyWhereClause<ObjAllProps>({\n string: { $containsAnyTerm: \"test\" },\n }, objectTypeWithAllPropertyTypes)).toMatchInlineSnapshot(`\n {\n \"field\": \"string\",\n \"fuzzy\": false,\n \"type\": \"containsAnyTerm\",\n \"value\": \"test\",\n }\n `);\n });\n it(\"converts struct where clauses correctly\", () => {\n expect(modernToLegacyWhereClause<structObj>({\n address: { state: { $eq: \"NJ\" } },\n }, BgaoNflPlayer)).toMatchInlineSnapshot(`\n {\n \"field\": undefined,\n \"propertyIdentifier\": {\n \"propertyApiName\": \"address\",\n \"structFieldApiName\": \"state\",\n \"type\": \"structField\",\n },\n \"type\": \"eq\",\n \"value\": \"NJ\",\n }\n `);\n\n expect(modernToLegacyWhereClause<structObj>({\n $and: [\n { address: { state: { $eq: \"NJ\" } } },\n { address: { city: { $containsAnyTerm: \"N\" } } },\n ],\n }, BgaoNflPlayer)).toMatchInlineSnapshot(`\n {\n \"type\": \"and\",\n \"value\": [\n {\n \"field\": undefined,\n \"propertyIdentifier\": {\n \"propertyApiName\": \"address\",\n \"structFieldApiName\": \"state\",\n \"type\": \"structField\",\n },\n \"type\": \"eq\",\n \"value\": \"NJ\",\n },\n {\n \"field\": undefined,\n \"fuzzy\": false,\n \"propertyIdentifier\": {\n \"propertyApiName\": \"address\",\n \"structFieldApiName\": \"city\",\n \"type\": \"structField\",\n },\n \"type\": \"containsAnyTerm\",\n \"value\": \"N\",\n },\n ],\n }\n `);\n\n expect(modernToLegacyWhereClause<structObj>({\n $or: [\n { address: { state: { $eq: \"NJ\" } } },\n { address: { city: { $containsAnyTerm: \"N\" } } },\n { gamesPlayed: { $gt: 5 } },\n ],\n }, BgaoNflPlayer)).toMatchInlineSnapshot(`\n {\n \"type\": \"or\",\n \"value\": [\n {\n \"field\": undefined,\n \"propertyIdentifier\": {\n \"propertyApiName\": \"address\",\n \"structFieldApiName\": \"state\",\n \"type\": \"structField\",\n },\n \"type\": \"eq\",\n \"value\": \"NJ\",\n },\n {\n \"field\": undefined,\n \"fuzzy\": false,\n \"propertyIdentifier\": {\n \"propertyApiName\": \"address\",\n \"structFieldApiName\": \"city\",\n \"type\": \"structField\",\n },\n \"type\": \"containsAnyTerm\",\n \"value\": \"N\",\n },\n {\n \"field\": \"gamesPlayed\",\n \"type\": \"gt\",\n \"value\": 5,\n },\n ],\n }\n `);\n });\n });\n\n describe(\"multiple checks\", () => {\n it(\"properly handles multiple simple where checks\", () => {\n expect(modernToLegacyWhereClause<ObjAllProps>(\n {\n decimal: 5,\n integer: 10,\n },\n objectTypeWithAllPropertyTypes,\n )).toMatchInlineSnapshot(`\n {\n \"type\": \"and\",\n \"value\": [\n {\n \"field\": \"decimal\",\n \"type\": \"eq\",\n \"value\": 5,\n },\n {\n \"field\": \"integer\",\n \"type\": \"eq\",\n \"value\": 10,\n },\n ],\n }\n `);\n });\n\n it(\"properly handles $and\", () => {\n expect(modernToLegacyWhereClause<ObjAllProps>(\n {\n $and: [{\n decimal: 5,\n }, {\n integer: 10,\n }],\n },\n objectTypeWithAllPropertyTypes,\n )).toMatchInlineSnapshot(`\n {\n \"type\": \"and\",\n \"value\": [\n {\n \"field\": \"decimal\",\n \"type\": \"eq\",\n \"value\": 5,\n },\n {\n \"field\": \"integer\",\n \"type\": \"eq\",\n \"value\": 10,\n },\n ],\n }\n `);\n });\n\n it(\"properly handles $or\", () => {\n expect(modernToLegacyWhereClause<ObjAllProps>(\n {\n $or: [{\n decimal: 5,\n }, {\n integer: 10,\n }],\n },\n objectTypeWithAllPropertyTypes,\n )).toMatchInlineSnapshot(`\n {\n \"type\": \"or\",\n \"value\": [\n {\n \"field\": \"decimal\",\n \"type\": \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yB,CAC9B;UACEmC,GAAG,EAAE,CAAC;YACJG,OAAO,EAAE;UACX,CAAC,EAAE;YACDb,OAAO,EAAE;UACX,CAAC;QACH,CAAC,EACD9B,8BACF,CAAC,CAAC,CAACmB,qBAAqB,CAAC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,CAAC;MACN,CAAC,CAAC;IACJ,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"modernToLegacyWhereClause.test.js","names":["BgaoNflPlayer","objectTypeWithAllPropertyTypes","expectType","describe","expect","it","modernToLegacyWhereClause","T","type","apiName","__DefinitionMetadata","properties","displayName","links","rid","description","undefined","r","$and","prop","$eq","prop2","innerProp1","toMatchInlineSnapshot","foo","geoPoint","$within","$bbox","$distance","$of","coordinates","$polygon","geoShape","$intersects","integer","$ne","string","$containsAllTerms","term","fuzzySearch","$containsAnyTerm","address","state","city","$or","gamesPlayed","$gt","decimal"],"sources":["modernToLegacyWhereClause.test.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 { ObjectOrInterfaceDefinition, WhereClause } from \"@osdk/api\";\nimport {\n BgaoNflPlayer,\n objectTypeWithAllPropertyTypes,\n} from \"@osdk/client.test.ontology\";\nimport type { Point } from \"geojson\";\nimport { expectType } from \"ts-expect\";\nimport { describe, expect, it } from \"vitest\";\nimport { modernToLegacyWhereClause } from \"./modernToLegacyWhereClause.js\";\n\ntype ObjAllProps = objectTypeWithAllPropertyTypes;\ntype structObj = BgaoNflPlayer;\ndescribe(modernToLegacyWhereClause, () => {\n describe(\"api namespaces\", () => {\n describe(\"interfaces\", () => {\n it(\"properly converts shortname to fqApiName\", () => {\n const T = {\n type: \"interface\",\n apiName: \"a.Foo\",\n __DefinitionMetadata: {\n type: \"interface\",\n properties: {\n \"prop\": { type: \"integer\" },\n \"prop2\": {\n type: { \"innerProp1\": \"string\", \"innerProp2\": \"float\" },\n },\n },\n apiName: \"a.Foo\",\n displayName: \"\",\n links: {},\n rid: \"\",\n description: undefined,\n },\n } as const satisfies ObjectOrInterfaceDefinition;\n\n const r = modernToLegacyWhereClause({\n $and: [\n { prop: { $eq: 5 } },\n { prop2: { innerProp1: { $eq: \"myProp\" } } },\n ],\n }, T);\n\n expect(r).toMatchInlineSnapshot(`\n {\n \"type\": \"and\",\n \"value\": [\n {\n \"field\": \"a.prop\",\n \"type\": \"eq\",\n \"value\": 5,\n },\n {\n \"field\": undefined,\n \"propertyIdentifier\": {\n \"propertyApiName\": \"a.prop2\",\n \"structFieldApiName\": \"innerProp1\",\n \"type\": \"structField\",\n },\n \"type\": \"eq\",\n \"value\": \"myProp\",\n },\n ],\n }\n `);\n });\n\n it(\"properly does not convert when interface has no apiNamespace\", () => {\n const T = {\n type: \"interface\",\n apiName: \"Foo\",\n __DefinitionMetadata: {\n type: \"interface\",\n properties: {\n \"foo\": { type: \"integer\" },\n \"b.prop\": { type: \"integer\" },\n \"prop\": { type: \"integer\" },\n \"c.prop2\": {\n type: { \"innerProp1\": \"string\", \"innerProp2\": \"float\" },\n },\n },\n apiName: \"Foo\",\n displayName: \"\",\n links: {},\n rid: \"\",\n description: undefined,\n },\n } as const satisfies ObjectOrInterfaceDefinition;\n\n const r = modernToLegacyWhereClause({\n \"b.prop\": 5,\n foo: 6,\n \"c.prop2\": { innerProp1: { $eq: \"myProp\" } },\n }, T);\n\n expect(r).toMatchInlineSnapshot(`\n {\n \"type\": \"and\",\n \"value\": [\n {\n \"field\": \"b.prop\",\n \"type\": \"eq\",\n \"value\": 5,\n },\n {\n \"field\": \"foo\",\n \"type\": \"eq\",\n \"value\": 6,\n },\n {\n \"field\": undefined,\n \"propertyIdentifier\": {\n \"propertyApiName\": \"c.prop2\",\n \"structFieldApiName\": \"innerProp1\",\n \"type\": \"structField\",\n },\n \"type\": \"eq\",\n \"value\": \"myProp\",\n },\n ],\n }\n `);\n });\n\n it(\"gracefully handles redundant apiNamespace in property\", () => {\n const T = {\n type: \"interface\",\n apiName: \"a.Foo\",\n __DefinitionMetadata: {\n type: \"interface\",\n properties: {\n \"a.foo\": { type: \"integer\" },\n \"b.prop\": { type: \"integer\" },\n \"prop\": { type: \"integer\" },\n \"c.prop2\": {\n type: { \"innerProp1\": \"string\", \"innerProp2\": \"float\" },\n },\n },\n apiName: \"a.Foo\",\n displayName: \"\",\n links: {},\n rid: \"\",\n description: undefined,\n },\n } as const satisfies ObjectOrInterfaceDefinition;\n\n const r = modernToLegacyWhereClause({\n \"b.prop\": 5,\n \"a.foo\": 6,\n \"c.prop2\": { innerProp1: { $eq: \"myProp\" } },\n }, T);\n\n expect(r).toMatchInlineSnapshot(`\n {\n \"type\": \"and\",\n \"value\": [\n {\n \"field\": \"b.prop\",\n \"type\": \"eq\",\n \"value\": 5,\n },\n {\n \"field\": \"a.foo\",\n \"type\": \"eq\",\n \"value\": 6,\n },\n {\n \"field\": undefined,\n \"propertyIdentifier\": {\n \"propertyApiName\": \"c.prop2\",\n \"structFieldApiName\": \"innerProp1\",\n \"type\": \"structField\",\n },\n \"type\": \"eq\",\n \"value\": \"myProp\",\n },\n ],\n }\n `);\n });\n\n it(\"properly does not convert different apiNamespaces\", () => {\n const T = {\n type: \"interface\",\n apiName: \"a.Foo\",\n __DefinitionMetadata: {\n type: \"interface\",\n properties: {\n \"a.foo\": { type: \"integer\" },\n \"b.prop\": { type: \"integer\" },\n \"prop\": { type: \"integer\" },\n },\n apiName: \"a.Foo\",\n displayName: \"\",\n links: {},\n rid: \"\",\n description: undefined,\n },\n } as const satisfies ObjectOrInterfaceDefinition;\n\n expect(modernToLegacyWhereClause({\n \"b.prop\": 5,\n }, T)).toMatchInlineSnapshot(`\n {\n \"field\": \"b.prop\",\n \"type\": \"eq\",\n \"value\": 5,\n }\n `);\n });\n });\n\n describe(\"objects\", () => {\n it(\"does not convert object short property names to fq\", () => {\n const T = {\n type: \"interface\",\n apiName: \"a.Foo\",\n __DefinitionMetadata: {\n type: \"interface\",\n properties: {\n \"a.foo\": { type: \"integer\" },\n \"prop\": { type: \"integer\" },\n },\n apiName: \"a.Foo\",\n displayName: \"\",\n links: {},\n rid: \"\",\n description: undefined,\n },\n } as const satisfies ObjectOrInterfaceDefinition;\n const r = modernToLegacyWhereClause({\n prop: 5,\n }, T);\n\n expect(r).toMatchInlineSnapshot(`\n {\n \"field\": \"a.prop\",\n \"type\": \"eq\",\n \"value\": 5,\n }\n `);\n });\n });\n });\n\n describe(\"single checks\", () => {\n describe(\"$within\", () => {\n it(\"properly generates bbox shortcut\", async () => {\n expect(modernToLegacyWhereClause<ObjAllProps>(\n {\n geoPoint: {\n $within: [-5, 5, -10, 10],\n },\n },\n objectTypeWithAllPropertyTypes,\n )).toMatchInlineSnapshot(`\n {\n \"field\": \"geoPoint\",\n \"type\": \"withinBoundingBox\",\n \"value\": {\n \"bottomRight\": {\n \"coordinates\": [\n -10,\n 5,\n ],\n \"type\": \"Point\",\n },\n \"topLeft\": {\n \"coordinates\": [\n -5,\n 10,\n ],\n \"type\": \"Point\",\n },\n },\n }\n `);\n });\n\n it(\"properly generates bbox long form\", async () => {\n expect(modernToLegacyWhereClause<ObjAllProps>(\n {\n geoPoint: {\n $within: {\n $bbox: [-5, 5, -10, 10],\n },\n },\n },\n objectTypeWithAllPropertyTypes,\n )).toMatchInlineSnapshot(`\n {\n \"field\": \"geoPoint\",\n \"type\": \"withinBoundingBox\",\n \"value\": {\n \"bottomRight\": {\n \"coordinates\": [\n -10,\n 5,\n ],\n \"type\": \"Point\",\n },\n \"topLeft\": {\n \"coordinates\": [\n -5,\n 10,\n ],\n \"type\": \"Point\",\n },\n },\n }\n `);\n });\n\n it(\"properly generates within radius\", async () => {\n expect(modernToLegacyWhereClause<ObjAllProps>(\n {\n geoPoint: {\n $within: { $distance: [5, \"km\"], $of: [-5, 5] },\n },\n },\n objectTypeWithAllPropertyTypes,\n )).toMatchInlineSnapshot(`\n {\n \"field\": \"geoPoint\",\n \"type\": \"withinDistanceOf\",\n \"value\": {\n \"center\": {\n \"coordinates\": [\n -5,\n 5,\n ],\n \"type\": \"Point\",\n },\n \"distance\": {\n \"unit\": \"KILOMETERS\",\n \"value\": 5,\n },\n },\n }\n `);\n });\n\n it(\"properly generates within radius of geopoint\", async () => {\n // suppose you loaded an object with a geopoint field\n // and you want to find all objects within 5 km of that point\n const pointAsGeoJsonPoint: Point = {\n type: \"Point\",\n coordinates: [-5, 5],\n };\n expect(modernToLegacyWhereClause<ObjAllProps>(\n {\n geoPoint: {\n $within: { $distance: [5, \"km\"], $of: pointAsGeoJsonPoint },\n },\n },\n objectTypeWithAllPropertyTypes,\n )).toMatchInlineSnapshot(`\n {\n \"field\": \"geoPoint\",\n \"type\": \"withinDistanceOf\",\n \"value\": {\n \"center\": {\n \"coordinates\": [\n -5,\n 5,\n ],\n \"type\": \"Point\",\n },\n \"distance\": {\n \"unit\": \"KILOMETERS\",\n \"value\": 5,\n },\n },\n }\n `);\n });\n\n it(\"properly generates within polygon\", async () => {\n expect(modernToLegacyWhereClause<ObjAllProps>(\n {\n geoPoint: {\n $within: { $polygon: [[[0, 1], [3, 2], [0, 1]]] },\n },\n },\n objectTypeWithAllPropertyTypes,\n )).toMatchInlineSnapshot(`\n {\n \"field\": \"geoPoint\",\n \"type\": \"withinPolygon\",\n \"value\": {\n \"coordinates\": [\n [\n [\n 0,\n 1,\n ],\n [\n 3,\n 2,\n ],\n [\n 0,\n 1,\n ],\n ],\n ],\n \"type\": \"Polygon\",\n },\n }\n `);\n });\n\n it(\"properly generates within polygon geojson\", async () => {\n expect(modernToLegacyWhereClause<ObjAllProps>(\n {\n geoPoint: {\n $within: {\n type: \"Polygon\",\n coordinates: [[[0, 1], [3, 2], [0, 1]]],\n },\n },\n },\n objectTypeWithAllPropertyTypes,\n )).toMatchInlineSnapshot(`\n {\n \"field\": \"geoPoint\",\n \"type\": \"withinPolygon\",\n \"value\": {\n \"coordinates\": [\n [\n [\n 0,\n 1,\n ],\n [\n 3,\n 2,\n ],\n [\n 0,\n 1,\n ],\n ],\n ],\n \"type\": \"Polygon\",\n },\n }\n `);\n });\n it(\"check types\", async () => {\n expectType<WhereClause<ObjAllProps>>({\n geoPoint: {\n $within: [-5, 5, -10, 10],\n },\n });\n\n expectType<WhereClause<ObjAllProps>>({\n geoPoint: {\n $within: { $distance: [2, \"centimeter\"], $of: [2, 2] },\n },\n });\n\n expectType<WhereClause<ObjAllProps>>({\n geoPoint: {\n $within: { $polygon: [[[0, 1], [3, 2], [0, 1]]] },\n },\n });\n\n expectType<WhereClause<ObjAllProps>>({\n geoPoint: {\n $within: {\n type: \"Polygon\",\n coordinates: [[[0, 1], [3, 2], [0, 1]]],\n },\n },\n });\n\n expectType<WhereClause<ObjAllProps>>({\n geoPoint: {\n $within: { $bbox: [-5, 5, -10, 10] },\n },\n });\n\n expectType<WhereClause<ObjAllProps>>({\n geoPoint: {\n $within: {\n $bbox: [-5, 5, -10, 10],\n // @ts-expect-error\n $distance: [2, \"centimeter\"],\n // @ts-expect-error\n $of: [2, 2],\n },\n },\n });\n expectType<WhereClause<ObjAllProps>>({\n geoPoint: {\n $within: {\n $polygon: [[[0, 1], [3, 2], [0, 1]]],\n // @ts-expect-error\n $bbox: [2, 2, 2, 2],\n },\n },\n });\n });\n describe(\"$intersects\", () => {\n it(\"properly generates bbox shortcut\", async () => {\n expect(modernToLegacyWhereClause<ObjAllProps>(\n {\n geoShape: {\n $intersects: [-5, 5, -10, 10],\n },\n },\n objectTypeWithAllPropertyTypes,\n )).toMatchInlineSnapshot(`\n {\n \"field\": \"geoShape\",\n \"type\": \"intersectsBoundingBox\",\n \"value\": {\n \"bottomRight\": {\n \"coordinates\": [\n -10,\n 5,\n ],\n \"type\": \"Point\",\n },\n \"topLeft\": {\n \"coordinates\": [\n -5,\n 10,\n ],\n \"type\": \"Point\",\n },\n },\n }\n `);\n });\n it(\"properly generates bbox long form\", async () => {\n expect(modernToLegacyWhereClause<ObjAllProps>(\n {\n geoShape: {\n $intersects: {\n $bbox: [-5, 5, -10, 10],\n },\n },\n },\n objectTypeWithAllPropertyTypes,\n )).toMatchInlineSnapshot(`\n {\n \"field\": \"geoShape\",\n \"type\": \"intersectsBoundingBox\",\n \"value\": {\n \"bottomRight\": {\n \"coordinates\": [\n -10,\n 5,\n ],\n \"type\": \"Point\",\n },\n \"topLeft\": {\n \"coordinates\": [\n -5,\n 10,\n ],\n \"type\": \"Point\",\n },\n },\n }\n `);\n });\n\n it(\"properly generates intersects polygon\", async () => {\n expect(modernToLegacyWhereClause<ObjAllProps>(\n {\n geoShape: {\n $intersects: { $polygon: [[[0, 1], [3, 2], [0, 1]]] },\n },\n },\n objectTypeWithAllPropertyTypes,\n )).toMatchInlineSnapshot(`\n {\n \"field\": \"geoShape\",\n \"type\": \"intersectsPolygon\",\n \"value\": {\n \"coordinates\": [\n [\n [\n 0,\n 1,\n ],\n [\n 3,\n 2,\n ],\n [\n 0,\n 1,\n ],\n ],\n ],\n \"type\": \"Polygon\",\n },\n }\n `);\n });\n\n it(\"properly generates within polygon geojson\", async () => {\n expect(modernToLegacyWhereClause<ObjAllProps>(\n {\n geoShape: {\n $intersects: {\n type: \"Polygon\",\n coordinates: [[[0, 1], [3, 2], [0, 1]]],\n },\n },\n },\n objectTypeWithAllPropertyTypes,\n )).toMatchInlineSnapshot(`\n {\n \"field\": \"geoShape\",\n \"type\": \"intersectsPolygon\",\n \"value\": {\n \"coordinates\": [\n [\n [\n 0,\n 1,\n ],\n [\n 3,\n 2,\n ],\n [\n 0,\n 1,\n ],\n ],\n ],\n \"type\": \"Polygon\",\n },\n }\n `);\n });\n });\n\n it(\"inverts ne short hand properly\", () => {\n expect(modernToLegacyWhereClause<ObjAllProps>({\n integer: { $ne: 5 },\n }, objectTypeWithAllPropertyTypes)).toMatchInlineSnapshot(`\n {\n \"type\": \"not\",\n \"value\": {\n \"field\": \"integer\",\n \"type\": \"eq\",\n \"value\": 5,\n },\n }\n `);\n });\n it(\"converts $containsAllTerms correctly if using new type\", () => {\n expect(modernToLegacyWhereClause<ObjAllProps>({\n string: { $containsAllTerms: { term: \"test\", fuzzySearch: true } },\n }, objectTypeWithAllPropertyTypes)).toMatchInlineSnapshot(`\n {\n \"field\": \"string\",\n \"fuzzy\": true,\n \"type\": \"containsAllTerms\",\n \"value\": \"test\",\n }\n `);\n\n expect(modernToLegacyWhereClause<ObjAllProps>({\n string: { $containsAllTerms: { term: \"test\", fuzzySearch: false } },\n }, objectTypeWithAllPropertyTypes)).toMatchInlineSnapshot(`\n {\n \"field\": \"string\",\n \"fuzzy\": false,\n \"type\": \"containsAllTerms\",\n \"value\": \"test\",\n }\n `);\n\n expect(modernToLegacyWhereClause<ObjAllProps>({\n string: { $containsAllTerms: { term: \"test\" } },\n }, objectTypeWithAllPropertyTypes)).toMatchInlineSnapshot(`\n {\n \"field\": \"string\",\n \"fuzzy\": false,\n \"type\": \"containsAllTerms\",\n \"value\": \"test\",\n }\n `);\n });\n\n it(\"converts $containsAllTerms correctly if using old type\", () => {\n expect(modernToLegacyWhereClause<ObjAllProps>({\n string: { $containsAllTerms: \"test\" },\n }, objectTypeWithAllPropertyTypes)).toMatchInlineSnapshot(`\n {\n \"field\": \"string\",\n \"fuzzy\": false,\n \"type\": \"containsAllTerms\",\n \"value\": \"test\",\n }\n `);\n });\n it(\"converts $containsAnyTerm correctly if using new type\", () => {\n expect(modernToLegacyWhereClause<ObjAllProps>({\n string: { $containsAnyTerm: { term: \"test\", fuzzySearch: true } },\n }, objectTypeWithAllPropertyTypes)).toMatchInlineSnapshot(`\n {\n \"field\": \"string\",\n \"fuzzy\": true,\n \"type\": \"containsAnyTerm\",\n \"value\": \"test\",\n }\n `);\n\n expect(modernToLegacyWhereClause<ObjAllProps>({\n string: { $containsAnyTerm: { term: \"test\", fuzzySearch: false } },\n }, objectTypeWithAllPropertyTypes)).toMatchInlineSnapshot(`\n {\n \"field\": \"string\",\n \"fuzzy\": false,\n \"type\": \"containsAnyTerm\",\n \"value\": \"test\",\n }\n `);\n\n expect(modernToLegacyWhereClause<ObjAllProps>({\n string: { $containsAnyTerm: { term: \"test\" } },\n }, objectTypeWithAllPropertyTypes)).toMatchInlineSnapshot(`\n {\n \"field\": \"string\",\n \"fuzzy\": false,\n \"type\": \"containsAnyTerm\",\n \"value\": \"test\",\n }\n `);\n });\n\n it(\"converts $containsAnyTerm correctly if using old type\", () => {\n expect(modernToLegacyWhereClause<ObjAllProps>({\n string: { $containsAnyTerm: \"test\" },\n }, objectTypeWithAllPropertyTypes)).toMatchInlineSnapshot(`\n {\n \"field\": \"string\",\n \"fuzzy\": false,\n \"type\": \"containsAnyTerm\",\n \"value\": \"test\",\n }\n `);\n });\n it(\"converts struct where clauses correctly\", () => {\n expect(modernToLegacyWhereClause<structObj>({\n address: { state: { $eq: \"NJ\" } },\n }, BgaoNflPlayer)).toMatchInlineSnapshot(`\n {\n \"field\": undefined,\n \"propertyIdentifier\": {\n \"propertyApiName\": \"address\",\n \"structFieldApiName\": \"state\",\n \"type\": \"structField\",\n },\n \"type\": \"eq\",\n \"value\": \"NJ\",\n }\n `);\n\n expect(modernToLegacyWhereClause<structObj>({\n $and: [\n { address: { state: { $eq: \"NJ\" } } },\n { address: { city: { $containsAnyTerm: \"N\" } } },\n ],\n }, BgaoNflPlayer)).toMatchInlineSnapshot(`\n {\n \"type\": \"and\",\n \"value\": [\n {\n \"field\": undefined,\n \"propertyIdentifier\": {\n \"propertyApiName\": \"address\",\n \"structFieldApiName\": \"state\",\n \"type\": \"structField\",\n },\n \"type\": \"eq\",\n \"value\": \"NJ\",\n },\n {\n \"field\": undefined,\n \"fuzzy\": false,\n \"propertyIdentifier\": {\n \"propertyApiName\": \"address\",\n \"structFieldApiName\": \"city\",\n \"type\": \"structField\",\n },\n \"type\": \"containsAnyTerm\",\n \"value\": \"N\",\n },\n ],\n }\n `);\n\n expect(modernToLegacyWhereClause<structObj>({\n $or: [\n { address: { state: { $eq: \"NJ\" } } },\n { address: { city: { $containsAnyTerm: \"N\" } } },\n { gamesPlayed: { $gt: 5 } },\n ],\n }, BgaoNflPlayer)).toMatchInlineSnapshot(`\n {\n \"type\": \"or\",\n \"value\": [\n {\n \"field\": undefined,\n \"propertyIdentifier\": {\n \"propertyApiName\": \"address\",\n \"structFieldApiName\": \"state\",\n \"type\": \"structField\",\n },\n \"type\": \"eq\",\n \"value\": \"NJ\",\n },\n {\n \"field\": undefined,\n \"fuzzy\": false,\n \"propertyIdentifier\": {\n \"propertyApiName\": \"address\",\n \"structFieldApiName\": \"city\",\n \"type\": \"structField\",\n },\n \"type\": \"containsAnyTerm\",\n \"value\": \"N\",\n },\n {\n \"field\": \"gamesPlayed\",\n \"type\": \"gt\",\n \"value\": 5,\n },\n ],\n }\n `);\n });\n });\n\n describe(\"multiple checks\", () => {\n it(\"properly handles multiple simple where checks\", () => {\n expect(modernToLegacyWhereClause<ObjAllProps>(\n {\n decimal: 5,\n integer: 10,\n },\n objectTypeWithAllPropertyTypes,\n )).toMatchInlineSnapshot(`\n {\n \"type\": \"and\",\n \"value\": [\n {\n \"field\": \"decimal\",\n \"type\": \"eq\",\n \"value\": 5,\n },\n {\n \"field\": \"integer\",\n \"type\": \"eq\",\n \"value\": 10,\n },\n ],\n }\n `);\n });\n\n it(\"properly handles $and\", () => {\n expect(modernToLegacyWhereClause<ObjAllProps>(\n {\n $and: [{\n decimal: 5,\n }, {\n integer: 10,\n }],\n },\n objectTypeWithAllPropertyTypes,\n )).toMatchInlineSnapshot(`\n {\n \"type\": \"and\",\n \"value\": [\n {\n \"field\": \"decimal\",\n \"type\": \"eq\",\n \"value\": 5,\n },\n {\n \"field\": \"integer\",\n \"type\": \"eq\",\n \"value\": 10,\n },\n ],\n }\n `);\n });\n\n it(\"properly handles $or\", () => {\n expect(modernToLegacyWhereClause<ObjAllProps>(\n {\n $or: [{\n decimal: 5,\n }, {\n integer: 10,\n }],\n },\n objectTypeWithAllPropertyTypes,\n )).toMatchInlineSnapshot(`\n {\n \"type\": \"or\",\n \"value\": [\n {\n \"field\": \"decimal\",\n \"type\": \"eq\",\n \"value\": 5,\n },\n {\n \"field\": \"integer\",\n \"type\": \"eq\",\n \"value\": 10,\n },\n ],\n }\n `);\n });\n });\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SACEA,aAAa,EACbC,8BAA8B,QACzB,4BAA4B;AAEnC,SAASC,UAAU,QAAQ,WAAW;AACtC,SAASC,QAAQ,EAAEC,MAAM,EAAEC,EAAE,QAAQ,QAAQ;AAC7C,SAASC,yBAAyB,QAAQ,gCAAgC;AAI1EH,QAAQ,CAACG,yBAAyB,EAAE,MAAM;EACxCH,QAAQ,CAAC,gBAAgB,EAAE,MAAM;IAC/BA,QAAQ,CAAC,YAAY,EAAE,MAAM;MAC3BE,EAAE,CAAC,0CAA0C,EAAE,MAAM;QACnD,MAAME,CAAC,GAAG;UACRC,IAAI,EAAE,WAAW;UACjBC,OAAO,EAAE,OAAO;UAChBC,oBAAoB,EAAE;YACpBF,IAAI,EAAE,WAAW;YACjBG,UAAU,EAAE;cACV,MAAM,EAAE;gBAAEH,IAAI,EAAE;cAAU,CAAC;cAC3B,OAAO,EAAE;gBACPA,IAAI,EAAE;kBAAE,YAAY,EAAE,QAAQ;kBAAE,YAAY,EAAE;gBAAQ;cACxD;YACF,CAAC;YACDC,OAAO,EAAE,OAAO;YAChBG,WAAW,EAAE,EAAE;YACfC,KAAK,EAAE,CAAC,CAAC;YACTC,GAAG,EAAE,EAAE;Y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AACE,yBAAyB,CAC9B;UACEyC,OAAO,EAAE,CAAC;UACVb,OAAO,EAAE;QACX,CAAC,EACDjC,8BACF,CAAC,CAAC,CAACsB,qBAAqB,CAAC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,CAAC;MACF,CAAC,CAAC;MAEFlB,EAAE,CAAC,uBAAuB,EAAE,MAAM;QAChCD,MAAM,CAACE,yBAAyB,CAC9B;UACEY,IAAI,EAAE,CAAC;YACL6B,OAAO,EAAE;UACX,CAAC,EAAE;YACDb,OAAO,EAAE;UACX,CAAC;QACH,CAAC,EACDjC,8BACF,CAAC,CAAC,CAACsB,qBAAqB,CAAC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,CAAC;MACJ,CAAC,CAAC;MAEFlB,EAAE,CAAC,sBAAsB,EAAE,MAAM;QAC/BD,MAAM,CAACE,yBAAyB,CAC9B;UACEsC,GAAG,EAAE,CAAC;YACJG,OAAO,EAAE;UACX,CAAC,EAAE;YACDb,OAAO,EAAE;UACX,CAAC;QACH,CAAC,EACDjC,8BACF,CAAC,CAAC,CAACsB,qBAAqB,CAAC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,CAAC;MACN,CAAC,CAAC;IACJ,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -20,7 +20,7 @@ import { createOsdkInterface } from "./createOsdkInterface.js";
20
20
  import { ObjectDefRef } from "./InternalSymbols.js";
21
21
  describe(createOsdkInterface, () => {
22
22
  it("works in the normal case", () => {
23
- const iface = createOsdkInterface({
23
+ const underlying = {
24
24
  "foo": "hi mom",
25
25
  [ObjectDefRef]: {
26
26
  [InterfaceDefinitions]: {},
@@ -44,9 +44,13 @@ describe(createOsdkInterface, () => {
44
44
  type: "object",
45
45
  titleProperty: "foo",
46
46
  rid: "",
47
- status: "ACTIVE"
47
+ status: "ACTIVE",
48
+ icon: undefined,
49
+ visibility: undefined,
50
+ description: undefined
48
51
  }
49
- }, {
52
+ };
53
+ const iface = createOsdkInterface(underlying, {
50
54
  "apiName": "IFoo",
51
55
  displayName: "",
52
56
  links: {},
@@ -57,7 +61,8 @@ describe(createOsdkInterface, () => {
57
61
  },
58
62
  rid: "",
59
63
  type: "interface",
60
- implements: []
64
+ implements: [],
65
+ description: undefined
61
66
  });
62
67
  expect(Object.keys(iface)).toMatchInlineSnapshot(`
63
68
  [
@@ -74,7 +79,7 @@ describe(createOsdkInterface, () => {
74
79
  `);
75
80
  });
76
81
  it("properly maps apiNamespace", () => {
77
- const iface = createOsdkInterface({
82
+ const underlying = {
78
83
  "foo": "hi mom",
79
84
  [ObjectDefRef]: {
80
85
  [InterfaceDefinitions]: {},
@@ -98,9 +103,13 @@ describe(createOsdkInterface, () => {
98
103
  type: "object",
99
104
  titleProperty: "foo",
100
105
  rid: "",
101
- status: "ACTIVE"
106
+ status: "ACTIVE",
107
+ icon: undefined,
108
+ visibility: undefined,
109
+ description: undefined
102
110
  }
103
- }, {
111
+ };
112
+ const iface = createOsdkInterface(underlying, {
104
113
  "apiName": "a.IFoo",
105
114
  displayName: "",
106
115
  links: {},
@@ -111,7 +120,8 @@ describe(createOsdkInterface, () => {
111
120
  },
112
121
  rid: "",
113
122
  type: "interface",
114
- implements: []
123
+ implements: [],
124
+ description: undefined
115
125
  });
116
126
  expect(Object.keys(iface)).toMatchInlineSnapshot(`
117
127
  [
@@ -128,7 +138,7 @@ describe(createOsdkInterface, () => {
128
138
  `);
129
139
  });
130
140
  it("works with mixed namespaces", () => {
131
- const iface = createOsdkInterface({
141
+ const underlying = {
132
142
  "foo": "hi mom",
133
143
  [ObjectDefRef]: {
134
144
  [InterfaceDefinitions]: {},
@@ -152,9 +162,13 @@ describe(createOsdkInterface, () => {
152
162
  type: "object",
153
163
  titleProperty: "foo",
154
164
  rid: "",
155
- status: "ACTIVE"
165
+ status: "ACTIVE",
166
+ icon: undefined,
167
+ visibility: undefined,
168
+ description: undefined
156
169
  }
157
- }, {
170
+ };
171
+ const iface = createOsdkInterface(underlying, {
158
172
  "apiName": "a.IFoo",
159
173
  displayName: "",
160
174
  links: {},
@@ -165,7 +179,8 @@ describe(createOsdkInterface, () => {
165
179
  },
166
180
  rid: "",
167
181
  type: "interface",
168
- implements: []
182
+ implements: [],
183
+ description: undefined
169
184
  });
170
185
  expect(Object.keys(iface)).toMatchInlineSnapshot(`
171
186
  [