@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.
Files changed (186) hide show
  1. package/.devcontainer/devcontainer.json +38 -36
  2. package/README.md +164 -134
  3. package/dist/commonjs/funcs/contentGet.js +8 -0
  4. package/dist/commonjs/funcs/contentGet.js.map +1 -1
  5. package/dist/commonjs/funcs/webhooksCreate.d.ts +18 -0
  6. package/dist/commonjs/funcs/webhooksCreate.d.ts.map +1 -0
  7. package/dist/commonjs/funcs/webhooksCreate.js +129 -0
  8. package/dist/commonjs/funcs/webhooksCreate.js.map +1 -0
  9. package/dist/commonjs/funcs/webhooksDelete.d.ts +18 -0
  10. package/dist/commonjs/funcs/webhooksDelete.d.ts.map +1 -0
  11. package/dist/commonjs/funcs/webhooksDelete.js +132 -0
  12. package/dist/commonjs/funcs/webhooksDelete.js.map +1 -0
  13. package/dist/commonjs/funcs/webhooksList.d.ts +18 -0
  14. package/dist/commonjs/funcs/webhooksList.d.ts.map +1 -0
  15. package/dist/commonjs/funcs/webhooksList.js +128 -0
  16. package/dist/commonjs/funcs/webhooksList.js.map +1 -0
  17. package/dist/commonjs/hooks/hooks.d.ts.map +1 -1
  18. package/dist/commonjs/hooks/hooks.js +0 -2
  19. package/dist/commonjs/hooks/hooks.js.map +1 -1
  20. package/dist/commonjs/lib/config.d.ts +3 -3
  21. package/dist/commonjs/lib/config.js +3 -3
  22. package/dist/commonjs/models/errors/deleteorgrepowebhookswebhookid.d.ts +151 -0
  23. package/dist/commonjs/models/errors/deleteorgrepowebhookswebhookid.d.ts.map +1 -0
  24. package/dist/commonjs/models/errors/deleteorgrepowebhookswebhookid.js +239 -0
  25. package/dist/commonjs/models/errors/deleteorgrepowebhookswebhookid.js.map +1 -0
  26. package/dist/commonjs/models/errors/getorgrepowebhooks.d.ts +151 -0
  27. package/dist/commonjs/models/errors/getorgrepowebhooks.d.ts.map +1 -0
  28. package/dist/commonjs/models/errors/getorgrepowebhooks.js +232 -0
  29. package/dist/commonjs/models/errors/getorgrepowebhooks.js.map +1 -0
  30. package/dist/commonjs/models/errors/index.d.ts +3 -0
  31. package/dist/commonjs/models/errors/index.d.ts.map +1 -1
  32. package/dist/commonjs/models/errors/index.js +3 -0
  33. package/dist/commonjs/models/errors/index.js.map +1 -1
  34. package/dist/commonjs/models/errors/postorgrepowebhooks.d.ts +151 -0
  35. package/dist/commonjs/models/errors/postorgrepowebhooks.d.ts.map +1 -0
  36. package/dist/commonjs/models/errors/postorgrepowebhooks.js +232 -0
  37. package/dist/commonjs/models/errors/postorgrepowebhooks.js.map +1 -0
  38. package/dist/commonjs/models/operations/deleteorgrepowebhookswebhookid.d.ts +97 -0
  39. package/dist/commonjs/models/operations/deleteorgrepowebhookswebhookid.d.ts.map +1 -0
  40. package/dist/commonjs/models/operations/deleteorgrepowebhookswebhookid.js +138 -0
  41. package/dist/commonjs/models/operations/deleteorgrepowebhookswebhookid.js.map +1 -0
  42. package/dist/commonjs/models/operations/getorgrepobranches.d.ts +1 -1
  43. package/dist/commonjs/models/operations/getorgrepobranches.d.ts.map +1 -1
  44. package/dist/commonjs/models/operations/getorgrepobranches.js +1 -1
  45. package/dist/commonjs/models/operations/getorgrepobranches.js.map +1 -1
  46. package/dist/commonjs/models/operations/getorgrepocommits.d.ts +1 -1
  47. package/dist/commonjs/models/operations/getorgrepocommits.d.ts.map +1 -1
  48. package/dist/commonjs/models/operations/getorgrepocommits.js +1 -1
  49. package/dist/commonjs/models/operations/getorgrepocommits.js.map +1 -1
  50. package/dist/commonjs/models/operations/getorgrepocontent.d.ts +12 -2
  51. package/dist/commonjs/models/operations/getorgrepocontent.d.ts.map +1 -1
  52. package/dist/commonjs/models/operations/getorgrepocontent.js +7 -2
  53. package/dist/commonjs/models/operations/getorgrepocontent.js.map +1 -1
  54. package/dist/commonjs/models/operations/getorgrepos.d.ts +1 -1
  55. package/dist/commonjs/models/operations/getorgrepos.d.ts.map +1 -1
  56. package/dist/commonjs/models/operations/getorgrepos.js +1 -1
  57. package/dist/commonjs/models/operations/getorgrepos.js.map +1 -1
  58. package/dist/commonjs/models/operations/getorgrepowebhooks.d.ts +114 -0
  59. package/dist/commonjs/models/operations/getorgrepowebhooks.d.ts.map +1 -0
  60. package/dist/commonjs/models/operations/getorgrepowebhooks.js +155 -0
  61. package/dist/commonjs/models/operations/getorgrepowebhooks.js.map +1 -0
  62. package/dist/commonjs/models/operations/index.d.ts +3 -0
  63. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  64. package/dist/commonjs/models/operations/index.js +3 -0
  65. package/dist/commonjs/models/operations/index.js.map +1 -1
  66. package/dist/commonjs/models/operations/postorgapikeys.d.ts +2 -0
  67. package/dist/commonjs/models/operations/postorgapikeys.d.ts.map +1 -1
  68. package/dist/commonjs/models/operations/postorgapikeys.js +2 -0
  69. package/dist/commonjs/models/operations/postorgapikeys.js.map +1 -1
  70. package/dist/commonjs/models/operations/postorgrepowebhooks.d.ts +135 -0
  71. package/dist/commonjs/models/operations/postorgrepowebhooks.d.ts.map +1 -0
  72. package/dist/commonjs/models/operations/postorgrepowebhooks.js +168 -0
  73. package/dist/commonjs/models/operations/postorgrepowebhooks.js.map +1 -0
  74. package/dist/commonjs/sdk/sdk.d.ts +3 -0
  75. package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
  76. package/dist/commonjs/sdk/sdk.js +4 -0
  77. package/dist/commonjs/sdk/sdk.js.map +1 -1
  78. package/dist/commonjs/sdk/webhooks.d.ts +26 -0
  79. package/dist/commonjs/sdk/webhooks.d.ts.map +1 -0
  80. package/dist/commonjs/sdk/webhooks.js +42 -0
  81. package/dist/commonjs/sdk/webhooks.js.map +1 -0
  82. package/dist/esm/funcs/contentGet.js +9 -1
  83. package/dist/esm/funcs/contentGet.js.map +1 -1
  84. package/dist/esm/funcs/webhooksCreate.d.ts +18 -0
  85. package/dist/esm/funcs/webhooksCreate.d.ts.map +1 -0
  86. package/dist/esm/funcs/webhooksCreate.js +93 -0
  87. package/dist/esm/funcs/webhooksCreate.js.map +1 -0
  88. package/dist/esm/funcs/webhooksDelete.d.ts +18 -0
  89. package/dist/esm/funcs/webhooksDelete.d.ts.map +1 -0
  90. package/dist/esm/funcs/webhooksDelete.js +96 -0
  91. package/dist/esm/funcs/webhooksDelete.js.map +1 -0
  92. package/dist/esm/funcs/webhooksList.d.ts +18 -0
  93. package/dist/esm/funcs/webhooksList.d.ts.map +1 -0
  94. package/dist/esm/funcs/webhooksList.js +92 -0
  95. package/dist/esm/funcs/webhooksList.js.map +1 -0
  96. package/dist/esm/hooks/hooks.d.ts.map +1 -1
  97. package/dist/esm/hooks/hooks.js +0 -2
  98. package/dist/esm/hooks/hooks.js.map +1 -1
  99. package/dist/esm/lib/config.d.ts +3 -3
  100. package/dist/esm/lib/config.js +3 -3
  101. package/dist/esm/models/errors/deleteorgrepowebhookswebhookid.d.ts +151 -0
  102. package/dist/esm/models/errors/deleteorgrepowebhookswebhookid.d.ts.map +1 -0
  103. package/dist/esm/models/errors/deleteorgrepowebhookswebhookid.js +196 -0
  104. package/dist/esm/models/errors/deleteorgrepowebhookswebhookid.js.map +1 -0
  105. package/dist/esm/models/errors/getorgrepowebhooks.d.ts +151 -0
  106. package/dist/esm/models/errors/getorgrepowebhooks.d.ts.map +1 -0
  107. package/dist/esm/models/errors/getorgrepowebhooks.js +189 -0
  108. package/dist/esm/models/errors/getorgrepowebhooks.js.map +1 -0
  109. package/dist/esm/models/errors/index.d.ts +3 -0
  110. package/dist/esm/models/errors/index.d.ts.map +1 -1
  111. package/dist/esm/models/errors/index.js +3 -0
  112. package/dist/esm/models/errors/index.js.map +1 -1
  113. package/dist/esm/models/errors/postorgrepowebhooks.d.ts +151 -0
  114. package/dist/esm/models/errors/postorgrepowebhooks.d.ts.map +1 -0
  115. package/dist/esm/models/errors/postorgrepowebhooks.js +189 -0
  116. package/dist/esm/models/errors/postorgrepowebhooks.js.map +1 -0
  117. package/dist/esm/models/operations/deleteorgrepowebhookswebhookid.d.ts +97 -0
  118. package/dist/esm/models/operations/deleteorgrepowebhookswebhookid.d.ts.map +1 -0
  119. package/dist/esm/models/operations/deleteorgrepowebhookswebhookid.js +93 -0
  120. package/dist/esm/models/operations/deleteorgrepowebhookswebhookid.js.map +1 -0
  121. package/dist/esm/models/operations/getorgrepobranches.d.ts +1 -1
  122. package/dist/esm/models/operations/getorgrepobranches.d.ts.map +1 -1
  123. package/dist/esm/models/operations/getorgrepobranches.js +1 -1
  124. package/dist/esm/models/operations/getorgrepobranches.js.map +1 -1
  125. package/dist/esm/models/operations/getorgrepocommits.d.ts +1 -1
  126. package/dist/esm/models/operations/getorgrepocommits.d.ts.map +1 -1
  127. package/dist/esm/models/operations/getorgrepocommits.js +1 -1
  128. package/dist/esm/models/operations/getorgrepocommits.js.map +1 -1
  129. package/dist/esm/models/operations/getorgrepocontent.d.ts +12 -2
  130. package/dist/esm/models/operations/getorgrepocontent.d.ts.map +1 -1
  131. package/dist/esm/models/operations/getorgrepocontent.js +7 -2
  132. package/dist/esm/models/operations/getorgrepocontent.js.map +1 -1
  133. package/dist/esm/models/operations/getorgrepos.d.ts +1 -1
  134. package/dist/esm/models/operations/getorgrepos.d.ts.map +1 -1
  135. package/dist/esm/models/operations/getorgrepos.js +1 -1
  136. package/dist/esm/models/operations/getorgrepos.js.map +1 -1
  137. package/dist/esm/models/operations/getorgrepowebhooks.d.ts +114 -0
  138. package/dist/esm/models/operations/getorgrepowebhooks.d.ts.map +1 -0
  139. package/dist/esm/models/operations/getorgrepowebhooks.js +109 -0
  140. package/dist/esm/models/operations/getorgrepowebhooks.js.map +1 -0
  141. package/dist/esm/models/operations/index.d.ts +3 -0
  142. package/dist/esm/models/operations/index.d.ts.map +1 -1
  143. package/dist/esm/models/operations/index.js +3 -0
  144. package/dist/esm/models/operations/index.js.map +1 -1
  145. package/dist/esm/models/operations/postorgapikeys.d.ts +2 -0
  146. package/dist/esm/models/operations/postorgapikeys.d.ts.map +1 -1
  147. package/dist/esm/models/operations/postorgapikeys.js +2 -0
  148. package/dist/esm/models/operations/postorgapikeys.js.map +1 -1
  149. package/dist/esm/models/operations/postorgrepowebhooks.d.ts +135 -0
  150. package/dist/esm/models/operations/postorgrepowebhooks.d.ts.map +1 -0
  151. package/dist/esm/models/operations/postorgrepowebhooks.js +122 -0
  152. package/dist/esm/models/operations/postorgrepowebhooks.js.map +1 -0
  153. package/dist/esm/sdk/sdk.d.ts +3 -0
  154. package/dist/esm/sdk/sdk.d.ts.map +1 -1
  155. package/dist/esm/sdk/sdk.js +4 -0
  156. package/dist/esm/sdk/sdk.js.map +1 -1
  157. package/dist/esm/sdk/webhooks.d.ts +26 -0
  158. package/dist/esm/sdk/webhooks.d.ts.map +1 -0
  159. package/dist/esm/sdk/webhooks.js +38 -0
  160. package/dist/esm/sdk/webhooks.js.map +1 -0
  161. package/examples/adminCreateApiKey.example.ts +4 -6
  162. package/examples/package.json +1 -1
  163. package/jsr.json +14 -5
  164. package/package.json +1 -1
  165. package/src/funcs/contentGet.ts +10 -1
  166. package/src/funcs/webhooksCreate.ts +206 -0
  167. package/src/funcs/webhooksDelete.ts +236 -0
  168. package/src/funcs/webhooksList.ts +205 -0
  169. package/src/hooks/hooks.ts +0 -3
  170. package/src/lib/config.ts +3 -3
  171. package/src/models/errors/deleteorgrepowebhookswebhookid.ts +368 -0
  172. package/src/models/errors/getorgrepowebhooks.ts +371 -0
  173. package/src/models/errors/index.ts +3 -0
  174. package/src/models/errors/postorgrepowebhooks.ts +369 -0
  175. package/src/models/operations/deleteorgrepowebhookswebhookid.ts +285 -0
  176. package/src/models/operations/getorgrepobranches.ts +2 -2
  177. package/src/models/operations/getorgrepocommits.ts +2 -2
  178. package/src/models/operations/getorgrepocontent.ts +19 -4
  179. package/src/models/operations/getorgrepos.ts +2 -2
  180. package/src/models/operations/getorgrepowebhooks.ts +305 -0
  181. package/src/models/operations/index.ts +3 -0
  182. package/src/models/operations/postorgapikeys.ts +2 -0
  183. package/src/models/operations/postorgrepowebhooks.ts +339 -0
  184. package/src/sdk/sdk.ts +6 -0
  185. package/src/sdk/webhooks.ts +63 -0
  186. package/tsconfig.json +1 -0
@@ -0,0 +1,369 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import * as operations from "../operations/index.js";
7
+ import { MesaError } from "./mesaerror.js";
8
+
9
+ /**
10
+ * Internal error
11
+ */
12
+ export type PostOrgRepoWebhooksInternalServerErrorData = {
13
+ error: operations.PostOrgRepoWebhooksInternalServerErrorError;
14
+ };
15
+
16
+ /**
17
+ * Internal error
18
+ */
19
+ export class PostOrgRepoWebhooksInternalServerError extends MesaError {
20
+ error: operations.PostOrgRepoWebhooksInternalServerErrorError;
21
+
22
+ /** The original data that was passed to this error instance. */
23
+ data$: PostOrgRepoWebhooksInternalServerErrorData;
24
+
25
+ constructor(
26
+ err: PostOrgRepoWebhooksInternalServerErrorData,
27
+ httpMeta: { response: Response; request: Request; body: string },
28
+ ) {
29
+ const message = err.error?.message
30
+ || `API error occurred: ${JSON.stringify(err)}`;
31
+ super(message, httpMeta);
32
+ this.data$ = err;
33
+ this.error = err.error;
34
+
35
+ this.name = "PostOrgRepoWebhooksInternalServerError";
36
+ }
37
+ }
38
+
39
+ /**
40
+ * Conflict
41
+ */
42
+ export type PostOrgRepoWebhooksConflictErrorData = {
43
+ error: operations.PostOrgRepoWebhooksConflictError;
44
+ };
45
+
46
+ /**
47
+ * Conflict
48
+ */
49
+ export class PostOrgRepoWebhooksConflictError extends MesaError {
50
+ error: operations.PostOrgRepoWebhooksConflictError;
51
+
52
+ /** The original data that was passed to this error instance. */
53
+ data$: PostOrgRepoWebhooksConflictErrorData;
54
+
55
+ constructor(
56
+ err: PostOrgRepoWebhooksConflictErrorData,
57
+ httpMeta: { response: Response; request: Request; body: string },
58
+ ) {
59
+ const message = err.error?.message
60
+ || `API error occurred: ${JSON.stringify(err)}`;
61
+ super(message, httpMeta);
62
+ this.data$ = err;
63
+ this.error = err.error;
64
+
65
+ this.name = "PostOrgRepoWebhooksConflictError";
66
+ }
67
+ }
68
+
69
+ /**
70
+ * Not acceptable
71
+ */
72
+ export type PostOrgRepoWebhooksNotAcceptableErrorData = {
73
+ error: operations.PostOrgRepoWebhooksNotAcceptableError;
74
+ };
75
+
76
+ /**
77
+ * Not acceptable
78
+ */
79
+ export class PostOrgRepoWebhooksNotAcceptableError extends MesaError {
80
+ error: operations.PostOrgRepoWebhooksNotAcceptableError;
81
+
82
+ /** The original data that was passed to this error instance. */
83
+ data$: PostOrgRepoWebhooksNotAcceptableErrorData;
84
+
85
+ constructor(
86
+ err: PostOrgRepoWebhooksNotAcceptableErrorData,
87
+ httpMeta: { response: Response; request: Request; body: string },
88
+ ) {
89
+ const message = err.error?.message
90
+ || `API error occurred: ${JSON.stringify(err)}`;
91
+ super(message, httpMeta);
92
+ this.data$ = err;
93
+ this.error = err.error;
94
+
95
+ this.name = "PostOrgRepoWebhooksNotAcceptableError";
96
+ }
97
+ }
98
+
99
+ /**
100
+ * Not found
101
+ */
102
+ export type PostOrgRepoWebhooksNotFoundErrorData = {
103
+ error: operations.PostOrgRepoWebhooksNotFoundError;
104
+ };
105
+
106
+ /**
107
+ * Not found
108
+ */
109
+ export class PostOrgRepoWebhooksNotFoundError extends MesaError {
110
+ error: operations.PostOrgRepoWebhooksNotFoundError;
111
+
112
+ /** The original data that was passed to this error instance. */
113
+ data$: PostOrgRepoWebhooksNotFoundErrorData;
114
+
115
+ constructor(
116
+ err: PostOrgRepoWebhooksNotFoundErrorData,
117
+ httpMeta: { response: Response; request: Request; body: string },
118
+ ) {
119
+ const message = err.error?.message
120
+ || `API error occurred: ${JSON.stringify(err)}`;
121
+ super(message, httpMeta);
122
+ this.data$ = err;
123
+ this.error = err.error;
124
+
125
+ this.name = "PostOrgRepoWebhooksNotFoundError";
126
+ }
127
+ }
128
+
129
+ /**
130
+ * Forbidden
131
+ */
132
+ export type PostOrgRepoWebhooksForbiddenErrorData = {
133
+ error: operations.PostOrgRepoWebhooksForbiddenError;
134
+ };
135
+
136
+ /**
137
+ * Forbidden
138
+ */
139
+ export class PostOrgRepoWebhooksForbiddenError extends MesaError {
140
+ error: operations.PostOrgRepoWebhooksForbiddenError;
141
+
142
+ /** The original data that was passed to this error instance. */
143
+ data$: PostOrgRepoWebhooksForbiddenErrorData;
144
+
145
+ constructor(
146
+ err: PostOrgRepoWebhooksForbiddenErrorData,
147
+ httpMeta: { response: Response; request: Request; body: string },
148
+ ) {
149
+ const message = err.error?.message
150
+ || `API error occurred: ${JSON.stringify(err)}`;
151
+ super(message, httpMeta);
152
+ this.data$ = err;
153
+ this.error = err.error;
154
+
155
+ this.name = "PostOrgRepoWebhooksForbiddenError";
156
+ }
157
+ }
158
+
159
+ /**
160
+ * Unauthorized
161
+ */
162
+ export type PostOrgRepoWebhooksUnauthorizedErrorData = {
163
+ error: operations.PostOrgRepoWebhooksUnauthorizedError;
164
+ };
165
+
166
+ /**
167
+ * Unauthorized
168
+ */
169
+ export class PostOrgRepoWebhooksUnauthorizedError extends MesaError {
170
+ error: operations.PostOrgRepoWebhooksUnauthorizedError;
171
+
172
+ /** The original data that was passed to this error instance. */
173
+ data$: PostOrgRepoWebhooksUnauthorizedErrorData;
174
+
175
+ constructor(
176
+ err: PostOrgRepoWebhooksUnauthorizedErrorData,
177
+ httpMeta: { response: Response; request: Request; body: string },
178
+ ) {
179
+ const message = err.error?.message
180
+ || `API error occurred: ${JSON.stringify(err)}`;
181
+ super(message, httpMeta);
182
+ this.data$ = err;
183
+ this.error = err.error;
184
+
185
+ this.name = "PostOrgRepoWebhooksUnauthorizedError";
186
+ }
187
+ }
188
+
189
+ /**
190
+ * Invalid request
191
+ */
192
+ export type PostOrgRepoWebhooksBadRequestErrorData = {
193
+ error: operations.PostOrgRepoWebhooksBadRequestError;
194
+ };
195
+
196
+ /**
197
+ * Invalid request
198
+ */
199
+ export class PostOrgRepoWebhooksBadRequestError extends MesaError {
200
+ error: operations.PostOrgRepoWebhooksBadRequestError;
201
+
202
+ /** The original data that was passed to this error instance. */
203
+ data$: PostOrgRepoWebhooksBadRequestErrorData;
204
+
205
+ constructor(
206
+ err: PostOrgRepoWebhooksBadRequestErrorData,
207
+ httpMeta: { response: Response; request: Request; body: string },
208
+ ) {
209
+ const message = err.error?.message
210
+ || `API error occurred: ${JSON.stringify(err)}`;
211
+ super(message, httpMeta);
212
+ this.data$ = err;
213
+ this.error = err.error;
214
+
215
+ this.name = "PostOrgRepoWebhooksBadRequestError";
216
+ }
217
+ }
218
+
219
+ /** @internal */
220
+ export const PostOrgRepoWebhooksInternalServerError$inboundSchema:
221
+ z.ZodMiniType<PostOrgRepoWebhooksInternalServerError, unknown> = z.pipe(
222
+ z.object({
223
+ error: z.lazy(() =>
224
+ operations.PostOrgRepoWebhooksInternalServerErrorError$inboundSchema
225
+ ),
226
+ request$: z.custom<Request>(x => x instanceof Request),
227
+ response$: z.custom<Response>(x => x instanceof Response),
228
+ body$: z.string(),
229
+ }),
230
+ z.transform((v) => {
231
+ return new PostOrgRepoWebhooksInternalServerError(v, {
232
+ request: v.request$,
233
+ response: v.response$,
234
+ body: v.body$,
235
+ });
236
+ }),
237
+ );
238
+
239
+ /** @internal */
240
+ export const PostOrgRepoWebhooksConflictError$inboundSchema: z.ZodMiniType<
241
+ PostOrgRepoWebhooksConflictError,
242
+ unknown
243
+ > = z.pipe(
244
+ z.object({
245
+ error: z.lazy(() =>
246
+ operations.PostOrgRepoWebhooksConflictError$inboundSchema
247
+ ),
248
+ request$: z.custom<Request>(x => x instanceof Request),
249
+ response$: z.custom<Response>(x => x instanceof Response),
250
+ body$: z.string(),
251
+ }),
252
+ z.transform((v) => {
253
+ return new PostOrgRepoWebhooksConflictError(v, {
254
+ request: v.request$,
255
+ response: v.response$,
256
+ body: v.body$,
257
+ });
258
+ }),
259
+ );
260
+
261
+ /** @internal */
262
+ export const PostOrgRepoWebhooksNotAcceptableError$inboundSchema: z.ZodMiniType<
263
+ PostOrgRepoWebhooksNotAcceptableError,
264
+ unknown
265
+ > = z.pipe(
266
+ z.object({
267
+ error: z.lazy(() =>
268
+ operations.PostOrgRepoWebhooksNotAcceptableError$inboundSchema
269
+ ),
270
+ request$: z.custom<Request>(x => x instanceof Request),
271
+ response$: z.custom<Response>(x => x instanceof Response),
272
+ body$: z.string(),
273
+ }),
274
+ z.transform((v) => {
275
+ return new PostOrgRepoWebhooksNotAcceptableError(v, {
276
+ request: v.request$,
277
+ response: v.response$,
278
+ body: v.body$,
279
+ });
280
+ }),
281
+ );
282
+
283
+ /** @internal */
284
+ export const PostOrgRepoWebhooksNotFoundError$inboundSchema: z.ZodMiniType<
285
+ PostOrgRepoWebhooksNotFoundError,
286
+ unknown
287
+ > = z.pipe(
288
+ z.object({
289
+ error: z.lazy(() =>
290
+ operations.PostOrgRepoWebhooksNotFoundError$inboundSchema
291
+ ),
292
+ request$: z.custom<Request>(x => x instanceof Request),
293
+ response$: z.custom<Response>(x => x instanceof Response),
294
+ body$: z.string(),
295
+ }),
296
+ z.transform((v) => {
297
+ return new PostOrgRepoWebhooksNotFoundError(v, {
298
+ request: v.request$,
299
+ response: v.response$,
300
+ body: v.body$,
301
+ });
302
+ }),
303
+ );
304
+
305
+ /** @internal */
306
+ export const PostOrgRepoWebhooksForbiddenError$inboundSchema: z.ZodMiniType<
307
+ PostOrgRepoWebhooksForbiddenError,
308
+ unknown
309
+ > = z.pipe(
310
+ z.object({
311
+ error: z.lazy(() =>
312
+ operations.PostOrgRepoWebhooksForbiddenError$inboundSchema
313
+ ),
314
+ request$: z.custom<Request>(x => x instanceof Request),
315
+ response$: z.custom<Response>(x => x instanceof Response),
316
+ body$: z.string(),
317
+ }),
318
+ z.transform((v) => {
319
+ return new PostOrgRepoWebhooksForbiddenError(v, {
320
+ request: v.request$,
321
+ response: v.response$,
322
+ body: v.body$,
323
+ });
324
+ }),
325
+ );
326
+
327
+ /** @internal */
328
+ export const PostOrgRepoWebhooksUnauthorizedError$inboundSchema: z.ZodMiniType<
329
+ PostOrgRepoWebhooksUnauthorizedError,
330
+ unknown
331
+ > = z.pipe(
332
+ z.object({
333
+ error: z.lazy(() =>
334
+ operations.PostOrgRepoWebhooksUnauthorizedError$inboundSchema
335
+ ),
336
+ request$: z.custom<Request>(x => x instanceof Request),
337
+ response$: z.custom<Response>(x => x instanceof Response),
338
+ body$: z.string(),
339
+ }),
340
+ z.transform((v) => {
341
+ return new PostOrgRepoWebhooksUnauthorizedError(v, {
342
+ request: v.request$,
343
+ response: v.response$,
344
+ body: v.body$,
345
+ });
346
+ }),
347
+ );
348
+
349
+ /** @internal */
350
+ export const PostOrgRepoWebhooksBadRequestError$inboundSchema: z.ZodMiniType<
351
+ PostOrgRepoWebhooksBadRequestError,
352
+ unknown
353
+ > = z.pipe(
354
+ z.object({
355
+ error: z.lazy(() =>
356
+ operations.PostOrgRepoWebhooksBadRequestError$inboundSchema
357
+ ),
358
+ request$: z.custom<Request>(x => x instanceof Request),
359
+ response$: z.custom<Response>(x => x instanceof Response),
360
+ body$: z.string(),
361
+ }),
362
+ z.transform((v) => {
363
+ return new PostOrgRepoWebhooksBadRequestError(v, {
364
+ request: v.request$,
365
+ response: v.response$,
366
+ body: v.body$,
367
+ });
368
+ }),
369
+ );
@@ -0,0 +1,285 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import * as types from "../../types/primitives.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ export type DeleteOrgRepoWebhooksWebhookIdRequest = {
12
+ org: string;
13
+ repo: string;
14
+ webhookId: string;
15
+ };
16
+
17
+ export type DeleteOrgRepoWebhooksWebhookIdInternalServerErrorError = {
18
+ code: string;
19
+ message: string;
20
+ details?: { [k: string]: any } | undefined;
21
+ };
22
+
23
+ export type DeleteOrgRepoWebhooksWebhookIdConflictError = {
24
+ code: string;
25
+ message: string;
26
+ details?: { [k: string]: any } | undefined;
27
+ };
28
+
29
+ export type DeleteOrgRepoWebhooksWebhookIdNotAcceptableError = {
30
+ code: string;
31
+ message: string;
32
+ details?: { [k: string]: any } | undefined;
33
+ };
34
+
35
+ export type DeleteOrgRepoWebhooksWebhookIdNotFoundError = {
36
+ code: string;
37
+ message: string;
38
+ details?: { [k: string]: any } | undefined;
39
+ };
40
+
41
+ export type DeleteOrgRepoWebhooksWebhookIdForbiddenError = {
42
+ code: string;
43
+ message: string;
44
+ details?: { [k: string]: any } | undefined;
45
+ };
46
+
47
+ export type DeleteOrgRepoWebhooksWebhookIdUnauthorizedError = {
48
+ code: string;
49
+ message: string;
50
+ details?: { [k: string]: any } | undefined;
51
+ };
52
+
53
+ export type DeleteOrgRepoWebhooksWebhookIdBadRequestError = {
54
+ code: string;
55
+ message: string;
56
+ details?: { [k: string]: any } | undefined;
57
+ };
58
+
59
+ /**
60
+ * Webhook deleted
61
+ */
62
+ export type DeleteOrgRepoWebhooksWebhookIdResponse = {
63
+ success: true;
64
+ };
65
+
66
+ /** @internal */
67
+ export type DeleteOrgRepoWebhooksWebhookIdRequest$Outbound = {
68
+ org: string;
69
+ repo: string;
70
+ webhookId: string;
71
+ };
72
+
73
+ /** @internal */
74
+ export const DeleteOrgRepoWebhooksWebhookIdRequest$outboundSchema:
75
+ z.ZodMiniType<
76
+ DeleteOrgRepoWebhooksWebhookIdRequest$Outbound,
77
+ DeleteOrgRepoWebhooksWebhookIdRequest
78
+ > = z.object({
79
+ org: z.string(),
80
+ repo: z.string(),
81
+ webhookId: z.string(),
82
+ });
83
+
84
+ export function deleteOrgRepoWebhooksWebhookIdRequestToJSON(
85
+ deleteOrgRepoWebhooksWebhookIdRequest: DeleteOrgRepoWebhooksWebhookIdRequest,
86
+ ): string {
87
+ return JSON.stringify(
88
+ DeleteOrgRepoWebhooksWebhookIdRequest$outboundSchema.parse(
89
+ deleteOrgRepoWebhooksWebhookIdRequest,
90
+ ),
91
+ );
92
+ }
93
+
94
+ /** @internal */
95
+ export const DeleteOrgRepoWebhooksWebhookIdInternalServerErrorError$inboundSchema:
96
+ z.ZodMiniType<
97
+ DeleteOrgRepoWebhooksWebhookIdInternalServerErrorError,
98
+ unknown
99
+ > = z.object({
100
+ code: types.string(),
101
+ message: types.string(),
102
+ details: types.optional(z.record(z.string(), z.any())),
103
+ });
104
+
105
+ export function deleteOrgRepoWebhooksWebhookIdInternalServerErrorErrorFromJSON(
106
+ jsonString: string,
107
+ ): SafeParseResult<
108
+ DeleteOrgRepoWebhooksWebhookIdInternalServerErrorError,
109
+ SDKValidationError
110
+ > {
111
+ return safeParse(
112
+ jsonString,
113
+ (x) =>
114
+ DeleteOrgRepoWebhooksWebhookIdInternalServerErrorError$inboundSchema
115
+ .parse(JSON.parse(x)),
116
+ `Failed to parse 'DeleteOrgRepoWebhooksWebhookIdInternalServerErrorError' from JSON`,
117
+ );
118
+ }
119
+
120
+ /** @internal */
121
+ export const DeleteOrgRepoWebhooksWebhookIdConflictError$inboundSchema:
122
+ z.ZodMiniType<DeleteOrgRepoWebhooksWebhookIdConflictError, unknown> = z
123
+ .object({
124
+ code: types.string(),
125
+ message: types.string(),
126
+ details: types.optional(z.record(z.string(), z.any())),
127
+ });
128
+
129
+ export function deleteOrgRepoWebhooksWebhookIdConflictErrorFromJSON(
130
+ jsonString: string,
131
+ ): SafeParseResult<
132
+ DeleteOrgRepoWebhooksWebhookIdConflictError,
133
+ SDKValidationError
134
+ > {
135
+ return safeParse(
136
+ jsonString,
137
+ (x) =>
138
+ DeleteOrgRepoWebhooksWebhookIdConflictError$inboundSchema.parse(
139
+ JSON.parse(x),
140
+ ),
141
+ `Failed to parse 'DeleteOrgRepoWebhooksWebhookIdConflictError' from JSON`,
142
+ );
143
+ }
144
+
145
+ /** @internal */
146
+ export const DeleteOrgRepoWebhooksWebhookIdNotAcceptableError$inboundSchema:
147
+ z.ZodMiniType<DeleteOrgRepoWebhooksWebhookIdNotAcceptableError, unknown> = z
148
+ .object({
149
+ code: types.string(),
150
+ message: types.string(),
151
+ details: types.optional(z.record(z.string(), z.any())),
152
+ });
153
+
154
+ export function deleteOrgRepoWebhooksWebhookIdNotAcceptableErrorFromJSON(
155
+ jsonString: string,
156
+ ): SafeParseResult<
157
+ DeleteOrgRepoWebhooksWebhookIdNotAcceptableError,
158
+ SDKValidationError
159
+ > {
160
+ return safeParse(
161
+ jsonString,
162
+ (x) =>
163
+ DeleteOrgRepoWebhooksWebhookIdNotAcceptableError$inboundSchema.parse(
164
+ JSON.parse(x),
165
+ ),
166
+ `Failed to parse 'DeleteOrgRepoWebhooksWebhookIdNotAcceptableError' from JSON`,
167
+ );
168
+ }
169
+
170
+ /** @internal */
171
+ export const DeleteOrgRepoWebhooksWebhookIdNotFoundError$inboundSchema:
172
+ z.ZodMiniType<DeleteOrgRepoWebhooksWebhookIdNotFoundError, unknown> = z
173
+ .object({
174
+ code: types.string(),
175
+ message: types.string(),
176
+ details: types.optional(z.record(z.string(), z.any())),
177
+ });
178
+
179
+ export function deleteOrgRepoWebhooksWebhookIdNotFoundErrorFromJSON(
180
+ jsonString: string,
181
+ ): SafeParseResult<
182
+ DeleteOrgRepoWebhooksWebhookIdNotFoundError,
183
+ SDKValidationError
184
+ > {
185
+ return safeParse(
186
+ jsonString,
187
+ (x) =>
188
+ DeleteOrgRepoWebhooksWebhookIdNotFoundError$inboundSchema.parse(
189
+ JSON.parse(x),
190
+ ),
191
+ `Failed to parse 'DeleteOrgRepoWebhooksWebhookIdNotFoundError' from JSON`,
192
+ );
193
+ }
194
+
195
+ /** @internal */
196
+ export const DeleteOrgRepoWebhooksWebhookIdForbiddenError$inboundSchema:
197
+ z.ZodMiniType<DeleteOrgRepoWebhooksWebhookIdForbiddenError, unknown> = z
198
+ .object({
199
+ code: types.string(),
200
+ message: types.string(),
201
+ details: types.optional(z.record(z.string(), z.any())),
202
+ });
203
+
204
+ export function deleteOrgRepoWebhooksWebhookIdForbiddenErrorFromJSON(
205
+ jsonString: string,
206
+ ): SafeParseResult<
207
+ DeleteOrgRepoWebhooksWebhookIdForbiddenError,
208
+ SDKValidationError
209
+ > {
210
+ return safeParse(
211
+ jsonString,
212
+ (x) =>
213
+ DeleteOrgRepoWebhooksWebhookIdForbiddenError$inboundSchema.parse(
214
+ JSON.parse(x),
215
+ ),
216
+ `Failed to parse 'DeleteOrgRepoWebhooksWebhookIdForbiddenError' from JSON`,
217
+ );
218
+ }
219
+
220
+ /** @internal */
221
+ export const DeleteOrgRepoWebhooksWebhookIdUnauthorizedError$inboundSchema:
222
+ z.ZodMiniType<DeleteOrgRepoWebhooksWebhookIdUnauthorizedError, unknown> = z
223
+ .object({
224
+ code: types.string(),
225
+ message: types.string(),
226
+ details: types.optional(z.record(z.string(), z.any())),
227
+ });
228
+
229
+ export function deleteOrgRepoWebhooksWebhookIdUnauthorizedErrorFromJSON(
230
+ jsonString: string,
231
+ ): SafeParseResult<
232
+ DeleteOrgRepoWebhooksWebhookIdUnauthorizedError,
233
+ SDKValidationError
234
+ > {
235
+ return safeParse(
236
+ jsonString,
237
+ (x) =>
238
+ DeleteOrgRepoWebhooksWebhookIdUnauthorizedError$inboundSchema.parse(
239
+ JSON.parse(x),
240
+ ),
241
+ `Failed to parse 'DeleteOrgRepoWebhooksWebhookIdUnauthorizedError' from JSON`,
242
+ );
243
+ }
244
+
245
+ /** @internal */
246
+ export const DeleteOrgRepoWebhooksWebhookIdBadRequestError$inboundSchema:
247
+ z.ZodMiniType<DeleteOrgRepoWebhooksWebhookIdBadRequestError, unknown> = z
248
+ .object({
249
+ code: types.string(),
250
+ message: types.string(),
251
+ details: types.optional(z.record(z.string(), z.any())),
252
+ });
253
+
254
+ export function deleteOrgRepoWebhooksWebhookIdBadRequestErrorFromJSON(
255
+ jsonString: string,
256
+ ): SafeParseResult<
257
+ DeleteOrgRepoWebhooksWebhookIdBadRequestError,
258
+ SDKValidationError
259
+ > {
260
+ return safeParse(
261
+ jsonString,
262
+ (x) =>
263
+ DeleteOrgRepoWebhooksWebhookIdBadRequestError$inboundSchema.parse(
264
+ JSON.parse(x),
265
+ ),
266
+ `Failed to parse 'DeleteOrgRepoWebhooksWebhookIdBadRequestError' from JSON`,
267
+ );
268
+ }
269
+
270
+ /** @internal */
271
+ export const DeleteOrgRepoWebhooksWebhookIdResponse$inboundSchema:
272
+ z.ZodMiniType<DeleteOrgRepoWebhooksWebhookIdResponse, unknown> = z.object({
273
+ success: types.literal(true),
274
+ });
275
+
276
+ export function deleteOrgRepoWebhooksWebhookIdResponseFromJSON(
277
+ jsonString: string,
278
+ ): SafeParseResult<DeleteOrgRepoWebhooksWebhookIdResponse, SDKValidationError> {
279
+ return safeParse(
280
+ jsonString,
281
+ (x) =>
282
+ DeleteOrgRepoWebhooksWebhookIdResponse$inboundSchema.parse(JSON.parse(x)),
283
+ `Failed to parse 'DeleteOrgRepoWebhooksWebhookIdResponse' from JSON`,
284
+ );
285
+ }
@@ -68,9 +68,9 @@ export type Branch = {
68
68
  * Branch list
69
69
  */
70
70
  export type GetOrgRepoBranchesResponseBody = {
71
- branches: Array<Branch>;
72
71
  nextCursor: string | null;
73
72
  hasMore: boolean;
73
+ branches: Array<Branch>;
74
74
  };
75
75
 
76
76
  export type GetOrgRepoBranchesResponse = {
@@ -283,9 +283,9 @@ export const GetOrgRepoBranchesResponseBody$inboundSchema: z.ZodMiniType<
283
283
  unknown
284
284
  > = z.pipe(
285
285
  z.object({
286
- branches: z.array(z.lazy(() => Branch$inboundSchema)),
287
286
  next_cursor: types.nullable(types.string()),
288
287
  has_more: types.boolean(),
288
+ branches: z.array(z.lazy(() => Branch$inboundSchema)),
289
289
  }),
290
290
  z.transform((v) => {
291
291
  return remap$(v, {
@@ -82,9 +82,9 @@ export type Commit = {
82
82
  * Commit list
83
83
  */
84
84
  export type GetOrgRepoCommitsResponseBody = {
85
- commits: Array<Commit>;
86
85
  nextCursor: string | null;
87
86
  hasMore: boolean;
87
+ commits: Array<Commit>;
88
88
  };
89
89
 
90
90
  export type GetOrgRepoCommitsResponse = {
@@ -330,9 +330,9 @@ export const GetOrgRepoCommitsResponseBody$inboundSchema: z.ZodMiniType<
330
330
  unknown
331
331
  > = z.pipe(
332
332
  z.object({
333
- commits: z.array(z.lazy(() => Commit$inboundSchema)),
334
333
  next_cursor: types.nullable(types.string()),
335
334
  has_more: types.boolean(),
335
+ commits: z.array(z.lazy(() => Commit$inboundSchema)),
336
336
  }),
337
337
  z.transform((v) => {
338
338
  return remap$(v, {