@mesadev/sdk 0.1.0 → 0.1.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.
- package/.devcontainer/devcontainer.json +38 -36
- package/FUNCTIONS.md +2 -2
- package/README.md +159 -133
- package/dist/commonjs/funcs/agentBlameGetOrgRepoAgentblame.d.ts +18 -0
- package/dist/commonjs/funcs/agentBlameGetOrgRepoAgentblame.d.ts.map +1 -0
- package/dist/commonjs/funcs/agentBlameGetOrgRepoAgentblame.js +133 -0
- package/dist/commonjs/funcs/agentBlameGetOrgRepoAgentblame.js.map +1 -0
- package/dist/commonjs/funcs/agentBlameGetOrgRepoAnalytics.d.ts +18 -0
- package/dist/commonjs/funcs/agentBlameGetOrgRepoAnalytics.d.ts.map +1 -0
- package/dist/commonjs/funcs/agentBlameGetOrgRepoAnalytics.js +132 -0
- package/dist/commonjs/funcs/agentBlameGetOrgRepoAnalytics.js.map +1 -0
- package/dist/commonjs/funcs/agentBlamePostOrgRepoAnalyticsRefresh.d.ts +18 -0
- package/dist/commonjs/funcs/agentBlamePostOrgRepoAnalyticsRefresh.d.ts.map +1 -0
- package/dist/commonjs/funcs/agentBlamePostOrgRepoAnalyticsRefresh.js +128 -0
- package/dist/commonjs/funcs/agentBlamePostOrgRepoAnalyticsRefresh.js.map +1 -0
- package/dist/commonjs/funcs/contentGet.js +8 -0
- package/dist/commonjs/funcs/contentGet.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +4 -4
- package/dist/commonjs/lib/config.d.ts.map +1 -1
- package/dist/commonjs/lib/config.js +4 -4
- package/dist/commonjs/lib/config.js.map +1 -1
- package/dist/commonjs/models/errors/getorgrepoagentblame.d.ts +151 -0
- package/dist/commonjs/models/errors/getorgrepoagentblame.d.ts.map +1 -0
- package/dist/commonjs/models/errors/getorgrepoagentblame.js +232 -0
- package/dist/commonjs/models/errors/getorgrepoagentblame.js.map +1 -0
- package/dist/commonjs/models/errors/getorgrepoanalytics.d.ts +151 -0
- package/dist/commonjs/models/errors/getorgrepoanalytics.d.ts.map +1 -0
- package/dist/commonjs/models/errors/getorgrepoanalytics.js +232 -0
- package/dist/commonjs/models/errors/getorgrepoanalytics.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/postorgrepoanalyticsrefresh.d.ts +151 -0
- package/dist/commonjs/models/errors/postorgrepoanalyticsrefresh.d.ts.map +1 -0
- package/dist/commonjs/models/errors/postorgrepoanalyticsrefresh.js +235 -0
- package/dist/commonjs/models/errors/postorgrepoanalyticsrefresh.js.map +1 -0
- package/dist/commonjs/models/operations/getorgrepoagentblame.d.ts +121 -0
- package/dist/commonjs/models/operations/getorgrepoagentblame.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getorgrepoagentblame.js +170 -0
- package/dist/commonjs/models/operations/getorgrepoagentblame.js.map +1 -0
- package/dist/commonjs/models/operations/getorgrepoanalytics.d.ts +183 -0
- package/dist/commonjs/models/operations/getorgrepoanalytics.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getorgrepoanalytics.js +217 -0
- package/dist/commonjs/models/operations/getorgrepoanalytics.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/getorgrepodiff.d.ts +4 -4
- package/dist/commonjs/models/operations/getorgrepodiff.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getorgrepodiff.js +6 -6
- package/dist/commonjs/models/operations/getorgrepodiff.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/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/postorgrepoanalyticsrefresh.d.ts +172 -0
- package/dist/commonjs/models/operations/postorgrepoanalyticsrefresh.d.ts.map +1 -0
- package/dist/commonjs/models/operations/postorgrepoanalyticsrefresh.js +209 -0
- package/dist/commonjs/models/operations/postorgrepoanalyticsrefresh.js.map +1 -0
- package/dist/commonjs/sdk/agentblame.d.ts +26 -0
- package/dist/commonjs/sdk/agentblame.d.ts.map +1 -0
- package/dist/commonjs/sdk/agentblame.js +42 -0
- package/dist/commonjs/sdk/agentblame.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/esm/funcs/agentBlameGetOrgRepoAgentblame.d.ts +18 -0
- package/dist/esm/funcs/agentBlameGetOrgRepoAgentblame.d.ts.map +1 -0
- package/dist/esm/funcs/agentBlameGetOrgRepoAgentblame.js +97 -0
- package/dist/esm/funcs/agentBlameGetOrgRepoAgentblame.js.map +1 -0
- package/dist/esm/funcs/agentBlameGetOrgRepoAnalytics.d.ts +18 -0
- package/dist/esm/funcs/agentBlameGetOrgRepoAnalytics.d.ts.map +1 -0
- package/dist/esm/funcs/agentBlameGetOrgRepoAnalytics.js +96 -0
- package/dist/esm/funcs/agentBlameGetOrgRepoAnalytics.js.map +1 -0
- package/dist/esm/funcs/agentBlamePostOrgRepoAnalyticsRefresh.d.ts +18 -0
- package/dist/esm/funcs/agentBlamePostOrgRepoAnalyticsRefresh.d.ts.map +1 -0
- package/dist/esm/funcs/agentBlamePostOrgRepoAnalyticsRefresh.js +92 -0
- package/dist/esm/funcs/agentBlamePostOrgRepoAnalyticsRefresh.js.map +1 -0
- package/dist/esm/funcs/contentGet.js +9 -1
- package/dist/esm/funcs/contentGet.js.map +1 -1
- package/dist/esm/lib/config.d.ts +4 -4
- package/dist/esm/lib/config.d.ts.map +1 -1
- package/dist/esm/lib/config.js +4 -4
- package/dist/esm/lib/config.js.map +1 -1
- package/dist/esm/models/errors/getorgrepoagentblame.d.ts +151 -0
- package/dist/esm/models/errors/getorgrepoagentblame.d.ts.map +1 -0
- package/dist/esm/models/errors/getorgrepoagentblame.js +189 -0
- package/dist/esm/models/errors/getorgrepoagentblame.js.map +1 -0
- package/dist/esm/models/errors/getorgrepoanalytics.d.ts +151 -0
- package/dist/esm/models/errors/getorgrepoanalytics.d.ts.map +1 -0
- package/dist/esm/models/errors/getorgrepoanalytics.js +189 -0
- package/dist/esm/models/errors/getorgrepoanalytics.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/postorgrepoanalyticsrefresh.d.ts +151 -0
- package/dist/esm/models/errors/postorgrepoanalyticsrefresh.d.ts.map +1 -0
- package/dist/esm/models/errors/postorgrepoanalyticsrefresh.js +192 -0
- package/dist/esm/models/errors/postorgrepoanalyticsrefresh.js.map +1 -0
- package/dist/esm/models/operations/getorgrepoagentblame.d.ts +121 -0
- package/dist/esm/models/operations/getorgrepoagentblame.d.ts.map +1 -0
- package/dist/esm/models/operations/getorgrepoagentblame.js +123 -0
- package/dist/esm/models/operations/getorgrepoagentblame.js.map +1 -0
- package/dist/esm/models/operations/getorgrepoanalytics.d.ts +183 -0
- package/dist/esm/models/operations/getorgrepoanalytics.d.ts.map +1 -0
- package/dist/esm/models/operations/getorgrepoanalytics.js +167 -0
- package/dist/esm/models/operations/getorgrepoanalytics.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/getorgrepodiff.d.ts +4 -4
- package/dist/esm/models/operations/getorgrepodiff.d.ts.map +1 -1
- package/dist/esm/models/operations/getorgrepodiff.js +4 -4
- package/dist/esm/models/operations/getorgrepodiff.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/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/postorgrepoanalyticsrefresh.d.ts +172 -0
- package/dist/esm/models/operations/postorgrepoanalyticsrefresh.d.ts.map +1 -0
- package/dist/esm/models/operations/postorgrepoanalyticsrefresh.js +159 -0
- package/dist/esm/models/operations/postorgrepoanalyticsrefresh.js.map +1 -0
- package/dist/esm/sdk/agentblame.d.ts +26 -0
- package/dist/esm/sdk/agentblame.d.ts.map +1 -0
- package/dist/esm/sdk/agentblame.js +38 -0
- package/dist/esm/sdk/agentblame.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/examples/adminCreateApiKey.example.ts +5 -7
- package/examples/package.json +3 -3
- package/jsr.json +15 -6
- package/package.json +12 -9
- package/src/funcs/agentBlameGetOrgRepoAgentblame.ts +214 -0
- package/src/funcs/agentBlameGetOrgRepoAnalytics.ts +210 -0
- package/src/funcs/agentBlamePostOrgRepoAnalyticsRefresh.ts +229 -0
- package/src/funcs/contentGet.ts +10 -1
- package/src/lib/config.ts +4 -4
- package/src/models/errors/getorgrepoagentblame.ts +367 -0
- package/src/models/errors/getorgrepoanalytics.ts +369 -0
- package/src/models/errors/index.ts +3 -0
- package/src/models/errors/postorgrepoanalyticsrefresh.ts +360 -0
- package/src/models/operations/getorgrepoagentblame.ts +338 -0
- package/src/models/operations/getorgrepoanalytics.ts +456 -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/getorgrepodiff.ts +11 -8
- package/src/models/operations/getorgrepos.ts +2 -2
- package/src/models/operations/index.ts +3 -0
- package/src/models/operations/postorgrepoanalyticsrefresh.ts +479 -0
- package/src/sdk/agentblame.ts +63 -0
- package/src/sdk/sdk.ts +6 -0
- package/tsconfig.json +1 -0
|
@@ -0,0 +1,360 @@
|
|
|
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 PostOrgRepoAnalyticsRefreshInternalServerErrorData = {
|
|
13
|
+
error: operations.PostOrgRepoAnalyticsRefreshInternalServerErrorError;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Internal error
|
|
18
|
+
*/
|
|
19
|
+
export class PostOrgRepoAnalyticsRefreshInternalServerError extends MesaError {
|
|
20
|
+
error: operations.PostOrgRepoAnalyticsRefreshInternalServerErrorError;
|
|
21
|
+
|
|
22
|
+
/** The original data that was passed to this error instance. */
|
|
23
|
+
data$: PostOrgRepoAnalyticsRefreshInternalServerErrorData;
|
|
24
|
+
|
|
25
|
+
constructor(
|
|
26
|
+
err: PostOrgRepoAnalyticsRefreshInternalServerErrorData,
|
|
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 = "PostOrgRepoAnalyticsRefreshInternalServerError";
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Conflict
|
|
41
|
+
*/
|
|
42
|
+
export type PostOrgRepoAnalyticsRefreshConflictErrorData = {
|
|
43
|
+
error: operations.PostOrgRepoAnalyticsRefreshConflictError;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Conflict
|
|
48
|
+
*/
|
|
49
|
+
export class PostOrgRepoAnalyticsRefreshConflictError extends MesaError {
|
|
50
|
+
error: operations.PostOrgRepoAnalyticsRefreshConflictError;
|
|
51
|
+
|
|
52
|
+
/** The original data that was passed to this error instance. */
|
|
53
|
+
data$: PostOrgRepoAnalyticsRefreshConflictErrorData;
|
|
54
|
+
|
|
55
|
+
constructor(
|
|
56
|
+
err: PostOrgRepoAnalyticsRefreshConflictErrorData,
|
|
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 = "PostOrgRepoAnalyticsRefreshConflictError";
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Not acceptable
|
|
71
|
+
*/
|
|
72
|
+
export type PostOrgRepoAnalyticsRefreshNotAcceptableErrorData = {
|
|
73
|
+
error: operations.PostOrgRepoAnalyticsRefreshNotAcceptableError;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Not acceptable
|
|
78
|
+
*/
|
|
79
|
+
export class PostOrgRepoAnalyticsRefreshNotAcceptableError extends MesaError {
|
|
80
|
+
error: operations.PostOrgRepoAnalyticsRefreshNotAcceptableError;
|
|
81
|
+
|
|
82
|
+
/** The original data that was passed to this error instance. */
|
|
83
|
+
data$: PostOrgRepoAnalyticsRefreshNotAcceptableErrorData;
|
|
84
|
+
|
|
85
|
+
constructor(
|
|
86
|
+
err: PostOrgRepoAnalyticsRefreshNotAcceptableErrorData,
|
|
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 = "PostOrgRepoAnalyticsRefreshNotAcceptableError";
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Not found
|
|
101
|
+
*/
|
|
102
|
+
export type PostOrgRepoAnalyticsRefreshNotFoundErrorData = {
|
|
103
|
+
error: operations.PostOrgRepoAnalyticsRefreshNotFoundError;
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Not found
|
|
108
|
+
*/
|
|
109
|
+
export class PostOrgRepoAnalyticsRefreshNotFoundError extends MesaError {
|
|
110
|
+
error: operations.PostOrgRepoAnalyticsRefreshNotFoundError;
|
|
111
|
+
|
|
112
|
+
/** The original data that was passed to this error instance. */
|
|
113
|
+
data$: PostOrgRepoAnalyticsRefreshNotFoundErrorData;
|
|
114
|
+
|
|
115
|
+
constructor(
|
|
116
|
+
err: PostOrgRepoAnalyticsRefreshNotFoundErrorData,
|
|
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 = "PostOrgRepoAnalyticsRefreshNotFoundError";
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Forbidden
|
|
131
|
+
*/
|
|
132
|
+
export type PostOrgRepoAnalyticsRefreshForbiddenErrorData = {
|
|
133
|
+
error: operations.PostOrgRepoAnalyticsRefreshForbiddenError;
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Forbidden
|
|
138
|
+
*/
|
|
139
|
+
export class PostOrgRepoAnalyticsRefreshForbiddenError extends MesaError {
|
|
140
|
+
error: operations.PostOrgRepoAnalyticsRefreshForbiddenError;
|
|
141
|
+
|
|
142
|
+
/** The original data that was passed to this error instance. */
|
|
143
|
+
data$: PostOrgRepoAnalyticsRefreshForbiddenErrorData;
|
|
144
|
+
|
|
145
|
+
constructor(
|
|
146
|
+
err: PostOrgRepoAnalyticsRefreshForbiddenErrorData,
|
|
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 = "PostOrgRepoAnalyticsRefreshForbiddenError";
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Unauthorized
|
|
161
|
+
*/
|
|
162
|
+
export type PostOrgRepoAnalyticsRefreshUnauthorizedErrorData = {
|
|
163
|
+
error: operations.PostOrgRepoAnalyticsRefreshUnauthorizedError;
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Unauthorized
|
|
168
|
+
*/
|
|
169
|
+
export class PostOrgRepoAnalyticsRefreshUnauthorizedError extends MesaError {
|
|
170
|
+
error: operations.PostOrgRepoAnalyticsRefreshUnauthorizedError;
|
|
171
|
+
|
|
172
|
+
/** The original data that was passed to this error instance. */
|
|
173
|
+
data$: PostOrgRepoAnalyticsRefreshUnauthorizedErrorData;
|
|
174
|
+
|
|
175
|
+
constructor(
|
|
176
|
+
err: PostOrgRepoAnalyticsRefreshUnauthorizedErrorData,
|
|
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 = "PostOrgRepoAnalyticsRefreshUnauthorizedError";
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Invalid request
|
|
191
|
+
*/
|
|
192
|
+
export type PostOrgRepoAnalyticsRefreshBadRequestErrorData = {
|
|
193
|
+
error: operations.PostOrgRepoAnalyticsRefreshBadRequestError;
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Invalid request
|
|
198
|
+
*/
|
|
199
|
+
export class PostOrgRepoAnalyticsRefreshBadRequestError extends MesaError {
|
|
200
|
+
error: operations.PostOrgRepoAnalyticsRefreshBadRequestError;
|
|
201
|
+
|
|
202
|
+
/** The original data that was passed to this error instance. */
|
|
203
|
+
data$: PostOrgRepoAnalyticsRefreshBadRequestErrorData;
|
|
204
|
+
|
|
205
|
+
constructor(
|
|
206
|
+
err: PostOrgRepoAnalyticsRefreshBadRequestErrorData,
|
|
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 = "PostOrgRepoAnalyticsRefreshBadRequestError";
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/** @internal */
|
|
220
|
+
export const PostOrgRepoAnalyticsRefreshInternalServerError$inboundSchema:
|
|
221
|
+
z.ZodMiniType<PostOrgRepoAnalyticsRefreshInternalServerError, unknown> = z
|
|
222
|
+
.pipe(
|
|
223
|
+
z.object({
|
|
224
|
+
error: z.lazy(() =>
|
|
225
|
+
operations
|
|
226
|
+
.PostOrgRepoAnalyticsRefreshInternalServerErrorError$inboundSchema
|
|
227
|
+
),
|
|
228
|
+
request$: z.custom<Request>(x => x instanceof Request),
|
|
229
|
+
response$: z.custom<Response>(x => x instanceof Response),
|
|
230
|
+
body$: z.string(),
|
|
231
|
+
}),
|
|
232
|
+
z.transform((v) => {
|
|
233
|
+
return new PostOrgRepoAnalyticsRefreshInternalServerError(v, {
|
|
234
|
+
request: v.request$,
|
|
235
|
+
response: v.response$,
|
|
236
|
+
body: v.body$,
|
|
237
|
+
});
|
|
238
|
+
}),
|
|
239
|
+
);
|
|
240
|
+
|
|
241
|
+
/** @internal */
|
|
242
|
+
export const PostOrgRepoAnalyticsRefreshConflictError$inboundSchema:
|
|
243
|
+
z.ZodMiniType<PostOrgRepoAnalyticsRefreshConflictError, unknown> = z.pipe(
|
|
244
|
+
z.object({
|
|
245
|
+
error: z.lazy(() =>
|
|
246
|
+
operations.PostOrgRepoAnalyticsRefreshConflictError$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 PostOrgRepoAnalyticsRefreshConflictError(v, {
|
|
254
|
+
request: v.request$,
|
|
255
|
+
response: v.response$,
|
|
256
|
+
body: v.body$,
|
|
257
|
+
});
|
|
258
|
+
}),
|
|
259
|
+
);
|
|
260
|
+
|
|
261
|
+
/** @internal */
|
|
262
|
+
export const PostOrgRepoAnalyticsRefreshNotAcceptableError$inboundSchema:
|
|
263
|
+
z.ZodMiniType<PostOrgRepoAnalyticsRefreshNotAcceptableError, unknown> = z
|
|
264
|
+
.pipe(
|
|
265
|
+
z.object({
|
|
266
|
+
error: z.lazy(() =>
|
|
267
|
+
operations.PostOrgRepoAnalyticsRefreshNotAcceptableError$inboundSchema
|
|
268
|
+
),
|
|
269
|
+
request$: z.custom<Request>(x => x instanceof Request),
|
|
270
|
+
response$: z.custom<Response>(x => x instanceof Response),
|
|
271
|
+
body$: z.string(),
|
|
272
|
+
}),
|
|
273
|
+
z.transform((v) => {
|
|
274
|
+
return new PostOrgRepoAnalyticsRefreshNotAcceptableError(v, {
|
|
275
|
+
request: v.request$,
|
|
276
|
+
response: v.response$,
|
|
277
|
+
body: v.body$,
|
|
278
|
+
});
|
|
279
|
+
}),
|
|
280
|
+
);
|
|
281
|
+
|
|
282
|
+
/** @internal */
|
|
283
|
+
export const PostOrgRepoAnalyticsRefreshNotFoundError$inboundSchema:
|
|
284
|
+
z.ZodMiniType<PostOrgRepoAnalyticsRefreshNotFoundError, unknown> = z.pipe(
|
|
285
|
+
z.object({
|
|
286
|
+
error: z.lazy(() =>
|
|
287
|
+
operations.PostOrgRepoAnalyticsRefreshNotFoundError$inboundSchema
|
|
288
|
+
),
|
|
289
|
+
request$: z.custom<Request>(x => x instanceof Request),
|
|
290
|
+
response$: z.custom<Response>(x => x instanceof Response),
|
|
291
|
+
body$: z.string(),
|
|
292
|
+
}),
|
|
293
|
+
z.transform((v) => {
|
|
294
|
+
return new PostOrgRepoAnalyticsRefreshNotFoundError(v, {
|
|
295
|
+
request: v.request$,
|
|
296
|
+
response: v.response$,
|
|
297
|
+
body: v.body$,
|
|
298
|
+
});
|
|
299
|
+
}),
|
|
300
|
+
);
|
|
301
|
+
|
|
302
|
+
/** @internal */
|
|
303
|
+
export const PostOrgRepoAnalyticsRefreshForbiddenError$inboundSchema:
|
|
304
|
+
z.ZodMiniType<PostOrgRepoAnalyticsRefreshForbiddenError, unknown> = z.pipe(
|
|
305
|
+
z.object({
|
|
306
|
+
error: z.lazy(() =>
|
|
307
|
+
operations.PostOrgRepoAnalyticsRefreshForbiddenError$inboundSchema
|
|
308
|
+
),
|
|
309
|
+
request$: z.custom<Request>(x => x instanceof Request),
|
|
310
|
+
response$: z.custom<Response>(x => x instanceof Response),
|
|
311
|
+
body$: z.string(),
|
|
312
|
+
}),
|
|
313
|
+
z.transform((v) => {
|
|
314
|
+
return new PostOrgRepoAnalyticsRefreshForbiddenError(v, {
|
|
315
|
+
request: v.request$,
|
|
316
|
+
response: v.response$,
|
|
317
|
+
body: v.body$,
|
|
318
|
+
});
|
|
319
|
+
}),
|
|
320
|
+
);
|
|
321
|
+
|
|
322
|
+
/** @internal */
|
|
323
|
+
export const PostOrgRepoAnalyticsRefreshUnauthorizedError$inboundSchema:
|
|
324
|
+
z.ZodMiniType<PostOrgRepoAnalyticsRefreshUnauthorizedError, unknown> = z.pipe(
|
|
325
|
+
z.object({
|
|
326
|
+
error: z.lazy(() =>
|
|
327
|
+
operations.PostOrgRepoAnalyticsRefreshUnauthorizedError$inboundSchema
|
|
328
|
+
),
|
|
329
|
+
request$: z.custom<Request>(x => x instanceof Request),
|
|
330
|
+
response$: z.custom<Response>(x => x instanceof Response),
|
|
331
|
+
body$: z.string(),
|
|
332
|
+
}),
|
|
333
|
+
z.transform((v) => {
|
|
334
|
+
return new PostOrgRepoAnalyticsRefreshUnauthorizedError(v, {
|
|
335
|
+
request: v.request$,
|
|
336
|
+
response: v.response$,
|
|
337
|
+
body: v.body$,
|
|
338
|
+
});
|
|
339
|
+
}),
|
|
340
|
+
);
|
|
341
|
+
|
|
342
|
+
/** @internal */
|
|
343
|
+
export const PostOrgRepoAnalyticsRefreshBadRequestError$inboundSchema:
|
|
344
|
+
z.ZodMiniType<PostOrgRepoAnalyticsRefreshBadRequestError, unknown> = z.pipe(
|
|
345
|
+
z.object({
|
|
346
|
+
error: z.lazy(() =>
|
|
347
|
+
operations.PostOrgRepoAnalyticsRefreshBadRequestError$inboundSchema
|
|
348
|
+
),
|
|
349
|
+
request$: z.custom<Request>(x => x instanceof Request),
|
|
350
|
+
response$: z.custom<Response>(x => x instanceof Response),
|
|
351
|
+
body$: z.string(),
|
|
352
|
+
}),
|
|
353
|
+
z.transform((v) => {
|
|
354
|
+
return new PostOrgRepoAnalyticsRefreshBadRequestError(v, {
|
|
355
|
+
request: v.request$,
|
|
356
|
+
response: v.response$,
|
|
357
|
+
body: v.body$,
|
|
358
|
+
});
|
|
359
|
+
}),
|
|
360
|
+
);
|
|
@@ -0,0 +1,338 @@
|
|
|
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 { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as types from "../../types/primitives.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type GetOrgRepoAgentblameRequest = {
|
|
13
|
+
org: string;
|
|
14
|
+
repo: string;
|
|
15
|
+
base: string;
|
|
16
|
+
head: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export type GetOrgRepoAgentblameInternalServerErrorError = {
|
|
20
|
+
code: string;
|
|
21
|
+
message: string;
|
|
22
|
+
details?: { [k: string]: any } | undefined;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export type GetOrgRepoAgentblameConflictError = {
|
|
26
|
+
code: string;
|
|
27
|
+
message: string;
|
|
28
|
+
details?: { [k: string]: any } | undefined;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export type GetOrgRepoAgentblameNotAcceptableError = {
|
|
32
|
+
code: string;
|
|
33
|
+
message: string;
|
|
34
|
+
details?: { [k: string]: any } | undefined;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export type GetOrgRepoAgentblameNotFoundError = {
|
|
38
|
+
code: string;
|
|
39
|
+
message: string;
|
|
40
|
+
details?: { [k: string]: any } | undefined;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export type GetOrgRepoAgentblameForbiddenError = {
|
|
44
|
+
code: string;
|
|
45
|
+
message: string;
|
|
46
|
+
details?: { [k: string]: any } | undefined;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export type GetOrgRepoAgentblameUnauthorizedError = {
|
|
50
|
+
code: string;
|
|
51
|
+
message: string;
|
|
52
|
+
details?: { [k: string]: any } | undefined;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export type GetOrgRepoAgentblameBadRequestError = {
|
|
56
|
+
code: string;
|
|
57
|
+
message: string;
|
|
58
|
+
details?: { [k: string]: any } | undefined;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export type Attribution = {
|
|
62
|
+
lineNumber: number;
|
|
63
|
+
provider: string;
|
|
64
|
+
model: string | null;
|
|
65
|
+
confidence: number;
|
|
66
|
+
matchType: string;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export type GetOrgRepoAgentblameStats = {
|
|
70
|
+
totalLines: number;
|
|
71
|
+
aiLines: number;
|
|
72
|
+
humanLines: number;
|
|
73
|
+
aiPercentage: number;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Attribution data
|
|
78
|
+
*/
|
|
79
|
+
export type GetOrgRepoAgentblameResponse = {
|
|
80
|
+
attributions: { [k: string]: Array<Attribution> };
|
|
81
|
+
stats: GetOrgRepoAgentblameStats;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
/** @internal */
|
|
85
|
+
export type GetOrgRepoAgentblameRequest$Outbound = {
|
|
86
|
+
org: string;
|
|
87
|
+
repo: string;
|
|
88
|
+
base: string;
|
|
89
|
+
head: string;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
/** @internal */
|
|
93
|
+
export const GetOrgRepoAgentblameRequest$outboundSchema: z.ZodMiniType<
|
|
94
|
+
GetOrgRepoAgentblameRequest$Outbound,
|
|
95
|
+
GetOrgRepoAgentblameRequest
|
|
96
|
+
> = z.object({
|
|
97
|
+
org: z.string(),
|
|
98
|
+
repo: z.string(),
|
|
99
|
+
base: z.string(),
|
|
100
|
+
head: z.string(),
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
export function getOrgRepoAgentblameRequestToJSON(
|
|
104
|
+
getOrgRepoAgentblameRequest: GetOrgRepoAgentblameRequest,
|
|
105
|
+
): string {
|
|
106
|
+
return JSON.stringify(
|
|
107
|
+
GetOrgRepoAgentblameRequest$outboundSchema.parse(
|
|
108
|
+
getOrgRepoAgentblameRequest,
|
|
109
|
+
),
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/** @internal */
|
|
114
|
+
export const GetOrgRepoAgentblameInternalServerErrorError$inboundSchema:
|
|
115
|
+
z.ZodMiniType<GetOrgRepoAgentblameInternalServerErrorError, unknown> = z
|
|
116
|
+
.object({
|
|
117
|
+
code: types.string(),
|
|
118
|
+
message: types.string(),
|
|
119
|
+
details: types.optional(z.record(z.string(), z.any())),
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
export function getOrgRepoAgentblameInternalServerErrorErrorFromJSON(
|
|
123
|
+
jsonString: string,
|
|
124
|
+
): SafeParseResult<
|
|
125
|
+
GetOrgRepoAgentblameInternalServerErrorError,
|
|
126
|
+
SDKValidationError
|
|
127
|
+
> {
|
|
128
|
+
return safeParse(
|
|
129
|
+
jsonString,
|
|
130
|
+
(x) =>
|
|
131
|
+
GetOrgRepoAgentblameInternalServerErrorError$inboundSchema.parse(
|
|
132
|
+
JSON.parse(x),
|
|
133
|
+
),
|
|
134
|
+
`Failed to parse 'GetOrgRepoAgentblameInternalServerErrorError' from JSON`,
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/** @internal */
|
|
139
|
+
export const GetOrgRepoAgentblameConflictError$inboundSchema: z.ZodMiniType<
|
|
140
|
+
GetOrgRepoAgentblameConflictError,
|
|
141
|
+
unknown
|
|
142
|
+
> = z.object({
|
|
143
|
+
code: types.string(),
|
|
144
|
+
message: types.string(),
|
|
145
|
+
details: types.optional(z.record(z.string(), z.any())),
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
export function getOrgRepoAgentblameConflictErrorFromJSON(
|
|
149
|
+
jsonString: string,
|
|
150
|
+
): SafeParseResult<GetOrgRepoAgentblameConflictError, SDKValidationError> {
|
|
151
|
+
return safeParse(
|
|
152
|
+
jsonString,
|
|
153
|
+
(x) => GetOrgRepoAgentblameConflictError$inboundSchema.parse(JSON.parse(x)),
|
|
154
|
+
`Failed to parse 'GetOrgRepoAgentblameConflictError' from JSON`,
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/** @internal */
|
|
159
|
+
export const GetOrgRepoAgentblameNotAcceptableError$inboundSchema:
|
|
160
|
+
z.ZodMiniType<GetOrgRepoAgentblameNotAcceptableError, unknown> = z.object({
|
|
161
|
+
code: types.string(),
|
|
162
|
+
message: types.string(),
|
|
163
|
+
details: types.optional(z.record(z.string(), z.any())),
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
export function getOrgRepoAgentblameNotAcceptableErrorFromJSON(
|
|
167
|
+
jsonString: string,
|
|
168
|
+
): SafeParseResult<GetOrgRepoAgentblameNotAcceptableError, SDKValidationError> {
|
|
169
|
+
return safeParse(
|
|
170
|
+
jsonString,
|
|
171
|
+
(x) =>
|
|
172
|
+
GetOrgRepoAgentblameNotAcceptableError$inboundSchema.parse(JSON.parse(x)),
|
|
173
|
+
`Failed to parse 'GetOrgRepoAgentblameNotAcceptableError' from JSON`,
|
|
174
|
+
);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/** @internal */
|
|
178
|
+
export const GetOrgRepoAgentblameNotFoundError$inboundSchema: z.ZodMiniType<
|
|
179
|
+
GetOrgRepoAgentblameNotFoundError,
|
|
180
|
+
unknown
|
|
181
|
+
> = z.object({
|
|
182
|
+
code: types.string(),
|
|
183
|
+
message: types.string(),
|
|
184
|
+
details: types.optional(z.record(z.string(), z.any())),
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
export function getOrgRepoAgentblameNotFoundErrorFromJSON(
|
|
188
|
+
jsonString: string,
|
|
189
|
+
): SafeParseResult<GetOrgRepoAgentblameNotFoundError, SDKValidationError> {
|
|
190
|
+
return safeParse(
|
|
191
|
+
jsonString,
|
|
192
|
+
(x) => GetOrgRepoAgentblameNotFoundError$inboundSchema.parse(JSON.parse(x)),
|
|
193
|
+
`Failed to parse 'GetOrgRepoAgentblameNotFoundError' from JSON`,
|
|
194
|
+
);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/** @internal */
|
|
198
|
+
export const GetOrgRepoAgentblameForbiddenError$inboundSchema: z.ZodMiniType<
|
|
199
|
+
GetOrgRepoAgentblameForbiddenError,
|
|
200
|
+
unknown
|
|
201
|
+
> = z.object({
|
|
202
|
+
code: types.string(),
|
|
203
|
+
message: types.string(),
|
|
204
|
+
details: types.optional(z.record(z.string(), z.any())),
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
export function getOrgRepoAgentblameForbiddenErrorFromJSON(
|
|
208
|
+
jsonString: string,
|
|
209
|
+
): SafeParseResult<GetOrgRepoAgentblameForbiddenError, SDKValidationError> {
|
|
210
|
+
return safeParse(
|
|
211
|
+
jsonString,
|
|
212
|
+
(x) =>
|
|
213
|
+
GetOrgRepoAgentblameForbiddenError$inboundSchema.parse(JSON.parse(x)),
|
|
214
|
+
`Failed to parse 'GetOrgRepoAgentblameForbiddenError' from JSON`,
|
|
215
|
+
);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/** @internal */
|
|
219
|
+
export const GetOrgRepoAgentblameUnauthorizedError$inboundSchema: z.ZodMiniType<
|
|
220
|
+
GetOrgRepoAgentblameUnauthorizedError,
|
|
221
|
+
unknown
|
|
222
|
+
> = z.object({
|
|
223
|
+
code: types.string(),
|
|
224
|
+
message: types.string(),
|
|
225
|
+
details: types.optional(z.record(z.string(), z.any())),
|
|
226
|
+
});
|
|
227
|
+
|
|
228
|
+
export function getOrgRepoAgentblameUnauthorizedErrorFromJSON(
|
|
229
|
+
jsonString: string,
|
|
230
|
+
): SafeParseResult<GetOrgRepoAgentblameUnauthorizedError, SDKValidationError> {
|
|
231
|
+
return safeParse(
|
|
232
|
+
jsonString,
|
|
233
|
+
(x) =>
|
|
234
|
+
GetOrgRepoAgentblameUnauthorizedError$inboundSchema.parse(JSON.parse(x)),
|
|
235
|
+
`Failed to parse 'GetOrgRepoAgentblameUnauthorizedError' from JSON`,
|
|
236
|
+
);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/** @internal */
|
|
240
|
+
export const GetOrgRepoAgentblameBadRequestError$inboundSchema: z.ZodMiniType<
|
|
241
|
+
GetOrgRepoAgentblameBadRequestError,
|
|
242
|
+
unknown
|
|
243
|
+
> = z.object({
|
|
244
|
+
code: types.string(),
|
|
245
|
+
message: types.string(),
|
|
246
|
+
details: types.optional(z.record(z.string(), z.any())),
|
|
247
|
+
});
|
|
248
|
+
|
|
249
|
+
export function getOrgRepoAgentblameBadRequestErrorFromJSON(
|
|
250
|
+
jsonString: string,
|
|
251
|
+
): SafeParseResult<GetOrgRepoAgentblameBadRequestError, SDKValidationError> {
|
|
252
|
+
return safeParse(
|
|
253
|
+
jsonString,
|
|
254
|
+
(x) =>
|
|
255
|
+
GetOrgRepoAgentblameBadRequestError$inboundSchema.parse(JSON.parse(x)),
|
|
256
|
+
`Failed to parse 'GetOrgRepoAgentblameBadRequestError' from JSON`,
|
|
257
|
+
);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
/** @internal */
|
|
261
|
+
export const Attribution$inboundSchema: z.ZodMiniType<Attribution, unknown> = z
|
|
262
|
+
.pipe(
|
|
263
|
+
z.object({
|
|
264
|
+
lineNumber: types.number(),
|
|
265
|
+
provider: types.string(),
|
|
266
|
+
model: types.nullable(types.string()),
|
|
267
|
+
confidence: types.number(),
|
|
268
|
+
match_type: types.string(),
|
|
269
|
+
}),
|
|
270
|
+
z.transform((v) => {
|
|
271
|
+
return remap$(v, {
|
|
272
|
+
"match_type": "matchType",
|
|
273
|
+
});
|
|
274
|
+
}),
|
|
275
|
+
);
|
|
276
|
+
|
|
277
|
+
export function attributionFromJSON(
|
|
278
|
+
jsonString: string,
|
|
279
|
+
): SafeParseResult<Attribution, SDKValidationError> {
|
|
280
|
+
return safeParse(
|
|
281
|
+
jsonString,
|
|
282
|
+
(x) => Attribution$inboundSchema.parse(JSON.parse(x)),
|
|
283
|
+
`Failed to parse 'Attribution' from JSON`,
|
|
284
|
+
);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/** @internal */
|
|
288
|
+
export const GetOrgRepoAgentblameStats$inboundSchema: z.ZodMiniType<
|
|
289
|
+
GetOrgRepoAgentblameStats,
|
|
290
|
+
unknown
|
|
291
|
+
> = z.pipe(
|
|
292
|
+
z.object({
|
|
293
|
+
total_lines: types.number(),
|
|
294
|
+
ai_lines: types.number(),
|
|
295
|
+
human_lines: types.number(),
|
|
296
|
+
ai_percentage: types.number(),
|
|
297
|
+
}),
|
|
298
|
+
z.transform((v) => {
|
|
299
|
+
return remap$(v, {
|
|
300
|
+
"total_lines": "totalLines",
|
|
301
|
+
"ai_lines": "aiLines",
|
|
302
|
+
"human_lines": "humanLines",
|
|
303
|
+
"ai_percentage": "aiPercentage",
|
|
304
|
+
});
|
|
305
|
+
}),
|
|
306
|
+
);
|
|
307
|
+
|
|
308
|
+
export function getOrgRepoAgentblameStatsFromJSON(
|
|
309
|
+
jsonString: string,
|
|
310
|
+
): SafeParseResult<GetOrgRepoAgentblameStats, SDKValidationError> {
|
|
311
|
+
return safeParse(
|
|
312
|
+
jsonString,
|
|
313
|
+
(x) => GetOrgRepoAgentblameStats$inboundSchema.parse(JSON.parse(x)),
|
|
314
|
+
`Failed to parse 'GetOrgRepoAgentblameStats' from JSON`,
|
|
315
|
+
);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/** @internal */
|
|
319
|
+
export const GetOrgRepoAgentblameResponse$inboundSchema: z.ZodMiniType<
|
|
320
|
+
GetOrgRepoAgentblameResponse,
|
|
321
|
+
unknown
|
|
322
|
+
> = z.object({
|
|
323
|
+
attributions: z.record(
|
|
324
|
+
z.string(),
|
|
325
|
+
z.array(z.lazy(() => Attribution$inboundSchema)),
|
|
326
|
+
),
|
|
327
|
+
stats: z.lazy(() => GetOrgRepoAgentblameStats$inboundSchema),
|
|
328
|
+
});
|
|
329
|
+
|
|
330
|
+
export function getOrgRepoAgentblameResponseFromJSON(
|
|
331
|
+
jsonString: string,
|
|
332
|
+
): SafeParseResult<GetOrgRepoAgentblameResponse, SDKValidationError> {
|
|
333
|
+
return safeParse(
|
|
334
|
+
jsonString,
|
|
335
|
+
(x) => GetOrgRepoAgentblameResponse$inboundSchema.parse(JSON.parse(x)),
|
|
336
|
+
`Failed to parse 'GetOrgRepoAgentblameResponse' from JSON`,
|
|
337
|
+
);
|
|
338
|
+
}
|