@katerai/sdk 0.3.0 → 0.4.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 +8 -0
- package/README.md +2 -6
- package/client.d.mts +6 -3
- package/client.d.mts.map +1 -1
- package/client.d.ts +6 -3
- package/client.d.ts.map +1 -1
- package/client.js +7 -29
- package/client.js.map +1 -1
- package/client.mjs +7 -29
- 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 +0 -1
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs +0 -1
- package/internal/utils/log.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/healthz.d.mts +16 -0
- package/resources/healthz.d.mts.map +1 -0
- package/resources/healthz.d.ts +16 -0
- package/resources/healthz.d.ts.map +1 -0
- package/resources/healthz.js +15 -0
- package/resources/healthz.js.map +1 -0
- package/resources/healthz.mjs +11 -0
- package/resources/healthz.mjs.map +1 -0
- package/resources/index.d.mts +2 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -0
- package/resources/index.mjs.map +1 -1
- package/resources/readyz.d.mts +16 -0
- package/resources/readyz.d.mts.map +1 -0
- package/resources/readyz.d.ts +16 -0
- package/resources/readyz.d.ts.map +1 -0
- package/resources/readyz.js +15 -0
- package/resources/readyz.js.map +1 -0
- package/resources/readyz.mjs +11 -0
- package/resources/readyz.mjs.map +1 -0
- package/resources/v1/connections/connections.d.mts +258 -65
- package/resources/v1/connections/connections.d.mts.map +1 -1
- package/resources/v1/connections/connections.d.ts +258 -65
- package/resources/v1/connections/connections.d.ts.map +1 -1
- package/resources/v1/connections/connections.js +33 -0
- package/resources/v1/connections/connections.js.map +1 -1
- package/resources/v1/connections/connections.mjs +34 -1
- package/resources/v1/connections/connections.mjs.map +1 -1
- package/resources/v1/connections/databases.d.mts +118 -1
- package/resources/v1/connections/databases.d.mts.map +1 -1
- package/resources/v1/connections/databases.d.ts +118 -1
- package/resources/v1/connections/databases.d.ts.map +1 -1
- package/resources/v1/connections/databases.js +35 -0
- package/resources/v1/connections/databases.js.map +1 -1
- package/resources/v1/connections/databases.mjs +35 -0
- package/resources/v1/connections/databases.mjs.map +1 -1
- package/resources/v1/connections/index.d.mts +2 -2
- package/resources/v1/connections/index.d.mts.map +1 -1
- package/resources/v1/connections/index.d.ts +2 -2
- package/resources/v1/connections/index.d.ts.map +1 -1
- package/resources/v1/connections/index.js.map +1 -1
- package/resources/v1/connections/index.mjs +1 -1
- package/resources/v1/connections/index.mjs.map +1 -1
- package/resources/v1/github/github.d.mts +61 -1
- package/resources/v1/github/github.d.mts.map +1 -1
- package/resources/v1/github/github.d.ts +61 -1
- package/resources/v1/github/github.d.ts.map +1 -1
- package/resources/v1/github/github.js +22 -0
- package/resources/v1/github/github.js.map +1 -1
- package/resources/v1/github/github.mjs +22 -0
- package/resources/v1/github/github.mjs.map +1 -1
- package/resources/v1/github/index.d.mts +2 -1
- package/resources/v1/github/index.d.mts.map +1 -1
- package/resources/v1/github/index.d.ts +2 -1
- package/resources/v1/github/index.d.ts.map +1 -1
- package/resources/v1/github/index.js +3 -1
- package/resources/v1/github/index.js.map +1 -1
- package/resources/v1/github/index.mjs +2 -1
- package/resources/v1/github/index.mjs.map +1 -1
- package/resources/v1/github/webhooks.d.mts +28 -0
- package/resources/v1/github/webhooks.d.mts.map +1 -0
- package/resources/v1/github/webhooks.d.ts +28 -0
- package/resources/v1/github/webhooks.d.ts.map +1 -0
- package/resources/v1/github/webhooks.js +27 -0
- package/resources/v1/github/webhooks.js.map +1 -0
- package/resources/v1/github/webhooks.mjs +23 -0
- package/resources/v1/github/webhooks.mjs.map +1 -0
- package/resources/v1/index.d.mts +2 -2
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +2 -2
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs +1 -1
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/v1.d.mts +4 -4
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +4 -4
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs +1 -1
- package/resources/v1/v1.mjs.map +1 -1
- package/src/client.ts +11 -36
- package/src/internal/utils/log.ts +0 -1
- package/src/resources/healthz.ts +20 -0
- package/src/resources/index.ts +2 -0
- package/src/resources/readyz.ts +20 -0
- package/src/resources/v1/connections/connections.ts +330 -68
- package/src/resources/v1/connections/databases.ts +165 -1
- package/src/resources/v1/connections/index.ts +9 -1
- package/src/resources/v1/github/github.ts +97 -1
- package/src/resources/v1/github/index.ts +10 -1
- package/src/resources/v1/github/webhooks.ts +60 -0
- package/src/resources/v1/index.ts +10 -1
- package/src/resources/v1/v1.ts +20 -2
- 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
|
@@ -1,12 +1,37 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../../core/resource';
|
|
4
|
+
import * as ConnectionsAPI from './connections';
|
|
4
5
|
import { APIPromise } from '../../../core/api-promise';
|
|
5
6
|
import { buildHeaders } from '../../../internal/headers';
|
|
6
7
|
import { RequestOptions } from '../../../internal/request-options';
|
|
7
8
|
import { path } from '../../../internal/utils/path';
|
|
8
9
|
|
|
9
10
|
export class Databases extends APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* Update a database's metadata.
|
|
13
|
+
*
|
|
14
|
+
* Updates label and/or description fields directly. If a name change is requested,
|
|
15
|
+
* a GitHub PR is created to update view YAML files. The name change is applied to
|
|
16
|
+
* the DB when the PR merges (or immediately if auto_merge is true or no views are
|
|
17
|
+
* affected).
|
|
18
|
+
*
|
|
19
|
+
* RLS: Filtered to current client (DualClientRLSDB).
|
|
20
|
+
*
|
|
21
|
+
* Raises: DatabaseNotFoundError: If database doesn't exist (404)
|
|
22
|
+
*/
|
|
23
|
+
update(
|
|
24
|
+
databaseID: string,
|
|
25
|
+
params: DatabaseUpdateParams,
|
|
26
|
+
options?: RequestOptions,
|
|
27
|
+
): APIPromise<DatabaseUpdateResponse> {
|
|
28
|
+
const { connection_id, ...body } = params;
|
|
29
|
+
return this._client.patch(path`/api/v1/connections/${connection_id}/databases/${databaseID}`, {
|
|
30
|
+
body,
|
|
31
|
+
...options,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
10
35
|
/**
|
|
11
36
|
* Delete a schema from a connection.
|
|
12
37
|
*
|
|
@@ -29,6 +54,107 @@ export class Databases extends APIResource {
|
|
|
29
54
|
{ ...options, headers: buildHeaders([{ Accept: '*/*' }, options?.headers]) },
|
|
30
55
|
);
|
|
31
56
|
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Update a schema's metadata.
|
|
60
|
+
*
|
|
61
|
+
* Updates label and/or description fields directly. If a name change is requested,
|
|
62
|
+
* a GitHub PR is created to update view YAML files. The name change is applied to
|
|
63
|
+
* the DB when the PR merges (or immediately if auto_merge is true or no views are
|
|
64
|
+
* affected).
|
|
65
|
+
*
|
|
66
|
+
* RLS: Filtered to current client (DualClientRLSDB).
|
|
67
|
+
*
|
|
68
|
+
* Raises: SchemaNotFoundError: If schema doesn't exist (404)
|
|
69
|
+
*/
|
|
70
|
+
updateSchema(
|
|
71
|
+
schemaID: string,
|
|
72
|
+
params: DatabaseUpdateSchemaParams,
|
|
73
|
+
options?: RequestOptions,
|
|
74
|
+
): APIPromise<DatabaseUpdateSchemaResponse> {
|
|
75
|
+
const { connection_id, database_id, ...body } = params;
|
|
76
|
+
return this._client.patch(
|
|
77
|
+
path`/api/v1/connections/${connection_id}/databases/${database_id}/schemas/${schemaID}`,
|
|
78
|
+
{ body, ...options },
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Response for database/schema updates that may involve a rename PR.
|
|
85
|
+
*/
|
|
86
|
+
export interface DatabaseUpdateResponse {
|
|
87
|
+
/**
|
|
88
|
+
* Updated connection
|
|
89
|
+
*/
|
|
90
|
+
connection: ConnectionsAPI.Connection;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* GitHub PR number
|
|
94
|
+
*/
|
|
95
|
+
pr_number?: number | null;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* PR status: 'open' or 'merged'
|
|
99
|
+
*/
|
|
100
|
+
pr_status?: string | null;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* GitHub PR URL (if rename PR created)
|
|
104
|
+
*/
|
|
105
|
+
pr_url?: string | null;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Response for database/schema updates that may involve a rename PR.
|
|
110
|
+
*/
|
|
111
|
+
export interface DatabaseUpdateSchemaResponse {
|
|
112
|
+
/**
|
|
113
|
+
* Updated connection
|
|
114
|
+
*/
|
|
115
|
+
connection: ConnectionsAPI.Connection;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* GitHub PR number
|
|
119
|
+
*/
|
|
120
|
+
pr_number?: number | null;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* PR status: 'open' or 'merged'
|
|
124
|
+
*/
|
|
125
|
+
pr_status?: string | null;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* GitHub PR URL (if rename PR created)
|
|
129
|
+
*/
|
|
130
|
+
pr_url?: string | null;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export interface DatabaseUpdateParams {
|
|
134
|
+
/**
|
|
135
|
+
* Path param
|
|
136
|
+
*/
|
|
137
|
+
connection_id: string;
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Body param: If true and a name change requires a PR, auto-merge it
|
|
141
|
+
*/
|
|
142
|
+
auto_merge?: boolean;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Body param: Database description
|
|
146
|
+
*/
|
|
147
|
+
description?: string | null;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Body param: Human-readable display label
|
|
151
|
+
*/
|
|
152
|
+
label?: string | null;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Body param: Database name
|
|
156
|
+
*/
|
|
157
|
+
name?: string | null;
|
|
32
158
|
}
|
|
33
159
|
|
|
34
160
|
export interface DatabaseDeleteSchemaParams {
|
|
@@ -37,6 +163,44 @@ export interface DatabaseDeleteSchemaParams {
|
|
|
37
163
|
database_id: string;
|
|
38
164
|
}
|
|
39
165
|
|
|
166
|
+
export interface DatabaseUpdateSchemaParams {
|
|
167
|
+
/**
|
|
168
|
+
* Path param
|
|
169
|
+
*/
|
|
170
|
+
connection_id: string;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Path param
|
|
174
|
+
*/
|
|
175
|
+
database_id: string;
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Body param: If true and a name change requires a PR, auto-merge it
|
|
179
|
+
*/
|
|
180
|
+
auto_merge?: boolean;
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Body param: Schema description
|
|
184
|
+
*/
|
|
185
|
+
description?: string | null;
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Body param: Human-readable display label
|
|
189
|
+
*/
|
|
190
|
+
label?: string | null;
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Body param: Schema name
|
|
194
|
+
*/
|
|
195
|
+
name?: string | null;
|
|
196
|
+
}
|
|
197
|
+
|
|
40
198
|
export declare namespace Databases {
|
|
41
|
-
export {
|
|
199
|
+
export {
|
|
200
|
+
type DatabaseUpdateResponse as DatabaseUpdateResponse,
|
|
201
|
+
type DatabaseUpdateSchemaResponse as DatabaseUpdateSchemaResponse,
|
|
202
|
+
type DatabaseUpdateParams as DatabaseUpdateParams,
|
|
203
|
+
type DatabaseDeleteSchemaParams as DatabaseDeleteSchemaParams,
|
|
204
|
+
type DatabaseUpdateSchemaParams as DatabaseUpdateSchemaParams,
|
|
205
|
+
};
|
|
42
206
|
}
|
|
@@ -8,5 +8,13 @@ export {
|
|
|
8
8
|
type ConnectionRetrieveCredentialResponse,
|
|
9
9
|
type ConnectionSyncResponse,
|
|
10
10
|
type ConnectionCreateParams,
|
|
11
|
+
type ConnectionUpdateParams,
|
|
11
12
|
} from './connections';
|
|
12
|
-
export {
|
|
13
|
+
export {
|
|
14
|
+
Databases,
|
|
15
|
+
type DatabaseUpdateResponse,
|
|
16
|
+
type DatabaseUpdateSchemaResponse,
|
|
17
|
+
type DatabaseUpdateParams,
|
|
18
|
+
type DatabaseDeleteSchemaParams,
|
|
19
|
+
type DatabaseUpdateSchemaParams,
|
|
20
|
+
} from './databases';
|
|
@@ -5,12 +5,39 @@ import * as ReposAPI from './repos';
|
|
|
5
5
|
import { RepoListResponse, RepoSelectParams, RepoSelectResponse, Repos, Repository } from './repos';
|
|
6
6
|
import * as ScaffoldAPI from './scaffold';
|
|
7
7
|
import { Scaffold, ScaffoldTrigger } from './scaffold';
|
|
8
|
+
import * as WebhooksAPI from './webhooks';
|
|
9
|
+
import { WebhookReceiveParams, WebhookReceiveResponse, Webhooks } from './webhooks';
|
|
8
10
|
import { APIPromise } from '../../../core/api-promise';
|
|
9
11
|
import { RequestOptions } from '../../../internal/request-options';
|
|
10
12
|
|
|
11
13
|
export class GitHub extends APIResource {
|
|
12
14
|
repos: ReposAPI.Repos = new ReposAPI.Repos(this._client);
|
|
13
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
|
+
}
|
|
14
41
|
|
|
15
42
|
/**
|
|
16
43
|
* Returns the current GitHub connection status for the client.
|
|
@@ -20,6 +47,26 @@ export class GitHub extends APIResource {
|
|
|
20
47
|
}
|
|
21
48
|
}
|
|
22
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
|
+
|
|
23
70
|
/**
|
|
24
71
|
* Response for connection status.
|
|
25
72
|
*/
|
|
@@ -43,11 +90,54 @@ export interface GitHubGetStatusResponse {
|
|
|
43
90
|
status?: string | null;
|
|
44
91
|
}
|
|
45
92
|
|
|
93
|
+
export interface GitHubCallbackParams {
|
|
94
|
+
/**
|
|
95
|
+
* State token for CSRF validation
|
|
96
|
+
*/
|
|
97
|
+
state: string;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* OAuth authorization code
|
|
101
|
+
*/
|
|
102
|
+
code?: string | null;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* OAuth error code from GitHub
|
|
106
|
+
*/
|
|
107
|
+
error?: string | null;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* OAuth error description
|
|
111
|
+
*/
|
|
112
|
+
error_description?: string | null;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* GitHub App installation ID
|
|
116
|
+
*/
|
|
117
|
+
installation_id?: number | null;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export interface GitHubConnectParams {
|
|
121
|
+
/**
|
|
122
|
+
* Frontend path to redirect to after OAuth success (e.g., '/' or
|
|
123
|
+
* '/settings/github')
|
|
124
|
+
*/
|
|
125
|
+
return_to?: string | null;
|
|
126
|
+
}
|
|
127
|
+
|
|
46
128
|
GitHub.Repos = Repos;
|
|
47
129
|
GitHub.Scaffold = Scaffold;
|
|
130
|
+
GitHub.Webhooks = Webhooks;
|
|
48
131
|
|
|
49
132
|
export declare namespace GitHub {
|
|
50
|
-
export {
|
|
133
|
+
export {
|
|
134
|
+
type GitHubCallbackResponse as GitHubCallbackResponse,
|
|
135
|
+
type GitHubConnectResponse as GitHubConnectResponse,
|
|
136
|
+
type GitHubGetInstallationLinkResponse as GitHubGetInstallationLinkResponse,
|
|
137
|
+
type GitHubGetStatusResponse as GitHubGetStatusResponse,
|
|
138
|
+
type GitHubCallbackParams as GitHubCallbackParams,
|
|
139
|
+
type GitHubConnectParams as GitHubConnectParams,
|
|
140
|
+
};
|
|
51
141
|
|
|
52
142
|
export {
|
|
53
143
|
Repos as Repos,
|
|
@@ -58,4 +148,10 @@ export declare namespace GitHub {
|
|
|
58
148
|
};
|
|
59
149
|
|
|
60
150
|
export { Scaffold as Scaffold, type ScaffoldTrigger as ScaffoldTrigger };
|
|
151
|
+
|
|
152
|
+
export {
|
|
153
|
+
Webhooks as Webhooks,
|
|
154
|
+
type WebhookReceiveResponse as WebhookReceiveResponse,
|
|
155
|
+
type WebhookReceiveParams as WebhookReceiveParams,
|
|
156
|
+
};
|
|
61
157
|
}
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
export {
|
|
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';
|
|
4
12
|
export {
|
|
5
13
|
Repos,
|
|
6
14
|
type Repository,
|
|
@@ -9,3 +17,4 @@ export {
|
|
|
9
17
|
type RepoSelectParams,
|
|
10
18
|
} from './repos';
|
|
11
19
|
export { Scaffold, type ScaffoldTrigger } from './scaffold';
|
|
20
|
+
export { Webhooks, type WebhookReceiveResponse, type WebhookReceiveParams } from './webhooks';
|
|
@@ -0,0 +1,60 @@
|
|
|
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
|
+
}
|
|
@@ -8,8 +8,17 @@ export {
|
|
|
8
8
|
type ConnectionRetrieveCredentialResponse,
|
|
9
9
|
type ConnectionSyncResponse,
|
|
10
10
|
type ConnectionCreateParams,
|
|
11
|
+
type ConnectionUpdateParams,
|
|
11
12
|
} from './connections/index';
|
|
12
|
-
export {
|
|
13
|
+
export {
|
|
14
|
+
GitHub,
|
|
15
|
+
type GitHubCallbackResponse,
|
|
16
|
+
type GitHubConnectResponse,
|
|
17
|
+
type GitHubGetInstallationLinkResponse,
|
|
18
|
+
type GitHubGetStatusResponse,
|
|
19
|
+
type GitHubCallbackParams,
|
|
20
|
+
type GitHubConnectParams,
|
|
21
|
+
} from './github/index';
|
|
13
22
|
export {
|
|
14
23
|
Groups,
|
|
15
24
|
type GroupDetail,
|
package/src/resources/v1/v1.ts
CHANGED
|
@@ -10,11 +10,20 @@ import {
|
|
|
10
10
|
ConnectionListResponse,
|
|
11
11
|
ConnectionRetrieveCredentialResponse,
|
|
12
12
|
ConnectionSyncResponse,
|
|
13
|
+
ConnectionUpdateParams,
|
|
13
14
|
Connections,
|
|
14
15
|
DatabaseConfig,
|
|
15
16
|
} from './connections/connections';
|
|
16
17
|
import * as GitHubAPI from './github/github';
|
|
17
|
-
import {
|
|
18
|
+
import {
|
|
19
|
+
GitHub,
|
|
20
|
+
GitHubCallbackParams,
|
|
21
|
+
GitHubCallbackResponse,
|
|
22
|
+
GitHubConnectParams,
|
|
23
|
+
GitHubConnectResponse,
|
|
24
|
+
GitHubGetInstallationLinkResponse,
|
|
25
|
+
GitHubGetStatusResponse,
|
|
26
|
+
} from './github/github';
|
|
18
27
|
import * as GroupsAPI from './groups/groups';
|
|
19
28
|
import {
|
|
20
29
|
GroupCreateParams,
|
|
@@ -60,9 +69,18 @@ export declare namespace V1 {
|
|
|
60
69
|
type ConnectionRetrieveCredentialResponse as ConnectionRetrieveCredentialResponse,
|
|
61
70
|
type ConnectionSyncResponse as ConnectionSyncResponse,
|
|
62
71
|
type ConnectionCreateParams as ConnectionCreateParams,
|
|
72
|
+
type ConnectionUpdateParams as ConnectionUpdateParams,
|
|
63
73
|
};
|
|
64
74
|
|
|
65
|
-
export {
|
|
75
|
+
export {
|
|
76
|
+
GitHub as GitHub,
|
|
77
|
+
type GitHubCallbackResponse as GitHubCallbackResponse,
|
|
78
|
+
type GitHubConnectResponse as GitHubConnectResponse,
|
|
79
|
+
type GitHubGetInstallationLinkResponse as GitHubGetInstallationLinkResponse,
|
|
80
|
+
type GitHubGetStatusResponse as GitHubGetStatusResponse,
|
|
81
|
+
type GitHubCallbackParams as GitHubCallbackParams,
|
|
82
|
+
type GitHubConnectParams as GitHubConnectParams,
|
|
83
|
+
};
|
|
66
84
|
|
|
67
85
|
export {
|
|
68
86
|
Groups as Groups,
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.4.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.4.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.4.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.4.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|