@prismicio/client 6.6.0 → 6.6.1-alpha.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/src/client.ts CHANGED
@@ -720,8 +720,8 @@ export class Client<
720
720
  documentType: TDocumentType,
721
721
  uid: string,
722
722
  params?: Partial<BuildQueryURLArgs> & FetchParams,
723
- ): Promise<ExtractDocumentType<TDocuments, TDocumentType>> {
724
- return await this.getFirst<ExtractDocumentType<TDocuments, TDocumentType>>(
723
+ ): Promise<ExtractDocumentType<TDocument, TDocumentType>> {
724
+ return await this.getFirst<ExtractDocumentType<TDocument, TDocumentType>>(
725
725
  appendPredicates(params, [
726
726
  typePredicate(documentType),
727
727
  predicate.at(`my.${documentType}.uid`, uid),
@@ -760,8 +760,8 @@ export class Client<
760
760
  documentType: TDocumentType,
761
761
  uids: string[],
762
762
  params?: Partial<BuildQueryURLArgs> & FetchParams,
763
- ): Promise<prismicT.Query<ExtractDocumentType<TDocuments, TDocumentType>>> {
764
- return await this.get<ExtractDocumentType<TDocuments, TDocumentType>>(
763
+ ): Promise<prismicT.Query<ExtractDocumentType<TDocument, TDocumentType>>> {
764
+ return await this.get<ExtractDocumentType<TDocument, TDocumentType>>(
765
765
  appendPredicates(params, [
766
766
  typePredicate(documentType),
767
767
  predicate.in(`my.${documentType}.uid`, uids),
@@ -801,9 +801,9 @@ export class Client<
801
801
  documentType: TDocumentType,
802
802
  uids: string[],
803
803
  params?: Partial<BuildQueryURLArgs> & GetAllParams & FetchParams,
804
- ): Promise<ExtractDocumentType<TDocuments, TDocumentType>[]> {
804
+ ): Promise<ExtractDocumentType<TDocument, TDocumentType>[]> {
805
805
  return await this.dangerouslyGetAll<
806
- ExtractDocumentType<TDocuments, TDocumentType>
806
+ ExtractDocumentType<TDocument, TDocumentType>
807
807
  >(
808
808
  appendPredicates(params, [
809
809
  typePredicate(documentType),
@@ -838,8 +838,8 @@ export class Client<
838
838
  >(
839
839
  documentType: TDocumentType,
840
840
  params?: Partial<BuildQueryURLArgs> & FetchParams,
841
- ): Promise<ExtractDocumentType<TDocuments, TDocumentType>> {
842
- return await this.getFirst<ExtractDocumentType<TDocuments, TDocumentType>>(
841
+ ): Promise<ExtractDocumentType<TDocument, TDocumentType>> {
842
+ return await this.getFirst<ExtractDocumentType<TDocument, TDocumentType>>(
843
843
  appendPredicates(params, typePredicate(documentType)),
844
844
  );
845
845
  }
@@ -868,8 +868,8 @@ export class Client<
868
868
  >(
869
869
  documentType: TDocumentType,
870
870
  params?: Partial<BuildQueryURLArgs> & FetchParams,
871
- ): Promise<prismicT.Query<ExtractDocumentType<TDocuments, TDocumentType>>> {
872
- return await this.get<ExtractDocumentType<TDocuments, TDocumentType>>(
871
+ ): Promise<prismicT.Query<ExtractDocumentType<TDocument, TDocumentType>>> {
872
+ return await this.get<ExtractDocumentType<TDocument, TDocumentType>>(
873
873
  appendPredicates(params, typePredicate(documentType)),
874
874
  );
875
875
  }
@@ -899,9 +899,9 @@ export class Client<
899
899
  params?: Partial<Omit<BuildQueryURLArgs, "page">> &
900
900
  GetAllParams &
901
901
  FetchParams,
902
- ): Promise<ExtractDocumentType<TDocuments, TDocumentType>[]> {
902
+ ): Promise<ExtractDocumentType<TDocument, TDocumentType>[]> {
903
903
  return await this.dangerouslyGetAll<
904
- ExtractDocumentType<TDocuments, TDocumentType>
904
+ ExtractDocumentType<TDocument, TDocumentType>
905
905
  >(appendPredicates(params, typePredicate(documentType)));
906
906
  }
907
907