@distilled.cloud/tinybird 0.0.0 → 1.0.0-rc.21
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/LICENSE +201 -0
- package/README.md +128 -4
- package/lib/.lazy.json +1 -0
- package/lib/_bundle/sdk.js +2 -0
- package/lib/_bundle/sdk.js.map +1 -0
- package/lib/credentials.d.ts +29 -0
- package/lib/credentials.d.ts.map +1 -0
- package/lib/credentials.js +1 -0
- package/lib/errors.d.ts +52 -0
- package/lib/errors.d.ts.map +1 -0
- package/lib/errors.js +1 -0
- package/lib/index.d.ts +48 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +5 -0
- package/lib/protocol.d.ts +19 -0
- package/lib/protocol.d.ts.map +1 -0
- package/lib/protocol.js +1 -0
- package/lib/retry.d.ts +50 -0
- package/lib/retry.d.ts.map +1 -0
- package/lib/retry.js +1 -0
- package/lib/services/analyze.d.ts +17 -0
- package/lib/services/analyze.d.ts.map +1 -0
- package/lib/services/analyze.js +2 -0
- package/lib/services/analyze.js.map +1 -0
- package/lib/services/api_endpoints.d.ts +26 -0
- package/lib/services/api_endpoints.d.ts.map +1 -0
- package/lib/services/api_endpoints.js +2 -0
- package/lib/services/api_endpoints.js.map +1 -0
- package/lib/services/copy_pipes.d.ts +102 -0
- package/lib/services/copy_pipes.d.ts.map +1 -0
- package/lib/services/copy_pipes.js +2 -0
- package/lib/services/copy_pipes.js.map +1 -0
- package/lib/services/datasource.d.ts +171 -0
- package/lib/services/datasource.d.ts.map +1 -0
- package/lib/services/datasource.js +2 -0
- package/lib/services/datasource.js.map +1 -0
- package/lib/services/environment_variables.d.ts +61 -0
- package/lib/services/environment_variables.d.ts.map +1 -0
- package/lib/services/environment_variables.js +2 -0
- package/lib/services/environment_variables.js.map +1 -0
- package/lib/services/events.d.ts +21 -0
- package/lib/services/events.d.ts.map +1 -0
- package/lib/services/events.js +2 -0
- package/lib/services/events.js.map +1 -0
- package/lib/services/index.d.ts +14 -0
- package/lib/services/index.d.ts.map +1 -0
- package/lib/services/index.js +13 -0
- package/lib/services/jobs.d.ts +45 -0
- package/lib/services/jobs.d.ts.map +1 -0
- package/lib/services/jobs.js +2 -0
- package/lib/services/jobs.js.map +1 -0
- package/lib/services/materialized_views.d.ts +64 -0
- package/lib/services/materialized_views.d.ts.map +1 -0
- package/lib/services/materialized_views.js +2 -0
- package/lib/services/materialized_views.js.map +1 -0
- package/lib/services/organizations.d.ts +214 -0
- package/lib/services/organizations.d.ts.map +1 -0
- package/lib/services/organizations.js +2 -0
- package/lib/services/organizations.js.map +1 -0
- package/lib/services/pipe.d.ts +243 -0
- package/lib/services/pipe.d.ts.map +1 -0
- package/lib/services/pipe.js +2 -0
- package/lib/services/pipe.js.map +1 -0
- package/lib/services/query.d.ts +50 -0
- package/lib/services/query.d.ts.map +1 -0
- package/lib/services/query.js +2 -0
- package/lib/services/query.js.map +1 -0
- package/lib/services/sink_pipes.d.ts +95 -0
- package/lib/services/sink_pipes.d.ts.map +1 -0
- package/lib/services/sink_pipes.js +2 -0
- package/lib/services/sink_pipes.js.map +1 -0
- package/lib/services/token.d.ts +107 -0
- package/lib/services/token.d.ts.map +1 -0
- package/lib/services/token.js +2 -0
- package/lib/services/token.js.map +1 -0
- package/lib/services.lazy/analyze.js +1 -0
- package/lib/services.lazy/api_endpoints.js +1 -0
- package/lib/services.lazy/copy_pipes.js +1 -0
- package/lib/services.lazy/datasource.js +1 -0
- package/lib/services.lazy/environment_variables.js +1 -0
- package/lib/services.lazy/events.js +1 -0
- package/lib/services.lazy/index.js +3 -0
- package/lib/services.lazy/jobs.js +1 -0
- package/lib/services.lazy/materialized_views.js +1 -0
- package/lib/services.lazy/organizations.js +1 -0
- package/lib/services.lazy/pipe.js +1 -0
- package/lib/services.lazy/query.js +1 -0
- package/lib/services.lazy/sink_pipes.js +1 -0
- package/lib/services.lazy/token.js +1 -0
- package/lib/traits.d.ts +10 -0
- package/lib/traits.d.ts.map +1 -0
- package/lib/traits.js +1 -0
- package/package.json +76 -2
- package/src/credentials.ts +76 -0
- package/src/errors.ts +83 -0
- package/src/index.ts +47 -0
- package/src/protocol.ts +48 -0
- package/src/retry.ts +69 -0
- package/src/services/analyze.ts +75 -0
- package/src/services/api_endpoints.ts +115 -0
- package/src/services/copy_pipes.ts +315 -0
- package/src/services/datasource.ts +438 -0
- package/src/services/environment_variables.ts +213 -0
- package/src/services/events.ts +86 -0
- package/src/services/index.ts +14 -0
- package/src/services/jobs.ts +156 -0
- package/src/services/materialized_views.ts +200 -0
- package/src/services/organizations.ts +552 -0
- package/src/services/pipe.ts +700 -0
- package/src/services/query.ts +150 -0
- package/src/services/sink_pipes.ts +295 -0
- package/src/services/token.ts +359 -0
- package/src/traits.ts +47 -0
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
import * as API from "@distilled.cloud/core/api";
|
|
2
|
+
import { BinaryStream } from "@distilled.cloud/core/protocol-rest";
|
|
3
|
+
import type * as Redacted from "effect/Redacted";
|
|
4
|
+
import { type TinybirdOpError, type TinybirdOpContext } from "../protocol.ts";
|
|
5
|
+
export type { TinybirdOpError, TinybirdOpContext };
|
|
6
|
+
export interface PostV0PipesRequest {
|
|
7
|
+
/** Name of the new Pipe. */
|
|
8
|
+
name?: string | undefined;
|
|
9
|
+
/** SQL of the Pipe's first node. */
|
|
10
|
+
sql?: string | undefined;
|
|
11
|
+
/** Name or ID of a Pipe to copy. */
|
|
12
|
+
from?: string | undefined;
|
|
13
|
+
/** Markdown description for the Pipe. */
|
|
14
|
+
description?: string | undefined;
|
|
15
|
+
}
|
|
16
|
+
export type CreatePipeResponseBodyMap = {
|
|
17
|
+
[key: string]: unknown | undefined;
|
|
18
|
+
};
|
|
19
|
+
export type CreatePipeResponse = CreatePipeResponseBodyMap;
|
|
20
|
+
export interface CreatePipeNodeRequest {
|
|
21
|
+
pipe: string;
|
|
22
|
+
/** The referenceable name for the node. */
|
|
23
|
+
name?: string | undefined;
|
|
24
|
+
/** Use it to store a more detailed explanation of the node. */
|
|
25
|
+
description?: string | undefined;
|
|
26
|
+
/** Auth token. Ensure it has the `PIPE:CREATE` scope on it */
|
|
27
|
+
token?: string | Redacted.Redacted<string> | undefined;
|
|
28
|
+
/** Optional. Available options are {`standard` (default), `materialized`, `endpoint`}. Use `materialized` to create a Materialized View from your new node. */
|
|
29
|
+
type?: string | undefined;
|
|
30
|
+
/** Required with `type=materialized`. Specifies the name of the destination Data Source where the Materialized View schema is defined. */
|
|
31
|
+
datasource?: string | undefined;
|
|
32
|
+
/** Optional. Default `false` When the target Data Source of the Materialized View exists in the Workspace it'll be overridden by the `datasource` specified in the request. */
|
|
33
|
+
override_datasource?: boolean | undefined;
|
|
34
|
+
/** Optional. Default `false`. When `true`, a job is triggered to populate the destination Data Source. */
|
|
35
|
+
populate?: boolean | undefined;
|
|
36
|
+
/** Optional. Populate with a subset percent of the data (limited to a maximum of 2M rows), this is useful to quickly test a materialized node with some data. The subset must be greater than 0 and lower than 0.1. A subset of 0.1 means a 10 percent of the data in the source Data Source will be used to populate the Materialized View. Use it together with `populate=true`, it has precedence over `populate_condition` */
|
|
37
|
+
populate_subset?: number | undefined;
|
|
38
|
+
/** Optional. Populate with a SQL condition to be applied to the trigger Data Source of the Materialized View. For instance, `populate_condition='date == toYYYYMM(now())'` it'll populate taking all the rows from the trigger Data Source which `date` is the current month. Use it together with `populate=true`. `populate_condition` is not taken into account if the `populate_subset` param is present. Including in the `populate_condition` any column present in the Data Source `engine_sorting_key` will make the populate job process less data. */
|
|
39
|
+
populate_condition?: string | undefined;
|
|
40
|
+
/** Optional. Default is `false`. If the populate job fails the Materialized View is unlinked and new data won't be ingested in the Materialized View. */
|
|
41
|
+
unlink_on_populate_error?: string | undefined;
|
|
42
|
+
/** Optional. Engine for destination Materialized View. Requires the `type` parameter as `materialized`. */
|
|
43
|
+
engine?: string | undefined;
|
|
44
|
+
/** The node's SQL. */
|
|
45
|
+
body: string;
|
|
46
|
+
}
|
|
47
|
+
export type CreatePipeNodeResponseBodyMap = {
|
|
48
|
+
[key: string]: unknown | undefined;
|
|
49
|
+
};
|
|
50
|
+
export type CreatePipeNodeResponse = CreatePipeNodeResponseBodyMap;
|
|
51
|
+
export interface DeletePipeRequest {
|
|
52
|
+
pipe: string;
|
|
53
|
+
}
|
|
54
|
+
export type DeletePipeResponseBodyMap = {
|
|
55
|
+
[key: string]: unknown | undefined;
|
|
56
|
+
};
|
|
57
|
+
export type DeletePipeResponse = DeletePipeResponseBodyMap;
|
|
58
|
+
export interface DeletePipeByFileNameRequest {
|
|
59
|
+
pipe: string;
|
|
60
|
+
}
|
|
61
|
+
export type DeletePipeByFileNameResponseBodyMap = {
|
|
62
|
+
[key: string]: unknown | undefined;
|
|
63
|
+
};
|
|
64
|
+
export type DeletePipeByFileNameResponse = DeletePipeByFileNameResponseBodyMap;
|
|
65
|
+
export interface DeletePipeNodeRequest {
|
|
66
|
+
pipe: string;
|
|
67
|
+
node: string;
|
|
68
|
+
}
|
|
69
|
+
export type DeletePipeNodeResponseBodyMap = {
|
|
70
|
+
[key: string]: unknown | undefined;
|
|
71
|
+
};
|
|
72
|
+
export type DeletePipeNodeResponse = DeletePipeNodeResponseBodyMap;
|
|
73
|
+
export interface ExplainPipeRequest {
|
|
74
|
+
pipe: string;
|
|
75
|
+
/** Auth token. Ensure it has the `PIPE:READ` and the proper `DATASOURCE:READ` scopes on it. */
|
|
76
|
+
token?: string | Redacted.Redacted<string> | undefined;
|
|
77
|
+
/** The name or id of the pipe. */
|
|
78
|
+
pipe_name?: string | undefined;
|
|
79
|
+
/** Optional. The name or id of the node to explain. If not provided, the most relevant node of the pipe will be used. */
|
|
80
|
+
node_name?: string | undefined;
|
|
81
|
+
/** Optional. The value of the parameters to test the query with. They are regular URL query parameters. */
|
|
82
|
+
params?: string | undefined;
|
|
83
|
+
}
|
|
84
|
+
export type ExplainPipeResponseBodyMap = {
|
|
85
|
+
[key: string]: unknown | undefined;
|
|
86
|
+
};
|
|
87
|
+
export type ExplainPipeResponse = ExplainPipeResponseBodyMap;
|
|
88
|
+
export interface ExplainPipeNodeRequest {
|
|
89
|
+
pipe: string;
|
|
90
|
+
node: string;
|
|
91
|
+
/** Auth token. Ensure it has the `PIPE:READ` and the proper `DATASOURCE:READ` scopes on it. */
|
|
92
|
+
token?: string | Redacted.Redacted<string> | undefined;
|
|
93
|
+
/** The name or id of the pipe. */
|
|
94
|
+
pipe_name?: string | undefined;
|
|
95
|
+
/** Optional. The name or id of the node to explain. If not provided, the most relevant node of the pipe will be used. */
|
|
96
|
+
node_name?: string | undefined;
|
|
97
|
+
/** Optional. The value of the parameters to test the query with. They are regular URL query parameters. */
|
|
98
|
+
params?: string | undefined;
|
|
99
|
+
}
|
|
100
|
+
export type ExplainPipeNodeResponseBodyMap = {
|
|
101
|
+
[key: string]: unknown | undefined;
|
|
102
|
+
};
|
|
103
|
+
export type ExplainPipeNodeResponse = ExplainPipeNodeResponseBodyMap;
|
|
104
|
+
export interface GetPipeRequest {
|
|
105
|
+
pipe: string;
|
|
106
|
+
}
|
|
107
|
+
export type GetPipeResponseBodyMap = {
|
|
108
|
+
[key: string]: unknown | undefined;
|
|
109
|
+
};
|
|
110
|
+
export type GetPipeResponse = GetPipeResponseBodyMap;
|
|
111
|
+
export interface GetPipeByFileNameRequest {
|
|
112
|
+
pipe: string;
|
|
113
|
+
}
|
|
114
|
+
export type GetPipeByFileNameResponse = string;
|
|
115
|
+
export interface ListPipesRequest {
|
|
116
|
+
/** The response will include the nodes dependent data sources and pipes, default is `false` */
|
|
117
|
+
dependencies?: boolean | undefined;
|
|
118
|
+
/** comma separated list of the pipe attributes to return in the response. Example: `attrs=name,description` */
|
|
119
|
+
attrs?: string | undefined;
|
|
120
|
+
/** comma separated list of the node attributes to return in the response. Example `node_attrs=id,name` */
|
|
121
|
+
node_attrs?: string | undefined;
|
|
122
|
+
}
|
|
123
|
+
export type ListPipesResponseBodyMap = {
|
|
124
|
+
[key: string]: unknown | undefined;
|
|
125
|
+
};
|
|
126
|
+
export type ListPipesResponse = ListPipesResponseBodyMap;
|
|
127
|
+
export type QueryPipeRequestFormat = "json" | "csv" | "ndjson" | "parquet" | "prometheus";
|
|
128
|
+
export interface QueryPipeRequest {
|
|
129
|
+
pipe: string;
|
|
130
|
+
format: QueryPipeRequestFormat | (string & {});
|
|
131
|
+
/** Optional, query to execute, see API Query endpoint */
|
|
132
|
+
q?: string | undefined;
|
|
133
|
+
/** (Optional) Controls quoting of 64-bit or bigger integers (like UInt64 or Int128) when they are output in a JSON format. Such integers are enclosed in quotes by default. This behavior is compatible with most JavaScript implementations. Possible values: 0 -- Integers are output without quotes. 1 -- Integers are enclosed in quotes. Default value is 0 */
|
|
134
|
+
output_format_json_quote_64bit_integers?: number | undefined;
|
|
135
|
+
/** (Optional) Controls representation of inf and nan on the UI instead of null e.g when dividing by 0 - inf and when there is no representation of a number in Javascript - nan. Possible values: 0 - disabled, 1 - enabled. Default value is 0 */
|
|
136
|
+
output_format_json_quote_denormals?: number | undefined;
|
|
137
|
+
/** (Optional) Use Parquet String type instead of Binary for String columns. Possible values: 0 - disabled, 1 - enabled. Default value is 0 */
|
|
138
|
+
output_format_parquet_string_as_string?: number | undefined;
|
|
139
|
+
/** (Optional) Only valid with the `csv` format; any other format returns a 400. Set to `false` to omit the header row of column names, so that paginated pages can be concatenated without a header appearing mid-file. Possible values: true, false, 1, 0. Defaults to `true`, which is the long-standing behavior of the `csv` format */
|
|
140
|
+
__tb__csv_header?: boolean | undefined;
|
|
141
|
+
}
|
|
142
|
+
export interface QueryPipeResponse {
|
|
143
|
+
body: BinaryStream;
|
|
144
|
+
/** Media type of the body, from the response's `Content-Type` header (e.g. `image/jpeg`). */
|
|
145
|
+
contentType?: string | undefined;
|
|
146
|
+
}
|
|
147
|
+
export type QueryPipeWithBodyRequestFormat = "json" | "csv" | "ndjson" | "parquet" | "prometheus";
|
|
148
|
+
export interface QueryPipeWithBodyRequest {
|
|
149
|
+
pipe: string;
|
|
150
|
+
format: QueryPipeWithBodyRequestFormat | (string & {});
|
|
151
|
+
[key: string]: unknown;
|
|
152
|
+
}
|
|
153
|
+
export interface QueryPipeWithBodyResponse {
|
|
154
|
+
body: BinaryStream;
|
|
155
|
+
/** Media type of the body, from the response's `Content-Type` header (e.g. `image/jpeg`). */
|
|
156
|
+
contentType?: string | undefined;
|
|
157
|
+
}
|
|
158
|
+
export interface UpdatePipeRequest {
|
|
159
|
+
pipe: string;
|
|
160
|
+
/** new name for the pipe */
|
|
161
|
+
name?: string | undefined;
|
|
162
|
+
/** new Markdown description for the pipe */
|
|
163
|
+
description?: string | undefined;
|
|
164
|
+
/** Auth token. Ensure it has the `PIPE:CREATE` scope on it */
|
|
165
|
+
token?: string | Redacted.Redacted<string> | undefined;
|
|
166
|
+
}
|
|
167
|
+
export type UpdatePipeResponseBodyMap = {
|
|
168
|
+
[key: string]: unknown | undefined;
|
|
169
|
+
};
|
|
170
|
+
export type UpdatePipeResponse = UpdatePipeResponseBodyMap;
|
|
171
|
+
export interface UpdatePipeByFileNameRequest {
|
|
172
|
+
pipe: string;
|
|
173
|
+
/** new name for the pipe */
|
|
174
|
+
name?: string | undefined;
|
|
175
|
+
/** new Markdown description for the pipe */
|
|
176
|
+
description?: string | undefined;
|
|
177
|
+
/** Auth token. Ensure it has the `PIPE:CREATE` scope on it */
|
|
178
|
+
token?: string | Redacted.Redacted<string> | undefined;
|
|
179
|
+
}
|
|
180
|
+
export type UpdatePipeByFileNameResponseBodyMap = {
|
|
181
|
+
[key: string]: unknown | undefined;
|
|
182
|
+
};
|
|
183
|
+
export type UpdatePipeByFileNameResponse = UpdatePipeByFileNameResponseBodyMap;
|
|
184
|
+
export interface UpdatePipeNodeRequest {
|
|
185
|
+
pipe: string;
|
|
186
|
+
node: string;
|
|
187
|
+
/** new name for the node */
|
|
188
|
+
name?: string | undefined;
|
|
189
|
+
/** new description for the node */
|
|
190
|
+
description?: string | undefined;
|
|
191
|
+
/** Auth token. Ensure it has the `PIPE:CREATE` scope on it */
|
|
192
|
+
token?: string | Redacted.Redacted<string> | undefined;
|
|
193
|
+
}
|
|
194
|
+
export type UpdatePipeNodeResponseBodyMap = {
|
|
195
|
+
[key: string]: unknown | undefined;
|
|
196
|
+
};
|
|
197
|
+
export type UpdatePipeNodeResponse = UpdatePipeNodeResponseBodyMap;
|
|
198
|
+
export type CreatePipeError = TinybirdOpError;
|
|
199
|
+
/** Creates a new Pipe. There are 3 ways to create a Pipe If you prefer to create the minimum Pipe, and then append your transformation nodes you can set your name and first transformation node's SQL in your POST request Pipes can be also created as copies of other Pipes. Just use the `from` argument: Bear in mind, if you use this method to overwrite an existing Pipe, the endpoint will only be maintained if the node name is the same. Reference: https://www.tinybird.co/docs/api-reference/pipe-api */
|
|
200
|
+
export declare const createPipe: API.OperationMethod<PostV0PipesRequest, CreatePipeResponse, CreatePipeError, TinybirdOpContext>;
|
|
201
|
+
export type CreatePipeNodeError = TinybirdOpError;
|
|
202
|
+
/** Appends a new node to a Pipe. Appends a new node that creates a Materialized View SQL query for the transformation node must be sent in the body encoded in utf-8 Reference: https://www.tinybird.co/docs/api-reference/pipe-api */
|
|
203
|
+
export declare const createPipeNode: API.OperationMethod<CreatePipeNodeRequest, CreatePipeNodeResponse, CreatePipeNodeError, TinybirdOpContext>;
|
|
204
|
+
export type DeletePipeError = TinybirdOpError;
|
|
205
|
+
/** Drops a Pipe from your account. Auth token in use must have the `DROP:NAME` scope. Reference: https://www.tinybird.co/docs/api-reference/pipe-api */
|
|
206
|
+
export declare const deletePipe: API.OperationMethod<DeletePipeRequest, DeletePipeResponse, DeletePipeError, TinybirdOpContext>;
|
|
207
|
+
export type DeletePipeByFileNameError = TinybirdOpError;
|
|
208
|
+
/** Drops a Pipe from your account. Auth token in use must have the `DROP:NAME` scope. Reference: https://www.tinybird.co/docs/api-reference/pipe-api */
|
|
209
|
+
export declare const deletePipeByFileName: API.OperationMethod<DeletePipeByFileNameRequest, DeletePipeByFileNameResponse, DeletePipeByFileNameError, TinybirdOpContext>;
|
|
210
|
+
export type DeletePipeNodeError = TinybirdOpError;
|
|
211
|
+
/** Drops a particular transformation node in the Pipe. It does not remove related nodes so this could leave the Pipe in an inconsistent state. For security reasons, enabled nodes can't be removed. Reference: https://www.tinybird.co/docs/api-reference/pipe-api */
|
|
212
|
+
export declare const deletePipeNode: API.OperationMethod<DeletePipeNodeRequest, DeletePipeNodeResponse, DeletePipeNodeError, TinybirdOpContext>;
|
|
213
|
+
export type ExplainPipeError = TinybirdOpError;
|
|
214
|
+
/** Return the explain plan and the whole debug query for the node. If no node is specified, the most relevant node of the pipe will be used: - The endpoint node for endpoints. - The node that materializes for materialized views. - The copy node for Copy pipes. - The last node for general pipes. It accepts query parameters to test the query with different values. Reference: https://www.tinybird.co/docs/api-reference/pipe-api */
|
|
215
|
+
export declare const explainPipe: API.OperationMethod<ExplainPipeRequest, ExplainPipeResponse, ExplainPipeError, TinybirdOpContext>;
|
|
216
|
+
export type ExplainPipeNodeError = TinybirdOpError;
|
|
217
|
+
/** Return the explain plan and the whole debug query for the node. If no node is specified, the most relevant node of the pipe will be used: - The endpoint node for endpoints. - The node that materializes for materialized views. - The copy node for Copy pipes. - The last node for general pipes. It accepts query parameters to test the query with different values. Reference: https://www.tinybird.co/docs/api-reference/pipe-api */
|
|
218
|
+
export declare const explainPipeNode: API.OperationMethod<ExplainPipeNodeRequest, ExplainPipeNodeResponse, ExplainPipeNodeError, TinybirdOpContext>;
|
|
219
|
+
export type GetPipeError = TinybirdOpError;
|
|
220
|
+
/** Get pipe information. Provided Auth Token must have read access to the Pipe. `pipe_id` and `pipe_name` are two ways to refer to the pipe in SQL queries and API endpoints the only difference is `pipe_id` never changes so it'll work even if you change the `pipe_name` (which is the name used to display the pipe). In general you can use `pipe_id` or `pipe_name` indistinctly: You can make your Pipe's id more descriptive by prepending information such as `t_my_events_table.bd1c62b5e67142bd9bf9a7f113a2b6ea` Reference: https://www.tinybird.co/docs/api-reference/pipe-api */
|
|
221
|
+
export declare const getPipe: API.OperationMethod<GetPipeRequest, GetPipeResponse, GetPipeError, TinybirdOpContext>;
|
|
222
|
+
export type GetPipeByFileNameError = TinybirdOpError;
|
|
223
|
+
/** Get pipe information. Provided Auth Token must have read access to the Pipe. `pipe_id` and `pipe_name` are two ways to refer to the pipe in SQL queries and API endpoints the only difference is `pipe_id` never changes so it'll work even if you change the `pipe_name` (which is the name used to display the pipe). In general you can use `pipe_id` or `pipe_name` indistinctly: You can make your Pipe's id more descriptive by prepending information such as `t_my_events_table.bd1c62b5e67142bd9bf9a7f113a2b6ea` Reference: https://www.tinybird.co/docs/api-reference/pipe-api */
|
|
224
|
+
export declare const getPipeByFileName: API.OperationMethod<GetPipeByFileNameRequest, GetPipeByFileNameResponse, GetPipeByFileNameError, TinybirdOpContext>;
|
|
225
|
+
export type ListPipesError = TinybirdOpError;
|
|
226
|
+
/** Get a list of pipes in your account. Pipes in the response will be the ones that are accessible using a particular token with read permissions for them. Pipes id's are immutable so you can always refer to them in your 3rd party applications to make them compatible with Pipes once they are renamed. For lighter JSON responses consider using the `attrs` and `node_attrs` params to return exactly the attributes you need to consume. Reference: https://www.tinybird.co/docs/api-reference/pipe-api */
|
|
227
|
+
export declare const listPipes: API.OperationMethod<ListPipesRequest, ListPipesResponse, ListPipesError, TinybirdOpContext>;
|
|
228
|
+
export type QueryPipeError = TinybirdOpError;
|
|
229
|
+
/** Returns the published node data in a particular format. The `q` parameter is a SQL query (see [Query API](/docs/api-reference/query-api)). When using this endpoint to query your Pipes, you can use the `_` shortcut, which refers to your Pipe name Reference: https://www.tinybird.co/docs/api-reference/pipe-api */
|
|
230
|
+
export declare const queryPipe: API.OperationMethod<QueryPipeRequest, QueryPipeResponse, QueryPipeError, TinybirdOpContext>;
|
|
231
|
+
export type QueryPipeWithBodyError = TinybirdOpError;
|
|
232
|
+
/** Returns the published node data in a particular format, passing the parameters in the request body. Use this endpoint when the query is too long to be passed as a query string parameter. When using the post endpoint, there are no traces of the parameters in the pipe_stats_rt Data Source. See the get endpoint for more information. Reference: https://www.tinybird.co/docs/api-reference/pipe-api */
|
|
233
|
+
export declare const queryPipeWithBody: API.OperationMethod<QueryPipeWithBodyRequest, QueryPipeWithBodyResponse, QueryPipeWithBodyError, TinybirdOpContext>;
|
|
234
|
+
export type UpdatePipeError = TinybirdOpError;
|
|
235
|
+
/** Changes Pipe's metadata. When there is another Pipe with the same name an error is raised. Reference: https://www.tinybird.co/docs/api-reference/pipe-api */
|
|
236
|
+
export declare const updatePipe: API.OperationMethod<UpdatePipeRequest, UpdatePipeResponse, UpdatePipeError, TinybirdOpContext>;
|
|
237
|
+
export type UpdatePipeByFileNameError = TinybirdOpError;
|
|
238
|
+
/** Changes Pipe's metadata. When there is another Pipe with the same name an error is raised. Reference: https://www.tinybird.co/docs/api-reference/pipe-api */
|
|
239
|
+
export declare const updatePipeByFileName: API.OperationMethod<UpdatePipeByFileNameRequest, UpdatePipeByFileNameResponse, UpdatePipeByFileNameError, TinybirdOpContext>;
|
|
240
|
+
export type UpdatePipeNodeError = TinybirdOpError;
|
|
241
|
+
/** Changes a particular transformation node in the Pipe Please, note that the desired SQL query should be sent in the body encoded in utf-8. Reference: https://www.tinybird.co/docs/api-reference/pipe-api */
|
|
242
|
+
export declare const updatePipeNode: API.OperationMethod<UpdatePipeNodeRequest, UpdatePipeNodeResponse, UpdatePipeNodeError, TinybirdOpContext>;
|
|
243
|
+
//# sourceMappingURL=pipe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipe.d.ts","sources":["../../src/services/pipe.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAInE,OAAO,KAAK,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAEjD,OAAO,EAAoB,KAAK,eAAe,EAAE,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAMhG,YAAY,EAAE,eAAe,EAAE,iBAAiB,EAAE,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kB,EAClB,eAAe,EACf,iBAAiB,CAUhB,CAAC;AAEJ,MAAM,MAAM,yBAAyB,GAAG,eAAe,CAAC;AACxD,gKAAgK;AAChK,eAAO,MAAM,oBAAoB,EAAE,GAAG,CAAC,eAAe,CACpD,2BAA2B,EAC3B,4BAA4B,EAC5B,yBAAyB,EACzB,iBAAiB,CAUhB,CAAC;AAEJ,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAAC;AAClD,+MAA+M;AAC/M,eAAO,MAAM,cAAc,EAAE,GAAG,CAAC,eAAe,CAC9C,qBAAqB,EACrB,sBAAsB,EACtB,mBAAmB,EACnB,iBAAiB,CAUhB,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Bc as e,Gc as t,Hc as n,a as r,b as i,errors$TinybirdServiceErrors as a,hc as o,l as s,n as c,protocol$TinybirdProtocol as l,qc as u,rc as d,retry$Retry as f,tc as p,traits$BinaryResponse as m,traits$Header as h,traits$Http as g,traits$HttpBody as _,traits$Label as v,traits$Query as y,traits$RawResponse as b,traits$RawResponseRoot as x,traits$SensitiveValue as S,ub as C,uc as w,vc as T,zc as E}from"../_bundle/sdk.js";const D={system:`tinybird-api`,responseHeaders:[{header:`x-request-id`,name:`http.response.header.x-request-id`,transform:`list`},{header:`request-id`,name:`http.response.header.request-id`,transform:`list`}],prefix:`Tinybird`,service:`Pipe`,labels:`tinybird`,propagate:`w3c`};const O=/*@__PURE__*/ c(o=>o===r?[`{input:#1,output:#7:1,errors:[],serviceErrors:$8,protocol:$9,retry:$10,telemetry:$11,span:"CreatePipe"};$6(>2)@"PostV0PipesRequest";$5({name:$4($3.pipe($2())),sql:$4($3.pipe($2())),from:$4($3.pipe($2())),description:$4($3.pipe($2()))}).pipe($1({method:"POST",uri:"/v0/pipes",code:200}))`,[e,g,y,p,t,w,n,__d0,a,l,f,D]]:i(O,o));const k=/*@__PURE__*/ c(c=>c===r?s(`CreatePipeNode`,`{input:#1,output:#12:1,errors:[],serviceErrors:$13,protocol:$14,retry:$15,telemetry:$16,span:"%"};$11(>2)@"%Request";$10({pipe:$3.pipe($2()),name:$5($3.pipe($4())),description:$5($3.pipe($4())),token:$5($3.pipe($4(),$6({}))),type:$5($3.pipe($4())),datasource:$5($3.pipe($4())),override_datasource:$5($7.pipe($4())),populate:$5($7.pipe($4())),populate_subset:$5($8.pipe($4())),populate_condition:$5($3.pipe($4())),unlink_on_populate_error:$5($3.pipe($4())),engine:$5($3.pipe($4())),body:$3.pipe($9())}).pipe($1({method:"POST",uri:"/v0/pipes/{pipe}/nodes",code:200,bodyMediaType:"text/plain"}))`,[e,g,v,p,y,t,S,o,u,_,w,n,__d0,a,l,f,D]):i(k,c));const A=/*@__PURE__*/ c(t=>t===r?s(`DeletePipe`,`{input:#1,output:#6:1,errors:[],serviceErrors:$7,protocol:$8,retry:$9,telemetry:$10,span:"%"};$5(>2)@"%Request";$4({pipe:$3.pipe($2())}).pipe($1({method:"DELETE",uri:"/v0/pipes/{pipe}",code:200}))`,[e,g,v,p,w,n,__d0,a,l,f,D]):i(A,t));const j=/*@__PURE__*/ c(t=>t===r?s(`DeletePipeByFileName`,`{input:#1,output:#6:1,errors:[],serviceErrors:$7,protocol:$8,retry:$9,telemetry:$10,span:"%"};$5(>2)@"%Request";$4({pipe:$3.pipe($2())}).pipe($1({method:"DELETE",uri:"/v0/pipes/{pipe}.pipe",code:200}))`,[e,g,v,p,w,n,__d0,a,l,f,D]):i(j,t));const M=/*@__PURE__*/ c(t=>t===r?s(`DeletePipeNode`,`{input:#1,output:#6:1,errors:[],serviceErrors:$7,protocol:$8,retry:$9,telemetry:$10,span:"%"};$5(>2)@"%Request";$4({pipe:$3.pipe($2()),node:$3.pipe($2())}).pipe($1({method:"DELETE",uri:"/v0/pipes/{pipe}/nodes/{node}",code:200}))`,[e,g,v,p,w,n,__d0,a,l,f,D]):i(M,t));const N=/*@__PURE__*/ c(o=>o===r?s(`ExplainPipe`,`{input:#1,output:#9:1,errors:[],serviceErrors:$10,protocol:$11,retry:$12,telemetry:$13,span:"%"};$8(>2)@"%Request";$7({pipe:$3.pipe($2()),token:$6($3.pipe($4(),$5({}))),pipe_name:$6($3.pipe($4())),node_name:$6($3.pipe($4())),params:$6($3.pipe($4()))}).pipe($1({method:"GET",uri:"/v0/pipes/{pipe}/explain",code:200}))`,[e,g,v,p,y,S,t,w,n,__d0,a,l,f,D]):i(N,o));const P=/*@__PURE__*/ c(o=>o===r?s(`ExplainPipeNode`,`{input:#1,output:#9:1,errors:[],serviceErrors:$10,protocol:$11,retry:$12,telemetry:$13,span:"%"};$8(>2)@"%Request";$7({pipe:$3.pipe($2()),node:$3.pipe($2()),token:$6($3.pipe($4(),$5({}))),pipe_name:$6($3.pipe($4())),node_name:$6($3.pipe($4())),params:$6($3.pipe($4()))}).pipe($1({method:"GET",uri:"/v0/pipes/{pipe}/nodes/{node}/explain",code:200}))`,[e,g,v,p,y,S,t,w,n,__d0,a,l,f,D]):i(P,o));const F=/*@__PURE__*/ c(t=>t===r?s(`GetPipe`,`{input:#1,output:#6:1,errors:[],serviceErrors:$7,protocol:$8,retry:$9,telemetry:$10,span:"%"};$5(>2)@"%Request";$4({pipe:$3.pipe($2())}).pipe($1({method:"GET",uri:"/v0/pipes/{pipe}",code:200}))`,[e,g,v,p,w,n,__d0,a,l,f,D]):i(F,t));const I=/*@__PURE__*/ c(t=>t===r?s(`GetPipeByFileName`,`{input:#1,output:#2,errors:[],serviceErrors:$7,protocol:$8,retry:$9,telemetry:$10,span:"%"};$5(>3)@"%Request";$5(>4)@"%Response";$4({pipe:$3.pipe($2())}).pipe($1({method:"GET",uri:"/v0/pipes/{pipe}.pipe",code:200}));$3.pipe($6())`,[e,g,v,p,w,n,x,a,l,f,D]):i(I,t));const L=/*@__PURE__*/ c(c=>c===r?s(`ListPipes`,`{input:#1,output:#8:1,errors:[],serviceErrors:$9,protocol:$10,retry:$11,telemetry:$12,span:"%"};$7(>2)@"%Request";$6({dependencies:$4($3.pipe($2())),attrs:$4($5.pipe($2())),node_attrs:$4($5.pipe($2()))}).pipe($1({method:"GET",uri:"/v0/pipes",code:200}))`,[e,g,y,o,t,p,w,n,__d0,a,l,f,D]):i(L,c));const R=/*@__PURE__*/ c(c=>c===r?s(`QueryPipe`,`{input:#1,output:#10:0,errors:[],serviceErrors:$11,protocol:$12,retry:$13,telemetry:$14,span:"%"};$9(>2)@"%Request";$8({pipe:$3.pipe($2()),format:$3.pipe($2()),q:$5($3.pipe($4())),output_format_json_quote_64bit_integers:$5($6.pipe($4())),output_format_json_quote_denormals:$5($6.pipe($4())),output_format_parquet_string_as_string:$5($6.pipe($4())),__tb__csv_header:$5($7.pipe($4()))}).pipe($1({method:"GET",uri:"/v0/pipes/{pipe}.{format}",code:200}))`,[e,g,v,p,y,t,u,o,w,n,__d1,a,l,f,D]):i(R,c));const z=/*@__PURE__*/ c(t=>t===r?s(`QueryPipeWithBody`,`{input:#1,output:#9:0,errors:[],serviceErrors:$10,protocol:$11,retry:$12,telemetry:$13,span:"%"};$8(>2)@"%Request";$7($4({pipe:$3.pipe($2()),format:$3.pipe($2())}),[$6($3,$5)]).pipe($1({method:"POST",uri:"/v0/pipes/{pipe}.{format}",code:200}))`,[e,g,v,p,w,E,d,T,n,__d1,a,l,f,D]):i(z,t));const B=/*@__PURE__*/ c(o=>o===r?s(`UpdatePipe`,`{input:#1,output:#9:1,errors:[],serviceErrors:$10,protocol:$11,retry:$12,telemetry:$13,span:"%"};$8(>2)@"%Request";$7({pipe:$3.pipe($2()),name:$5($3.pipe($4())),description:$5($3.pipe($4())),token:$5($3.pipe($4(),$6({})))}).pipe($1({method:"PUT",uri:"/v0/pipes/{pipe}",code:200}))`,[e,g,v,p,y,t,S,w,n,__d0,a,l,f,D]):i(B,o));const V=/*@__PURE__*/ c(o=>o===r?s(`UpdatePipeByFileName`,`{input:#1,output:#9:1,errors:[],serviceErrors:$10,protocol:$11,retry:$12,telemetry:$13,span:"%"};$8(>2)@"%Request";$7({pipe:$3.pipe($2()),name:$5($3.pipe($4())),description:$5($3.pipe($4())),token:$5($3.pipe($4(),$6({})))}).pipe($1({method:"PUT",uri:"/v0/pipes/{pipe}.pipe",code:200}))`,[e,g,v,p,y,t,S,w,n,__d0,a,l,f,D]):i(V,o));const H=/*@__PURE__*/ c(o=>o===r?s(`UpdatePipeNode`,`{input:#1,output:#9:1,errors:[],serviceErrors:$10,protocol:$11,retry:$12,telemetry:$13,span:"%"};$8(>2)@"%Request";$7({pipe:$3.pipe($2()),node:$3.pipe($2()),name:$5($3.pipe($4())),description:$5($3.pipe($4())),token:$5($3.pipe($4(),$6({})))}).pipe($1({method:"PUT",uri:"/v0/pipes/{pipe}/nodes/{node}",code:200}))`,[e,g,v,p,y,t,S,w,n,__d0,a,l,f,D]):i(H,o));function __d0(){return[`$3($1,$2);$5(>2)@"CreatePipeResponse";#0.pipe($4())`,[e,p,E,d,x,n]]}function __d1(){return[`$8(>1)@"QueryPipeResponse";$7({body:$3.pipe($1(),$2()),contentType:$6($5.pipe($4("Content-Type")))})`,[e,b,m,C,h,p,t,w,n]]}export{O as createPipe,k as createPipeNode,A as deletePipe,j as deletePipeByFileName,M as deletePipeNode,N as explainPipe,P as explainPipeNode,F as getPipe,I as getPipeByFileName,L as listPipes,R as queryPipe,z as queryPipeWithBody,B as updatePipe,V as updatePipeByFileName,H as updatePipeNode};
|
|
2
|
+
//# sourceMappingURL=pipe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipe.js","names":["API.D","__L.at","T.Http","T.Query","S.String","S.optional","S.Struct","S.suspend","Retry.Retry","API.call","API.named","T.Label","T.SensitiveValue","S.Boolean","S.Number","T.HttpBody","T.RawResponseRoot","S.Unknown","S.Record","S.StructWithRest","T.RawResponse","T.BinaryResponse","T.Header","at","optional","suspend","D","call","TinybirdServiceErrors","Boolean","named","op","TinybirdProtocol","Number","Record","Retry","String","BinaryResponse","Header","Http","HttpBody","Label","Query","RawResponse","RawResponseRoot","SensitiveValue","BinaryStream","Struct","StructWithRest","Unknown","TELEMETRY","createPipe","i","createPipeNode","deletePipe","deletePipeByFileName","deletePipeNode","explainPipe","explainPipeNode","getPipe","getPipeByFileName","listPipes","queryPipe","queryPipeWithBody","updatePipe","updatePipeByFileName","updatePipeNode"],"sources":["../../src/services/pipe.ts"],"mappings":"4aAcA,MAAMkD,EAAY,CAChB,OAAQ,eACR,gBAAiB,CACf,CAAE,OAAQ,eAAgB,KAAM,oCAAqC,UAAW,MAAO,EACvF,CAAE,OAAQ,aAAc,KAAM,kCAAmC,UAAW,MAAO,CACrF,EACA,OAAQ,WACR,QAAS,OACT,OAAQ,WACR,UAAW,KACb,EA4KA,MAAaC,EAKK,gBAAQ,GAAgBC,IAAMpD,EAAQ,CAAC,iSAAkS,CAACC,EAAQC,EAAQC,EAASC,EAAUC,EAAYC,EAAUC,EAAW,KAAMqB,EAAuBI,EAAkBxB,EAAa0C,CAAS,CAAC,EAAIzC,EAAS0C,EAAYC,CAAC,CAAC,EAIjgB,MAAaC,EAKK,gBAAQ,GAAgBD,IAAMpD,EAAQU,EAAU,iBAAkB,mlBAAolB,CAACT,EAAQC,EAAQS,EAASP,EAAUD,EAASE,EAAYO,EAAkBC,EAAWC,EAAUC,EAAYT,EAAUC,EAAW,KAAMqB,EAAuBI,EAAkBxB,EAAa0C,CAAS,CAAC,EAAIzC,EAAS4C,EAAgBD,CAAC,CAAC,EAI94B,MAAaE,EAKK,gBAAQ,GAAgBF,IAAMpD,EAAQU,EAAU,aAAc,uMAAwM,CAACT,EAAQC,EAAQS,EAASP,EAAUE,EAAUC,EAAW,KAAMqB,EAAuBI,EAAkBxB,EAAa0C,CAAS,CAAC,EAAIzC,EAAS6C,EAAYF,CAAC,CAAC,EAIlb,MAAaG,EAKK,gBAAQ,GAAgBH,IAAMpD,EAAQU,EAAU,uBAAwB,4MAA6M,CAACT,EAAQC,EAAQS,EAASP,EAAUE,EAAUC,EAAW,KAAMqB,EAAuBI,EAAkBxB,EAAa0C,CAAS,CAAC,EAAI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AMrlB,SAAS,MAAY,CACnB,MAAO,CAAC,sDAAuD,CAACnD,EAAQG,EAAUa,EAAWC,EAAUF,EAAmBT,CAAS,CAAC,CACtI,CACA,SAAS,MAAY,CACnB,MAAO,CAAC,uGAAwG,CAACN,EAAQmB,EAAeC,EAAkByB,EAAcxB,EAAUlB,EAAUC,EAAYC,EAAUC,CAAS,CAAC,CAC9N"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import * as API from "@distilled.cloud/core/api";
|
|
2
|
+
import { BinaryStream } from "@distilled.cloud/core/protocol-rest";
|
|
3
|
+
import { type TinybirdOpError, type TinybirdOpContext } from "../protocol.ts";
|
|
4
|
+
export type { TinybirdOpError, TinybirdOpContext };
|
|
5
|
+
export interface QuerySqlRequest {
|
|
6
|
+
/** The SQL query */
|
|
7
|
+
q: string;
|
|
8
|
+
/** (Optional) The name of the pipe. It allows writing a query like 'SELECT * FROM _' where '_' is a placeholder for the 'pipeline' parameter */
|
|
9
|
+
pipeline?: string | undefined;
|
|
10
|
+
/** (Optional) When set to 'true', returns EXPLAIN output for the query instead of executing it. Default value is 'false' */
|
|
11
|
+
explain?: string | undefined;
|
|
12
|
+
/** (Optional) Comma-separated key=value pairs controlling EXPLAIN output. Allowed keys: actions, column_structure, description, distributed, header, indexes, input_headers, json, projections. Each value is 0 or 1. Example: indexes=1,actions=1. When empty, defaults to indexes=1 */
|
|
13
|
+
explain_settings?: string | undefined;
|
|
14
|
+
/** (Optional) Controls quoting of 64-bit or bigger integers (like UInt64 or Int128) when they are output in a JSON format. Such integers are enclosed in quotes by default. This behavior is compatible with most JavaScript implementations. Possible values: 0 -- Integers are output without quotes. 1 -- Integers are enclosed in quotes. Default value is 0 */
|
|
15
|
+
output_format_json_quote_64bit_integers?: number | undefined;
|
|
16
|
+
/** (Optional) Controls representation of inf and nan on the UI instead of null e.g when dividing by 0 - inf and when there is no representation of a number in Javascript - nan. Possible values: 0 - disabled, 1 - enabled. Default value is 0 */
|
|
17
|
+
output_format_json_quote_denormals?: number | undefined;
|
|
18
|
+
/** (Optional) Use Parquet String type instead of Binary for String columns. Possible values: 0 - disabled, 1 - enabled. Default value is 0 */
|
|
19
|
+
output_format_parquet_string_as_string?: number | undefined;
|
|
20
|
+
}
|
|
21
|
+
export interface QuerySqlResponse {
|
|
22
|
+
body: BinaryStream;
|
|
23
|
+
/** Media type of the body, from the response's `Content-Type` header (e.g. `image/jpeg`). */
|
|
24
|
+
contentType?: string | undefined;
|
|
25
|
+
}
|
|
26
|
+
export interface QuerySqlWithBodyRequest {
|
|
27
|
+
/** (Optional) The name of the pipe. It allows writing a query like 'SELECT * FROM _' where '_' is a placeholder for the 'pipeline' parameter */
|
|
28
|
+
pipeline?: string | undefined;
|
|
29
|
+
/** (Optional) Controls quoting of 64-bit or bigger integers (like UInt64 or Int128) when they are output in a JSON format. Such integers are enclosed in quotes by default. This behavior is compatible with most JavaScript implementations. Possible values: 0 -- Integers are output without quotes. 1 -- Integers are enclosed in quotes. Default value is 0 */
|
|
30
|
+
output_format_json_quote_64bit_integers?: number | undefined;
|
|
31
|
+
/** (Optional) Controls representation of inf and nan on the UI instead of null e.g when dividing by 0 - inf and when there is no representation of a number in Javascript - nan. Possible values: 0 - disabled, 1 - enabled. Default value is 0 */
|
|
32
|
+
output_format_json_quote_denormals?: number | undefined;
|
|
33
|
+
/** (Optional) Use Parquet String type instead of Binary for String columns. Possible values: 0 - disabled, 1 - enabled. Default value is 0 */
|
|
34
|
+
output_format_parquet_string_as_string?: number | undefined;
|
|
35
|
+
/** The SQL query, templated or not. Template parameters go beside it as extra keys. */
|
|
36
|
+
q: string;
|
|
37
|
+
[key: string]: unknown;
|
|
38
|
+
}
|
|
39
|
+
export interface QuerySqlWithBodyResponse {
|
|
40
|
+
body: BinaryStream;
|
|
41
|
+
/** Media type of the body, from the response's `Content-Type` header (e.g. `image/jpeg`). */
|
|
42
|
+
contentType?: string | undefined;
|
|
43
|
+
}
|
|
44
|
+
export type QuerySqlError = TinybirdOpError;
|
|
45
|
+
/** Executes a SQL query using the engine. As a response, it gives you the query metadata, the resulting data and some performance statistics. Data can be fetched in different formats. Just append `FORMAT <format_name>` to your SQL query: As you can see in the example above, timestamps do not include a time zone in their serialization. Let's see how that relates to timestamps ingested from your original data: - If the original timestamp had no time zone associated, you'll read back the same date and time verbatim. If you ingested the timestamp `2022-11-14 11:08:46`, for example, Tinybird sends `"2022-11-14 11:08:46"` back. This is so regardless of the time zone of the column in ClickHouse. - If the original timestamp had a time zone associated, you'll read back the corresponding date and time in the time zone of the destination column in ClickHouse, which is UTC by default. If you ingested `2022-11-14 12:08:46.574295 +0100`, for instance, Tinybird sends `"2022-11-14 11:08:46"` back for a `DateTime`, and `"2022-11-14 06:08:46"` for a `DateTime('America/New_York')`. Reference: https://www.tinybird.co/docs/api-reference/query-api */
|
|
46
|
+
export declare const querySql: API.OperationMethod<QuerySqlRequest, QuerySqlResponse, QuerySqlError, TinybirdOpContext>;
|
|
47
|
+
export type QuerySqlWithBodyError = TinybirdOpError;
|
|
48
|
+
/** Executes a SQL query using the engine, while providing a templated or non templated query string and the custom parameters that will be translated into the query. The custom parameters provided should not have the same name as the request parameters for this endpoint (outlined below), as they are reserved in order to get accurate results for your query. As a response, it gives you the query metadata, the resulting data and some performance statistics. Data can be fetched in different formats. Just append `FORMAT <format_name>` to your SQL query: As you can see in the example above, timestamps do not include a time zone in their serialization. Let's see how that relates to timestamps ingested from your original data: - If the original timestamp had no time zone associated, you'll read back the same date and time verbatim. If you ingested the timestamp `2022-11-14 11:08:46`, for example, Tinybird sends `"2022-11-14 11:08:46"` back. This is so regardless of the time zone of the column in ClickHouse. - If the original timestamp had a time zone associated, you'll read back the corresponding date and time in the time zone of the destination column in ClickHouse, which is UTC by default. If you ingested `2022-11-14 12:08:46.574295 +0100`, for instance, Tinybird sends `"2022-11-14 11:08:46"` back for a `DateTime`, and `"2022-11-14 06:08:46"` for a `DateTime('America/New_York')`. Reference: https://www.tinybird.co/docs/api-reference/query-api */
|
|
49
|
+
export declare const querySqlWithBody: API.OperationMethod<QuerySqlWithBodyRequest, QuerySqlWithBodyResponse, QuerySqlWithBodyError, TinybirdOpContext>;
|
|
50
|
+
//# sourceMappingURL=query.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query.d.ts","sources":["../../src/services/query.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAKnE,OAAO,EAAoB,KAAK,eAAe,EAAE,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAMhG,YAAY,EAAE,eAAe,EAAE,iBAAiB,EAAE,CAAC;AAcnD,MAAM,WAAW,eAAe;IAC9B,oBAAoB;IACpB,CAAC,EAAE,MAAM,CAAC;IACV,gJAAgJ;IAChJ,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,4HAA4H;IAC5H,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,yRAAyR;IACzR,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,oWAAoW;IACpW,uCAAuC,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7D,mPAAmP;IACnP,kCAAkC,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxD,8IAA8I;IAC9I,sCAAsC,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7D;AACD,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,YAAY,CAAC;IACnB,6FAA6F;IAC7F,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC;AACD,MAAM,WAAW,uBAAuB;IACtC,gJAAgJ;IAChJ,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,oWAAoW;IACpW,uCAAuC,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7D,mPAAmP;IACnP,kCAAkC,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxD,8IAA8I;IAC9I,sCAAsC,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5D,uFAAuF;IACvF,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AACD,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,YAAY,CAAC;IACnB,6FAA6F;IAC7F,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC;AACD,MAAM,MAAM,aAAa,GAAG,eAAe,CAAC;AAC5C,2nCAA2nC;AAC3nC,eAAO,MAAM,QAAQ,EAAE,GAAG,CAAC,eAAe,CACxC,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,iBAAiB,CAUhB,CAAC;AAEJ,MAAM,MAAM,qBAAqB,GAAG,eAAe,CAAC;AACpD,w7CAAw7C;AACx7C,eAAO,MAAM,gBAAgB,EAAE,GAAG,CAAC,eAAe,CAChD,uBAAuB,EACvB,wBAAwB,EACxB,qBAAqB,EACrB,iBAAiB,CAUhB,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Bc as e,Gc as t,Hc as n,a as r,b as i,errors$TinybirdServiceErrors as a,l as o,n as s,protocol$TinybirdProtocol as c,qc as l,rc as u,retry$Retry as d,tc as f,traits$BinaryResponse as p,traits$Header as m,traits$Http as h,traits$Query as g,traits$RawResponse as _,ub as v,uc as y,vc as b,zc as x}from"../_bundle/sdk.js";const S={system:`tinybird-api`,responseHeaders:[{header:`x-request-id`,name:`http.response.header.x-request-id`,transform:`list`},{header:`request-id`,name:`http.response.header.request-id`,transform:`list`}],prefix:`Tinybird`,service:`Query`,propagate:`w3c`};const C=/*@__PURE__*/ s(s=>s===r?o(`QuerySql`,`{input:#1,output:#8:0,errors:[],serviceErrors:$9,protocol:$10,retry:$11,telemetry:$12,span:"%"};$7(>2)@"%Request";$6({q:$3.pipe($2()),pipeline:$4($3.pipe($2())),explain:$4($3.pipe($2())),explain_settings:$4($3.pipe($2())),output_format_json_quote_64bit_integers:$4($5.pipe($2())),output_format_json_quote_denormals:$4($5.pipe($2())),output_format_parquet_string_as_string:$4($5.pipe($2()))}).pipe($1({method:"GET",uri:"/v0/sql",code:200}))`,[e,h,g,f,t,l,y,n,__d0,a,c,d,S]):i(C,s));const w=/*@__PURE__*/ s(s=>s===r?o(`QuerySqlWithBody`,`{input:#1,output:#11:0,errors:[],serviceErrors:$12,protocol:$13,retry:$14,telemetry:$15,span:"%"};$10(>2)@"%Request";$9($6({pipeline:$4($3.pipe($2())),output_format_json_quote_64bit_integers:$4($5.pipe($2())),output_format_json_quote_denormals:$4($5.pipe($2())),output_format_parquet_string_as_string:$4($5.pipe($2())),q:$3}),[$8($3,$7)]).pipe($1({method:"POST",uri:"/v0/sql",code:200}))`,[e,h,g,f,t,l,y,x,u,b,n,__d0,a,c,d,S]):i(w,s));function __d0(){return[`$8(>1)@"QuerySqlResponse";$7({body:$3.pipe($1(),$2()),contentType:$6($5.pipe($4("Content-Type")))})`,[e,_,p,v,m,f,t,y,n]]}export{C as querySql,w as querySqlWithBody};
|
|
2
|
+
//# sourceMappingURL=query.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query.js","names":["API.D","API.named","__L.at","T.Http","T.Query","S.String","S.optional","S.Number","S.Struct","S.suspend","Retry.Retry","API.call","S.Unknown","S.Record","S.StructWithRest","T.RawResponse","T.BinaryResponse","T.Header","at","optional","suspend","D","call","TinybirdServiceErrors","named","op","TinybirdProtocol","Number","Record","Retry","String","BinaryResponse","Header","Http","Query","RawResponse","BinaryStream","Struct","StructWithRest","Unknown","TELEMETRY","querySql","i","querySqlWithBody"],"sources":["../../src/services/query.ts"],"mappings":"sUAaA,MAAMwC,EAAY,CAChB,OAAQ,eACR,gBAAiB,CACf,CAAE,OAAQ,eAAgB,KAAM,oCAAqC,UAAW,MAAO,EACvF,CAAE,OAAQ,aAAc,KAAM,kCAAmC,UAAW,MAAO,CACrF,EACA,OAAQ,WACR,QAAS,QACT,UAAW,KACb,EA2CA,MAAaC,EAKK,gBAAQ,GAAgBC,IAAM1C,EAAQC,EAAU,WAAY,0bAA2b,CAACC,EAAQC,EAAQC,EAASC,EAAUC,EAAYC,EAAUC,EAAUC,EAAW,KAAMc,EAAuBG,EAAkBhB,EAAa8B,CAAS,CAAC,EAAI7B,EAAS8B,EAAUC,CAAC,CAAC,EAIvrB,MAAaC,EAKK,gBAAQ,GAAgBD,IAAM1C,EAAQC,EAAU,mBAAoB,sYAAuY,CAACC,EAAQC,EAAQC,EAASC,EAAUC,EAAYC,EAAUC,EAAUI,EAAWC,EAAUC,EAAkBL,EAAW,KAAMc,EAAuBG,EAAkBhB,EAAa8B,CAAS,CAAC,EAAI7B,EAASgC,EAAkBD,CAAC,CAAC,EAM1rB,SAAS,MAAY,CACnB,MAAO,CAAC,sGAAuG,CAACxC,EAAQa,EAAeC,EAAkBoB,EAAcnB,EAAUZ,EAAUC,EAAYE,EAAUC,CAAS,CAAC,CAC7N"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import * as API from "@distilled.cloud/core/api";
|
|
2
|
+
import { type TinybirdOpError, type TinybirdOpContext } from "../protocol.ts";
|
|
3
|
+
export type { TinybirdOpError, TinybirdOpContext };
|
|
4
|
+
export interface CreatePipeNodeSinkRequest {
|
|
5
|
+
pipe_id: string;
|
|
6
|
+
node_id: string;
|
|
7
|
+
/** Name of the connection to holding the credentials to run the sink */
|
|
8
|
+
connection?: string | undefined;
|
|
9
|
+
/** Object store prefix into which the sink writes data */
|
|
10
|
+
path?: string | undefined;
|
|
11
|
+
/** File template string. See [file template](/classic/publish-data/sinks/s3-sink#file-template) for more details */
|
|
12
|
+
file_template?: string | undefined;
|
|
13
|
+
/** Optional. Format of the exported files. Default: CSV */
|
|
14
|
+
format?: string | undefined;
|
|
15
|
+
/** Optional. Compression of the output files. Default: None */
|
|
16
|
+
compression?: string | undefined;
|
|
17
|
+
/** Optional. The sink's execution schedule, in crontab format. */
|
|
18
|
+
schedule_cron?: string | undefined;
|
|
19
|
+
/** Optional. Sink service. Set to `kafka` to create a Kafka Sink; otherwise the Sink writes to object storage. */
|
|
20
|
+
service?: string | undefined;
|
|
21
|
+
/** Optional. Kafka topic to write to. Used by Kafka Sinks. */
|
|
22
|
+
topic?: string | undefined;
|
|
23
|
+
/** Optional. Default: `false`. Set to `true` to skip the validation of the Node SQL when creating the Sink. */
|
|
24
|
+
ignore_sql_errors?: boolean | undefined;
|
|
25
|
+
/** Optional. Default: `false`. Set to `true` to validate the request without creating the Sink. Returns `{"dry_run_passed": true}`. */
|
|
26
|
+
dry_run?: boolean | undefined;
|
|
27
|
+
/** Optional. Default: `create_new`. The sink's write strategy for filenames already existing in the bucket. Values: `create_new`, `replace`; `create_new` adds a new file with a suffix, while `replace` replaces the existent file. The legacy values `new` and `truncate` are still accepted. */
|
|
28
|
+
write_strategy?: string | undefined;
|
|
29
|
+
}
|
|
30
|
+
export type CreatePipeNodeSinkResponseBodyMap = {
|
|
31
|
+
[key: string]: unknown | undefined;
|
|
32
|
+
};
|
|
33
|
+
export type CreatePipeNodeSinkResponse = CreatePipeNodeSinkResponseBodyMap;
|
|
34
|
+
export interface DeletePipeNodeSinkRequest {
|
|
35
|
+
pipe_id: string;
|
|
36
|
+
node_id: string;
|
|
37
|
+
}
|
|
38
|
+
export type DeletePipeNodeSinkResponseBodyMap = {
|
|
39
|
+
[key: string]: unknown | undefined;
|
|
40
|
+
};
|
|
41
|
+
export type DeletePipeNodeSinkResponse = DeletePipeNodeSinkResponseBodyMap;
|
|
42
|
+
export interface GetS3SettingsRequest {
|
|
43
|
+
}
|
|
44
|
+
export type GetS3SettingsResponseBodyMap = {
|
|
45
|
+
[key: string]: unknown | undefined;
|
|
46
|
+
};
|
|
47
|
+
export type GetS3SettingsResponse = GetS3SettingsResponseBodyMap;
|
|
48
|
+
export interface GetS3TrustPolicyRequest {
|
|
49
|
+
}
|
|
50
|
+
export type GetS3TrustPolicyResponseBodyMap = {
|
|
51
|
+
[key: string]: unknown | undefined;
|
|
52
|
+
};
|
|
53
|
+
export type GetS3TrustPolicyResponse = GetS3TrustPolicyResponseBodyMap;
|
|
54
|
+
export interface GetS3WriteAccessPolicyRequest {
|
|
55
|
+
/** Bucket to use for rendering the template. If not provided the '<bucket>' placeholder is used */
|
|
56
|
+
bucket?: string | undefined;
|
|
57
|
+
}
|
|
58
|
+
export type GetS3WriteAccessPolicyResponseBodyMap = {
|
|
59
|
+
[key: string]: unknown | undefined;
|
|
60
|
+
};
|
|
61
|
+
export type GetS3WriteAccessPolicyResponse = GetS3WriteAccessPolicyResponseBodyMap;
|
|
62
|
+
export interface TriggerPipeSinkRequest {
|
|
63
|
+
pipe_id: string;
|
|
64
|
+
/** File template string. See [file template](/classic/publish-data/sinks/s3-sink#file-template) for more details */
|
|
65
|
+
file_template?: string | undefined;
|
|
66
|
+
/** Optional. Format of the exported files. Default: CSV */
|
|
67
|
+
format?: string | undefined;
|
|
68
|
+
/** Optional. Compression of the output files. Default: None */
|
|
69
|
+
compression?: string | undefined;
|
|
70
|
+
/** Optional. The sink's write strategy for filenames already existing in the bucket. Values: `create_new`, `replace`; `create_new` adds a new file with a suffix, while `replace` replaces the existent file. The legacy values `new` and `truncate` are still accepted. */
|
|
71
|
+
write_strategy?: string | undefined;
|
|
72
|
+
}
|
|
73
|
+
export type TriggerPipeSinkResponseBodyMap = {
|
|
74
|
+
[key: string]: unknown | undefined;
|
|
75
|
+
};
|
|
76
|
+
export type TriggerPipeSinkResponse = TriggerPipeSinkResponseBodyMap;
|
|
77
|
+
export type CreatePipeNodeSinkError = TinybirdOpError;
|
|
78
|
+
/** Set the Pipe as a Sink Pipe, optionally scheduled. Required token permission is `PIPES:CREATE`. - You can set only one schedule per Sink Pipe. - You can't set a Sink Pipe if the Pipe is already materializing. You must unlink the Materialization first. - You can't set a Sink Pipe if the Pipe is already an API Endpoint. You must unpublish the Endpoint first. - You can't set a Sink Pipe if the Pipe is already copying. You must unset the copy first. - Sink Pipes aren't available on the Free plan. The request returns a `400` error. - In Tinybird Forward, this endpoint returns a `403` error. Define Sink Pipes in your datafiles and deploy them. Reference: https://www.tinybird.co/docs/api-reference/sink-pipes-api */
|
|
79
|
+
export declare const createPipeNodeSink: API.OperationMethod<CreatePipeNodeSinkRequest, CreatePipeNodeSinkResponse, CreatePipeNodeSinkError, TinybirdOpContext>;
|
|
80
|
+
export type DeletePipeNodeSinkError = TinybirdOpError;
|
|
81
|
+
/** Removes the Sink from the Pipe. This doesn't delete the Pipe nor the Node, only the sink configuration and any associated settings. Reference: https://www.tinybird.co/docs/api-reference/sink-pipes-api */
|
|
82
|
+
export declare const deletePipeNodeSink: API.OperationMethod<DeletePipeNodeSinkRequest, DeletePipeNodeSinkResponse, DeletePipeNodeSinkError, TinybirdOpContext>;
|
|
83
|
+
export type GetS3SettingsError = TinybirdOpError;
|
|
84
|
+
/** Retrieves the settings to attach to the IAM role used for the connection. External IDs differ for each Workspace but are shared between Branches of the same Workspace, so you don't need to generate specific IAM roles for each Branch. Reference: https://www.tinybird.co/docs/api-reference/sink-pipes-api */
|
|
85
|
+
export declare const getS3Settings: API.OperationMethod<GetS3SettingsRequest, GetS3SettingsResponse, GetS3SettingsError, TinybirdOpContext>;
|
|
86
|
+
export type GetS3TrustPolicyError = TinybirdOpError;
|
|
87
|
+
/** Retrieves the trust policy to attach to the IAM role used for the connection. External IDs differ for each Workspace but are shared between Branches of the same Workspace, so you don't need to change the trust policy for each Branch. Reference: https://www.tinybird.co/docs/api-reference/sink-pipes-api */
|
|
88
|
+
export declare const getS3TrustPolicy: API.OperationMethod<GetS3TrustPolicyRequest, GetS3TrustPolicyResponse, GetS3TrustPolicyError, TinybirdOpContext>;
|
|
89
|
+
export type GetS3WriteAccessPolicyError = TinybirdOpError;
|
|
90
|
+
/** Retrieves the trust policy to attach to the IAM role used for the connection. External IDs differ for each Workspace but are shared between Branches of the same Workspace, so you don't need to change the trust policy for each Branch. Reference: https://www.tinybird.co/docs/api-reference/sink-pipes-api */
|
|
91
|
+
export declare const getS3WriteAccessPolicy: API.OperationMethod<GetS3WriteAccessPolicyRequest, GetS3WriteAccessPolicyResponse, GetS3WriteAccessPolicyError, TinybirdOpContext>;
|
|
92
|
+
export type TriggerPipeSinkError = TinybirdOpError;
|
|
93
|
+
/** Triggers the Sink Pipe and creates a sink job. You can override some sink settings for this execution. Reference: https://www.tinybird.co/docs/api-reference/sink-pipes-api */
|
|
94
|
+
export declare const triggerPipeSink: API.OperationMethod<TriggerPipeSinkRequest, TriggerPipeSinkResponse, TriggerPipeSinkError, TinybirdOpContext>;
|
|
95
|
+
//# sourceMappingURL=sink_pipes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sink_pipes.d.ts","sources":["../../src/services/sink_pipes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AAKjD,OAAO,EAAoB,KAAK,eAAe,EAAE,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAMhG,YAAY,EAAE,eAAe,EAAE,iBAAiB,EAAE,CAAC;AAenD,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,wEAAwE;IACxE,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,0DAA0D;IAC1D,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,oHAAoH;IACpH,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,2DAA2D;IAC3D,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,+DAA+D;IAC/D,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,kEAAkE;IAClE,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,kHAAkH;IAClH,OAAO,CAAC,EAAE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xB,qBAAqB,EACrB,iBAAiB,CAUhB,CAAC;AAEJ,MAAM,MAAM,2BAA2B,GAAG,eAAe,CAAC;AAC1D,qTAAqT;AACrT,eAAO,MAAM,sBAAsB,EAAE,GAAG,CAAC,eAAe,CACtD,6BAA6B,EAC7B,8BAA8B,EAC9B,2BAA2B,EAC3B,iBAAiB,CAUhB,CAAC;AAEJ,MAAM,MAAM,oBAAoB,GAAG,eAAe,CAAC;AACnD,kLAAkL;AAClL,eAAO,MAAM,eAAe,EAAE,GAAG,CAAC,eAAe,CAC/C,sBAAsB,EACtB,uBAAuB,EACvB,oBAAoB,EACpB,iBAAiB,CAUhB,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Bc as e,Gc as t,Hc as n,a as r,b as i,errors$TinybirdServiceErrors as a,hc as o,l as s,n as c,protocol$TinybirdProtocol as l,rc as u,retry$Retry as d,tc as f,traits$Http as p,traits$Label as m,traits$Query as h,traits$RawResponseRoot as g,uc as _,zc as v}from"../_bundle/sdk.js";const y={system:`tinybird-api`,responseHeaders:[{header:`x-request-id`,name:`http.response.header.x-request-id`,transform:`list`},{header:`request-id`,name:`http.response.header.request-id`,transform:`list`}],prefix:`Tinybird`,service:`SinkPipes`,labels:`tinybird`,propagate:`w3c`};const b=/*@__PURE__*/ c(c=>c===r?s(`CreatePipeNodeSink`,`{input:#1,output:#9:1,errors:[],serviceErrors:$10,protocol:$11,retry:$12,telemetry:$13,span:"%"};$8(>2)@"%Request";$7({pipe_id:$3.pipe($2()),node_id:$3.pipe($2()),connection:$5($3.pipe($4())),path:$5($3.pipe($4())),file_template:$5($3.pipe($4())),format:$5($3.pipe($4())),compression:$5($3.pipe($4())),schedule_cron:$5($3.pipe($4())),service:$5($3.pipe($4())),topic:$5($3.pipe($4())),ignore_sql_errors:$5($6.pipe($4())),dry_run:$5($6.pipe($4())),write_strategy:$5($3.pipe($4()))}).pipe($1({method:"POST",uri:"/v0/pipes/{pipe_id}/nodes/{node_id}/sink",code:200}))`,[e,p,m,f,h,t,o,_,n,__d0,a,l,d,y]):i(b,c));const x=/*@__PURE__*/ c(t=>t===r?s(`DeletePipeNodeSink`,`{input:#1,output:#6:1,errors:[],serviceErrors:$7,protocol:$8,retry:$9,telemetry:$10,span:"%"};$5(>2)@"%Request";$4({pipe_id:$3.pipe($2()),node_id:$3.pipe($2())}).pipe($1({method:"DELETE",uri:"/v0/pipes/{pipe_id}/nodes/{node_id}/sink",code:200}))`,[e,p,m,f,_,n,__d0,a,l,d,y]):i(x,t));const S=/*@__PURE__*/ c(t=>t===r?s(`GetS3Settings`,`{input:#1,output:#4:1,errors:[],serviceErrors:$5,protocol:$6,retry:$7,telemetry:$8,span:"%"};$3(>2)@"%Request";$2({}).pipe($1({method:"GET",uri:"/v0/integrations/s3/settings",code:200}))`,[e,p,_,n,__d0,a,l,d,y]):i(S,t));const C=/*@__PURE__*/ c(t=>t===r?s(`GetS3TrustPolicy`,`{input:#1,output:#4:1,errors:[],serviceErrors:$5,protocol:$6,retry:$7,telemetry:$8,span:"%"};$3(>2)@"%Request";$2({}).pipe($1({method:"GET",uri:"/v0/integrations/s3/policies/trust-policy",code:200}))`,[e,p,_,n,__d0,a,l,d,y]):i(C,t));const w=/*@__PURE__*/ c(o=>o===r?s(`GetS3WriteAccessPolicy`,`{input:#1,output:#7:1,errors:[],serviceErrors:$8,protocol:$9,retry:$10,telemetry:$11,span:"%"};$6(>2)@"%Request";$5({bucket:$4($3.pipe($2()))}).pipe($1({method:"GET",uri:"/v0/integrations/s3/policies/write-access-policy",code:200}))`,[e,p,h,f,t,_,n,__d0,a,l,d,y]):i(w,o));const T=/*@__PURE__*/ c(o=>o===r?s(`TriggerPipeSink`,`{input:#1,output:#8:1,errors:[],serviceErrors:$9,protocol:$10,retry:$11,telemetry:$12,span:"%"};$7(>2)@"%Request";$6({pipe_id:$3.pipe($2()),file_template:$5($3.pipe($4())),format:$5($3.pipe($4())),compression:$5($3.pipe($4())),write_strategy:$5($3.pipe($4()))}).pipe($1({method:"POST",uri:"/v0/pipes/{pipe_id}/sink",code:200}))`,[e,p,m,f,h,t,_,n,__d0,a,l,d,y]):i(T,o));function __d0(){return[`$3($1,$2);$5(>2)@"CreatePipeNodeSinkResponse";#0.pipe($4())`,[e,f,v,u,g,n]]}export{b as createPipeNodeSink,x as deletePipeNodeSink,S as getS3Settings,C as getS3TrustPolicy,w as getS3WriteAccessPolicy,T as triggerPipeSink};
|
|
2
|
+
//# sourceMappingURL=sink_pipes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sink_pipes.js","names":["API.D","API.named","__L.at","T.Http","T.Label","S.String","T.Query","S.optional","S.Boolean","S.Struct","S.suspend","Retry.Retry","API.call","S.Unknown","S.Record","T.RawResponseRoot","at","optional","suspend","D","call","TinybirdServiceErrors","Boolean","named","op","TinybirdProtocol","Record","Retry","String","Http","Label","Query","RawResponseRoot","Struct","Unknown","TELEMETRY","createPipeNodeSink","i","deletePipeNodeSink","getS3Settings","getS3TrustPolicy","getS3WriteAccessPolicy","triggerPipeSink"],"sources":["../../src/services/sink_pipes.ts"],"mappings":"8RAYA,MAAMmC,EAAY,CAChB,OAAQ,eACR,gBAAiB,CACf,CAAE,OAAQ,eAAgB,KAAM,oCAAqC,UAAW,MAAO,EACvF,CAAE,OAAQ,aAAc,KAAM,kCAAmC,UAAW,MAAO,CACrF,EACA,OAAQ,WACR,QAAS,YACT,OAAQ,WACR,UAAW,KACb,EA+DA,MAAaC,EAKK,gBAAQ,GAAgBC,IAAMrC,EAAQC,EAAU,qBAAsB,qjBAAsjB,CAACC,EAAQC,EAAQC,EAASC,EAAUC,EAASC,EAAYC,EAAWC,EAAUC,EAAW,KAAMW,EAAuBI,EAAkBd,EAAawB,CAAS,CAAC,EAAIvB,EAASwB,EAAoBC,CAAC,CAAC,EAIh1B,MAAaC,EAKK,gBAAQ,GAAgBD,IAAMrC,EAAQC,EAAU,qBAAsB,wPAAyP,CAACC,EAAQC,EAAQC,EAASC,EAAUI,EAAUC,EAAW,KAAMW,EAAuBI,EAAkBd,EAAawB,CAAS,CAAC,EAAIvB,EAAS0B,EAAoBD,CAAC,CAAC,EAInf,MAAaE,EAKK,gBAAQ,GAAgBF,IAAMrC,EAAQC,EAAU,gBAAiB,6LAA8L,CAACC,EAAQC,EAAQM,EAAUC,EAAW,KAAMW,EAAuBI,EAAkBd,EAAawB,CAAS,CAAC,EAAIvB,EAAS2B,EAAeF,CAAC,CAAC,EAI3Z,MAAaG,EAKK,gBAAQ,GAAgBH,IAAMrC,EAAQC,EAAU,mBAAoB,0MAA2M,CAACC,EAAQC,EAAQM,EAAUC,EAAW,KAAMW,EAAuBI,EAAkBd,EAAawB,CAAS,CAAC,EAAIvB,EAAS4B,EAAkBH,CAAC,CAAC,EAI9a,MAAaI,EAKK,gBAAQ,GAAgBJ,IAAMrC,EAAQC,EAAU,yBAA0B,2OAA4O,CAACC,EAAQC,EAAQG,EAASD,EAAUE,EAAYE,EAAUC,EAAW,KAAMW,EAAuBI,EAAkBd,EAAawB,CAAS,CAAC,EAAIvB,EAAS6B,EAAwBJ,CAAC,CAAC,EAI1f,MAAaK,EAKK,gBAAQ,GAAgBL,IAAMrC,EAAQC,EAAU,kBAAmB,0UAA2U,CAACC,EAAQC,EAAQC,EAASC,EAAUC,EAASC,EAAYE,EAAUC,EAAW,KAAMW,EAAuBI,EAAkBd,EAAawB,CAAS,CAAC,EAAIvB,EAAS8B,EAAiBL,CAAC,CAAC,EAMplB,SAAS,MAAY,CACnB,MAAO,CAAC,8DAA+D,CAACnC,EAAQG,EAAUQ,EAAWC,EAAUC,EAAmBL,CAAS,CAAC,CAC9I"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import * as API from "@distilled.cloud/core/api";
|
|
2
|
+
import type * as Redacted from "effect/Redacted";
|
|
3
|
+
import { type TinybirdOpError, type TinybirdOpContext } from "../protocol.ts";
|
|
4
|
+
export type { TinybirdOpError, TinybirdOpContext };
|
|
5
|
+
export type ScopeList = Array<string>;
|
|
6
|
+
export type JwtFixedParams = {
|
|
7
|
+
[key: string]: unknown | undefined;
|
|
8
|
+
};
|
|
9
|
+
export interface JwtScope {
|
|
10
|
+
/** Scope type, e.g. `PIPES:READ` or `DATASOURCES:READ`. */
|
|
11
|
+
type: string;
|
|
12
|
+
/** The Pipe or Data Source the scope grants. */
|
|
13
|
+
resource: string;
|
|
14
|
+
/** Template parameters pinned into the token: every query made with it uses these values, whatever the caller sends. */
|
|
15
|
+
fixed_params?: JwtFixedParams | undefined;
|
|
16
|
+
}
|
|
17
|
+
export type JwtScopeList = Array<JwtScope>;
|
|
18
|
+
export interface CreateTokenRequest {
|
|
19
|
+
/** Name of the token */
|
|
20
|
+
name?: string | undefined;
|
|
21
|
+
/** Optional. Markdown text with a description of the token. */
|
|
22
|
+
description?: string | undefined;
|
|
23
|
+
/** Scope(s) to set. Format is [SCOPE:TYPE[:arg][:filter]](#id2). This is only used for the Static Tokens */
|
|
24
|
+
scope?: ScopeList | undefined;
|
|
25
|
+
/** Optional. Expiry as a Unix timestamp in seconds. When set, the token is created as a JWT with the `scopes` of the body. */
|
|
26
|
+
expiration_time?: number | undefined;
|
|
27
|
+
/** JWT scopes, sent as the JSON body. Only used with `expiration_time`; static tokens take `scope`. */
|
|
28
|
+
scopes?: JwtScopeList | undefined;
|
|
29
|
+
}
|
|
30
|
+
export interface TokenScope {
|
|
31
|
+
/** Scope type, e.g. `ADMIN`, `PIPES:READ`, `DATASOURCES:APPEND`. */
|
|
32
|
+
type?: string | undefined;
|
|
33
|
+
/** The resource the scope applies to, when it is resource-scoped. */
|
|
34
|
+
resource?: string | undefined;
|
|
35
|
+
/** SQL filter of a resource-scoped read scope. */
|
|
36
|
+
filter?: string | undefined;
|
|
37
|
+
/** Template parameters pinned into a JWT scope. */
|
|
38
|
+
fixed_params?: JwtFixedParams | undefined;
|
|
39
|
+
}
|
|
40
|
+
export type TokenScopeList = Array<TokenScope>;
|
|
41
|
+
export interface Token {
|
|
42
|
+
id?: string | undefined;
|
|
43
|
+
/** The token value. */
|
|
44
|
+
token?: string | Redacted.Redacted<string> | undefined;
|
|
45
|
+
scopes?: TokenScopeList | undefined;
|
|
46
|
+
name?: string | undefined;
|
|
47
|
+
description?: string | undefined;
|
|
48
|
+
origin?: unknown | undefined;
|
|
49
|
+
host?: string | undefined;
|
|
50
|
+
is_internal?: boolean | undefined;
|
|
51
|
+
/** JWT expiry as a Unix timestamp in seconds. Only on JWTs. */
|
|
52
|
+
exp?: number | undefined;
|
|
53
|
+
}
|
|
54
|
+
export type CreateTokenResponse = Token;
|
|
55
|
+
export interface DeleteTokenRequest {
|
|
56
|
+
token: string | Redacted.Redacted<string>;
|
|
57
|
+
}
|
|
58
|
+
export type DeleteTokenResponseBodyMap = {
|
|
59
|
+
[key: string]: unknown | undefined;
|
|
60
|
+
};
|
|
61
|
+
export type DeleteTokenResponse = DeleteTokenResponseBodyMap;
|
|
62
|
+
export interface GetTokenRequest {
|
|
63
|
+
token: string | Redacted.Redacted<string>;
|
|
64
|
+
}
|
|
65
|
+
export type GetTokenResponse = Token;
|
|
66
|
+
export interface ListTokensRequest {
|
|
67
|
+
}
|
|
68
|
+
export type TokenList = Array<Token>;
|
|
69
|
+
export interface Tokens {
|
|
70
|
+
tokens?: TokenList | undefined;
|
|
71
|
+
}
|
|
72
|
+
export type ListTokensResponse = Tokens;
|
|
73
|
+
export interface RefreshTokenRequest {
|
|
74
|
+
token: string | Redacted.Redacted<string>;
|
|
75
|
+
/** Token. Ensure it has the `TOKENS` scope on it */
|
|
76
|
+
auth_token?: string | Redacted.Redacted<string> | undefined;
|
|
77
|
+
}
|
|
78
|
+
export type RefreshTokenResponse = Token;
|
|
79
|
+
export interface UpdateTokenRequest {
|
|
80
|
+
token: string | Redacted.Redacted<string>;
|
|
81
|
+
/** Optional. Name of the token. */
|
|
82
|
+
name?: string | undefined;
|
|
83
|
+
/** Optional. Markdown text with a description of the token. */
|
|
84
|
+
description?: string | undefined;
|
|
85
|
+
/** Optional. Scope(s) to set. Format is [SCOPE:TYPE[:arg][:filter]](#id2). New scope(s) will override existing ones. */
|
|
86
|
+
scope?: ScopeList | undefined;
|
|
87
|
+
}
|
|
88
|
+
export type UpdateTokenResponse = Token;
|
|
89
|
+
export type CreateTokenError = TinybirdOpError;
|
|
90
|
+
/** Creates a new Token: Static or JWT When creating a token with `filter` whenever you use the token to read the table, it will be filtered. For example, if table is `events_table` and `filter` is `date > '2018-01-01' and type == 'foo'` a query like `select count(1) from events_table` will become `select count(1) from events_table where date > '2018-01-01' and type == 'foo'` If we provide an `expiration_time` in the URL, the token will be created as a JWT Token. In multi-tenant applications, you can use this endpoint to create a JWT token for a specific tenant where each user has their own token with a fixed set of scopes and parameters Reference: https://www.tinybird.co/docs/api-reference/token-api */
|
|
91
|
+
export declare const createToken: API.OperationMethod<CreateTokenRequest, CreateTokenResponse, CreateTokenError, TinybirdOpContext>;
|
|
92
|
+
export type DeleteTokenError = TinybirdOpError;
|
|
93
|
+
/** Deletes a Static Token . Reference: https://www.tinybird.co/docs/api-reference/token-api */
|
|
94
|
+
export declare const deleteToken: API.OperationMethod<DeleteTokenRequest, DeleteTokenResponse, DeleteTokenError, TinybirdOpContext>;
|
|
95
|
+
export type GetTokenError = TinybirdOpError;
|
|
96
|
+
/** Fetches information about a particular Static Token. Returns a json with name and scopes. Reference: https://www.tinybird.co/docs/api-reference/token-api */
|
|
97
|
+
export declare const getToken: API.OperationMethod<GetTokenRequest, GetTokenResponse, GetTokenError, TinybirdOpContext>;
|
|
98
|
+
export type ListTokensError = TinybirdOpError;
|
|
99
|
+
/** Retrieves all workspace Static Tokens. A list of your Static Tokens and their scopes will be sent in the response. Reference: https://www.tinybird.co/docs/api-reference/token-api */
|
|
100
|
+
export declare const listTokens: API.OperationMethod<ListTokensRequest, ListTokensResponse, ListTokensError, TinybirdOpContext>;
|
|
101
|
+
export type RefreshTokenError = TinybirdOpError;
|
|
102
|
+
/** Refresh the Static Token without modifying name, scopes or any other attribute. Specially useful when a Token is leaked, or when you need to rotate a Token. A member token can always refresh itself, even with the Viewer role. When successfully refreshing a token, new information will be sent in the response Reference: https://www.tinybird.co/docs/api-reference/token-api */
|
|
103
|
+
export declare const refreshToken: API.OperationMethod<RefreshTokenRequest, RefreshTokenResponse, RefreshTokenError, TinybirdOpContext>;
|
|
104
|
+
export type UpdateTokenError = TinybirdOpError;
|
|
105
|
+
/** Modifies a Static Token. More than one scope can be sent per request, all of them will be added as Token scopes. Every time a Token scope is modified, it overrides the existing one(s). Reference: https://www.tinybird.co/docs/api-reference/token-api */
|
|
106
|
+
export declare const updateToken: API.OperationMethod<UpdateTokenRequest, UpdateTokenResponse, UpdateTokenError, TinybirdOpContext>;
|
|
107
|
+
//# sourceMappingURL=token.d.ts.map
|