@osdk/generator 1.14.0-beta.3 → 1.14.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/build/browser/index.js +14 -7
- package/build/browser/index.js.map +1 -1
- package/build/cjs/index.cjs +14 -7
- package/build/cjs/index.cjs.map +1 -1
- package/build/cjs/v2.0/wireObjectTypeV2ToSdkObjectConstV2.d.cts +1 -1
- package/build/cjs/v2.0/wireObjectTypeV2ToSdkObjectConstV2.d.ts.map +1 -1
- package/build/esm/index.js +14 -7
- package/build/esm/index.js.map +1 -1
- package/build/esm/v2.0/wireObjectTypeV2ToSdkObjectConstV2.d.ts +1 -1
- package/build/esm/v2.0/wireObjectTypeV2ToSdkObjectConstV2.d.ts.map +1 -1
- package/package.json +6 -6
package/build/cjs/index.cjs
CHANGED
|
@@ -1920,6 +1920,7 @@ function wireObjectTypeV2ToSdkObjectConstV2(wireObject, {
|
|
|
1920
1920
|
DefaultToFalse as $DefaultToFalse,
|
|
1921
1921
|
FetchPageArgs as $FetchPageArgs,
|
|
1922
1922
|
FetchPageResult as $FetchPageResult,
|
|
1923
|
+
IsAny as $IsAny,
|
|
1923
1924
|
LinkedType as $LinkedType,
|
|
1924
1925
|
LinkNames as $LinkNames,
|
|
1925
1926
|
NullabilityAdherence as $NullabilityAdherence,
|
|
@@ -1981,6 +1982,7 @@ function wireObjectTypeV2ToSdkObjectConstV2(wireObject, {
|
|
|
1981
1982
|
osdkMetadata: $osdkMetadata,
|
|
1982
1983
|
objectSet: undefined as any,
|
|
1983
1984
|
props: undefined as any,
|
|
1985
|
+
linksType: undefined as any,
|
|
1984
1986
|
strictProps: undefined as any,
|
|
1985
1987
|
${stringify(definition, {
|
|
1986
1988
|
osdkMetadata: (value) => void 0
|
|
@@ -2052,7 +2054,7 @@ readonly fetchOne: <
|
|
|
2052
2054
|
) => Promise<
|
|
2053
2055
|
${osdkObjectIdentifier}<
|
|
2054
2056
|
(S extends false ? "$notStrict" : never) | ($DefaultToFalse<R> extends false? never: "$rid" ),
|
|
2055
|
-
L
|
|
2057
|
+
$IsAny<L> extends true ? ${propertyKeysIdentifier} : L
|
|
2056
2058
|
>>
|
|
2057
2059
|
;
|
|
2058
2060
|
|
|
@@ -2066,7 +2068,7 @@ readonly fetchOneWithErrors: <
|
|
|
2066
2068
|
) => Promise<$Result<
|
|
2067
2069
|
${osdkObjectIdentifier}<
|
|
2068
2070
|
(S extends false ? "$notStrict" : never) | ($DefaultToFalse<R> extends false?never: "$rid"),
|
|
2069
|
-
L
|
|
2071
|
+
$IsAny<L> extends true ? ${propertyKeysIdentifier} : L
|
|
2070
2072
|
>
|
|
2071
2073
|
>>
|
|
2072
2074
|
|
|
@@ -2084,7 +2086,7 @@ readonly fetchPage: <
|
|
|
2084
2086
|
) => Promise<
|
|
2085
2087
|
$PageResult<${osdkObjectIdentifier}<
|
|
2086
2088
|
(S extends false ? "$notStrict" : never) | ($DefaultToFalse<R> extends false? never: "$rid"),
|
|
2087
|
-
L
|
|
2089
|
+
$IsAny<L> extends true ? ${propertyKeysIdentifier} : L
|
|
2088
2090
|
>>
|
|
2089
2091
|
>;
|
|
2090
2092
|
|
|
@@ -2098,7 +2100,8 @@ readonly fetchPageWithErrors: <
|
|
|
2098
2100
|
) => Promise<$Result<
|
|
2099
2101
|
$PageResult<${osdkObjectIdentifier}<
|
|
2100
2102
|
(S extends false ? "$notStrict" : never) | ($DefaultToFalse<R> extends false? never : "$rid"),
|
|
2101
|
-
L
|
|
2103
|
+
$IsAny<L> extends true ? ${propertyKeysIdentifier} : L
|
|
2104
|
+
>>
|
|
2102
2105
|
>>;
|
|
2103
2106
|
|
|
2104
2107
|
readonly asyncIter: () => AsyncIterableIterator<${osdkObjectIdentifier}>;
|
|
@@ -2128,7 +2131,8 @@ function createDefinition(object, ontology, identifier, {
|
|
|
2128
2131
|
objectDefIdentifier,
|
|
2129
2132
|
objectSetIdentifier,
|
|
2130
2133
|
osdkObjectPropsIdentifier,
|
|
2131
|
-
osdkObjectStrictPropsIdentifier
|
|
2134
|
+
osdkObjectStrictPropsIdentifier,
|
|
2135
|
+
osdkObjectLinksIdentifier
|
|
2132
2136
|
}) {
|
|
2133
2137
|
const definition = object.getCleanedUpDefinition(true);
|
|
2134
2138
|
return `
|
|
@@ -2136,6 +2140,7 @@ function createDefinition(object, ontology, identifier, {
|
|
|
2136
2140
|
osdkMetadata: typeof $osdkMetadata;
|
|
2137
2141
|
objectSet: ${objectSetIdentifier};
|
|
2138
2142
|
props: ${osdkObjectPropsIdentifier};
|
|
2143
|
+
linksType: ${osdkObjectLinksIdentifier};
|
|
2139
2144
|
strictProps: ${osdkObjectStrictPropsIdentifier};
|
|
2140
2145
|
${stringify(definition, {
|
|
2141
2146
|
osdkMetadata: () => void 0,
|
|
@@ -2161,7 +2166,7 @@ function createDefinition(object, ontology, identifier, {
|
|
|
2161
2166
|
function createLinks(ontology, object, identifier) {
|
|
2162
2167
|
const definition = object.getCleanedUpDefinition(true);
|
|
2163
2168
|
return `
|
|
2164
|
-
${Object.keys(definition.links).length === 0 ? `export type ${identifier} =
|
|
2169
|
+
${Object.keys(definition.links).length === 0 ? `export type ${identifier} = {};` : `
|
|
2165
2170
|
export interface ${identifier} {
|
|
2166
2171
|
${stringify(definition.links, {
|
|
2167
2172
|
"*": (definition2, _, key) => {
|
|
@@ -2610,6 +2615,7 @@ function __UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(interfaceDef, ontology,
|
|
|
2610
2615
|
DefaultToFalse as $DefaultToFalse,
|
|
2611
2616
|
FetchPageArgs as $FetchPageArgs,
|
|
2612
2617
|
FetchPageResult as $FetchPageResult,
|
|
2618
|
+
IsAny as $IsAny,
|
|
2613
2619
|
LinkedType as $LinkedType,
|
|
2614
2620
|
LinkNames as $LinkNames,
|
|
2615
2621
|
NullabilityAdherence as $NullabilityAdherence,
|
|
@@ -2640,7 +2646,7 @@ function __UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst(interfaceDef, ontology,
|
|
|
2640
2646
|
|
|
2641
2647
|
|
|
2642
2648
|
|
|
2643
|
-
${Object.keys(definition.links).length === 0 ? `export type ${osdkObjectLinksIdentifier} =
|
|
2649
|
+
${Object.keys(definition.links).length === 0 ? `export type ${osdkObjectLinksIdentifier} = {};` : `
|
|
2644
2650
|
export interface ${osdkObjectLinksIdentifier} {
|
|
2645
2651
|
${stringify(definition.links, {
|
|
2646
2652
|
"*": (definition2) => {
|
|
@@ -2688,6 +2694,7 @@ ${stringify(definition.links, {
|
|
|
2688
2694
|
osdkMetadata: $osdkMetadata,
|
|
2689
2695
|
objectSet: undefined as any,
|
|
2690
2696
|
props: undefined as any,
|
|
2697
|
+
linksType: undefined as any,
|
|
2691
2698
|
strictProps: undefined as any,
|
|
2692
2699
|
${stringify(definition, {
|
|
2693
2700
|
osdkMetadata: () => void 0,
|