@mesadev/sdk 0.1.6 → 0.2.1
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/README.md +220 -183
- package/dist/commonjs/funcs/contentGet.d.ts +1 -1
- package/dist/commonjs/funcs/contentGet.js +1 -3
- package/dist/commonjs/funcs/contentGet.js.map +1 -1
- package/dist/commonjs/funcs/lfsDownload.d.ts +18 -0
- package/dist/commonjs/funcs/lfsDownload.d.ts.map +1 -0
- package/dist/commonjs/funcs/lfsDownload.js +129 -0
- package/dist/commonjs/funcs/lfsDownload.js.map +1 -0
- package/dist/commonjs/funcs/lfsUpload.d.ts +18 -0
- package/dist/commonjs/funcs/lfsUpload.d.ts.map +1 -0
- package/dist/commonjs/funcs/lfsUpload.js +129 -0
- package/dist/commonjs/funcs/lfsUpload.js.map +1 -0
- package/dist/commonjs/funcs/mergePerform.d.ts +18 -0
- package/dist/commonjs/funcs/mergePerform.d.ts.map +1 -0
- package/dist/commonjs/funcs/mergePerform.js +133 -0
- package/dist/commonjs/funcs/mergePerform.js.map +1 -0
- package/dist/commonjs/funcs/reposGet.js +1 -1
- package/dist/commonjs/funcs/reposGet.js.map +1 -1
- package/dist/commonjs/helpers/index.d.ts +8 -0
- package/dist/commonjs/helpers/index.d.ts.map +1 -0
- package/dist/commonjs/helpers/index.js +24 -0
- package/dist/commonjs/helpers/index.js.map +1 -0
- package/dist/commonjs/helpers/lfs.d.ts +103 -0
- package/dist/commonjs/helpers/lfs.d.ts.map +1 -0
- package/dist/commonjs/helpers/lfs.js +266 -0
- package/dist/commonjs/helpers/lfs.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- 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/postbyorgbyrepolfsobjects.d.ts +151 -0
- package/dist/commonjs/models/errors/postbyorgbyrepolfsobjects.d.ts.map +1 -0
- package/dist/commonjs/models/errors/postbyorgbyrepolfsobjects.js +233 -0
- package/dist/commonjs/models/errors/postbyorgbyrepolfsobjects.js.map +1 -0
- package/dist/commonjs/models/errors/postbyorgbyrepolfsobjectsdownload.d.ts +151 -0
- package/dist/commonjs/models/errors/postbyorgbyrepolfsobjectsdownload.d.ts.map +1 -0
- package/dist/commonjs/models/errors/postbyorgbyrepolfsobjectsdownload.js +244 -0
- package/dist/commonjs/models/errors/postbyorgbyrepolfsobjectsdownload.js.map +1 -0
- package/dist/commonjs/models/errors/postbyorgbyrepomergebybase.d.ts +151 -0
- package/dist/commonjs/models/errors/postbyorgbyrepomergebybase.d.ts.map +1 -0
- package/dist/commonjs/models/errors/postbyorgbyrepomergebybase.js +234 -0
- package/dist/commonjs/models/errors/postbyorgbyrepomergebybase.js.map +1 -0
- package/dist/commonjs/models/operations/getbyorg.d.ts +0 -1
- package/dist/commonjs/models/operations/getbyorg.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getbyorg.js +0 -2
- package/dist/commonjs/models/operations/getbyorg.js.map +1 -1
- package/dist/commonjs/models/operations/getbyorgbyrepo.d.ts +105 -14
- package/dist/commonjs/models/operations/getbyorgbyrepo.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getbyorgbyrepo.js +98 -17
- package/dist/commonjs/models/operations/getbyorgbyrepo.js.map +1 -1
- package/dist/commonjs/models/operations/getbyorgbyrepocontent.d.ts +39 -12
- package/dist/commonjs/models/operations/getbyorgbyrepocontent.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getbyorgbyrepocontent.js +69 -14
- package/dist/commonjs/models/operations/getbyorgbyrepocontent.js.map +1 -1
- package/dist/commonjs/models/operations/getbyorgbyreposync.d.ts +11 -2
- package/dist/commonjs/models/operations/getbyorgbyreposync.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getbyorgbyreposync.js +11 -1
- package/dist/commonjs/models/operations/getbyorgbyreposync.js.map +1 -1
- package/dist/commonjs/models/operations/getbyorgrepos.d.ts +9 -1
- package/dist/commonjs/models/operations/getbyorgrepos.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getbyorgrepos.js +6 -2
- package/dist/commonjs/models/operations/getbyorgrepos.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/patchbyorgbyrepo.d.ts +33 -13
- package/dist/commonjs/models/operations/patchbyorgbyrepo.d.ts.map +1 -1
- package/dist/commonjs/models/operations/patchbyorgbyrepo.js +35 -20
- package/dist/commonjs/models/operations/patchbyorgbyrepo.js.map +1 -1
- package/dist/commonjs/models/operations/postbyorgbyrepocommits.d.ts +28 -4
- package/dist/commonjs/models/operations/postbyorgbyrepocommits.d.ts.map +1 -1
- package/dist/commonjs/models/operations/postbyorgbyrepocommits.js +21 -1
- package/dist/commonjs/models/operations/postbyorgbyrepocommits.js.map +1 -1
- package/dist/commonjs/models/operations/postbyorgbyrepolfsobjects.d.ts +138 -0
- package/dist/commonjs/models/operations/postbyorgbyrepolfsobjects.d.ts.map +1 -0
- package/dist/commonjs/models/operations/postbyorgbyrepolfsobjects.js +180 -0
- package/dist/commonjs/models/operations/postbyorgbyrepolfsobjects.js.map +1 -0
- package/dist/commonjs/models/operations/postbyorgbyrepolfsobjectsdownload.d.ts +138 -0
- package/dist/commonjs/models/operations/postbyorgbyrepolfsobjectsdownload.d.ts.map +1 -0
- package/dist/commonjs/models/operations/postbyorgbyrepolfsobjectsdownload.js +186 -0
- package/dist/commonjs/models/operations/postbyorgbyrepolfsobjectsdownload.js.map +1 -0
- package/dist/commonjs/models/operations/postbyorgbyrepomergebybase.d.ts +177 -0
- package/dist/commonjs/models/operations/postbyorgbyrepomergebybase.d.ts.map +1 -0
- package/dist/commonjs/models/operations/postbyorgbyrepomergebybase.js +180 -0
- package/dist/commonjs/models/operations/postbyorgbyrepomergebybase.js.map +1 -0
- package/dist/commonjs/models/operations/postbyorgrepos.d.ts +31 -13
- package/dist/commonjs/models/operations/postbyorgrepos.d.ts.map +1 -1
- package/dist/commonjs/models/operations/postbyorgrepos.js +28 -18
- package/dist/commonjs/models/operations/postbyorgrepos.js.map +1 -1
- package/dist/commonjs/sdk/content.d.ts +1 -1
- package/dist/commonjs/sdk/content.js +1 -1
- package/dist/commonjs/sdk/lfs.d.ts +19 -0
- package/dist/commonjs/sdk/lfs.d.ts.map +1 -0
- package/dist/commonjs/sdk/lfs.js +32 -0
- package/dist/commonjs/sdk/lfs.js.map +1 -0
- package/dist/commonjs/sdk/merge.d.ts +12 -0
- package/dist/commonjs/sdk/merge.d.ts.map +1 -0
- package/dist/commonjs/sdk/merge.js +22 -0
- package/dist/commonjs/sdk/merge.js.map +1 -0
- package/dist/commonjs/sdk/sdk.d.ts +6 -0
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +8 -0
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/commonjs/types/smartUnion.js +7 -0
- package/dist/commonjs/types/smartUnion.js.map +1 -1
- package/dist/esm/funcs/contentGet.d.ts +1 -1
- package/dist/esm/funcs/contentGet.js +1 -3
- package/dist/esm/funcs/contentGet.js.map +1 -1
- package/dist/esm/funcs/lfsDownload.d.ts +18 -0
- package/dist/esm/funcs/lfsDownload.d.ts.map +1 -0
- package/dist/esm/funcs/lfsDownload.js +93 -0
- package/dist/esm/funcs/lfsDownload.js.map +1 -0
- package/dist/esm/funcs/lfsUpload.d.ts +18 -0
- package/dist/esm/funcs/lfsUpload.d.ts.map +1 -0
- package/dist/esm/funcs/lfsUpload.js +93 -0
- package/dist/esm/funcs/lfsUpload.js.map +1 -0
- package/dist/esm/funcs/mergePerform.d.ts +18 -0
- package/dist/esm/funcs/mergePerform.d.ts.map +1 -0
- package/dist/esm/funcs/mergePerform.js +97 -0
- package/dist/esm/funcs/mergePerform.js.map +1 -0
- package/dist/esm/funcs/reposGet.js +1 -1
- package/dist/esm/funcs/reposGet.js.map +1 -1
- package/dist/esm/helpers/index.d.ts +8 -0
- package/dist/esm/helpers/index.d.ts.map +1 -0
- package/dist/esm/helpers/index.js +8 -0
- package/dist/esm/helpers/index.js.map +1 -0
- package/dist/esm/helpers/lfs.d.ts +103 -0
- package/dist/esm/helpers/lfs.d.ts.map +1 -0
- package/dist/esm/helpers/lfs.js +263 -0
- package/dist/esm/helpers/lfs.js.map +1 -0
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- 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/postbyorgbyrepolfsobjects.d.ts +151 -0
- package/dist/esm/models/errors/postbyorgbyrepolfsobjects.d.ts.map +1 -0
- package/dist/esm/models/errors/postbyorgbyrepolfsobjects.js +190 -0
- package/dist/esm/models/errors/postbyorgbyrepolfsobjects.js.map +1 -0
- package/dist/esm/models/errors/postbyorgbyrepolfsobjectsdownload.d.ts +151 -0
- package/dist/esm/models/errors/postbyorgbyrepolfsobjectsdownload.d.ts.map +1 -0
- package/dist/esm/models/errors/postbyorgbyrepolfsobjectsdownload.js +201 -0
- package/dist/esm/models/errors/postbyorgbyrepolfsobjectsdownload.js.map +1 -0
- package/dist/esm/models/errors/postbyorgbyrepomergebybase.d.ts +151 -0
- package/dist/esm/models/errors/postbyorgbyrepomergebybase.d.ts.map +1 -0
- package/dist/esm/models/errors/postbyorgbyrepomergebybase.js +191 -0
- package/dist/esm/models/errors/postbyorgbyrepomergebybase.js.map +1 -0
- package/dist/esm/models/operations/getbyorg.d.ts +0 -1
- package/dist/esm/models/operations/getbyorg.d.ts.map +1 -1
- package/dist/esm/models/operations/getbyorg.js +0 -2
- package/dist/esm/models/operations/getbyorg.js.map +1 -1
- package/dist/esm/models/operations/getbyorgbyrepo.d.ts +105 -14
- package/dist/esm/models/operations/getbyorgbyrepo.d.ts.map +1 -1
- package/dist/esm/models/operations/getbyorgbyrepo.js +91 -14
- package/dist/esm/models/operations/getbyorgbyrepo.js.map +1 -1
- package/dist/esm/models/operations/getbyorgbyrepocontent.d.ts +39 -12
- package/dist/esm/models/operations/getbyorgbyrepocontent.d.ts.map +1 -1
- package/dist/esm/models/operations/getbyorgbyrepocontent.js +65 -12
- package/dist/esm/models/operations/getbyorgbyrepocontent.js.map +1 -1
- package/dist/esm/models/operations/getbyorgbyreposync.d.ts +11 -2
- package/dist/esm/models/operations/getbyorgbyreposync.d.ts.map +1 -1
- package/dist/esm/models/operations/getbyorgbyreposync.js +9 -0
- package/dist/esm/models/operations/getbyorgbyreposync.js.map +1 -1
- package/dist/esm/models/operations/getbyorgrepos.d.ts +9 -1
- package/dist/esm/models/operations/getbyorgrepos.d.ts.map +1 -1
- package/dist/esm/models/operations/getbyorgrepos.js +6 -2
- package/dist/esm/models/operations/getbyorgrepos.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/patchbyorgbyrepo.d.ts +33 -13
- package/dist/esm/models/operations/patchbyorgbyrepo.d.ts.map +1 -1
- package/dist/esm/models/operations/patchbyorgbyrepo.js +32 -17
- package/dist/esm/models/operations/patchbyorgbyrepo.js.map +1 -1
- package/dist/esm/models/operations/postbyorgbyrepocommits.d.ts +28 -4
- package/dist/esm/models/operations/postbyorgbyrepocommits.d.ts.map +1 -1
- package/dist/esm/models/operations/postbyorgbyrepocommits.js +18 -0
- package/dist/esm/models/operations/postbyorgbyrepocommits.js.map +1 -1
- package/dist/esm/models/operations/postbyorgbyrepolfsobjects.d.ts +138 -0
- package/dist/esm/models/operations/postbyorgbyrepolfsobjects.d.ts.map +1 -0
- package/dist/esm/models/operations/postbyorgbyrepolfsobjects.js +131 -0
- package/dist/esm/models/operations/postbyorgbyrepolfsobjects.js.map +1 -0
- package/dist/esm/models/operations/postbyorgbyrepolfsobjectsdownload.d.ts +138 -0
- package/dist/esm/models/operations/postbyorgbyrepolfsobjectsdownload.d.ts.map +1 -0
- package/dist/esm/models/operations/postbyorgbyrepolfsobjectsdownload.js +137 -0
- package/dist/esm/models/operations/postbyorgbyrepolfsobjectsdownload.js.map +1 -0
- package/dist/esm/models/operations/postbyorgbyrepomergebybase.d.ts +177 -0
- package/dist/esm/models/operations/postbyorgbyrepomergebybase.d.ts.map +1 -0
- package/dist/esm/models/operations/postbyorgbyrepomergebybase.js +133 -0
- package/dist/esm/models/operations/postbyorgbyrepomergebybase.js.map +1 -0
- package/dist/esm/models/operations/postbyorgrepos.d.ts +31 -13
- package/dist/esm/models/operations/postbyorgrepos.d.ts.map +1 -1
- package/dist/esm/models/operations/postbyorgrepos.js +25 -15
- package/dist/esm/models/operations/postbyorgrepos.js.map +1 -1
- package/dist/esm/sdk/content.d.ts +1 -1
- package/dist/esm/sdk/content.js +1 -1
- package/dist/esm/sdk/lfs.d.ts +19 -0
- package/dist/esm/sdk/lfs.d.ts.map +1 -0
- package/dist/esm/sdk/lfs.js +28 -0
- package/dist/esm/sdk/lfs.js.map +1 -0
- package/dist/esm/sdk/merge.d.ts +12 -0
- package/dist/esm/sdk/merge.d.ts.map +1 -0
- package/dist/esm/sdk/merge.js +18 -0
- package/dist/esm/sdk/merge.js.map +1 -0
- package/dist/esm/sdk/sdk.d.ts +6 -0
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +8 -0
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/dist/esm/types/smartUnion.js +7 -0
- package/dist/esm/types/smartUnion.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +3 -3
- package/src/funcs/contentGet.ts +1 -3
- package/src/funcs/lfsDownload.ts +233 -0
- package/src/funcs/lfsUpload.ts +224 -0
- package/src/funcs/mergePerform.ts +234 -0
- package/src/funcs/reposGet.ts +1 -0
- package/src/helpers/index.ts +8 -0
- package/src/helpers/lfs.ts +410 -0
- package/src/lib/config.ts +3 -3
- package/src/models/errors/index.ts +3 -0
- package/src/models/errors/postbyorgbyrepolfsobjects.ts +358 -0
- package/src/models/errors/postbyorgbyrepolfsobjectsdownload.ts +379 -0
- package/src/models/errors/postbyorgbyrepomergebybase.ts +359 -0
- package/src/models/operations/getbyorg.ts +0 -3
- package/src/models/operations/getbyorgbyrepo.ts +249 -32
- package/src/models/operations/getbyorgbyrepocontent.ts +150 -36
- package/src/models/operations/getbyorgbyreposync.ts +33 -1
- package/src/models/operations/getbyorgrepos.ts +15 -3
- package/src/models/operations/index.ts +3 -0
- package/src/models/operations/patchbyorgbyrepo.ts +84 -41
- package/src/models/operations/postbyorgbyrepocommits.ts +62 -4
- package/src/models/operations/postbyorgbyrepolfsobjects.ts +411 -0
- package/src/models/operations/postbyorgbyrepolfsobjectsdownload.ts +442 -0
- package/src/models/operations/postbyorgbyrepomergebybase.ts +428 -0
- package/src/models/operations/postbyorgrepos.ts +69 -35
- package/src/sdk/content.ts +1 -1
- package/src/sdk/lfs.ts +45 -0
- package/src/sdk/merge.ts +27 -0
- package/src/sdk/sdk.ts +12 -0
- package/src/types/smartUnion.ts +8 -0
|
@@ -15,8 +15,6 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
15
15
|
export type GetByOrgByRepoContentRequest = {
|
|
16
16
|
org: string;
|
|
17
17
|
repo: string;
|
|
18
|
-
cursor?: string | undefined;
|
|
19
|
-
limit?: number | undefined;
|
|
20
18
|
ref?: string | undefined;
|
|
21
19
|
path?: string | undefined;
|
|
22
20
|
depth?: number | undefined;
|
|
@@ -71,32 +69,61 @@ export type EntryDir = {
|
|
|
71
69
|
sha: string;
|
|
72
70
|
};
|
|
73
71
|
|
|
72
|
+
export type EntrySymlink = {
|
|
73
|
+
type: "symlink";
|
|
74
|
+
name: string;
|
|
75
|
+
path: string;
|
|
76
|
+
sha: string;
|
|
77
|
+
size: number;
|
|
78
|
+
executable: boolean;
|
|
79
|
+
lastCommitAt: Date | null;
|
|
80
|
+
};
|
|
81
|
+
|
|
74
82
|
export type EntryFile = {
|
|
75
83
|
type: "file";
|
|
76
84
|
name: string;
|
|
77
85
|
path: string;
|
|
78
86
|
sha: string;
|
|
79
87
|
size: number;
|
|
88
|
+
executable: boolean;
|
|
89
|
+
lastCommitAt: Date | null;
|
|
80
90
|
};
|
|
81
91
|
|
|
82
92
|
export type Entry =
|
|
83
93
|
| EntryFile
|
|
94
|
+
| EntrySymlink
|
|
84
95
|
| EntryDir
|
|
85
96
|
| discriminatedUnionTypes.Unknown<"type">;
|
|
86
97
|
|
|
87
98
|
export type Dir = {
|
|
88
|
-
nextCursor: string | null;
|
|
89
|
-
hasMore: boolean;
|
|
90
99
|
type: "dir";
|
|
91
100
|
name: string;
|
|
92
101
|
path: string;
|
|
93
102
|
sha: string;
|
|
103
|
+
childCount: number;
|
|
94
104
|
entries: Array<
|
|
95
|
-
|
|
105
|
+
| EntryFile
|
|
106
|
+
| EntrySymlink
|
|
107
|
+
| EntryDir
|
|
108
|
+
| discriminatedUnionTypes.Unknown<"type">
|
|
96
109
|
>;
|
|
110
|
+
nextCursor: string | null;
|
|
111
|
+
hasMore: boolean;
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
export type SymlinkBase64 = {
|
|
115
|
+
type: "symlink";
|
|
116
|
+
name: string;
|
|
117
|
+
path: string;
|
|
118
|
+
sha: string;
|
|
119
|
+
size: number;
|
|
120
|
+
encoding: "base64";
|
|
121
|
+
content: string;
|
|
122
|
+
executable: boolean;
|
|
123
|
+
lastCommitAt: Date | null;
|
|
97
124
|
};
|
|
98
125
|
|
|
99
|
-
export type
|
|
126
|
+
export type FileBase64 = {
|
|
100
127
|
type: "file";
|
|
101
128
|
name: string;
|
|
102
129
|
path: string;
|
|
@@ -104,18 +131,22 @@ export type Base64 = {
|
|
|
104
131
|
size: number;
|
|
105
132
|
encoding: "base64";
|
|
106
133
|
content: string;
|
|
134
|
+
executable: boolean;
|
|
135
|
+
lastCommitAt: Date | null;
|
|
107
136
|
};
|
|
108
137
|
|
|
109
138
|
/**
|
|
110
139
|
* Content response
|
|
111
140
|
*/
|
|
112
141
|
export type GetByOrgByRepoContentResponseBody =
|
|
113
|
-
|
|
|
142
|
+
| FileBase64
|
|
143
|
+
| SymlinkBase64
|
|
114
144
|
| Dir
|
|
115
145
|
| discriminatedUnionTypes.Unknown<"type">;
|
|
116
146
|
|
|
117
147
|
export type GetByOrgByRepoContentResponse =
|
|
118
|
-
|
|
|
148
|
+
| FileBase64
|
|
149
|
+
| SymlinkBase64
|
|
119
150
|
| Dir
|
|
120
151
|
| discriminatedUnionTypes.Unknown<"type">
|
|
121
152
|
| ReadableStream<Uint8Array>;
|
|
@@ -124,8 +155,6 @@ export type GetByOrgByRepoContentResponse =
|
|
|
124
155
|
export type GetByOrgByRepoContentRequest$Outbound = {
|
|
125
156
|
org: string;
|
|
126
157
|
repo: string;
|
|
127
|
-
cursor?: string | undefined;
|
|
128
|
-
limit?: number | undefined;
|
|
129
158
|
ref?: string | undefined;
|
|
130
159
|
path?: string | undefined;
|
|
131
160
|
depth?: number | undefined;
|
|
@@ -138,8 +167,6 @@ export const GetByOrgByRepoContentRequest$outboundSchema: z.ZodMiniType<
|
|
|
138
167
|
> = z.object({
|
|
139
168
|
org: z.string(),
|
|
140
169
|
repo: z.string(),
|
|
141
|
-
cursor: z.optional(z.string()),
|
|
142
|
-
limit: z.optional(z.int()),
|
|
143
170
|
ref: z.optional(z.string()),
|
|
144
171
|
path: z.optional(z.string()),
|
|
145
172
|
depth: z.optional(z.int()),
|
|
@@ -326,15 +353,53 @@ export function entryDirFromJSON(
|
|
|
326
353
|
);
|
|
327
354
|
}
|
|
328
355
|
|
|
356
|
+
/** @internal */
|
|
357
|
+
export const EntrySymlink$inboundSchema: z.ZodMiniType<EntrySymlink, unknown> =
|
|
358
|
+
z.pipe(
|
|
359
|
+
z.object({
|
|
360
|
+
type: types.literal("symlink"),
|
|
361
|
+
name: types.string(),
|
|
362
|
+
path: types.string(),
|
|
363
|
+
sha: types.string(),
|
|
364
|
+
size: types.number(),
|
|
365
|
+
executable: types.boolean(),
|
|
366
|
+
last_commit_at: types.nullable(types.date()),
|
|
367
|
+
}),
|
|
368
|
+
z.transform((v) => {
|
|
369
|
+
return remap$(v, {
|
|
370
|
+
"last_commit_at": "lastCommitAt",
|
|
371
|
+
});
|
|
372
|
+
}),
|
|
373
|
+
);
|
|
374
|
+
|
|
375
|
+
export function entrySymlinkFromJSON(
|
|
376
|
+
jsonString: string,
|
|
377
|
+
): SafeParseResult<EntrySymlink, SDKValidationError> {
|
|
378
|
+
return safeParse(
|
|
379
|
+
jsonString,
|
|
380
|
+
(x) => EntrySymlink$inboundSchema.parse(JSON.parse(x)),
|
|
381
|
+
`Failed to parse 'EntrySymlink' from JSON`,
|
|
382
|
+
);
|
|
383
|
+
}
|
|
384
|
+
|
|
329
385
|
/** @internal */
|
|
330
386
|
export const EntryFile$inboundSchema: z.ZodMiniType<EntryFile, unknown> = z
|
|
331
|
-
.
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
387
|
+
.pipe(
|
|
388
|
+
z.object({
|
|
389
|
+
type: types.literal("file"),
|
|
390
|
+
name: types.string(),
|
|
391
|
+
path: types.string(),
|
|
392
|
+
sha: types.string(),
|
|
393
|
+
size: types.number(),
|
|
394
|
+
executable: types.boolean(),
|
|
395
|
+
last_commit_at: types.nullable(types.date()),
|
|
396
|
+
}),
|
|
397
|
+
z.transform((v) => {
|
|
398
|
+
return remap$(v, {
|
|
399
|
+
"last_commit_at": "lastCommitAt",
|
|
400
|
+
});
|
|
401
|
+
}),
|
|
402
|
+
);
|
|
338
403
|
|
|
339
404
|
export function entryFileFromJSON(
|
|
340
405
|
jsonString: string,
|
|
@@ -350,6 +415,7 @@ export function entryFileFromJSON(
|
|
|
350
415
|
export const Entry$inboundSchema: z.ZodMiniType<Entry, unknown> =
|
|
351
416
|
discriminatedUnion("type", {
|
|
352
417
|
file: z.lazy(() => EntryFile$inboundSchema),
|
|
418
|
+
symlink: z.lazy(() => EntrySymlink$inboundSchema),
|
|
353
419
|
dir: z.lazy(() => EntryDir$inboundSchema),
|
|
354
420
|
});
|
|
355
421
|
|
|
@@ -366,19 +432,22 @@ export function entryFromJSON(
|
|
|
366
432
|
/** @internal */
|
|
367
433
|
export const Dir$inboundSchema: z.ZodMiniType<Dir, unknown> = z.pipe(
|
|
368
434
|
z.object({
|
|
369
|
-
next_cursor: types.nullable(types.string()),
|
|
370
|
-
has_more: types.boolean(),
|
|
371
435
|
type: types.literal("dir"),
|
|
372
436
|
name: types.string(),
|
|
373
437
|
path: types.string(),
|
|
374
438
|
sha: types.string(),
|
|
439
|
+
child_count: types.number(),
|
|
375
440
|
entries: z.array(discriminatedUnion("type", {
|
|
376
441
|
file: z.lazy(() => EntryFile$inboundSchema),
|
|
442
|
+
symlink: z.lazy(() => EntrySymlink$inboundSchema),
|
|
377
443
|
dir: z.lazy(() => EntryDir$inboundSchema),
|
|
378
444
|
})),
|
|
445
|
+
next_cursor: types.nullable(types.string()),
|
|
446
|
+
has_more: types.boolean(),
|
|
379
447
|
}),
|
|
380
448
|
z.transform((v) => {
|
|
381
449
|
return remap$(v, {
|
|
450
|
+
"child_count": "childCount",
|
|
382
451
|
"next_cursor": "nextCursor",
|
|
383
452
|
"has_more": "hasMore",
|
|
384
453
|
});
|
|
@@ -396,23 +465,66 @@ export function dirFromJSON(
|
|
|
396
465
|
}
|
|
397
466
|
|
|
398
467
|
/** @internal */
|
|
399
|
-
export const
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
468
|
+
export const SymlinkBase64$inboundSchema: z.ZodMiniType<
|
|
469
|
+
SymlinkBase64,
|
|
470
|
+
unknown
|
|
471
|
+
> = z.pipe(
|
|
472
|
+
z.object({
|
|
473
|
+
type: types.literal("symlink"),
|
|
474
|
+
name: types.string(),
|
|
475
|
+
path: types.string(),
|
|
476
|
+
sha: types.string(),
|
|
477
|
+
size: types.number(),
|
|
478
|
+
encoding: types.literal("base64"),
|
|
479
|
+
content: types.string(),
|
|
480
|
+
executable: types.boolean(),
|
|
481
|
+
last_commit_at: types.nullable(types.date()),
|
|
482
|
+
}),
|
|
483
|
+
z.transform((v) => {
|
|
484
|
+
return remap$(v, {
|
|
485
|
+
"last_commit_at": "lastCommitAt",
|
|
486
|
+
});
|
|
487
|
+
}),
|
|
488
|
+
);
|
|
489
|
+
|
|
490
|
+
export function symlinkBase64FromJSON(
|
|
491
|
+
jsonString: string,
|
|
492
|
+
): SafeParseResult<SymlinkBase64, SDKValidationError> {
|
|
493
|
+
return safeParse(
|
|
494
|
+
jsonString,
|
|
495
|
+
(x) => SymlinkBase64$inboundSchema.parse(JSON.parse(x)),
|
|
496
|
+
`Failed to parse 'SymlinkBase64' from JSON`,
|
|
497
|
+
);
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
/** @internal */
|
|
501
|
+
export const FileBase64$inboundSchema: z.ZodMiniType<FileBase64, unknown> = z
|
|
502
|
+
.pipe(
|
|
503
|
+
z.object({
|
|
504
|
+
type: types.literal("file"),
|
|
505
|
+
name: types.string(),
|
|
506
|
+
path: types.string(),
|
|
507
|
+
sha: types.string(),
|
|
508
|
+
size: types.number(),
|
|
509
|
+
encoding: types.literal("base64"),
|
|
510
|
+
content: types.string(),
|
|
511
|
+
executable: types.boolean(),
|
|
512
|
+
last_commit_at: types.nullable(types.date()),
|
|
513
|
+
}),
|
|
514
|
+
z.transform((v) => {
|
|
515
|
+
return remap$(v, {
|
|
516
|
+
"last_commit_at": "lastCommitAt",
|
|
517
|
+
});
|
|
518
|
+
}),
|
|
519
|
+
);
|
|
408
520
|
|
|
409
|
-
export function
|
|
521
|
+
export function fileBase64FromJSON(
|
|
410
522
|
jsonString: string,
|
|
411
|
-
): SafeParseResult<
|
|
523
|
+
): SafeParseResult<FileBase64, SDKValidationError> {
|
|
412
524
|
return safeParse(
|
|
413
525
|
jsonString,
|
|
414
|
-
(x) =>
|
|
415
|
-
`Failed to parse '
|
|
526
|
+
(x) => FileBase64$inboundSchema.parse(JSON.parse(x)),
|
|
527
|
+
`Failed to parse 'FileBase64' from JSON`,
|
|
416
528
|
);
|
|
417
529
|
}
|
|
418
530
|
|
|
@@ -421,7 +533,8 @@ export const GetByOrgByRepoContentResponseBody$inboundSchema: z.ZodMiniType<
|
|
|
421
533
|
GetByOrgByRepoContentResponseBody,
|
|
422
534
|
unknown
|
|
423
535
|
> = discriminatedUnion("type", {
|
|
424
|
-
file: z.lazy(() =>
|
|
536
|
+
file: z.lazy(() => FileBase64$inboundSchema),
|
|
537
|
+
symlink: z.lazy(() => SymlinkBase64$inboundSchema),
|
|
425
538
|
dir: z.lazy(() => Dir$inboundSchema),
|
|
426
539
|
});
|
|
427
540
|
|
|
@@ -441,7 +554,8 @@ export const GetByOrgByRepoContentResponse$inboundSchema: z.ZodMiniType<
|
|
|
441
554
|
unknown
|
|
442
555
|
> = smartUnion([
|
|
443
556
|
discriminatedUnion("type", {
|
|
444
|
-
file: z.lazy(() =>
|
|
557
|
+
file: z.lazy(() => FileBase64$inboundSchema),
|
|
558
|
+
symlink: z.lazy(() => SymlinkBase64$inboundSchema),
|
|
445
559
|
dir: z.lazy(() => Dir$inboundSchema),
|
|
446
560
|
}),
|
|
447
561
|
z.custom<ReadableStream<Uint8Array>>(x => x instanceof ReadableStream),
|
|
@@ -69,6 +69,13 @@ export type StatusError = {
|
|
|
69
69
|
message: string;
|
|
70
70
|
};
|
|
71
71
|
|
|
72
|
+
/**
|
|
73
|
+
* A sync is currently in progress.
|
|
74
|
+
*/
|
|
75
|
+
export type StatusSyncing = {
|
|
76
|
+
type: "syncing";
|
|
77
|
+
};
|
|
78
|
+
|
|
72
79
|
/**
|
|
73
80
|
* The last sync was successful.
|
|
74
81
|
*/
|
|
@@ -81,6 +88,7 @@ export type StatusOk = {
|
|
|
81
88
|
*/
|
|
82
89
|
export type Status =
|
|
83
90
|
| StatusOk
|
|
91
|
+
| StatusSyncing
|
|
84
92
|
| StatusError
|
|
85
93
|
| discriminatedUnionTypes.Unknown<"type">;
|
|
86
94
|
|
|
@@ -99,7 +107,11 @@ export type GetByOrgByRepoSyncResponse = {
|
|
|
99
107
|
/**
|
|
100
108
|
* What the status of the last sync was.
|
|
101
109
|
*/
|
|
102
|
-
status:
|
|
110
|
+
status:
|
|
111
|
+
| StatusOk
|
|
112
|
+
| StatusSyncing
|
|
113
|
+
| StatusError
|
|
114
|
+
| discriminatedUnionTypes.Unknown<"type">;
|
|
103
115
|
};
|
|
104
116
|
|
|
105
117
|
/** @internal */
|
|
@@ -290,6 +302,24 @@ export function statusErrorFromJSON(
|
|
|
290
302
|
);
|
|
291
303
|
}
|
|
292
304
|
|
|
305
|
+
/** @internal */
|
|
306
|
+
export const StatusSyncing$inboundSchema: z.ZodMiniType<
|
|
307
|
+
StatusSyncing,
|
|
308
|
+
unknown
|
|
309
|
+
> = z.object({
|
|
310
|
+
type: types.literal("syncing"),
|
|
311
|
+
});
|
|
312
|
+
|
|
313
|
+
export function statusSyncingFromJSON(
|
|
314
|
+
jsonString: string,
|
|
315
|
+
): SafeParseResult<StatusSyncing, SDKValidationError> {
|
|
316
|
+
return safeParse(
|
|
317
|
+
jsonString,
|
|
318
|
+
(x) => StatusSyncing$inboundSchema.parse(JSON.parse(x)),
|
|
319
|
+
`Failed to parse 'StatusSyncing' from JSON`,
|
|
320
|
+
);
|
|
321
|
+
}
|
|
322
|
+
|
|
293
323
|
/** @internal */
|
|
294
324
|
export const StatusOk$inboundSchema: z.ZodMiniType<StatusOk, unknown> = z
|
|
295
325
|
.object({
|
|
@@ -310,6 +340,7 @@ export function statusOkFromJSON(
|
|
|
310
340
|
export const Status$inboundSchema: z.ZodMiniType<Status, unknown> =
|
|
311
341
|
discriminatedUnion("type", {
|
|
312
342
|
ok: z.lazy(() => StatusOk$inboundSchema),
|
|
343
|
+
syncing: z.lazy(() => StatusSyncing$inboundSchema),
|
|
313
344
|
error: z.lazy(() => StatusError$inboundSchema),
|
|
314
345
|
});
|
|
315
346
|
|
|
@@ -333,6 +364,7 @@ export const GetByOrgByRepoSyncResponse$inboundSchema: z.ZodMiniType<
|
|
|
333
364
|
last_sync_success: types.nullable(types.date()),
|
|
334
365
|
status: discriminatedUnion("type", {
|
|
335
366
|
ok: z.lazy(() => StatusOk$inboundSchema),
|
|
367
|
+
syncing: z.lazy(() => StatusSyncing$inboundSchema),
|
|
336
368
|
error: z.lazy(() => StatusError$inboundSchema),
|
|
337
369
|
}),
|
|
338
370
|
}),
|
|
@@ -104,6 +104,14 @@ export type GetByOrgReposUpstream = {
|
|
|
104
104
|
* Error message from the last failed sync attempt
|
|
105
105
|
*/
|
|
106
106
|
lastSyncError: string | null;
|
|
107
|
+
/**
|
|
108
|
+
* Whether this upstream has an authentication credential configured
|
|
109
|
+
*/
|
|
110
|
+
hasCredential: boolean;
|
|
111
|
+
/**
|
|
112
|
+
* The host the credential is scoped to (e.g. "github.com")
|
|
113
|
+
*/
|
|
114
|
+
credentialHost: string | null;
|
|
107
115
|
};
|
|
108
116
|
|
|
109
117
|
export type Repo = {
|
|
@@ -111,8 +119,8 @@ export type Repo = {
|
|
|
111
119
|
org: string;
|
|
112
120
|
name: string;
|
|
113
121
|
defaultBranch: string;
|
|
122
|
+
headSha: string | null;
|
|
114
123
|
sizeBytes: number;
|
|
115
|
-
lastPushAt: string | null;
|
|
116
124
|
createdAt: string;
|
|
117
125
|
/**
|
|
118
126
|
* Optionally add an upstream repository. You can configure automatic syncing from the upstream repository.
|
|
@@ -342,12 +350,16 @@ export const GetByOrgReposUpstream$inboundSchema: z.ZodMiniType<
|
|
|
342
350
|
last_sync_attempt: types.nullable(types.date()),
|
|
343
351
|
last_sync_success: types.nullable(types.date()),
|
|
344
352
|
last_sync_error: types.nullable(types.string()),
|
|
353
|
+
has_credential: types.boolean(),
|
|
354
|
+
credential_host: types.nullable(types.string()),
|
|
345
355
|
}),
|
|
346
356
|
z.transform((v) => {
|
|
347
357
|
return remap$(v, {
|
|
348
358
|
"last_sync_attempt": "lastSyncAttempt",
|
|
349
359
|
"last_sync_success": "lastSyncSuccess",
|
|
350
360
|
"last_sync_error": "lastSyncError",
|
|
361
|
+
"has_credential": "hasCredential",
|
|
362
|
+
"credential_host": "credentialHost",
|
|
351
363
|
});
|
|
352
364
|
}),
|
|
353
365
|
);
|
|
@@ -369,16 +381,16 @@ export const Repo$inboundSchema: z.ZodMiniType<Repo, unknown> = z.pipe(
|
|
|
369
381
|
org: types.string(),
|
|
370
382
|
name: types.string(),
|
|
371
383
|
default_branch: types.string(),
|
|
384
|
+
head_sha: types.nullable(types.string()),
|
|
372
385
|
size_bytes: types.number(),
|
|
373
|
-
last_push_at: types.nullable(types.string()),
|
|
374
386
|
created_at: types.string(),
|
|
375
387
|
upstream: types.nullable(z.lazy(() => GetByOrgReposUpstream$inboundSchema)),
|
|
376
388
|
}),
|
|
377
389
|
z.transform((v) => {
|
|
378
390
|
return remap$(v, {
|
|
379
391
|
"default_branch": "defaultBranch",
|
|
392
|
+
"head_sha": "headSha",
|
|
380
393
|
"size_bytes": "sizeBytes",
|
|
381
|
-
"last_push_at": "lastPushAt",
|
|
382
394
|
"created_at": "createdAt",
|
|
383
395
|
});
|
|
384
396
|
}),
|
|
@@ -24,6 +24,9 @@ export * from "./postbyorgapikeys.js";
|
|
|
24
24
|
export * from "./postbyorgbyrepoanalyticsrefresh.js";
|
|
25
25
|
export * from "./postbyorgbyrepobranches.js";
|
|
26
26
|
export * from "./postbyorgbyrepocommits.js";
|
|
27
|
+
export * from "./postbyorgbyrepolfsobjects.js";
|
|
28
|
+
export * from "./postbyorgbyrepolfsobjectsdownload.js";
|
|
29
|
+
export * from "./postbyorgbyrepomergebybase.js";
|
|
27
30
|
export * from "./postbyorgbyreposync.js";
|
|
28
31
|
export * from "./postbyorgbyrepowebhooks.js";
|
|
29
32
|
export * from "./postbyorgrepos.js";
|