@mesadev/sdk 0.1.2 → 0.1.4
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/.devcontainer/devcontainer.json +38 -36
- package/README.md +164 -134
- package/dist/commonjs/funcs/contentGet.js +8 -0
- package/dist/commonjs/funcs/contentGet.js.map +1 -1
- package/dist/commonjs/funcs/webhooksCreate.d.ts +18 -0
- package/dist/commonjs/funcs/webhooksCreate.d.ts.map +1 -0
- package/dist/commonjs/funcs/webhooksCreate.js +129 -0
- package/dist/commonjs/funcs/webhooksCreate.js.map +1 -0
- package/dist/commonjs/funcs/webhooksDelete.d.ts +18 -0
- package/dist/commonjs/funcs/webhooksDelete.d.ts.map +1 -0
- package/dist/commonjs/funcs/webhooksDelete.js +132 -0
- package/dist/commonjs/funcs/webhooksDelete.js.map +1 -0
- package/dist/commonjs/funcs/webhooksList.d.ts +18 -0
- package/dist/commonjs/funcs/webhooksList.d.ts.map +1 -0
- package/dist/commonjs/funcs/webhooksList.js +128 -0
- package/dist/commonjs/funcs/webhooksList.js.map +1 -0
- package/dist/commonjs/hooks/hooks.d.ts.map +1 -1
- package/dist/commonjs/hooks/hooks.js +0 -2
- package/dist/commonjs/hooks/hooks.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/models/errors/deleteorgrepowebhookswebhookid.d.ts +151 -0
- package/dist/commonjs/models/errors/deleteorgrepowebhookswebhookid.d.ts.map +1 -0
- package/dist/commonjs/models/errors/deleteorgrepowebhookswebhookid.js +239 -0
- package/dist/commonjs/models/errors/deleteorgrepowebhookswebhookid.js.map +1 -0
- package/dist/commonjs/models/errors/getorgrepowebhooks.d.ts +151 -0
- package/dist/commonjs/models/errors/getorgrepowebhooks.d.ts.map +1 -0
- package/dist/commonjs/models/errors/getorgrepowebhooks.js +232 -0
- package/dist/commonjs/models/errors/getorgrepowebhooks.js.map +1 -0
- package/dist/commonjs/models/errors/index.d.ts +3 -0
- package/dist/commonjs/models/errors/index.d.ts.map +1 -1
- package/dist/commonjs/models/errors/index.js +3 -0
- package/dist/commonjs/models/errors/index.js.map +1 -1
- package/dist/commonjs/models/errors/postorgrepowebhooks.d.ts +151 -0
- package/dist/commonjs/models/errors/postorgrepowebhooks.d.ts.map +1 -0
- package/dist/commonjs/models/errors/postorgrepowebhooks.js +232 -0
- package/dist/commonjs/models/errors/postorgrepowebhooks.js.map +1 -0
- package/dist/commonjs/models/operations/deleteorgrepowebhookswebhookid.d.ts +97 -0
- package/dist/commonjs/models/operations/deleteorgrepowebhookswebhookid.d.ts.map +1 -0
- package/dist/commonjs/models/operations/deleteorgrepowebhookswebhookid.js +138 -0
- package/dist/commonjs/models/operations/deleteorgrepowebhookswebhookid.js.map +1 -0
- package/dist/commonjs/models/operations/getorgrepobranches.d.ts +1 -1
- package/dist/commonjs/models/operations/getorgrepobranches.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getorgrepobranches.js +1 -1
- package/dist/commonjs/models/operations/getorgrepobranches.js.map +1 -1
- package/dist/commonjs/models/operations/getorgrepocommits.d.ts +1 -1
- package/dist/commonjs/models/operations/getorgrepocommits.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getorgrepocommits.js +1 -1
- package/dist/commonjs/models/operations/getorgrepocommits.js.map +1 -1
- package/dist/commonjs/models/operations/getorgrepocontent.d.ts +12 -2
- package/dist/commonjs/models/operations/getorgrepocontent.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getorgrepocontent.js +7 -2
- package/dist/commonjs/models/operations/getorgrepocontent.js.map +1 -1
- package/dist/commonjs/models/operations/getorgrepos.d.ts +1 -1
- package/dist/commonjs/models/operations/getorgrepos.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getorgrepos.js +1 -1
- package/dist/commonjs/models/operations/getorgrepos.js.map +1 -1
- package/dist/commonjs/models/operations/getorgrepowebhooks.d.ts +114 -0
- package/dist/commonjs/models/operations/getorgrepowebhooks.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getorgrepowebhooks.js +155 -0
- package/dist/commonjs/models/operations/getorgrepowebhooks.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +3 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +3 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/postorgapikeys.d.ts +2 -0
- package/dist/commonjs/models/operations/postorgapikeys.d.ts.map +1 -1
- package/dist/commonjs/models/operations/postorgapikeys.js +2 -0
- package/dist/commonjs/models/operations/postorgapikeys.js.map +1 -1
- package/dist/commonjs/models/operations/postorgrepowebhooks.d.ts +135 -0
- package/dist/commonjs/models/operations/postorgrepowebhooks.d.ts.map +1 -0
- package/dist/commonjs/models/operations/postorgrepowebhooks.js +168 -0
- package/dist/commonjs/models/operations/postorgrepowebhooks.js.map +1 -0
- package/dist/commonjs/sdk/sdk.d.ts +3 -0
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +4 -0
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/commonjs/sdk/webhooks.d.ts +26 -0
- package/dist/commonjs/sdk/webhooks.d.ts.map +1 -0
- package/dist/commonjs/sdk/webhooks.js +42 -0
- package/dist/commonjs/sdk/webhooks.js.map +1 -0
- package/dist/esm/funcs/contentGet.js +9 -1
- package/dist/esm/funcs/contentGet.js.map +1 -1
- package/dist/esm/funcs/webhooksCreate.d.ts +18 -0
- package/dist/esm/funcs/webhooksCreate.d.ts.map +1 -0
- package/dist/esm/funcs/webhooksCreate.js +93 -0
- package/dist/esm/funcs/webhooksCreate.js.map +1 -0
- package/dist/esm/funcs/webhooksDelete.d.ts +18 -0
- package/dist/esm/funcs/webhooksDelete.d.ts.map +1 -0
- package/dist/esm/funcs/webhooksDelete.js +96 -0
- package/dist/esm/funcs/webhooksDelete.js.map +1 -0
- package/dist/esm/funcs/webhooksList.d.ts +18 -0
- package/dist/esm/funcs/webhooksList.d.ts.map +1 -0
- package/dist/esm/funcs/webhooksList.js +92 -0
- package/dist/esm/funcs/webhooksList.js.map +1 -0
- package/dist/esm/hooks/hooks.d.ts.map +1 -1
- package/dist/esm/hooks/hooks.js +0 -2
- package/dist/esm/hooks/hooks.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/models/errors/deleteorgrepowebhookswebhookid.d.ts +151 -0
- package/dist/esm/models/errors/deleteorgrepowebhookswebhookid.d.ts.map +1 -0
- package/dist/esm/models/errors/deleteorgrepowebhookswebhookid.js +196 -0
- package/dist/esm/models/errors/deleteorgrepowebhookswebhookid.js.map +1 -0
- package/dist/esm/models/errors/getorgrepowebhooks.d.ts +151 -0
- package/dist/esm/models/errors/getorgrepowebhooks.d.ts.map +1 -0
- package/dist/esm/models/errors/getorgrepowebhooks.js +189 -0
- package/dist/esm/models/errors/getorgrepowebhooks.js.map +1 -0
- package/dist/esm/models/errors/index.d.ts +3 -0
- package/dist/esm/models/errors/index.d.ts.map +1 -1
- package/dist/esm/models/errors/index.js +3 -0
- package/dist/esm/models/errors/index.js.map +1 -1
- package/dist/esm/models/errors/postorgrepowebhooks.d.ts +151 -0
- package/dist/esm/models/errors/postorgrepowebhooks.d.ts.map +1 -0
- package/dist/esm/models/errors/postorgrepowebhooks.js +189 -0
- package/dist/esm/models/errors/postorgrepowebhooks.js.map +1 -0
- package/dist/esm/models/operations/deleteorgrepowebhookswebhookid.d.ts +97 -0
- package/dist/esm/models/operations/deleteorgrepowebhookswebhookid.d.ts.map +1 -0
- package/dist/esm/models/operations/deleteorgrepowebhookswebhookid.js +93 -0
- package/dist/esm/models/operations/deleteorgrepowebhookswebhookid.js.map +1 -0
- package/dist/esm/models/operations/getorgrepobranches.d.ts +1 -1
- package/dist/esm/models/operations/getorgrepobranches.d.ts.map +1 -1
- package/dist/esm/models/operations/getorgrepobranches.js +1 -1
- package/dist/esm/models/operations/getorgrepobranches.js.map +1 -1
- package/dist/esm/models/operations/getorgrepocommits.d.ts +1 -1
- package/dist/esm/models/operations/getorgrepocommits.d.ts.map +1 -1
- package/dist/esm/models/operations/getorgrepocommits.js +1 -1
- package/dist/esm/models/operations/getorgrepocommits.js.map +1 -1
- package/dist/esm/models/operations/getorgrepocontent.d.ts +12 -2
- package/dist/esm/models/operations/getorgrepocontent.d.ts.map +1 -1
- package/dist/esm/models/operations/getorgrepocontent.js +7 -2
- package/dist/esm/models/operations/getorgrepocontent.js.map +1 -1
- package/dist/esm/models/operations/getorgrepos.d.ts +1 -1
- package/dist/esm/models/operations/getorgrepos.d.ts.map +1 -1
- package/dist/esm/models/operations/getorgrepos.js +1 -1
- package/dist/esm/models/operations/getorgrepos.js.map +1 -1
- package/dist/esm/models/operations/getorgrepowebhooks.d.ts +114 -0
- package/dist/esm/models/operations/getorgrepowebhooks.d.ts.map +1 -0
- package/dist/esm/models/operations/getorgrepowebhooks.js +109 -0
- package/dist/esm/models/operations/getorgrepowebhooks.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +3 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +3 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/postorgapikeys.d.ts +2 -0
- package/dist/esm/models/operations/postorgapikeys.d.ts.map +1 -1
- package/dist/esm/models/operations/postorgapikeys.js +2 -0
- package/dist/esm/models/operations/postorgapikeys.js.map +1 -1
- package/dist/esm/models/operations/postorgrepowebhooks.d.ts +135 -0
- package/dist/esm/models/operations/postorgrepowebhooks.d.ts.map +1 -0
- package/dist/esm/models/operations/postorgrepowebhooks.js +122 -0
- package/dist/esm/models/operations/postorgrepowebhooks.js.map +1 -0
- package/dist/esm/sdk/sdk.d.ts +3 -0
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +4 -0
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/dist/esm/sdk/webhooks.d.ts +26 -0
- package/dist/esm/sdk/webhooks.d.ts.map +1 -0
- package/dist/esm/sdk/webhooks.js +38 -0
- package/dist/esm/sdk/webhooks.js.map +1 -0
- package/examples/adminCreateApiKey.example.ts +4 -6
- package/examples/package.json +1 -1
- package/jsr.json +14 -5
- package/package.json +1 -1
- package/src/funcs/contentGet.ts +10 -1
- package/src/funcs/webhooksCreate.ts +206 -0
- package/src/funcs/webhooksDelete.ts +236 -0
- package/src/funcs/webhooksList.ts +205 -0
- package/src/hooks/hooks.ts +0 -3
- package/src/lib/config.ts +3 -3
- package/src/models/errors/deleteorgrepowebhookswebhookid.ts +368 -0
- package/src/models/errors/getorgrepowebhooks.ts +371 -0
- package/src/models/errors/index.ts +3 -0
- package/src/models/errors/postorgrepowebhooks.ts +369 -0
- package/src/models/operations/deleteorgrepowebhookswebhookid.ts +285 -0
- package/src/models/operations/getorgrepobranches.ts +2 -2
- package/src/models/operations/getorgrepocommits.ts +2 -2
- package/src/models/operations/getorgrepocontent.ts +19 -4
- package/src/models/operations/getorgrepos.ts +2 -2
- package/src/models/operations/getorgrepowebhooks.ts +305 -0
- package/src/models/operations/index.ts +3 -0
- package/src/models/operations/postorgapikeys.ts +2 -0
- package/src/models/operations/postorgrepowebhooks.ts +339 -0
- package/src/sdk/sdk.ts +6 -0
- package/src/sdk/webhooks.ts +63 -0
- package/tsconfig.json +1 -0
|
@@ -15,6 +15,11 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
15
15
|
export type GetOrgRepoContentRequest = {
|
|
16
16
|
org: string;
|
|
17
17
|
repo: string;
|
|
18
|
+
cursor?: string | undefined;
|
|
19
|
+
limit?: number | undefined;
|
|
20
|
+
ref?: string | undefined;
|
|
21
|
+
path?: string | undefined;
|
|
22
|
+
depth?: number | undefined;
|
|
18
23
|
};
|
|
19
24
|
|
|
20
25
|
export type GetOrgRepoContentInternalServerErrorError = {
|
|
@@ -80,6 +85,8 @@ export type Entry =
|
|
|
80
85
|
| discriminatedUnionTypes.Unknown<"type">;
|
|
81
86
|
|
|
82
87
|
export type Dir = {
|
|
88
|
+
nextCursor: string | null;
|
|
89
|
+
hasMore: boolean;
|
|
83
90
|
type: "dir";
|
|
84
91
|
name: string;
|
|
85
92
|
path: string;
|
|
@@ -87,8 +94,6 @@ export type Dir = {
|
|
|
87
94
|
entries: Array<
|
|
88
95
|
EntryFile | EntryDir | discriminatedUnionTypes.Unknown<"type">
|
|
89
96
|
>;
|
|
90
|
-
nextCursor: string | null;
|
|
91
|
-
hasMore: boolean;
|
|
92
97
|
};
|
|
93
98
|
|
|
94
99
|
export type Base64 = {
|
|
@@ -119,6 +124,11 @@ export type GetOrgRepoContentResponse =
|
|
|
119
124
|
export type GetOrgRepoContentRequest$Outbound = {
|
|
120
125
|
org: string;
|
|
121
126
|
repo: string;
|
|
127
|
+
cursor?: string | undefined;
|
|
128
|
+
limit?: number | undefined;
|
|
129
|
+
ref?: string | undefined;
|
|
130
|
+
path?: string | undefined;
|
|
131
|
+
depth?: number | undefined;
|
|
122
132
|
};
|
|
123
133
|
|
|
124
134
|
/** @internal */
|
|
@@ -128,6 +138,11 @@ export const GetOrgRepoContentRequest$outboundSchema: z.ZodMiniType<
|
|
|
128
138
|
> = z.object({
|
|
129
139
|
org: z.string(),
|
|
130
140
|
repo: z.string(),
|
|
141
|
+
cursor: z.optional(z.string()),
|
|
142
|
+
limit: z.optional(z.int()),
|
|
143
|
+
ref: z.optional(z.string()),
|
|
144
|
+
path: z.optional(z.string()),
|
|
145
|
+
depth: z.optional(z.int()),
|
|
131
146
|
});
|
|
132
147
|
|
|
133
148
|
export function getOrgRepoContentRequestToJSON(
|
|
@@ -343,6 +358,8 @@ export function entryFromJSON(
|
|
|
343
358
|
/** @internal */
|
|
344
359
|
export const Dir$inboundSchema: z.ZodMiniType<Dir, unknown> = z.pipe(
|
|
345
360
|
z.object({
|
|
361
|
+
next_cursor: types.nullable(types.string()),
|
|
362
|
+
has_more: types.boolean(),
|
|
346
363
|
type: types.literal("dir"),
|
|
347
364
|
name: types.string(),
|
|
348
365
|
path: types.string(),
|
|
@@ -351,8 +368,6 @@ export const Dir$inboundSchema: z.ZodMiniType<Dir, unknown> = z.pipe(
|
|
|
351
368
|
file: z.lazy(() => EntryFile$inboundSchema),
|
|
352
369
|
dir: z.lazy(() => EntryDir$inboundSchema),
|
|
353
370
|
})),
|
|
354
|
-
next_cursor: types.nullable(types.string()),
|
|
355
|
-
has_more: types.boolean(),
|
|
356
371
|
}),
|
|
357
372
|
z.transform((v) => {
|
|
358
373
|
return remap$(v, {
|
|
@@ -71,9 +71,9 @@ export type Repo = {
|
|
|
71
71
|
* Repository list
|
|
72
72
|
*/
|
|
73
73
|
export type GetOrgReposResponseBody = {
|
|
74
|
-
repos: Array<Repo>;
|
|
75
74
|
nextCursor: string | null;
|
|
76
75
|
hasMore: boolean;
|
|
76
|
+
repos: Array<Repo>;
|
|
77
77
|
};
|
|
78
78
|
|
|
79
79
|
export type GetOrgReposResponse = {
|
|
@@ -283,9 +283,9 @@ export const GetOrgReposResponseBody$inboundSchema: z.ZodMiniType<
|
|
|
283
283
|
unknown
|
|
284
284
|
> = z.pipe(
|
|
285
285
|
z.object({
|
|
286
|
-
repos: z.array(z.lazy(() => Repo$inboundSchema)),
|
|
287
286
|
next_cursor: types.nullable(types.string()),
|
|
288
287
|
has_more: types.boolean(),
|
|
288
|
+
repos: z.array(z.lazy(() => Repo$inboundSchema)),
|
|
289
289
|
}),
|
|
290
290
|
z.transform((v) => {
|
|
291
291
|
return remap$(v, {
|
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import * as types from "../../types/primitives.js";
|
|
11
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
12
|
+
|
|
13
|
+
export type GetOrgRepoWebhooksRequest = {
|
|
14
|
+
org: string;
|
|
15
|
+
repo: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export type GetOrgRepoWebhooksInternalServerErrorError = {
|
|
19
|
+
code: string;
|
|
20
|
+
message: string;
|
|
21
|
+
details?: { [k: string]: any } | undefined;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export type GetOrgRepoWebhooksConflictError = {
|
|
25
|
+
code: string;
|
|
26
|
+
message: string;
|
|
27
|
+
details?: { [k: string]: any } | undefined;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export type GetOrgRepoWebhooksNotAcceptableError = {
|
|
31
|
+
code: string;
|
|
32
|
+
message: string;
|
|
33
|
+
details?: { [k: string]: any } | undefined;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export type GetOrgRepoWebhooksNotFoundError = {
|
|
37
|
+
code: string;
|
|
38
|
+
message: string;
|
|
39
|
+
details?: { [k: string]: any } | undefined;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export type GetOrgRepoWebhooksForbiddenError = {
|
|
43
|
+
code: string;
|
|
44
|
+
message: string;
|
|
45
|
+
details?: { [k: string]: any } | undefined;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export type GetOrgRepoWebhooksUnauthorizedError = {
|
|
49
|
+
code: string;
|
|
50
|
+
message: string;
|
|
51
|
+
details?: { [k: string]: any } | undefined;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export type GetOrgRepoWebhooksBadRequestError = {
|
|
55
|
+
code: string;
|
|
56
|
+
message: string;
|
|
57
|
+
details?: { [k: string]: any } | undefined;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export const GetOrgRepoWebhooksEvent = {
|
|
61
|
+
Push: "push",
|
|
62
|
+
} as const;
|
|
63
|
+
export type GetOrgRepoWebhooksEvent = ClosedEnum<
|
|
64
|
+
typeof GetOrgRepoWebhooksEvent
|
|
65
|
+
>;
|
|
66
|
+
|
|
67
|
+
export type Webhook = {
|
|
68
|
+
id: string;
|
|
69
|
+
url: string;
|
|
70
|
+
events: Array<GetOrgRepoWebhooksEvent>;
|
|
71
|
+
branches: Array<string> | null;
|
|
72
|
+
globs: Array<string> | null;
|
|
73
|
+
createdAt: string;
|
|
74
|
+
updatedAt: string;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Webhook list
|
|
79
|
+
*/
|
|
80
|
+
export type GetOrgRepoWebhooksResponse = {
|
|
81
|
+
webhooks: Array<Webhook>;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
/** @internal */
|
|
85
|
+
export type GetOrgRepoWebhooksRequest$Outbound = {
|
|
86
|
+
org: string;
|
|
87
|
+
repo: string;
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
/** @internal */
|
|
91
|
+
export const GetOrgRepoWebhooksRequest$outboundSchema: z.ZodMiniType<
|
|
92
|
+
GetOrgRepoWebhooksRequest$Outbound,
|
|
93
|
+
GetOrgRepoWebhooksRequest
|
|
94
|
+
> = z.object({
|
|
95
|
+
org: z.string(),
|
|
96
|
+
repo: z.string(),
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
export function getOrgRepoWebhooksRequestToJSON(
|
|
100
|
+
getOrgRepoWebhooksRequest: GetOrgRepoWebhooksRequest,
|
|
101
|
+
): string {
|
|
102
|
+
return JSON.stringify(
|
|
103
|
+
GetOrgRepoWebhooksRequest$outboundSchema.parse(getOrgRepoWebhooksRequest),
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/** @internal */
|
|
108
|
+
export const GetOrgRepoWebhooksInternalServerErrorError$inboundSchema:
|
|
109
|
+
z.ZodMiniType<GetOrgRepoWebhooksInternalServerErrorError, unknown> = z.object(
|
|
110
|
+
{
|
|
111
|
+
code: types.string(),
|
|
112
|
+
message: types.string(),
|
|
113
|
+
details: types.optional(z.record(z.string(), z.any())),
|
|
114
|
+
},
|
|
115
|
+
);
|
|
116
|
+
|
|
117
|
+
export function getOrgRepoWebhooksInternalServerErrorErrorFromJSON(
|
|
118
|
+
jsonString: string,
|
|
119
|
+
): SafeParseResult<
|
|
120
|
+
GetOrgRepoWebhooksInternalServerErrorError,
|
|
121
|
+
SDKValidationError
|
|
122
|
+
> {
|
|
123
|
+
return safeParse(
|
|
124
|
+
jsonString,
|
|
125
|
+
(x) =>
|
|
126
|
+
GetOrgRepoWebhooksInternalServerErrorError$inboundSchema.parse(
|
|
127
|
+
JSON.parse(x),
|
|
128
|
+
),
|
|
129
|
+
`Failed to parse 'GetOrgRepoWebhooksInternalServerErrorError' from JSON`,
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/** @internal */
|
|
134
|
+
export const GetOrgRepoWebhooksConflictError$inboundSchema: z.ZodMiniType<
|
|
135
|
+
GetOrgRepoWebhooksConflictError,
|
|
136
|
+
unknown
|
|
137
|
+
> = z.object({
|
|
138
|
+
code: types.string(),
|
|
139
|
+
message: types.string(),
|
|
140
|
+
details: types.optional(z.record(z.string(), z.any())),
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
export function getOrgRepoWebhooksConflictErrorFromJSON(
|
|
144
|
+
jsonString: string,
|
|
145
|
+
): SafeParseResult<GetOrgRepoWebhooksConflictError, SDKValidationError> {
|
|
146
|
+
return safeParse(
|
|
147
|
+
jsonString,
|
|
148
|
+
(x) => GetOrgRepoWebhooksConflictError$inboundSchema.parse(JSON.parse(x)),
|
|
149
|
+
`Failed to parse 'GetOrgRepoWebhooksConflictError' from JSON`,
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/** @internal */
|
|
154
|
+
export const GetOrgRepoWebhooksNotAcceptableError$inboundSchema: z.ZodMiniType<
|
|
155
|
+
GetOrgRepoWebhooksNotAcceptableError,
|
|
156
|
+
unknown
|
|
157
|
+
> = z.object({
|
|
158
|
+
code: types.string(),
|
|
159
|
+
message: types.string(),
|
|
160
|
+
details: types.optional(z.record(z.string(), z.any())),
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
export function getOrgRepoWebhooksNotAcceptableErrorFromJSON(
|
|
164
|
+
jsonString: string,
|
|
165
|
+
): SafeParseResult<GetOrgRepoWebhooksNotAcceptableError, SDKValidationError> {
|
|
166
|
+
return safeParse(
|
|
167
|
+
jsonString,
|
|
168
|
+
(x) =>
|
|
169
|
+
GetOrgRepoWebhooksNotAcceptableError$inboundSchema.parse(JSON.parse(x)),
|
|
170
|
+
`Failed to parse 'GetOrgRepoWebhooksNotAcceptableError' from JSON`,
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/** @internal */
|
|
175
|
+
export const GetOrgRepoWebhooksNotFoundError$inboundSchema: z.ZodMiniType<
|
|
176
|
+
GetOrgRepoWebhooksNotFoundError,
|
|
177
|
+
unknown
|
|
178
|
+
> = z.object({
|
|
179
|
+
code: types.string(),
|
|
180
|
+
message: types.string(),
|
|
181
|
+
details: types.optional(z.record(z.string(), z.any())),
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
export function getOrgRepoWebhooksNotFoundErrorFromJSON(
|
|
185
|
+
jsonString: string,
|
|
186
|
+
): SafeParseResult<GetOrgRepoWebhooksNotFoundError, SDKValidationError> {
|
|
187
|
+
return safeParse(
|
|
188
|
+
jsonString,
|
|
189
|
+
(x) => GetOrgRepoWebhooksNotFoundError$inboundSchema.parse(JSON.parse(x)),
|
|
190
|
+
`Failed to parse 'GetOrgRepoWebhooksNotFoundError' from JSON`,
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/** @internal */
|
|
195
|
+
export const GetOrgRepoWebhooksForbiddenError$inboundSchema: z.ZodMiniType<
|
|
196
|
+
GetOrgRepoWebhooksForbiddenError,
|
|
197
|
+
unknown
|
|
198
|
+
> = z.object({
|
|
199
|
+
code: types.string(),
|
|
200
|
+
message: types.string(),
|
|
201
|
+
details: types.optional(z.record(z.string(), z.any())),
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
export function getOrgRepoWebhooksForbiddenErrorFromJSON(
|
|
205
|
+
jsonString: string,
|
|
206
|
+
): SafeParseResult<GetOrgRepoWebhooksForbiddenError, SDKValidationError> {
|
|
207
|
+
return safeParse(
|
|
208
|
+
jsonString,
|
|
209
|
+
(x) => GetOrgRepoWebhooksForbiddenError$inboundSchema.parse(JSON.parse(x)),
|
|
210
|
+
`Failed to parse 'GetOrgRepoWebhooksForbiddenError' from JSON`,
|
|
211
|
+
);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/** @internal */
|
|
215
|
+
export const GetOrgRepoWebhooksUnauthorizedError$inboundSchema: z.ZodMiniType<
|
|
216
|
+
GetOrgRepoWebhooksUnauthorizedError,
|
|
217
|
+
unknown
|
|
218
|
+
> = z.object({
|
|
219
|
+
code: types.string(),
|
|
220
|
+
message: types.string(),
|
|
221
|
+
details: types.optional(z.record(z.string(), z.any())),
|
|
222
|
+
});
|
|
223
|
+
|
|
224
|
+
export function getOrgRepoWebhooksUnauthorizedErrorFromJSON(
|
|
225
|
+
jsonString: string,
|
|
226
|
+
): SafeParseResult<GetOrgRepoWebhooksUnauthorizedError, SDKValidationError> {
|
|
227
|
+
return safeParse(
|
|
228
|
+
jsonString,
|
|
229
|
+
(x) =>
|
|
230
|
+
GetOrgRepoWebhooksUnauthorizedError$inboundSchema.parse(JSON.parse(x)),
|
|
231
|
+
`Failed to parse 'GetOrgRepoWebhooksUnauthorizedError' from JSON`,
|
|
232
|
+
);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/** @internal */
|
|
236
|
+
export const GetOrgRepoWebhooksBadRequestError$inboundSchema: z.ZodMiniType<
|
|
237
|
+
GetOrgRepoWebhooksBadRequestError,
|
|
238
|
+
unknown
|
|
239
|
+
> = z.object({
|
|
240
|
+
code: types.string(),
|
|
241
|
+
message: types.string(),
|
|
242
|
+
details: types.optional(z.record(z.string(), z.any())),
|
|
243
|
+
});
|
|
244
|
+
|
|
245
|
+
export function getOrgRepoWebhooksBadRequestErrorFromJSON(
|
|
246
|
+
jsonString: string,
|
|
247
|
+
): SafeParseResult<GetOrgRepoWebhooksBadRequestError, SDKValidationError> {
|
|
248
|
+
return safeParse(
|
|
249
|
+
jsonString,
|
|
250
|
+
(x) => GetOrgRepoWebhooksBadRequestError$inboundSchema.parse(JSON.parse(x)),
|
|
251
|
+
`Failed to parse 'GetOrgRepoWebhooksBadRequestError' from JSON`,
|
|
252
|
+
);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/** @internal */
|
|
256
|
+
export const GetOrgRepoWebhooksEvent$inboundSchema: z.ZodMiniEnum<
|
|
257
|
+
typeof GetOrgRepoWebhooksEvent
|
|
258
|
+
> = z.enum(GetOrgRepoWebhooksEvent);
|
|
259
|
+
|
|
260
|
+
/** @internal */
|
|
261
|
+
export const Webhook$inboundSchema: z.ZodMiniType<Webhook, unknown> = z.pipe(
|
|
262
|
+
z.object({
|
|
263
|
+
id: types.string(),
|
|
264
|
+
url: types.string(),
|
|
265
|
+
events: z.array(GetOrgRepoWebhooksEvent$inboundSchema),
|
|
266
|
+
branches: types.nullable(z.array(types.string())),
|
|
267
|
+
globs: types.nullable(z.array(types.string())),
|
|
268
|
+
created_at: types.string(),
|
|
269
|
+
updated_at: types.string(),
|
|
270
|
+
}),
|
|
271
|
+
z.transform((v) => {
|
|
272
|
+
return remap$(v, {
|
|
273
|
+
"created_at": "createdAt",
|
|
274
|
+
"updated_at": "updatedAt",
|
|
275
|
+
});
|
|
276
|
+
}),
|
|
277
|
+
);
|
|
278
|
+
|
|
279
|
+
export function webhookFromJSON(
|
|
280
|
+
jsonString: string,
|
|
281
|
+
): SafeParseResult<Webhook, SDKValidationError> {
|
|
282
|
+
return safeParse(
|
|
283
|
+
jsonString,
|
|
284
|
+
(x) => Webhook$inboundSchema.parse(JSON.parse(x)),
|
|
285
|
+
`Failed to parse 'Webhook' from JSON`,
|
|
286
|
+
);
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
/** @internal */
|
|
290
|
+
export const GetOrgRepoWebhooksResponse$inboundSchema: z.ZodMiniType<
|
|
291
|
+
GetOrgRepoWebhooksResponse,
|
|
292
|
+
unknown
|
|
293
|
+
> = z.object({
|
|
294
|
+
webhooks: z.array(z.lazy(() => Webhook$inboundSchema)),
|
|
295
|
+
});
|
|
296
|
+
|
|
297
|
+
export function getOrgRepoWebhooksResponseFromJSON(
|
|
298
|
+
jsonString: string,
|
|
299
|
+
): SafeParseResult<GetOrgRepoWebhooksResponse, SDKValidationError> {
|
|
300
|
+
return safeParse(
|
|
301
|
+
jsonString,
|
|
302
|
+
(x) => GetOrgRepoWebhooksResponse$inboundSchema.parse(JSON.parse(x)),
|
|
303
|
+
`Failed to parse 'GetOrgRepoWebhooksResponse' from JSON`,
|
|
304
|
+
);
|
|
305
|
+
}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
export * from "./deleteorgapikeysid.js";
|
|
6
6
|
export * from "./deleteorgrepo.js";
|
|
7
7
|
export * from "./deleteorgrepobranchesbranch.js";
|
|
8
|
+
export * from "./deleteorgrepowebhookswebhookid.js";
|
|
8
9
|
export * from "./getorgapikeys.js";
|
|
9
10
|
export * from "./getorgrepo.js";
|
|
10
11
|
export * from "./getorgrepoagentblame.js";
|
|
@@ -15,9 +16,11 @@ export * from "./getorgrepocommitssha.js";
|
|
|
15
16
|
export * from "./getorgrepocontent.js";
|
|
16
17
|
export * from "./getorgrepodiff.js";
|
|
17
18
|
export * from "./getorgrepos.js";
|
|
19
|
+
export * from "./getorgrepowebhooks.js";
|
|
18
20
|
export * from "./patchorgrepo.js";
|
|
19
21
|
export * from "./postorgapikeys.js";
|
|
20
22
|
export * from "./postorgrepoanalyticsrefresh.js";
|
|
21
23
|
export * from "./postorgrepobranches.js";
|
|
22
24
|
export * from "./postorgrepocommits.js";
|
|
23
25
|
export * from "./postorgrepos.js";
|
|
26
|
+
export * from "./postorgrepowebhooks.js";
|