@shivaedev/github 0.8.6 → 0.10.0
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/CHANGELOG.md +47 -0
- package/README.md +142 -8
- package/dist/GitHub.d.ts +360 -18
- package/dist/GitHub.d.ts.map +1 -1
- package/dist/GitHub.js +19 -6
- package/dist/GitHub.js.map +1 -1
- package/dist/GitHubToken.d.ts +2 -2
- package/dist/GitHubToken.d.ts.map +1 -1
- package/dist/GitHubToken.js +1 -1
- package/dist/GitHubToken.js.map +1 -1
- package/dist/adapters/resolveApiUrl.d.ts +2 -0
- package/dist/adapters/resolveApiUrl.d.ts.map +1 -0
- package/dist/adapters/resolveApiUrl.js +6 -0
- package/dist/adapters/resolveApiUrl.js.map +1 -0
- package/dist/adapters/zipEntries.d.ts +17 -0
- package/dist/adapters/zipEntries.d.ts.map +1 -0
- package/dist/adapters/zipEntries.js +57 -0
- package/dist/adapters/zipEntries.js.map +1 -0
- package/dist/appTokens.d.ts +6 -0
- package/dist/appTokens.d.ts.map +1 -0
- package/dist/appTokens.js +65 -0
- package/dist/appTokens.js.map +1 -0
- package/dist/artifactErrors.d.ts +34 -0
- package/dist/artifactErrors.d.ts.map +1 -0
- package/dist/artifactErrors.js +27 -0
- package/dist/artifactErrors.js.map +1 -0
- package/dist/artifactExtraction.d.ts +12 -0
- package/dist/artifactExtraction.d.ts.map +1 -0
- package/dist/artifactExtraction.js +40 -0
- package/dist/artifactExtraction.js.map +1 -0
- package/dist/artifactPaths.d.ts +4 -0
- package/dist/artifactPaths.d.ts.map +1 -0
- package/dist/artifactPaths.js +35 -0
- package/dist/artifactPaths.js.map +1 -0
- package/dist/artifacts.d.ts +13 -8
- package/dist/artifacts.d.ts.map +1 -1
- package/dist/artifacts.js +15 -8
- package/dist/artifacts.js.map +1 -1
- package/dist/authenticatedRequest.d.ts +1 -1
- package/dist/authenticatedRequest.d.ts.map +1 -1
- package/dist/authenticatedRequest.js +3 -2
- package/dist/authenticatedRequest.js.map +1 -1
- package/dist/cache.d.ts +2 -0
- package/dist/cache.d.ts.map +1 -1
- package/dist/cache.js +3 -0
- package/dist/cache.js.map +1 -1
- package/dist/checkRuns.d.ts +116 -11
- package/dist/checkRuns.d.ts.map +1 -1
- package/dist/checkRuns.js +41 -18
- package/dist/checkRuns.js.map +1 -1
- package/dist/gitSchemas.d.ts +195 -0
- package/dist/gitSchemas.d.ts.map +1 -0
- package/dist/gitSchemas.js +45 -0
- package/dist/gitSchemas.js.map +1 -0
- package/dist/githubApp.d.ts +2 -4
- package/dist/githubApp.d.ts.map +1 -1
- package/dist/githubApp.js +5 -55
- package/dist/githubApp.js.map +1 -1
- package/dist/installationClients.d.ts +461 -0
- package/dist/installationClients.d.ts.map +1 -0
- package/dist/installationClients.js +37 -0
- package/dist/installationClients.js.map +1 -0
- package/dist/json.d.ts.map +1 -1
- package/dist/json.js +4 -0
- package/dist/json.js.map +1 -1
- package/dist/pagedLists.d.ts +15 -0
- package/dist/pagedLists.d.ts.map +1 -0
- package/dist/pagedLists.js +16 -0
- package/dist/pagedLists.js.map +1 -0
- package/dist/repositoryReads.d.ts +261 -0
- package/dist/repositoryReads.d.ts.map +1 -0
- package/dist/repositoryReads.js +30 -0
- package/dist/repositoryReads.js.map +1 -0
- package/dist/repositorySchemas.d.ts +73 -0
- package/dist/repositorySchemas.d.ts.map +1 -0
- package/dist/repositorySchemas.js +38 -0
- package/dist/repositorySchemas.js.map +1 -0
- package/dist/representations.d.ts +4 -4
- package/dist/representations.d.ts.map +1 -1
- package/dist/representations.js +3 -2
- package/dist/representations.js.map +1 -1
- package/dist/requests.d.ts +2 -2
- package/dist/requests.d.ts.map +1 -1
- package/dist/requests.js +11 -9
- package/dist/requests.js.map +1 -1
- package/dist/status.d.ts +1 -1
- package/dist/status.d.ts.map +1 -1
- package/dist/stickyComments.d.ts +1 -1
- package/dist/viewerRepositoryAccess.d.ts +46 -0
- package/dist/viewerRepositoryAccess.d.ts.map +1 -0
- package/dist/viewerRepositoryAccess.js +54 -0
- package/dist/viewerRepositoryAccess.js.map +1 -0
- package/package.json +14 -7
- package/src/GitHub.ts +32 -11
- package/src/GitHubToken.ts +4 -2
- package/src/adapters/resolveApiUrl.ts +5 -0
- package/src/adapters/zipEntries.ts +69 -0
- package/src/appTokens.ts +93 -0
- package/src/artifactErrors.ts +26 -0
- package/src/artifactExtraction.ts +62 -0
- package/src/artifactPaths.ts +36 -0
- package/src/artifacts.ts +36 -39
- package/src/authenticatedRequest.ts +3 -1
- package/src/cache.ts +5 -0
- package/src/checkRuns.ts +58 -18
- package/src/gitSchemas.ts +52 -0
- package/src/githubApp.ts +6 -80
- package/src/installationClients.ts +50 -0
- package/src/json.ts +4 -0
- package/src/pagedLists.ts +40 -0
- package/src/repositoryReads.ts +61 -0
- package/src/repositorySchemas.ts +43 -0
- package/src/representations.ts +5 -4
- package/src/requests.ts +11 -9
- package/src/viewerRepositoryAccess.ts +66 -0
package/dist/GitHub.d.ts
CHANGED
|
@@ -1,20 +1,31 @@
|
|
|
1
1
|
import { Effect, Schema, Stream } from "effect";
|
|
2
2
|
import { HttpClient } from "effect/http";
|
|
3
3
|
import { GitHubToken } from "#GitHubToken.ts";
|
|
4
|
+
import { type ListOptions } from "#pagedLists.ts";
|
|
4
5
|
export declare const GitHub: import("effect/Context").Service<"@shivaedev/github/GitHub", Readonly<{
|
|
5
|
-
readonly downloadArtifactArchive: (options: import("#artifacts.ts").ArtifactArchiveOptions) => Effect.Effect<
|
|
6
|
+
readonly downloadArtifactArchive: (options: import("#artifacts.ts").ArtifactArchiveOptions) => Effect.Effect<import("./artifactExtraction.ts").ArtifactFile[], import("./errors.ts").GitHubAppError | import("./artifactErrors.ts").GitHubArtifactCompressionRatio | import("./artifactErrors.ts").GitHubArtifactDuplicateEntry | import("./errors.ts").GitHubArtifactError | import("./artifactErrors.ts").GitHubArtifactExtractedTooLarge | import("./artifactErrors.ts").GitHubArtifactExtractionError | import("./artifactErrors.ts").GitHubArtifactPathTraversal | import("./artifactErrors.ts").GitHubArtifactSymlink | import("./errors.ts").GitHubArtifactTooLarge | import("./errors.ts").GitHubConversationLocked | import("./errors.ts").GitHubPermissionDenied | import("./errors.ts").GitHubRateLimited | import("./errors.ts").GitHubTransportError | import("@shivaedev/http/errors.ts").InvalidBodyLimit | import("@shivaedev/http/errors.ts").RemoteHttpError | import("@shivaedev/http/errors.ts").RemoteRateLimited | import("@shivaedev/http/errors.ts").RemoteUnauthorized | import("@shivaedev/http/errors.ts").ResponseBodyTooLarge, never>;
|
|
6
7
|
readonly list: (path: string, beforeRequest?: ((resource: string) => Effect.Effect<void, import("@shivaedev/errors/taxonomy.ts").ServiceUnavailable>) | undefined, byteLimit?: number | undefined) => Effect.Effect<Stream.Stream<{
|
|
7
8
|
decode: <TSchema extends Schema.Constraint>(schema: TSchema) => Effect.Effect<TSchema["Type"], Schema.SchemaError, TSchema["DecodingServices"]>;
|
|
8
9
|
hasNext: boolean;
|
|
9
|
-
}, import("./errors.ts").GitHubAppError | import("./errors.ts").GitHubConversationLocked | import("./errors.ts").GitHubPermissionDenied | import("./errors.ts").GitHubRateLimited | import("./errors.ts").GitHubTransportError | import("effect/Cause").NoSuchElementError | import("@shivaedev/http/errors.ts").PaginationLinkError | import("@shivaedev/http/errors.ts").ResponseBodyTooLarge | import("@shivaedev/errors/taxonomy.ts").ServiceUnavailable | import("@shivaedev/http/errors.ts").RemoteStatusError, never>, never, never>;
|
|
10
|
+
}, import("./errors.ts").GitHubAppError | import("./errors.ts").GitHubConversationLocked | import("./errors.ts").GitHubPermissionDenied | import("./errors.ts").GitHubRateLimited | import("./errors.ts").GitHubTransportError | import("@shivaedev/http/errors.ts").InvalidBodyLimit | import("effect/Cause").NoSuchElementError | import("@shivaedev/http/errors.ts").PaginationLinkError | import("@shivaedev/http/errors.ts").ResponseBodyTooLarge | import("@shivaedev/errors/taxonomy.ts").ServiceUnavailable | import("@shivaedev/http/errors.ts").RemoteStatusError, never>, never, never>;
|
|
10
11
|
readonly read: (path: string, byteLimit?: number | undefined) => Effect.Effect<{
|
|
11
12
|
decode: <TSchema extends Schema.Constraint>(schema: TSchema) => Effect.Effect<TSchema["Type"], Schema.SchemaError, TSchema["DecodingServices"]>;
|
|
12
|
-
}, import("./errors.ts").GitHubAppError | import("./errors.ts").GitHubConversationLocked | import("./errors.ts").GitHubPermissionDenied | import("./errors.ts").GitHubRateLimited | import("./errors.ts").GitHubTransportError | import("@shivaedev/http/errors.ts").ResponseBodyTooLarge | import("@shivaedev/http/errors.ts").RemoteStatusError, never>;
|
|
13
|
-
readonly write: (method: "PATCH" | "POST", path: string, body
|
|
13
|
+
}, import("./errors.ts").GitHubAppError | import("./errors.ts").GitHubConversationLocked | import("./errors.ts").GitHubPermissionDenied | import("./errors.ts").GitHubRateLimited | import("./errors.ts").GitHubTransportError | import("@shivaedev/http/errors.ts").InvalidBodyLimit | import("@shivaedev/http/errors.ts").ResponseBodyTooLarge | import("@shivaedev/http/errors.ts").RemoteStatusError, never>;
|
|
14
|
+
readonly write: (method: "DELETE" | "PATCH" | "POST" | "PUT", path: string, body?: unknown, byteLimit?: number | undefined) => Effect.Effect<{
|
|
14
15
|
decode: <TSchema extends Schema.Constraint>(schema: TSchema) => Effect.Effect<TSchema["Type"], Schema.SchemaError, TSchema["DecodingServices"]>;
|
|
15
|
-
}, import("./errors.ts").GitHubAppError | import("./errors.ts").GitHubConversationLocked | import("./errors.ts").GitHubPermissionDenied | import("./errors.ts").GitHubRateLimited | import("./errors.ts").GitHubTransportError | import("effect/http/HttpBody").HttpBodyError | import("@shivaedev/http/errors.ts").ResponseBodyTooLarge | import("@shivaedev/http/errors.ts").RemoteStatusError, never>;
|
|
16
|
+
}, import("./errors.ts").GitHubAppError | import("./errors.ts").GitHubConversationLocked | import("./errors.ts").GitHubPermissionDenied | import("./errors.ts").GitHubRateLimited | import("./errors.ts").GitHubTransportError | import("effect/http/HttpBody").HttpBodyError | import("@shivaedev/http/errors.ts").InvalidBodyLimit | import("@shivaedev/http/errors.ts").ResponseBodyTooLarge | import("@shivaedev/http/errors.ts").RemoteStatusError, never>;
|
|
16
17
|
readonly createCheckRun: (owner: string, repo: string, input: {
|
|
18
|
+
readonly detailsUrl?: string | undefined;
|
|
19
|
+
readonly headSha: string;
|
|
20
|
+
readonly name: string;
|
|
21
|
+
readonly output?: {
|
|
22
|
+
readonly summary: string;
|
|
23
|
+
readonly text?: string | undefined;
|
|
24
|
+
readonly title: string;
|
|
25
|
+
} | undefined;
|
|
17
26
|
readonly conclusion?: "action_required" | "cancelled" | "failure" | "neutral" | "skipped" | "stale" | "success" | "timed_out" | undefined;
|
|
27
|
+
readonly status: "in_progress" | "queued";
|
|
28
|
+
} | {
|
|
18
29
|
readonly detailsUrl?: string | undefined;
|
|
19
30
|
readonly headSha: string;
|
|
20
31
|
readonly name: string;
|
|
@@ -23,8 +34,36 @@ export declare const GitHub: import("effect/Context").Service<"@shivaedev/github
|
|
|
23
34
|
readonly text?: string | undefined;
|
|
24
35
|
readonly title: string;
|
|
25
36
|
} | undefined;
|
|
26
|
-
readonly
|
|
37
|
+
readonly conclusion: "action_required" | "cancelled" | "failure" | "neutral" | "skipped" | "stale" | "success" | "timed_out";
|
|
38
|
+
readonly status: "completed";
|
|
27
39
|
}) => Effect.Effect<{
|
|
40
|
+
readonly app?: {
|
|
41
|
+
readonly id: number;
|
|
42
|
+
} | null | undefined;
|
|
43
|
+
readonly conclusion: "action_required" | "cancelled" | "failure" | "neutral" | "skipped" | "stale" | "success" | "timed_out" | null;
|
|
44
|
+
readonly detailsUrl: string | null;
|
|
45
|
+
readonly headSha: string;
|
|
46
|
+
readonly id: number;
|
|
47
|
+
readonly name: string;
|
|
48
|
+
readonly output: {
|
|
49
|
+
readonly summary: string | null;
|
|
50
|
+
readonly text: string | null;
|
|
51
|
+
readonly title: string | null;
|
|
52
|
+
};
|
|
53
|
+
readonly status: "completed" | "in_progress" | "pending" | "queued" | "requested" | "waiting";
|
|
54
|
+
}, import("./errors.ts").GitHubAppError | import("./errors.ts").GitHubConversationLocked | import("./errors.ts").GitHubPermissionDenied | import("./errors.ts").GitHubRateLimited | import("./errors.ts").GitHubTransportError | import("effect/http/HttpBody").HttpBodyError | import("@shivaedev/http/errors.ts").InvalidBodyLimit | import("@shivaedev/http/errors.ts").ResponseBodyTooLarge | Schema.SchemaError | import("@shivaedev/http/errors.ts").RemoteStatusError, never>;
|
|
55
|
+
readonly findLatestCheckRun: (owner: string, repo: string, input: {
|
|
56
|
+
readonly appId?: number | undefined;
|
|
57
|
+
readonly headSha: string;
|
|
58
|
+
readonly name: string;
|
|
59
|
+
} | {
|
|
60
|
+
readonly appId: number;
|
|
61
|
+
readonly headSha: string;
|
|
62
|
+
readonly name?: string | undefined;
|
|
63
|
+
}) => Effect.Effect<import("effect/Option").Option<{
|
|
64
|
+
readonly app?: {
|
|
65
|
+
readonly id: number;
|
|
66
|
+
} | null | undefined;
|
|
28
67
|
readonly conclusion: "action_required" | "cancelled" | "failure" | "neutral" | "skipped" | "stale" | "success" | "timed_out" | null;
|
|
29
68
|
readonly detailsUrl: string | null;
|
|
30
69
|
readonly headSha: string;
|
|
@@ -35,8 +74,8 @@ export declare const GitHub: import("effect/Context").Service<"@shivaedev/github
|
|
|
35
74
|
readonly text: string | null;
|
|
36
75
|
readonly title: string | null;
|
|
37
76
|
};
|
|
38
|
-
readonly status: "completed" | "in_progress" | "queued";
|
|
39
|
-
}
|
|
77
|
+
readonly status: "completed" | "in_progress" | "pending" | "queued" | "requested" | "waiting";
|
|
78
|
+
}>, import("./errors.ts").GitHubAppError | import("./errors.ts").GitHubConversationLocked | import("./errors.ts").GitHubPermissionDenied | import("./errors.ts").GitHubRateLimited | import("./errors.ts").GitHubTransportError | import("@shivaedev/http/errors.ts").InvalidBodyLimit | import("effect/Cause").NoSuchElementError | import("@shivaedev/http/errors.ts").PaginationLinkError | import("@shivaedev/http/errors.ts").ResponseBodyTooLarge | Schema.SchemaError | import("@shivaedev/errors/taxonomy.ts").ServiceUnavailable | import("@shivaedev/http/errors.ts").RemoteStatusError, never>;
|
|
40
79
|
readonly updateCheckRun: (owner: string, repo: string, id: number, input: {
|
|
41
80
|
readonly detailsUrl?: string | undefined;
|
|
42
81
|
readonly output?: {
|
|
@@ -55,6 +94,47 @@ export declare const GitHub: import("effect/Context").Service<"@shivaedev/github
|
|
|
55
94
|
} | undefined;
|
|
56
95
|
readonly status: "completed";
|
|
57
96
|
}) => Effect.Effect<{
|
|
97
|
+
readonly app?: {
|
|
98
|
+
readonly id: number;
|
|
99
|
+
} | null | undefined;
|
|
100
|
+
readonly conclusion: "action_required" | "cancelled" | "failure" | "neutral" | "skipped" | "stale" | "success" | "timed_out" | null;
|
|
101
|
+
readonly detailsUrl: string | null;
|
|
102
|
+
readonly headSha: string;
|
|
103
|
+
readonly id: number;
|
|
104
|
+
readonly name: string;
|
|
105
|
+
readonly output: {
|
|
106
|
+
readonly summary: string | null;
|
|
107
|
+
readonly text: string | null;
|
|
108
|
+
readonly title: string | null;
|
|
109
|
+
};
|
|
110
|
+
readonly status: "completed" | "in_progress" | "pending" | "queued" | "requested" | "waiting";
|
|
111
|
+
}, import("./errors.ts").GitHubAppError | import("./errors.ts").GitHubConversationLocked | import("./errors.ts").GitHubPermissionDenied | import("./errors.ts").GitHubRateLimited | import("./errors.ts").GitHubTransportError | import("effect/http/HttpBody").HttpBodyError | import("@shivaedev/http/errors.ts").InvalidBodyLimit | import("@shivaedev/http/errors.ts").ResponseBodyTooLarge | Schema.SchemaError | import("@shivaedev/http/errors.ts").RemoteStatusError, never>;
|
|
112
|
+
readonly upsertCheckRun: (owner: string, repo: string, input: {
|
|
113
|
+
readonly detailsUrl?: string | undefined;
|
|
114
|
+
readonly headSha: string;
|
|
115
|
+
readonly name: string;
|
|
116
|
+
readonly output?: {
|
|
117
|
+
readonly summary: string;
|
|
118
|
+
readonly text?: string | undefined;
|
|
119
|
+
readonly title: string;
|
|
120
|
+
} | undefined;
|
|
121
|
+
readonly conclusion?: "action_required" | "cancelled" | "failure" | "neutral" | "skipped" | "stale" | "success" | "timed_out" | undefined;
|
|
122
|
+
readonly status: "in_progress" | "queued";
|
|
123
|
+
} | {
|
|
124
|
+
readonly detailsUrl?: string | undefined;
|
|
125
|
+
readonly headSha: string;
|
|
126
|
+
readonly name: string;
|
|
127
|
+
readonly output?: {
|
|
128
|
+
readonly summary: string;
|
|
129
|
+
readonly text?: string | undefined;
|
|
130
|
+
readonly title: string;
|
|
131
|
+
} | undefined;
|
|
132
|
+
readonly conclusion: "action_required" | "cancelled" | "failure" | "neutral" | "skipped" | "stale" | "success" | "timed_out";
|
|
133
|
+
readonly status: "completed";
|
|
134
|
+
}, appId?: number | undefined) => Effect.Effect<{
|
|
135
|
+
readonly app?: {
|
|
136
|
+
readonly id: number;
|
|
137
|
+
} | null | undefined;
|
|
58
138
|
readonly conclusion: "action_required" | "cancelled" | "failure" | "neutral" | "skipped" | "stale" | "success" | "timed_out" | null;
|
|
59
139
|
readonly detailsUrl: string | null;
|
|
60
140
|
readonly headSha: string;
|
|
@@ -65,8 +145,260 @@ export declare const GitHub: import("effect/Context").Service<"@shivaedev/github
|
|
|
65
145
|
readonly text: string | null;
|
|
66
146
|
readonly title: string | null;
|
|
67
147
|
};
|
|
68
|
-
readonly status: "completed" | "in_progress" | "queued";
|
|
69
|
-
}, import("./errors.ts").GitHubAppError | import("./errors.ts").GitHubConversationLocked | import("./errors.ts").GitHubPermissionDenied | import("./errors.ts").GitHubRateLimited | import("./errors.ts").GitHubTransportError | import("effect/http/HttpBody").HttpBodyError | import("@shivaedev/http/errors.ts").ResponseBodyTooLarge | Schema.SchemaError | import("@shivaedev/http/errors.ts").RemoteStatusError, never>;
|
|
148
|
+
readonly status: "completed" | "in_progress" | "pending" | "queued" | "requested" | "waiting";
|
|
149
|
+
}, import("./errors.ts").GitHubAppError | import("./errors.ts").GitHubConversationLocked | import("./errors.ts").GitHubPermissionDenied | import("./errors.ts").GitHubRateLimited | import("./errors.ts").GitHubTransportError | import("effect/http/HttpBody").HttpBodyError | import("@shivaedev/http/errors.ts").InvalidBodyLimit | import("effect/Cause").NoSuchElementError | import("@shivaedev/http/errors.ts").PaginationLinkError | import("@shivaedev/http/errors.ts").ResponseBodyTooLarge | Schema.SchemaError | import("@shivaedev/errors/taxonomy.ts").ServiceUnavailable | import("@shivaedev/http/errors.ts").RemoteStatusError, never>;
|
|
150
|
+
readonly compareCommits: (owner: string, repo: string, base: string, head: string, byteLimit?: number | undefined) => Effect.Effect<{
|
|
151
|
+
readonly aheadBy: number;
|
|
152
|
+
readonly behindBy: number;
|
|
153
|
+
readonly commits: readonly {
|
|
154
|
+
readonly author: {
|
|
155
|
+
readonly avatarUrl: string;
|
|
156
|
+
readonly htmlUrl: string;
|
|
157
|
+
readonly id: number;
|
|
158
|
+
readonly login: string;
|
|
159
|
+
readonly type: string;
|
|
160
|
+
} | null;
|
|
161
|
+
readonly commit: {
|
|
162
|
+
readonly author: {
|
|
163
|
+
readonly date: string;
|
|
164
|
+
readonly email: string;
|
|
165
|
+
readonly name: string;
|
|
166
|
+
} | null;
|
|
167
|
+
readonly committer: {
|
|
168
|
+
readonly date: string;
|
|
169
|
+
readonly email: string;
|
|
170
|
+
readonly name: string;
|
|
171
|
+
} | null;
|
|
172
|
+
readonly message: string;
|
|
173
|
+
readonly tree: {
|
|
174
|
+
readonly sha: string;
|
|
175
|
+
readonly url: string;
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
readonly committer: {
|
|
179
|
+
readonly avatarUrl: string;
|
|
180
|
+
readonly htmlUrl: string;
|
|
181
|
+
readonly id: number;
|
|
182
|
+
readonly login: string;
|
|
183
|
+
readonly type: string;
|
|
184
|
+
} | null;
|
|
185
|
+
readonly htmlUrl: string;
|
|
186
|
+
readonly parents: readonly {
|
|
187
|
+
readonly sha: string;
|
|
188
|
+
readonly url: string;
|
|
189
|
+
}[];
|
|
190
|
+
readonly sha: string;
|
|
191
|
+
}[];
|
|
192
|
+
readonly files?: readonly {
|
|
193
|
+
readonly additions: number;
|
|
194
|
+
readonly changes: number;
|
|
195
|
+
readonly deletions: number;
|
|
196
|
+
readonly filename: string;
|
|
197
|
+
readonly patch?: string | undefined;
|
|
198
|
+
readonly previousFilename?: string | undefined;
|
|
199
|
+
readonly sha: string;
|
|
200
|
+
readonly status: string;
|
|
201
|
+
}[] | undefined;
|
|
202
|
+
readonly status: "ahead" | "behind" | "diverged" | "identical";
|
|
203
|
+
readonly totalCommits: number;
|
|
204
|
+
}, import("./errors.ts").GitHubAppError | import("./errors.ts").GitHubConversationLocked | import("./errors.ts").GitHubPermissionDenied | import("./errors.ts").GitHubRateLimited | import("./errors.ts").GitHubTransportError | import("@shivaedev/http/errors.ts").InvalidBodyLimit | import("@shivaedev/http/errors.ts").ResponseBodyTooLarge | Schema.SchemaError | import("@shivaedev/http/errors.ts").RemoteStatusError, never>;
|
|
205
|
+
readonly getCollaboratorPermission: (owner: string, repo: string, username: string, byteLimit?: number | undefined) => Effect.Effect<{
|
|
206
|
+
readonly permission: string;
|
|
207
|
+
readonly roleName: string;
|
|
208
|
+
readonly user: {
|
|
209
|
+
readonly avatarUrl: string;
|
|
210
|
+
readonly htmlUrl: string;
|
|
211
|
+
readonly id: number;
|
|
212
|
+
readonly login: string;
|
|
213
|
+
readonly type: string;
|
|
214
|
+
};
|
|
215
|
+
}, import("./errors.ts").GitHubAppError | import("./errors.ts").GitHubConversationLocked | import("./errors.ts").GitHubPermissionDenied | import("./errors.ts").GitHubRateLimited | import("./errors.ts").GitHubTransportError | import("@shivaedev/http/errors.ts").InvalidBodyLimit | import("@shivaedev/http/errors.ts").ResponseBodyTooLarge | Schema.SchemaError | import("@shivaedev/http/errors.ts").RemoteStatusError, never>;
|
|
216
|
+
readonly getCommit: (owner: string, repo: string, ref: string, byteLimit?: number | undefined) => Effect.Effect<{
|
|
217
|
+
readonly author: {
|
|
218
|
+
readonly avatarUrl: string;
|
|
219
|
+
readonly htmlUrl: string;
|
|
220
|
+
readonly id: number;
|
|
221
|
+
readonly login: string;
|
|
222
|
+
readonly type: string;
|
|
223
|
+
} | null;
|
|
224
|
+
readonly commit: {
|
|
225
|
+
readonly author: {
|
|
226
|
+
readonly date: string;
|
|
227
|
+
readonly email: string;
|
|
228
|
+
readonly name: string;
|
|
229
|
+
} | null;
|
|
230
|
+
readonly committer: {
|
|
231
|
+
readonly date: string;
|
|
232
|
+
readonly email: string;
|
|
233
|
+
readonly name: string;
|
|
234
|
+
} | null;
|
|
235
|
+
readonly message: string;
|
|
236
|
+
readonly tree: {
|
|
237
|
+
readonly sha: string;
|
|
238
|
+
readonly url: string;
|
|
239
|
+
};
|
|
240
|
+
};
|
|
241
|
+
readonly committer: {
|
|
242
|
+
readonly avatarUrl: string;
|
|
243
|
+
readonly htmlUrl: string;
|
|
244
|
+
readonly id: number;
|
|
245
|
+
readonly login: string;
|
|
246
|
+
readonly type: string;
|
|
247
|
+
} | null;
|
|
248
|
+
readonly htmlUrl: string;
|
|
249
|
+
readonly parents: readonly {
|
|
250
|
+
readonly sha: string;
|
|
251
|
+
readonly url: string;
|
|
252
|
+
}[];
|
|
253
|
+
readonly sha: string;
|
|
254
|
+
readonly files?: readonly {
|
|
255
|
+
readonly additions: number;
|
|
256
|
+
readonly changes: number;
|
|
257
|
+
readonly deletions: number;
|
|
258
|
+
readonly filename: string;
|
|
259
|
+
readonly patch?: string | undefined;
|
|
260
|
+
readonly previousFilename?: string | undefined;
|
|
261
|
+
readonly sha: string;
|
|
262
|
+
readonly status: string;
|
|
263
|
+
}[] | undefined;
|
|
264
|
+
readonly stats: {
|
|
265
|
+
readonly additions: number;
|
|
266
|
+
readonly deletions: number;
|
|
267
|
+
readonly total: number;
|
|
268
|
+
};
|
|
269
|
+
}, import("./errors.ts").GitHubAppError | import("./errors.ts").GitHubConversationLocked | import("./errors.ts").GitHubPermissionDenied | import("./errors.ts").GitHubRateLimited | import("./errors.ts").GitHubTransportError | import("@shivaedev/http/errors.ts").InvalidBodyLimit | import("@shivaedev/http/errors.ts").ResponseBodyTooLarge | Schema.SchemaError | import("@shivaedev/http/errors.ts").RemoteStatusError, never>;
|
|
270
|
+
readonly getIssue: (owner: string, repo: string, number: number, byteLimit?: number | undefined) => Effect.Effect<{
|
|
271
|
+
readonly body: string | null;
|
|
272
|
+
readonly closedAt: string | null;
|
|
273
|
+
readonly createdAt: string;
|
|
274
|
+
readonly htmlUrl: string;
|
|
275
|
+
readonly id: number;
|
|
276
|
+
readonly labels: readonly (string | {
|
|
277
|
+
readonly name?: string | undefined;
|
|
278
|
+
})[];
|
|
279
|
+
readonly number: number;
|
|
280
|
+
readonly pullRequest?: {
|
|
281
|
+
readonly url: string;
|
|
282
|
+
} | undefined;
|
|
283
|
+
readonly state: "closed" | "open";
|
|
284
|
+
readonly title: string;
|
|
285
|
+
readonly updatedAt: string;
|
|
286
|
+
readonly user: {
|
|
287
|
+
readonly avatarUrl: string;
|
|
288
|
+
readonly htmlUrl: string;
|
|
289
|
+
readonly id: number;
|
|
290
|
+
readonly login: string;
|
|
291
|
+
readonly type: string;
|
|
292
|
+
} | null;
|
|
293
|
+
}, import("./errors.ts").GitHubAppError | import("./errors.ts").GitHubConversationLocked | import("./errors.ts").GitHubPermissionDenied | import("./errors.ts").GitHubRateLimited | import("./errors.ts").GitHubTransportError | import("@shivaedev/http/errors.ts").InvalidBodyLimit | import("@shivaedev/http/errors.ts").ResponseBodyTooLarge | Schema.SchemaError | import("@shivaedev/http/errors.ts").RemoteStatusError, never>;
|
|
294
|
+
readonly getTree: (owner: string, repo: string, sha: string, options?: {
|
|
295
|
+
readonly recursive?: boolean;
|
|
296
|
+
readonly responseByteLimit?: number | undefined;
|
|
297
|
+
} | undefined) => Effect.Effect<{
|
|
298
|
+
readonly sha: string;
|
|
299
|
+
readonly tree: readonly {
|
|
300
|
+
readonly mode: string;
|
|
301
|
+
readonly path: string;
|
|
302
|
+
readonly sha: string;
|
|
303
|
+
readonly size?: number | undefined;
|
|
304
|
+
readonly type: "blob" | "commit" | "tree";
|
|
305
|
+
readonly url?: string | undefined;
|
|
306
|
+
}[];
|
|
307
|
+
readonly truncated: boolean;
|
|
308
|
+
readonly url: string;
|
|
309
|
+
}, import("./errors.ts").GitHubAppError | import("./errors.ts").GitHubConversationLocked | import("./errors.ts").GitHubPermissionDenied | import("./errors.ts").GitHubRateLimited | import("./errors.ts").GitHubTransportError | import("@shivaedev/http/errors.ts").InvalidBodyLimit | import("@shivaedev/http/errors.ts").ResponseBodyTooLarge | Schema.SchemaError | import("@shivaedev/http/errors.ts").RemoteStatusError, never>;
|
|
310
|
+
readonly getUser: (username?: string | undefined, byteLimit?: number | undefined) => Effect.Effect<{
|
|
311
|
+
readonly avatarUrl: string;
|
|
312
|
+
readonly htmlUrl: string;
|
|
313
|
+
readonly id: number;
|
|
314
|
+
readonly login: string;
|
|
315
|
+
readonly type: string;
|
|
316
|
+
}, import("./errors.ts").GitHubAppError | import("./errors.ts").GitHubConversationLocked | import("./errors.ts").GitHubPermissionDenied | import("./errors.ts").GitHubRateLimited | import("./errors.ts").GitHubTransportError | import("@shivaedev/http/errors.ts").InvalidBodyLimit | import("@shivaedev/http/errors.ts").ResponseBodyTooLarge | Schema.SchemaError | import("@shivaedev/http/errors.ts").RemoteStatusError, never>;
|
|
317
|
+
readonly listCommits: (owner: string, repo: string, options?: import("#repositoryReads.ts").RepositoryListOptions | undefined) => Effect.Effect<Stream.Stream<{
|
|
318
|
+
hasNext: boolean;
|
|
319
|
+
items: {
|
|
320
|
+
readonly author: {
|
|
321
|
+
readonly avatarUrl: string;
|
|
322
|
+
readonly htmlUrl: string;
|
|
323
|
+
readonly id: number;
|
|
324
|
+
readonly login: string;
|
|
325
|
+
readonly type: string;
|
|
326
|
+
} | null;
|
|
327
|
+
readonly commit: {
|
|
328
|
+
readonly author: {
|
|
329
|
+
readonly date: string;
|
|
330
|
+
readonly email: string;
|
|
331
|
+
readonly name: string;
|
|
332
|
+
} | null;
|
|
333
|
+
readonly committer: {
|
|
334
|
+
readonly date: string;
|
|
335
|
+
readonly email: string;
|
|
336
|
+
readonly name: string;
|
|
337
|
+
} | null;
|
|
338
|
+
readonly message: string;
|
|
339
|
+
readonly tree: {
|
|
340
|
+
readonly sha: string;
|
|
341
|
+
readonly url: string;
|
|
342
|
+
};
|
|
343
|
+
};
|
|
344
|
+
readonly committer: {
|
|
345
|
+
readonly avatarUrl: string;
|
|
346
|
+
readonly htmlUrl: string;
|
|
347
|
+
readonly id: number;
|
|
348
|
+
readonly login: string;
|
|
349
|
+
readonly type: string;
|
|
350
|
+
} | null;
|
|
351
|
+
readonly htmlUrl: string;
|
|
352
|
+
readonly parents: readonly {
|
|
353
|
+
readonly sha: string;
|
|
354
|
+
readonly url: string;
|
|
355
|
+
}[];
|
|
356
|
+
readonly sha: string;
|
|
357
|
+
}[];
|
|
358
|
+
skipped: number;
|
|
359
|
+
}, import("./errors.ts").GitHubAppError | import("./errors.ts").GitHubConversationLocked | import("./errors.ts").GitHubPermissionDenied | import("./errors.ts").GitHubRateLimited | import("./errors.ts").GitHubTransportError | import("@shivaedev/http/errors.ts").InvalidBodyLimit | import("effect/Cause").NoSuchElementError | import("@shivaedev/http/errors.ts").PaginationLinkError | import("@shivaedev/http/errors.ts").ResponseBodyTooLarge | Schema.SchemaError | import("@shivaedev/errors/taxonomy.ts").ServiceUnavailable | import("@shivaedev/http/errors.ts").RemoteStatusError, never>, never, never>;
|
|
360
|
+
readonly listIssues: (owner: string, repo: string, options?: import("#repositoryReads.ts").RepositoryListOptions | undefined) => Effect.Effect<Stream.Stream<{
|
|
361
|
+
hasNext: boolean;
|
|
362
|
+
items: {
|
|
363
|
+
readonly body: string | null;
|
|
364
|
+
readonly closedAt: string | null;
|
|
365
|
+
readonly createdAt: string;
|
|
366
|
+
readonly htmlUrl: string;
|
|
367
|
+
readonly id: number;
|
|
368
|
+
readonly labels: readonly (string | {
|
|
369
|
+
readonly name?: string | undefined;
|
|
370
|
+
})[];
|
|
371
|
+
readonly number: number;
|
|
372
|
+
readonly pullRequest?: {
|
|
373
|
+
readonly url: string;
|
|
374
|
+
} | undefined;
|
|
375
|
+
readonly state: "closed" | "open";
|
|
376
|
+
readonly title: string;
|
|
377
|
+
readonly updatedAt: string;
|
|
378
|
+
readonly user: {
|
|
379
|
+
readonly avatarUrl: string;
|
|
380
|
+
readonly htmlUrl: string;
|
|
381
|
+
readonly id: number;
|
|
382
|
+
readonly login: string;
|
|
383
|
+
readonly type: string;
|
|
384
|
+
} | null;
|
|
385
|
+
}[];
|
|
386
|
+
skipped: number;
|
|
387
|
+
}, import("./errors.ts").GitHubAppError | import("./errors.ts").GitHubConversationLocked | import("./errors.ts").GitHubPermissionDenied | import("./errors.ts").GitHubRateLimited | import("./errors.ts").GitHubTransportError | import("@shivaedev/http/errors.ts").InvalidBodyLimit | import("effect/Cause").NoSuchElementError | import("@shivaedev/http/errors.ts").PaginationLinkError | import("@shivaedev/http/errors.ts").ResponseBodyTooLarge | Schema.SchemaError | import("@shivaedev/errors/taxonomy.ts").ServiceUnavailable | import("@shivaedev/http/errors.ts").RemoteStatusError, never>, never, never>;
|
|
388
|
+
readonly listPullRequestFiles: (owner: string, repo: string, number: number, options?: import("#repositoryReads.ts").RepositoryListOptions | undefined) => Effect.Effect<Stream.Stream<{
|
|
389
|
+
hasNext: boolean;
|
|
390
|
+
items: {
|
|
391
|
+
readonly additions: number;
|
|
392
|
+
readonly changes: number;
|
|
393
|
+
readonly deletions: number;
|
|
394
|
+
readonly filename: string;
|
|
395
|
+
readonly patch?: string | undefined;
|
|
396
|
+
readonly previousFilename?: string | undefined;
|
|
397
|
+
readonly sha: string;
|
|
398
|
+
readonly status: string;
|
|
399
|
+
}[];
|
|
400
|
+
skipped: number;
|
|
401
|
+
}, import("./errors.ts").GitHubAppError | import("./errors.ts").GitHubConversationLocked | import("./errors.ts").GitHubPermissionDenied | import("./errors.ts").GitHubRateLimited | import("./errors.ts").GitHubTransportError | import("@shivaedev/http/errors.ts").InvalidBodyLimit | import("effect/Cause").NoSuchElementError | import("@shivaedev/http/errors.ts").PaginationLinkError | import("@shivaedev/http/errors.ts").ResponseBodyTooLarge | Schema.SchemaError | import("@shivaedev/errors/taxonomy.ts").ServiceUnavailable | import("@shivaedev/http/errors.ts").RemoteStatusError, never>, never, never>;
|
|
70
402
|
readonly upsertStickyComment: (input: {
|
|
71
403
|
readonly appId?: number | undefined;
|
|
72
404
|
readonly author?: string | undefined;
|
|
@@ -85,19 +417,29 @@ export declare const GitHub: import("effect/Context").Service<"@shivaedev/github
|
|
|
85
417
|
readonly login: string;
|
|
86
418
|
readonly type?: string | undefined;
|
|
87
419
|
} | null;
|
|
88
|
-
}, import("./errors.ts").GitHubAppError | import("./errors.ts").GitHubConversationLocked | import("./errors.ts").GitHubPermissionDenied | import("./errors.ts").GitHubRateLimited | import("./errors.ts").GitHubTransportError | import("effect/http/HttpBody").HttpBodyError | import("effect/Cause").NoSuchElementError | import("@shivaedev/http/errors.ts").PaginationLinkError | import("@shivaedev/http/errors.ts").ResponseBodyTooLarge | Schema.SchemaError | import("@shivaedev/errors/taxonomy.ts").ServiceUnavailable | import("@shivaedev/http/errors.ts").RemoteStatusError, never>;
|
|
89
|
-
readonly bytes: (path: string, accept: string, limit: number) => Effect.Effect<Uint8Array<ArrayBufferLike>, import("./errors.ts").GitHubAppError | import("./errors.ts").GitHubConversationLocked | import("./errors.ts").GitHubPermissionDenied | import("./errors.ts").GitHubRateLimited | import("./errors.ts").GitHubTransportError | import("@shivaedev/http/errors.ts").ResponseBodyTooLarge | import("@shivaedev/http/errors.ts").RemoteStatusError, never>;
|
|
420
|
+
}, import("./errors.ts").GitHubAppError | import("./errors.ts").GitHubConversationLocked | import("./errors.ts").GitHubPermissionDenied | import("./errors.ts").GitHubRateLimited | import("./errors.ts").GitHubTransportError | import("effect/http/HttpBody").HttpBodyError | import("@shivaedev/http/errors.ts").InvalidBodyLimit | import("effect/Cause").NoSuchElementError | import("@shivaedev/http/errors.ts").PaginationLinkError | import("@shivaedev/http/errors.ts").ResponseBodyTooLarge | Schema.SchemaError | import("@shivaedev/errors/taxonomy.ts").ServiceUnavailable | import("@shivaedev/http/errors.ts").RemoteStatusError, never>;
|
|
421
|
+
readonly bytes: (path: string, accept: string, limit: number) => Effect.Effect<Uint8Array<ArrayBufferLike>, import("./errors.ts").GitHubAppError | import("./errors.ts").GitHubConversationLocked | import("./errors.ts").GitHubPermissionDenied | import("./errors.ts").GitHubRateLimited | import("./errors.ts").GitHubTransportError | import("@shivaedev/http/errors.ts").InvalidBodyLimit | import("@shivaedev/http/errors.ts").ResponseBodyTooLarge | import("@shivaedev/http/errors.ts").RemoteStatusError, never>;
|
|
90
422
|
readonly observations: () => Effect.Effect<import("#rateLimits.ts").RateLimitObservation[], never, never>;
|
|
91
423
|
readonly resource: (path: string) => Effect.Effect<string, never, never>;
|
|
92
|
-
readonly text: (path: string, accept: string, limit: number) => Effect.Effect<string, import("./errors.ts").GitHubAppError | import("./errors.ts").GitHubConversationLocked | import("./errors.ts").GitHubPermissionDenied | import("./errors.ts").GitHubRateLimited | import("./errors.ts").GitHubTransportError | import("@shivaedev/http/errors.ts").ResponseBodyTooLarge | import("@shivaedev/http/errors.ts").RemoteStatusError, never>;
|
|
424
|
+
readonly text: (path: string, accept: string, limit: number) => Effect.Effect<string, import("./errors.ts").GitHubAppError | import("./errors.ts").GitHubConversationLocked | import("./errors.ts").GitHubPermissionDenied | import("./errors.ts").GitHubRateLimited | import("./errors.ts").GitHubTransportError | import("@shivaedev/http/errors.ts").InvalidBodyLimit | import("@shivaedev/http/errors.ts").ResponseBodyTooLarge | import("@shivaedev/http/errors.ts").RemoteStatusError, never>;
|
|
93
425
|
}>> & {
|
|
94
426
|
readonly layer: import("effect/Layer").Layer<"@shivaedev/github/GitHub", never, GitHubToken | HttpClient.HttpClient>;
|
|
95
427
|
};
|
|
96
|
-
export declare function read<TSchema extends Schema.Constraint>(path: string, schema: TSchema, responseByteLimit?: number): Effect.Effect<TSchema["Type"], import("./errors.ts").GitHubAppError | import("./errors.ts").GitHubConversationLocked | import("./errors.ts").GitHubPermissionDenied | import("./errors.ts").GitHubRateLimited | import("./errors.ts").GitHubTransportError | import("@shivaedev/http/errors.ts").ResponseBodyTooLarge | Schema.SchemaError | import("@shivaedev/http/errors.ts").RemoteStatusError, "@shivaedev/github/GitHub" | TSchema["DecodingServices"]>;
|
|
97
|
-
export declare function
|
|
98
|
-
|
|
428
|
+
export declare function read<TSchema extends Schema.Constraint>(path: string, schema: TSchema, responseByteLimit?: number): Effect.Effect<TSchema["Type"], import("./errors.ts").GitHubAppError | import("./errors.ts").GitHubConversationLocked | import("./errors.ts").GitHubPermissionDenied | import("./errors.ts").GitHubRateLimited | import("./errors.ts").GitHubTransportError | import("@shivaedev/http/errors.ts").InvalidBodyLimit | import("@shivaedev/http/errors.ts").ResponseBodyTooLarge | Schema.SchemaError | import("@shivaedev/http/errors.ts").RemoteStatusError, "@shivaedev/github/GitHub" | TSchema["DecodingServices"]>;
|
|
429
|
+
export declare function listPages<TSchema extends Schema.Constraint>(path: string, schema: TSchema, options?: ListOptions | number): Stream.Stream<{
|
|
430
|
+
hasNext: boolean;
|
|
431
|
+
items: TSchema["Type"][];
|
|
432
|
+
skipped: number;
|
|
433
|
+
}, import("./errors.ts").GitHubAppError | import("./errors.ts").GitHubConversationLocked | import("./errors.ts").GitHubPermissionDenied | import("./errors.ts").GitHubRateLimited | import("./errors.ts").GitHubTransportError | import("@shivaedev/http/errors.ts").InvalidBodyLimit | import("effect/Cause").NoSuchElementError | import("@shivaedev/http/errors.ts").PaginationLinkError | import("@shivaedev/http/errors.ts").ResponseBodyTooLarge | Schema.SchemaError | import("@shivaedev/errors/taxonomy.ts").ServiceUnavailable | import("@shivaedev/http/errors.ts").RemoteStatusError, "@shivaedev/github/GitHub" | TSchema["DecodingServices"]>;
|
|
434
|
+
export declare function list<TSchema extends Schema.Constraint>(path: string, schema: TSchema, options?: ListOptions | number): Stream.Stream<TSchema["Type"], import("./errors.ts").GitHubAppError | import("./errors.ts").GitHubConversationLocked | import("./errors.ts").GitHubPermissionDenied | import("./errors.ts").GitHubRateLimited | import("./errors.ts").GitHubTransportError | import("@shivaedev/http/errors.ts").InvalidBodyLimit | import("effect/Cause").NoSuchElementError | import("@shivaedev/http/errors.ts").PaginationLinkError | import("@shivaedev/http/errors.ts").ResponseBodyTooLarge | Schema.SchemaError | import("@shivaedev/errors/taxonomy.ts").ServiceUnavailable | import("@shivaedev/http/errors.ts").RemoteStatusError, "@shivaedev/github/GitHub" | TSchema["DecodingServices"]>;
|
|
435
|
+
export declare function listBounded<TSchema extends Schema.Constraint>(path: string, schema: TSchema, pageCap: number, options?: ListOptions | number): Effect.Effect<{
|
|
99
436
|
items: TSchema["Type"][];
|
|
437
|
+
skipped: number;
|
|
100
438
|
truncated: boolean;
|
|
101
|
-
}, import("./errors.ts").GitHubAppError | import("./errors.ts").GitHubConversationLocked | import("./errors.ts").GitHubPermissionDenied | import("./errors.ts").GitHubRateLimited | import("./errors.ts").GitHubTransportError | import("effect/Cause").NoSuchElementError | import("@shivaedev/http/errors.ts").PaginationLinkError | import("@shivaedev/http/errors.ts").ResponseBodyTooLarge | Schema.SchemaError | import("@shivaedev/errors/taxonomy.ts").ServiceUnavailable | import("@shivaedev/http/errors.ts").RemoteStatusError, "@shivaedev/github/GitHub" | TSchema["DecodingServices"]>;
|
|
102
|
-
|
|
439
|
+
}, import("./errors.ts").GitHubAppError | import("./errors.ts").GitHubConversationLocked | import("./errors.ts").GitHubPermissionDenied | import("./errors.ts").GitHubRateLimited | import("./errors.ts").GitHubTransportError | import("@shivaedev/http/errors.ts").InvalidBodyLimit | import("effect/Cause").NoSuchElementError | import("@shivaedev/http/errors.ts").PaginationLinkError | import("@shivaedev/http/errors.ts").ResponseBodyTooLarge | Schema.SchemaError | import("@shivaedev/errors/taxonomy.ts").ServiceUnavailable | import("@shivaedev/http/errors.ts").RemoteStatusError, "@shivaedev/github/GitHub" | TSchema["DecodingServices"]>;
|
|
440
|
+
type WriteMethod = "POST" | "PATCH" | "PUT" | "DELETE";
|
|
441
|
+
export declare function write<TSchema extends Schema.Constraint>(method: WriteMethod, path: string, body: unknown, schema: TSchema, responseByteLimit?: number): ReturnType<typeof writeDecoded<TSchema>>;
|
|
442
|
+
export declare function write(method: WriteMethod, path: string, body?: unknown): ReturnType<typeof writeDecoded<typeof Schema.Void>>;
|
|
443
|
+
declare function writeDecoded<TSchema extends Schema.Constraint>(method: WriteMethod, path: string, body: unknown, schema: TSchema, responseByteLimit?: number): Effect.Effect<TSchema["Type"], import("./errors.ts").GitHubAppError | import("./errors.ts").GitHubConversationLocked | import("./errors.ts").GitHubPermissionDenied | import("./errors.ts").GitHubRateLimited | import("./errors.ts").GitHubTransportError | import("effect/http/HttpBody").HttpBodyError | import("@shivaedev/http/errors.ts").InvalidBodyLimit | import("@shivaedev/http/errors.ts").ResponseBodyTooLarge | Schema.SchemaError | import("@shivaedev/http/errors.ts").RemoteStatusError, "@shivaedev/github/GitHub" | TSchema["DecodingServices"]>;
|
|
444
|
+
export {};
|
|
103
445
|
//# sourceMappingURL=GitHub.d.ts.map
|
package/dist/GitHub.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GitHub.d.ts","sourceRoot":"","sources":["../src/GitHub.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAKzC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"GitHub.d.ts","sourceRoot":"","sources":["../src/GitHub.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAKzC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAgB,KAAK,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WAAW,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;AAEvD,wBAAgB,KAAK,CAAC,OAAO,SAAS,MAAM,CAAC,UAAU,EACtD,MAAM,EAAE,WAAW,EACnB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,OAAO,EACb,MAAM,EAAE,OAAO,EACf,iBAAiB,CAAC,EAAE,MAAM,GACxB,UAAU,CAAC,OAAO,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC;AAC5C,wBAAgB,KAAK,CAAC,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;AAK9H,iBAAS,YAAY,CAAC,OAAO,SAAS,MAAM,CAAC,UAAU,EACtD,MAAM,EAAE,WAAW,EACnB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,OAAO,EACb,MAAM,EAAE,OAAO,EACf,iBAAiB,CAAC,EAAE,MAAM,uiBAK1B"}
|
package/dist/GitHub.js
CHANGED
|
@@ -5,7 +5,9 @@ import { artifacts } from "#artifacts.ts";
|
|
|
5
5
|
import { checkRuns } from "#checkRuns.ts";
|
|
6
6
|
import { GitHubConfig } from "#GitHubConfig.ts";
|
|
7
7
|
import { GitHubToken } from "#GitHubToken.ts";
|
|
8
|
+
import { decodedPages } from "#pagedLists.ts";
|
|
8
9
|
import { rateLimits } from "#rateLimits.ts";
|
|
10
|
+
import { repositoryReads } from "#repositoryReads.ts";
|
|
9
11
|
import { representations } from "#representations.ts";
|
|
10
12
|
import { requests } from "#requests.ts";
|
|
11
13
|
import { stickyComments } from "#stickyComments.ts";
|
|
@@ -20,7 +22,7 @@ export const GitHub = defineService({
|
|
|
20
22
|
const refresh = yield* TokenRefresh;
|
|
21
23
|
return {
|
|
22
24
|
apiUrl: config.apiUrl,
|
|
23
|
-
archive: artifacts(config.apiUrl,
|
|
25
|
+
archive: yield* artifacts(config.apiUrl, rates),
|
|
24
26
|
rates,
|
|
25
27
|
request: requests(client, token, rates, refresh),
|
|
26
28
|
responseByteLimit: config.responseByteLimit,
|
|
@@ -34,6 +36,7 @@ export const GitHub = defineService({
|
|
|
34
36
|
...archive,
|
|
35
37
|
...stickyComments(client),
|
|
36
38
|
...checkRuns(client),
|
|
39
|
+
...repositoryReads(client),
|
|
37
40
|
observations: () => Effect.sync(() => [...rates.observations.values()]),
|
|
38
41
|
resource: (path) => Effect.sync(() => rates.resource(new URL(path, apiUrl).pathname)),
|
|
39
42
|
text: (path, accept, limit) => Effect.map(request(get(path, accept), limit), (entry) => new TextDecoder().decode(entry.bytes)),
|
|
@@ -44,13 +47,23 @@ export const GitHub = defineService({
|
|
|
44
47
|
export function read(path, schema, responseByteLimit) {
|
|
45
48
|
return Effect.flatMap(GitHub, (github) => Effect.flatMap(github.read(path, responseByteLimit), (response) => response.decode(schema)));
|
|
46
49
|
}
|
|
47
|
-
export function
|
|
48
|
-
return Stream.unwrap(Effect.
|
|
50
|
+
export function listPages(path, schema, options) {
|
|
51
|
+
return Stream.unwrap(Effect.map(GitHub, (github) => decodedPages(github, path, schema, options)));
|
|
49
52
|
}
|
|
50
|
-
export function
|
|
51
|
-
return
|
|
53
|
+
export function list(path, schema, options) {
|
|
54
|
+
return listPages(path, schema, options).pipe(Stream.flatMap((page) => Stream.fromIterable(page.items)));
|
|
52
55
|
}
|
|
53
|
-
export function
|
|
56
|
+
export function listBounded(path, schema, pageCap, options) {
|
|
57
|
+
return listPages(path, schema, options).pipe(Stream.take(pageCap), Stream.runCollect, Effect.map((pages) => ({
|
|
58
|
+
items: pages.flatMap((page) => page.items),
|
|
59
|
+
skipped: pages.reduce((count, page) => count + page.skipped, 0),
|
|
60
|
+
truncated: pages.at(-1)?.hasNext ?? false,
|
|
61
|
+
})));
|
|
62
|
+
}
|
|
63
|
+
export function write(method, path, body, schema = Schema.Void, responseByteLimit) {
|
|
64
|
+
return writeDecoded(method, path, body, schema, responseByteLimit);
|
|
65
|
+
}
|
|
66
|
+
function writeDecoded(method, path, body, schema, responseByteLimit) {
|
|
54
67
|
return Effect.flatMap(GitHub, (github) => Effect.flatMap(github.write(method, path, body, responseByteLimit), (response) => response.decode(schema)));
|
|
55
68
|
}
|
|
56
69
|
//# sourceMappingURL=GitHub.js.map
|
package/dist/GitHub.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GitHub.js","sourceRoot":"","sources":["../src/GitHub.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,MAAM,CAAC,MAAM,MAAM,GAAG,aAAa,CAAC;IACnC,EAAE,EAAE,0BAA0B;IAC9B,UAAU,EAAE,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;QAC/B,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,YAAY,CAAC;QACnC,MAAM,KAAK,GAAG,UAAU,EAAE,CAAC;QAC3B,MAAM,MAAM,GAAG,KAA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CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,iBAAiB,CAAC,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAC1G,CAAC;AACH,CAAC"}
|
package/dist/GitHubToken.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Config, Context, Effect, Layer, Option, Redacted } from "effect";
|
|
2
2
|
import { ChildProcessSpawner } from "effect/process";
|
|
3
|
-
import { type GitHubAppError, GitHubTokenError } from "
|
|
3
|
+
import { type GitHubAppError, type GitHubRateLimited, GitHubTokenError } from "#errors.ts";
|
|
4
4
|
type Token = Option.Option<Redacted.Redacted<string>>;
|
|
5
|
-
declare const GitHubToken_base: Context.ServiceClass<GitHubToken, "@shivaedev/github/GitHubToken", Effect.Effect<Token, GitHubAppError, never> | Token>;
|
|
5
|
+
declare const GitHubToken_base: Context.ServiceClass<GitHubToken, "@shivaedev/github/GitHubToken", Effect.Effect<Token, GitHubAppError | GitHubRateLimited, never> | Token>;
|
|
6
6
|
export declare class GitHubToken extends GitHubToken_base {
|
|
7
7
|
static readonly fromEnv: Layer.Layer<GitHubToken, Config.ConfigError, never>;
|
|
8
8
|
static readonly fromEnvOrCli: Layer.Layer<GitHubToken, GitHubTokenError, ChildProcessSpawner.ChildProcessSpawner>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GitHubToken.d.ts","sourceRoot":"","sources":["../src/GitHubToken.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAU,MAAM,QAAQ,CAAC;AAClF,OAAO,EAAgB,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACnE,OAAO,EAAE,KAAK,cAAc,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"GitHubToken.d.ts","sourceRoot":"","sources":["../src/GitHubToken.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAU,MAAM,QAAQ,CAAC;AAClF,OAAO,EAAgB,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACnE,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE3F,KAAK,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;;AAMtD,qBAAa,WAAY,SAAQ,gBAEhC;IACA,MAAM,CAAC,QAAQ,CAAC,OAAO,sDAA+C;IAEtE,MAAM,CAAC,QAAQ,CAAC,YAAY,sFAmB1B;CACF"}
|
package/dist/GitHubToken.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Config, Context, Effect, Layer, Option, Redacted, Stream } from "effect";
|
|
2
2
|
import { ChildProcess, ChildProcessSpawner } from "effect/process";
|
|
3
|
-
import { GitHubTokenError } from "
|
|
3
|
+
import { GitHubTokenError } from "#errors.ts";
|
|
4
4
|
const environmentToken = Config.Redacted("GH_TOKEN").pipe(Config.orElse(() => Config.Redacted("GITHUB_TOKEN")), Config.option);
|
|
5
5
|
export class GitHubToken extends Context.Service()("@shivaedev/github/GitHubToken") {
|
|
6
6
|
static fromEnv = Layer.effect(GitHubToken)(environmentToken);
|
package/dist/GitHubToken.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GitHubToken.js","sourceRoot":"","sources":["../src/GitHubToken.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAClF,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAA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,EAAE,IAAI,EAAE,MAAM,UAIzD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveApiUrl.js","sourceRoot":"","sources":["../../src/adapters/resolveApiUrl.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,aAAa,CAAC,MAAc,EAAE,IAAY;IACzD,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC;IAC7B,IAAI,CAAC,QAAQ,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,CAAC;IACxD,OAAO,IAAI,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC;AAC3D,CAAC"}
|