@singi-labs/sifa-sdk 0.19.37 → 0.19.39

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.
@@ -1447,6 +1447,33 @@ async function fetchMyGithubPullRequests(config, options = {}) {
1447
1447
  );
1448
1448
  return MyGithubPullRequestsResponseSchema.parse(data);
1449
1449
  }
1450
+ var RpgItemStatusSchema = zod.z.object({
1451
+ id: zod.z.string(),
1452
+ title: zod.z.string(),
1453
+ description: zod.z.string(),
1454
+ category: zod.z.string(),
1455
+ earned: zod.z.boolean(),
1456
+ state: zod.z.enum(["locked", "earned", "given", "claimed"]),
1457
+ iconUrl: zod.z.string().url().nullable()
1458
+ });
1459
+ var RpgStatusResponseSchema = zod.z.object({
1460
+ hasCharacter: zod.z.boolean(),
1461
+ /** True when the user granted the `repo:equipment.rpg.item` OAuth scope. */
1462
+ canWriteItems: zod.z.boolean(),
1463
+ items: zod.z.array(RpgItemStatusSchema)
1464
+ });
1465
+ async function fetchRpgStatus(config, options = {}) {
1466
+ const { cookieHeader, ...fetchOptions } = options;
1467
+ const headers = { ...options.headers ?? {} };
1468
+ if (cookieHeader) headers.cookie = cookieHeader;
1469
+ const data = await apiFetch(config, "/api/rpg/status", {
1470
+ credentials: "include",
1471
+ cache: "no-store",
1472
+ ...fetchOptions,
1473
+ headers
1474
+ });
1475
+ return RpgStatusResponseSchema.parse(data);
1476
+ }
1450
1477
 
1451
1478
  // src/query/fetchers/endorsement.ts
1452
1479
  async function fetchEndorsementCount(config, did, options = {}) {
@@ -3707,6 +3734,8 @@ exports.HIDDEN_ITEM_SOURCES = HIDDEN_ITEM_SOURCES;
3707
3734
  exports.HIDDEN_ITEM_TYPES = HIDDEN_ITEM_TYPES;
3708
3735
  exports.PROFILE_COMPLETENESS_SIGNALS = PROFILE_COMPLETENESS_SIGNALS;
3709
3736
  exports.QUOTED_POSTS_BATCH_MAX = QUOTED_POSTS_BATCH_MAX;
3737
+ exports.RpgItemStatusSchema = RpgItemStatusSchema;
3738
+ exports.RpgStatusResponseSchema = RpgStatusResponseSchema;
3710
3739
  exports.SifaProvider = SifaProvider;
3711
3740
  exports.addFeatureAllowlist = addFeatureAllowlist;
3712
3741
  exports.addOrgNotificationEmail = addOrgNotificationEmail;
@@ -3779,6 +3808,7 @@ exports.fetchReciprocityCandidate = fetchReciprocityCandidate;
3779
3808
  exports.fetchRepoInventory = fetchRepoInventory;
3780
3809
  exports.fetchResolveActor = fetchResolveActor;
3781
3810
  exports.fetchRoadmapVotes = fetchRoadmapVotes;
3811
+ exports.fetchRpgStatus = fetchRpgStatus;
3782
3812
  exports.fetchSearchFilters = fetchSearchFilters;
3783
3813
  exports.fetchSearchProfiles = fetchSearchProfiles;
3784
3814
  exports.fetchSimilarProfiles = fetchSimilarProfiles;