@osdk/api 2.22.0 → 2.23.0-main-9fb5afb7955ddffd2b9a89d03d6c2ca3528e371c
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 +6 -0
- package/build/browser/__quickinfo_snapshot__/probeUtils.js +143 -0
- package/build/browser/__quickinfo_snapshot__/probeUtils.js.map +1 -0
- package/build/browser/__quickinfo_snapshot__/probes/actions.js +2 -0
- package/build/browser/__quickinfo_snapshot__/probes/actions.js.map +1 -0
- package/build/browser/__quickinfo_snapshot__/probes/aggregationsResults.js +2 -0
- package/build/browser/__quickinfo_snapshot__/probes/aggregationsResults.js.map +1 -0
- package/build/browser/__quickinfo_snapshot__/probes/derivedPropertyBuilder.js +2 -0
- package/build/browser/__quickinfo_snapshot__/probes/derivedPropertyBuilder.js.map +1 -0
- package/build/browser/__quickinfo_snapshot__/probes/objectSet.js +2 -0
- package/build/browser/__quickinfo_snapshot__/probes/objectSet.js.map +1 -0
- package/build/browser/__quickinfo_snapshot__/probes/osdkInstance.js +2 -0
- package/build/browser/__quickinfo_snapshot__/probes/osdkInstance.js.map +1 -0
- package/build/browser/__quickinfo_snapshot__/probes/queries.js +2 -0
- package/build/browser/__quickinfo_snapshot__/probes/queries.js.map +1 -0
- package/build/browser/__quickinfo_snapshot__/probes/subscribe.js +2 -0
- package/build/browser/__quickinfo_snapshot__/probes/subscribe.js.map +1 -0
- package/build/browser/__quickinfo_snapshot__/probes/whereClauseFilters.js +2 -0
- package/build/browser/__quickinfo_snapshot__/probes/whereClauseFilters.js.map +1 -0
- package/build/esm/__quickinfo_snapshot__/probeUtils.js +143 -0
- package/build/esm/__quickinfo_snapshot__/probeUtils.js.map +1 -0
- package/build/esm/__quickinfo_snapshot__/probes/actions.js +2 -0
- package/build/esm/__quickinfo_snapshot__/probes/actions.js.map +1 -0
- package/build/esm/__quickinfo_snapshot__/probes/aggregationsResults.js +2 -0
- package/build/esm/__quickinfo_snapshot__/probes/aggregationsResults.js.map +1 -0
- package/build/esm/__quickinfo_snapshot__/probes/derivedPropertyBuilder.js +2 -0
- package/build/esm/__quickinfo_snapshot__/probes/derivedPropertyBuilder.js.map +1 -0
- package/build/esm/__quickinfo_snapshot__/probes/objectSet.js +2 -0
- package/build/esm/__quickinfo_snapshot__/probes/objectSet.js.map +1 -0
- package/build/esm/__quickinfo_snapshot__/probes/osdkInstance.js +2 -0
- package/build/esm/__quickinfo_snapshot__/probes/osdkInstance.js.map +1 -0
- package/build/esm/__quickinfo_snapshot__/probes/queries.js +2 -0
- package/build/esm/__quickinfo_snapshot__/probes/queries.js.map +1 -0
- package/build/esm/__quickinfo_snapshot__/probes/subscribe.js +2 -0
- package/build/esm/__quickinfo_snapshot__/probes/subscribe.js.map +1 -0
- package/build/esm/__quickinfo_snapshot__/probes/whereClauseFilters.js +2 -0
- package/build/esm/__quickinfo_snapshot__/probes/whereClauseFilters.js.map +1 -0
- package/build/types/__quickinfo_snapshot__/probeUtils.d.ts +23 -0
- package/build/types/__quickinfo_snapshot__/probeUtils.d.ts.map +1 -0
- package/build/types/__quickinfo_snapshot__/probes/actions.d.ts +1 -0
- package/build/types/__quickinfo_snapshot__/probes/actions.d.ts.map +1 -0
- package/build/types/__quickinfo_snapshot__/probes/aggregationsResults.d.ts +1 -0
- package/build/types/__quickinfo_snapshot__/probes/aggregationsResults.d.ts.map +1 -0
- package/build/types/__quickinfo_snapshot__/probes/derivedPropertyBuilder.d.ts +1 -0
- package/build/types/__quickinfo_snapshot__/probes/derivedPropertyBuilder.d.ts.map +1 -0
- package/build/types/__quickinfo_snapshot__/probes/objectSet.d.ts +1 -0
- package/build/types/__quickinfo_snapshot__/probes/objectSet.d.ts.map +1 -0
- package/build/types/__quickinfo_snapshot__/probes/osdkInstance.d.ts +1 -0
- package/build/types/__quickinfo_snapshot__/probes/osdkInstance.d.ts.map +1 -0
- package/build/types/__quickinfo_snapshot__/probes/queries.d.ts +1 -0
- package/build/types/__quickinfo_snapshot__/probes/queries.d.ts.map +1 -0
- package/build/types/__quickinfo_snapshot__/probes/subscribe.d.ts +1 -0
- package/build/types/__quickinfo_snapshot__/probes/subscribe.d.ts.map +1 -0
- package/build/types/__quickinfo_snapshot__/probes/whereClauseFilters.d.ts +1 -0
- package/build/types/__quickinfo_snapshot__/probes/whereClauseFilters.d.ts.map +1 -0
- package/package.json +5 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @osdk/api
|
|
2
2
|
|
|
3
|
+
## 2.23.0-main-9fb5afb7955ddffd2b9a89d03d6c2ca3528e371c
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 198f219: add quickinfo snapshot tests for high-traffic SDK surfaces (`ObjectSet`, `Osdk.Instance`, `AggregationsResults`, `Actions`, `Queries`, `DerivedProperty` builder, per-property `WhereClause` filter unions, subscribe message variants). internal-only — exercises `checker.typeToString` against curated probes and snapshots the formatted output, so future type-graph changes surface as snapshot diffs in code review. no published surface affected.
|
|
8
|
+
|
|
3
9
|
## 2.22.0
|
|
4
10
|
|
|
5
11
|
## 2.21.0
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 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
|
+
// Shared rendering pipeline for quickinfo-snapshot tests. A test passes a
|
|
18
|
+
// list of probes-file paths to `renderQuickInfoProbes` and snapshots each
|
|
19
|
+
// returned string with `toMatchFileSnapshot`. See README.md and
|
|
20
|
+
// quickInfoTypes.test.ts for an end-to-end example.
|
|
21
|
+
|
|
22
|
+
import { spawnSync } from "node:child_process";
|
|
23
|
+
import * as path from "node:path";
|
|
24
|
+
import * as ts from "typescript";
|
|
25
|
+
/**
|
|
26
|
+
* Walks every `declare const <name>: <Type>;` declaration across the given
|
|
27
|
+
* probes files, renders its type via the TypeScript compiler API, and
|
|
28
|
+
* pretty-prints the result through dprint. Returns a map keyed by probes
|
|
29
|
+
* path; each value is the rendered, dprint-formatted snapshot content for
|
|
30
|
+
* that file (one `type <name> = ...;` declaration per probe).
|
|
31
|
+
*
|
|
32
|
+
* Identifiers beginning with `_` are treated as construction helpers (e.g.
|
|
33
|
+
* instantiation-expression aliases) and skipped.
|
|
34
|
+
*
|
|
35
|
+
* All probes files share one TS program, so types imported by multiple
|
|
36
|
+
* files are parsed and checked only once.
|
|
37
|
+
*
|
|
38
|
+
* Every probe declaration must have a JSDoc above it describing the
|
|
39
|
+
* user-facing situation it captures; a missing JSDoc throws.
|
|
40
|
+
*/
|
|
41
|
+
export function renderQuickInfoProbes(opts) {
|
|
42
|
+
const {
|
|
43
|
+
probesPaths,
|
|
44
|
+
tsconfigPath
|
|
45
|
+
} = opts;
|
|
46
|
+
const program = buildProgram(probesPaths, tsconfigPath);
|
|
47
|
+
const checker = program.getTypeChecker();
|
|
48
|
+
const out = {};
|
|
49
|
+
for (const probesPath of probesPaths) {
|
|
50
|
+
out[probesPath] = formatSnapshot(extractProbes(program, checker, probesPath), path.basename(probesPath));
|
|
51
|
+
}
|
|
52
|
+
return out;
|
|
53
|
+
}
|
|
54
|
+
function buildProgram(probesPaths, tsconfigPath) {
|
|
55
|
+
const configText = ts.sys.readFile(tsconfigPath);
|
|
56
|
+
if (configText == null) throw new Error(`cannot read ${tsconfigPath}`);
|
|
57
|
+
const {
|
|
58
|
+
config,
|
|
59
|
+
error
|
|
60
|
+
} = ts.parseConfigFileTextToJson(tsconfigPath, configText);
|
|
61
|
+
if (error) {
|
|
62
|
+
throw new Error(ts.flattenDiagnosticMessageText(error.messageText, "\n"));
|
|
63
|
+
}
|
|
64
|
+
const parsed = ts.parseJsonConfigFileContent(config, ts.sys, path.dirname(tsconfigPath));
|
|
65
|
+
return ts.createProgram({
|
|
66
|
+
rootNames: probesPaths,
|
|
67
|
+
options: {
|
|
68
|
+
...parsed.options,
|
|
69
|
+
noEmit: true,
|
|
70
|
+
declaration: false,
|
|
71
|
+
declarationMap: false
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
function extractProbes(program, checker, probesPath) {
|
|
76
|
+
const sourceFile = program.getSourceFile(probesPath);
|
|
77
|
+
if (sourceFile == null) {
|
|
78
|
+
throw new Error(`probes file not part of program: ${probesPath}`);
|
|
79
|
+
}
|
|
80
|
+
const flags = ts.TypeFormatFlags.NoTruncation | ts.TypeFormatFlags.WriteArrayAsGenericType | ts.TypeFormatFlags.InTypeAlias;
|
|
81
|
+
const out = {};
|
|
82
|
+
for (const stmt of sourceFile.statements) {
|
|
83
|
+
if (!ts.isVariableStatement(stmt)) continue;
|
|
84
|
+
for (const decl of stmt.declarationList.declarations) {
|
|
85
|
+
if (!ts.isIdentifier(decl.name)) continue;
|
|
86
|
+
const name = decl.name.text;
|
|
87
|
+
if (name.startsWith("_")) continue;
|
|
88
|
+
const symbol = checker.getSymbolAtLocation(decl.name);
|
|
89
|
+
if (symbol == null) continue;
|
|
90
|
+
const type = checker.getTypeOfSymbolAtLocation(symbol, decl.name);
|
|
91
|
+
out[name] = {
|
|
92
|
+
source: probeDescription(stmt, decl),
|
|
93
|
+
rendered: scrub(checker.typeToString(type, decl, flags))
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
return out;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// Missing JSDoc is a test-authoring bug, so we throw rather than silently
|
|
101
|
+
// falling back to an empty description.
|
|
102
|
+
function probeDescription(stmt, decl) {
|
|
103
|
+
const jsdoc = ts.getJSDocCommentsAndTags(stmt).find(ts.isJSDoc);
|
|
104
|
+
const raw = jsdoc?.comment;
|
|
105
|
+
const text = typeof raw === "string" ? raw : raw?.map(c => c.text).join("") ?? "";
|
|
106
|
+
if (text.trim().length === 0) {
|
|
107
|
+
const name = ts.isIdentifier(decl.name) ? decl.name.text : "<unnamed>";
|
|
108
|
+
throw new Error(`probe \`${name}\` is missing a JSDoc — add a /** ... */ block above its declaration`);
|
|
109
|
+
}
|
|
110
|
+
return text.replace(/\s+/g, " ").trim();
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// Strip absolute import paths so the snapshot is identical across machines.
|
|
114
|
+
function scrub(s) {
|
|
115
|
+
return s.replace(/import\("[^"]+"\)\./g, "");
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// Pretty-print one probes file's worth of probes as TS-flavored snapshot
|
|
119
|
+
// content: `/** desc */\ntype probeName = rendered;`, joined and run through
|
|
120
|
+
// dprint.
|
|
121
|
+
function formatSnapshot(probes, probesFileName) {
|
|
122
|
+
const names = Object.keys(probes).sort();
|
|
123
|
+
if (names.length === 0) return "";
|
|
124
|
+
const header = [`// AUTO-GENERATED by quickInfoTypes.test.ts — do not edit by hand.`, `// Source: probes/${probesFileName}`, `// Update: pnpm updateSnapshots --filter=@osdk/api`, `// See packages/api/src/__quickinfo_snapshot__/README.md for details.`].join("\n");
|
|
125
|
+
const body = names.map(n => {
|
|
126
|
+
const {
|
|
127
|
+
source,
|
|
128
|
+
rendered
|
|
129
|
+
} = probes[n];
|
|
130
|
+
return `/** ${source} */\ntype ${n} = ${rendered};`;
|
|
131
|
+
}).join("\n\n");
|
|
132
|
+
const result = spawnSync("pnpm exec dprint fmt --stdin probes.ts", {
|
|
133
|
+
input: `${header}\n\n${body}`,
|
|
134
|
+
encoding: "utf8",
|
|
135
|
+
shell: true
|
|
136
|
+
});
|
|
137
|
+
if (result.error) throw result.error;
|
|
138
|
+
if (result.status !== 0) {
|
|
139
|
+
throw new Error(`dprint exited with status ${result.status}: ${result.stderr}`);
|
|
140
|
+
}
|
|
141
|
+
return result.stdout;
|
|
142
|
+
}
|
|
143
|
+
//# sourceMappingURL=probeUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"probeUtils.js","names":["spawnSync","path","ts","renderQuickInfoProbes","opts","probesPaths","tsconfigPath","program","buildProgram","checker","getTypeChecker","out","probesPath","formatSnapshot","extractProbes","basename","configText","sys","readFile","Error","config","error","parseConfigFileTextToJson","flattenDiagnosticMessageText","messageText","parsed","parseJsonConfigFileContent","dirname","createProgram","rootNames","options","noEmit","declaration","declarationMap","sourceFile","getSourceFile","flags","TypeFormatFlags","NoTruncation","WriteArrayAsGenericType","InTypeAlias","stmt","statements","isVariableStatement","decl","declarationList","declarations","isIdentifier","name","text","startsWith","symbol","getSymbolAtLocation","type","getTypeOfSymbolAtLocation","source","probeDescription","rendered","scrub","typeToString","jsdoc","getJSDocCommentsAndTags","find","isJSDoc","raw","comment","map","c","join","trim","length","replace","s","probes","probesFileName","names","Object","keys","sort","header","body","n","result","input","encoding","shell","status","stderr","stdout"],"sources":["probeUtils.ts"],"sourcesContent":["/*\n * Copyright 2026 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\n// Shared rendering pipeline for quickinfo-snapshot tests. A test passes a\n// list of probes-file paths to `renderQuickInfoProbes` and snapshots each\n// returned string with `toMatchFileSnapshot`. See README.md and\n// quickInfoTypes.test.ts for an end-to-end example.\n\nimport { spawnSync } from \"node:child_process\";\nimport * as path from \"node:path\";\nimport * as ts from \"typescript\";\n\nexport interface RenderQuickInfoProbesOptions {\n /** Absolute paths to probes files containing `declare const <name>: T;` declarations. Identifiers beginning with `_` are treated as helpers and skipped. */\n probesPaths: string[];\n /** Absolute path to a tsconfig.json that can compile the probes files. */\n tsconfigPath: string;\n}\n\n/**\n * Walks every `declare const <name>: <Type>;` declaration across the given\n * probes files, renders its type via the TypeScript compiler API, and\n * pretty-prints the result through dprint. Returns a map keyed by probes\n * path; each value is the rendered, dprint-formatted snapshot content for\n * that file (one `type <name> = ...;` declaration per probe).\n *\n * Identifiers beginning with `_` are treated as construction helpers (e.g.\n * instantiation-expression aliases) and skipped.\n *\n * All probes files share one TS program, so types imported by multiple\n * files are parsed and checked only once.\n *\n * Every probe declaration must have a JSDoc above it describing the\n * user-facing situation it captures; a missing JSDoc throws.\n */\nexport function renderQuickInfoProbes(\n opts: RenderQuickInfoProbesOptions,\n): Record<string, string> {\n const { probesPaths, tsconfigPath } = opts;\n const program = buildProgram(probesPaths, tsconfigPath);\n const checker = program.getTypeChecker();\n const out: Record<string, string> = {};\n for (const probesPath of probesPaths) {\n out[probesPath] = formatSnapshot(\n extractProbes(program, checker, probesPath),\n path.basename(probesPath),\n );\n }\n return out;\n}\n\ninterface ProbeEntry {\n source: string;\n rendered: string;\n}\n\nfunction buildProgram(probesPaths: string[], tsconfigPath: string): ts.Program {\n const configText = ts.sys.readFile(tsconfigPath);\n if (configText == null) throw new Error(`cannot read ${tsconfigPath}`);\n const { config, error } = ts.parseConfigFileTextToJson(\n tsconfigPath,\n configText,\n );\n if (error) {\n throw new Error(ts.flattenDiagnosticMessageText(error.messageText, \"\\n\"));\n }\n const parsed = ts.parseJsonConfigFileContent(\n config,\n ts.sys,\n path.dirname(tsconfigPath),\n );\n return ts.createProgram({\n rootNames: probesPaths,\n options: {\n ...parsed.options,\n noEmit: true,\n declaration: false,\n declarationMap: false,\n },\n });\n}\n\nfunction extractProbes(\n program: ts.Program,\n checker: ts.TypeChecker,\n probesPath: string,\n): Record<string, ProbeEntry> {\n const sourceFile = program.getSourceFile(probesPath);\n if (sourceFile == null) {\n throw new Error(`probes file not part of program: ${probesPath}`);\n }\n const flags = ts.TypeFormatFlags.NoTruncation\n | ts.TypeFormatFlags.WriteArrayAsGenericType\n | ts.TypeFormatFlags.InTypeAlias;\n\n const out: Record<string, ProbeEntry> = {};\n for (const stmt of sourceFile.statements) {\n if (!ts.isVariableStatement(stmt)) continue;\n for (const decl of stmt.declarationList.declarations) {\n if (!ts.isIdentifier(decl.name)) continue;\n const name = decl.name.text;\n if (name.startsWith(\"_\")) continue;\n const symbol = checker.getSymbolAtLocation(decl.name);\n if (symbol == null) continue;\n const type = checker.getTypeOfSymbolAtLocation(symbol, decl.name);\n out[name] = {\n source: probeDescription(stmt, decl),\n rendered: scrub(checker.typeToString(type, decl, flags)),\n };\n }\n }\n return out;\n}\n\n// Missing JSDoc is a test-authoring bug, so we throw rather than silently\n// falling back to an empty description.\nfunction probeDescription(\n stmt: ts.VariableStatement,\n decl: ts.VariableDeclaration,\n): string {\n const jsdoc = ts.getJSDocCommentsAndTags(stmt).find(ts.isJSDoc);\n const raw = jsdoc?.comment;\n const text = typeof raw === \"string\"\n ? raw\n : raw?.map((c) => c.text).join(\"\") ?? \"\";\n if (text.trim().length === 0) {\n const name = ts.isIdentifier(decl.name) ? decl.name.text : \"<unnamed>\";\n throw new Error(\n `probe \\`${name}\\` is missing a JSDoc — add a /** ... */ block above its declaration`,\n );\n }\n return text.replace(/\\s+/g, \" \").trim();\n}\n\n// Strip absolute import paths so the snapshot is identical across machines.\nfunction scrub(s: string): string {\n return s.replace(/import\\(\"[^\"]+\"\\)\\./g, \"\");\n}\n\n// Pretty-print one probes file's worth of probes as TS-flavored snapshot\n// content: `/** desc */\\ntype probeName = rendered;`, joined and run through\n// dprint.\nfunction formatSnapshot(\n probes: Record<string, ProbeEntry>,\n probesFileName: string,\n): string {\n const names = Object.keys(probes).sort();\n if (names.length === 0) return \"\";\n const header = [\n `// AUTO-GENERATED by quickInfoTypes.test.ts — do not edit by hand.`,\n `// Source: probes/${probesFileName}`,\n `// Update: pnpm updateSnapshots --filter=@osdk/api`,\n `// See packages/api/src/__quickinfo_snapshot__/README.md for details.`,\n ].join(\"\\n\");\n const body = names.map((n) => {\n const { source, rendered } = probes[n];\n return `/** ${source} */\\ntype ${n} = ${rendered};`;\n }).join(\"\\n\\n\");\n const wrapped = `${header}\\n\\n${body}`;\n const result = spawnSync(\n \"pnpm exec dprint fmt --stdin probes.ts\",\n { input: wrapped, encoding: \"utf8\", shell: true },\n );\n if (result.error) throw result.error;\n if (result.status !== 0) {\n throw new Error(\n `dprint exited with status ${result.status}: ${result.stderr}`,\n );\n }\n return result.stdout;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,SAASA,SAAS,QAAQ,oBAAoB;AAC9C,OAAO,KAAKC,IAAI,MAAM,WAAW;AACjC,OAAO,KAAKC,EAAE,MAAM,YAAY;AAShC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,qBAAqBA,CACnCC,IAAkC,EACV;EACxB,MAAM;IAAEC,WAAW;IAAEC;EAAa,CAAC,GAAGF,IAAI;EAC1C,MAAMG,OAAO,GAAGC,YAAY,CAACH,WAAW,EAAEC,YAAY,CAAC;EACvD,MAAMG,OAAO,GAAGF,OAAO,CAACG,cAAc,CAAC,CAAC;EACxC,MAAMC,GAA2B,GAAG,CAAC,CAAC;EACtC,KAAK,MAAMC,UAAU,IAAIP,WAAW,EAAE;IACpCM,GAAG,CAACC,UAAU,CAAC,GAAGC,cAAc,CAC9BC,aAAa,CAACP,OAAO,EAAEE,OAAO,EAAEG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SAAS,CACtB,wCAAwC,EACxC;IAAEmF,KAAK,EAHO,GAAGJ,MAAM,OAAOC,IAAI,EAGlB;IAAEI,QAAQ,EAAE,MAAM;IAAEC,KAAK,EAAE;EAAK,CAClD,CAAC;EACD,IAAIH,MAAM,CAAC7D,KAAK,EAAE,MAAM6D,MAAM,CAAC7D,KAAK;EACpC,IAAI6D,MAAM,CAACI,MAAM,KAAK,CAAC,EAAE;IACvB,MAAM,IAAInE,KAAK,CACb,6BAA6B+D,MAAM,CAACI,MAAM,KAAKJ,MAAM,CAACK,MAAM,EAC9D,CAAC;EACH;EACA,OAAOL,MAAM,CAACM,MAAM;AACtB","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.js","names":[],"sources":["actions.ts"],"sourcesContent":["/*\n * Copyright 2026 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\n// Action parameter and return-shape helpers. The full\n// `client(MyAction).applyAction(args, options)` signature is composed in\n// @osdk/client; from @osdk/api we pin the per-shape param helpers\n// (`ActionParam.ObjectType` etc.), the options bag, and the two non-trivial\n// return branches (edits-bearing and validation-only).\n\nimport type {\n ActionEditResponse,\n ActionParam,\n ActionValidationResponse,\n ApplyActionOptions,\n ApplyBatchActionOptions,\n} from \"../../actions/Actions.js\";\nimport type { EmployeeApiTest } from \"../../test/EmployeeApiTest.js\";\nimport type { FooInterfaceApiTest } from \"../../test/FooInterfaceApiTest.js\";\n\n// === Param shapes (what an action accepts for each parameter type) ===\n\n/** What an object-typed action parameter accepts — primary key or full object identifiers. */\ndeclare const actionParam_objectType: ActionParam.ObjectType<EmployeeApiTest>;\n\n/** What an objectSet-typed action parameter accepts. */\ndeclare const actionParam_objectSetType: ActionParam.ObjectSetType<\n EmployeeApiTest\n>;\n\n/** What an interface-typed action parameter accepts. */\ndeclare const actionParam_interfaceType: ActionParam.InterfaceType<\n FooInterfaceApiTest\n>;\n\n/** A primitive (string) action parameter. */\ndeclare const actionParam_primitiveType_string: ActionParam.PrimitiveType<\n \"string\"\n>;\n\n/** A primitive (attachment) action parameter — non-trivial wire mapping. */\ndeclare const actionParam_primitiveType_attachment: ActionParam.PrimitiveType<\n \"attachment\"\n>;\n\n/** A struct-typed action parameter — fields are mapped through DataValueClientToWire. */\ndeclare const actionParam_structType: ActionParam.StructType<{\n name: \"string\";\n age: \"integer\";\n joined: \"datetime\";\n}>;\n\n/** The marker type for clearing a nullable parameter on an autogenerated modify action. */\ndeclare const actionParam_nullValueType: ActionParam.NullValueType;\n\n// === Options bag ===\n\n/** The options accepted by client(action).applyAction(args, options). */\ndeclare const applyActionOptions: ApplyActionOptions;\n\n/** The options accepted by client(action).batchApplyAction(args, options). */\ndeclare const applyBatchActionOptions: ApplyBatchActionOptions;\n\n// === Return shapes ===\n\n/** The edits-bearing payload returned when $returnEdits: true. */\ndeclare const actionEditResponse: ActionEditResponse;\n\n/** The validation-only response returned when $validateOnly: true. */\ndeclare const actionValidationResponse: ActionValidationResponse;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aggregationsResults.js","names":[],"sources":["aggregationsResults.ts"],"sourcesContent":["/*\n * Copyright 2026 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 type { ObjectSet } from \"../../objectSet/ObjectSet.js\";\nimport type { EmployeeApiTest } from \"../../test/EmployeeApiTest.js\";\n\n// Anchor every probe at ObjectSet.aggregate so the snapshot reflects what\n// users actually see hovering `await objectSet.aggregate({...})` — including\n// the WithDerivedProperties intersection that ObjectSet threads through Q.\ndeclare const _aggregate: ObjectSet<EmployeeApiTest>[\"aggregate\"];\n\n// === No groupBy ===\n\n/** The result of objectSet.aggregate({ $select: { $count: \"unordered\" } }). */\ndeclare const aggregate_result_count_only: Awaited<\n ReturnType<typeof _aggregate<{ $select: { $count: \"unordered\" } }>>\n>;\n\n/** Aggregation across one property with multiple metrics. */\ndeclare const aggregate_result_single_prop_multi_metrics: Awaited<\n ReturnType<\n typeof _aggregate<{\n $select: {\n \"employeeId:max\": \"unordered\";\n \"employeeId:min\": \"unordered\";\n \"employeeId:avg\": \"unordered\";\n };\n }>\n >\n>;\n\n/** Aggregation across multiple properties, including $count. */\ndeclare const aggregate_result_mixed_props: Awaited<\n ReturnType<\n typeof _aggregate<{\n $select: {\n $count: \"unordered\";\n \"employeeId:sum\": \"unordered\";\n \"fullName:approximateDistinct\": \"unordered\";\n };\n }>\n >\n>;\n\n// === With groupBy ===\n\n/** Aggregation grouped by a single property — result becomes an array of $group plus aggregations. */\ndeclare const aggregate_result_groupBy_basic: Awaited<\n ReturnType<\n typeof _aggregate<{\n $select: { $count: \"unordered\" };\n $groupBy: { class: \"exact\" };\n }>\n >\n>;\n\n/** GroupBy with $includeNullValue: true — the group key becomes nullable. */\ndeclare const aggregate_result_groupBy_includeNullValue: Awaited<\n ReturnType<\n typeof _aggregate<{\n $select: { $count: \"unordered\" };\n $groupBy: { class: { $exact: { $includeNullValue: true } } };\n }>\n >\n>;\n\n/** GroupBy a numeric property by $ranges — group becomes a startValue/endValue pair. */\ndeclare const aggregate_result_groupBy_ranges: Awaited<\n ReturnType<\n typeof _aggregate<{\n $select: { $count: \"unordered\" };\n $groupBy: {\n employeeId: { $ranges: [[0, 100], [100, 200]] };\n };\n }>\n >\n>;\n\n/** GroupBy a numeric property by $fixedWidth — group is the bucket's numeric value. */\ndeclare const aggregate_result_groupBy_fixedWidth: Awaited<\n ReturnType<\n typeof _aggregate<{\n $select: { $count: \"unordered\" };\n $groupBy: { employeeId: { $fixedWidth: 10 } };\n }>\n >\n>;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"derivedPropertyBuilder.js","names":[],"sources":["derivedPropertyBuilder.ts"],"sourcesContent":["/*\n * Copyright 2026 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\n// The (builder) => ... callback argument of objectSet.withProperties({...}).\n// The clause shape is already pinned at the objectSet surface; these probes\n// drill into the builder vocabulary itself — `where`, `pivotTo`,\n// `selectProperty`, `aggregate` — across the constrained / unconstrained\n// branches users hit while chaining.\n\nimport type { DerivedProperty } from \"../../derivedProperties/DerivedProperty.js\";\nimport type { EmployeeApiTest } from \"../../test/EmployeeApiTest.js\";\n\ntype Builder = DerivedProperty.Builder<EmployeeApiTest, false>;\ntype AggregateBuilder = DerivedProperty.AggregateBuilder<EmployeeApiTest, true>;\n\n// Probe individual builder methods via index access (the same way users hover\n// `builder.where` / `builder.selectProperty`). Probing the builder type\n// directly only renders the alias name, so each per-method probe captures\n// the actual signature TS shows on hover.\n\n/** builder.where — narrows the candidate object set before chaining. */\ndeclare const withProperties_builder_where: Builder[\"where\"];\n\n/** builder.pivotTo — follows a link to another object/interface, branching builder constraints. */\ndeclare const withProperties_builder_pivotTo: Builder[\"pivotTo\"];\n\n/** builder.selectProperty — terminal step that picks a property of the current object set. */\ndeclare const withProperties_builder_selectProperty: Builder[\"selectProperty\"];\n\n/** aggregateBuilder.aggregate — terminal step on the constrained branch. */\ndeclare const withProperties_aggregateBuilder_aggregate:\n AggregateBuilder[\"aggregate\"];\n\n/** aggregateBuilder.where — same narrowing surface, but returns an AggregateBuilder. */\ndeclare const withProperties_aggregateBuilder_where: AggregateBuilder[\"where\"];\n\n// Force instantiation of the generic Creator so we capture its post-call shape\n// rather than the raw constraint default.\ndeclare const _creator: DerivedProperty.Creator<EmployeeApiTest, \"integer\">;\n/** The value entry in withProperties({ myProp: <here> }) — a (builder) => Definition callback. */\ndeclare const withProperties_creator: typeof _creator;\n\n/** The argument the user receives in (builder) => — equals the Builder above. */\ndeclare const withProperties_creator_baseObjectSet_param: Parameters<\n typeof _creator\n>[0];\n\n/** The return type of the (builder) => ... callback for an integer property. */\ndeclare const withProperties_creator_result: ReturnType<typeof _creator>;\n\n/** The full clause object accepted by withProperties({...}). */\ndeclare const withProperties_clause: DerivedProperty.Clause<EmployeeApiTest>;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"objectSet.js","names":[],"sources":["objectSet.ts"],"sourcesContent":["/*\n * Copyright 2026 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 type { ObjectSet } from \"../../objectSet/ObjectSet.js\";\nimport type { EmployeeApiTest } from \"../../test/EmployeeApiTest.js\";\n\n// === No derived properties ===\n\n/** A bare ObjectSet<EmployeeApiTest> value. */\ndeclare const objectSet: ObjectSet<EmployeeApiTest>;\n\n/** The clause argument of objectSet.where(...). */\ndeclare const objectSet_where_clause_param: Parameters<\n ObjectSet<EmployeeApiTest>[\"where\"]\n>[0];\n\n/** The listener argument of objectSet.subscribe(...). */\ndeclare const objectSet_subscribe_listener_param: Parameters<\n ObjectSet<EmployeeApiTest>[\"subscribe\"]\n>[0];\n\n/** The awaited result of objectSet.fetchPage(). */\ndeclare const objectSet_fetchPage_result: Awaited<\n ReturnType<ObjectSet<EmployeeApiTest>[\"fetchPage\"]>\n>;\n\n/** The awaited result of objectSet.fetchPageWithErrors() — Result-wrapped envelope around the fetchPage shape. */\ndeclare const objectSet_fetchPageWithErrors_result: Awaited<\n ReturnType<ObjectSet<EmployeeApiTest>[\"fetchPageWithErrors\"]>\n>;\n\n/** The result of objectSet.asyncIter(). */\ndeclare const objectSet_asyncIter_result: ReturnType<\n ObjectSet<EmployeeApiTest>[\"asyncIter\"]\n>;\n\n/** The req argument of objectSet.aggregate(...). */\ndeclare const objectSet_aggregate_req_param: Parameters<\n ObjectSet<EmployeeApiTest>[\"aggregate\"]\n>[0];\n\n// === With derived properties ===\n\n/** An ObjectSet with a derived property mom: integer. */\ndeclare const objectSet_with_rdp: ObjectSet<\n EmployeeApiTest,\n { mom: \"integer\" }\n>;\n\n/** The clause argument of .where(...) on an ObjectSet with a derived mom. */\ndeclare const objectSet_with_rdp_where_clause_param: Parameters<\n ObjectSet<EmployeeApiTest, { mom: \"integer\" }>[\"where\"]\n>[0];\n\n// TS instantiation-expression form so we capture the post-call shape, not the\n// constraint default `{ [x: string]: SimplePropertyDef; }`.\ndeclare const _withProperties: ObjectSet<EmployeeApiTest>[\"withProperties\"];\n/** The result of objectSet.withProperties({ mom: ..., dad: ... }). */\ndeclare const objectSet_withProperties_result: ReturnType<\n typeof _withProperties<{ mom: \"integer\"; dad: \"string\" | undefined }>\n>;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"osdkInstance.js","names":[],"sources":["osdkInstance.ts"],"sourcesContent":["/*\n * Copyright 2026 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 type { Osdk } from \"../../OsdkObjectFrom.js\";\nimport type { EmployeeApiTest } from \"../../test/EmployeeApiTest.js\";\nimport type { FooInterfaceApiTest } from \"../../test/FooInterfaceApiTest.js\";\n\n// === Default and common variants ===\n\n/** A bare Osdk.Instance — what users get when iterating fetchPage results without options. */\ndeclare const osdkInstance_default: Osdk.Instance<EmployeeApiTest>;\n\n/** An instance with $select narrowing the property set to a subset. */\ndeclare const osdkInstance_select_subset: Osdk.Instance<\n EmployeeApiTest,\n never,\n \"fullName\" | \"employeeId\"\n>;\n\n/** An instance with derived properties added via withProperties. */\ndeclare const osdkInstance_with_rdps: Osdk.Instance<\n EmployeeApiTest,\n never,\n \"employeeId\",\n { mom: \"integer\"; dad: \"string\" | undefined }\n>;\n\n// === OPTIONS variants ===\n\n/** An instance fetched with $includeRid: true — exposes $rid. */\ndeclare const osdkInstance_with_rid: Osdk.Instance<EmployeeApiTest, \"$rid\">;\n\n/** An instance fetched with $includeAllBaseObjectProperties: true. */\ndeclare const osdkInstance_all_base_props: Osdk.Instance<\n EmployeeApiTest,\n \"$allBaseProperties\"\n>;\n\n/** An instance fetched with $includePropertySecurities: true. */\ndeclare const osdkInstance_property_securities: Osdk.Instance<\n EmployeeApiTest,\n \"$propertySecurities\"\n>;\n\n// === Interface-typed instance ===\n\n/** An instance whose Q is an interface rather than an object type. */\ndeclare const osdkInstance_interface_default: Osdk.Instance<\n FooInterfaceApiTest\n>;\n\n// === $as cast ===\n\n// TS instantiation-expression form so we capture the post-call shape, not the\n// constraint default `<NEW_Q extends InterfaceDefinition>(...) => ...`.\ndeclare const _$as: Osdk.Instance<EmployeeApiTest>[\"$as\"];\n/** The result of instance.$as(FooInterface) — recasting to the interface view. */\ndeclare const osdkInstance_$as_to_interface_result: ReturnType<\n typeof _$as<FooInterfaceApiTest>\n>;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queries.js","names":[],"sources":["queries.ts"],"sourcesContent":["/*\n * Copyright 2026 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\n// User-facing Query parameter and result helper types. The full\n// `client(MyQuery).executeFunction(args)` signature is composed in\n// @osdk/client, so this surface pins each per-shape building block (object,\n// objectSet, interface, primitive, range, 2D/3D aggregation) — any drift in\n// what users see for a given query parameter or return type will surface\n// here even before the client-side composition runs.\n\nimport type { QueryParam, QueryResult } from \"../../queries/Queries.js\";\nimport type { EmployeeApiTest } from \"../../test/EmployeeApiTest.js\";\nimport type { FooInterfaceApiTest } from \"../../test/FooInterfaceApiTest.js\";\n\n// === Param shapes (what users pass into a query) ===\n\n/** What an object-typed query parameter accepts. */\ndeclare const queryParam_objectType: QueryParam.ObjectType<EmployeeApiTest>;\n\n/** What an interface-typed query parameter accepts. */\ndeclare const queryParam_interfaceType: QueryParam.InterfaceType<\n FooInterfaceApiTest\n>;\n\n/** What an objectSet-typed query parameter accepts. */\ndeclare const queryParam_objectSetType: QueryParam.ObjectSetType<\n EmployeeApiTest\n>;\n\n/** A primitive (string) query parameter. */\ndeclare const queryParam_primitiveType_string: QueryParam.PrimitiveType<\n \"string\"\n>;\n\n/** A primitive (timestamp) query parameter — separate from datetime in client mappings. */\ndeclare const queryParam_primitiveType_timestamp: QueryParam.PrimitiveType<\n \"timestamp\"\n>;\n\n/** A range key over an integer aggregation bucket. */\ndeclare const queryParam_rangeKey_integer: QueryParam.RangeKey<\"integer\">;\n\n/** A 2D aggregation parameter — string buckets, double values. */\ndeclare const queryParam_twoDimensionalAggregationType_string_double:\n QueryParam.TwoDimensionalAggregationType<\n \"string\",\n \"double\"\n >;\n\n/** A 3D aggregation parameter — string outer buckets, range-of-integer inner buckets, double values. */\ndeclare const queryParam_threeDimensionalAggregationType_string_rangeKey_integer_double:\n QueryParam.ThreeDimensionalAggregationType<\n \"string\",\n QueryParam.RangeKey<\"integer\">,\n \"double\"\n >;\n\n// === Result shapes (what users receive when a query resolves) ===\n\n/** What an object-typed query result yields — an OsdkBase view, not a full Osdk.Instance. */\ndeclare const queryResult_objectType: QueryResult.ObjectType<EmployeeApiTest>;\n\n/** What an interface-typed query result yields. */\ndeclare const queryResult_interfaceType: QueryResult.InterfaceType<\n FooInterfaceApiTest\n>;\n\n/** What an objectSet-typed query result yields. */\ndeclare const queryResult_objectSetType: QueryResult.ObjectSetType<\n EmployeeApiTest\n>;\n\n/** A primitive (string) query result. */\ndeclare const queryResult_primitiveType_string: QueryResult.PrimitiveType<\n \"string\"\n>;\n\n/** A primitive (timestamp) query result — separate from datetime in wire mappings. */\ndeclare const queryResult_primitiveType_timestamp: QueryResult.PrimitiveType<\n \"timestamp\"\n>;\n\n/** A media reference query result — surfaced as the Media interface. */\ndeclare const queryResult_mediaType: QueryResult.MediaType;\n\n/** A 2D aggregation result — string buckets, double values. */\ndeclare const queryResult_twoDimensionalAggregationType_string_double:\n QueryResult.TwoDimensionalAggregationType<\n \"string\",\n \"double\"\n >;\n\n/** A 3D aggregation result — string outer buckets, range-of-integer inner buckets, double values. */\ndeclare const queryResult_threeDimensionalAggregationType_string_rangeKey_integer_double:\n QueryResult.ThreeDimensionalAggregationType<\n \"string\",\n QueryResult.RangeKey<\"integer\">,\n \"double\"\n >;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscribe.js","names":[],"sources":["subscribe.ts"],"sourcesContent":["/*\n * Copyright 2026 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\n// The user-facing surface of objectSet.subscribe(...) — already pinned at\n// the listener level in objectSet.ts. These probes drill into each callback\n// payload so changes to a single message variant (`onChange`'s ObjectUpdate,\n// `onError`'s payload, the refresh signals) surface independently.\n//\n// Anchor everything at `ObjectSet<E>[\"subscribe\"]` so probes pick up the\n// same merged-Q form (`{__DefinitionMetadata?: …} & EmployeeApiTest`) users\n// actually see hovering an object set's subscribe arguments.\n\nimport type { ObjectSet } from \"../../objectSet/ObjectSet.js\";\nimport type { EmployeeApiTest } from \"../../test/EmployeeApiTest.js\";\n\ntype Listener = Parameters<ObjectSet<EmployeeApiTest>[\"subscribe\"]>[0];\n\n/** The argument of listener.onChange — emitted when an object enters or leaves the set. */\ndeclare const subscribe_listener_onChange_objectUpdate_param: Parameters<\n NonNullable<Listener[\"onChange\"]>\n>[0];\n\n/** The argument of listener.onError — emitted on a fatal subscription failure. */\ndeclare const subscribe_listener_onError_errors_param: Parameters<\n NonNullable<Listener[\"onError\"]>\n>[0];\n\n/** The argument tuple of listener.onOutOfDate — refresh signal, no payload. */\ndeclare const subscribe_listener_onOutOfDate_params: Parameters<\n NonNullable<Listener[\"onOutOfDate\"]>\n>;\n\n/** The argument tuple of listener.onSuccessfulSubscription — handshake signal, no payload. */\ndeclare const subscribe_listener_onSuccessfulSubscription_params: Parameters<\n NonNullable<Listener[\"onSuccessfulSubscription\"]>\n>;\n\ntype Options = NonNullable<\n Parameters<ObjectSet<EmployeeApiTest>[\"subscribe\"]>[1]\n>;\n\n/** The `properties` field of subscribe options — restricts which property keys updates may carry. */\ndeclare const subscribe_opts_properties: Options[\"properties\"];\n\n/** The `includeRid` field of subscribe options — toggles `$rid` exposure on update objects. */\ndeclare const subscribe_opts_includeRid: Options[\"includeRid\"];\n\n// Instantiation-expression form so we capture the post-call shape of `subscribe`\n// with explicit type parameters — what hover shows on subscribe<\"fullName\"|\"employeeId\", true>.\ndeclare const _subscribe: ObjectSet<EmployeeApiTest>[\"subscribe\"];\n\n/** Same `includeRid` field, narrowed to a property subset that excludes geotime references. */\ndeclare const subscribe_opts_narrow_includeRid: NonNullable<\n Parameters<typeof _subscribe<\"fullName\" | \"employeeId\", true>>[1]\n>[\"includeRid\"];\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"whereClauseFilters.js","names":[],"sources":["whereClauseFilters.ts"],"sourcesContent":["/*\n * Copyright 2026 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\n// Per-property filter unions that show up as the value side of a where clause\n// (e.g. `{ fullName: <here> }`). These pin the exact operator vocabulary —\n// `$eq`, `$contains`, `$within`, `$matchesRegex`, etc. — exposed for each\n// scalar property type.\n\nimport type { ArrayFilter } from \"../../aggregate/ArrayFilter.js\";\nimport type { BaseFilter } from \"../../aggregate/BaseFilter.js\";\nimport type { BooleanFilter } from \"../../aggregate/BooleanFilter.js\";\nimport type { DatetimeFilter } from \"../../aggregate/DatetimeFilter.js\";\nimport type { GeoFilter } from \"../../aggregate/GeoFilter.js\";\nimport type { NumberFilter } from \"../../aggregate/NumberFilter.js\";\nimport type { StringFilter } from \"../../aggregate/StringFilter.js\";\n\n/** The filter union allowed for a string-typed property in a where clause. */\ndeclare const where_stringFilter: StringFilter;\n\n/** The filter union allowed for a numeric-typed property (integer/long/double/float/short/byte/decimal). */\ndeclare const where_numberFilter: NumberFilter;\n\n/** The filter union allowed for a datetime/timestamp property. */\ndeclare const where_datetimeFilter: DatetimeFilter;\n\n/** The filter union allowed for a boolean property. */\ndeclare const where_booleanFilter: BooleanFilter;\n\n/** The filter union allowed for a geopoint/geoshape property. */\ndeclare const where_geoFilter: GeoFilter;\n\n/** The filter union allowed for an array property (multiplicity = true) of strings. */\ndeclare const where_arrayFilter_string: ArrayFilter<string>;\n\n/** The fallback filter union for property types without a dedicated filter (e.g. attachment, mediaReference). */\ndeclare const where_baseFilter_string: BaseFilter<string>;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 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
|
+
// Shared rendering pipeline for quickinfo-snapshot tests. A test passes a
|
|
18
|
+
// list of probes-file paths to `renderQuickInfoProbes` and snapshots each
|
|
19
|
+
// returned string with `toMatchFileSnapshot`. See README.md and
|
|
20
|
+
// quickInfoTypes.test.ts for an end-to-end example.
|
|
21
|
+
|
|
22
|
+
import { spawnSync } from "node:child_process";
|
|
23
|
+
import * as path from "node:path";
|
|
24
|
+
import * as ts from "typescript";
|
|
25
|
+
/**
|
|
26
|
+
* Walks every `declare const <name>: <Type>;` declaration across the given
|
|
27
|
+
* probes files, renders its type via the TypeScript compiler API, and
|
|
28
|
+
* pretty-prints the result through dprint. Returns a map keyed by probes
|
|
29
|
+
* path; each value is the rendered, dprint-formatted snapshot content for
|
|
30
|
+
* that file (one `type <name> = ...;` declaration per probe).
|
|
31
|
+
*
|
|
32
|
+
* Identifiers beginning with `_` are treated as construction helpers (e.g.
|
|
33
|
+
* instantiation-expression aliases) and skipped.
|
|
34
|
+
*
|
|
35
|
+
* All probes files share one TS program, so types imported by multiple
|
|
36
|
+
* files are parsed and checked only once.
|
|
37
|
+
*
|
|
38
|
+
* Every probe declaration must have a JSDoc above it describing the
|
|
39
|
+
* user-facing situation it captures; a missing JSDoc throws.
|
|
40
|
+
*/
|
|
41
|
+
export function renderQuickInfoProbes(opts) {
|
|
42
|
+
const {
|
|
43
|
+
probesPaths,
|
|
44
|
+
tsconfigPath
|
|
45
|
+
} = opts;
|
|
46
|
+
const program = buildProgram(probesPaths, tsconfigPath);
|
|
47
|
+
const checker = program.getTypeChecker();
|
|
48
|
+
const out = {};
|
|
49
|
+
for (const probesPath of probesPaths) {
|
|
50
|
+
out[probesPath] = formatSnapshot(extractProbes(program, checker, probesPath), path.basename(probesPath));
|
|
51
|
+
}
|
|
52
|
+
return out;
|
|
53
|
+
}
|
|
54
|
+
function buildProgram(probesPaths, tsconfigPath) {
|
|
55
|
+
const configText = ts.sys.readFile(tsconfigPath);
|
|
56
|
+
if (configText == null) throw new Error(`cannot read ${tsconfigPath}`);
|
|
57
|
+
const {
|
|
58
|
+
config,
|
|
59
|
+
error
|
|
60
|
+
} = ts.parseConfigFileTextToJson(tsconfigPath, configText);
|
|
61
|
+
if (error) {
|
|
62
|
+
throw new Error(ts.flattenDiagnosticMessageText(error.messageText, "\n"));
|
|
63
|
+
}
|
|
64
|
+
const parsed = ts.parseJsonConfigFileContent(config, ts.sys, path.dirname(tsconfigPath));
|
|
65
|
+
return ts.createProgram({
|
|
66
|
+
rootNames: probesPaths,
|
|
67
|
+
options: {
|
|
68
|
+
...parsed.options,
|
|
69
|
+
noEmit: true,
|
|
70
|
+
declaration: false,
|
|
71
|
+
declarationMap: false
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
function extractProbes(program, checker, probesPath) {
|
|
76
|
+
const sourceFile = program.getSourceFile(probesPath);
|
|
77
|
+
if (sourceFile == null) {
|
|
78
|
+
throw new Error(`probes file not part of program: ${probesPath}`);
|
|
79
|
+
}
|
|
80
|
+
const flags = ts.TypeFormatFlags.NoTruncation | ts.TypeFormatFlags.WriteArrayAsGenericType | ts.TypeFormatFlags.InTypeAlias;
|
|
81
|
+
const out = {};
|
|
82
|
+
for (const stmt of sourceFile.statements) {
|
|
83
|
+
if (!ts.isVariableStatement(stmt)) continue;
|
|
84
|
+
for (const decl of stmt.declarationList.declarations) {
|
|
85
|
+
if (!ts.isIdentifier(decl.name)) continue;
|
|
86
|
+
const name = decl.name.text;
|
|
87
|
+
if (name.startsWith("_")) continue;
|
|
88
|
+
const symbol = checker.getSymbolAtLocation(decl.name);
|
|
89
|
+
if (symbol == null) continue;
|
|
90
|
+
const type = checker.getTypeOfSymbolAtLocation(symbol, decl.name);
|
|
91
|
+
out[name] = {
|
|
92
|
+
source: probeDescription(stmt, decl),
|
|
93
|
+
rendered: scrub(checker.typeToString(type, decl, flags))
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
return out;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// Missing JSDoc is a test-authoring bug, so we throw rather than silently
|
|
101
|
+
// falling back to an empty description.
|
|
102
|
+
function probeDescription(stmt, decl) {
|
|
103
|
+
const jsdoc = ts.getJSDocCommentsAndTags(stmt).find(ts.isJSDoc);
|
|
104
|
+
const raw = jsdoc?.comment;
|
|
105
|
+
const text = typeof raw === "string" ? raw : raw?.map(c => c.text).join("") ?? "";
|
|
106
|
+
if (text.trim().length === 0) {
|
|
107
|
+
const name = ts.isIdentifier(decl.name) ? decl.name.text : "<unnamed>";
|
|
108
|
+
throw new Error(`probe \`${name}\` is missing a JSDoc — add a /** ... */ block above its declaration`);
|
|
109
|
+
}
|
|
110
|
+
return text.replace(/\s+/g, " ").trim();
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// Strip absolute import paths so the snapshot is identical across machines.
|
|
114
|
+
function scrub(s) {
|
|
115
|
+
return s.replace(/import\("[^"]+"\)\./g, "");
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// Pretty-print one probes file's worth of probes as TS-flavored snapshot
|
|
119
|
+
// content: `/** desc */\ntype probeName = rendered;`, joined and run through
|
|
120
|
+
// dprint.
|
|
121
|
+
function formatSnapshot(probes, probesFileName) {
|
|
122
|
+
const names = Object.keys(probes).sort();
|
|
123
|
+
if (names.length === 0) return "";
|
|
124
|
+
const header = [`// AUTO-GENERATED by quickInfoTypes.test.ts — do not edit by hand.`, `// Source: probes/${probesFileName}`, `// Update: pnpm updateSnapshots --filter=@osdk/api`, `// See packages/api/src/__quickinfo_snapshot__/README.md for details.`].join("\n");
|
|
125
|
+
const body = names.map(n => {
|
|
126
|
+
const {
|
|
127
|
+
source,
|
|
128
|
+
rendered
|
|
129
|
+
} = probes[n];
|
|
130
|
+
return `/** ${source} */\ntype ${n} = ${rendered};`;
|
|
131
|
+
}).join("\n\n");
|
|
132
|
+
const result = spawnSync("pnpm exec dprint fmt --stdin probes.ts", {
|
|
133
|
+
input: `${header}\n\n${body}`,
|
|
134
|
+
encoding: "utf8",
|
|
135
|
+
shell: true
|
|
136
|
+
});
|
|
137
|
+
if (result.error) throw result.error;
|
|
138
|
+
if (result.status !== 0) {
|
|
139
|
+
throw new Error(`dprint exited with status ${result.status}: ${result.stderr}`);
|
|
140
|
+
}
|
|
141
|
+
return result.stdout;
|
|
142
|
+
}
|
|
143
|
+
//# sourceMappingURL=probeUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"probeUtils.js","names":["spawnSync","path","ts","renderQuickInfoProbes","opts","probesPaths","tsconfigPath","program","buildProgram","checker","getTypeChecker","out","probesPath","formatSnapshot","extractProbes","basename","configText","sys","readFile","Error","config","error","parseConfigFileTextToJson","flattenDiagnosticMessageText","messageText","parsed","parseJsonConfigFileContent","dirname","createProgram","rootNames","options","noEmit","declaration","declarationMap","sourceFile","getSourceFile","flags","TypeFormatFlags","NoTruncation","WriteArrayAsGenericType","InTypeAlias","stmt","statements","isVariableStatement","decl","declarationList","declarations","isIdentifier","name","text","startsWith","symbol","getSymbolAtLocation","type","getTypeOfSymbolAtLocation","source","probeDescription","rendered","scrub","typeToString","jsdoc","getJSDocCommentsAndTags","find","isJSDoc","raw","comment","map","c","join","trim","length","replace","s","probes","probesFileName","names","Object","keys","sort","header","body","n","result","input","encoding","shell","status","stderr","stdout"],"sources":["probeUtils.ts"],"sourcesContent":["/*\n * Copyright 2026 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\n// Shared rendering pipeline for quickinfo-snapshot tests. A test passes a\n// list of probes-file paths to `renderQuickInfoProbes` and snapshots each\n// returned string with `toMatchFileSnapshot`. See README.md and\n// quickInfoTypes.test.ts for an end-to-end example.\n\nimport { spawnSync } from \"node:child_process\";\nimport * as path from \"node:path\";\nimport * as ts from \"typescript\";\n\nexport interface RenderQuickInfoProbesOptions {\n /** Absolute paths to probes files containing `declare const <name>: T;` declarations. Identifiers beginning with `_` are treated as helpers and skipped. */\n probesPaths: string[];\n /** Absolute path to a tsconfig.json that can compile the probes files. */\n tsconfigPath: string;\n}\n\n/**\n * Walks every `declare const <name>: <Type>;` declaration across the given\n * probes files, renders its type via the TypeScript compiler API, and\n * pretty-prints the result through dprint. Returns a map keyed by probes\n * path; each value is the rendered, dprint-formatted snapshot content for\n * that file (one `type <name> = ...;` declaration per probe).\n *\n * Identifiers beginning with `_` are treated as construction helpers (e.g.\n * instantiation-expression aliases) and skipped.\n *\n * All probes files share one TS program, so types imported by multiple\n * files are parsed and checked only once.\n *\n * Every probe declaration must have a JSDoc above it describing the\n * user-facing situation it captures; a missing JSDoc throws.\n */\nexport function renderQuickInfoProbes(\n opts: RenderQuickInfoProbesOptions,\n): Record<string, string> {\n const { probesPaths, tsconfigPath } = opts;\n const program = buildProgram(probesPaths, tsconfigPath);\n const checker = program.getTypeChecker();\n const out: Record<string, string> = {};\n for (const probesPath of probesPaths) {\n out[probesPath] = formatSnapshot(\n extractProbes(program, checker, probesPath),\n path.basename(probesPath),\n );\n }\n return out;\n}\n\ninterface ProbeEntry {\n source: string;\n rendered: string;\n}\n\nfunction buildProgram(probesPaths: string[], tsconfigPath: string): ts.Program {\n const configText = ts.sys.readFile(tsconfigPath);\n if (configText == null) throw new Error(`cannot read ${tsconfigPath}`);\n const { config, error } = ts.parseConfigFileTextToJson(\n tsconfigPath,\n configText,\n );\n if (error) {\n throw new Error(ts.flattenDiagnosticMessageText(error.messageText, \"\\n\"));\n }\n const parsed = ts.parseJsonConfigFileContent(\n config,\n ts.sys,\n path.dirname(tsconfigPath),\n );\n return ts.createProgram({\n rootNames: probesPaths,\n options: {\n ...parsed.options,\n noEmit: true,\n declaration: false,\n declarationMap: false,\n },\n });\n}\n\nfunction extractProbes(\n program: ts.Program,\n checker: ts.TypeChecker,\n probesPath: string,\n): Record<string, ProbeEntry> {\n const sourceFile = program.getSourceFile(probesPath);\n if (sourceFile == null) {\n throw new Error(`probes file not part of program: ${probesPath}`);\n }\n const flags = ts.TypeFormatFlags.NoTruncation\n | ts.TypeFormatFlags.WriteArrayAsGenericType\n | ts.TypeFormatFlags.InTypeAlias;\n\n const out: Record<string, ProbeEntry> = {};\n for (const stmt of sourceFile.statements) {\n if (!ts.isVariableStatement(stmt)) continue;\n for (const decl of stmt.declarationList.declarations) {\n if (!ts.isIdentifier(decl.name)) continue;\n const name = decl.name.text;\n if (name.startsWith(\"_\")) continue;\n const symbol = checker.getSymbolAtLocation(decl.name);\n if (symbol == null) continue;\n const type = checker.getTypeOfSymbolAtLocation(symbol, decl.name);\n out[name] = {\n source: probeDescription(stmt, decl),\n rendered: scrub(checker.typeToString(type, decl, flags)),\n };\n }\n }\n return out;\n}\n\n// Missing JSDoc is a test-authoring bug, so we throw rather than silently\n// falling back to an empty description.\nfunction probeDescription(\n stmt: ts.VariableStatement,\n decl: ts.VariableDeclaration,\n): string {\n const jsdoc = ts.getJSDocCommentsAndTags(stmt).find(ts.isJSDoc);\n const raw = jsdoc?.comment;\n const text = typeof raw === \"string\"\n ? raw\n : raw?.map((c) => c.text).join(\"\") ?? \"\";\n if (text.trim().length === 0) {\n const name = ts.isIdentifier(decl.name) ? decl.name.text : \"<unnamed>\";\n throw new Error(\n `probe \\`${name}\\` is missing a JSDoc — add a /** ... */ block above its declaration`,\n );\n }\n return text.replace(/\\s+/g, \" \").trim();\n}\n\n// Strip absolute import paths so the snapshot is identical across machines.\nfunction scrub(s: string): string {\n return s.replace(/import\\(\"[^\"]+\"\\)\\./g, \"\");\n}\n\n// Pretty-print one probes file's worth of probes as TS-flavored snapshot\n// content: `/** desc */\\ntype probeName = rendered;`, joined and run through\n// dprint.\nfunction formatSnapshot(\n probes: Record<string, ProbeEntry>,\n probesFileName: string,\n): string {\n const names = Object.keys(probes).sort();\n if (names.length === 0) return \"\";\n const header = [\n `// AUTO-GENERATED by quickInfoTypes.test.ts — do not edit by hand.`,\n `// Source: probes/${probesFileName}`,\n `// Update: pnpm updateSnapshots --filter=@osdk/api`,\n `// See packages/api/src/__quickinfo_snapshot__/README.md for details.`,\n ].join(\"\\n\");\n const body = names.map((n) => {\n const { source, rendered } = probes[n];\n return `/** ${source} */\\ntype ${n} = ${rendered};`;\n }).join(\"\\n\\n\");\n const wrapped = `${header}\\n\\n${body}`;\n const result = spawnSync(\n \"pnpm exec dprint fmt --stdin probes.ts\",\n { input: wrapped, encoding: \"utf8\", shell: true },\n );\n if (result.error) throw result.error;\n if (result.status !== 0) {\n throw new Error(\n `dprint exited with status ${result.status}: ${result.stderr}`,\n );\n }\n return result.stdout;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,SAASA,SAAS,QAAQ,oBAAoB;AAC9C,OAAO,KAAKC,IAAI,MAAM,WAAW;AACjC,OAAO,KAAKC,EAAE,MAAM,YAAY;AAShC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,qBAAqBA,CACnCC,IAAkC,EACV;EACxB,MAAM;IAAEC,WAAW;IAAEC;EAAa,CAAC,GAAGF,IAAI;EAC1C,MAAMG,OAAO,GAAGC,YAAY,CAACH,WAAW,EAAEC,YAAY,CAAC;EACvD,MAAMG,OAAO,GAAGF,OAAO,CAACG,cAAc,CAAC,CAAC;EACxC,MAAMC,GAA2B,GAAG,CAAC,CAAC;EACtC,KAAK,MAAMC,UAAU,IAAIP,WAAW,EAAE;IACpCM,GAAG,CAACC,UAAU,CAAC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C,CAACW,IAAI,CAAC,MAAM,CAAC;EAEf,MAAMc,MAAM,GAAGlF,SAAS,CACtB,wCAAwC,EACxC;IAAEmF,KAAK,EAHO,GAAGJ,MAAM,OAAOC,IAAI,EAGlB;IAAEI,QAAQ,EAAE,MAAM;IAAEC,KAAK,EAAE;EAAK,CAClD,CAAC;EACD,IAAIH,MAAM,CAAC7D,KAAK,EAAE,MAAM6D,MAAM,CAAC7D,KAAK;EACpC,IAAI6D,MAAM,CAACI,MAAM,KAAK,CAAC,EAAE;IACvB,MAAM,IAAInE,KAAK,CACb,6BAA6B+D,MAAM,CAACI,MAAM,KAAKJ,MAAM,CAACK,MAAM,EAC9D,CAAC;EACH;EACA,OAAOL,MAAM,CAACM,MAAM;AACtB","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.js","names":[],"sources":["actions.ts"],"sourcesContent":["/*\n * Copyright 2026 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\n// Action parameter and return-shape helpers. The full\n// `client(MyAction).applyAction(args, options)` signature is composed in\n// @osdk/client; from @osdk/api we pin the per-shape param helpers\n// (`ActionParam.ObjectType` etc.), the options bag, and the two non-trivial\n// return branches (edits-bearing and validation-only).\n\nimport type {\n ActionEditResponse,\n ActionParam,\n ActionValidationResponse,\n ApplyActionOptions,\n ApplyBatchActionOptions,\n} from \"../../actions/Actions.js\";\nimport type { EmployeeApiTest } from \"../../test/EmployeeApiTest.js\";\nimport type { FooInterfaceApiTest } from \"../../test/FooInterfaceApiTest.js\";\n\n// === Param shapes (what an action accepts for each parameter type) ===\n\n/** What an object-typed action parameter accepts — primary key or full object identifiers. */\ndeclare const actionParam_objectType: ActionParam.ObjectType<EmployeeApiTest>;\n\n/** What an objectSet-typed action parameter accepts. */\ndeclare const actionParam_objectSetType: ActionParam.ObjectSetType<\n EmployeeApiTest\n>;\n\n/** What an interface-typed action parameter accepts. */\ndeclare const actionParam_interfaceType: ActionParam.InterfaceType<\n FooInterfaceApiTest\n>;\n\n/** A primitive (string) action parameter. */\ndeclare const actionParam_primitiveType_string: ActionParam.PrimitiveType<\n \"string\"\n>;\n\n/** A primitive (attachment) action parameter — non-trivial wire mapping. */\ndeclare const actionParam_primitiveType_attachment: ActionParam.PrimitiveType<\n \"attachment\"\n>;\n\n/** A struct-typed action parameter — fields are mapped through DataValueClientToWire. */\ndeclare const actionParam_structType: ActionParam.StructType<{\n name: \"string\";\n age: \"integer\";\n joined: \"datetime\";\n}>;\n\n/** The marker type for clearing a nullable parameter on an autogenerated modify action. */\ndeclare const actionParam_nullValueType: ActionParam.NullValueType;\n\n// === Options bag ===\n\n/** The options accepted by client(action).applyAction(args, options). */\ndeclare const applyActionOptions: ApplyActionOptions;\n\n/** The options accepted by client(action).batchApplyAction(args, options). */\ndeclare const applyBatchActionOptions: ApplyBatchActionOptions;\n\n// === Return shapes ===\n\n/** The edits-bearing payload returned when $returnEdits: true. */\ndeclare const actionEditResponse: ActionEditResponse;\n\n/** The validation-only response returned when $validateOnly: true. */\ndeclare const actionValidationResponse: ActionValidationResponse;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aggregationsResults.js","names":[],"sources":["aggregationsResults.ts"],"sourcesContent":["/*\n * Copyright 2026 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 type { ObjectSet } from \"../../objectSet/ObjectSet.js\";\nimport type { EmployeeApiTest } from \"../../test/EmployeeApiTest.js\";\n\n// Anchor every probe at ObjectSet.aggregate so the snapshot reflects what\n// users actually see hovering `await objectSet.aggregate({...})` — including\n// the WithDerivedProperties intersection that ObjectSet threads through Q.\ndeclare const _aggregate: ObjectSet<EmployeeApiTest>[\"aggregate\"];\n\n// === No groupBy ===\n\n/** The result of objectSet.aggregate({ $select: { $count: \"unordered\" } }). */\ndeclare const aggregate_result_count_only: Awaited<\n ReturnType<typeof _aggregate<{ $select: { $count: \"unordered\" } }>>\n>;\n\n/** Aggregation across one property with multiple metrics. */\ndeclare const aggregate_result_single_prop_multi_metrics: Awaited<\n ReturnType<\n typeof _aggregate<{\n $select: {\n \"employeeId:max\": \"unordered\";\n \"employeeId:min\": \"unordered\";\n \"employeeId:avg\": \"unordered\";\n };\n }>\n >\n>;\n\n/** Aggregation across multiple properties, including $count. */\ndeclare const aggregate_result_mixed_props: Awaited<\n ReturnType<\n typeof _aggregate<{\n $select: {\n $count: \"unordered\";\n \"employeeId:sum\": \"unordered\";\n \"fullName:approximateDistinct\": \"unordered\";\n };\n }>\n >\n>;\n\n// === With groupBy ===\n\n/** Aggregation grouped by a single property — result becomes an array of $group plus aggregations. */\ndeclare const aggregate_result_groupBy_basic: Awaited<\n ReturnType<\n typeof _aggregate<{\n $select: { $count: \"unordered\" };\n $groupBy: { class: \"exact\" };\n }>\n >\n>;\n\n/** GroupBy with $includeNullValue: true — the group key becomes nullable. */\ndeclare const aggregate_result_groupBy_includeNullValue: Awaited<\n ReturnType<\n typeof _aggregate<{\n $select: { $count: \"unordered\" };\n $groupBy: { class: { $exact: { $includeNullValue: true } } };\n }>\n >\n>;\n\n/** GroupBy a numeric property by $ranges — group becomes a startValue/endValue pair. */\ndeclare const aggregate_result_groupBy_ranges: Awaited<\n ReturnType<\n typeof _aggregate<{\n $select: { $count: \"unordered\" };\n $groupBy: {\n employeeId: { $ranges: [[0, 100], [100, 200]] };\n };\n }>\n >\n>;\n\n/** GroupBy a numeric property by $fixedWidth — group is the bucket's numeric value. */\ndeclare const aggregate_result_groupBy_fixedWidth: Awaited<\n ReturnType<\n typeof _aggregate<{\n $select: { $count: \"unordered\" };\n $groupBy: { employeeId: { $fixedWidth: 10 } };\n }>\n >\n>;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"derivedPropertyBuilder.js","names":[],"sources":["derivedPropertyBuilder.ts"],"sourcesContent":["/*\n * Copyright 2026 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\n// The (builder) => ... callback argument of objectSet.withProperties({...}).\n// The clause shape is already pinned at the objectSet surface; these probes\n// drill into the builder vocabulary itself — `where`, `pivotTo`,\n// `selectProperty`, `aggregate` — across the constrained / unconstrained\n// branches users hit while chaining.\n\nimport type { DerivedProperty } from \"../../derivedProperties/DerivedProperty.js\";\nimport type { EmployeeApiTest } from \"../../test/EmployeeApiTest.js\";\n\ntype Builder = DerivedProperty.Builder<EmployeeApiTest, false>;\ntype AggregateBuilder = DerivedProperty.AggregateBuilder<EmployeeApiTest, true>;\n\n// Probe individual builder methods via index access (the same way users hover\n// `builder.where` / `builder.selectProperty`). Probing the builder type\n// directly only renders the alias name, so each per-method probe captures\n// the actual signature TS shows on hover.\n\n/** builder.where — narrows the candidate object set before chaining. */\ndeclare const withProperties_builder_where: Builder[\"where\"];\n\n/** builder.pivotTo — follows a link to another object/interface, branching builder constraints. */\ndeclare const withProperties_builder_pivotTo: Builder[\"pivotTo\"];\n\n/** builder.selectProperty — terminal step that picks a property of the current object set. */\ndeclare const withProperties_builder_selectProperty: Builder[\"selectProperty\"];\n\n/** aggregateBuilder.aggregate — terminal step on the constrained branch. */\ndeclare const withProperties_aggregateBuilder_aggregate:\n AggregateBuilder[\"aggregate\"];\n\n/** aggregateBuilder.where — same narrowing surface, but returns an AggregateBuilder. */\ndeclare const withProperties_aggregateBuilder_where: AggregateBuilder[\"where\"];\n\n// Force instantiation of the generic Creator so we capture its post-call shape\n// rather than the raw constraint default.\ndeclare const _creator: DerivedProperty.Creator<EmployeeApiTest, \"integer\">;\n/** The value entry in withProperties({ myProp: <here> }) — a (builder) => Definition callback. */\ndeclare const withProperties_creator: typeof _creator;\n\n/** The argument the user receives in (builder) => — equals the Builder above. */\ndeclare const withProperties_creator_baseObjectSet_param: Parameters<\n typeof _creator\n>[0];\n\n/** The return type of the (builder) => ... callback for an integer property. */\ndeclare const withProperties_creator_result: ReturnType<typeof _creator>;\n\n/** The full clause object accepted by withProperties({...}). */\ndeclare const withProperties_clause: DerivedProperty.Clause<EmployeeApiTest>;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"objectSet.js","names":[],"sources":["objectSet.ts"],"sourcesContent":["/*\n * Copyright 2026 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 type { ObjectSet } from \"../../objectSet/ObjectSet.js\";\nimport type { EmployeeApiTest } from \"../../test/EmployeeApiTest.js\";\n\n// === No derived properties ===\n\n/** A bare ObjectSet<EmployeeApiTest> value. */\ndeclare const objectSet: ObjectSet<EmployeeApiTest>;\n\n/** The clause argument of objectSet.where(...). */\ndeclare const objectSet_where_clause_param: Parameters<\n ObjectSet<EmployeeApiTest>[\"where\"]\n>[0];\n\n/** The listener argument of objectSet.subscribe(...). */\ndeclare const objectSet_subscribe_listener_param: Parameters<\n ObjectSet<EmployeeApiTest>[\"subscribe\"]\n>[0];\n\n/** The awaited result of objectSet.fetchPage(). */\ndeclare const objectSet_fetchPage_result: Awaited<\n ReturnType<ObjectSet<EmployeeApiTest>[\"fetchPage\"]>\n>;\n\n/** The awaited result of objectSet.fetchPageWithErrors() — Result-wrapped envelope around the fetchPage shape. */\ndeclare const objectSet_fetchPageWithErrors_result: Awaited<\n ReturnType<ObjectSet<EmployeeApiTest>[\"fetchPageWithErrors\"]>\n>;\n\n/** The result of objectSet.asyncIter(). */\ndeclare const objectSet_asyncIter_result: ReturnType<\n ObjectSet<EmployeeApiTest>[\"asyncIter\"]\n>;\n\n/** The req argument of objectSet.aggregate(...). */\ndeclare const objectSet_aggregate_req_param: Parameters<\n ObjectSet<EmployeeApiTest>[\"aggregate\"]\n>[0];\n\n// === With derived properties ===\n\n/** An ObjectSet with a derived property mom: integer. */\ndeclare const objectSet_with_rdp: ObjectSet<\n EmployeeApiTest,\n { mom: \"integer\" }\n>;\n\n/** The clause argument of .where(...) on an ObjectSet with a derived mom. */\ndeclare const objectSet_with_rdp_where_clause_param: Parameters<\n ObjectSet<EmployeeApiTest, { mom: \"integer\" }>[\"where\"]\n>[0];\n\n// TS instantiation-expression form so we capture the post-call shape, not the\n// constraint default `{ [x: string]: SimplePropertyDef; }`.\ndeclare const _withProperties: ObjectSet<EmployeeApiTest>[\"withProperties\"];\n/** The result of objectSet.withProperties({ mom: ..., dad: ... }). */\ndeclare const objectSet_withProperties_result: ReturnType<\n typeof _withProperties<{ mom: \"integer\"; dad: \"string\" | undefined }>\n>;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"osdkInstance.js","names":[],"sources":["osdkInstance.ts"],"sourcesContent":["/*\n * Copyright 2026 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 type { Osdk } from \"../../OsdkObjectFrom.js\";\nimport type { EmployeeApiTest } from \"../../test/EmployeeApiTest.js\";\nimport type { FooInterfaceApiTest } from \"../../test/FooInterfaceApiTest.js\";\n\n// === Default and common variants ===\n\n/** A bare Osdk.Instance — what users get when iterating fetchPage results without options. */\ndeclare const osdkInstance_default: Osdk.Instance<EmployeeApiTest>;\n\n/** An instance with $select narrowing the property set to a subset. */\ndeclare const osdkInstance_select_subset: Osdk.Instance<\n EmployeeApiTest,\n never,\n \"fullName\" | \"employeeId\"\n>;\n\n/** An instance with derived properties added via withProperties. */\ndeclare const osdkInstance_with_rdps: Osdk.Instance<\n EmployeeApiTest,\n never,\n \"employeeId\",\n { mom: \"integer\"; dad: \"string\" | undefined }\n>;\n\n// === OPTIONS variants ===\n\n/** An instance fetched with $includeRid: true — exposes $rid. */\ndeclare const osdkInstance_with_rid: Osdk.Instance<EmployeeApiTest, \"$rid\">;\n\n/** An instance fetched with $includeAllBaseObjectProperties: true. */\ndeclare const osdkInstance_all_base_props: Osdk.Instance<\n EmployeeApiTest,\n \"$allBaseProperties\"\n>;\n\n/** An instance fetched with $includePropertySecurities: true. */\ndeclare const osdkInstance_property_securities: Osdk.Instance<\n EmployeeApiTest,\n \"$propertySecurities\"\n>;\n\n// === Interface-typed instance ===\n\n/** An instance whose Q is an interface rather than an object type. */\ndeclare const osdkInstance_interface_default: Osdk.Instance<\n FooInterfaceApiTest\n>;\n\n// === $as cast ===\n\n// TS instantiation-expression form so we capture the post-call shape, not the\n// constraint default `<NEW_Q extends InterfaceDefinition>(...) => ...`.\ndeclare const _$as: Osdk.Instance<EmployeeApiTest>[\"$as\"];\n/** The result of instance.$as(FooInterface) — recasting to the interface view. */\ndeclare const osdkInstance_$as_to_interface_result: ReturnType<\n typeof _$as<FooInterfaceApiTest>\n>;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queries.js","names":[],"sources":["queries.ts"],"sourcesContent":["/*\n * Copyright 2026 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\n// User-facing Query parameter and result helper types. The full\n// `client(MyQuery).executeFunction(args)` signature is composed in\n// @osdk/client, so this surface pins each per-shape building block (object,\n// objectSet, interface, primitive, range, 2D/3D aggregation) — any drift in\n// what users see for a given query parameter or return type will surface\n// here even before the client-side composition runs.\n\nimport type { QueryParam, QueryResult } from \"../../queries/Queries.js\";\nimport type { EmployeeApiTest } from \"../../test/EmployeeApiTest.js\";\nimport type { FooInterfaceApiTest } from \"../../test/FooInterfaceApiTest.js\";\n\n// === Param shapes (what users pass into a query) ===\n\n/** What an object-typed query parameter accepts. */\ndeclare const queryParam_objectType: QueryParam.ObjectType<EmployeeApiTest>;\n\n/** What an interface-typed query parameter accepts. */\ndeclare const queryParam_interfaceType: QueryParam.InterfaceType<\n FooInterfaceApiTest\n>;\n\n/** What an objectSet-typed query parameter accepts. */\ndeclare const queryParam_objectSetType: QueryParam.ObjectSetType<\n EmployeeApiTest\n>;\n\n/** A primitive (string) query parameter. */\ndeclare const queryParam_primitiveType_string: QueryParam.PrimitiveType<\n \"string\"\n>;\n\n/** A primitive (timestamp) query parameter — separate from datetime in client mappings. */\ndeclare const queryParam_primitiveType_timestamp: QueryParam.PrimitiveType<\n \"timestamp\"\n>;\n\n/** A range key over an integer aggregation bucket. */\ndeclare const queryParam_rangeKey_integer: QueryParam.RangeKey<\"integer\">;\n\n/** A 2D aggregation parameter — string buckets, double values. */\ndeclare const queryParam_twoDimensionalAggregationType_string_double:\n QueryParam.TwoDimensionalAggregationType<\n \"string\",\n \"double\"\n >;\n\n/** A 3D aggregation parameter — string outer buckets, range-of-integer inner buckets, double values. */\ndeclare const queryParam_threeDimensionalAggregationType_string_rangeKey_integer_double:\n QueryParam.ThreeDimensionalAggregationType<\n \"string\",\n QueryParam.RangeKey<\"integer\">,\n \"double\"\n >;\n\n// === Result shapes (what users receive when a query resolves) ===\n\n/** What an object-typed query result yields — an OsdkBase view, not a full Osdk.Instance. */\ndeclare const queryResult_objectType: QueryResult.ObjectType<EmployeeApiTest>;\n\n/** What an interface-typed query result yields. */\ndeclare const queryResult_interfaceType: QueryResult.InterfaceType<\n FooInterfaceApiTest\n>;\n\n/** What an objectSet-typed query result yields. */\ndeclare const queryResult_objectSetType: QueryResult.ObjectSetType<\n EmployeeApiTest\n>;\n\n/** A primitive (string) query result. */\ndeclare const queryResult_primitiveType_string: QueryResult.PrimitiveType<\n \"string\"\n>;\n\n/** A primitive (timestamp) query result — separate from datetime in wire mappings. */\ndeclare const queryResult_primitiveType_timestamp: QueryResult.PrimitiveType<\n \"timestamp\"\n>;\n\n/** A media reference query result — surfaced as the Media interface. */\ndeclare const queryResult_mediaType: QueryResult.MediaType;\n\n/** A 2D aggregation result — string buckets, double values. */\ndeclare const queryResult_twoDimensionalAggregationType_string_double:\n QueryResult.TwoDimensionalAggregationType<\n \"string\",\n \"double\"\n >;\n\n/** A 3D aggregation result — string outer buckets, range-of-integer inner buckets, double values. */\ndeclare const queryResult_threeDimensionalAggregationType_string_rangeKey_integer_double:\n QueryResult.ThreeDimensionalAggregationType<\n \"string\",\n QueryResult.RangeKey<\"integer\">,\n \"double\"\n >;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscribe.js","names":[],"sources":["subscribe.ts"],"sourcesContent":["/*\n * Copyright 2026 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\n// The user-facing surface of objectSet.subscribe(...) — already pinned at\n// the listener level in objectSet.ts. These probes drill into each callback\n// payload so changes to a single message variant (`onChange`'s ObjectUpdate,\n// `onError`'s payload, the refresh signals) surface independently.\n//\n// Anchor everything at `ObjectSet<E>[\"subscribe\"]` so probes pick up the\n// same merged-Q form (`{__DefinitionMetadata?: …} & EmployeeApiTest`) users\n// actually see hovering an object set's subscribe arguments.\n\nimport type { ObjectSet } from \"../../objectSet/ObjectSet.js\";\nimport type { EmployeeApiTest } from \"../../test/EmployeeApiTest.js\";\n\ntype Listener = Parameters<ObjectSet<EmployeeApiTest>[\"subscribe\"]>[0];\n\n/** The argument of listener.onChange — emitted when an object enters or leaves the set. */\ndeclare const subscribe_listener_onChange_objectUpdate_param: Parameters<\n NonNullable<Listener[\"onChange\"]>\n>[0];\n\n/** The argument of listener.onError — emitted on a fatal subscription failure. */\ndeclare const subscribe_listener_onError_errors_param: Parameters<\n NonNullable<Listener[\"onError\"]>\n>[0];\n\n/** The argument tuple of listener.onOutOfDate — refresh signal, no payload. */\ndeclare const subscribe_listener_onOutOfDate_params: Parameters<\n NonNullable<Listener[\"onOutOfDate\"]>\n>;\n\n/** The argument tuple of listener.onSuccessfulSubscription — handshake signal, no payload. */\ndeclare const subscribe_listener_onSuccessfulSubscription_params: Parameters<\n NonNullable<Listener[\"onSuccessfulSubscription\"]>\n>;\n\ntype Options = NonNullable<\n Parameters<ObjectSet<EmployeeApiTest>[\"subscribe\"]>[1]\n>;\n\n/** The `properties` field of subscribe options — restricts which property keys updates may carry. */\ndeclare const subscribe_opts_properties: Options[\"properties\"];\n\n/** The `includeRid` field of subscribe options — toggles `$rid` exposure on update objects. */\ndeclare const subscribe_opts_includeRid: Options[\"includeRid\"];\n\n// Instantiation-expression form so we capture the post-call shape of `subscribe`\n// with explicit type parameters — what hover shows on subscribe<\"fullName\"|\"employeeId\", true>.\ndeclare const _subscribe: ObjectSet<EmployeeApiTest>[\"subscribe\"];\n\n/** Same `includeRid` field, narrowed to a property subset that excludes geotime references. */\ndeclare const subscribe_opts_narrow_includeRid: NonNullable<\n Parameters<typeof _subscribe<\"fullName\" | \"employeeId\", true>>[1]\n>[\"includeRid\"];\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"whereClauseFilters.js","names":[],"sources":["whereClauseFilters.ts"],"sourcesContent":["/*\n * Copyright 2026 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\n// Per-property filter unions that show up as the value side of a where clause\n// (e.g. `{ fullName: <here> }`). These pin the exact operator vocabulary —\n// `$eq`, `$contains`, `$within`, `$matchesRegex`, etc. — exposed for each\n// scalar property type.\n\nimport type { ArrayFilter } from \"../../aggregate/ArrayFilter.js\";\nimport type { BaseFilter } from \"../../aggregate/BaseFilter.js\";\nimport type { BooleanFilter } from \"../../aggregate/BooleanFilter.js\";\nimport type { DatetimeFilter } from \"../../aggregate/DatetimeFilter.js\";\nimport type { GeoFilter } from \"../../aggregate/GeoFilter.js\";\nimport type { NumberFilter } from \"../../aggregate/NumberFilter.js\";\nimport type { StringFilter } from \"../../aggregate/StringFilter.js\";\n\n/** The filter union allowed for a string-typed property in a where clause. */\ndeclare const where_stringFilter: StringFilter;\n\n/** The filter union allowed for a numeric-typed property (integer/long/double/float/short/byte/decimal). */\ndeclare const where_numberFilter: NumberFilter;\n\n/** The filter union allowed for a datetime/timestamp property. */\ndeclare const where_datetimeFilter: DatetimeFilter;\n\n/** The filter union allowed for a boolean property. */\ndeclare const where_booleanFilter: BooleanFilter;\n\n/** The filter union allowed for a geopoint/geoshape property. */\ndeclare const where_geoFilter: GeoFilter;\n\n/** The filter union allowed for an array property (multiplicity = true) of strings. */\ndeclare const where_arrayFilter_string: ArrayFilter<string>;\n\n/** The fallback filter union for property types without a dedicated filter (e.g. attachment, mediaReference). */\ndeclare const where_baseFilter_string: BaseFilter<string>;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface RenderQuickInfoProbesOptions {
|
|
2
|
+
/** Absolute paths to probes files containing `declare const <name>: T;` declarations. Identifiers beginning with `_` are treated as helpers and skipped. */
|
|
3
|
+
probesPaths: string[];
|
|
4
|
+
/** Absolute path to a tsconfig.json that can compile the probes files. */
|
|
5
|
+
tsconfigPath: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Walks every `declare const <name>: <Type>;` declaration across the given
|
|
9
|
+
* probes files, renders its type via the TypeScript compiler API, and
|
|
10
|
+
* pretty-prints the result through dprint. Returns a map keyed by probes
|
|
11
|
+
* path; each value is the rendered, dprint-formatted snapshot content for
|
|
12
|
+
* that file (one `type <name> = ...;` declaration per probe).
|
|
13
|
+
*
|
|
14
|
+
* Identifiers beginning with `_` are treated as construction helpers (e.g.
|
|
15
|
+
* instantiation-expression aliases) and skipped.
|
|
16
|
+
*
|
|
17
|
+
* All probes files share one TS program, so types imported by multiple
|
|
18
|
+
* files are parsed and checked only once.
|
|
19
|
+
*
|
|
20
|
+
* Every probe declaration must have a JSDoc above it describing the
|
|
21
|
+
* user-facing situation it captures; a missing JSDoc throws.
|
|
22
|
+
*/
|
|
23
|
+
export declare function renderQuickInfoProbes(opts: RenderQuickInfoProbesOptions): Record<string, string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAyBA,iBAAiB,6BAA6B;;CAE5C;;CAEA;AACD;;;;;;;;;;;;;;;;;AAkBD,OAAO,iBAAS,sBACdA,MAAM,+BACL","names":["opts: RenderQuickInfoProbesOptions"],"sources":["../../../src/__quickinfo_snapshot__/probeUtils.ts"],"version":3,"file":"probeUtils.d.ts"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"","names":[],"sources":["../../../../src/__quickinfo_snapshot__/probes/actions.ts"],"version":3,"file":"actions.d.ts"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"","names":[],"sources":["../../../../src/__quickinfo_snapshot__/probes/aggregationsResults.ts"],"version":3,"file":"aggregationsResults.d.ts"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"","names":[],"sources":["../../../../src/__quickinfo_snapshot__/probes/derivedPropertyBuilder.ts"],"version":3,"file":"derivedPropertyBuilder.d.ts"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"","names":[],"sources":["../../../../src/__quickinfo_snapshot__/probes/objectSet.ts"],"version":3,"file":"objectSet.d.ts"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"","names":[],"sources":["../../../../src/__quickinfo_snapshot__/probes/osdkInstance.ts"],"version":3,"file":"osdkInstance.d.ts"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"","names":[],"sources":["../../../../src/__quickinfo_snapshot__/probes/queries.ts"],"version":3,"file":"queries.d.ts"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"","names":[],"sources":["../../../../src/__quickinfo_snapshot__/probes/subscribe.ts"],"version":3,"file":"subscribe.d.ts"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"","names":[],"sources":["../../../../src/__quickinfo_snapshot__/probes/whereClauseFilters.ts"],"version":3,"file":"whereClauseFilters.d.ts"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@osdk/api",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.23.0-main-9fb5afb7955ddffd2b9a89d03d6c2ca3528e371c",
|
|
4
4
|
"description": "",
|
|
5
5
|
"access": "public",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
"@microsoft/api-extractor": "^7.52.11",
|
|
58
58
|
"ts-expect": "^1.3.0",
|
|
59
59
|
"typescript": "~5.5.4",
|
|
60
|
-
"@osdk/monorepo.
|
|
61
|
-
"@osdk/monorepo.
|
|
60
|
+
"@osdk/monorepo.api-extractor": "~0.7.0",
|
|
61
|
+
"@osdk/monorepo.tsconfig": "~0.7.0"
|
|
62
62
|
},
|
|
63
63
|
"publishConfig": {
|
|
64
64
|
"access": "public"
|
|
@@ -91,6 +91,7 @@
|
|
|
91
91
|
"transpileCjs": "monorepo.tool.transpile -f cjs -m bundle -t node",
|
|
92
92
|
"transpileEsm": "monorepo.tool.transpile -f esm -m normal -t node",
|
|
93
93
|
"transpileTypes": "monorepo.tool.transpile -f esm -m types -t node",
|
|
94
|
-
"typecheck": "tsc --noEmit --emitDeclarationOnly false"
|
|
94
|
+
"typecheck": "tsc --noEmit --emitDeclarationOnly false",
|
|
95
|
+
"updateSnapshots": "vitest run --pool=forks -u"
|
|
95
96
|
}
|
|
96
97
|
}
|