@osdk/api 2.8.0-beta.9 → 2.8.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.
Files changed (173) hide show
  1. package/CHANGELOG.md +98 -0
  2. package/build/browser/aggregate/IntervalRule.js +2 -0
  3. package/build/browser/aggregate/IntervalRule.js.map +1 -0
  4. package/build/browser/aggregate/StringFilter.js.map +1 -1
  5. package/build/browser/aggregate/WhereClause.js.map +1 -1
  6. package/build/browser/definitions/LinkDefinitions.js.map +1 -1
  7. package/build/browser/derivedProperties/DerivedProperty.js.map +1 -1
  8. package/build/browser/index.js.map +1 -1
  9. package/build/browser/mapping/DataValueMapping.js.map +1 -1
  10. package/build/browser/object/Media.js.map +1 -1
  11. package/build/browser/ontology/ActionDefinition.js.map +1 -1
  12. package/build/browser/ontology/ObjectTypeDefinition.js.map +1 -1
  13. package/build/browser/ontology/QueryDefinition.js.map +1 -1
  14. package/build/browser/public/shapes-internal.js +2 -0
  15. package/build/browser/public/shapes-internal.js.map +1 -0
  16. package/build/browser/public/unstable.js +2 -0
  17. package/build/browser/public/unstable.js.map +1 -1
  18. package/build/browser/queries/Queries.js.map +1 -1
  19. package/build/browser/shapes/InlineShapeConfig.js +2 -0
  20. package/build/browser/shapes/InlineShapeConfig.js.map +1 -0
  21. package/build/browser/shapes/ShapeBuilder.js +243 -0
  22. package/build/browser/shapes/ShapeBuilder.js.map +1 -0
  23. package/build/browser/shapes/ShapeDefinition.js +59 -0
  24. package/build/browser/shapes/ShapeDefinition.js.map +1 -0
  25. package/build/browser/shapes/computeShapeId.js +97 -0
  26. package/build/browser/shapes/computeShapeId.js.map +1 -0
  27. package/build/browser/shapes/configToShapeDefinition.js +115 -0
  28. package/build/browser/shapes/configToShapeDefinition.js.map +1 -0
  29. package/build/browser/{definitions/LinkDefinitions.test.js → shapes/index.js} +16 -11
  30. package/build/browser/shapes/index.js.map +1 -0
  31. package/build/browser/shapes/internal.js +2 -0
  32. package/build/browser/shapes/internal.js.map +1 -0
  33. package/build/browser/test/EmployeeApiTest.js +3 -1
  34. package/build/browser/test/EmployeeApiTest.js.map +1 -1
  35. package/build/cjs/{ObjectSet-CqVqDXKn.d.cts → ObjectSet-DxD7I6OR.d.cts} +107 -15
  36. package/build/cjs/index.d.cts +11 -5
  37. package/build/cjs/public/shapes-internal.cjs +4 -0
  38. package/build/cjs/public/shapes-internal.cjs.map +1 -0
  39. package/build/cjs/public/shapes-internal.d.cts +4 -0
  40. package/build/cjs/public/unstable.cjs +401 -0
  41. package/build/cjs/public/unstable.cjs.map +1 -1
  42. package/build/cjs/public/unstable.d.cts +57 -3
  43. package/build/cjs/shapes-internal-C7-hN21K.d.cts +152 -0
  44. package/build/esm/aggregate/IntervalRule.js +2 -0
  45. package/build/esm/aggregate/IntervalRule.js.map +1 -0
  46. package/build/esm/aggregate/StringFilter.js.map +1 -1
  47. package/build/esm/aggregate/WhereClause.js.map +1 -1
  48. package/build/esm/definitions/LinkDefinitions.js.map +1 -1
  49. package/build/esm/derivedProperties/DerivedProperty.js.map +1 -1
  50. package/build/esm/index.js.map +1 -1
  51. package/build/esm/mapping/DataValueMapping.js.map +1 -1
  52. package/build/esm/object/Media.js.map +1 -1
  53. package/build/esm/ontology/ActionDefinition.js.map +1 -1
  54. package/build/esm/ontology/ObjectTypeDefinition.js.map +1 -1
  55. package/build/esm/ontology/QueryDefinition.js.map +1 -1
  56. package/build/esm/public/shapes-internal.js +2 -0
  57. package/build/esm/public/shapes-internal.js.map +1 -0
  58. package/build/esm/public/unstable.js +2 -0
  59. package/build/esm/public/unstable.js.map +1 -1
  60. package/build/esm/queries/Queries.js.map +1 -1
  61. package/build/esm/shapes/InlineShapeConfig.js +2 -0
  62. package/build/esm/shapes/InlineShapeConfig.js.map +1 -0
  63. package/build/esm/shapes/ShapeBuilder.js +243 -0
  64. package/build/esm/shapes/ShapeBuilder.js.map +1 -0
  65. package/build/esm/shapes/ShapeDefinition.js +59 -0
  66. package/build/esm/shapes/ShapeDefinition.js.map +1 -0
  67. package/build/esm/shapes/computeShapeId.js +97 -0
  68. package/build/esm/shapes/computeShapeId.js.map +1 -0
  69. package/build/esm/shapes/configToShapeDefinition.js +115 -0
  70. package/build/esm/shapes/configToShapeDefinition.js.map +1 -0
  71. package/build/{browser/aggregate/AggregationsClause.test.js → esm/shapes/index.js} +16 -6
  72. package/build/esm/shapes/index.js.map +1 -0
  73. package/build/esm/shapes/internal.js +2 -0
  74. package/build/esm/shapes/internal.js.map +1 -0
  75. package/build/esm/test/EmployeeApiTest.js +3 -1
  76. package/build/esm/test/EmployeeApiTest.js.map +1 -1
  77. package/build/types/aggregate/IntervalRule.d.ts +69 -0
  78. package/build/types/aggregate/IntervalRule.d.ts.map +1 -0
  79. package/build/types/aggregate/StringFilter.d.ts +12 -1
  80. package/build/types/aggregate/StringFilter.d.ts.map +1 -1
  81. package/build/types/aggregate/WhereClause.d.ts +1 -1
  82. package/build/types/aggregate/WhereClause.d.ts.map +1 -1
  83. package/build/types/definitions/LinkDefinitions.d.ts +3 -3
  84. package/build/types/definitions/LinkDefinitions.d.ts.map +1 -1
  85. package/build/types/derivedProperties/DerivedProperty.d.ts +1 -10
  86. package/build/types/derivedProperties/DerivedProperty.d.ts.map +1 -1
  87. package/build/types/index.d.ts +3 -2
  88. package/build/types/index.d.ts.map +1 -1
  89. package/build/types/mapping/DataValueMapping.d.ts +2 -2
  90. package/build/types/mapping/DataValueMapping.d.ts.map +1 -1
  91. package/build/types/object/Media.d.ts +14 -0
  92. package/build/types/object/Media.d.ts.map +1 -1
  93. package/build/types/ontology/ActionDefinition.d.ts +2 -0
  94. package/build/types/ontology/ActionDefinition.d.ts.map +1 -1
  95. package/build/types/ontology/ObjectTypeDefinition.d.ts +2 -0
  96. package/build/types/ontology/ObjectTypeDefinition.d.ts.map +1 -1
  97. package/build/types/ontology/QueryDefinition.d.ts +1 -1
  98. package/build/types/ontology/QueryDefinition.d.ts.map +1 -1
  99. package/build/types/public/shapes-internal.d.ts +1 -0
  100. package/build/types/public/shapes-internal.d.ts.map +1 -0
  101. package/build/types/public/unstable.d.ts +2 -0
  102. package/build/types/public/unstable.d.ts.map +1 -1
  103. package/build/types/queries/Queries.d.ts +2 -0
  104. package/build/types/queries/Queries.d.ts.map +1 -1
  105. package/build/types/shapes/InlineShapeConfig.d.ts +29 -0
  106. package/build/types/shapes/InlineShapeConfig.d.ts.map +1 -0
  107. package/build/types/shapes/ShapeBuilder.d.ts +21 -0
  108. package/build/types/shapes/ShapeBuilder.d.ts.map +1 -0
  109. package/build/types/shapes/ShapeDefinition.d.ts +167 -0
  110. package/build/types/shapes/ShapeDefinition.d.ts.map +1 -0
  111. package/build/types/shapes/computeShapeId.d.ts +14 -0
  112. package/build/types/shapes/computeShapeId.d.ts.map +1 -0
  113. package/build/types/shapes/configToShapeDefinition.d.ts +6 -0
  114. package/build/types/shapes/configToShapeDefinition.d.ts.map +1 -0
  115. package/build/types/shapes/index.d.ts +5 -0
  116. package/build/types/shapes/index.d.ts.map +1 -0
  117. package/build/types/shapes/internal.d.ts +1 -0
  118. package/build/types/shapes/internal.d.ts.map +1 -0
  119. package/build/types/test/EmployeeApiTest.d.ts +2 -0
  120. package/build/types/test/EmployeeApiTest.d.ts.map +1 -1
  121. package/package.json +12 -3
  122. package/{build/browser/groupby/GroupByClause.test.js → shapes-internal.d.ts} +2 -6
  123. package/build/browser/OsdkObjectFrom.test.js +0 -204
  124. package/build/browser/OsdkObjectFrom.test.js.map +0 -1
  125. package/build/browser/aggregate/AggregationsClause.test.js.map +0 -1
  126. package/build/browser/definitions/LinkDefinitions.test.js.map +0 -1
  127. package/build/browser/groupby/GroupByClause.test.js.map +0 -1
  128. package/build/browser/junk.test.js +0 -23
  129. package/build/browser/junk.test.js.map +0 -1
  130. package/build/browser/object/ObjectDefinitions.test.js +0 -28
  131. package/build/browser/object/ObjectDefinitions.test.js.map +0 -1
  132. package/build/browser/objectSet/ObjectSet.test.js +0 -736
  133. package/build/browser/objectSet/ObjectSet.test.js.map +0 -1
  134. package/build/browser/ontology/ObjectSpecifier.test.js +0 -53
  135. package/build/browser/ontology/ObjectSpecifier.test.js.map +0 -1
  136. package/build/browser/ontology/SimplePropertyDef.test.js +0 -48
  137. package/build/browser/ontology/SimplePropertyDef.test.js.map +0 -1
  138. package/build/esm/OsdkObjectFrom.test.js +0 -204
  139. package/build/esm/OsdkObjectFrom.test.js.map +0 -1
  140. package/build/esm/aggregate/AggregationsClause.test.js +0 -21
  141. package/build/esm/aggregate/AggregationsClause.test.js.map +0 -1
  142. package/build/esm/definitions/LinkDefinitions.test.js +0 -26
  143. package/build/esm/definitions/LinkDefinitions.test.js.map +0 -1
  144. package/build/esm/groupby/GroupByClause.test.js +0 -21
  145. package/build/esm/groupby/GroupByClause.test.js.map +0 -1
  146. package/build/esm/junk.test.js +0 -23
  147. package/build/esm/junk.test.js.map +0 -1
  148. package/build/esm/object/ObjectDefinitions.test.js +0 -28
  149. package/build/esm/object/ObjectDefinitions.test.js.map +0 -1
  150. package/build/esm/objectSet/ObjectSet.test.js +0 -736
  151. package/build/esm/objectSet/ObjectSet.test.js.map +0 -1
  152. package/build/esm/ontology/ObjectSpecifier.test.js +0 -53
  153. package/build/esm/ontology/ObjectSpecifier.test.js.map +0 -1
  154. package/build/esm/ontology/SimplePropertyDef.test.js +0 -48
  155. package/build/esm/ontology/SimplePropertyDef.test.js.map +0 -1
  156. package/build/types/OsdkObjectFrom.test.d.ts +0 -1
  157. package/build/types/OsdkObjectFrom.test.d.ts.map +0 -1
  158. package/build/types/aggregate/AggregationsClause.test.d.ts +0 -46
  159. package/build/types/aggregate/AggregationsClause.test.d.ts.map +0 -1
  160. package/build/types/definitions/LinkDefinitions.test.d.ts +0 -1
  161. package/build/types/definitions/LinkDefinitions.test.d.ts.map +0 -1
  162. package/build/types/groupby/GroupByClause.test.d.ts +0 -23
  163. package/build/types/groupby/GroupByClause.test.d.ts.map +0 -1
  164. package/build/types/junk.test.d.ts +0 -1
  165. package/build/types/junk.test.d.ts.map +0 -1
  166. package/build/types/object/ObjectDefinitions.test.d.ts +0 -1
  167. package/build/types/object/ObjectDefinitions.test.d.ts.map +0 -1
  168. package/build/types/objectSet/ObjectSet.test.d.ts +0 -2
  169. package/build/types/objectSet/ObjectSet.test.d.ts.map +0 -1
  170. package/build/types/ontology/ObjectSpecifier.test.d.ts +0 -1
  171. package/build/types/ontology/ObjectSpecifier.test.d.ts.map +0 -1
  172. package/build/types/ontology/SimplePropertyDef.test.d.ts +0 -1
  173. package/build/types/ontology/SimplePropertyDef.test.d.ts.map +0 -1
@@ -0,0 +1,167 @@
1
+ import type { WhereClause } from "../aggregate/WhereClause.js";
2
+ import type { ObjectOrInterfaceDefinition, PropertyKeys } from "../ontology/ObjectOrInterface.js";
3
+ import type { CompileTimeMetadata } from "../ontology/ObjectTypeDefinition.js";
4
+ import type { OsdkBase } from "../OsdkBase.js";
5
+ import type { LinkedType, LinkNames } from "../util/LinkUtils.js";
6
+ export declare const SourcePrimaryKeySymbol: unique symbol;
7
+ export declare function isSourcePkSymbol(value: unknown): value is symbol;
8
+ declare const ShapeDefinitionBrand: unique symbol;
9
+ declare const ShapeLinkResultBrand: unique symbol;
10
+ /** Configuration for how a derived link is loaded at runtime. */
11
+ export interface DerivedLinkConfig {
12
+ defer?: boolean;
13
+ }
14
+ /** The result of calling `ShapeLinkBuilder.as()`, binding a link traversal to a target shape. */
15
+ export interface ShapeLinkResult<TARGET_SHAPE extends ShapeDefinition<ObjectOrInterfaceDefinition>> {
16
+ readonly __linkResultBrand: typeof ShapeLinkResultBrand;
17
+ readonly targetShape: TARGET_SHAPE;
18
+ readonly objectSetDef: ShapeLinkObjectSetDef;
19
+ readonly config: DerivedLinkConfig;
20
+ }
21
+ /** A single link traversal step in a derived link's object set definition. */
22
+ export interface ShapeLinkSegment {
23
+ readonly type: "pivotTo";
24
+ readonly linkName: string;
25
+ readonly sourceType?: string;
26
+ readonly targetType?: string;
27
+ }
28
+ /** Sort clause for a derived link's result set. */
29
+ export interface ShapeLinkOrderBy {
30
+ readonly property: string;
31
+ readonly direction: "asc" | "desc";
32
+ }
33
+ /** A set operation (union/intersect/subtract) applied to a derived link's object set. */
34
+ export interface ShapeLinkSetOperation {
35
+ readonly type: "union" | "intersect" | "subtract";
36
+ readonly other: ShapeLinkObjectSetDef;
37
+ }
38
+ /** Serializable definition of a derived link's object set: link traversals, filters, ordering, and set operations. */
39
+ export interface ShapeLinkObjectSetDef {
40
+ readonly segments: readonly ShapeLinkSegment[];
41
+ readonly where?: WhereClause<ObjectOrInterfaceDefinition>;
42
+ readonly orderBy?: readonly ShapeLinkOrderBy[];
43
+ readonly limit?: number;
44
+ readonly distinct?: boolean;
45
+ readonly setOperations?: readonly ShapeLinkSetOperation[];
46
+ }
47
+ /** How a shape handles null values for a selected property. */
48
+ export type NullabilityOp = {
49
+ type: "require"
50
+ } | {
51
+ type: "dropIfNull"
52
+ } | {
53
+ type: "withDefault"
54
+ defaultValue: unknown
55
+ } | {
56
+ type: "withTransform"
57
+ transform: (value: unknown) => unknown
58
+ } | {
59
+ type: "select"
60
+ };
61
+ /** Per-property configuration stored in a shape's `__props` map. */
62
+ export interface ShapePropertyConfig {
63
+ readonly nullabilityOp: NullabilityOp;
64
+ }
65
+ /** A derived link definition stored in a shape's `__derivedLinks` array. */
66
+ export interface ShapeDerivedLinkDef<TARGET_SHAPE extends ShapeDefinition<ObjectOrInterfaceDefinition> = ShapeDefinition<ObjectOrInterfaceDefinition>> {
67
+ readonly name: string;
68
+ readonly objectSetDef: ShapeLinkObjectSetDef;
69
+ readonly targetShape: TARGET_SHAPE;
70
+ readonly config: DerivedLinkConfig;
71
+ }
72
+ /**
73
+ * Type projection from an OSDK type. `__props` is the single source of truth for property config.
74
+ *
75
+ * @typeParam BASE - The base ObjectTypeDefinition or InterfaceDefinition
76
+ * @typeParam SELECTED_PROPS - Record of selected properties and their transformed types
77
+ * @typeParam DERIVED_LINKS - Record of derived link names to their result types
78
+ */
79
+ export interface ShapeDefinition<
80
+ BASE extends ObjectOrInterfaceDefinition,
81
+ SELECTED_PROPS extends Record<string, unknown> = {},
82
+ DERIVED_LINKS extends Record<string, ShapeDefinition<ObjectOrInterfaceDefinition>> = {}
83
+ > {
84
+ readonly [ShapeDefinitionBrand]: true;
85
+ readonly __shapeId: string;
86
+ readonly __debugName: string | undefined;
87
+ readonly __baseType: BASE;
88
+ readonly __baseTypeApiName: string;
89
+ readonly __props: Readonly<Record<string, unknown>>;
90
+ readonly __derivedLinks: readonly unknown[];
91
+ readonly __selectedPropsType: SELECTED_PROPS;
92
+ readonly __derivedLinksType: DERIVED_LINKS;
93
+ }
94
+ export type ShapeBaseType<S extends ShapeDefinition<ObjectOrInterfaceDefinition>> = S extends ShapeDefinition<infer BASE, infer _P, infer _L> ? BASE : never;
95
+ export type ShapeSelectedProps<S extends ShapeDefinition<ObjectOrInterfaceDefinition>> = S extends ShapeDefinition<infer _B, infer PROPS, infer _L> ? PROPS : never;
96
+ export type ShapeDerivedLinks<S extends ShapeDefinition<ObjectOrInterfaceDefinition>> = S extends ShapeDefinition<infer _B, infer _P, infer LINKS> ? LINKS : never;
97
+ export type ShapeInstance<S extends ShapeDefinition<ObjectOrInterfaceDefinition>> = S extends ShapeDefinition<infer BASE, infer PROPS, infer LINKS> ? OsdkBase<BASE> & {
98
+ readonly $rid: string
99
+ } & PROPS & { [K in keyof LINKS] : LINKS[K] extends ShapeDefinition<ObjectOrInterfaceDefinition> ? ShapeInstance<LINKS[K]>[] : never } : never;
100
+ export type PropertyType<
101
+ BASE extends ObjectOrInterfaceDefinition,
102
+ K extends PropertyKeys<BASE>
103
+ > = CompileTimeMetadata<BASE>["props"][K];
104
+ export type RequiredProperty<T> = NonNullable<T>;
105
+ export interface ShapeLinkBuilder<
106
+ SOURCE extends ObjectOrInterfaceDefinition,
107
+ CURRENT extends ObjectOrInterfaceDefinition
108
+ > {
109
+ pivotTo<L extends LinkNames<CURRENT>>(link: L): ShapeLinkBuilder<SOURCE, LinkedType<CURRENT, L>>;
110
+ where(clause: WhereClause<CURRENT>): ShapeLinkBuilder<SOURCE, CURRENT>;
111
+ union(...others: ShapeLinkBuilder<SOURCE, CURRENT>[]): ShapeLinkBuilder<SOURCE, CURRENT>;
112
+ intersect(...others: ShapeLinkBuilder<SOURCE, CURRENT>[]): ShapeLinkBuilder<SOURCE, CURRENT>;
113
+ subtract(...others: ShapeLinkBuilder<SOURCE, CURRENT>[]): ShapeLinkBuilder<SOURCE, CURRENT>;
114
+ orderBy<K extends PropertyKeys<CURRENT>>(property: K, direction?: "asc" | "desc"): ShapeLinkBuilder<SOURCE, CURRENT>;
115
+ limit(n: number): ShapeLinkBuilder<SOURCE, CURRENT>;
116
+ distinct(): ShapeLinkBuilder<SOURCE, CURRENT>;
117
+ as<TARGET_SHAPE extends ShapeDefinition<CURRENT>>(shape: TARGET_SHAPE, config?: DerivedLinkConfig): ShapeLinkResult<TARGET_SHAPE>;
118
+ readonly $primaryKey: symbol;
119
+ }
120
+ export interface ShapeLinkBuilderInternal extends ShapeLinkBuilder<ObjectOrInterfaceDefinition, ObjectOrInterfaceDefinition> {
121
+ toObjectSetDef(): ShapeLinkObjectSetDef;
122
+ }
123
+ export interface ShapeBuilder<
124
+ BASE extends ObjectOrInterfaceDefinition,
125
+ PROPS extends Record<string, unknown> = {},
126
+ LINKS extends Record<string, ShapeDefinition<ObjectOrInterfaceDefinition>> = {}
127
+ > {
128
+ select<K extends Exclude<PropertyKeys<BASE>, keyof PROPS>>(...props: K[]): ShapeBuilder<BASE, PROPS & { [P in K] : PropertyType<BASE, P> }, LINKS>;
129
+ require<K extends Exclude<PropertyKeys<BASE>, keyof PROPS>>(...props: K[]): ShapeBuilder<BASE, PROPS & { [P in K] : RequiredProperty<PropertyType<BASE, P>> }, LINKS>;
130
+ dropIfNull<K extends Exclude<PropertyKeys<BASE>, keyof PROPS>>(...props: K[]): ShapeBuilder<BASE, PROPS & { [P in K] : RequiredProperty<PropertyType<BASE, P>> }, LINKS>;
131
+ withDefault<
132
+ K extends Exclude<PropertyKeys<BASE>, keyof PROPS>,
133
+ V extends NonNullable<PropertyType<BASE, K>>
134
+ >(prop: K, defaultValue: V): ShapeBuilder<BASE, PROPS & { [P in K] : NonNullable<PropertyType<BASE, P>> }, LINKS>;
135
+ withTransform<
136
+ K extends Exclude<PropertyKeys<BASE>, keyof PROPS>,
137
+ R
138
+ >(prop: K, transform: (value: PropertyType<BASE, K>) => R): ShapeBuilder<BASE, PROPS & { [P in K] : R }, LINKS>;
139
+ deriveLink<
140
+ NAME extends string,
141
+ TARGET_SHAPE extends ShapeDefinition<ObjectOrInterfaceDefinition>
142
+ >(name: NAME, builder: (linkBuilder: ShapeLinkBuilder<BASE, BASE>) => ShapeLinkResult<TARGET_SHAPE>): ShapeBuilder<BASE, PROPS, LINKS & { [K in NAME] : TARGET_SHAPE }>;
143
+ build(): ShapeDefinition<BASE, PROPS, LINKS>;
144
+ }
145
+ export interface LinkLoadConfig {
146
+ pageSize?: number;
147
+ autoFetchMore?: boolean | number;
148
+ streamUpdates?: boolean;
149
+ defer?: boolean;
150
+ }
151
+ export interface LinkStatus {
152
+ isLoading: boolean;
153
+ error: Error | undefined;
154
+ hasMore: boolean;
155
+ fetchMore: () => Promise<void>;
156
+ }
157
+ export interface NullabilityViolation {
158
+ property: string;
159
+ primaryKey: unknown;
160
+ constraint: "require" | "dropIfNull" | "transformError";
161
+ }
162
+ export declare class ShapeNullabilityError extends Error {
163
+ readonly shape: ShapeDefinition<ObjectOrInterfaceDefinition>;
164
+ readonly violations: readonly NullabilityViolation[];
165
+ constructor(shape: ShapeDefinition<ObjectOrInterfaceDefinition>, violations: readonly NullabilityViolation[]);
166
+ }
167
+ export {};
@@ -0,0 +1 @@
1
+ {"mappings":"AAgBA,cAAc,mBAAmB,6BAA8B;AAC/D,cACE,6BACA,oBACK,kCAAmC;AAC1C,cAAc,2BAA2B,qCAAsC;AAC/E,cAAc,gBAAgB,gBAAiB;AAC/C,cAAc,YAAY,iBAAiB,sBAAuB;AA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UAAU,QAAQ,aAAa,aAAa,QACrD,GAAG,OAAO,MACT,aACD,MACA,WAAW,KAAK,KAAI,iBAAiB,aAAa,MAAM,OACxD;CAGF;EACE,UAAU,QAAQ,aAAa,aAAa;EAC5C,UAAU,YAAY,aAAa,MAAM;GAEzCC,MAAM,GACNC,cAAc,IACb,aACD,MACA,WAAW,KAAK,KAAI,YAAY,aAAa,MAAM,OACnD;CAGF;EACE,UAAU,QAAQ,aAAa,aAAa;EAC5C;GAEAD,MAAM,GACNE,YAAYC,OAAO,aAAa,MAAM,OAAO,IAC5C,aAAa,MAAM,WAAW,KAAK,KAAI,KAAK;CAE/C;EACE;EACA,qBAAqB,gBAAgB;GAErCC,MAAM,MACNC,UACEC,aAAa,iBAAiB,MAAM,UACjC,gBAAgB,gBACpB,aAAa,MAAM,OAAO,WAAW,KAAK,QAAO;CAEpD,SAAS,gBAAgB,MAAM,OAAO;AACvC;AAED,iBAAiB,eAAe;CAC9B;CACA;CACA;CACA;AACD;AAED,iBAAiB,WAAW;CAC1B;CACA,OAAO;CACP;CACA,iBAAiB;AAClB;AAED,iBAAiB,qBAAqB;CACpC;CACA;CACA,YAAY,YAAY,eAAe;AACxC;AAED,OAAO,cAAM,8BAA8B,MAAM;CAE7C,gBAAuB,gBAAgB;CACvC,8BAAqC;CAFvC,YACkBC,OAAO,gBAAgB,8BACvBC,qBAAqB;AASxC","names":["SourcePrimaryKeySymbol: unique symbol","value: unknown","ShapeDefinitionBrand: unique symbol","ShapeLinkResultBrand: unique symbol","link: L","clause: WhereClause<CURRENT>","property: K","direction?: \"asc\" | \"desc\"","n: number","shape: TARGET_SHAPE","config?: DerivedLinkConfig","prop: K","defaultValue: V","transform: (value: PropertyType<BASE, K>) => R","value: PropertyType<BASE, K>","name: NAME","builder: (\n linkBuilder: ShapeLinkBuilder<BASE, BASE>,\n ) => ShapeLinkResult<TARGET_SHAPE>","linkBuilder: ShapeLinkBuilder<BASE, BASE>","shape: ShapeDefinition<ObjectOrInterfaceDefinition>","violations: readonly NullabilityViolation[]"],"sources":["../../../src/shapes/ShapeDefinition.ts"],"version":3,"file":"ShapeDefinition.d.ts"}
@@ -0,0 +1,14 @@
1
+ import type { ShapeDerivedLinkDef, ShapePropertyConfig } from "./ShapeDefinition.js";
2
+ interface ShapeIdInput {
3
+ baseTypeApiName: string;
4
+ props: Record<string, ShapePropertyConfig>;
5
+ derivedLinks: readonly ShapeDerivedLinkDef[];
6
+ }
7
+ /**
8
+ * Computes a stable, deterministic identifier for a shape definition.
9
+ * The ID uniquely represents the combination of base type, property
10
+ * selections/nullability configs, and derived link definitions so
11
+ * that identical shapes produce the same ID across calls.
12
+ */
13
+ export declare function computeShapeId(input: ShapeIdInput): string;
14
+ export {};
@@ -0,0 +1 @@
1
+ {"mappings":"AAgBA,cACE,qBAEA,2BACK,sBAAuB;UAEpB,aAAa;CACrB;CACA,OAAO,eAAe;CACtB,uBAAuB;AACxB;;;;;;;AAoBD,OAAO,iBAAS,eAAeA,OAAO","names":["input: ShapeIdInput"],"sources":["../../../src/shapes/computeShapeId.ts"],"version":3,"file":"computeShapeId.d.ts"}
@@ -0,0 +1,6 @@
1
+ import type { ObjectOrInterfaceDefinition } from "../ontology/ObjectOrInterface.js";
2
+ import type { InferShapeDefinition, InlineShapeConfig } from "./InlineShapeConfig.js";
3
+ export declare function configToShapeDefinition<
4
+ BASE extends ObjectOrInterfaceDefinition,
5
+ const C extends InlineShapeConfig<BASE>
6
+ >(baseType: BASE, config: C): InferShapeDefinition<BASE, C>;
@@ -0,0 +1 @@
1
+ {"mappings":"AAgBA,cAAc,mCAAmC,kCAAmC;AAEpF,cACE,sBACA,yBACK,wBAAyB;AAWhC,OAAO,iBAAS;CACd,aAAa;OACP,UAAU,kBAAkB;EAElCA,UAAU,MACVC,QAAQ,IACP,qBAAqB,MAAM","names":["baseType: BASE","config: C"],"sources":["../../../src/shapes/configToShapeDefinition.ts"],"version":3,"file":"configToShapeDefinition.d.ts"}
@@ -0,0 +1,5 @@
1
+ export type { LinkLoadConfig, LinkStatus, NullabilityViolation, PropertyType, RequiredProperty, ShapeBaseType, ShapeBuilder, ShapeDefinition, ShapeDerivedLinks, ShapeInstance, ShapeLinkBuilder, ShapeLinkResult } from "./ShapeDefinition.js";
2
+ export type { InferShapeDefinition, InlineLinkConfig, InlineShapeConfig } from "./InlineShapeConfig.js";
3
+ export { isSourcePkSymbol, ShapeNullabilityError, SourcePrimaryKeySymbol } from "./ShapeDefinition.js";
4
+ export { createShapeBuilder } from "./ShapeBuilder.js";
5
+ export { configToShapeDefinition } from "./configToShapeDefinition.js";
@@ -0,0 +1 @@
1
+ {"mappings":"AAiBA,cACE,gBACA,YACA,sBACA,cACA,kBACA,eACA,cACA,iBACA,mBACA,eACA,kBACA,uBACK;AAGP,cACE,sBACA,kBACA,yBACK;AAGP,SACE,kBACA,uBACA,8BACK;AAGP,SAAS,0BAA0B;AAGnC,SAAS,+BAA+B","names":[],"sources":["../../../src/shapes/index.ts"],"version":3,"file":"index.d.ts"}
@@ -0,0 +1 @@
1
+ export type { DerivedLinkConfig, NullabilityOp, ShapeDerivedLinkDef, ShapeLinkObjectSetDef, ShapeLinkOrderBy, ShapeLinkSegment, ShapeLinkSetOperation, ShapePropertyConfig } from "./ShapeDefinition.js";
@@ -0,0 +1 @@
1
+ {"mappings":"AAgBA,cACE,mBACA,eACA,qBACA,uBACA,kBACA,kBACA,uBACA,2BACK","names":[],"sources":["../../../src/shapes/internal.ts"],"version":3,"file":"internal.d.ts"}
@@ -30,6 +30,8 @@ export declare namespace EmployeeApiTest {
30
30
  export interface EmployeeApiTest extends $ObjectTypeDefinition {
31
31
  type: "object";
32
32
  apiName: "Employee";
33
+ primaryKeyApiName: "employeeId";
34
+ primaryKeyType: "integer";
33
35
  __DefinitionMetadata?: {
34
36
  objectSet: EmployeeApiTest.ObjectSet
35
37
  props: EmployeeApiTest.Props
@@ -1 +1 @@
1
- {"mappings":"AAgBA,cACE,kBAAkB,iBAClB,aAAa,YACb,wBAAwB,uB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AU,aAAa,YAAY,YAAY;GAC/C,YAAY,aAAa,qBAAqB,YAAY;GAC1D,gBAAgB,aAAa,kBAAkB,YAAY;GAC3D,wBAAwB,aACtB,0BACA,YACA;GAEF,UAAU,aAAa,WAAW,YAAY;GAC9C,mBAAmB,aAAa,QAAQ,YAAY;GACpD,MAAM,aAAa,SAAS,YAAY;GACxC,kBAAkB,aAAa,UAAU,YAAY;GACrD,YAAY,aAAa,SAAS,YAAY;GAC9C,eAAe,aAAa,YAAY,YAAY;GACpD,aAAa,aAAa,aAAa,YAAY;GACnD,UAAU,aAAa,UAAU,YAAY;GAC7C,mBAAmB,aAAa,UAAU,YAAY;EACvD;EACD,KAAK;EACL,QAAQ;EACR,eAAe;EACf,MAAM;EACN,YAAY;CACb;AACF;AAED,OAAO,cAAMA,iBAAiB","names":["EmployeeApiTest: EmployeeApiTest"],"sources":["../../../src/test/EmployeeApiTest.ts"],"version":3,"file":"EmployeeApiTest.d.ts"}
1
+ {"mappings":"AAgBA,cACE,kBAAkB,iBAClB,aAAa,YACb,wBAAwB,uBACxB,eAAe,cACf,6BAA6B,WAC7B,sBAAsB,2BACjB,aAAc;AAErB,yBAAiB;MACH,eACR,eACA,aACA,UACA,eACA,aACA,eACA,mBACA,2BACA,aACA,sBACA,SACA,qBACA,eACA,kBACA,gBACA,aACA;WAEa,MAAM;WACZ,MAAM,oBAAoB;WAC1B,OAAO,gBAAgB;CACjC;WAEgB,MAAM;WACZ,OAAO,UAAU;WACjB,UAAU,UAAU;WACpB,YAAY,UAAU;WACtB,YAAY,UAAU;WACtB,UAAU,UAAU;WACpB,YAAY,UAAU;WACtB,gBAAgB,UAAU;WAC1B,wBACL,UAAU;WAEL,UAAU,UAAU;WACpB,mBAAmB,UAAU;WAC7B,MAAM,UAAU;WAChB,kBAAkB,UAAU;WAC5B,YAAY,UAAU;WACtB,eAAe,UAAU;WACzB,aAAa,UAAU;WACvB,UAAU,UAAU;WACpB,mBAAmB,UAAU;CACvC;MACW,cAAc;WA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test/EmployeeApiTest.ts"],"version":3,"file":"EmployeeApiTest.d.ts"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osdk/api",
3
- "version": "2.8.0-beta.9",
3
+ "version": "2.8.0",
4
4
  "description": "",
5
5
  "access": "public",
6
6
  "license": "Apache-2.0",
@@ -18,6 +18,15 @@
18
18
  "require": "./build/cjs/index.cjs",
19
19
  "default": "./build/browser/index.js"
20
20
  },
21
+ "./shapes-internal": {
22
+ "browser": "./build/browser/public/shapes-internal.js",
23
+ "import": {
24
+ "types": "./build/types/public/shapes-internal.d.ts",
25
+ "default": "./build/esm/public/shapes-internal.js"
26
+ },
27
+ "require": "./build/cjs/public/shapes-internal.cjs",
28
+ "default": "./build/browser/public/shapes-internal.js"
29
+ },
21
30
  "./unstable": {
22
31
  "browser": "./build/browser/public/unstable.js",
23
32
  "import": {
@@ -48,8 +57,8 @@
48
57
  "@microsoft/api-extractor": "^7.52.11",
49
58
  "ts-expect": "^1.3.0",
50
59
  "typescript": "~5.5.4",
51
- "@osdk/monorepo.api-extractor": "~0.7.0-beta.1",
52
- "@osdk/monorepo.tsconfig": "~0.7.0-beta.1"
60
+ "@osdk/monorepo.tsconfig": "~0.7.0",
61
+ "@osdk/monorepo.api-extractor": "~0.7.0"
53
62
  },
54
63
  "publishConfig": {
55
64
  "access": "public"
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2023 Palantir Technologies, Inc. All rights reserved.
2
+ * Copyright 2025 Palantir Technologies, Inc. All rights reserved.
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -14,8 +14,4 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { describe, it } from "vitest";
18
- describe("GroupByClause", () => {
19
- it("works", () => {});
20
- });
21
- //# sourceMappingURL=GroupByClause.test.js.map
17
+ export * from "./build/cjs/public/shapes-internal.cjs";
@@ -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,CAAC,gBAAgB,EAAE,MAAM;EAC/BA,QAAQ,CAAC,8BAA8B,EAAE,MAAM;IAC7CE,EAAE,CAAC,iCAAiC,EAAE,MAAM;MAC1CD,YAAY,CAA2B,CAAC,CACrCG,aAAa,CAAQ,CAAC;IAC3B,CAAC,CAAC;IAEFF,EAAE,CAAC,mCAAmC,EAAE,MAAM;MAC5CD,YAAY,CAA6B,CAAC,CACvCG,aAAa,CAAQ,CAAC;IAC3B,CAAC,CAAC;IAEFF,EAAE,CAAC,mCAAmC,EAAE,MAAM;MAC5CD,YAAY,CAA6B,CAAC,CACvCG,aAAa,CAAQ,CAAC;IAC3B,CAAC,CAAC;IAEFF,EAAE,CAAC,mCAAmC,EAAE,MAAM;MAC5CD,YAAY,CAA+B,CAAC,CACzCG,aAAa,CAAQ,CAAC;IAC3B,CAAC,CAAC;IAEFF,EAAE,CA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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 +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 +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 +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