@sanity/client 7.16.0 → 7.17.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.
Files changed (44) hide show
  1. package/dist/_chunks-cjs/config.cjs.map +1 -1
  2. package/dist/_chunks-cjs/isRecord.cjs.map +1 -1
  3. package/dist/_chunks-cjs/resolveEditInfo.cjs +1 -1
  4. package/dist/_chunks-cjs/resolveEditInfo.cjs.map +1 -1
  5. package/dist/_chunks-cjs/stegaClean.cjs.map +1 -1
  6. package/dist/_chunks-cjs/stegaEncodeSourceMap.cjs +1 -1
  7. package/dist/_chunks-cjs/stegaEncodeSourceMap.cjs.map +1 -1
  8. package/dist/_chunks-es/config.js.map +1 -1
  9. package/dist/_chunks-es/isRecord.js.map +1 -1
  10. package/dist/_chunks-es/resolveEditInfo.js +1 -1
  11. package/dist/_chunks-es/resolveEditInfo.js.map +1 -1
  12. package/dist/_chunks-es/stegaClean.js.map +1 -1
  13. package/dist/_chunks-es/stegaEncodeSourceMap.js +1 -1
  14. package/dist/_chunks-es/stegaEncodeSourceMap.js.map +1 -1
  15. package/dist/csm.cjs.map +1 -1
  16. package/dist/csm.js.map +1 -1
  17. package/dist/index.browser.cjs +2 -2
  18. package/dist/index.browser.cjs.map +1 -1
  19. package/dist/index.browser.d.cts +14 -2
  20. package/dist/index.browser.d.ts +14 -2
  21. package/dist/index.browser.js +3 -3
  22. package/dist/index.browser.js.map +1 -1
  23. package/dist/index.cjs +3 -3
  24. package/dist/index.cjs.map +1 -1
  25. package/dist/index.d.cts +14 -2
  26. package/dist/index.d.ts +14 -2
  27. package/dist/index.js +4 -4
  28. package/dist/index.js.map +1 -1
  29. package/dist/media-library.cjs.map +1 -1
  30. package/dist/media-library.js.map +1 -1
  31. package/dist/stega.browser.cjs.map +1 -1
  32. package/dist/stega.browser.d.cts +14 -2
  33. package/dist/stega.browser.d.ts +14 -2
  34. package/dist/stega.browser.js +1 -1
  35. package/dist/stega.browser.js.map +1 -1
  36. package/dist/stega.cjs.map +1 -1
  37. package/dist/stega.d.cts +14 -2
  38. package/dist/stega.d.ts +14 -2
  39. package/dist/stega.js +1 -1
  40. package/dist/stega.js.map +1 -1
  41. package/package.json +1 -1
  42. package/src/projects/ProjectsClient.ts +22 -2
  43. package/umd/sanityClient.js +11 -11
  44. package/umd/sanityClient.min.js +2 -2
@@ -2699,11 +2699,17 @@ export declare class ObservableProjectsClient {
2699
2699
  * @param options - Options for the list request
2700
2700
  * - `includeMembers` - Whether to include members in the response (default: true)
2701
2701
  * - `organizationId` - ID of the organization to fetch projects for
2702
+ * - `onlyExplicitMembership` - Only include projects where the user has explicit membership (default: false)
2702
2703
  */
2703
- list(options?: {includeMembers?: true; organizationId?: string}): Observable<SanityProject[]>
2704
+ list(options?: {
2705
+ includeMembers?: true
2706
+ organizationId?: string
2707
+ onlyExplicitMembership?: boolean
2708
+ }): Observable<SanityProject[]>
2704
2709
  list(options?: {
2705
2710
  includeMembers?: false
2706
2711
  organizationId?: string
2712
+ onlyExplicitMembership?: boolean
2707
2713
  }): Observable<Omit<SanityProject, 'members'>[]>
2708
2714
  /**
2709
2715
  * Fetch a project by project ID
@@ -4076,11 +4082,17 @@ export declare class ProjectsClient {
4076
4082
  * @param options - Options for the list request
4077
4083
  * - `includeMembers` - Whether to include members in the response (default: true)
4078
4084
  * - `organizationId` - ID of the organization to fetch projects for
4085
+ * - `onlyExplicitMembership` - Only include projects where the user has explicit membership (default: false)
4079
4086
  */
4080
- list(options?: {includeMembers?: true; organizationId?: string}): Promise<SanityProject[]>
4087
+ list(options?: {
4088
+ includeMembers?: true
4089
+ organizationId?: string
4090
+ onlyExplicitMembership?: boolean
4091
+ }): Promise<SanityProject[]>
4081
4092
  list(options?: {
4082
4093
  includeMembers?: false
4083
4094
  organizationId?: string
4095
+ onlyExplicitMembership?: boolean
4084
4096
  }): Promise<Omit<SanityProject, 'members'>[]>
4085
4097
  /**
4086
4098
  * Fetch a project by project ID
@@ -2699,11 +2699,17 @@ export declare class ObservableProjectsClient {
2699
2699
  * @param options - Options for the list request
2700
2700
  * - `includeMembers` - Whether to include members in the response (default: true)
2701
2701
  * - `organizationId` - ID of the organization to fetch projects for
2702
+ * - `onlyExplicitMembership` - Only include projects where the user has explicit membership (default: false)
2702
2703
  */
2703
- list(options?: {includeMembers?: true; organizationId?: string}): Observable<SanityProject[]>
2704
+ list(options?: {
2705
+ includeMembers?: true
2706
+ organizationId?: string
2707
+ onlyExplicitMembership?: boolean
2708
+ }): Observable<SanityProject[]>
2704
2709
  list(options?: {
2705
2710
  includeMembers?: false
2706
2711
  organizationId?: string
2712
+ onlyExplicitMembership?: boolean
2707
2713
  }): Observable<Omit<SanityProject, 'members'>[]>
2708
2714
  /**
2709
2715
  * Fetch a project by project ID
@@ -4076,11 +4082,17 @@ export declare class ProjectsClient {
4076
4082
  * @param options - Options for the list request
4077
4083
  * - `includeMembers` - Whether to include members in the response (default: true)
4078
4084
  * - `organizationId` - ID of the organization to fetch projects for
4085
+ * - `onlyExplicitMembership` - Only include projects where the user has explicit membership (default: false)
4079
4086
  */
4080
- list(options?: {includeMembers?: true; organizationId?: string}): Promise<SanityProject[]>
4087
+ list(options?: {
4088
+ includeMembers?: true
4089
+ organizationId?: string
4090
+ onlyExplicitMembership?: boolean
4091
+ }): Promise<SanityProject[]>
4081
4092
  list(options?: {
4082
4093
  includeMembers?: false
4083
4094
  organizationId?: string
4095
+ onlyExplicitMembership?: boolean
4084
4096
  }): Promise<Omit<SanityProject, 'members'>[]>
4085
4097
  /**
4086
4098
  * Fetch a project by project ID
@@ -1,7 +1,7 @@
1
1
  import { getIt } from "get-it";
2
2
  import { adapter, environment } from "get-it";
3
3
  import { retry, jsonRequest, jsonResponse, progress, observable } from "get-it/middleware";
4
- import { Observable, defer, of, isObservable, mergeMap, from, lastValueFrom, shareReplay, catchError, concat, throwError, timer, tap, finalize, share, merge, map as map$1, firstValueFrom } from "rxjs";
4
+ import { Observable, defer, isObservable, of, mergeMap, from, lastValueFrom, shareReplay, catchError, concat, timer, throwError, tap, finalize, share, merge, map as map$1, firstValueFrom } from "rxjs";
5
5
  import { isRecord, stegaClean } from "./_chunks-es/stegaClean.js";
6
6
  import { combineLatestWith, map, filter, finalize as finalize$1 } from "rxjs/operators";
7
7
  import { getVersionFromId, isDraftId, getVersionId, getDraftId, isVersionId, getPublishedId } from "@sanity/client/csm";
@@ -1773,7 +1773,7 @@ class ObservableProjectsClient {
1773
1773
  }
1774
1774
  list(options) {
1775
1775
  const query = {}, uri = "/projects";
1776
- return options?.includeMembers === !1 && (query.includeMembers = "false"), options?.organizationId && (query.organizationId = options.organizationId), _request(this.#client, this.#httpRequest, { uri, query });
1776
+ return options?.includeMembers === !1 && (query.includeMembers = "false"), options?.organizationId && (query.organizationId = options.organizationId), options?.onlyExplicitMembership === !0 && (query.onlyExplicitMembership = "true"), _request(this.#client, this.#httpRequest, { uri, query });
1777
1777
  }
1778
1778
  /**
1779
1779
  * Fetch a project by project ID
@@ -1792,7 +1792,7 @@ class ProjectsClient {
1792
1792
  }
1793
1793
  list(options) {
1794
1794
  const query = {}, uri = "/projects";
1795
- return options?.includeMembers === !1 && (query.includeMembers = "false"), options?.organizationId && (query.organizationId = options.organizationId), lastValueFrom(_request(this.#client, this.#httpRequest, { uri, query }));
1795
+ return options?.includeMembers === !1 && (query.includeMembers = "false"), options?.organizationId && (query.organizationId = options.organizationId), options?.onlyExplicitMembership === !0 && (query.onlyExplicitMembership = "true"), lastValueFrom(_request(this.#client, this.#httpRequest, { uri, query }));
1796
1796
  }
1797
1797
  /**
1798
1798
  * Fetch a project by project ID