@osdk/api 2.8.0-beta.2 → 2.8.0-beta.21

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 (75) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/build/browser/aggregate/StringFilter.js.map +1 -1
  3. package/build/browser/mapping/DataValueMapping.js.map +1 -1
  4. package/build/browser/ontology/QueryDefinition.js.map +1 -1
  5. package/build/browser/queries/Queries.js.map +1 -1
  6. package/build/cjs/{ObjectSet-CqVqDXKn.d.cts → ObjectSet-ChROetz0.d.cts} +14 -2
  7. package/build/cjs/index.d.cts +9 -5
  8. package/build/cjs/public/unstable.d.cts +2 -2
  9. package/build/esm/aggregate/StringFilter.js.map +1 -1
  10. package/build/esm/mapping/DataValueMapping.js.map +1 -1
  11. package/build/esm/ontology/QueryDefinition.js.map +1 -1
  12. package/build/esm/queries/Queries.js.map +1 -1
  13. package/build/types/aggregate/StringFilter.d.ts +9 -1
  14. package/build/types/aggregate/StringFilter.d.ts.map +1 -1
  15. package/build/types/mapping/DataValueMapping.d.ts +2 -2
  16. package/build/types/mapping/DataValueMapping.d.ts.map +1 -1
  17. package/build/types/ontology/QueryDefinition.d.ts +1 -1
  18. package/build/types/ontology/QueryDefinition.d.ts.map +1 -1
  19. package/build/types/queries/Queries.d.ts +2 -0
  20. package/build/types/queries/Queries.d.ts.map +1 -1
  21. package/package.json +1 -1
  22. package/build/browser/OsdkObjectFrom.test.js +0 -204
  23. package/build/browser/OsdkObjectFrom.test.js.map +0 -1
  24. package/build/browser/aggregate/AggregationsClause.test.js +0 -21
  25. package/build/browser/aggregate/AggregationsClause.test.js.map +0 -1
  26. package/build/browser/definitions/LinkDefinitions.test.js +0 -26
  27. package/build/browser/definitions/LinkDefinitions.test.js.map +0 -1
  28. package/build/browser/groupby/GroupByClause.test.js +0 -21
  29. package/build/browser/groupby/GroupByClause.test.js.map +0 -1
  30. package/build/browser/junk.test.js +0 -23
  31. package/build/browser/junk.test.js.map +0 -1
  32. package/build/browser/object/ObjectDefinitions.test.js +0 -28
  33. package/build/browser/object/ObjectDefinitions.test.js.map +0 -1
  34. package/build/browser/objectSet/ObjectSet.test.js +0 -736
  35. package/build/browser/objectSet/ObjectSet.test.js.map +0 -1
  36. package/build/browser/ontology/ObjectSpecifier.test.js +0 -53
  37. package/build/browser/ontology/ObjectSpecifier.test.js.map +0 -1
  38. package/build/browser/ontology/SimplePropertyDef.test.js +0 -48
  39. package/build/browser/ontology/SimplePropertyDef.test.js.map +0 -1
  40. package/build/esm/OsdkObjectFrom.test.js +0 -204
  41. package/build/esm/OsdkObjectFrom.test.js.map +0 -1
  42. package/build/esm/aggregate/AggregationsClause.test.js +0 -21
  43. package/build/esm/aggregate/AggregationsClause.test.js.map +0 -1
  44. package/build/esm/definitions/LinkDefinitions.test.js +0 -26
  45. package/build/esm/definitions/LinkDefinitions.test.js.map +0 -1
  46. package/build/esm/groupby/GroupByClause.test.js +0 -21
  47. package/build/esm/groupby/GroupByClause.test.js.map +0 -1
  48. package/build/esm/junk.test.js +0 -23
  49. package/build/esm/junk.test.js.map +0 -1
  50. package/build/esm/object/ObjectDefinitions.test.js +0 -28
  51. package/build/esm/object/ObjectDefinitions.test.js.map +0 -1
  52. package/build/esm/objectSet/ObjectSet.test.js +0 -736
  53. package/build/esm/objectSet/ObjectSet.test.js.map +0 -1
  54. package/build/esm/ontology/ObjectSpecifier.test.js +0 -53
  55. package/build/esm/ontology/ObjectSpecifier.test.js.map +0 -1
  56. package/build/esm/ontology/SimplePropertyDef.test.js +0 -48
  57. package/build/esm/ontology/SimplePropertyDef.test.js.map +0 -1
  58. package/build/types/OsdkObjectFrom.test.d.ts +0 -1
  59. package/build/types/OsdkObjectFrom.test.d.ts.map +0 -1
  60. package/build/types/aggregate/AggregationsClause.test.d.ts +0 -46
  61. package/build/types/aggregate/AggregationsClause.test.d.ts.map +0 -1
  62. package/build/types/definitions/LinkDefinitions.test.d.ts +0 -1
  63. package/build/types/definitions/LinkDefinitions.test.d.ts.map +0 -1
  64. package/build/types/groupby/GroupByClause.test.d.ts +0 -23
  65. package/build/types/groupby/GroupByClause.test.d.ts.map +0 -1
  66. package/build/types/junk.test.d.ts +0 -1
  67. package/build/types/junk.test.d.ts.map +0 -1
  68. package/build/types/object/ObjectDefinitions.test.d.ts +0 -1
  69. package/build/types/object/ObjectDefinitions.test.d.ts.map +0 -1
  70. package/build/types/objectSet/ObjectSet.test.d.ts +0 -2
  71. package/build/types/objectSet/ObjectSet.test.d.ts.map +0 -1
  72. package/build/types/ontology/ObjectSpecifier.test.d.ts +0 -1
  73. package/build/types/ontology/ObjectSpecifier.test.d.ts.map +0 -1
  74. package/build/types/ontology/SimplePropertyDef.test.d.ts +0 -1
  75. package/build/types/ontology/SimplePropertyDef.test.d.ts.map +0 -1
@@ -1,204 +0,0 @@
1
- /*
2
- * Copyright 2024 Palantir Technologies, Inc. All rights reserved.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
-
17
- import { describe, expectTypeOf, it } from "vitest";
18
- import { createMockObjectSet } from "./objectSet/ObjectSet.test.js";
19
- describe("ExtractOptions", () => {
20
- describe("NullabilityAdherence Generic", () => {
21
- it("does not add $notStrict for any", () => {
22
- expectTypeOf().toEqualTypeOf();
23
- });
24
- it("does not add $notStrict for never", () => {
25
- expectTypeOf().toEqualTypeOf();
26
- });
27
- it("does not add $notStrict for false", () => {
28
- expectTypeOf().toEqualTypeOf();
29
- });
30
- it("does not add $notStrict for throw", () => {
31
- expectTypeOf().toEqualTypeOf();
32
- });
33
- it("does not add $notStrict for drop", () => {
34
- expectTypeOf().toEqualTypeOf();
35
- });
36
- it("does not add $notStrict for drop | throw", () => {
37
- expectTypeOf().toEqualTypeOf();
38
- });
39
- it("does not add $notStrict for drop | false", () => {
40
- expectTypeOf().toEqualTypeOf();
41
- });
42
- it("does not add $notStrict for false | throw", () => {
43
- expectTypeOf().toEqualTypeOf();
44
- });
45
- it("does not add $notStrict for drop | throw | false", () => {
46
- expectTypeOf().toEqualTypeOf();
47
- });
48
- it("does not add $notStrict for NullabilityAdherence", () => {
49
- expectTypeOf().toEqualTypeOf();
50
- });
51
- });
52
- describe("Rid Generic", () => {
53
- it("does not add $rid for false", () => {
54
- expectTypeOf().toEqualTypeOf();
55
- });
56
- it("does add $rid for true", () => {
57
- expectTypeOf().toEqualTypeOf();
58
- });
59
- it("does not add $rid for any", () => {
60
- expectTypeOf().toEqualTypeOf();
61
- });
62
- it("does not add $rid for never", () => {
63
- expectTypeOf().toEqualTypeOf();
64
- });
65
- it("does not add $rid for boolean", () => {
66
- expectTypeOf().toEqualTypeOf();
67
- });
68
- it("does not add $rid for true | false", () => {
69
- expectTypeOf().toEqualTypeOf();
70
- });
71
- });
72
- describe("Osdk.Instance", () => {
73
- it("defaults to second argument never if omitted", () => {
74
- expectTypeOf().toEqualTypeOf();
75
-
76
- // ensure its the normal props
77
- expectTypeOf().toEqualTypeOf();
78
- });
79
- it("defaults to second argument never if never", () => {
80
- expectTypeOf().toEqualTypeOf();
81
- // ensure its the normal props
82
- expectTypeOf().toEqualTypeOf();
83
- });
84
- it("defaults to second argument never if any", () => {
85
- expectTypeOf().branded.toEqualTypeOf();
86
- // ensure its the normal props
87
- expectTypeOf().toEqualTypeOf();
88
- });
89
- it("Cannot use $notStrict", () => {
90
- // @ts-expect-error
91
-
92
- expectTypeOf().branded
93
- // @ts-expect-error
94
- .toEqualTypeOf();
95
- // ensure its not the strict type
96
- expectTypeOf().toEqualTypeOf();
97
- });
98
- it("defaults to last argument all props if never", () => {
99
- expectTypeOf().branded.toEqualTypeOf();
100
- });
101
- it("defaults to last argument all props if any", () => {
102
- expectTypeOf().branded.toEqualTypeOf();
103
- });
104
- it("defaults to last argument exactly if specified", () => {
105
- expectTypeOf().branded.toEqualTypeOf();
106
- });
107
- it("Is assignable to Record<string, unknown>", () => {});
108
- });
109
- describe("Osdk<>", () => {
110
- it("defaults to second argument never if omitted", () => {
111
- expectTypeOf().toEqualTypeOf();
112
-
113
- // expect no rid
114
- expectTypeOf().toEqualTypeOf();
115
-
116
- // ensure its the normal props
117
- expectTypeOf().toEqualTypeOf();
118
- });
119
- it("returns $rid if only thing specified", () => {
120
- expectTypeOf().toEqualTypeOf();
121
-
122
- // expect rid
123
- expectTypeOf().toEqualTypeOf();
124
-
125
- // ensure its the normal props
126
- expectTypeOf().toEqualTypeOf();
127
- });
128
- it("handles legacy properly: $rid and name", () => {
129
- expectTypeOf().toEqualTypeOf();
130
-
131
- // expect rid
132
- expectTypeOf().toEqualTypeOf();
133
-
134
- // ensure its the strict type
135
- expectTypeOf().toEqualTypeOf();
136
- });
137
- it("handles legacy properly: $rid and $all", () => {
138
- expectTypeOf().branded.toEqualTypeOf();
139
-
140
- // expect rid
141
- expectTypeOf().toEqualTypeOf();
142
-
143
- // ensure its the normal props
144
- expectTypeOf().toEqualTypeOf();
145
- });
146
- it("handles legacy properly: just $all", () => {
147
- expectTypeOf().branded.toEqualTypeOf();
148
-
149
- // expect no rid
150
- expectTypeOf().toEqualTypeOf();
151
-
152
- // ensure its the normal props
153
- expectTypeOf().toEqualTypeOf();
154
- });
155
- it("defaults to second argument never if never", () => {
156
- expectTypeOf().toEqualTypeOf();
157
- // ensure its the normal props
158
- expectTypeOf().toEqualTypeOf();
159
-
160
- // expect no rid
161
- expectTypeOf().toEqualTypeOf();
162
- });
163
- it("defaults to second argument never if any", () => {
164
- expectTypeOf().branded.toEqualTypeOf();
165
- // ensure its the normal props
166
- expectTypeOf().toEqualTypeOf();
167
-
168
- // expect no rid
169
- expectTypeOf().toEqualTypeOf();
170
- });
171
- it("Does not use $notStrict if requested with old type", () => {
172
- expectTypeOf().branded.toEqualTypeOf();
173
- // ensure its not the strict type
174
- expectTypeOf().toEqualTypeOf();
175
-
176
- // expect no rid
177
- expectTypeOf().toEqualTypeOf();
178
- });
179
- it("defaults to last argument all props if never", () => {
180
- expectTypeOf().branded.toEqualTypeOf();
181
- });
182
- it("defaults to last argument all props if any", () => {
183
- expectTypeOf().branded.toEqualTypeOf();
184
- });
185
- it("defaults to last argument exactly if specified", () => {
186
- expectTypeOf().toEqualTypeOf();
187
- });
188
- });
189
- describe("Inferred return types from fetchPage work", () => {
190
- const fauxObjectSet = createMockObjectSet();
191
- it("is not $notStrict", async () => {
192
- await fauxObjectSet.fetchPage();
193
- expectTypeOf().branded.toEqualTypeOf();
194
- });
195
- });
196
- describe("Interface casting works as intended", () => {
197
- it("mapping as with fqn property names works", async () => {
198
- expectTypeOf().toEqualTypeOf;
199
- expectTypeOf().toEqualTypeOf;
200
- expectTypeOf().toExtend();
201
- });
202
- });
203
- });
204
- //# sourceMappingURL=OsdkObjectFrom.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OsdkObjectFrom.test.js","names":["describe","expectTypeOf","it","createMockObjectSet","toEqualTypeOf","branded","fauxObjectSet","fetchPage","toExtend"],"sources":["OsdkObjectFrom.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 { describe, expectTypeOf, it } from \"vitest\";\nimport type { NullabilityAdherence } from \"./object/FetchPageArgs.js\";\nimport { createMockObjectSet } from \"./objectSet/ObjectSet.test.js\";\nimport type { PropertyKeys } from \"./ontology/ObjectOrInterface.js\";\nimport type {\n ConvertProps,\n ExtractOptions,\n MapPropNamesToInterface,\n Osdk,\n} from \"./OsdkObjectFrom.js\";\n\ndescribe(\"ExtractOptions\", () => {\n describe(\"NullabilityAdherence Generic\", () => {\n it(\"does not add $notStrict for any\", () => {\n expectTypeOf<ExtractOptions<any, any>>()\n .toEqualTypeOf<never>();\n });\n\n it(\"does not add $notStrict for never\", () => {\n expectTypeOf<ExtractOptions<any, never>>()\n .toEqualTypeOf<never>();\n });\n\n it(\"does not add $notStrict for false\", () => {\n expectTypeOf<ExtractOptions<any, false>>()\n .toEqualTypeOf<never>();\n });\n\n it(\"does not add $notStrict for throw\", () => {\n expectTypeOf<ExtractOptions<any, \"throw\">>()\n .toEqualTypeOf<never>();\n });\n\n it(\"does not add $notStrict for drop\", () => {\n expectTypeOf<ExtractOptions<any, \"drop\">>()\n .toEqualTypeOf<never>();\n });\n\n it(\"does not add $notStrict for drop | throw\", () => {\n expectTypeOf<ExtractOptions<any, \"drop\" | \"throw\">>()\n .toEqualTypeOf<never>();\n });\n\n it(\"does not add $notStrict for drop | false\", () => {\n expectTypeOf<ExtractOptions<any, \"drop\" | false>>()\n .toEqualTypeOf<never>();\n });\n it(\"does not add $notStrict for false | throw\", () => {\n expectTypeOf<ExtractOptions<any, false | \"throw\">>()\n .toEqualTypeOf<never>();\n });\n\n it(\"does not add $notStrict for drop | throw | false\", () => {\n expectTypeOf<ExtractOptions<any, \"drop\" | \"throw\" | false>>()\n .toEqualTypeOf<never>();\n });\n\n it(\"does not add $notStrict for NullabilityAdherence\", () => {\n expectTypeOf<ExtractOptions<any, NullabilityAdherence>>()\n .toEqualTypeOf<never>();\n });\n });\n\n describe(\"Rid Generic\", () => {\n it(\"does not add $rid for false\", () => {\n expectTypeOf<ExtractOptions<false, any>>().toEqualTypeOf<never>();\n });\n\n it(\"does add $rid for true\", () => {\n expectTypeOf<ExtractOptions<true, any>>().toEqualTypeOf<\"$rid\">();\n });\n\n it(\"does not add $rid for any\", () => {\n expectTypeOf<ExtractOptions<any, any>>().toEqualTypeOf<never>();\n });\n\n it(\"does not add $rid for never\", () => {\n expectTypeOf<ExtractOptions<never, any>>().toEqualTypeOf<never>();\n });\n\n it(\"does not add $rid for boolean\", () => {\n expectTypeOf<ExtractOptions<boolean, any>>().toEqualTypeOf<never>();\n });\n\n it(\"does not add $rid for true | false\", () => {\n expectTypeOf<ExtractOptions<true | false, any>>().toEqualTypeOf<never>();\n });\n });\n\n type quickAndDirty = {\n apiName: \"Foo\";\n type: \"object\";\n __DefinitionMetadata: {\n props: {\n name: string;\n foo: number | undefined;\n };\n strictProps: {\n name: string;\n foo: number;\n };\n apiName: \"Foo\";\n displayName: \"\";\n interfaceMap: {};\n inverseInterfaceMap: {};\n links: {};\n pluralDisplayName: \"\";\n primaryKeyApiName: \"\";\n primaryKeyType: \"string\";\n properties: {\n name: {\n type: \"string\";\n };\n foo: {\n type: \"integer\";\n };\n };\n rid: \"\";\n status: \"ACTIVE\";\n titleProperty: \"name\";\n type: \"object\";\n icon: undefined;\n visibility: undefined;\n description: undefined;\n };\n };\n\n type quickerAndDirtier = {\n apiName: \"Bar\";\n type: \"object\";\n __DefinitionMetadata: {\n props: {\n name: string;\n foo: number | undefined;\n birthday: string;\n };\n strictProps: {\n name: string;\n foo: number;\n birthday: string;\n };\n apiName: \"Foo\";\n displayName: \"\";\n interfaceMap: {\n \"com.my.obscure.namespace.FooBarInterface\": {\n \"com.my.obscure.namespace.fooInterface\": \"foo\";\n \"com.my.obscure.namespace.id\": \"name\";\n \"com.my.even.more.obscure.namespace.originDate\": \"birthday\";\n };\n };\n inverseInterfaceMap: {\n \"com.my.obscure.namespace.FooBarInterface\": {\n \"foo\": \"com.my.obscure.namespace.fooInterface\";\n \"name\": \"com.my.obscure.namespace.id\";\n \"birthday\": \"com.my.even.more.obscure.namespace.originDate\";\n };\n };\n links: {};\n pluralDisplayName: \"\";\n primaryKeyApiName: \"\";\n primaryKeyType: \"string\";\n properties: {\n name: {\n type: \"string\";\n description: \"\";\n };\n foo: {\n type: \"integer\";\n description: \"\";\n };\n birthday: {\n type: \"string\";\n description: \"\";\n };\n };\n rid: \"\";\n status: \"ACTIVE\";\n titleProperty: \"name\";\n type: \"object\";\n icon: undefined;\n visibility: undefined;\n description: \"\";\n };\n };\n\n type quickerAndDirtierInterface = {\n apiName: \"com.my.obscure.namespace.FooBarInterface\";\n type: \"interface\";\n __DefinitionMetadata: {\n props: {\n id: string;\n \"com.my.even.more.obscure.namespace.originDate\": string | undefined;\n fooInterface: number;\n };\n strictProps: {\n id: string;\n \"com.my.even.more.obscure.namespace.originDate\": string;\n fooInterface: number;\n };\n apiName: \"com.my.obscure.namespace.FooBarInterface\";\n displayName: \"\";\n implements: [];\n implementedBy: [\"Bar\"];\n links: {};\n pluralDisplayName: \"\";\n primaryKeyApiName: \"\";\n properties: {\n id: {\n type: \"string\";\n description: \"\";\n };\n \"com.my.even.more.obscure.namespace.originDate\": {\n type: \"string\";\n description: \"\";\n };\n fooInterface: {\n type: \"integer\";\n description: \"\";\n };\n };\n rid: \"\";\n status: \"ACTIVE\";\n titleProperty: \"name\";\n type: \"interface\";\n icon: undefined;\n visibility: undefined;\n description: \"\";\n };\n };\n describe(\"Osdk.Instance\", () => {\n it(\"defaults to second argument never if omitted\", () => {\n type toCheck = Osdk.Instance<quickAndDirty>;\n expectTypeOf<toCheck>().toEqualTypeOf<\n Osdk.Instance<quickAndDirty, never>\n >();\n\n // ensure its the normal props\n expectTypeOf<Pick<toCheck, \"name\" | \"foo\">>().toEqualTypeOf<\n quickAndDirty[\"__DefinitionMetadata\"][\"props\"]\n >();\n });\n\n it(\"defaults to second argument never if never\", () => {\n type toCheck = Osdk.Instance<quickAndDirty, never>;\n expectTypeOf<toCheck>().toEqualTypeOf<\n Osdk.Instance<quickAndDirty, never>\n >();\n // ensure its the normal props\n expectTypeOf<Pick<toCheck, \"name\" | \"foo\">>().toEqualTypeOf<\n quickAndDirty[\"__DefinitionMetadata\"][\"props\"]\n >();\n });\n\n it(\"defaults to second argument never if any\", () => {\n type toCheck = Osdk.Instance<quickAndDirty, any>;\n expectTypeOf<toCheck>().branded.toEqualTypeOf<\n Osdk.Instance<quickAndDirty, never>\n >();\n // ensure its the normal props\n expectTypeOf<Pick<toCheck, \"name\" | \"foo\">>().toEqualTypeOf<\n quickAndDirty[\"__DefinitionMetadata\"][\"props\"]\n >();\n });\n\n it(\"Cannot use $notStrict\", () => {\n // @ts-expect-error\n type toCheck = Osdk.Instance<quickAndDirty, \"$notStrict\">;\n\n expectTypeOf<toCheck>().branded\n // @ts-expect-error\n .toEqualTypeOf<Osdk.Instance<quickAndDirty, \"$notStrict\">>();\n // ensure its not the strict type\n expectTypeOf<Pick<toCheck, \"name\" | \"foo\">>().toEqualTypeOf<\n quickAndDirty[\"__DefinitionMetadata\"][\"props\"]\n >();\n });\n\n it(\"defaults to last argument all props if never\", () => {\n expectTypeOf<Osdk.Instance<quickAndDirty, never, never>>().branded\n .toEqualTypeOf<\n Osdk.Instance<quickAndDirty, never, \"name\" | \"foo\">\n >();\n });\n\n it(\"defaults to last argument all props if any\", () => {\n expectTypeOf<Osdk.Instance<quickAndDirty, never, any>>().branded\n .toEqualTypeOf<\n Osdk.Instance<quickAndDirty, never, \"name\" | \"foo\">\n >();\n });\n\n it(\"defaults to last argument exactly if specified\", () => {\n expectTypeOf<Osdk.Instance<quickAndDirty, never, \"name\">>().branded\n .toEqualTypeOf<\n Osdk.Instance<quickAndDirty, never, \"name\">\n >();\n });\n\n it(\"Is assignable to Record<string, unknown>\", () => {\n // We encountered a break where this stopped being assignable. We need to continue to support this assignment.\n const a = {} as Osdk.Instance<quickAndDirty>;\n a as Record<string, unknown>;\n });\n });\n\n describe(\"Osdk<>\", () => {\n it(\"defaults to second argument never if omitted\", () => {\n type toCheck = Osdk<quickAndDirty>;\n expectTypeOf<toCheck>().toEqualTypeOf<\n Osdk.Instance<quickAndDirty, never>\n >();\n\n // expect no rid\n expectTypeOf<keyof toCheck & \"$rid\">().toEqualTypeOf<never>();\n\n // ensure its the normal props\n expectTypeOf<Pick<toCheck, \"name\" | \"foo\">>().toEqualTypeOf<\n quickAndDirty[\"__DefinitionMetadata\"][\"props\"]\n >();\n });\n\n it(\"returns $rid if only thing specified\", () => {\n type toCheck = Osdk<quickAndDirty, \"$rid\">;\n expectTypeOf<toCheck>().toEqualTypeOf<\n Osdk.Instance<quickAndDirty, \"$rid\">\n >();\n\n // expect rid\n expectTypeOf<keyof toCheck & \"$rid\">().toEqualTypeOf<\"$rid\">();\n\n // ensure its the normal props\n expectTypeOf<Pick<toCheck, \"name\" | \"foo\">>().toEqualTypeOf<\n quickAndDirty[\"__DefinitionMetadata\"][\"props\"]\n >();\n });\n\n it(\"handles legacy properly: $rid and name\", () => {\n type toCheck = Osdk<quickAndDirty, \"$rid\" | \"name\">;\n expectTypeOf<toCheck>().toEqualTypeOf<\n Osdk.Instance<quickAndDirty, \"$rid\", \"name\">\n >();\n\n // expect rid\n expectTypeOf<keyof toCheck & \"$rid\">().toEqualTypeOf<\"$rid\">();\n\n // ensure its the strict type\n expectTypeOf<Pick<toCheck, \"name\">>().toEqualTypeOf<{\n name: quickAndDirty[\"__DefinitionMetadata\"][\"strictProps\"][\"name\"];\n }>();\n });\n\n it(\"handles legacy properly: $rid and $all\", () => {\n type toCheck = Osdk<quickAndDirty, \"$rid\" | \"$all\">;\n expectTypeOf<toCheck>().branded.toEqualTypeOf<\n Osdk.Instance<quickAndDirty, \"$rid\", \"name\" | \"foo\">\n >();\n\n // expect rid\n expectTypeOf<keyof toCheck & \"$rid\">().toEqualTypeOf<\"$rid\">();\n\n // ensure its the normal props\n expectTypeOf<Pick<toCheck, \"name\" | \"foo\">>().toEqualTypeOf<\n quickAndDirty[\"__DefinitionMetadata\"][\"props\"]\n >();\n });\n\n it(\"handles legacy properly: just $all\", () => {\n type toCheck = Osdk<quickAndDirty, \"$all\">;\n expectTypeOf<toCheck>().branded.toEqualTypeOf<\n Osdk.Instance<quickAndDirty, never, \"name\" | \"foo\">\n >();\n\n // expect no rid\n expectTypeOf<keyof toCheck & \"$rid\">().toEqualTypeOf<never>();\n\n // ensure its the normal props\n expectTypeOf<Pick<toCheck, \"name\" | \"foo\">>().toEqualTypeOf<\n quickAndDirty[\"__DefinitionMetadata\"][\"props\"]\n >();\n });\n\n it(\"defaults to second argument never if never\", () => {\n type toCheck = Osdk<quickAndDirty, never>;\n expectTypeOf<toCheck>().toEqualTypeOf<\n Osdk.Instance<quickAndDirty, never>\n >();\n // ensure its the normal props\n expectTypeOf<Pick<toCheck, \"name\" | \"foo\">>().toEqualTypeOf<\n quickAndDirty[\"__DefinitionMetadata\"][\"props\"]\n >();\n\n // expect no rid\n expectTypeOf<keyof toCheck & \"$rid\">().toEqualTypeOf<never>();\n });\n\n it(\"defaults to second argument never if any\", () => {\n type toCheck = Osdk<quickAndDirty, any>;\n expectTypeOf<toCheck>().branded.toEqualTypeOf<\n Osdk.Instance<quickAndDirty, never>\n >();\n // ensure its the normal props\n expectTypeOf<Pick<toCheck, \"name\" | \"foo\">>().toEqualTypeOf<\n quickAndDirty[\"__DefinitionMetadata\"][\"props\"]\n >();\n\n // expect no rid\n expectTypeOf<keyof toCheck & \"$rid\">().toEqualTypeOf<never>();\n });\n\n it(\"Does not use $notStrict if requested with old type\", () => {\n type toCheck = Osdk<quickAndDirty, \"$notStrict\">;\n expectTypeOf<toCheck>().branded\n .toEqualTypeOf<Osdk.Instance<quickAndDirty, never>>();\n // ensure its not the strict type\n expectTypeOf<Pick<toCheck, \"name\" | \"foo\">>().toEqualTypeOf<\n quickAndDirty[\"__DefinitionMetadata\"][\"props\"]\n >();\n\n // expect no rid\n expectTypeOf<keyof toCheck & \"$rid\">().toEqualTypeOf<never>();\n });\n\n it(\"defaults to last argument all props if never\", () => {\n expectTypeOf<Osdk<quickAndDirty, never, never>>().branded\n .toEqualTypeOf<\n Osdk.Instance<quickAndDirty, never, \"name\" | \"foo\">\n >();\n });\n\n it(\"defaults to last argument all props if any\", () => {\n expectTypeOf<Osdk<quickAndDirty, never, any>>().branded\n .toEqualTypeOf<\n Osdk.Instance<quickAndDirty, never, \"name\" | \"foo\">\n >();\n });\n\n it(\"defaults to last argument exactly if specified\", () => {\n expectTypeOf<Osdk<quickAndDirty, never, \"name\">>()\n .toEqualTypeOf<\n Osdk.Instance<quickAndDirty, never, \"name\">\n >();\n });\n });\n\n describe(\"Inferred return types from fetchPage work\", () => {\n const fauxObjectSet = createMockObjectSet<quickAndDirty>();\n\n it(\"is not $notStrict\", async () => {\n const page = await fauxObjectSet.fetchPage();\n\n expectTypeOf<typeof page[\"data\"]>().branded\n .toEqualTypeOf<\n Osdk.Instance<quickAndDirty>[]\n >();\n });\n });\n\n describe(\"Interface casting works as intended\", () => {\n it(\"mapping as with fqn property names works\", async () => {\n expectTypeOf<\n MapPropNamesToInterface<\n quickerAndDirtier,\n quickerAndDirtierInterface,\n PropertyKeys<quickerAndDirtier>\n >\n >().toEqualTypeOf<PropertyKeys<quickerAndDirtierInterface>>;\n\n expectTypeOf<\n ConvertProps<\n quickerAndDirtier,\n quickerAndDirtierInterface,\n PropertyKeys<quickerAndDirtier>,\n never\n >\n >().toEqualTypeOf<PropertyKeys<quickerAndDirtierInterface>>;\n\n expectTypeOf<\n Osdk.Instance<\n quickerAndDirtierInterface,\n never,\n PropertyKeys<quickerAndDirtierInterface>,\n {}\n >\n >()\n .toExtend<\n Osdk.Instance<\n quickerAndDirtierInterface,\n never,\n ConvertProps<\n quickerAndDirtier,\n quickerAndDirtierInterface,\n PropertyKeys<quickerAndDirtier>,\n never\n >\n >\n >();\n });\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,QAAQ,EAAEC,YAAY,EAAEC,EAAE,QAAQ,QAAQ;AAEnD,SAASC,mBAAmB,QAAQ,+BAA+B;AASnEH,QAAQ,CA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YAAY,CAAyB,CAAC,CAACG,aAAa,CAAQ,CAAC;IAC/D,CAAC,CAAC;IAEFF,EAAE,CAAC,8CAA8C,EAAE,MAAM;MACvDD,YAAY,CAAoC,CAAC,CAACI,OAAO,CACtDD,aAAa,CAEZ,CAAC;IACP,CAAC,CAAC;IAEFF,EAAE,CAAC,4CAA4C,EAAE,MAAM;MACrDD,YAAY,CAAkC,CAAC,CAACI,OAAO,CACpDD,aAAa,CAEZ,CAAC;IACP,CAAC,CAAC;IAEFF,EAAE,CAAC,gDAAgD,EAAE,MAAM;MACzDD,YAAY,CAAqC,CAAC,CAC/CG,aAAa,CAEZ,CAAC;IACP,CAAC,CAAC;EACJ,CAAC,CAAC;EAEFJ,QAAQ,CAAC,2CAA2C,EAAE,MAAM;IAC1D,MAAMM,aAAa,GAAGH,mBAAmB,CAAgB,CAAC;IAE1DD,EAAE,CAAC,mBAAmB,EAAE,YAAY;MACrB,MAAMI,aAAa,CAACC,SAAS,CAAC,CAAC;MAE5CN,YAAY,CAAsB,CAAC,CAACI,OAAO,CACxCD,aAAa,CAEZ,CAAC;IACP,CAAC,CAAC;EACJ,CAAC,CAAC;EAEFJ,QAAQ,CAAC,qCAAqC,EAAE,MAAM;IACpDE,EAAE,CAAC,0CAA0C,EAAE,YAAY;MACzDD,YAAY,CAMV,CAAC,CAACG,aAAa;MAEjBH,YAAY,CAOV,CAAC,CAACG,aAAa;MAEjBH,YAAY,CAOV,CAAC,CACAO,QAAQ,CAWP,CAAC;IACP,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -1,21 +0,0 @@
1
- /*
2
- * Copyright 2023 Palantir Technologies, Inc. All rights reserved.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
-
17
- import { describe, it } from "vitest";
18
- describe("AggregationClause", () => {
19
- it("works", () => {});
20
- });
21
- //# sourceMappingURL=AggregationsClause.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AggregationsClause.test.js","names":["describe","it"],"sources":["AggregationsClause.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 { describe, it } from \"vitest\";\nimport type { AggregatableKeys } from \"./AggregatableKeys.js\";\nimport type { UnorderedAggregationClause } from \"./AggregationsClause.js\";\n\nexport type huh = AggregatableKeys<\n {\n metadata: any;\n objects: {\n Todo: {\n type: \"object\";\n apiName: \"Todo\";\n primaryKeyApiName: \"id\";\n primaryKeyType: \"double\";\n links: {};\n properties: {\n text: {\n type: \"string\";\n };\n id: {\n type: \"double\";\n };\n };\n };\n };\n actions: {};\n queries: {};\n }[\"objects\"][\"Todo\"]\n>;\n\nexport type Q = UnorderedAggregationClause<\n {\n metadata: any;\n objects: {\n Todo: {\n type: \"object\";\n apiName: \"Todo\";\n primaryKeyApiName: \"id\";\n primaryKeyType: \"double\";\n links: {};\n properties: {\n text: {\n type: \"string\";\n };\n id: {\n type: \"double\";\n };\n };\n };\n };\n actions: {};\n queries: {};\n }[\"objects\"][\"Todo\"]\n>;\n\ndescribe(\"AggregationClause\", () => {\n it(\"works\", () => {});\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,QAAQ,EAAEC,EAAE,QAAQ,QAAQ;AAsDrCD,QAAQ,CAAC,mBAAmB,EAAE,MAAM;EAClCC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;AACvB,CAAC,CAAC","ignoreList":[]}
@@ -1,26 +0,0 @@
1
- /*
2
- * Copyright 2023 Palantir Technologies, Inc. All rights reserved.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
-
17
- import { describe, expectTypeOf, it } from "vitest";
18
- describe("DefaultToFalse", () => {
19
- it("infers properly", () => {
20
- expectTypeOf().toEqualTypeOf();
21
- expectTypeOf().toEqualTypeOf();
22
- expectTypeOf().toEqualTypeOf();
23
- expectTypeOf().toEqualTypeOf();
24
- });
25
- });
26
- //# sourceMappingURL=LinkDefinitions.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LinkDefinitions.test.js","names":["describe","expectTypeOf","it","toEqualTypeOf"],"sources":["LinkDefinitions.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 { describe, expectTypeOf, it } from \"vitest\";\nimport type { DefaultToFalse } from \"./LinkDefinitions.js\";\n\ndescribe(\"DefaultToFalse\", () => {\n it(\"infers properly\", () => {\n expectTypeOf<DefaultToFalse<true>>().toEqualTypeOf<true>();\n expectTypeOf<DefaultToFalse<false>>().toEqualTypeOf<false>();\n expectTypeOf<DefaultToFalse<undefined>>().toEqualTypeOf<false>();\n expectTypeOf<DefaultToFalse<boolean>>().toEqualTypeOf<false>();\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,QAAQ,EAAEC,YAAY,EAAEC,EAAE,QAAQ,QAAQ;AAGnDF,QAAQ,CAAC,gBAAgB,EAAE,MAAM;EAC/BE,EAAE,CAAC,iBAAiB,EAAE,MAAM;IAC1BD,YAAY,CAAuB,CAAC,CAACE,aAAa,CAAO,CAAC;IAC1DF,YAAY,CAAwB,CAAC,CAACE,aAAa,CAAQ,CAAC;IAC5DF,YAAY,CAA4B,CAAC,CAACE,aAAa,CAAQ,CAAC;IAChEF,YAAY,CAA0B,CAAC,CAACE,aAAa,CAAQ,CAAC;EAChE,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -1,21 +0,0 @@
1
- /*
2
- * Copyright 2023 Palantir Technologies, Inc. All rights reserved.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
-
17
- import { describe, it } from "vitest";
18
- describe("GroupByClause", () => {
19
- it("works", () => {});
20
- });
21
- //# sourceMappingURL=GroupByClause.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GroupByClause.test.js","names":["describe","it"],"sources":["GroupByClause.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 { describe, it } from \"vitest\";\nimport type { GroupByClause } from \"./GroupByClause.js\";\n\nexport type F = GroupByClause<\n {\n metadata: any;\n objects: {\n Todo: {\n type: \"object\";\n apiName: \"Todo\";\n primaryKeyApiName: \"id\";\n primaryKeyType: \"double\";\n links: {};\n properties: {\n text: {\n type: \"string\";\n };\n id: {\n type: \"double\";\n };\n };\n };\n };\n actions: {};\n queries: {};\n }[\"objects\"][\"Todo\"]\n>;\n\ndescribe(\"GroupByClause\", () => {\n it(\"works\", () => {});\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,QAAQ,EAAEC,EAAE,QAAQ,QAAQ;AA4BrCD,QAAQ,CAAC,eAAe,EAAE,MAAM;EAC9BC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;AACvB,CAAC,CAAC","ignoreList":[]}
@@ -1,23 +0,0 @@
1
- /*
2
- * Copyright 2023 Palantir Technologies, Inc. All rights reserved.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
-
17
- import { describe, expect, it } from "vitest";
18
- describe("anything", () => {
19
- it("does", async () => {
20
- expect(1).toBe(1);
21
- });
22
- });
23
- //# sourceMappingURL=junk.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"junk.test.js","names":["describe","expect","it","toBe"],"sources":["junk.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 { describe, expect, it } from \"vitest\";\n\ndescribe(\"anything\", () => {\n it(\"does\", async () => {\n expect(1).toBe(1);\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,QAAQ,EAAEC,MAAM,EAAEC,EAAE,QAAQ,QAAQ;AAE7CF,QAAQ,CAAC,UAAU,EAAE,MAAM;EACzBE,EAAE,CAAC,MAAM,EAAE,YAAY;IACrBD,MAAM,CAAC,CAAC,CAAC,CAACE,IAAI,CAAC,CAAC,CAAC;EACnB,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -1,28 +0,0 @@
1
- /*
2
- * Copyright 2023 Palantir Technologies, Inc. All rights reserved.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
-
17
- import { describe, expectTypeOf, it } from "vitest";
18
- describe("Object definitions", () => {
19
- it("correctly upgrades attachment types at conversion time", () => {
20
- expectTypeOf().toEqualTypeOf();
21
- expectTypeOf().toEqualTypeOf();
22
- });
23
- it("correctly maps struct types", () => {
24
- expectTypeOf().toEqualTypeOf();
25
- expectTypeOf().toEqualTypeOf();
26
- });
27
- });
28
- //# sourceMappingURL=ObjectDefinitions.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ObjectDefinitions.test.js","names":["describe","expectTypeOf","it","toEqualTypeOf"],"sources":["ObjectDefinitions.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 { describe, expectTypeOf, it } from \"vitest\";\nimport type { OsdkObjectPropertyType } from \"../Definitions.js\";\nimport type { Attachment } from \"./Attachment.js\";\n\ndescribe(\"Object definitions\", () => {\n it(\"correctly upgrades attachment types at conversion time\", () => {\n const attachment = {\n type: \"attachment\",\n } as const;\n\n const attachmentArray = {\n type: \"attachment\",\n multiplicity: true,\n } as const;\n\n expectTypeOf<OsdkObjectPropertyType<typeof attachment>>().toEqualTypeOf<\n Attachment\n >();\n\n expectTypeOf<OsdkObjectPropertyType<typeof attachmentArray>>()\n .toEqualTypeOf<\n Attachment[]\n >();\n });\n it(\"correctly maps struct types\", () => {\n const structType = {\n type: {\n integerField: \"integer\",\n floatField: \"float\",\n attachment: \"attachment\",\n },\n } as const;\n\n const structTypeArray = {\n type: {\n integerField: \"integer\",\n floatField: \"float\",\n attachment: \"attachment\",\n },\n multiplicity: true,\n } as const;\n expectTypeOf<OsdkObjectPropertyType<typeof structType>>().toEqualTypeOf<\n {\n readonly integerField: number;\n readonly floatField: number;\n readonly attachment: Attachment;\n }\n >();\n\n expectTypeOf<OsdkObjectPropertyType<typeof structTypeArray>>()\n .toEqualTypeOf<\n {\n readonly integerField: number;\n readonly floatField: number;\n readonly attachment: Attachment;\n }[]\n >();\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,QAAQ,EAAEC,YAAY,EAAEC,EAAE,QAAQ,QAAQ;AAInDF,QAAQ,CAAC,oBAAoB,EAAE,MAAM;EACnCE,EAAE,CAAC,wDAAwD,EAAE,MAAM;IAUjED,YAAY,CAA4C,CAAC,CAACE,aAAa,CAErE,CAAC;IAEHF,YAAY,CAAiD,CAAC,CAC3DE,aAAa,CAEZ,CAAC;EACP,CAAC,CAAC;EACFD,EAAE,CAAC,6BAA6B,EAAE,MAAM;IAiBtCD,YAAY,CAA4C,CAAC,CAACE,aAAa,CAMrE,CAAC;IAEHF,YAAY,CAAiD,CAAC,CAC3DE,aAAa,CAMZ,CAAC;EACP,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}