@osdk/generator 1.4.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/js/index.cjs +105 -212
- package/build/js/index.cjs.map +1 -1
- package/build/js/index.mjs +104 -211
- package/build/js/index.mjs.map +1 -1
- package/build/types/shared/index.d.ts +0 -2
- package/build/types/shared/wireObjectTypeV2ToSdkObjectConst.d.ts +1 -0
- package/build/types/util/stringify.d.ts +19 -0
- package/changelog/1.6.0/pr-67.v2.yml +5 -0
- package/changelog/1.6.0/pr-83.v2.yml +5 -0
- package/changelog/1.6.0/pr-88.v2.yml +5 -0
- package/changelog/1.6.0/pr-89.v2.yml +5 -0
- package/package.json +4 -3
- package/build/types/shared/wireObjectTypeV2ToSdkObjectDefinition.d.ts +0 -3
- package/build/types/shared/wirePropertyV2ToSdkPrimaryKeyTypeDefinition.d.ts +0 -3
- package/build/types/shared/wirePropertyV2ToSdkPropertyDefinition.d.ts +0 -3
- package/build/types/v2.0/wireObjectTypeV2ToObjectDefinitionInterfaceString.d.ts +0 -2
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { ObjectTypeFullMetadata } from "@osdk/gateway/types";
|
|
2
|
+
export declare function getObjectDefIdentifier(name: string, v2: boolean): string;
|
|
2
3
|
/** @internal */
|
|
3
4
|
export declare function wireObjectTypeV2ToSdkObjectConst(object: ObjectTypeFullMetadata, importExt: string, v2?: boolean): string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A function for changing the stringified key/value pairs of an object.
|
|
3
|
+
*
|
|
4
|
+
* @param value The value of the key/value pair.
|
|
5
|
+
* @param defaultValueFormatter The function that would be called if this customizer wasnt used
|
|
6
|
+
* @param key The key of the key/value pair.
|
|
7
|
+
* @param defaultKeyFormatter The function that would be called if this customizer wasnt used
|
|
8
|
+
*
|
|
9
|
+
* @returns A string, a tuple of strings, or undefined.
|
|
10
|
+
* If a string is returned, it will be used as the value of the key/value pair.
|
|
11
|
+
* If a tuple of strings is returned, the first string will be used as the key of the key/value pair
|
|
12
|
+
* and the second string will be used as the value of the key/value pair.
|
|
13
|
+
* If undefined is returned, the pair will be removed
|
|
14
|
+
*/
|
|
15
|
+
type Customizer<K, V extends {}> = (value: V, defaultValueFormatter: (value: any) => string, key: K, defaultKeyFormatter: (key: string) => string) => [string, string] | string | undefined;
|
|
16
|
+
export declare function stringify<T extends Record<string, any>>(obj: T, customizer?: {
|
|
17
|
+
[K in keyof T | "*"]?: Customizer<K, T[K]>;
|
|
18
|
+
}, separator?: string): string;
|
|
19
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@osdk/generator",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"access": "public",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -25,8 +25,9 @@
|
|
|
25
25
|
"prettier": "^3.0.3",
|
|
26
26
|
"prettier-plugin-organize-imports": "^3.2.3",
|
|
27
27
|
"tiny-invariant": "^1.3.1",
|
|
28
|
-
"@osdk/api": "1.
|
|
29
|
-
"@osdk/gateway": "1.2.0"
|
|
28
|
+
"@osdk/api": "1.3.0",
|
|
29
|
+
"@osdk/gateway": "1.2.0",
|
|
30
|
+
"@osdk/generator-converters": "0.1.0"
|
|
30
31
|
},
|
|
31
32
|
"devDependencies": {
|
|
32
33
|
"@types/node": "^18.0.0",
|