@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.
@@ -1547,6 +1547,8 @@ declare class ApiClient {
1547
1547
  data: ApiCollection;
1548
1548
  }>;
1549
1549
  getSponsorshipOffers(query?: ApiSponsorshipOffersQuery): Promise<ApiResponse<ApiSponsorshipOffer[]>>;
1550
+ getSponsorshipOffer(offerId: string): Promise<ApiSponsorshipOffer | null>;
1551
+ getSponsorshipProposal(proposalId: string): Promise<ApiSponsorshipProposal | null>;
1550
1552
  getSponsorshipBids(offerId: string): Promise<ApiSponsorshipBid[]>;
1551
1553
  getSponsorshipProposals(query?: ApiSponsorshipProposalsQuery): Promise<ApiResponse<ApiSponsorshipProposal[]>>;
1552
1554
  getSponsorshipLicenses(query?: ApiSponsorshipLicensesQuery): Promise<ApiResponse<ApiSponsorshipLicense[]>>;
@@ -1547,6 +1547,8 @@ declare class ApiClient {
1547
1547
  data: ApiCollection;
1548
1548
  }>;
1549
1549
  getSponsorshipOffers(query?: ApiSponsorshipOffersQuery): Promise<ApiResponse<ApiSponsorshipOffer[]>>;
1550
+ getSponsorshipOffer(offerId: string): Promise<ApiSponsorshipOffer | null>;
1551
+ getSponsorshipProposal(proposalId: string): Promise<ApiSponsorshipProposal | null>;
1550
1552
  getSponsorshipBids(offerId: string): Promise<ApiSponsorshipBid[]>;
1551
1553
  getSponsorshipProposals(query?: ApiSponsorshipProposalsQuery): Promise<ApiResponse<ApiSponsorshipProposal[]>>;
1552
1554
  getSponsorshipLicenses(query?: ApiSponsorshipLicensesQuery): Promise<ApiResponse<ApiSponsorshipLicense[]>>;
package/dist/index.cjs CHANGED
@@ -758,12 +758,13 @@ var ApiClient = class {
758
758
  headers: this.bearer(siwsToken)
759
759
  });
760
760
  }
761
- getCollectionBySlug(slug) {
762
- return this.request(
761
+ async getCollectionBySlug(slug) {
762
+ const res = await this.request(
763
763
  `/v1/collections/by-slug/${encodeURIComponent(slug.toLowerCase().trim())}`,
764
764
  { method: "GET" },
765
765
  { allow404: true }
766
766
  );
767
+ return res?.data ?? null;
767
768
  }
768
769
  async registerUser(params) {
769
770
  return this.post("/v1/users/register", params);
@@ -1074,6 +1075,22 @@ var ApiClient = class {
1074
1075
  if (query.open !== void 0) params.set("open", String(query.open));
1075
1076
  return this.get(`/v1/sponsorship/offers?${params}`);
1076
1077
  }
1078
+ async getSponsorshipOffer(offerId) {
1079
+ const res = await this.request(
1080
+ `/v1/sponsorship/offers/${encodeURIComponent(offerId)}`,
1081
+ { method: "GET" },
1082
+ { allow404: true }
1083
+ );
1084
+ return res?.data ?? null;
1085
+ }
1086
+ async getSponsorshipProposal(proposalId) {
1087
+ const res = await this.request(
1088
+ `/v1/sponsorship/proposals/${encodeURIComponent(proposalId)}`,
1089
+ { method: "GET" },
1090
+ { allow404: true }
1091
+ );
1092
+ return res?.data ?? null;
1093
+ }
1077
1094
  async getSponsorshipBids(offerId) {
1078
1095
  const res = await this.get(`/v1/sponsorship/offers/${encodeURIComponent(offerId)}/bids`);
1079
1096
  return res.data;