@osdk/generator 1.1.0 → 1.1.1
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 +9 -0
- package/build/{cjs → js}/index.cjs +130 -130
- package/build/js/index.cjs.map +1 -0
- package/build/{esm → js}/index.mjs +130 -130
- package/build/js/index.mjs.map +1 -0
- package/build/types/MinimalFs.d.ts +9 -0
- package/build/types/WireOntologyDefinition.d.ts +3 -0
- package/build/types/index.d.ts +3 -0
- package/build/types/shared/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.d.ts +3 -0
- package/build/types/shared/generateMetadata.d.ts +3 -0
- package/build/types/shared/getEditedEntities.d.ts +6 -0
- package/build/types/shared/index.d.ts +3 -0
- package/build/types/shared/isNullableQueryDataType.d.ts +2 -0
- package/build/types/shared/sanitizeMetadata.d.ts +9 -0
- package/build/types/shared/sanitizeMetadata.test.d.ts +1 -0
- package/build/types/shared/wireActionTypeV2ToSdkActionDefinition.d.ts +3 -0
- package/build/types/shared/wireObjectTypeV2ToSdkObjectConst.d.ts +3 -0
- package/build/types/shared/wireObjectTypeV2ToSdkObjectDefinition.d.ts +3 -0
- package/build/types/shared/wirePropertyV2ToSdkPrimaryKeyTypeDefinition.d.ts +3 -0
- package/build/types/shared/wirePropertyV2ToSdkPropertyDefinition.d.ts +3 -0
- package/build/types/shared/wireQueryDataTypeToQueryDataTypeDefinition.d.ts +3 -0
- package/build/types/shared/wireQueryTypeV2ToSdkQueryDefinition.d.ts +3 -0
- package/build/types/util/InMemoryFs.d.ts +6 -0
- package/build/types/util/commaSeparatedIdentifiers.d.ts +1 -0
- package/build/types/util/commaSeparatedTypeIdentifiers.d.ts +1 -0
- package/build/types/util/reservedKeywords.d.ts +1 -0
- package/build/types/util/test/TodoWireOntology.d.ts +114 -0
- package/build/types/util/test/compileThis.d.ts +2 -0
- package/build/types/util/test/createMockMinimalFiles.d.ts +12 -0
- package/build/types/util/test/formatTs.d.ts +1 -0
- package/build/types/util/verifyOutdir.d.ts +8 -0
- package/build/types/v1.1/backcompat/generateOAuthDistDir.d.ts +2 -0
- package/build/types/v1.1/backcompat/generateOntologyRuntimeDistDir.d.ts +2 -0
- package/build/types/v1.1/backcompat/internal-foundry-oauth-dist/generateConfidentialClientDir.d.ts +2 -0
- package/build/types/v1.1/backcompat/internal-foundry-oauth-dist/generatePublicClientDir.d.ts +2 -0
- package/build/types/v1.1/backcompat/internal-foundry-oauth-dist/generateUserTokenDir.d.ts +2 -0
- package/build/types/v1.1/backcompat/internal-foundry-ontology-runtime-dist/aggregations/generateAggregationsAggregations.d.ts +2 -0
- package/build/types/v1.1/backcompat/internal-foundry-ontology-runtime-dist/aggregations/generateGroupBy.d.ts +2 -0
- package/build/types/v1.1/backcompat/internal-foundry-ontology-runtime-dist/aggregations/generateMetrics.d.ts +2 -0
- package/build/types/v1.1/backcompat/internal-foundry-ontology-runtime-dist/baseTypes/generateAttachmentsDir.d.ts +2 -0
- package/build/types/v1.1/backcompat/internal-foundry-ontology-runtime-dist/baseTypes/generateGeoshapesDir.d.ts +2 -0
- package/build/types/v1.1/backcompat/internal-foundry-ontology-runtime-dist/baseTypes/generateObjectSetDir.d.ts +2 -0
- package/build/types/v1.1/backcompat/internal-foundry-ontology-runtime-dist/baseTypes/generateSharedObjectCode.d.ts +2 -0
- package/build/types/v1.1/backcompat/internal-foundry-ontology-runtime-dist/baseTypes/generateTimeSeriesDir.d.ts +2 -0
- package/build/types/v1.1/backcompat/internal-foundry-ontology-runtime-dist/generateAggregationsDir.d.ts +2 -0
- package/build/types/v1.1/backcompat/internal-foundry-ontology-runtime-dist/generateBaseTypesDir.d.ts +2 -0
- package/build/types/v1.1/backcompat/internal-foundry-ontology-runtime-dist/generateClientDir.d.ts +2 -0
- package/build/types/v1.1/backcompat/internal-foundry-ontology-runtime-dist/generateCommonDir.d.ts +2 -0
- package/build/types/v1.1/backcompat/internal-foundry-ontology-runtime-dist/generateFiltersDir.d.ts +2 -0
- package/build/types/v1.1/backcompat/internal-foundry-ontology-runtime-dist/generateOntologyProviderDir.d.ts +2 -0
- package/build/types/v1.1/backcompat/internal-foundry-ontology-runtime-dist/generatePagingDir.d.ts +2 -0
- package/build/types/v1.1/backcompat/internal-foundry-ontology-runtime-dist/ontologyProvider/generateErrors.d.ts +2 -0
- package/build/types/v1.1/backcompat/internal-foundry-ontology-runtime-dist/ontologyProvider/generateOntologyMetadata.d.ts +2 -0
- package/build/types/v1.1/backcompat/internal-foundry-ontology-runtime-dist/ontologyProvider/generateResult.d.ts +2 -0
- package/build/types/v1.1/backcompat/util/reexportConsts.d.ts +1 -0
- package/build/types/v1.1/backcompat/util/reexportTypes.d.ts +1 -0
- package/build/types/v1.1/generateActions.d.ts +3 -0
- package/build/types/v1.1/generateActions.test.d.ts +1 -0
- package/build/types/v1.1/generateBackCompatDeprecatedExports.d.ts +2 -0
- package/build/types/v1.1/generateClientSdkVersionOneDotOne.d.ts +3 -0
- package/build/types/v1.1/generateClientSdkVersionOneDotOne.test.d.ts +1 -0
- package/build/types/v1.1/generateFoundryClientFile.d.ts +2 -0
- package/build/types/v1.1/generateFoundryClientFile.test.d.ts +1 -0
- package/build/types/v1.1/generateIndexFile.d.ts +2 -0
- package/build/types/v1.1/generateMetadataFile.d.ts +3 -0
- package/build/types/v1.1/generateMetadataFile.test.d.ts +1 -0
- package/build/types/v1.1/generateObjectsInterfaceFile.d.ts +3 -0
- package/build/types/v1.1/generateObjectsInterfaceFile.test.d.ts +1 -0
- package/build/types/v1.1/generateObjectsInterfaceSupportFiles.d.ts +3 -0
- package/build/types/v1.1/generateObjectsInterfaceSupportFiles.test.d.ts +1 -0
- package/build/types/v1.1/generateOntologyIndexFile.d.ts +2 -0
- package/build/types/v1.1/generatePerActionDataFiles.d.ts +3 -0
- package/build/types/v1.1/generatePerActionDataFiles.test.d.ts +1 -0
- package/build/types/v1.1/generatePerObjectInterfaceAndDataFiles.d.ts +3 -0
- package/build/types/v1.1/generatePerObjectInterfaceAndDataFiles.test.d.ts +1 -0
- package/build/types/v1.1/generatePerQueryDataFiles.d.ts +3 -0
- package/build/types/v1.1/generatePerQueryDataFiles.test.d.ts +1 -0
- package/build/types/v1.1/generateQueries.d.ts +3 -0
- package/build/types/v1.1/generateQueries.test.d.ts +1 -0
- package/build/types/v1.1/wireObjectTypeV2ToV1ObjectInterfaceString.d.ts +2 -0
- package/build/types/v1.1/wireObjectTypeV2ToV1ObjectInterfaceString.test.d.ts +1 -0
- package/build/types/v2.0/generateClientSdkVersionTwoPointZero.d.ts +3 -0
- package/build/types/v2.0/generateClientSdkVersionTwoPointZero.test.d.ts +1 -0
- package/build/types/v2.0/generateMetadata.d.ts +3 -0
- package/build/types/v2.0/wireObjectTypeV2ToObjectDefinitionInterfaceString.d.ts +2 -0
- package/build/types/validateWireOntologyAssumptions.d.ts +2 -0
- package/package.json +14 -26
- package/build/cjs/index.cjs.map +0 -1
- package/build/cjs/index.d.cts +0 -20
- package/build/cjs/package.json +0 -1
- package/build/esm/index.d.ts +0 -20
- package/build/esm/index.mjs.map +0 -1
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
export declare const TodoWireOntology: {
|
|
2
|
+
ontology: {
|
|
3
|
+
rid: string;
|
|
4
|
+
apiName: string;
|
|
5
|
+
displayName: string;
|
|
6
|
+
description: string;
|
|
7
|
+
};
|
|
8
|
+
actionTypes: {
|
|
9
|
+
markTodoCompleted: {
|
|
10
|
+
apiName: string;
|
|
11
|
+
description: string;
|
|
12
|
+
parameters: {
|
|
13
|
+
object: {
|
|
14
|
+
description: string;
|
|
15
|
+
dataType: {
|
|
16
|
+
type: "object";
|
|
17
|
+
objectApiName: string;
|
|
18
|
+
objectTypeApiName: string;
|
|
19
|
+
};
|
|
20
|
+
required: false;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
rid: string;
|
|
24
|
+
operations: {
|
|
25
|
+
type: "modifyObject";
|
|
26
|
+
objectTypeApiName: string;
|
|
27
|
+
}[];
|
|
28
|
+
status: "ACTIVE";
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
objectTypes: {
|
|
32
|
+
Todo: {
|
|
33
|
+
objectType: {
|
|
34
|
+
apiName: string;
|
|
35
|
+
primaryKey: string;
|
|
36
|
+
displayName: string;
|
|
37
|
+
description: string;
|
|
38
|
+
properties: {
|
|
39
|
+
id: {
|
|
40
|
+
dataType: {
|
|
41
|
+
type: "integer";
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
body: {
|
|
45
|
+
dataType: {
|
|
46
|
+
type: "string";
|
|
47
|
+
};
|
|
48
|
+
description: string;
|
|
49
|
+
displayName: string;
|
|
50
|
+
};
|
|
51
|
+
complete: {
|
|
52
|
+
dataType: {
|
|
53
|
+
type: "boolean";
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
status: "ACTIVE";
|
|
58
|
+
rid: string;
|
|
59
|
+
};
|
|
60
|
+
linkTypes: {
|
|
61
|
+
apiName: string;
|
|
62
|
+
cardinality: "ONE";
|
|
63
|
+
displayName: string;
|
|
64
|
+
objectTypeApiName: string;
|
|
65
|
+
status: "ACTIVE";
|
|
66
|
+
foreignKeyPropertyApiName: string;
|
|
67
|
+
}[];
|
|
68
|
+
};
|
|
69
|
+
Person: {
|
|
70
|
+
objectType: {
|
|
71
|
+
apiName: string;
|
|
72
|
+
primaryKey: string;
|
|
73
|
+
displayName: string;
|
|
74
|
+
description: string;
|
|
75
|
+
properties: {
|
|
76
|
+
email: {
|
|
77
|
+
dataType: {
|
|
78
|
+
type: "string";
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
rid: string;
|
|
83
|
+
status: "ACTIVE";
|
|
84
|
+
};
|
|
85
|
+
linkTypes: {
|
|
86
|
+
apiName: string;
|
|
87
|
+
cardinality: "MANY";
|
|
88
|
+
displayName: string;
|
|
89
|
+
objectTypeApiName: string;
|
|
90
|
+
status: "ACTIVE";
|
|
91
|
+
foreignKeyPropertyApiName: string;
|
|
92
|
+
}[];
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
queryTypes: {
|
|
96
|
+
getCount: {
|
|
97
|
+
apiName: string;
|
|
98
|
+
output: {
|
|
99
|
+
type: "integer";
|
|
100
|
+
};
|
|
101
|
+
parameters: {
|
|
102
|
+
completed: {
|
|
103
|
+
dataType: {
|
|
104
|
+
type: "boolean";
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
rid: string;
|
|
109
|
+
version: string;
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
interfaceTypes: {};
|
|
113
|
+
sharedPropertyTypes: {};
|
|
114
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ReaddirFn, WriteFileFn } from "../../MinimalFs";
|
|
2
|
+
export declare function createMockMinimalFiles(): {
|
|
3
|
+
minimalFiles: {
|
|
4
|
+
writeFile: WriteFileFn;
|
|
5
|
+
mkdir: () => Promise<void>;
|
|
6
|
+
readdir: ReaddirFn;
|
|
7
|
+
};
|
|
8
|
+
getFiles: () => {
|
|
9
|
+
[k: string]: string;
|
|
10
|
+
};
|
|
11
|
+
dumpFilesToConsole: () => void;
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function formatTs(contents: string): Promise<string>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { MinimalFs } from "../MinimalFs";
|
|
2
|
+
/**
|
|
3
|
+
* Verify that the target outDir does not yet exist OR is empty.
|
|
4
|
+
*
|
|
5
|
+
* Re-generating an ontology on top of itself is not supported and may leave old
|
|
6
|
+
* files around or refuse to update files with new contents in some cases.
|
|
7
|
+
*/
|
|
8
|
+
export declare function verifyOutdir(outDir: string, fs: MinimalFs): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function reexportConsts(typesToExport: string[]): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function reexportTypes(typesToExport: string[], genericArgsLeft?: string, genericArgsRight?: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { MinimalFs } from "../MinimalFs";
|
|
2
|
+
import type { WireOntologyDefinition } from "../WireOntologyDefinition";
|
|
3
|
+
export declare function generateClientSdkVersionOneDotOne(ontology: WireOntologyDefinition, fs: MinimalFs, outDir: string, packageType?: "commonjs" | "module"): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { MinimalFs } from "../MinimalFs";
|
|
2
|
+
import type { WireOntologyDefinition } from "../WireOntologyDefinition";
|
|
3
|
+
export declare function generateObjectsInterfaceFile(ontology: WireOntologyDefinition, fs: MinimalFs, outDir: string, importExt?: string): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { MinimalFs } from "../MinimalFs";
|
|
2
|
+
import type { WireOntologyDefinition } from "../WireOntologyDefinition";
|
|
3
|
+
export declare function generateObjectsInterfaceSupportFiles(ontology: WireOntologyDefinition, fs: MinimalFs, outDir: string, importExt?: string): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { MinimalFs } from "../MinimalFs";
|
|
2
|
+
import type { WireOntologyDefinition } from "../WireOntologyDefinition";
|
|
3
|
+
export declare function generatePerObjectInterfaceAndDataFiles(ontology: WireOntologyDefinition, fs: MinimalFs, outDir: string, importExt?: string): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { MinimalFs } from "../MinimalFs";
|
|
2
|
+
import type { WireOntologyDefinition } from "../WireOntologyDefinition";
|
|
3
|
+
export declare function generateClientSdkVersionTwoPointZero(ontology: WireOntologyDefinition, fs: MinimalFs, outDir: string, packageType?: "module" | "commonjs"): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,29 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@osdk/generator",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"access": "public",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": {
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
},
|
|
13
|
-
"require": {
|
|
14
|
-
"types": "./build/cjs/index.d.cts",
|
|
15
|
-
"default": "./build/cjs/index.cjs"
|
|
16
|
-
}
|
|
9
|
+
"types": "./build/types/index.d.ts",
|
|
10
|
+
"import": "./build/js/index.mjs",
|
|
11
|
+
"require": "./build/js/index.cjs"
|
|
17
12
|
},
|
|
18
13
|
"./*": {
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
},
|
|
23
|
-
"require": {
|
|
24
|
-
"types": "./build/cjs/public/*.d.cts",
|
|
25
|
-
"default": "./build/cjs/public/*.cjs"
|
|
26
|
-
}
|
|
14
|
+
"types": "./build/types/public/*.d.ts",
|
|
15
|
+
"import": "./build/js/public/*.mjs",
|
|
16
|
+
"require": "./build/js/public/*.cjs"
|
|
27
17
|
}
|
|
28
18
|
},
|
|
29
19
|
"dependencies": {
|
|
@@ -31,8 +21,8 @@
|
|
|
31
21
|
"prettier": "^3.0.3",
|
|
32
22
|
"prettier-plugin-organize-imports": "^3.2.3",
|
|
33
23
|
"tiny-invariant": "^1.3.1",
|
|
34
|
-
"@osdk/api": "1.1.
|
|
35
|
-
"@osdk/gateway": "1.1.
|
|
24
|
+
"@osdk/api": "1.1.1",
|
|
25
|
+
"@osdk/gateway": "1.1.1"
|
|
36
26
|
},
|
|
37
27
|
"devDependencies": {
|
|
38
28
|
"@types/node": "^18.0.0",
|
|
@@ -45,23 +35,21 @@
|
|
|
45
35
|
},
|
|
46
36
|
"keywords": [],
|
|
47
37
|
"files": [
|
|
48
|
-
"build/
|
|
49
|
-
"build/
|
|
38
|
+
"build/types",
|
|
39
|
+
"build/js",
|
|
50
40
|
"CHANGELOG.md",
|
|
51
41
|
"package.json",
|
|
52
42
|
"*.d.ts"
|
|
53
43
|
],
|
|
54
|
-
"main": "./build/
|
|
55
|
-
"module": "./build/
|
|
56
|
-
"types": "./build/
|
|
57
|
-
"type": "module",
|
|
44
|
+
"main": "./build/js/index.cjs",
|
|
45
|
+
"module": "./build/js/index.mjs",
|
|
46
|
+
"types": "./build/types/index.d.ts",
|
|
58
47
|
"scripts": {
|
|
59
48
|
"clean": "rm -rf lib dist types build tsconfig.tsbuildinfo",
|
|
60
49
|
"dev:transpile": "tsup --watch",
|
|
61
50
|
"fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)",
|
|
62
51
|
"lint": "eslint . && dprint check --config $(find-up dprint.json)",
|
|
63
52
|
"test": "vitest run",
|
|
64
|
-
"test:package-types": "if [ -d src/public ]; then ls src/public | sed -e 's/\\(.*\\).ts/--include-entrypoints=\\1/' | xargs pnpm attw --pack .; else pnpm attw --pack .; fi",
|
|
65
53
|
"test:watch": "vitest",
|
|
66
54
|
"transpile": "tsup",
|
|
67
55
|
"transpileWatch": "tsup --watch",
|