@singi-labs/sifa-sdk 0.12.25 → 0.12.28
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/dist/{index-M_BYlvDY.d.ts → index-B6GHpvcg.d.ts} +25 -2
- package/dist/{index-Bz0xL4us.d.cts → index-ZXWW6RsR.d.cts} +1 -1
- package/dist/{index-4SE7Z9SK.d.cts → index-ipyzSVry.d.cts} +25 -2
- package/dist/{index-BpEeBgRr.d.ts → index-wMuFhu7d.d.ts} +1 -1
- package/dist/index.cjs +44 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +44 -5
- package/dist/index.js.map +1 -1
- package/dist/{org-CQMDMN58.d.ts → org-CLRdUB1W.d.ts} +56 -1
- package/dist/{org-DVIvsT_0.d.cts → org-Dme1VvNa.d.cts} +56 -1
- package/dist/query/fetchers/index.cjs +41 -0
- package/dist/query/fetchers/index.cjs.map +1 -1
- package/dist/query/fetchers/index.d.cts +2 -2
- package/dist/query/fetchers/index.d.ts +2 -2
- package/dist/query/fetchers/index.js +41 -1
- package/dist/query/fetchers/index.js.map +1 -1
- package/dist/query/hooks/index.cjs +51 -0
- package/dist/query/hooks/index.cjs.map +1 -1
- package/dist/query/hooks/index.d.cts +2 -2
- package/dist/query/hooks/index.d.ts +2 -2
- package/dist/query/hooks/index.js +51 -1
- package/dist/query/hooks/index.js.map +1 -1
- package/dist/query/index.cjs +50 -0
- package/dist/query/index.cjs.map +1 -1
- package/dist/query/index.d.cts +4 -4
- package/dist/query/index.d.ts +4 -4
- package/dist/query/index.js +49 -1
- package/dist/query/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { E as ExternalAccount, S as SkillSuggestion, a as ActivityLabel } from './adult-content-DdY7S5nN.js';
|
|
2
2
|
import { F as FollowFeedPage, a as FollowProfileItem, b as FeatureAllowlistEntry, c as FeatureFlag } from './feed-D2ZV8Eaj.js';
|
|
3
|
+
import { z } from 'zod';
|
|
3
4
|
import { f as OrgNotificationEmailRequestInput, b as OrgDomainChallengeRequestInput, O as OrgClaimRequestInput, h as OrgProfileUpdateRequestInput, d as OrgDomainVerifyRequestInput } from './org-settings-CmaSX5ZI.js';
|
|
4
5
|
|
|
5
6
|
/**
|
|
@@ -895,6 +896,50 @@ interface FetchActivityFeedOptions extends ApiFetchOptions {
|
|
|
895
896
|
*/
|
|
896
897
|
declare function fetchActivityFeed(config: SifaApiConfig, handleOrDid: string, options?: FetchActivityFeedOptions): Promise<ActivityFeedResponse | null>;
|
|
897
898
|
|
|
899
|
+
/**
|
|
900
|
+
* A single merged pull request ingested from GitHub, as served by sifa-api's
|
|
901
|
+
* `GET /api/me/github/pull-requests`. Mirrors the `github_contributions` row.
|
|
902
|
+
*/
|
|
903
|
+
declare const GithubPullRequestSchema: z.ZodObject<{
|
|
904
|
+
prNumber: z.ZodNumber;
|
|
905
|
+
repoOwner: z.ZodString;
|
|
906
|
+
repoName: z.ZodString;
|
|
907
|
+
title: z.ZodString;
|
|
908
|
+
url: z.ZodString;
|
|
909
|
+
language: z.ZodNullable<z.ZodString>;
|
|
910
|
+
additions: z.ZodNumber;
|
|
911
|
+
deletions: z.ZodNumber;
|
|
912
|
+
mergedAt: z.ZodString;
|
|
913
|
+
}, z.core.$strip>;
|
|
914
|
+
type GithubPullRequest = z.infer<typeof GithubPullRequestSchema>;
|
|
915
|
+
declare const MyGithubPullRequestsResponseSchema: z.ZodObject<{
|
|
916
|
+
items: z.ZodArray<z.ZodObject<{
|
|
917
|
+
prNumber: z.ZodNumber;
|
|
918
|
+
repoOwner: z.ZodString;
|
|
919
|
+
repoName: z.ZodString;
|
|
920
|
+
title: z.ZodString;
|
|
921
|
+
url: z.ZodString;
|
|
922
|
+
language: z.ZodNullable<z.ZodString>;
|
|
923
|
+
additions: z.ZodNumber;
|
|
924
|
+
deletions: z.ZodNumber;
|
|
925
|
+
mergedAt: z.ZodString;
|
|
926
|
+
}, z.core.$strip>>;
|
|
927
|
+
hasMore: z.ZodBoolean;
|
|
928
|
+
}, z.core.$strip>;
|
|
929
|
+
type MyGithubPullRequestsResponse = z.infer<typeof MyGithubPullRequestsResponseSchema>;
|
|
930
|
+
interface FetchMyGithubPullRequestsOptions extends ApiFetchOptions {
|
|
931
|
+
limit?: number;
|
|
932
|
+
offset?: number;
|
|
933
|
+
/** Forwarded as the `cookie` header for server-side (SSR) calls. */
|
|
934
|
+
cookieHeader?: string;
|
|
935
|
+
}
|
|
936
|
+
/**
|
|
937
|
+
* Fetch the authenticated viewer's own ingested merged PRs (newest first).
|
|
938
|
+
* Auth-scoped: relies on the session cookie (`credentials: 'include'`), so it
|
|
939
|
+
* returns the caller's PRs, not a public handle's. Backs the GitHub importer.
|
|
940
|
+
*/
|
|
941
|
+
declare function fetchMyGithubPullRequests(config: SifaApiConfig, options?: FetchMyGithubPullRequestsOptions): Promise<MyGithubPullRequestsResponse>;
|
|
942
|
+
|
|
898
943
|
/** Per-URI reaction state for the authenticated viewer. */
|
|
899
944
|
interface ReactionStatus {
|
|
900
945
|
reacted: boolean;
|
|
@@ -1160,6 +1205,16 @@ declare const sifaQueryKeys: {
|
|
|
1160
1205
|
readonly teaser: (handleOrDid: string) => readonly ["sifa", "activity", "teaser", string];
|
|
1161
1206
|
readonly feed: (handleOrDid: string, opts: Record<string, unknown>) => readonly ["sifa", "activity", "feed", string, Record<string, unknown>];
|
|
1162
1207
|
};
|
|
1208
|
+
readonly github: {
|
|
1209
|
+
readonly all: () => readonly ["sifa", "github"];
|
|
1210
|
+
readonly myPullRequests: (opts: {
|
|
1211
|
+
limit?: number;
|
|
1212
|
+
offset?: number;
|
|
1213
|
+
}) => readonly ["sifa", "github", "my-pull-requests", {
|
|
1214
|
+
limit?: number;
|
|
1215
|
+
offset?: number;
|
|
1216
|
+
}];
|
|
1217
|
+
};
|
|
1163
1218
|
readonly endorsement: {
|
|
1164
1219
|
readonly all: () => readonly ["sifa", "endorsement"];
|
|
1165
1220
|
readonly count: (did: string) => readonly ["sifa", "endorsement", "count", string];
|
|
@@ -1270,4 +1325,4 @@ declare function addOrgNotificationEmail(config: SifaApiConfig, body: OrgNotific
|
|
|
1270
1325
|
*/
|
|
1271
1326
|
declare function removeOrgNotificationEmail(config: SifaApiConfig, body: OrgNotificationEmailRequestInput, options?: Omit<ApiFetchOptions, 'method' | 'body'>): Promise<WriteResult & Partial<OrgNotificationEmailRemoveResult>>;
|
|
1272
1327
|
|
|
1273
|
-
export { type
|
|
1328
|
+
export { type OrgNotificationEmailRemoveResult as $, type ApiFetchOptions as A, type BulkHideProfileItemInput as B, type CastRoadmapVoteResult as C, type DeleteAccountResult as D, type EndorsementInput as E, type FeatureAllowlistResponse as F, type FollowProfilePageResponse as G, type FollowUserResult as H, type FollowingResponse as I, type GithubPullRequest as J, HIDDEN_ITEM_SOURCES as K, HIDDEN_ITEM_TYPES as L, type HeatmapDay as M, type HeatmapResponse as N, type HiddenApp as O, type HiddenItemSource as P, type HiddenItemType as Q, type HideProfileItemInput as R, type SifaApiConfig as S, type ListFeatureAllowlistOptions as T, type MyGithubPullRequestsResponse as U, type OrgClaimBinding as V, type WriteResult as W, type OrgClaimResult as X, type OrgDomainChallengeResult as Y, type OrgDomainVerifyResult as Z, type OrgNotificationEmailAddResult as _, type AccountCheckResult as a, fetchHeatmapData as a$, type OrgProfileEcho as a0, type OrgProfileUpdateResult as a1, type PdsWipeOutcome as a2, type ProfileIndustryInput as a3, type ProfileLocationAddress as a4, type ProfileLocationInput as a5, type ProfileSearchResult as a6, type ProfileSelfLocation as a7, QUOTED_POSTS_BATCH_MAX as a8, type QuotedPostAuthor as a9, addFeatureAllowlist as aA, addOrgNotificationEmail as aB, apiFetch as aC, apiFetchOrNull as aD, apiWrite as aE, apiWriteCreate as aF, bulkHideProfileItems as aG, bulkHideStandardPublications as aH, bulkUnhideProfileItems as aI, bulkUnhideStandardPublications as aJ, castRoadmapVote as aK, checkAppAccount as aL, createEndorsement as aM, createExternalAccount as aN, createProfileLocation as aO, createReaction as aP, deleteAccount as aQ, deleteAvatarOverride as aR, deleteExternalAccount as aS, deleteProfileLocation as aT, deleteReaction as aU, fetchActivityFeed as aV, fetchActivityTeaser as aW, fetchAppsRegistry as aX, fetchExternalAccounts as aY, fetchFeaturedProfile as aZ, fetchFollowing as a_, type QuotedPostImage as aa, type QuotedPostResult as ab, type QuotedPostView as ac, type ReactionError as ad, type ReactionResult as ae, type ReactionStatus as af, type RefreshOrcidPublicationsResult as ag, type RefreshPdsResult as ah, type ResetProfileResult as ai, type ResolveQuotedPostsOptions as aj, type RoadmapVoteError as ak, type RoadmapVoteResult as al, type RoadmapVoter as am, type RoadmapVotesResponse as an, type SearchFilters as ao, type SearchResponse as ap, type SifaQueryKey as aq, type SimilarProfile as ar, type SkillSearchResult as as, type StatsResponse as at, type SuggestionProfile as au, type SuggestionsResponse as av, type UpdateProfileOverrideInput as aw, type UpdateProfileSelfInput as ax, type UploadAvatarResult as ay, type VerifyExternalAccountResult as az, type ActivityFeedResponse as b, fetchHiddenApps as b0, fetchMyGithubPullRequests as b1, fetchMyRoadmapVotes as b2, fetchReactionStatus as b3, fetchRoadmapVotes as b4, fetchSearchFilters as b5, fetchSearchProfiles as b6, fetchSimilarProfiles as b7, fetchSkillSuggestions as b8, fetchStats as b9, unhideProfileItem as bA, unhideSifaPublication as bB, unhideStandardPublication as bC, unsetExternalAccountPrimary as bD, updateExternalAccount as bE, updateOrgProfile as bF, updateProfileLocation as bG, updateProfileOverride as bH, updateProfileSelf as bI, uploadAvatar as bJ, verifyExternalAccount as bK, verifyOrgDomain as bL, fetchSuggestionCount as ba, fetchSuggestions as bb, followUser as bc, getBlueskySuggestions as bd, getFollowers as be, getFollowing as bf, getFollowingFeed as bg, getMutuals as bh, hideOrcidPublication as bi, hideProfileItem as bj, hideSifaPublication as bk, hideStandardPublication as bl, listFeatureAllowlist as bm, refreshOrcidPublications as bn, refreshPds as bo, removeFeatureAllowlist as bp, removeOrgNotificationEmail as bq, requestOrgDomainChallenge as br, resetProfile as bs, resolveQuotedPosts as bt, retractRoadmapVote as bu, searchSkills as bv, setExternalAccountPrimary as bw, submitOrgClaim as bx, unfollowUser as by, unhideOrcidPublication as bz, type ActivityItem as c, type ActivityItemLinkHealth as d, type ActivityTeaserResponse as e, ApiError as f, type AppRegistryEntry as g, type CheckAppAccountOptions as h, type CreateExternalAccountResult as i, type CreateResult as j, type ExternalAccountInput as k, type FeaturedProfile as l, type FetchActivityFeedOptions as m, type FetchActivityTeaserOptions as n, type FetchFollowListOptions as o, type FetchFollowProfilePageOptions as p, type FetchFollowingFeedOptions as q, type FetchHiddenAppsOptions as r, sifaQueryKeys as s, type FetchMyGithubPullRequestsOptions as t, type FetchMyRoadmapVotesOptions as u, type FetchReactionStatusOptions as v, type FetchSuggestionsOptions as w, type FilterOptions as x, type FollowListPage as y, type FollowProfile as z };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { E as ExternalAccount, S as SkillSuggestion, a as ActivityLabel } from './adult-content-DdY7S5nN.cjs';
|
|
2
2
|
import { F as FollowFeedPage, a as FollowProfileItem, b as FeatureAllowlistEntry, c as FeatureFlag } from './feed-D2ZV8Eaj.cjs';
|
|
3
|
+
import { z } from 'zod';
|
|
3
4
|
import { f as OrgNotificationEmailRequestInput, b as OrgDomainChallengeRequestInput, O as OrgClaimRequestInput, h as OrgProfileUpdateRequestInput, d as OrgDomainVerifyRequestInput } from './org-settings-CmaSX5ZI.cjs';
|
|
4
5
|
|
|
5
6
|
/**
|
|
@@ -895,6 +896,50 @@ interface FetchActivityFeedOptions extends ApiFetchOptions {
|
|
|
895
896
|
*/
|
|
896
897
|
declare function fetchActivityFeed(config: SifaApiConfig, handleOrDid: string, options?: FetchActivityFeedOptions): Promise<ActivityFeedResponse | null>;
|
|
897
898
|
|
|
899
|
+
/**
|
|
900
|
+
* A single merged pull request ingested from GitHub, as served by sifa-api's
|
|
901
|
+
* `GET /api/me/github/pull-requests`. Mirrors the `github_contributions` row.
|
|
902
|
+
*/
|
|
903
|
+
declare const GithubPullRequestSchema: z.ZodObject<{
|
|
904
|
+
prNumber: z.ZodNumber;
|
|
905
|
+
repoOwner: z.ZodString;
|
|
906
|
+
repoName: z.ZodString;
|
|
907
|
+
title: z.ZodString;
|
|
908
|
+
url: z.ZodString;
|
|
909
|
+
language: z.ZodNullable<z.ZodString>;
|
|
910
|
+
additions: z.ZodNumber;
|
|
911
|
+
deletions: z.ZodNumber;
|
|
912
|
+
mergedAt: z.ZodString;
|
|
913
|
+
}, z.core.$strip>;
|
|
914
|
+
type GithubPullRequest = z.infer<typeof GithubPullRequestSchema>;
|
|
915
|
+
declare const MyGithubPullRequestsResponseSchema: z.ZodObject<{
|
|
916
|
+
items: z.ZodArray<z.ZodObject<{
|
|
917
|
+
prNumber: z.ZodNumber;
|
|
918
|
+
repoOwner: z.ZodString;
|
|
919
|
+
repoName: z.ZodString;
|
|
920
|
+
title: z.ZodString;
|
|
921
|
+
url: z.ZodString;
|
|
922
|
+
language: z.ZodNullable<z.ZodString>;
|
|
923
|
+
additions: z.ZodNumber;
|
|
924
|
+
deletions: z.ZodNumber;
|
|
925
|
+
mergedAt: z.ZodString;
|
|
926
|
+
}, z.core.$strip>>;
|
|
927
|
+
hasMore: z.ZodBoolean;
|
|
928
|
+
}, z.core.$strip>;
|
|
929
|
+
type MyGithubPullRequestsResponse = z.infer<typeof MyGithubPullRequestsResponseSchema>;
|
|
930
|
+
interface FetchMyGithubPullRequestsOptions extends ApiFetchOptions {
|
|
931
|
+
limit?: number;
|
|
932
|
+
offset?: number;
|
|
933
|
+
/** Forwarded as the `cookie` header for server-side (SSR) calls. */
|
|
934
|
+
cookieHeader?: string;
|
|
935
|
+
}
|
|
936
|
+
/**
|
|
937
|
+
* Fetch the authenticated viewer's own ingested merged PRs (newest first).
|
|
938
|
+
* Auth-scoped: relies on the session cookie (`credentials: 'include'`), so it
|
|
939
|
+
* returns the caller's PRs, not a public handle's. Backs the GitHub importer.
|
|
940
|
+
*/
|
|
941
|
+
declare function fetchMyGithubPullRequests(config: SifaApiConfig, options?: FetchMyGithubPullRequestsOptions): Promise<MyGithubPullRequestsResponse>;
|
|
942
|
+
|
|
898
943
|
/** Per-URI reaction state for the authenticated viewer. */
|
|
899
944
|
interface ReactionStatus {
|
|
900
945
|
reacted: boolean;
|
|
@@ -1160,6 +1205,16 @@ declare const sifaQueryKeys: {
|
|
|
1160
1205
|
readonly teaser: (handleOrDid: string) => readonly ["sifa", "activity", "teaser", string];
|
|
1161
1206
|
readonly feed: (handleOrDid: string, opts: Record<string, unknown>) => readonly ["sifa", "activity", "feed", string, Record<string, unknown>];
|
|
1162
1207
|
};
|
|
1208
|
+
readonly github: {
|
|
1209
|
+
readonly all: () => readonly ["sifa", "github"];
|
|
1210
|
+
readonly myPullRequests: (opts: {
|
|
1211
|
+
limit?: number;
|
|
1212
|
+
offset?: number;
|
|
1213
|
+
}) => readonly ["sifa", "github", "my-pull-requests", {
|
|
1214
|
+
limit?: number;
|
|
1215
|
+
offset?: number;
|
|
1216
|
+
}];
|
|
1217
|
+
};
|
|
1163
1218
|
readonly endorsement: {
|
|
1164
1219
|
readonly all: () => readonly ["sifa", "endorsement"];
|
|
1165
1220
|
readonly count: (did: string) => readonly ["sifa", "endorsement", "count", string];
|
|
@@ -1270,4 +1325,4 @@ declare function addOrgNotificationEmail(config: SifaApiConfig, body: OrgNotific
|
|
|
1270
1325
|
*/
|
|
1271
1326
|
declare function removeOrgNotificationEmail(config: SifaApiConfig, body: OrgNotificationEmailRequestInput, options?: Omit<ApiFetchOptions, 'method' | 'body'>): Promise<WriteResult & Partial<OrgNotificationEmailRemoveResult>>;
|
|
1272
1327
|
|
|
1273
|
-
export { type
|
|
1328
|
+
export { type OrgNotificationEmailRemoveResult as $, type ApiFetchOptions as A, type BulkHideProfileItemInput as B, type CastRoadmapVoteResult as C, type DeleteAccountResult as D, type EndorsementInput as E, type FeatureAllowlistResponse as F, type FollowProfilePageResponse as G, type FollowUserResult as H, type FollowingResponse as I, type GithubPullRequest as J, HIDDEN_ITEM_SOURCES as K, HIDDEN_ITEM_TYPES as L, type HeatmapDay as M, type HeatmapResponse as N, type HiddenApp as O, type HiddenItemSource as P, type HiddenItemType as Q, type HideProfileItemInput as R, type SifaApiConfig as S, type ListFeatureAllowlistOptions as T, type MyGithubPullRequestsResponse as U, type OrgClaimBinding as V, type WriteResult as W, type OrgClaimResult as X, type OrgDomainChallengeResult as Y, type OrgDomainVerifyResult as Z, type OrgNotificationEmailAddResult as _, type AccountCheckResult as a, fetchHeatmapData as a$, type OrgProfileEcho as a0, type OrgProfileUpdateResult as a1, type PdsWipeOutcome as a2, type ProfileIndustryInput as a3, type ProfileLocationAddress as a4, type ProfileLocationInput as a5, type ProfileSearchResult as a6, type ProfileSelfLocation as a7, QUOTED_POSTS_BATCH_MAX as a8, type QuotedPostAuthor as a9, addFeatureAllowlist as aA, addOrgNotificationEmail as aB, apiFetch as aC, apiFetchOrNull as aD, apiWrite as aE, apiWriteCreate as aF, bulkHideProfileItems as aG, bulkHideStandardPublications as aH, bulkUnhideProfileItems as aI, bulkUnhideStandardPublications as aJ, castRoadmapVote as aK, checkAppAccount as aL, createEndorsement as aM, createExternalAccount as aN, createProfileLocation as aO, createReaction as aP, deleteAccount as aQ, deleteAvatarOverride as aR, deleteExternalAccount as aS, deleteProfileLocation as aT, deleteReaction as aU, fetchActivityFeed as aV, fetchActivityTeaser as aW, fetchAppsRegistry as aX, fetchExternalAccounts as aY, fetchFeaturedProfile as aZ, fetchFollowing as a_, type QuotedPostImage as aa, type QuotedPostResult as ab, type QuotedPostView as ac, type ReactionError as ad, type ReactionResult as ae, type ReactionStatus as af, type RefreshOrcidPublicationsResult as ag, type RefreshPdsResult as ah, type ResetProfileResult as ai, type ResolveQuotedPostsOptions as aj, type RoadmapVoteError as ak, type RoadmapVoteResult as al, type RoadmapVoter as am, type RoadmapVotesResponse as an, type SearchFilters as ao, type SearchResponse as ap, type SifaQueryKey as aq, type SimilarProfile as ar, type SkillSearchResult as as, type StatsResponse as at, type SuggestionProfile as au, type SuggestionsResponse as av, type UpdateProfileOverrideInput as aw, type UpdateProfileSelfInput as ax, type UploadAvatarResult as ay, type VerifyExternalAccountResult as az, type ActivityFeedResponse as b, fetchHiddenApps as b0, fetchMyGithubPullRequests as b1, fetchMyRoadmapVotes as b2, fetchReactionStatus as b3, fetchRoadmapVotes as b4, fetchSearchFilters as b5, fetchSearchProfiles as b6, fetchSimilarProfiles as b7, fetchSkillSuggestions as b8, fetchStats as b9, unhideProfileItem as bA, unhideSifaPublication as bB, unhideStandardPublication as bC, unsetExternalAccountPrimary as bD, updateExternalAccount as bE, updateOrgProfile as bF, updateProfileLocation as bG, updateProfileOverride as bH, updateProfileSelf as bI, uploadAvatar as bJ, verifyExternalAccount as bK, verifyOrgDomain as bL, fetchSuggestionCount as ba, fetchSuggestions as bb, followUser as bc, getBlueskySuggestions as bd, getFollowers as be, getFollowing as bf, getFollowingFeed as bg, getMutuals as bh, hideOrcidPublication as bi, hideProfileItem as bj, hideSifaPublication as bk, hideStandardPublication as bl, listFeatureAllowlist as bm, refreshOrcidPublications as bn, refreshPds as bo, removeFeatureAllowlist as bp, removeOrgNotificationEmail as bq, requestOrgDomainChallenge as br, resetProfile as bs, resolveQuotedPosts as bt, retractRoadmapVote as bu, searchSkills as bv, setExternalAccountPrimary as bw, submitOrgClaim as bx, unfollowUser as by, unhideOrcidPublication as bz, type ActivityItem as c, type ActivityItemLinkHealth as d, type ActivityTeaserResponse as e, ApiError as f, type AppRegistryEntry as g, type CheckAppAccountOptions as h, type CreateExternalAccountResult as i, type CreateResult as j, type ExternalAccountInput as k, type FeaturedProfile as l, type FetchActivityFeedOptions as m, type FetchActivityTeaserOptions as n, type FetchFollowListOptions as o, type FetchFollowProfilePageOptions as p, type FetchFollowingFeedOptions as q, type FetchHiddenAppsOptions as r, sifaQueryKeys as s, type FetchMyGithubPullRequestsOptions as t, type FetchMyRoadmapVotesOptions as u, type FetchReactionStatusOptions as v, type FetchSuggestionsOptions as w, type FilterOptions as x, type FollowListPage as y, type FollowProfile as z };
|
|
@@ -857,6 +857,42 @@ async function fetchActivityFeed(config, handleOrDid, options = {}) {
|
|
|
857
857
|
return null;
|
|
858
858
|
}
|
|
859
859
|
}
|
|
860
|
+
var GithubPullRequestSchema = zod.z.object({
|
|
861
|
+
prNumber: zod.z.number(),
|
|
862
|
+
repoOwner: zod.z.string(),
|
|
863
|
+
repoName: zod.z.string(),
|
|
864
|
+
title: zod.z.string(),
|
|
865
|
+
url: zod.z.string(),
|
|
866
|
+
language: zod.z.string().nullable(),
|
|
867
|
+
additions: zod.z.number(),
|
|
868
|
+
deletions: zod.z.number(),
|
|
869
|
+
/** ISO 8601 merge timestamp. */
|
|
870
|
+
mergedAt: zod.z.string()
|
|
871
|
+
});
|
|
872
|
+
var MyGithubPullRequestsResponseSchema = zod.z.object({
|
|
873
|
+
items: zod.z.array(GithubPullRequestSchema),
|
|
874
|
+
hasMore: zod.z.boolean()
|
|
875
|
+
});
|
|
876
|
+
async function fetchMyGithubPullRequests(config, options = {}) {
|
|
877
|
+
const { limit, offset, cookieHeader, ...fetchOptions } = options;
|
|
878
|
+
const params = new URLSearchParams();
|
|
879
|
+
if (limit !== void 0) params.set("limit", String(limit));
|
|
880
|
+
if (offset !== void 0) params.set("offset", String(offset));
|
|
881
|
+
const qs = params.toString();
|
|
882
|
+
const headers = { ...options.headers ?? {} };
|
|
883
|
+
if (cookieHeader) headers.cookie = cookieHeader;
|
|
884
|
+
const data = await apiFetch(
|
|
885
|
+
config,
|
|
886
|
+
`/api/me/github/pull-requests${qs ? `?${qs}` : ""}`,
|
|
887
|
+
{
|
|
888
|
+
credentials: "include",
|
|
889
|
+
cache: "no-store",
|
|
890
|
+
...fetchOptions,
|
|
891
|
+
headers
|
|
892
|
+
}
|
|
893
|
+
);
|
|
894
|
+
return MyGithubPullRequestsResponseSchema.parse(data);
|
|
895
|
+
}
|
|
860
896
|
|
|
861
897
|
// src/query/fetchers/endorsement.ts
|
|
862
898
|
async function fetchEndorsementCount(config, did, options = {}) {
|
|
@@ -1341,6 +1377,10 @@ var sifaQueryKeys = {
|
|
|
1341
1377
|
teaser: (handleOrDid) => ["sifa", "activity", "teaser", handleOrDid],
|
|
1342
1378
|
feed: (handleOrDid, opts) => ["sifa", "activity", "feed", handleOrDid, opts]
|
|
1343
1379
|
},
|
|
1380
|
+
github: {
|
|
1381
|
+
all: () => ["sifa", "github"],
|
|
1382
|
+
myPullRequests: (opts) => ["sifa", "github", "my-pull-requests", opts]
|
|
1383
|
+
},
|
|
1344
1384
|
endorsement: {
|
|
1345
1385
|
all: () => ["sifa", "endorsement"],
|
|
1346
1386
|
count: (did) => ["sifa", "endorsement", "count", did]
|
|
@@ -1411,6 +1451,7 @@ exports.fetchFollowing = fetchFollowing;
|
|
|
1411
1451
|
exports.fetchGetProfileView = fetchGetProfileView;
|
|
1412
1452
|
exports.fetchHeatmapData = fetchHeatmapData;
|
|
1413
1453
|
exports.fetchHiddenApps = fetchHiddenApps;
|
|
1454
|
+
exports.fetchMyGithubPullRequests = fetchMyGithubPullRequests;
|
|
1414
1455
|
exports.fetchMyRoadmapVotes = fetchMyRoadmapVotes;
|
|
1415
1456
|
exports.fetchNetworkMap = fetchNetworkMap;
|
|
1416
1457
|
exports.fetchNetworkStreamCount = fetchNetworkStreamCount;
|