@osdk/foundry.sqlqueries 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,59 @@
1
+ import type * as _Datasets from "@osdk/foundry.datasets";
2
+ export type LooselyBrandedString<T extends string> = string & {
3
+ __LOOSE_BRAND?: T;
4
+ };
5
+ /**
6
+ * Log Safety: SAFE
7
+ */
8
+ export interface CanceledQueryStatus {
9
+ }
10
+ /**
11
+ * Log Safety: UNSAFE
12
+ */
13
+ export interface ExecuteQueryRequest {
14
+ query: string;
15
+ fallbackBranchIds?: Array<_Datasets.BranchName>;
16
+ }
17
+ /**
18
+ * Log Safety: UNSAFE
19
+ */
20
+ export interface FailedQueryStatus {
21
+ errorMessage: string;
22
+ }
23
+ /**
24
+ * Log Safety: UNSAFE
25
+ */
26
+ export interface Query {
27
+ id: QueryId;
28
+ }
29
+ /**
30
+ * The identifier of a Query.
31
+ *
32
+ * Log Safety: UNSAFE
33
+ */
34
+ export type QueryId = LooselyBrandedString<"QueryId">;
35
+ /**
36
+ * Log Safety: UNSAFE
37
+ */
38
+ export type QueryStatus = ({
39
+ type: "running";
40
+ } & RunningQueryStatus) | ({
41
+ type: "canceled";
42
+ } & CanceledQueryStatus) | ({
43
+ type: "failed";
44
+ } & FailedQueryStatus) | ({
45
+ type: "succeeded";
46
+ } & SucceededQueryStatus);
47
+ /**
48
+ * Log Safety: UNSAFE
49
+ */
50
+ export interface RunningQueryStatus {
51
+ queryId: QueryId;
52
+ }
53
+ /**
54
+ * Log Safety: UNSAFE
55
+ */
56
+ export interface SucceededQueryStatus {
57
+ queryId: QueryId;
58
+ }
59
+ //# sourceMappingURL=_components.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_components.d.ts","sourceRoot":"","sources":["../../src/_components.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,KAAK,SAAS,MAAM,wBAAwB,CAAC;AAEzD,MAAM,MAAM,oBAAoB,CAAC,CAAC,SAAS,MAAM,IAAI,MAAM,GAAG;IAC5D,aAAa,CAAC,EAAE,CAAC,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,mBAAmB;CAAG;AAEvC;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,iBAAiB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;CACjD;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,KAAK;IACpB,EAAE,EAAE,OAAO,CAAC;CACb;AAED;;;;GAIG;AACH,MAAM,MAAM,OAAO,GAAG,oBAAoB,CAAC,SAAS,CAAC,CAAC;AAEtD;;GAEG;AACH,MAAM,MAAM,WAAW,GACnB,CAAC;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,GAAG,kBAAkB,CAAC,GAC1C,CAAC;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,GAAG,mBAAmB,CAAC,GAC5C,CAAC;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,GAAG,iBAAiB,CAAC,GACxC,CAAC;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,GAAG,oBAAoB,CAAC,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,OAAO,CAAC;CAClB"}
@@ -0,0 +1,17 @@
1
+ /*
2
+ * Copyright 2024 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export {};
17
+ //# sourceMappingURL=_components.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_components.js","names":[],"sources":["_components.js"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport {};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
@@ -0,0 +1,133 @@
1
+ export type LooselyBrandedString<T extends string> = string & {
2
+ __LOOSE_BRAND?: T;
3
+ };
4
+ /**
5
+ * Could not cancel the Query.
6
+ *
7
+ * Log Safety: UNSAFE
8
+ */
9
+ export interface CancelQueryPermissionDenied {
10
+ errorCode: "PERMISSION_DENIED";
11
+ errorName: "CancelQueryPermissionDenied";
12
+ errorInstanceId: string;
13
+ parameters: {
14
+ queryId: unknown;
15
+ };
16
+ }
17
+ /**
18
+ * Could not execute the Query.
19
+ *
20
+ * Log Safety: SAFE
21
+ */
22
+ export interface ExecuteQueryPermissionDenied {
23
+ errorCode: "PERMISSION_DENIED";
24
+ errorName: "ExecuteQueryPermissionDenied";
25
+ errorInstanceId: string;
26
+ parameters: {};
27
+ }
28
+ /**
29
+ * Could not getResults the Query.
30
+ *
31
+ * Log Safety: UNSAFE
32
+ */
33
+ export interface GetResultsPermissionDenied {
34
+ errorCode: "PERMISSION_DENIED";
35
+ errorName: "GetResultsPermissionDenied";
36
+ errorInstanceId: string;
37
+ parameters: {
38
+ queryId: unknown;
39
+ };
40
+ }
41
+ /**
42
+ * Could not getStatus the Query.
43
+ *
44
+ * Log Safety: UNSAFE
45
+ */
46
+ export interface GetStatusPermissionDenied {
47
+ errorCode: "PERMISSION_DENIED";
48
+ errorName: "GetStatusPermissionDenied";
49
+ errorInstanceId: string;
50
+ parameters: {
51
+ queryId: unknown;
52
+ };
53
+ }
54
+ /**
55
+ * The query was canceled.
56
+ *
57
+ * Log Safety: UNSAFE
58
+ */
59
+ export interface QueryCanceled {
60
+ errorCode: "INVALID_ARGUMENT";
61
+ errorName: "QueryCanceled";
62
+ errorInstanceId: string;
63
+ parameters: {
64
+ queryId: unknown;
65
+ };
66
+ }
67
+ /**
68
+ * The query failed.
69
+ *
70
+ * Log Safety: UNSAFE
71
+ */
72
+ export interface QueryFailed {
73
+ errorCode: "INTERNAL";
74
+ errorName: "QueryFailed";
75
+ errorInstanceId: string;
76
+ parameters: {
77
+ queryId: unknown;
78
+ errorMessage: unknown;
79
+ };
80
+ }
81
+ /**
82
+ * The query cannot be parsed.
83
+ *
84
+ * Log Safety: UNSAFE
85
+ */
86
+ export interface QueryParseError {
87
+ errorCode: "INVALID_ARGUMENT";
88
+ errorName: "QueryParseError";
89
+ errorInstanceId: string;
90
+ parameters: {
91
+ errorMessage: unknown;
92
+ };
93
+ }
94
+ /**
95
+ * The provided token does not have permission to access the given query.
96
+ *
97
+ * Log Safety: UNSAFE
98
+ */
99
+ export interface QueryPermissionDenied {
100
+ errorCode: "PERMISSION_DENIED";
101
+ errorName: "QueryPermissionDenied";
102
+ errorInstanceId: string;
103
+ parameters: {
104
+ queryId: unknown;
105
+ };
106
+ }
107
+ /**
108
+ * The query is running.
109
+ *
110
+ * Log Safety: UNSAFE
111
+ */
112
+ export interface QueryRunning {
113
+ errorCode: "INVALID_ARGUMENT";
114
+ errorName: "QueryRunning";
115
+ errorInstanceId: string;
116
+ parameters: {
117
+ queryId: unknown;
118
+ };
119
+ }
120
+ /**
121
+ * The provided token does not have permission to access the inputs to the query.
122
+ *
123
+ * Log Safety: SAFE
124
+ */
125
+ export interface ReadQueryInputsPermissionDenied {
126
+ errorCode: "PERMISSION_DENIED";
127
+ errorName: "ReadQueryInputsPermissionDenied";
128
+ errorInstanceId: string;
129
+ parameters: {
130
+ rids: unknown;
131
+ };
132
+ }
133
+ //# sourceMappingURL=_errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_errors.d.ts","sourceRoot":"","sources":["../../src/_errors.ts"],"names":[],"mappings":"AAgBA,MAAM,MAAM,oBAAoB,CAAC,CAAC,SAAS,MAAM,IAAI,MAAM,GAAG;IAC5D,aAAa,CAAC,EAAE,CAAC,CAAC;CACnB,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,2BAA2B;IAC1C,SAAS,EAAE,mBAAmB,CAAC;IAC/B,SAAS,EAAE,6BAA6B,CAAC;IACzC,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE;QACV,OAAO,EAAE,OAAO,CAAC;KAClB,CAAC;CACH;AAED;;;;GAIG;AACH,MAAM,WAAW,4BAA4B;IAC3C,SAAS,EAAE,mBAAmB,CAAC;IAC/B,SAAS,EAAE,8BAA8B,CAAC;IAC1C,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,EAAE,CAAC;CAChB;AAED;;;;GAIG;AACH,MAAM,WAAW,0BAA0B;IACzC,SAAS,EAAE,mBAAmB,CAAC;IAC/B,SAAS,EAAE,4BAA4B,CAAC;IACxC,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE;QACV,OAAO,EAAE,OAAO,CAAC;KAClB,CAAC;CACH;AAED;;;;GAIG;AACH,MAAM,WAAW,yBAAyB;IACxC,SAAS,EAAE,mBAAmB,CAAC;IAC/B,SAAS,EAAE,2BAA2B,CAAC;IACvC,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE;QACV,OAAO,EAAE,OAAO,CAAC;KAClB,CAAC;CACH;AAED;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,kBAAkB,CAAC;IAC9B,SAAS,EAAE,eAAe,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE;QACV,OAAO,EAAE,OAAO,CAAC;KAClB,CAAC;CACH;AAED;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,UAAU,CAAC;IACtB,SAAS,EAAE,aAAa,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE;QACV,OAAO,EAAE,OAAO,CAAC;QACjB,YAAY,EAAE,OAAO,CAAC;KACvB,CAAC;CACH;AAED;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,kBAAkB,CAAC;IAC9B,SAAS,EAAE,iBAAiB,CAAC;IAC7B,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE;QACV,YAAY,EAAE,OAAO,CAAC;KACvB,CAAC;CACH;AAED;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,mBAAmB,CAAC;IAC/B,SAAS,EAAE,uBAAuB,CAAC;IACnC,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE;QACV,OAAO,EAAE,OAAO,CAAC;KAClB,CAAC;CACH;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,kBAAkB,CAAC;IAC9B,SAAS,EAAE,cAAc,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE;QACV,OAAO,EAAE,OAAO,CAAC;KAClB,CAAC;CACH;AAED;;;;GAIG;AACH,MAAM,WAAW,+BAA+B;IAC9C,SAAS,EAAE,mBAAmB,CAAC;IAC/B,SAAS,EAAE,iCAAiC,CAAC;IAC7C,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE;QACV,IAAI,EAAE,OAAO,CAAC;KACf,CAAC;CACH"}
@@ -0,0 +1,17 @@
1
+ /*
2
+ * Copyright 2024 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export {};
17
+ //# sourceMappingURL=_errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_errors.js","names":[],"sources":["_errors.js"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport {};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ export type { CanceledQueryStatus, ExecuteQueryRequest, FailedQueryStatus, Query, QueryId, QueryStatus, RunningQueryStatus, SucceededQueryStatus, } from "./_components.js";
2
+ export type { CancelQueryPermissionDenied, ExecuteQueryPermissionDenied, GetResultsPermissionDenied, GetStatusPermissionDenied, QueryCanceled, QueryFailed, QueryParseError, QueryPermissionDenied, QueryRunning, ReadQueryInputsPermissionDenied, } from "./_errors.js";
3
+ export * as Queries from "./public/Query.js";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAgBA,YAAY,EACV,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,KAAK,EACL,OAAO,EACP,WAAW,EACX,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,2BAA2B,EAC3B,4BAA4B,EAC5B,0BAA0B,EAC1B,yBAAyB,EACzB,aAAa,EACb,WAAW,EACX,eAAe,EACf,qBAAqB,EACrB,YAAY,EACZ,+BAA+B,GAChC,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,17 @@
1
+ /*
2
+ * Copyright 2024 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export * as Queries from "./public/Query.js";
17
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["Queries"],"sources":["index.js"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport * as Queries from \"./public/Query.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,KAAKA,OAAO,MAAM,mBAAmB","ignoreList":[]}
@@ -0,0 +1,62 @@
1
+ import type * as _Core from "@osdk/foundry.core";
2
+ import type { SharedClient as $OldClient, SharedClientContext as $OldClientContext } from "@osdk/shared.client";
3
+ import type { SharedClient as $Client, SharedClientContext as $ClientContext } from "@osdk/shared.client2";
4
+ import type * as _SqlQueries from "../_components.js";
5
+ /**
6
+ * Executes a new query. Only the user that invoked the query can operate on the query.
7
+ *
8
+ * @alpha
9
+ *
10
+ * Required Scopes: [api:sql-queries-execute]
11
+ * URL: /v2/sqlQueries/queries/execute
12
+ */
13
+ export declare function execute($ctx: $Client | $ClientContext | $OldClient | $OldClientContext, ...args: [
14
+ $body: _SqlQueries.ExecuteQueryRequest,
15
+ $queryParams?: {
16
+ preview?: _Core.PreviewMode | undefined;
17
+ }
18
+ ]): Promise<_SqlQueries.QueryStatus>;
19
+ /**
20
+ * Gets the status of a query.
21
+ *
22
+ * @alpha
23
+ *
24
+ * Required Scopes: [api:sql-queries-read]
25
+ * URL: /v2/sqlQueries/queries/{queryId}/getStatus
26
+ */
27
+ export declare function getStatus($ctx: $Client | $ClientContext | $OldClient | $OldClientContext, ...args: [
28
+ queryId: _SqlQueries.QueryId,
29
+ $queryParams?: {
30
+ preview?: _Core.PreviewMode | undefined;
31
+ }
32
+ ]): Promise<_SqlQueries.QueryStatus>;
33
+ /**
34
+ * Cancels a query. If the query is no longer running this is effectively a no-op.
35
+ *
36
+ * @alpha
37
+ *
38
+ * Required Scopes: [api:sql-queries-execute]
39
+ * URL: /v2/sqlQueries/queries/{queryId}/cancel
40
+ */
41
+ export declare function cancel($ctx: $Client | $ClientContext | $OldClient | $OldClientContext, ...args: [
42
+ queryId: _SqlQueries.QueryId,
43
+ $queryParams?: {
44
+ preview?: _Core.PreviewMode | undefined;
45
+ }
46
+ ]): Promise<void>;
47
+ /**
48
+ * Gets the results of a query. This endpoint implements long polling and requests will time out after
49
+ * one minute.
50
+ *
51
+ * @alpha
52
+ *
53
+ * Required Scopes: [api:sql-queries-read]
54
+ * URL: /v2/sqlQueries/queries/{queryId}/getResults
55
+ */
56
+ export declare function getResults($ctx: $Client | $ClientContext | $OldClient | $OldClientContext, ...args: [
57
+ queryId: _SqlQueries.QueryId,
58
+ $queryParams?: {
59
+ preview?: _Core.PreviewMode | undefined;
60
+ }
61
+ ]): Promise<Response>;
62
+ //# sourceMappingURL=Query.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Query.d.ts","sourceRoot":"","sources":["../../../src/public/Query.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,KAAK,KAAK,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EACV,YAAY,IAAI,UAAU,EAC1B,mBAAmB,IAAI,iBAAiB,EACzC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EACV,YAAY,IAAI,OAAO,EACvB,mBAAmB,IAAI,cAAc,EACtC,MAAM,sBAAsB,CAAC;AAG9B,OAAO,KAAK,KAAK,WAAW,MAAM,mBAAmB,CAAC;AAWtD;;;;;;;GAOG;AACH,wBAAgB,OAAO,CACrB,IAAI,EAAE,OAAO,GAAG,cAAc,GAAG,UAAU,GAAG,iBAAiB,EAC/D,GAAG,IAAI,EAAE;IACP,KAAK,EAAE,WAAW,CAAC,mBAAmB;IACtC,YAAY,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,KAAK,CAAC,WAAW,GAAG,SAAS,CAAA;KAAE;CAC3D,GACA,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,CAElC;AASD;;;;;;;GAOG;AACH,wBAAgB,SAAS,CACvB,IAAI,EAAE,OAAO,GAAG,cAAc,GAAG,UAAU,GAAG,iBAAiB,EAC/D,GAAG,IAAI,EAAE;IACP,OAAO,EAAE,WAAW,CAAC,OAAO;IAE5B,YAAY,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,KAAK,CAAC,WAAW,GAAG,SAAS,CAAA;KAAE;CAC3D,GACA,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,CAElC;AASD;;;;;;;GAOG;AACH,wBAAgB,MAAM,CACpB,IAAI,EAAE,OAAO,GAAG,cAAc,GAAG,UAAU,GAAG,iBAAiB,EAC/D,GAAG,IAAI,EAAE;IACP,OAAO,EAAE,WAAW,CAAC,OAAO;IAE5B,YAAY,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,KAAK,CAAC,WAAW,GAAG,SAAS,CAAA;KAAE;CAC3D,GACA,OAAO,CAAC,IAAI,CAAC,CAEf;AAeD;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CACxB,IAAI,EAAE,OAAO,GAAG,cAAc,GAAG,UAAU,GAAG,iBAAiB,EAC/D,GAAG,IAAI,EAAE;IACP,OAAO,EAAE,WAAW,CAAC,OAAO;IAE5B,YAAY,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,KAAK,CAAC,WAAW,GAAG,SAAS,CAAA;KAAE;CAC3D,GACA,OAAO,CAAC,QAAQ,CAAC,CAEnB"}
@@ -0,0 +1,67 @@
1
+ /*
2
+ * Copyright 2024 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { foundryPlatformFetch as $foundryPlatformFetch } from "@osdk/shared.net.platformapi";
17
+ //
18
+ const _execute = [1, "/v2/sqlQueries/queries/execute", 3];
19
+ /**
20
+ * Executes a new query. Only the user that invoked the query can operate on the query.
21
+ *
22
+ * @alpha
23
+ *
24
+ * Required Scopes: [api:sql-queries-execute]
25
+ * URL: /v2/sqlQueries/queries/execute
26
+ */
27
+ export function execute($ctx, ...args) {
28
+ return $foundryPlatformFetch($ctx, _execute, ...args);
29
+ }
30
+ const _getStatus = [0, "/v2/sqlQueries/queries/{0}/getStatus", 2];
31
+ /**
32
+ * Gets the status of a query.
33
+ *
34
+ * @alpha
35
+ *
36
+ * Required Scopes: [api:sql-queries-read]
37
+ * URL: /v2/sqlQueries/queries/{queryId}/getStatus
38
+ */
39
+ export function getStatus($ctx, ...args) {
40
+ return $foundryPlatformFetch($ctx, _getStatus, ...args);
41
+ }
42
+ const _cancel = [1, "/v2/sqlQueries/queries/{0}/cancel", 2];
43
+ /**
44
+ * Cancels a query. If the query is no longer running this is effectively a no-op.
45
+ *
46
+ * @alpha
47
+ *
48
+ * Required Scopes: [api:sql-queries-execute]
49
+ * URL: /v2/sqlQueries/queries/{queryId}/cancel
50
+ */
51
+ export function cancel($ctx, ...args) {
52
+ return $foundryPlatformFetch($ctx, _cancel, ...args);
53
+ }
54
+ const _getResults = [0, "/v2/sqlQueries/queries/{0}/getResults", 2,, "application/octet-stream"];
55
+ /**
56
+ * Gets the results of a query. This endpoint implements long polling and requests will time out after
57
+ * one minute.
58
+ *
59
+ * @alpha
60
+ *
61
+ * Required Scopes: [api:sql-queries-read]
62
+ * URL: /v2/sqlQueries/queries/{queryId}/getResults
63
+ */
64
+ export function getResults($ctx, ...args) {
65
+ return $foundryPlatformFetch($ctx, _getResults, ...args);
66
+ }
67
+ //# sourceMappingURL=Query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Query.js","names":["foundryPlatformFetch","$foundryPlatformFetch","_execute","execute","$ctx","args","_getStatus","getStatus","_cancel","cancel","_getResults","getResults"],"sources":["Query.js"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _execute = [1, \"/v2/sqlQueries/queries/execute\", 3];\n/**\n * Executes a new query. Only the user that invoked the query can operate on the query.\n *\n * @alpha\n *\n * Required Scopes: [api:sql-queries-execute]\n * URL: /v2/sqlQueries/queries/execute\n */\nexport function execute($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _execute, ...args);\n}\nconst _getStatus = [0, \"/v2/sqlQueries/queries/{0}/getStatus\", 2];\n/**\n * Gets the status of a query.\n *\n * @alpha\n *\n * Required Scopes: [api:sql-queries-read]\n * URL: /v2/sqlQueries/queries/{queryId}/getStatus\n */\nexport function getStatus($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getStatus, ...args);\n}\nconst _cancel = [1, \"/v2/sqlQueries/queries/{0}/cancel\", 2];\n/**\n * Cancels a query. If the query is no longer running this is effectively a no-op.\n *\n * @alpha\n *\n * Required Scopes: [api:sql-queries-execute]\n * URL: /v2/sqlQueries/queries/{queryId}/cancel\n */\nexport function cancel($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _cancel, ...args);\n}\nconst _getResults = [\n 0,\n \"/v2/sqlQueries/queries/{0}/getResults\",\n 2,\n ,\n \"application/octet-stream\",\n];\n/**\n * Gets the results of a query. This endpoint implements long polling and requests will time out after\n * one minute.\n *\n * @alpha\n *\n * Required Scopes: [api:sql-queries-read]\n * URL: /v2/sqlQueries/queries/{queryId}/getResults\n */\nexport function getResults($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getResults, ...args);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,oBAAoB,IAAIC,qBAAqB,QAAQ,8BAA8B;AAC5F;AACA,MAAMC,QAAQ,GAAG,CAAC,CAAC,EAAE,gCAAgC,EAAE,CAAC,CAAC;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,OAAOA,CAACC,IAAI,EAAE,GAAGC,IAAI,EAAE;EACnC,OAAOJ,qBAAqB,CAACG,IAAI,EAAEF,QAAQ,EAAE,GAAGG,IAAI,CAAC;AACzD;AACA,MAAMC,UAAU,GAAG,CAAC,CAAC,EAAE,sCAAsC,EAAE,CAAC,CAAC;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,SAASA,CAACH,IAAI,EAAE,GAAGC,IAAI,EAAE;EACrC,OAAOJ,qBAAqB,CAACG,IAAI,EAAEE,UAAU,EAAE,GAAGD,IAAI,CAAC;AAC3D;AACA,MAAMG,OAAO,GAAG,CAAC,CAAC,EAAE,mCAAmC,EAAE,CAAC,CAAC;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,MAAMA,CAACL,IAAI,EAAE,GAAGC,IAAI,EAAE;EAClC,OAAOJ,qBAAqB,CAACG,IAAI,EAAEI,OAAO,EAAE,GAAGH,IAAI,CAAC;AACxD;AACA,MAAMK,WAAW,GAAG,CAChB,CAAC,EACD,uCAAuC,EACvC,CAAC,GAED,0BAA0B,CAC7B;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,UAAUA,CAACP,IAAI,EAAE,GAAGC,IAAI,EAAE;EACtC,OAAOJ,qBAAqB,CAACG,IAAI,EAAEM,WAAW,EAAE,GAAGL,IAAI,CAAC;AAC5D","ignoreList":[]}
@@ -0,0 +1,59 @@
1
+ import type * as _Datasets from "@osdk/foundry.datasets";
2
+ export type LooselyBrandedString<T extends string> = string & {
3
+ __LOOSE_BRAND?: T;
4
+ };
5
+ /**
6
+ * Log Safety: SAFE
7
+ */
8
+ export interface CanceledQueryStatus {
9
+ }
10
+ /**
11
+ * Log Safety: UNSAFE
12
+ */
13
+ export interface ExecuteQueryRequest {
14
+ query: string;
15
+ fallbackBranchIds?: Array<_Datasets.BranchName>;
16
+ }
17
+ /**
18
+ * Log Safety: UNSAFE
19
+ */
20
+ export interface FailedQueryStatus {
21
+ errorMessage: string;
22
+ }
23
+ /**
24
+ * Log Safety: UNSAFE
25
+ */
26
+ export interface Query {
27
+ id: QueryId;
28
+ }
29
+ /**
30
+ * The identifier of a Query.
31
+ *
32
+ * Log Safety: UNSAFE
33
+ */
34
+ export type QueryId = LooselyBrandedString<"QueryId">;
35
+ /**
36
+ * Log Safety: UNSAFE
37
+ */
38
+ export type QueryStatus = ({
39
+ type: "running";
40
+ } & RunningQueryStatus) | ({
41
+ type: "canceled";
42
+ } & CanceledQueryStatus) | ({
43
+ type: "failed";
44
+ } & FailedQueryStatus) | ({
45
+ type: "succeeded";
46
+ } & SucceededQueryStatus);
47
+ /**
48
+ * Log Safety: UNSAFE
49
+ */
50
+ export interface RunningQueryStatus {
51
+ queryId: QueryId;
52
+ }
53
+ /**
54
+ * Log Safety: UNSAFE
55
+ */
56
+ export interface SucceededQueryStatus {
57
+ queryId: QueryId;
58
+ }
59
+ //# sourceMappingURL=_components.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_components.d.ts","sourceRoot":"","sources":["../../src/_components.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,KAAK,SAAS,MAAM,wBAAwB,CAAC;AAEzD,MAAM,MAAM,oBAAoB,CAAC,CAAC,SAAS,MAAM,IAAI,MAAM,GAAG;IAC5D,aAAa,CAAC,EAAE,CAAC,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,mBAAmB;CAAG;AAEvC;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,iBAAiB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;CACjD;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,KAAK;IACpB,EAAE,EAAE,OAAO,CAAC;CACb;AAED;;;;GAIG;AACH,MAAM,MAAM,OAAO,GAAG,oBAAoB,CAAC,SAAS,CAAC,CAAC;AAEtD;;GAEG;AACH,MAAM,MAAM,WAAW,GACnB,CAAC;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,GAAG,kBAAkB,CAAC,GAC1C,CAAC;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,GAAG,mBAAmB,CAAC,GAC5C,CAAC;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,GAAG,iBAAiB,CAAC,GACxC,CAAC;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,GAAG,oBAAoB,CAAC,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,OAAO,CAAC;CAClB"}
@@ -0,0 +1,17 @@
1
+ /*
2
+ * Copyright 2024 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export {};
17
+ //# sourceMappingURL=_components.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_components.js","names":[],"sources":["_components.js"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport {};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
@@ -0,0 +1,133 @@
1
+ export type LooselyBrandedString<T extends string> = string & {
2
+ __LOOSE_BRAND?: T;
3
+ };
4
+ /**
5
+ * Could not cancel the Query.
6
+ *
7
+ * Log Safety: UNSAFE
8
+ */
9
+ export interface CancelQueryPermissionDenied {
10
+ errorCode: "PERMISSION_DENIED";
11
+ errorName: "CancelQueryPermissionDenied";
12
+ errorInstanceId: string;
13
+ parameters: {
14
+ queryId: unknown;
15
+ };
16
+ }
17
+ /**
18
+ * Could not execute the Query.
19
+ *
20
+ * Log Safety: SAFE
21
+ */
22
+ export interface ExecuteQueryPermissionDenied {
23
+ errorCode: "PERMISSION_DENIED";
24
+ errorName: "ExecuteQueryPermissionDenied";
25
+ errorInstanceId: string;
26
+ parameters: {};
27
+ }
28
+ /**
29
+ * Could not getResults the Query.
30
+ *
31
+ * Log Safety: UNSAFE
32
+ */
33
+ export interface GetResultsPermissionDenied {
34
+ errorCode: "PERMISSION_DENIED";
35
+ errorName: "GetResultsPermissionDenied";
36
+ errorInstanceId: string;
37
+ parameters: {
38
+ queryId: unknown;
39
+ };
40
+ }
41
+ /**
42
+ * Could not getStatus the Query.
43
+ *
44
+ * Log Safety: UNSAFE
45
+ */
46
+ export interface GetStatusPermissionDenied {
47
+ errorCode: "PERMISSION_DENIED";
48
+ errorName: "GetStatusPermissionDenied";
49
+ errorInstanceId: string;
50
+ parameters: {
51
+ queryId: unknown;
52
+ };
53
+ }
54
+ /**
55
+ * The query was canceled.
56
+ *
57
+ * Log Safety: UNSAFE
58
+ */
59
+ export interface QueryCanceled {
60
+ errorCode: "INVALID_ARGUMENT";
61
+ errorName: "QueryCanceled";
62
+ errorInstanceId: string;
63
+ parameters: {
64
+ queryId: unknown;
65
+ };
66
+ }
67
+ /**
68
+ * The query failed.
69
+ *
70
+ * Log Safety: UNSAFE
71
+ */
72
+ export interface QueryFailed {
73
+ errorCode: "INTERNAL";
74
+ errorName: "QueryFailed";
75
+ errorInstanceId: string;
76
+ parameters: {
77
+ queryId: unknown;
78
+ errorMessage: unknown;
79
+ };
80
+ }
81
+ /**
82
+ * The query cannot be parsed.
83
+ *
84
+ * Log Safety: UNSAFE
85
+ */
86
+ export interface QueryParseError {
87
+ errorCode: "INVALID_ARGUMENT";
88
+ errorName: "QueryParseError";
89
+ errorInstanceId: string;
90
+ parameters: {
91
+ errorMessage: unknown;
92
+ };
93
+ }
94
+ /**
95
+ * The provided token does not have permission to access the given query.
96
+ *
97
+ * Log Safety: UNSAFE
98
+ */
99
+ export interface QueryPermissionDenied {
100
+ errorCode: "PERMISSION_DENIED";
101
+ errorName: "QueryPermissionDenied";
102
+ errorInstanceId: string;
103
+ parameters: {
104
+ queryId: unknown;
105
+ };
106
+ }
107
+ /**
108
+ * The query is running.
109
+ *
110
+ * Log Safety: UNSAFE
111
+ */
112
+ export interface QueryRunning {
113
+ errorCode: "INVALID_ARGUMENT";
114
+ errorName: "QueryRunning";
115
+ errorInstanceId: string;
116
+ parameters: {
117
+ queryId: unknown;
118
+ };
119
+ }
120
+ /**
121
+ * The provided token does not have permission to access the inputs to the query.
122
+ *
123
+ * Log Safety: SAFE
124
+ */
125
+ export interface ReadQueryInputsPermissionDenied {
126
+ errorCode: "PERMISSION_DENIED";
127
+ errorName: "ReadQueryInputsPermissionDenied";
128
+ errorInstanceId: string;
129
+ parameters: {
130
+ rids: unknown;
131
+ };
132
+ }
133
+ //# sourceMappingURL=_errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_errors.d.ts","sourceRoot":"","sources":["../../src/_errors.ts"],"names":[],"mappings":"AAgBA,MAAM,MAAM,oBAAoB,CAAC,CAAC,SAAS,MAAM,IAAI,MAAM,GAAG;IAC5D,aAAa,CAAC,EAAE,CAAC,CAAC;CACnB,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,2BAA2B;IAC1C,SAAS,EAAE,mBAAmB,CAAC;IAC/B,SAAS,EAAE,6BAA6B,CAAC;IACzC,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE;QACV,OAAO,EAAE,OAAO,CAAC;KAClB,CAAC;CACH;AAED;;;;GAIG;AACH,MAAM,WAAW,4BAA4B;IAC3C,SAAS,EAAE,mBAAmB,CAAC;IAC/B,SAAS,EAAE,8BAA8B,CAAC;IAC1C,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,EAAE,CAAC;CAChB;AAED;;;;GAIG;AACH,MAAM,WAAW,0BAA0B;IACzC,SAAS,EAAE,mBAAmB,CAAC;IAC/B,SAAS,EAAE,4BAA4B,CAAC;IACxC,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE;QACV,OAAO,EAAE,OAAO,CAAC;KAClB,CAAC;CACH;AAED;;;;GAIG;AACH,MAAM,WAAW,yBAAyB;IACxC,SAAS,EAAE,mBAAmB,CAAC;IAC/B,SAAS,EAAE,2BAA2B,CAAC;IACvC,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE;QACV,OAAO,EAAE,OAAO,CAAC;KAClB,CAAC;CACH;AAED;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,kBAAkB,CAAC;IAC9B,SAAS,EAAE,eAAe,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE;QACV,OAAO,EAAE,OAAO,CAAC;KAClB,CAAC;CACH;AAED;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,UAAU,CAAC;IACtB,SAAS,EAAE,aAAa,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE;QACV,OAAO,EAAE,OAAO,CAAC;QACjB,YAAY,EAAE,OAAO,CAAC;KACvB,CAAC;CACH;AAED;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,kBAAkB,CAAC;IAC9B,SAAS,EAAE,iBAAiB,CAAC;IAC7B,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE;QACV,YAAY,EAAE,OAAO,CAAC;KACvB,CAAC;CACH;AAED;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,mBAAmB,CAAC;IAC/B,SAAS,EAAE,uBAAuB,CAAC;IACnC,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE;QACV,OAAO,EAAE,OAAO,CAAC;KAClB,CAAC;CACH;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,kBAAkB,CAAC;IAC9B,SAAS,EAAE,cAAc,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE;QACV,OAAO,EAAE,OAAO,CAAC;KAClB,CAAC;CACH;AAED;;;;GAIG;AACH,MAAM,WAAW,+BAA+B;IAC9C,SAAS,EAAE,mBAAmB,CAAC;IAC/B,SAAS,EAAE,iCAAiC,CAAC;IAC7C,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE;QACV,IAAI,EAAE,OAAO,CAAC;KACf,CAAC;CACH"}
@@ -0,0 +1,17 @@
1
+ /*
2
+ * Copyright 2024 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export {};
17
+ //# sourceMappingURL=_errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_errors.js","names":[],"sources":["_errors.js"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport {};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ export type { CanceledQueryStatus, ExecuteQueryRequest, FailedQueryStatus, Query, QueryId, QueryStatus, RunningQueryStatus, SucceededQueryStatus, } from "./_components.js";
2
+ export type { CancelQueryPermissionDenied, ExecuteQueryPermissionDenied, GetResultsPermissionDenied, GetStatusPermissionDenied, QueryCanceled, QueryFailed, QueryParseError, QueryPermissionDenied, QueryRunning, ReadQueryInputsPermissionDenied, } from "./_errors.js";
3
+ export * as Queries from "./public/Query.js";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAgBA,YAAY,EACV,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,KAAK,EACL,OAAO,EACP,WAAW,EACX,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,2BAA2B,EAC3B,4BAA4B,EAC5B,0BAA0B,EAC1B,yBAAyB,EACzB,aAAa,EACb,WAAW,EACX,eAAe,EACf,qBAAqB,EACrB,YAAY,EACZ,+BAA+B,GAChC,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,17 @@
1
+ /*
2
+ * Copyright 2024 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export * as Queries from "./public/Query.js";
17
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["Queries"],"sources":["index.js"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport * as Queries from \"./public/Query.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,KAAKA,OAAO,MAAM,mBAAmB","ignoreList":[]}
@@ -0,0 +1,62 @@
1
+ import type * as _Core from "@osdk/foundry.core";
2
+ import type { SharedClient as $OldClient, SharedClientContext as $OldClientContext } from "@osdk/shared.client";
3
+ import type { SharedClient as $Client, SharedClientContext as $ClientContext } from "@osdk/shared.client2";
4
+ import type * as _SqlQueries from "../_components.js";
5
+ /**
6
+ * Executes a new query. Only the user that invoked the query can operate on the query.
7
+ *
8
+ * @alpha
9
+ *
10
+ * Required Scopes: [api:sql-queries-execute]
11
+ * URL: /v2/sqlQueries/queries/execute
12
+ */
13
+ export declare function execute($ctx: $Client | $ClientContext | $OldClient | $OldClientContext, ...args: [
14
+ $body: _SqlQueries.ExecuteQueryRequest,
15
+ $queryParams?: {
16
+ preview?: _Core.PreviewMode | undefined;
17
+ }
18
+ ]): Promise<_SqlQueries.QueryStatus>;
19
+ /**
20
+ * Gets the status of a query.
21
+ *
22
+ * @alpha
23
+ *
24
+ * Required Scopes: [api:sql-queries-read]
25
+ * URL: /v2/sqlQueries/queries/{queryId}/getStatus
26
+ */
27
+ export declare function getStatus($ctx: $Client | $ClientContext | $OldClient | $OldClientContext, ...args: [
28
+ queryId: _SqlQueries.QueryId,
29
+ $queryParams?: {
30
+ preview?: _Core.PreviewMode | undefined;
31
+ }
32
+ ]): Promise<_SqlQueries.QueryStatus>;
33
+ /**
34
+ * Cancels a query. If the query is no longer running this is effectively a no-op.
35
+ *
36
+ * @alpha
37
+ *
38
+ * Required Scopes: [api:sql-queries-execute]
39
+ * URL: /v2/sqlQueries/queries/{queryId}/cancel
40
+ */
41
+ export declare function cancel($ctx: $Client | $ClientContext | $OldClient | $OldClientContext, ...args: [
42
+ queryId: _SqlQueries.QueryId,
43
+ $queryParams?: {
44
+ preview?: _Core.PreviewMode | undefined;
45
+ }
46
+ ]): Promise<void>;
47
+ /**
48
+ * Gets the results of a query. This endpoint implements long polling and requests will time out after
49
+ * one minute.
50
+ *
51
+ * @alpha
52
+ *
53
+ * Required Scopes: [api:sql-queries-read]
54
+ * URL: /v2/sqlQueries/queries/{queryId}/getResults
55
+ */
56
+ export declare function getResults($ctx: $Client | $ClientContext | $OldClient | $OldClientContext, ...args: [
57
+ queryId: _SqlQueries.QueryId,
58
+ $queryParams?: {
59
+ preview?: _Core.PreviewMode | undefined;
60
+ }
61
+ ]): Promise<Response>;
62
+ //# sourceMappingURL=Query.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Query.d.ts","sourceRoot":"","sources":["../../../src/public/Query.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,KAAK,KAAK,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EACV,YAAY,IAAI,UAAU,EAC1B,mBAAmB,IAAI,iBAAiB,EACzC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EACV,YAAY,IAAI,OAAO,EACvB,mBAAmB,IAAI,cAAc,EACtC,MAAM,sBAAsB,CAAC;AAG9B,OAAO,KAAK,KAAK,WAAW,MAAM,mBAAmB,CAAC;AAWtD;;;;;;;GAOG;AACH,wBAAgB,OAAO,CACrB,IAAI,EAAE,OAAO,GAAG,cAAc,GAAG,UAAU,GAAG,iBAAiB,EAC/D,GAAG,IAAI,EAAE;IACP,KAAK,EAAE,WAAW,CAAC,mBAAmB;IACtC,YAAY,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,KAAK,CAAC,WAAW,GAAG,SAAS,CAAA;KAAE;CAC3D,GACA,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,CAElC;AASD;;;;;;;GAOG;AACH,wBAAgB,SAAS,CACvB,IAAI,EAAE,OAAO,GAAG,cAAc,GAAG,UAAU,GAAG,iBAAiB,EAC/D,GAAG,IAAI,EAAE;IACP,OAAO,EAAE,WAAW,CAAC,OAAO;IAE5B,YAAY,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,KAAK,CAAC,WAAW,GAAG,SAAS,CAAA;KAAE;CAC3D,GACA,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,CAElC;AASD;;;;;;;GAOG;AACH,wBAAgB,MAAM,CACpB,IAAI,EAAE,OAAO,GAAG,cAAc,GAAG,UAAU,GAAG,iBAAiB,EAC/D,GAAG,IAAI,EAAE;IACP,OAAO,EAAE,WAAW,CAAC,OAAO;IAE5B,YAAY,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,KAAK,CAAC,WAAW,GAAG,SAAS,CAAA;KAAE;CAC3D,GACA,OAAO,CAAC,IAAI,CAAC,CAEf;AAeD;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CACxB,IAAI,EAAE,OAAO,GAAG,cAAc,GAAG,UAAU,GAAG,iBAAiB,EAC/D,GAAG,IAAI,EAAE;IACP,OAAO,EAAE,WAAW,CAAC,OAAO;IAE5B,YAAY,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,KAAK,CAAC,WAAW,GAAG,SAAS,CAAA;KAAE;CAC3D,GACA,OAAO,CAAC,QAAQ,CAAC,CAEnB"}
@@ -0,0 +1,67 @@
1
+ /*
2
+ * Copyright 2024 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { foundryPlatformFetch as $foundryPlatformFetch } from "@osdk/shared.net.platformapi";
17
+ //
18
+ const _execute = [1, "/v2/sqlQueries/queries/execute", 3];
19
+ /**
20
+ * Executes a new query. Only the user that invoked the query can operate on the query.
21
+ *
22
+ * @alpha
23
+ *
24
+ * Required Scopes: [api:sql-queries-execute]
25
+ * URL: /v2/sqlQueries/queries/execute
26
+ */
27
+ export function execute($ctx, ...args) {
28
+ return $foundryPlatformFetch($ctx, _execute, ...args);
29
+ }
30
+ const _getStatus = [0, "/v2/sqlQueries/queries/{0}/getStatus", 2];
31
+ /**
32
+ * Gets the status of a query.
33
+ *
34
+ * @alpha
35
+ *
36
+ * Required Scopes: [api:sql-queries-read]
37
+ * URL: /v2/sqlQueries/queries/{queryId}/getStatus
38
+ */
39
+ export function getStatus($ctx, ...args) {
40
+ return $foundryPlatformFetch($ctx, _getStatus, ...args);
41
+ }
42
+ const _cancel = [1, "/v2/sqlQueries/queries/{0}/cancel", 2];
43
+ /**
44
+ * Cancels a query. If the query is no longer running this is effectively a no-op.
45
+ *
46
+ * @alpha
47
+ *
48
+ * Required Scopes: [api:sql-queries-execute]
49
+ * URL: /v2/sqlQueries/queries/{queryId}/cancel
50
+ */
51
+ export function cancel($ctx, ...args) {
52
+ return $foundryPlatformFetch($ctx, _cancel, ...args);
53
+ }
54
+ const _getResults = [0, "/v2/sqlQueries/queries/{0}/getResults", 2,, "application/octet-stream"];
55
+ /**
56
+ * Gets the results of a query. This endpoint implements long polling and requests will time out after
57
+ * one minute.
58
+ *
59
+ * @alpha
60
+ *
61
+ * Required Scopes: [api:sql-queries-read]
62
+ * URL: /v2/sqlQueries/queries/{queryId}/getResults
63
+ */
64
+ export function getResults($ctx, ...args) {
65
+ return $foundryPlatformFetch($ctx, _getResults, ...args);
66
+ }
67
+ //# sourceMappingURL=Query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Query.js","names":["foundryPlatformFetch","$foundryPlatformFetch","_execute","execute","$ctx","args","_getStatus","getStatus","_cancel","cancel","_getResults","getResults"],"sources":["Query.js"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _execute = [1, \"/v2/sqlQueries/queries/execute\", 3];\n/**\n * Executes a new query. Only the user that invoked the query can operate on the query.\n *\n * @alpha\n *\n * Required Scopes: [api:sql-queries-execute]\n * URL: /v2/sqlQueries/queries/execute\n */\nexport function execute($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _execute, ...args);\n}\nconst _getStatus = [0, \"/v2/sqlQueries/queries/{0}/getStatus\", 2];\n/**\n * Gets the status of a query.\n *\n * @alpha\n *\n * Required Scopes: [api:sql-queries-read]\n * URL: /v2/sqlQueries/queries/{queryId}/getStatus\n */\nexport function getStatus($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getStatus, ...args);\n}\nconst _cancel = [1, \"/v2/sqlQueries/queries/{0}/cancel\", 2];\n/**\n * Cancels a query. If the query is no longer running this is effectively a no-op.\n *\n * @alpha\n *\n * Required Scopes: [api:sql-queries-execute]\n * URL: /v2/sqlQueries/queries/{queryId}/cancel\n */\nexport function cancel($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _cancel, ...args);\n}\nconst _getResults = [\n 0,\n \"/v2/sqlQueries/queries/{0}/getResults\",\n 2,\n ,\n \"application/octet-stream\",\n];\n/**\n * Gets the results of a query. This endpoint implements long polling and requests will time out after\n * one minute.\n *\n * @alpha\n *\n * Required Scopes: [api:sql-queries-read]\n * URL: /v2/sqlQueries/queries/{queryId}/getResults\n */\nexport function getResults($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _getResults, ...args);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,oBAAoB,IAAIC,qBAAqB,QAAQ,8BAA8B;AAC5F;AACA,MAAMC,QAAQ,GAAG,CAAC,CAAC,EAAE,gCAAgC,EAAE,CAAC,CAAC;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,OAAOA,CAACC,IAAI,EAAE,GAAGC,IAAI,EAAE;EACnC,OAAOJ,qBAAqB,CAACG,IAAI,EAAEF,QAAQ,EAAE,GAAGG,IAAI,CAAC;AACzD;AACA,MAAMC,UAAU,GAAG,CAAC,CAAC,EAAE,sCAAsC,EAAE,CAAC,CAAC;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,SAASA,CAACH,IAAI,EAAE,GAAGC,IAAI,EAAE;EACrC,OAAOJ,qBAAqB,CAACG,IAAI,EAAEE,UAAU,EAAE,GAAGD,IAAI,CAAC;AAC3D;AACA,MAAMG,OAAO,GAAG,CAAC,CAAC,EAAE,mCAAmC,EAAE,CAAC,CAAC;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,MAAMA,CAACL,IAAI,EAAE,GAAGC,IAAI,EAAE;EAClC,OAAOJ,qBAAqB,CAACG,IAAI,EAAEI,OAAO,EAAE,GAAGH,IAAI,CAAC;AACxD;AACA,MAAMK,WAAW,GAAG,CAChB,CAAC,EACD,uCAAuC,EACvC,CAAC,GAED,0BAA0B,CAC7B;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,UAAUA,CAACP,IAAI,EAAE,GAAGC,IAAI,EAAE;EACtC,OAAOJ,qBAAqB,CAACG,IAAI,EAAEM,WAAW,EAAE,GAAGL,IAAI,CAAC;AAC5D","ignoreList":[]}
package/package.json ADDED
@@ -0,0 +1,64 @@
1
+ {
2
+ "name": "@osdk/foundry.sqlqueries",
3
+ "version": "0.0.0",
4
+ "license": "Apache-2.0",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/palantir/foundry-platform-typescript.git"
8
+ },
9
+ "exports": {
10
+ ".": {
11
+ "browser": "./build/browser/index.js",
12
+ "import": "./build/esm/index.js",
13
+ "default": "./build/esm/index.js"
14
+ },
15
+ "./*": {
16
+ "browser": "./build/browser/public/*.js",
17
+ "import": "./build/esm/public/*.js",
18
+ "default": "./build/esm/public/*.js"
19
+ }
20
+ },
21
+ "dependencies": {
22
+ "@osdk/shared.client": "^1.0.1",
23
+ "@osdk/shared.client2": "^1.0.0",
24
+ "@osdk/foundry.core": "2.14.0",
25
+ "@osdk/foundry.datasets": "2.14.0",
26
+ "@osdk/shared.net.platformapi": "~1.3.0"
27
+ },
28
+ "devDependencies": {
29
+ "typescript": "^5.5.4",
30
+ "@osdk/monorepo.tsconfig": "~0.0.0"
31
+ },
32
+ "publishConfig": {
33
+ "access": "public"
34
+ },
35
+ "files": [
36
+ "build/cjs",
37
+ "build/esm",
38
+ "build/browser",
39
+ "CHANGELOG.md",
40
+ "package.json",
41
+ "templates",
42
+ "*.d.ts"
43
+ ],
44
+ "module": "./build/esm/index.js",
45
+ "types": "./build/esm/index.d.ts",
46
+ "sls": {
47
+ "dependencies": {
48
+ "com.palantir.foundry.api:api-gateway": {
49
+ "minVersion": "1.1097.0",
50
+ "maxVersion": "1.x.x",
51
+ "optional": false
52
+ }
53
+ }
54
+ },
55
+ "type": "module",
56
+ "scripts": {
57
+ "check-attw": "monorepo.tool.attw esm",
58
+ "check-spelling": "cspell --quiet .",
59
+ "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo",
60
+ "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)",
61
+ "lint": "eslint . && dprint check --config $(find-up dprint.json)",
62
+ "transpile": "monorepo.tool.transpile"
63
+ }
64
+ }