@katerai/sdk 0.6.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +34 -0
- package/README.md +23 -16
- package/client.d.mts +10 -13
- package/client.d.mts.map +1 -1
- package/client.d.ts +10 -13
- package/client.d.ts.map +1 -1
- package/client.js +37 -15
- package/client.js.map +1 -1
- package/client.mjs +37 -15
- package/client.mjs.map +1 -1
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js +2 -1
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs +2 -1
- package/internal/utils/log.mjs.map +1 -1
- package/package.json +2 -2
- package/resources/index.d.mts +0 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +0 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +1 -5
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +0 -2
- package/resources/index.mjs.map +1 -1
- package/resources/v1/compiler.d.mts +1116 -0
- package/resources/v1/compiler.d.mts.map +1 -0
- package/resources/v1/compiler.d.ts +1116 -0
- package/resources/v1/compiler.d.ts.map +1 -0
- package/resources/v1/compiler.js +70 -0
- package/resources/v1/compiler.js.map +1 -0
- package/resources/v1/compiler.mjs +66 -0
- package/resources/v1/compiler.mjs.map +1 -0
- package/resources/v1/connections.d.mts +216 -1
- package/resources/v1/connections.d.mts.map +1 -1
- package/resources/v1/connections.d.ts +216 -1
- package/resources/v1/connections.d.ts.map +1 -1
- package/resources/v1/connections.js +22 -2
- package/resources/v1/connections.js.map +1 -1
- package/resources/v1/connections.mjs +20 -1
- package/resources/v1/connections.mjs.map +1 -1
- package/resources/v1/index.d.mts +3 -6
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +3 -6
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js +7 -13
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs +2 -5
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/tenants/groups.d.mts +5 -5
- package/resources/v1/tenants/groups.d.mts.map +1 -1
- package/resources/v1/tenants/groups.d.ts +5 -5
- package/resources/v1/tenants/groups.d.ts.map +1 -1
- package/resources/v1/tenants/groups.js +1 -1
- package/resources/v1/tenants/groups.js.map +1 -1
- package/resources/v1/tenants/groups.mjs +1 -1
- package/resources/v1/tenants/groups.mjs.map +1 -1
- package/resources/v1/tenants/index.d.mts +2 -4
- package/resources/v1/tenants/index.d.mts.map +1 -1
- package/resources/v1/tenants/index.d.ts +2 -4
- package/resources/v1/tenants/index.d.ts.map +1 -1
- package/resources/v1/tenants/index.js +1 -5
- package/resources/v1/tenants/index.js.map +1 -1
- package/resources/v1/tenants/index.mjs +0 -2
- package/resources/v1/tenants/index.mjs.map +1 -1
- package/resources/v1/tenants/tenants.d.mts +72 -151
- package/resources/v1/tenants/tenants.d.mts.map +1 -1
- package/resources/v1/tenants/tenants.d.ts +72 -151
- package/resources/v1/tenants/tenants.d.ts.map +1 -1
- package/resources/v1/tenants/tenants.js +29 -72
- package/resources/v1/tenants/tenants.js.map +1 -1
- package/resources/v1/tenants/tenants.mjs +29 -72
- package/resources/v1/tenants/tenants.mjs.map +1 -1
- package/resources/v1/v1.d.mts +9 -21
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +9 -21
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js +6 -18
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs +6 -18
- package/resources/v1/v1.mjs.map +1 -1
- package/src/client.ts +48 -23
- package/src/internal/utils/log.ts +1 -0
- package/src/resources/index.ts +0 -2
- package/src/resources/v1/compiler.ts +1484 -0
- package/src/resources/v1/connections.ts +277 -1
- package/src/resources/v1/index.ts +23 -43
- package/src/resources/v1/tenants/groups.ts +5 -5
- package/src/resources/v1/tenants/index.ts +5 -24
- package/src/resources/v1/tenants/tenants.ts +89 -213
- package/src/resources/v1/v1.ts +49 -101
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/healthz.d.mts +0 -16
- package/resources/healthz.d.mts.map +0 -1
- package/resources/healthz.d.ts +0 -16
- package/resources/healthz.d.ts.map +0 -1
- package/resources/healthz.js +0 -15
- package/resources/healthz.js.map +0 -1
- package/resources/healthz.mjs +0 -11
- package/resources/healthz.mjs.map +0 -1
- package/resources/readyz.d.mts +0 -16
- package/resources/readyz.d.mts.map +0 -1
- package/resources/readyz.d.ts +0 -16
- package/resources/readyz.d.ts.map +0 -1
- package/resources/readyz.js +0 -15
- package/resources/readyz.js.map +0 -1
- package/resources/readyz.mjs +0 -11
- package/resources/readyz.mjs.map +0 -1
- package/resources/v1/connections/connections.d.mts +0 -1470
- package/resources/v1/connections/connections.d.mts.map +0 -1
- package/resources/v1/connections/connections.d.ts +0 -1470
- package/resources/v1/connections/connections.d.ts.map +0 -1
- package/resources/v1/connections/connections.js +0 -163
- package/resources/v1/connections/connections.js.map +0 -1
- package/resources/v1/connections/connections.mjs +0 -158
- package/resources/v1/connections/connections.mjs.map +0 -1
- package/resources/v1/connections/databases.d.mts +0 -25
- package/resources/v1/connections/databases.d.mts.map +0 -1
- package/resources/v1/connections/databases.d.ts +0 -25
- package/resources/v1/connections/databases.d.ts.map +0 -1
- package/resources/v1/connections/databases.js +0 -26
- package/resources/v1/connections/databases.js.map +0 -1
- package/resources/v1/connections/databases.mjs +0 -22
- package/resources/v1/connections/databases.mjs.map +0 -1
- package/resources/v1/connections/index.d.mts +0 -5
- package/resources/v1/connections/index.d.mts.map +0 -1
- package/resources/v1/connections/index.d.ts +0 -5
- package/resources/v1/connections/index.d.ts.map +0 -1
- package/resources/v1/connections/index.js +0 -13
- package/resources/v1/connections/index.js.map +0 -1
- package/resources/v1/connections/index.mjs +0 -6
- package/resources/v1/connections/index.mjs.map +0 -1
- package/resources/v1/connections/views.d.mts +0 -77
- package/resources/v1/connections/views.d.mts.map +0 -1
- package/resources/v1/connections/views.d.ts +0 -77
- package/resources/v1/connections/views.d.ts.map +0 -1
- package/resources/v1/connections/views.js +0 -24
- package/resources/v1/connections/views.js.map +0 -1
- package/resources/v1/connections/views.mjs +0 -20
- package/resources/v1/connections/views.mjs.map +0 -1
- package/resources/v1/connections/yaml.d.mts +0 -57
- package/resources/v1/connections/yaml.d.mts.map +0 -1
- package/resources/v1/connections/yaml.d.ts +0 -57
- package/resources/v1/connections/yaml.d.ts.map +0 -1
- package/resources/v1/connections/yaml.js +0 -22
- package/resources/v1/connections/yaml.js.map +0 -1
- package/resources/v1/connections/yaml.mjs +0 -18
- package/resources/v1/connections/yaml.mjs.map +0 -1
- package/resources/v1/github/github.d.mts +0 -99
- package/resources/v1/github/github.d.mts.map +0 -1
- package/resources/v1/github/github.d.ts +0 -99
- package/resources/v1/github/github.d.ts.map +0 -1
- package/resources/v1/github/github.js +0 -49
- package/resources/v1/github/github.js.map +0 -1
- package/resources/v1/github/github.mjs +0 -44
- package/resources/v1/github/github.mjs.map +0 -1
- package/resources/v1/github/index.d.mts +0 -5
- package/resources/v1/github/index.d.mts.map +0 -1
- package/resources/v1/github/index.d.ts +0 -5
- package/resources/v1/github/index.d.ts.map +0 -1
- package/resources/v1/github/index.js +0 -13
- package/resources/v1/github/index.js.map +0 -1
- package/resources/v1/github/index.mjs +0 -6
- package/resources/v1/github/index.mjs.map +0 -1
- package/resources/v1/github/repos.d.mts +0 -54
- package/resources/v1/github/repos.d.mts.map +0 -1
- package/resources/v1/github/repos.d.ts +0 -54
- package/resources/v1/github/repos.d.ts.map +0 -1
- package/resources/v1/github/repos.js +0 -22
- package/resources/v1/github/repos.js.map +0 -1
- package/resources/v1/github/repos.mjs +0 -18
- package/resources/v1/github/repos.mjs.map +0 -1
- package/resources/v1/github/scaffold.d.mts +0 -29
- package/resources/v1/github/scaffold.d.mts.map +0 -1
- package/resources/v1/github/scaffold.d.ts +0 -29
- package/resources/v1/github/scaffold.d.ts.map +0 -1
- package/resources/v1/github/scaffold.js +0 -21
- package/resources/v1/github/scaffold.js.map +0 -1
- package/resources/v1/github/scaffold.mjs +0 -17
- package/resources/v1/github/scaffold.mjs.map +0 -1
- package/resources/v1/github/webhooks.d.mts +0 -28
- package/resources/v1/github/webhooks.d.mts.map +0 -1
- package/resources/v1/github/webhooks.d.ts +0 -28
- package/resources/v1/github/webhooks.d.ts.map +0 -1
- package/resources/v1/github/webhooks.js +0 -27
- package/resources/v1/github/webhooks.js.map +0 -1
- package/resources/v1/github/webhooks.mjs +0 -23
- package/resources/v1/github/webhooks.mjs.map +0 -1
- package/resources/v1/github.d.mts +0 -2
- package/resources/v1/github.d.mts.map +0 -1
- package/resources/v1/github.d.ts +0 -2
- package/resources/v1/github.d.ts.map +0 -1
- package/resources/v1/github.js +0 -6
- package/resources/v1/github.js.map +0 -1
- package/resources/v1/github.mjs +0 -3
- package/resources/v1/github.mjs.map +0 -1
- package/resources/v1/groups/groups.d.mts +0 -162
- package/resources/v1/groups/groups.d.mts.map +0 -1
- package/resources/v1/groups/groups.d.ts +0 -162
- package/resources/v1/groups/groups.d.ts.map +0 -1
- package/resources/v1/groups/groups.js +0 -81
- package/resources/v1/groups/groups.js.map +0 -1
- package/resources/v1/groups/groups.mjs +0 -76
- package/resources/v1/groups/groups.mjs.map +0 -1
- package/resources/v1/groups/index.d.mts +0 -3
- package/resources/v1/groups/index.d.mts.map +0 -1
- package/resources/v1/groups/index.d.ts +0 -3
- package/resources/v1/groups/index.d.ts.map +0 -1
- package/resources/v1/groups/index.js +0 -9
- package/resources/v1/groups/index.js.map +0 -1
- package/resources/v1/groups/index.mjs +0 -4
- package/resources/v1/groups/index.mjs.map +0 -1
- package/resources/v1/groups/tenants.d.mts +0 -55
- package/resources/v1/groups/tenants.d.mts.map +0 -1
- package/resources/v1/groups/tenants.d.ts +0 -55
- package/resources/v1/groups/tenants.d.ts.map +0 -1
- package/resources/v1/groups/tenants.js +0 -39
- package/resources/v1/groups/tenants.js.map +0 -1
- package/resources/v1/groups/tenants.mjs +0 -35
- package/resources/v1/groups/tenants.mjs.map +0 -1
- package/resources/v1/groups.d.mts +0 -2
- package/resources/v1/groups.d.mts.map +0 -1
- package/resources/v1/groups.d.ts +0 -2
- package/resources/v1/groups.d.ts.map +0 -1
- package/resources/v1/groups.js +0 -6
- package/resources/v1/groups.js.map +0 -1
- package/resources/v1/groups.mjs +0 -3
- package/resources/v1/groups.mjs.map +0 -1
- package/resources/v1/me.d.mts +0 -43
- package/resources/v1/me.d.mts.map +0 -1
- package/resources/v1/me.d.ts +0 -43
- package/resources/v1/me.d.ts.map +0 -1
- package/resources/v1/me.js +0 -20
- package/resources/v1/me.js.map +0 -1
- package/resources/v1/me.mjs +0 -16
- package/resources/v1/me.mjs.map +0 -1
- package/resources/v1/org/client.d.mts +0 -53
- package/resources/v1/org/client.d.mts.map +0 -1
- package/resources/v1/org/client.d.ts +0 -53
- package/resources/v1/org/client.d.ts.map +0 -1
- package/resources/v1/org/client.js +0 -25
- package/resources/v1/org/client.js.map +0 -1
- package/resources/v1/org/client.mjs +0 -21
- package/resources/v1/org/client.mjs.map +0 -1
- package/resources/v1/org/index.d.mts +0 -4
- package/resources/v1/org/index.d.mts.map +0 -1
- package/resources/v1/org/index.d.ts +0 -4
- package/resources/v1/org/index.d.ts.map +0 -1
- package/resources/v1/org/index.js +0 -11
- package/resources/v1/org/index.js.map +0 -1
- package/resources/v1/org/index.mjs +0 -5
- package/resources/v1/org/index.mjs.map +0 -1
- package/resources/v1/org/org.d.mts +0 -14
- package/resources/v1/org/org.d.mts.map +0 -1
- package/resources/v1/org/org.d.ts +0 -14
- package/resources/v1/org/org.d.ts.map +0 -1
- package/resources/v1/org/org.js +0 -21
- package/resources/v1/org/org.js.map +0 -1
- package/resources/v1/org/org.mjs +0 -16
- package/resources/v1/org/org.mjs.map +0 -1
- package/resources/v1/org/users.d.mts +0 -87
- package/resources/v1/org/users.d.mts.map +0 -1
- package/resources/v1/org/users.d.ts +0 -87
- package/resources/v1/org/users.d.ts.map +0 -1
- package/resources/v1/org/users.js +0 -60
- package/resources/v1/org/users.js.map +0 -1
- package/resources/v1/org/users.mjs +0 -56
- package/resources/v1/org/users.mjs.map +0 -1
- package/resources/v1/org.d.mts +0 -2
- package/resources/v1/org.d.mts.map +0 -1
- package/resources/v1/org.d.ts +0 -2
- package/resources/v1/org.d.ts.map +0 -1
- package/resources/v1/org.js +0 -6
- package/resources/v1/org.js.map +0 -1
- package/resources/v1/org.mjs +0 -3
- package/resources/v1/org.mjs.map +0 -1
- package/resources/v1/tenants/batch.d.mts +0 -159
- package/resources/v1/tenants/batch.d.mts.map +0 -1
- package/resources/v1/tenants/batch.d.ts +0 -159
- package/resources/v1/tenants/batch.d.ts.map +0 -1
- package/resources/v1/tenants/batch.js +0 -42
- package/resources/v1/tenants/batch.js.map +0 -1
- package/resources/v1/tenants/batch.mjs +0 -38
- package/resources/v1/tenants/batch.mjs.map +0 -1
- package/resources/v1/tenants/import.d.mts +0 -126
- package/resources/v1/tenants/import.d.mts.map +0 -1
- package/resources/v1/tenants/import.d.ts +0 -126
- package/resources/v1/tenants/import.d.ts.map +0 -1
- package/resources/v1/tenants/import.js +0 -50
- package/resources/v1/tenants/import.js.map +0 -1
- package/resources/v1/tenants/import.mjs +0 -46
- package/resources/v1/tenants/import.mjs.map +0 -1
- package/src/resources/healthz.ts +0 -20
- package/src/resources/readyz.ts +0 -20
- package/src/resources/v1/connections/connections.ts +0 -1905
- package/src/resources/v1/connections/databases.ts +0 -42
- package/src/resources/v1/connections/index.ts +0 -33
- package/src/resources/v1/connections/views.ts +0 -112
- package/src/resources/v1/connections/yaml.ts +0 -81
- package/src/resources/v1/github/github.ts +0 -165
- package/src/resources/v1/github/index.ts +0 -20
- package/src/resources/v1/github/repos.ts +0 -85
- package/src/resources/v1/github/scaffold.ts +0 -44
- package/src/resources/v1/github/webhooks.ts +0 -60
- package/src/resources/v1/github.ts +0 -3
- package/src/resources/v1/groups/groups.ts +0 -218
- package/src/resources/v1/groups/index.ts +0 -10
- package/src/resources/v1/groups/tenants.ts +0 -78
- package/src/resources/v1/groups.ts +0 -3
- package/src/resources/v1/me.ts +0 -62
- package/src/resources/v1/org/client.ts +0 -81
- package/src/resources/v1/org/index.ts +0 -11
- package/src/resources/v1/org/org.ts +0 -32
- package/src/resources/v1/org/users.ts +0 -127
- package/src/resources/v1/org.ts +0 -3
- package/src/resources/v1/tenants/batch.ts +0 -200
- package/src/resources/v1/tenants/import.ts +0 -158
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { APIResource } from '../../../core/resource';
|
|
4
|
-
import { APIPromise } from '../../../core/api-promise';
|
|
5
|
-
import { buildHeaders } from '../../../internal/headers';
|
|
6
|
-
import { RequestOptions } from '../../../internal/request-options';
|
|
7
|
-
import { path } from '../../../internal/utils/path';
|
|
8
|
-
|
|
9
|
-
export class Databases extends APIResource {
|
|
10
|
-
/**
|
|
11
|
-
* Delete a schema from a connection.
|
|
12
|
-
*
|
|
13
|
-
* Soft-deletes the schema record, setting deleted_at and deleted_by fields. The
|
|
14
|
-
* connection_id and database_id path parameters provide context for the resource
|
|
15
|
-
* hierarchy, though the schema_id alone uniquely identifies the record.
|
|
16
|
-
*
|
|
17
|
-
* RLS: Filtered to current client (DualClientRLSDB).
|
|
18
|
-
*
|
|
19
|
-
* Raises: SchemaNotFoundError: If schema doesn't exist (404)
|
|
20
|
-
*/
|
|
21
|
-
deleteSchema(
|
|
22
|
-
schemaID: string,
|
|
23
|
-
params: DatabaseDeleteSchemaParams,
|
|
24
|
-
options?: RequestOptions,
|
|
25
|
-
): APIPromise<void> {
|
|
26
|
-
const { connection_id, database_id } = params;
|
|
27
|
-
return this._client.delete(
|
|
28
|
-
path`/api/v1/connections/${connection_id}/databases/${database_id}/schemas/${schemaID}`,
|
|
29
|
-
{ ...options, headers: buildHeaders([{ Accept: '*/*' }, options?.headers]) },
|
|
30
|
-
);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export interface DatabaseDeleteSchemaParams {
|
|
35
|
-
connection_id: string;
|
|
36
|
-
|
|
37
|
-
database_id: string;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export declare namespace Databases {
|
|
41
|
-
export { type DatabaseDeleteSchemaParams as DatabaseDeleteSchemaParams };
|
|
42
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
export {
|
|
4
|
-
Connections,
|
|
5
|
-
type Connection,
|
|
6
|
-
type DatabaseConfig,
|
|
7
|
-
type ConnectionListResponse,
|
|
8
|
-
type ConnectionApproveSyncResponse,
|
|
9
|
-
type ConnectionListSyncsResponse,
|
|
10
|
-
type ConnectionRetrieveCredentialResponse,
|
|
11
|
-
type ConnectionRetrieveSchemaResponse,
|
|
12
|
-
type ConnectionRetrieveSyncStatusResponse,
|
|
13
|
-
type ConnectionStreamSyncProgressResponse,
|
|
14
|
-
type ConnectionSyncResponse,
|
|
15
|
-
type ConnectionUpdateCredentialsResponse,
|
|
16
|
-
type ConnectionCreateParams,
|
|
17
|
-
type ConnectionUpdateParams,
|
|
18
|
-
type ConnectionListParams,
|
|
19
|
-
type ConnectionApproveSyncParams,
|
|
20
|
-
type ConnectionListSyncsParams,
|
|
21
|
-
type ConnectionRetrieveSyncStatusParams,
|
|
22
|
-
type ConnectionStreamSyncProgressParams,
|
|
23
|
-
type ConnectionUpdateCredentialsParams,
|
|
24
|
-
} from './connections';
|
|
25
|
-
export { Databases, type DatabaseDeleteSchemaParams } from './databases';
|
|
26
|
-
export {
|
|
27
|
-
Views,
|
|
28
|
-
type ViewRetrieveResponse,
|
|
29
|
-
type ViewListResponse,
|
|
30
|
-
type ViewRetrieveParams,
|
|
31
|
-
type ViewListParams,
|
|
32
|
-
} from './views';
|
|
33
|
-
export { Yaml, type YamlRetrieveResponse, type YamlCommitResponse, type YamlCommitParams } from './yaml';
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { APIResource } from '../../../core/resource';
|
|
4
|
-
import { APIPromise } from '../../../core/api-promise';
|
|
5
|
-
import { RequestOptions } from '../../../internal/request-options';
|
|
6
|
-
import { path } from '../../../internal/utils/path';
|
|
7
|
-
|
|
8
|
-
export class Views extends APIResource {
|
|
9
|
-
/**
|
|
10
|
-
* Get the YAML content of a specific view file.
|
|
11
|
-
*/
|
|
12
|
-
retrieve(
|
|
13
|
-
fileName: string,
|
|
14
|
-
params: ViewRetrieveParams,
|
|
15
|
-
options?: RequestOptions,
|
|
16
|
-
): APIPromise<ViewRetrieveResponse> {
|
|
17
|
-
const { connection_id, sync_id } = params;
|
|
18
|
-
return this._client.get(
|
|
19
|
-
path`/api/v1/connections/${connection_id}/sync/${sync_id}/views/${fileName}`,
|
|
20
|
-
options,
|
|
21
|
-
);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* List all view YAML files created by a schema sync.
|
|
26
|
-
*/
|
|
27
|
-
list(syncID: string, params: ViewListParams, options?: RequestOptions): APIPromise<ViewListResponse> {
|
|
28
|
-
const { connection_id } = params;
|
|
29
|
-
return this._client.get(path`/api/v1/connections/${connection_id}/sync/${syncID}/views`, options);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Response for a single view file's content.
|
|
35
|
-
*/
|
|
36
|
-
export interface ViewRetrieveResponse {
|
|
37
|
-
/**
|
|
38
|
-
* Branch the file was read from
|
|
39
|
-
*/
|
|
40
|
-
branch: string;
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* YAML file content
|
|
44
|
-
*/
|
|
45
|
-
content: string;
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* File name (e.g., 'customers.yaml')
|
|
49
|
-
*/
|
|
50
|
-
name: string;
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Full path relative to connection folder
|
|
54
|
-
*/
|
|
55
|
-
path: string;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Response for listing view files in a sync.
|
|
60
|
-
*/
|
|
61
|
-
export interface ViewListResponse {
|
|
62
|
-
/**
|
|
63
|
-
* Branch the files were read from
|
|
64
|
-
*/
|
|
65
|
-
branch: string;
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* List of view files
|
|
69
|
-
*/
|
|
70
|
-
files: Array<ViewListResponse.File>;
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* True if reading from PR branch, False if from main
|
|
74
|
-
*/
|
|
75
|
-
is_pr_branch: boolean;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
export namespace ViewListResponse {
|
|
79
|
-
/**
|
|
80
|
-
* A single view file in the sync.
|
|
81
|
-
*/
|
|
82
|
-
export interface File {
|
|
83
|
-
/**
|
|
84
|
-
* File name (e.g., 'customers.yaml')
|
|
85
|
-
*/
|
|
86
|
-
name: string;
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* Full path relative to connection folder
|
|
90
|
-
*/
|
|
91
|
-
path: string;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
export interface ViewRetrieveParams {
|
|
96
|
-
connection_id: string;
|
|
97
|
-
|
|
98
|
-
sync_id: string;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
export interface ViewListParams {
|
|
102
|
-
connection_id: string;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
export declare namespace Views {
|
|
106
|
-
export {
|
|
107
|
-
type ViewRetrieveResponse as ViewRetrieveResponse,
|
|
108
|
-
type ViewListResponse as ViewListResponse,
|
|
109
|
-
type ViewRetrieveParams as ViewRetrieveParams,
|
|
110
|
-
type ViewListParams as ViewListParams,
|
|
111
|
-
};
|
|
112
|
-
}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { APIResource } from '../../../core/resource';
|
|
4
|
-
import { APIPromise } from '../../../core/api-promise';
|
|
5
|
-
import { RequestOptions } from '../../../internal/request-options';
|
|
6
|
-
import { path } from '../../../internal/utils/path';
|
|
7
|
-
|
|
8
|
-
export class Yaml extends APIResource {
|
|
9
|
-
/**
|
|
10
|
-
* Read connection.yaml from the main branch of the repo.
|
|
11
|
-
*/
|
|
12
|
-
retrieve(connectionID: string, options?: RequestOptions): APIPromise<YamlRetrieveResponse> {
|
|
13
|
-
return this._client.get(path`/api/v1/connections/${connectionID}/yaml`, options);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Commit updated YAML to a new branch and create a PR.
|
|
18
|
-
*/
|
|
19
|
-
commit(
|
|
20
|
-
connectionID: string,
|
|
21
|
-
body: YamlCommitParams,
|
|
22
|
-
options?: RequestOptions,
|
|
23
|
-
): APIPromise<YamlCommitResponse> {
|
|
24
|
-
return this._client.post(path`/api/v1/connections/${connectionID}/yaml`, { body, ...options });
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Response for reading connection.yaml from repo.
|
|
30
|
-
*/
|
|
31
|
-
export interface YamlRetrieveResponse {
|
|
32
|
-
/**
|
|
33
|
-
* Folder name in the repo (e.g. 'prod_db_connection')
|
|
34
|
-
*/
|
|
35
|
-
folder_name: string;
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Raw YAML content of connection.yaml
|
|
39
|
-
*/
|
|
40
|
-
yaml_content: string;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Response for YAML commit endpoint.
|
|
45
|
-
*/
|
|
46
|
-
export interface YamlCommitResponse {
|
|
47
|
-
/**
|
|
48
|
-
* Whether the PR was auto-merged
|
|
49
|
-
*/
|
|
50
|
-
merged: boolean;
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* GitHub PR number
|
|
54
|
-
*/
|
|
55
|
-
pr_number: number;
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* GitHub PR URL
|
|
59
|
-
*/
|
|
60
|
-
pr_url: string;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export interface YamlCommitParams {
|
|
64
|
-
/**
|
|
65
|
-
* Updated YAML content
|
|
66
|
-
*/
|
|
67
|
-
yaml_content: string;
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* If true, auto-merge the PR after creation
|
|
71
|
-
*/
|
|
72
|
-
auto_merge?: boolean;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export declare namespace Yaml {
|
|
76
|
-
export {
|
|
77
|
-
type YamlRetrieveResponse as YamlRetrieveResponse,
|
|
78
|
-
type YamlCommitResponse as YamlCommitResponse,
|
|
79
|
-
type YamlCommitParams as YamlCommitParams,
|
|
80
|
-
};
|
|
81
|
-
}
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { APIResource } from '../../../core/resource';
|
|
4
|
-
import * as ReposAPI from './repos';
|
|
5
|
-
import { RepoListResponse, RepoSelectParams, RepoSelectResponse, Repos, Repository } from './repos';
|
|
6
|
-
import * as ScaffoldAPI from './scaffold';
|
|
7
|
-
import { Scaffold, ScaffoldTrigger } from './scaffold';
|
|
8
|
-
import * as WebhooksAPI from './webhooks';
|
|
9
|
-
import { WebhookReceiveParams, WebhookReceiveResponse, Webhooks } from './webhooks';
|
|
10
|
-
import { APIPromise } from '../../../core/api-promise';
|
|
11
|
-
import { RequestOptions } from '../../../internal/request-options';
|
|
12
|
-
|
|
13
|
-
export class GitHub extends APIResource {
|
|
14
|
-
repos: ReposAPI.Repos = new ReposAPI.Repos(this._client);
|
|
15
|
-
scaffold: ScaffoldAPI.Scaffold = new ScaffoldAPI.Scaffold(this._client);
|
|
16
|
-
webhooks: WebhooksAPI.Webhooks = new WebhooksAPI.Webhooks(this._client);
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Handles the OAuth callback from GitHub after user authorization.
|
|
20
|
-
*/
|
|
21
|
-
callback(query: GitHubCallbackParams, options?: RequestOptions): APIPromise<unknown> {
|
|
22
|
-
return this._client.get('/api/v1/github/callback', { query, ...options });
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Initiates the GitHub App installation flow.
|
|
27
|
-
*/
|
|
28
|
-
connect(
|
|
29
|
-
query: GitHubConnectParams | null | undefined = {},
|
|
30
|
-
options?: RequestOptions,
|
|
31
|
-
): APIPromise<GitHubConnectResponse> {
|
|
32
|
-
return this._client.get('/api/v1/github/connect', { query, ...options });
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Generates a shareable GitHub App installation link.
|
|
37
|
-
*/
|
|
38
|
-
getInstallationLink(options?: RequestOptions): APIPromise<GitHubGetInstallationLinkResponse> {
|
|
39
|
-
return this._client.get('/api/v1/github/installation-link', options);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Returns the current GitHub connection status for the client.
|
|
44
|
-
*/
|
|
45
|
-
getStatus(options?: RequestOptions): APIPromise<GitHubGetStatusResponse> {
|
|
46
|
-
return this._client.get('/api/v1/github/status', options);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export type GitHubCallbackResponse = unknown;
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Response for starting OAuth flow.
|
|
54
|
-
*/
|
|
55
|
-
export interface GitHubConnectResponse {
|
|
56
|
-
authorization_url: string;
|
|
57
|
-
|
|
58
|
-
state: string;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Response for installation link generation.
|
|
63
|
-
*/
|
|
64
|
-
export interface GitHubGetInstallationLinkResponse {
|
|
65
|
-
app_name: string;
|
|
66
|
-
|
|
67
|
-
installation_url: string;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Response for connection status.
|
|
72
|
-
*/
|
|
73
|
-
export interface GitHubGetStatusResponse {
|
|
74
|
-
connected: boolean;
|
|
75
|
-
|
|
76
|
-
default_branch?: string | null;
|
|
77
|
-
|
|
78
|
-
last_sync_at?: string | null;
|
|
79
|
-
|
|
80
|
-
last_used_at?: string | null;
|
|
81
|
-
|
|
82
|
-
owner?: string | null;
|
|
83
|
-
|
|
84
|
-
repository?: string | null;
|
|
85
|
-
|
|
86
|
-
scaffolding_pr_author?: string | null;
|
|
87
|
-
|
|
88
|
-
scaffolding_pr_created_at?: string | null;
|
|
89
|
-
|
|
90
|
-
scaffolding_pr_state?: string | null;
|
|
91
|
-
|
|
92
|
-
scaffolding_pr_title?: string | null;
|
|
93
|
-
|
|
94
|
-
scaffolding_pr_url?: string | null;
|
|
95
|
-
|
|
96
|
-
scaffolding_status?: string | null;
|
|
97
|
-
|
|
98
|
-
status?: string | null;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
export interface GitHubCallbackParams {
|
|
102
|
-
/**
|
|
103
|
-
* State token for CSRF validation
|
|
104
|
-
*/
|
|
105
|
-
state: string;
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* OAuth authorization code
|
|
109
|
-
*/
|
|
110
|
-
code?: string | null;
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* OAuth error code from GitHub
|
|
114
|
-
*/
|
|
115
|
-
error?: string | null;
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* OAuth error description
|
|
119
|
-
*/
|
|
120
|
-
error_description?: string | null;
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* GitHub App installation ID
|
|
124
|
-
*/
|
|
125
|
-
installation_id?: number | null;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
export interface GitHubConnectParams {
|
|
129
|
-
/**
|
|
130
|
-
* Frontend path to redirect to after OAuth success (e.g., '/' or
|
|
131
|
-
* '/settings/github')
|
|
132
|
-
*/
|
|
133
|
-
return_to?: string | null;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
GitHub.Repos = Repos;
|
|
137
|
-
GitHub.Scaffold = Scaffold;
|
|
138
|
-
GitHub.Webhooks = Webhooks;
|
|
139
|
-
|
|
140
|
-
export declare namespace GitHub {
|
|
141
|
-
export {
|
|
142
|
-
type GitHubCallbackResponse as GitHubCallbackResponse,
|
|
143
|
-
type GitHubConnectResponse as GitHubConnectResponse,
|
|
144
|
-
type GitHubGetInstallationLinkResponse as GitHubGetInstallationLinkResponse,
|
|
145
|
-
type GitHubGetStatusResponse as GitHubGetStatusResponse,
|
|
146
|
-
type GitHubCallbackParams as GitHubCallbackParams,
|
|
147
|
-
type GitHubConnectParams as GitHubConnectParams,
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
export {
|
|
151
|
-
Repos as Repos,
|
|
152
|
-
type Repository as Repository,
|
|
153
|
-
type RepoListResponse as RepoListResponse,
|
|
154
|
-
type RepoSelectResponse as RepoSelectResponse,
|
|
155
|
-
type RepoSelectParams as RepoSelectParams,
|
|
156
|
-
};
|
|
157
|
-
|
|
158
|
-
export { Scaffold as Scaffold, type ScaffoldTrigger as ScaffoldTrigger };
|
|
159
|
-
|
|
160
|
-
export {
|
|
161
|
-
Webhooks as Webhooks,
|
|
162
|
-
type WebhookReceiveResponse as WebhookReceiveResponse,
|
|
163
|
-
type WebhookReceiveParams as WebhookReceiveParams,
|
|
164
|
-
};
|
|
165
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
export {
|
|
4
|
-
GitHub,
|
|
5
|
-
type GitHubCallbackResponse,
|
|
6
|
-
type GitHubConnectResponse,
|
|
7
|
-
type GitHubGetInstallationLinkResponse,
|
|
8
|
-
type GitHubGetStatusResponse,
|
|
9
|
-
type GitHubCallbackParams,
|
|
10
|
-
type GitHubConnectParams,
|
|
11
|
-
} from './github';
|
|
12
|
-
export {
|
|
13
|
-
Repos,
|
|
14
|
-
type Repository,
|
|
15
|
-
type RepoListResponse,
|
|
16
|
-
type RepoSelectResponse,
|
|
17
|
-
type RepoSelectParams,
|
|
18
|
-
} from './repos';
|
|
19
|
-
export { Scaffold, type ScaffoldTrigger } from './scaffold';
|
|
20
|
-
export { Webhooks, type WebhookReceiveResponse, type WebhookReceiveParams } from './webhooks';
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { APIResource } from '../../../core/resource';
|
|
4
|
-
import { APIPromise } from '../../../core/api-promise';
|
|
5
|
-
import { RequestOptions } from '../../../internal/request-options';
|
|
6
|
-
import { path } from '../../../internal/utils/path';
|
|
7
|
-
|
|
8
|
-
export class Repos extends APIResource {
|
|
9
|
-
/**
|
|
10
|
-
* List repositories accessible to the GitHub App installation.
|
|
11
|
-
*/
|
|
12
|
-
list(options?: RequestOptions): APIPromise<RepoListResponse> {
|
|
13
|
-
return this._client.get('/api/v1/github/repos', options);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Select a repository for the Kater workspace.
|
|
18
|
-
*/
|
|
19
|
-
select(repoID: number, body: RepoSelectParams, options?: RequestOptions): APIPromise<RepoSelectResponse> {
|
|
20
|
-
return this._client.post(path`/api/v1/github/repos/${repoID}/select`, { body, ...options });
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Repository information response.
|
|
26
|
-
*/
|
|
27
|
-
export interface Repository {
|
|
28
|
-
id: number;
|
|
29
|
-
|
|
30
|
-
default_branch: string;
|
|
31
|
-
|
|
32
|
-
full_name: string;
|
|
33
|
-
|
|
34
|
-
has_kater_structure: boolean;
|
|
35
|
-
|
|
36
|
-
html_url: string;
|
|
37
|
-
|
|
38
|
-
is_empty: boolean;
|
|
39
|
-
|
|
40
|
-
name: string;
|
|
41
|
-
|
|
42
|
-
owner: string;
|
|
43
|
-
|
|
44
|
-
private: boolean;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* List of repositories response.
|
|
49
|
-
*/
|
|
50
|
-
export interface RepoListResponse {
|
|
51
|
-
repositories: Array<Repository>;
|
|
52
|
-
|
|
53
|
-
total_count: number;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Repository selection response.
|
|
58
|
-
*/
|
|
59
|
-
export interface RepoSelectResponse {
|
|
60
|
-
has_existing_structure: boolean;
|
|
61
|
-
|
|
62
|
-
message: string;
|
|
63
|
-
|
|
64
|
-
needs_scaffolding: boolean;
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Repository information response.
|
|
68
|
-
*/
|
|
69
|
-
repository: Repository;
|
|
70
|
-
|
|
71
|
-
success: boolean;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export interface RepoSelectParams {
|
|
75
|
-
use_existing_structure?: boolean;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
export declare namespace Repos {
|
|
79
|
-
export {
|
|
80
|
-
type Repository as Repository,
|
|
81
|
-
type RepoListResponse as RepoListResponse,
|
|
82
|
-
type RepoSelectResponse as RepoSelectResponse,
|
|
83
|
-
type RepoSelectParams as RepoSelectParams,
|
|
84
|
-
};
|
|
85
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { APIResource } from '../../../core/resource';
|
|
4
|
-
import { APIPromise } from '../../../core/api-promise';
|
|
5
|
-
import { RequestOptions } from '../../../internal/request-options';
|
|
6
|
-
|
|
7
|
-
export class Scaffold extends APIResource {
|
|
8
|
-
/**
|
|
9
|
-
* Clean up partial state and retry scaffolding from scratch.
|
|
10
|
-
*/
|
|
11
|
-
retry(options?: RequestOptions): APIPromise<ScaffoldTrigger> {
|
|
12
|
-
return this._client.post('/api/v1/github/scaffold/retry', options);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Create the Kater folder structure and PR in the selected repository.
|
|
17
|
-
*/
|
|
18
|
-
trigger(options?: RequestOptions): APIPromise<ScaffoldTrigger> {
|
|
19
|
-
return this._client.post('/api/v1/github/scaffold', options);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Response from triggering scaffolding.
|
|
25
|
-
*/
|
|
26
|
-
export interface ScaffoldTrigger {
|
|
27
|
-
message: string;
|
|
28
|
-
|
|
29
|
-
status: string;
|
|
30
|
-
|
|
31
|
-
success: boolean;
|
|
32
|
-
|
|
33
|
-
branch?: string | null;
|
|
34
|
-
|
|
35
|
-
error?: string | null;
|
|
36
|
-
|
|
37
|
-
pr_number?: number | null;
|
|
38
|
-
|
|
39
|
-
pr_url?: string | null;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export declare namespace Scaffold {
|
|
43
|
-
export { type ScaffoldTrigger as ScaffoldTrigger };
|
|
44
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { APIResource } from '../../../core/resource';
|
|
4
|
-
import { APIPromise } from '../../../core/api-promise';
|
|
5
|
-
import { buildHeaders } from '../../../internal/headers';
|
|
6
|
-
import { RequestOptions } from '../../../internal/request-options';
|
|
7
|
-
|
|
8
|
-
export class Webhooks extends APIResource {
|
|
9
|
-
/**
|
|
10
|
-
* Receives and processes webhook events from GitHub.
|
|
11
|
-
*/
|
|
12
|
-
receive(params: WebhookReceiveParams, options?: RequestOptions): APIPromise<WebhookReceiveResponse> {
|
|
13
|
-
const {
|
|
14
|
-
'X-GitHub-Delivery': xGitHubDelivery,
|
|
15
|
-
'X-GitHub-Event': xGitHubEvent,
|
|
16
|
-
'X-Hub-Signature-256': xHubSignature256,
|
|
17
|
-
} = params;
|
|
18
|
-
return this._client.post('/api/v1/github/webhooks/receiver', {
|
|
19
|
-
...options,
|
|
20
|
-
headers: buildHeaders([
|
|
21
|
-
{
|
|
22
|
-
'X-GitHub-Delivery': xGitHubDelivery,
|
|
23
|
-
'X-GitHub-Event': xGitHubEvent,
|
|
24
|
-
'X-Hub-Signature-256': xHubSignature256,
|
|
25
|
-
},
|
|
26
|
-
options?.headers,
|
|
27
|
-
]),
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Response for successful webhook receipt.
|
|
34
|
-
*/
|
|
35
|
-
export interface WebhookReceiveResponse {
|
|
36
|
-
delivery_id: string;
|
|
37
|
-
|
|
38
|
-
event_type: string;
|
|
39
|
-
|
|
40
|
-
received: boolean;
|
|
41
|
-
|
|
42
|
-
message?: string | null;
|
|
43
|
-
|
|
44
|
-
processed?: boolean;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export interface WebhookReceiveParams {
|
|
48
|
-
'X-GitHub-Delivery': string;
|
|
49
|
-
|
|
50
|
-
'X-GitHub-Event': string;
|
|
51
|
-
|
|
52
|
-
'X-Hub-Signature-256': string;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export declare namespace Webhooks {
|
|
56
|
-
export {
|
|
57
|
-
type WebhookReceiveResponse as WebhookReceiveResponse,
|
|
58
|
-
type WebhookReceiveParams as WebhookReceiveParams,
|
|
59
|
-
};
|
|
60
|
-
}
|