@medialane/sdk 0.136.0 → 0.137.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.
@@ -731,12 +731,13 @@ var ApiClient = class {
731
731
  headers: this.bearer(siwsToken)
732
732
  });
733
733
  }
734
- getCollectionBySlug(slug) {
735
- return this.request(
734
+ async getCollectionBySlug(slug) {
735
+ const res = await this.request(
736
736
  `/v1/collections/by-slug/${encodeURIComponent(slug.toLowerCase().trim())}`,
737
737
  { method: "GET" },
738
738
  { allow404: true }
739
739
  );
740
+ return res?.data ?? null;
740
741
  }
741
742
  async registerUser(params) {
742
743
  return this.post("/v1/users/register", params);
@@ -1047,6 +1048,22 @@ var ApiClient = class {
1047
1048
  if (query.open !== void 0) params.set("open", String(query.open));
1048
1049
  return this.get(`/v1/sponsorship/offers?${params}`);
1049
1050
  }
1051
+ async getSponsorshipOffer(offerId) {
1052
+ const res = await this.request(
1053
+ `/v1/sponsorship/offers/${encodeURIComponent(offerId)}`,
1054
+ { method: "GET" },
1055
+ { allow404: true }
1056
+ );
1057
+ return res?.data ?? null;
1058
+ }
1059
+ async getSponsorshipProposal(proposalId) {
1060
+ const res = await this.request(
1061
+ `/v1/sponsorship/proposals/${encodeURIComponent(proposalId)}`,
1062
+ { method: "GET" },
1063
+ { allow404: true }
1064
+ );
1065
+ return res?.data ?? null;
1066
+ }
1050
1067
  async getSponsorshipBids(offerId) {
1051
1068
  const res = await this.get(`/v1/sponsorship/offers/${encodeURIComponent(offerId)}/bids`);
1052
1069
  return res.data;