@mesadev/rest 0.3.3

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.
Files changed (51) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +28 -0
  3. package/dist/client/client.gen.d.ts +2 -0
  4. package/dist/client/client.gen.js +234 -0
  5. package/dist/client/index.d.ts +8 -0
  6. package/dist/client/index.js +6 -0
  7. package/dist/client/types.gen.d.ts +117 -0
  8. package/dist/client/types.gen.js +2 -0
  9. package/dist/client/utils.gen.d.ts +33 -0
  10. package/dist/client/utils.gen.js +228 -0
  11. package/dist/client.gen.d.ts +12 -0
  12. package/dist/client.gen.js +3 -0
  13. package/dist/core/auth.gen.d.ts +18 -0
  14. package/dist/core/auth.gen.js +14 -0
  15. package/dist/core/bodySerializer.gen.d.ts +25 -0
  16. package/dist/core/bodySerializer.gen.js +57 -0
  17. package/dist/core/params.gen.d.ts +43 -0
  18. package/dist/core/params.gen.js +100 -0
  19. package/dist/core/pathSerializer.gen.d.ts +33 -0
  20. package/dist/core/pathSerializer.gen.js +106 -0
  21. package/dist/core/queryKeySerializer.gen.d.ts +18 -0
  22. package/dist/core/queryKeySerializer.gen.js +92 -0
  23. package/dist/core/serverSentEvents.gen.d.ts +71 -0
  24. package/dist/core/serverSentEvents.gen.js +133 -0
  25. package/dist/core/types.gen.d.ts +78 -0
  26. package/dist/core/types.gen.js +2 -0
  27. package/dist/core/utils.gen.d.ts +19 -0
  28. package/dist/core/utils.gen.js +87 -0
  29. package/dist/index.d.ts +2 -0
  30. package/dist/index.js +2 -0
  31. package/dist/sdk.gen.d.ts +135 -0
  32. package/dist/sdk.gen.js +226 -0
  33. package/dist/types.gen.d.ts +2547 -0
  34. package/dist/types.gen.js +2 -0
  35. package/package.json +37 -0
  36. package/src/client/client.gen.ts +288 -0
  37. package/src/client/index.ts +25 -0
  38. package/src/client/types.gen.ts +214 -0
  39. package/src/client/utils.gen.ts +316 -0
  40. package/src/client.gen.ts +16 -0
  41. package/src/core/auth.gen.ts +41 -0
  42. package/src/core/bodySerializer.gen.ts +84 -0
  43. package/src/core/params.gen.ts +169 -0
  44. package/src/core/pathSerializer.gen.ts +171 -0
  45. package/src/core/queryKeySerializer.gen.ts +117 -0
  46. package/src/core/serverSentEvents.gen.ts +243 -0
  47. package/src/core/types.gen.ts +104 -0
  48. package/src/core/utils.gen.ts +140 -0
  49. package/src/index.ts +4 -0
  50. package/src/sdk.gen.ts +263 -0
  51. package/src/types.gen.ts +2649 -0
@@ -0,0 +1,140 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+
3
+ import type { BodySerializer, QuerySerializer } from './bodySerializer.gen';
4
+ import {
5
+ type ArraySeparatorStyle,
6
+ serializeArrayParam,
7
+ serializeObjectParam,
8
+ serializePrimitiveParam,
9
+ } from './pathSerializer.gen';
10
+
11
+ export interface PathSerializer {
12
+ path: Record<string, unknown>;
13
+ url: string;
14
+ }
15
+
16
+ export const PATH_PARAM_RE = /\{[^{}]+\}/g;
17
+
18
+ export const defaultPathSerializer = ({ path, url: _url }: PathSerializer) => {
19
+ let url = _url;
20
+ const matches = _url.match(PATH_PARAM_RE);
21
+ if (matches) {
22
+ for (const match of matches) {
23
+ let explode = false;
24
+ let name = match.substring(1, match.length - 1);
25
+ let style: ArraySeparatorStyle = 'simple';
26
+
27
+ if (name.endsWith('*')) {
28
+ explode = true;
29
+ name = name.substring(0, name.length - 1);
30
+ }
31
+
32
+ if (name.startsWith('.')) {
33
+ name = name.substring(1);
34
+ style = 'label';
35
+ } else if (name.startsWith(';')) {
36
+ name = name.substring(1);
37
+ style = 'matrix';
38
+ }
39
+
40
+ const value = path[name];
41
+
42
+ if (value === undefined || value === null) {
43
+ continue;
44
+ }
45
+
46
+ if (Array.isArray(value)) {
47
+ url = url.replace(match, serializeArrayParam({ explode, name, style, value }));
48
+ continue;
49
+ }
50
+
51
+ if (typeof value === 'object') {
52
+ url = url.replace(
53
+ match,
54
+ serializeObjectParam({
55
+ explode,
56
+ name,
57
+ style,
58
+ value: value as Record<string, unknown>,
59
+ valueOnly: true,
60
+ }),
61
+ );
62
+ continue;
63
+ }
64
+
65
+ if (style === 'matrix') {
66
+ url = url.replace(
67
+ match,
68
+ `;${serializePrimitiveParam({
69
+ name,
70
+ value: value as string,
71
+ })}`,
72
+ );
73
+ continue;
74
+ }
75
+
76
+ const replaceValue = encodeURIComponent(
77
+ style === 'label' ? `.${value as string}` : (value as string),
78
+ );
79
+ url = url.replace(match, replaceValue);
80
+ }
81
+ }
82
+ return url;
83
+ };
84
+
85
+ export const getUrl = ({
86
+ baseUrl,
87
+ path,
88
+ query,
89
+ querySerializer,
90
+ url: _url,
91
+ }: {
92
+ baseUrl?: string;
93
+ path?: Record<string, unknown>;
94
+ query?: Record<string, unknown>;
95
+ querySerializer: QuerySerializer;
96
+ url: string;
97
+ }) => {
98
+ const pathUrl = _url.startsWith('/') ? _url : `/${_url}`;
99
+ let url = (baseUrl ?? '') + pathUrl;
100
+ if (path) {
101
+ url = defaultPathSerializer({ path, url });
102
+ }
103
+ let search = query ? querySerializer(query) : '';
104
+ if (search.startsWith('?')) {
105
+ search = search.substring(1);
106
+ }
107
+ if (search) {
108
+ url += `?${search}`;
109
+ }
110
+ return url;
111
+ };
112
+
113
+ export function getValidRequestBody(options: {
114
+ body?: unknown;
115
+ bodySerializer?: BodySerializer | null;
116
+ serializedBody?: unknown;
117
+ }) {
118
+ const hasBody = options.body !== undefined;
119
+ const isSerializedBody = hasBody && options.bodySerializer;
120
+
121
+ if (isSerializedBody) {
122
+ if ('serializedBody' in options) {
123
+ const hasSerializedBody =
124
+ options.serializedBody !== undefined && options.serializedBody !== '';
125
+
126
+ return hasSerializedBody ? options.serializedBody : null;
127
+ }
128
+
129
+ // not all clients implement a serializedBody property (i.e. client-axios)
130
+ return options.body !== '' ? options.body : null;
131
+ }
132
+
133
+ // plain/text body
134
+ if (hasBody) {
135
+ return options.body;
136
+ }
137
+
138
+ // no body was provided
139
+ return undefined;
140
+ }
package/src/index.ts ADDED
@@ -0,0 +1,4 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+
3
+ export { deleteByOrgApiKeysById, deleteByOrgByRepo, deleteByOrgByRepoBranchesByBranch, deleteByOrgByRepoWebhooksByWebhookId, getByOrg, getByOrgApiKeys, getByOrgByRepo, getByOrgByRepoBranches, getByOrgByRepoCommits, getByOrgByRepoCommitsBySha, getByOrgByRepoContent, getByOrgByRepoDiff, getByOrgByRepoWebhooks, getByOrgRepos, type Options, patchByOrgByRepo, postByOrgApiKeys, postByOrgByRepoBranches, postByOrgByRepoCommits, postByOrgByRepoWebhooks, postByOrgRepos } from './sdk.gen';
4
+ export type { ClientOptions, DeleteByOrgApiKeysByIdData, DeleteByOrgApiKeysByIdError, DeleteByOrgApiKeysByIdErrors, DeleteByOrgApiKeysByIdResponse, DeleteByOrgApiKeysByIdResponses, DeleteByOrgByRepoBranchesByBranchData, DeleteByOrgByRepoBranchesByBranchError, DeleteByOrgByRepoBranchesByBranchErrors, DeleteByOrgByRepoBranchesByBranchResponse, DeleteByOrgByRepoBranchesByBranchResponses, DeleteByOrgByRepoData, DeleteByOrgByRepoError, DeleteByOrgByRepoErrors, DeleteByOrgByRepoResponse, DeleteByOrgByRepoResponses, DeleteByOrgByRepoWebhooksByWebhookIdData, DeleteByOrgByRepoWebhooksByWebhookIdError, DeleteByOrgByRepoWebhooksByWebhookIdErrors, DeleteByOrgByRepoWebhooksByWebhookIdResponse, DeleteByOrgByRepoWebhooksByWebhookIdResponses, GetByOrgApiKeysData, GetByOrgApiKeysError, GetByOrgApiKeysErrors, GetByOrgApiKeysResponse, GetByOrgApiKeysResponses, GetByOrgByRepoBranchesData, GetByOrgByRepoBranchesError, GetByOrgByRepoBranchesErrors, GetByOrgByRepoBranchesResponse, GetByOrgByRepoBranchesResponses, GetByOrgByRepoCommitsByShaData, GetByOrgByRepoCommitsByShaError, GetByOrgByRepoCommitsByShaErrors, GetByOrgByRepoCommitsByShaResponse, GetByOrgByRepoCommitsByShaResponses, GetByOrgByRepoCommitsData, GetByOrgByRepoCommitsError, GetByOrgByRepoCommitsErrors, GetByOrgByRepoCommitsResponse, GetByOrgByRepoCommitsResponses, GetByOrgByRepoContentData, GetByOrgByRepoContentError, GetByOrgByRepoContentErrors, GetByOrgByRepoContentResponse, GetByOrgByRepoContentResponses, GetByOrgByRepoData, GetByOrgByRepoDiffData, GetByOrgByRepoDiffError, GetByOrgByRepoDiffErrors, GetByOrgByRepoDiffResponse, GetByOrgByRepoDiffResponses, GetByOrgByRepoError, GetByOrgByRepoErrors, GetByOrgByRepoResponse, GetByOrgByRepoResponses, GetByOrgByRepoWebhooksData, GetByOrgByRepoWebhooksError, GetByOrgByRepoWebhooksErrors, GetByOrgByRepoWebhooksResponse, GetByOrgByRepoWebhooksResponses, GetByOrgData, GetByOrgError, GetByOrgErrors, GetByOrgReposData, GetByOrgReposError, GetByOrgReposErrors, GetByOrgReposResponse, GetByOrgReposResponses, GetByOrgResponse, GetByOrgResponses, PatchByOrgByRepoData, PatchByOrgByRepoError, PatchByOrgByRepoErrors, PatchByOrgByRepoResponse, PatchByOrgByRepoResponses, PostByOrgApiKeysData, PostByOrgApiKeysError, PostByOrgApiKeysErrors, PostByOrgApiKeysResponse, PostByOrgApiKeysResponses, PostByOrgByRepoBranchesData, PostByOrgByRepoBranchesError, PostByOrgByRepoBranchesErrors, PostByOrgByRepoBranchesResponse, PostByOrgByRepoBranchesResponses, PostByOrgByRepoCommitsData, PostByOrgByRepoCommitsError, PostByOrgByRepoCommitsErrors, PostByOrgByRepoCommitsResponse, PostByOrgByRepoCommitsResponses, PostByOrgByRepoWebhooksData, PostByOrgByRepoWebhooksError, PostByOrgByRepoWebhooksErrors, PostByOrgByRepoWebhooksResponse, PostByOrgByRepoWebhooksResponses, PostByOrgReposData, PostByOrgReposError, PostByOrgReposErrors, PostByOrgReposResponse, PostByOrgReposResponses } from './types.gen';
package/src/sdk.gen.ts ADDED
@@ -0,0 +1,263 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+
3
+ import type { Client, Options as Options2, TDataShape } from './client';
4
+ import { client } from './client.gen';
5
+ import type { DeleteByOrgApiKeysByIdData, DeleteByOrgApiKeysByIdErrors, DeleteByOrgApiKeysByIdResponses, DeleteByOrgByRepoBranchesByBranchData, DeleteByOrgByRepoBranchesByBranchErrors, DeleteByOrgByRepoBranchesByBranchResponses, DeleteByOrgByRepoData, DeleteByOrgByRepoErrors, DeleteByOrgByRepoResponses, DeleteByOrgByRepoWebhooksByWebhookIdData, DeleteByOrgByRepoWebhooksByWebhookIdErrors, DeleteByOrgByRepoWebhooksByWebhookIdResponses, GetByOrgApiKeysData, GetByOrgApiKeysErrors, GetByOrgApiKeysResponses, GetByOrgByRepoBranchesData, GetByOrgByRepoBranchesErrors, GetByOrgByRepoBranchesResponses, GetByOrgByRepoCommitsByShaData, GetByOrgByRepoCommitsByShaErrors, GetByOrgByRepoCommitsByShaResponses, GetByOrgByRepoCommitsData, GetByOrgByRepoCommitsErrors, GetByOrgByRepoCommitsResponses, GetByOrgByRepoContentData, GetByOrgByRepoContentErrors, GetByOrgByRepoContentResponses, GetByOrgByRepoData, GetByOrgByRepoDiffData, GetByOrgByRepoDiffErrors, GetByOrgByRepoDiffResponses, GetByOrgByRepoErrors, GetByOrgByRepoResponses, GetByOrgByRepoWebhooksData, GetByOrgByRepoWebhooksErrors, GetByOrgByRepoWebhooksResponses, GetByOrgData, GetByOrgErrors, GetByOrgReposData, GetByOrgReposErrors, GetByOrgReposResponses, GetByOrgResponses, PatchByOrgByRepoData, PatchByOrgByRepoErrors, PatchByOrgByRepoResponses, PostByOrgApiKeysData, PostByOrgApiKeysErrors, PostByOrgApiKeysResponses, PostByOrgByRepoBranchesData, PostByOrgByRepoBranchesErrors, PostByOrgByRepoBranchesResponses, PostByOrgByRepoCommitsData, PostByOrgByRepoCommitsErrors, PostByOrgByRepoCommitsResponses, PostByOrgByRepoWebhooksData, PostByOrgByRepoWebhooksErrors, PostByOrgByRepoWebhooksResponses, PostByOrgReposData, PostByOrgReposErrors, PostByOrgReposResponses } from './types.gen';
6
+
7
+ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {
8
+ /**
9
+ * You can provide a client instance returned by `createClient()` instead of
10
+ * individual options. This might be also useful if you want to implement a
11
+ * custom client.
12
+ */
13
+ client?: Client;
14
+ /**
15
+ * You can pass arbitrary values through the `meta` object. This can be
16
+ * used to access values that aren't defined as part of the SDK function.
17
+ */
18
+ meta?: Record<string, unknown>;
19
+ };
20
+
21
+ /**
22
+ * List API keys
23
+ *
24
+ * List all API keys for the organization (key values are not returned)
25
+ */
26
+ export const getByOrgApiKeys = <ThrowOnError extends boolean = false>(options: Options<GetByOrgApiKeysData, ThrowOnError>) => (options.client ?? client).get<GetByOrgApiKeysResponses, GetByOrgApiKeysErrors, ThrowOnError>({
27
+ security: [{ scheme: 'bearer', type: 'http' }],
28
+ url: '/{org}/api-keys',
29
+ ...options
30
+ });
31
+
32
+ /**
33
+ * Create API key
34
+ *
35
+ * Create a new API key for programmatic access
36
+ */
37
+ export const postByOrgApiKeys = <ThrowOnError extends boolean = false>(options: Options<PostByOrgApiKeysData, ThrowOnError>) => (options.client ?? client).post<PostByOrgApiKeysResponses, PostByOrgApiKeysErrors, ThrowOnError>({
38
+ security: [{ scheme: 'bearer', type: 'http' }],
39
+ url: '/{org}/api-keys',
40
+ ...options,
41
+ headers: {
42
+ 'Content-Type': 'application/json',
43
+ ...options.headers
44
+ }
45
+ });
46
+
47
+ /**
48
+ * Revoke API key
49
+ *
50
+ * Revoke an API key by its ID
51
+ */
52
+ export const deleteByOrgApiKeysById = <ThrowOnError extends boolean = false>(options: Options<DeleteByOrgApiKeysByIdData, ThrowOnError>) => (options.client ?? client).delete<DeleteByOrgApiKeysByIdResponses, DeleteByOrgApiKeysByIdErrors, ThrowOnError>({
53
+ security: [{ scheme: 'bearer', type: 'http' }],
54
+ url: '/{org}/api-keys/{id}',
55
+ ...options
56
+ });
57
+
58
+ /**
59
+ * List repositories
60
+ *
61
+ * List all repositories in the organization
62
+ */
63
+ export const getByOrgRepos = <ThrowOnError extends boolean = false>(options: Options<GetByOrgReposData, ThrowOnError>) => (options.client ?? client).get<GetByOrgReposResponses, GetByOrgReposErrors, ThrowOnError>({
64
+ security: [{ scheme: 'bearer', type: 'http' }],
65
+ url: '/{org}/repos',
66
+ ...options
67
+ });
68
+
69
+ /**
70
+ * Create repository
71
+ *
72
+ * Create a new repository in the organization
73
+ */
74
+ export const postByOrgRepos = <ThrowOnError extends boolean = false>(options: Options<PostByOrgReposData, ThrowOnError>) => (options.client ?? client).post<PostByOrgReposResponses, PostByOrgReposErrors, ThrowOnError>({
75
+ security: [{ scheme: 'bearer', type: 'http' }],
76
+ url: '/{org}/repos',
77
+ ...options,
78
+ headers: {
79
+ 'Content-Type': 'application/json',
80
+ ...options.headers
81
+ }
82
+ });
83
+
84
+ /**
85
+ * Delete repository
86
+ *
87
+ * Permanently delete a repository and all its data
88
+ */
89
+ export const deleteByOrgByRepo = <ThrowOnError extends boolean = false>(options: Options<DeleteByOrgByRepoData, ThrowOnError>) => (options.client ?? client).delete<DeleteByOrgByRepoResponses, DeleteByOrgByRepoErrors, ThrowOnError>({
90
+ security: [{ scheme: 'bearer', type: 'http' }],
91
+ url: '/{org}/{repo}',
92
+ ...options
93
+ });
94
+
95
+ /**
96
+ * Get repository
97
+ *
98
+ * Get metadata for a specific repository
99
+ */
100
+ export const getByOrgByRepo = <ThrowOnError extends boolean = false>(options: Options<GetByOrgByRepoData, ThrowOnError>) => (options.client ?? client).get<GetByOrgByRepoResponses, GetByOrgByRepoErrors, ThrowOnError>({
101
+ security: [{ scheme: 'bearer', type: 'http' }],
102
+ url: '/{org}/{repo}',
103
+ ...options
104
+ });
105
+
106
+ /**
107
+ * Update repository
108
+ *
109
+ * Update repository name or upstream configuration
110
+ */
111
+ export const patchByOrgByRepo = <ThrowOnError extends boolean = false>(options: Options<PatchByOrgByRepoData, ThrowOnError>) => (options.client ?? client).patch<PatchByOrgByRepoResponses, PatchByOrgByRepoErrors, ThrowOnError>({
112
+ security: [{ scheme: 'bearer', type: 'http' }],
113
+ url: '/{org}/{repo}',
114
+ ...options,
115
+ headers: {
116
+ 'Content-Type': 'application/json',
117
+ ...options.headers
118
+ }
119
+ });
120
+
121
+ /**
122
+ * Get content
123
+ *
124
+ * Get file content or directory listing at a path. Use Accept: application/json for the JSON union response, or Accept: application/octet-stream for raw file bytes. Directory + octet-stream requests return 406 Not Acceptable.
125
+ */
126
+ export const getByOrgByRepoContent = <ThrowOnError extends boolean = false>(options: Options<GetByOrgByRepoContentData, ThrowOnError>) => (options.client ?? client).get<GetByOrgByRepoContentResponses, GetByOrgByRepoContentErrors, ThrowOnError>({
127
+ security: [{ scheme: 'bearer', type: 'http' }],
128
+ url: '/{org}/{repo}/content',
129
+ ...options
130
+ });
131
+
132
+ /**
133
+ * List branches
134
+ *
135
+ * List all branches in a repository
136
+ */
137
+ export const getByOrgByRepoBranches = <ThrowOnError extends boolean = false>(options: Options<GetByOrgByRepoBranchesData, ThrowOnError>) => (options.client ?? client).get<GetByOrgByRepoBranchesResponses, GetByOrgByRepoBranchesErrors, ThrowOnError>({
138
+ security: [{ scheme: 'bearer', type: 'http' }],
139
+ url: '/{org}/{repo}/branches',
140
+ ...options
141
+ });
142
+
143
+ /**
144
+ * Create branch
145
+ *
146
+ * Create a new branch from an existing ref
147
+ */
148
+ export const postByOrgByRepoBranches = <ThrowOnError extends boolean = false>(options: Options<PostByOrgByRepoBranchesData, ThrowOnError>) => (options.client ?? client).post<PostByOrgByRepoBranchesResponses, PostByOrgByRepoBranchesErrors, ThrowOnError>({
149
+ security: [{ scheme: 'bearer', type: 'http' }],
150
+ url: '/{org}/{repo}/branches',
151
+ ...options,
152
+ headers: {
153
+ 'Content-Type': 'application/json',
154
+ ...options.headers
155
+ }
156
+ });
157
+
158
+ /**
159
+ * Delete branch
160
+ *
161
+ * Delete a branch from a repository
162
+ */
163
+ export const deleteByOrgByRepoBranchesByBranch = <ThrowOnError extends boolean = false>(options: Options<DeleteByOrgByRepoBranchesByBranchData, ThrowOnError>) => (options.client ?? client).delete<DeleteByOrgByRepoBranchesByBranchResponses, DeleteByOrgByRepoBranchesByBranchErrors, ThrowOnError>({
164
+ security: [{ scheme: 'bearer', type: 'http' }],
165
+ url: '/{org}/{repo}/branches/{branch}',
166
+ ...options
167
+ });
168
+
169
+ /**
170
+ * List commits
171
+ *
172
+ * List commits for a repository from a specific ref
173
+ */
174
+ export const getByOrgByRepoCommits = <ThrowOnError extends boolean = false>(options: Options<GetByOrgByRepoCommitsData, ThrowOnError>) => (options.client ?? client).get<GetByOrgByRepoCommitsResponses, GetByOrgByRepoCommitsErrors, ThrowOnError>({
175
+ security: [{ scheme: 'bearer', type: 'http' }],
176
+ url: '/{org}/{repo}/commits',
177
+ ...options
178
+ });
179
+
180
+ /**
181
+ * Create commit
182
+ *
183
+ * Create a new commit on a branch with file changes
184
+ */
185
+ export const postByOrgByRepoCommits = <ThrowOnError extends boolean = false>(options: Options<PostByOrgByRepoCommitsData, ThrowOnError>) => (options.client ?? client).post<PostByOrgByRepoCommitsResponses, PostByOrgByRepoCommitsErrors, ThrowOnError>({
186
+ security: [{ scheme: 'bearer', type: 'http' }],
187
+ url: '/{org}/{repo}/commits',
188
+ ...options,
189
+ headers: {
190
+ 'Content-Type': 'application/json',
191
+ ...options.headers
192
+ }
193
+ });
194
+
195
+ /**
196
+ * Get commit
197
+ *
198
+ * Retrieve a specific commit by its SHA
199
+ */
200
+ export const getByOrgByRepoCommitsBySha = <ThrowOnError extends boolean = false>(options: Options<GetByOrgByRepoCommitsByShaData, ThrowOnError>) => (options.client ?? client).get<GetByOrgByRepoCommitsByShaResponses, GetByOrgByRepoCommitsByShaErrors, ThrowOnError>({
201
+ security: [{ scheme: 'bearer', type: 'http' }],
202
+ url: '/{org}/{repo}/commits/{sha}',
203
+ ...options
204
+ });
205
+
206
+ /**
207
+ * Get diff
208
+ *
209
+ * Retrieve the diff between two commit OIDs
210
+ */
211
+ export const getByOrgByRepoDiff = <ThrowOnError extends boolean = false>(options: Options<GetByOrgByRepoDiffData, ThrowOnError>) => (options.client ?? client).get<GetByOrgByRepoDiffResponses, GetByOrgByRepoDiffErrors, ThrowOnError>({
212
+ security: [{ scheme: 'bearer', type: 'http' }],
213
+ url: '/{org}/{repo}/diff',
214
+ ...options
215
+ });
216
+
217
+ /**
218
+ * List webhooks
219
+ *
220
+ * List webhooks for a repository
221
+ */
222
+ export const getByOrgByRepoWebhooks = <ThrowOnError extends boolean = false>(options: Options<GetByOrgByRepoWebhooksData, ThrowOnError>) => (options.client ?? client).get<GetByOrgByRepoWebhooksResponses, GetByOrgByRepoWebhooksErrors, ThrowOnError>({
223
+ security: [{ scheme: 'bearer', type: 'http' }],
224
+ url: '/{org}/{repo}/webhooks',
225
+ ...options
226
+ });
227
+
228
+ /**
229
+ * Create webhook
230
+ *
231
+ * Create a webhook for a repository
232
+ */
233
+ export const postByOrgByRepoWebhooks = <ThrowOnError extends boolean = false>(options: Options<PostByOrgByRepoWebhooksData, ThrowOnError>) => (options.client ?? client).post<PostByOrgByRepoWebhooksResponses, PostByOrgByRepoWebhooksErrors, ThrowOnError>({
234
+ security: [{ scheme: 'bearer', type: 'http' }],
235
+ url: '/{org}/{repo}/webhooks',
236
+ ...options,
237
+ headers: {
238
+ 'Content-Type': 'application/json',
239
+ ...options.headers
240
+ }
241
+ });
242
+
243
+ /**
244
+ * Delete webhook
245
+ *
246
+ * Delete a webhook from a repository
247
+ */
248
+ export const deleteByOrgByRepoWebhooksByWebhookId = <ThrowOnError extends boolean = false>(options: Options<DeleteByOrgByRepoWebhooksByWebhookIdData, ThrowOnError>) => (options.client ?? client).delete<DeleteByOrgByRepoWebhooksByWebhookIdResponses, DeleteByOrgByRepoWebhooksByWebhookIdErrors, ThrowOnError>({
249
+ security: [{ scheme: 'bearer', type: 'http' }],
250
+ url: '/{org}/{repo}/webhooks/{webhookId}',
251
+ ...options
252
+ });
253
+
254
+ /**
255
+ * Get organization
256
+ *
257
+ * Get organization metadata and repository counts
258
+ */
259
+ export const getByOrg = <ThrowOnError extends boolean = false>(options: Options<GetByOrgData, ThrowOnError>) => (options.client ?? client).get<GetByOrgResponses, GetByOrgErrors, ThrowOnError>({
260
+ security: [{ scheme: 'bearer', type: 'http' }],
261
+ url: '/{org}',
262
+ ...options
263
+ });