@sanity/client 7.9.0 → 7.10.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/dist/index.browser.cjs +4 -4
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.d.cts +12 -4
- package/dist/index.browser.d.ts +12 -4
- package/dist/index.browser.js +4 -4
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +5 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -4
- package/dist/index.d.ts +12 -4
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/stega.browser.d.cts +12 -4
- package/dist/stega.browser.d.ts +12 -4
- package/dist/stega.d.cts +12 -4
- package/dist/stega.d.ts +12 -4
- package/package.json +1 -1
- package/src/projects/ProjectsClient.ts +36 -9
- package/umd/sanityClient.js +4 -4
- package/umd/sanityClient.min.js +2 -2
package/dist/index.browser.d.cts
CHANGED
|
@@ -2465,9 +2465,13 @@ export declare class ObservableProjectsClient {
|
|
|
2465
2465
|
*
|
|
2466
2466
|
* @param options - Options for the list request
|
|
2467
2467
|
* - `includeMembers` - Whether to include members in the response (default: true)
|
|
2468
|
+
* - `organizationId` - ID of the organization to fetch projects for
|
|
2468
2469
|
*/
|
|
2469
|
-
list(options?: {includeMembers?: true}): Observable<SanityProject[]>
|
|
2470
|
-
list(options?: {
|
|
2470
|
+
list(options?: {includeMembers?: true; organizationId?: string}): Observable<SanityProject[]>
|
|
2471
|
+
list(options?: {
|
|
2472
|
+
includeMembers?: false
|
|
2473
|
+
organizationId?: string
|
|
2474
|
+
}): Observable<Omit<SanityProject, 'members'>[]>
|
|
2471
2475
|
/**
|
|
2472
2476
|
* Fetch a project by project ID
|
|
2473
2477
|
*
|
|
@@ -3819,9 +3823,13 @@ export declare class ProjectsClient {
|
|
|
3819
3823
|
*
|
|
3820
3824
|
* @param options - Options for the list request
|
|
3821
3825
|
* - `includeMembers` - Whether to include members in the response (default: true)
|
|
3826
|
+
* - `organizationId` - ID of the organization to fetch projects for
|
|
3822
3827
|
*/
|
|
3823
|
-
list(options?: {includeMembers?: true}): Promise<SanityProject[]>
|
|
3824
|
-
list(options?: {
|
|
3828
|
+
list(options?: {includeMembers?: true; organizationId?: string}): Promise<SanityProject[]>
|
|
3829
|
+
list(options?: {
|
|
3830
|
+
includeMembers?: false
|
|
3831
|
+
organizationId?: string
|
|
3832
|
+
}): Promise<Omit<SanityProject, 'members'>[]>
|
|
3825
3833
|
/**
|
|
3826
3834
|
* Fetch a project by project ID
|
|
3827
3835
|
*
|
package/dist/index.browser.d.ts
CHANGED
|
@@ -2465,9 +2465,13 @@ export declare class ObservableProjectsClient {
|
|
|
2465
2465
|
*
|
|
2466
2466
|
* @param options - Options for the list request
|
|
2467
2467
|
* - `includeMembers` - Whether to include members in the response (default: true)
|
|
2468
|
+
* - `organizationId` - ID of the organization to fetch projects for
|
|
2468
2469
|
*/
|
|
2469
|
-
list(options?: {includeMembers?: true}): Observable<SanityProject[]>
|
|
2470
|
-
list(options?: {
|
|
2470
|
+
list(options?: {includeMembers?: true; organizationId?: string}): Observable<SanityProject[]>
|
|
2471
|
+
list(options?: {
|
|
2472
|
+
includeMembers?: false
|
|
2473
|
+
organizationId?: string
|
|
2474
|
+
}): Observable<Omit<SanityProject, 'members'>[]>
|
|
2471
2475
|
/**
|
|
2472
2476
|
* Fetch a project by project ID
|
|
2473
2477
|
*
|
|
@@ -3819,9 +3823,13 @@ export declare class ProjectsClient {
|
|
|
3819
3823
|
*
|
|
3820
3824
|
* @param options - Options for the list request
|
|
3821
3825
|
* - `includeMembers` - Whether to include members in the response (default: true)
|
|
3826
|
+
* - `organizationId` - ID of the organization to fetch projects for
|
|
3822
3827
|
*/
|
|
3823
|
-
list(options?: {includeMembers?: true}): Promise<SanityProject[]>
|
|
3824
|
-
list(options?: {
|
|
3828
|
+
list(options?: {includeMembers?: true; organizationId?: string}): Promise<SanityProject[]>
|
|
3829
|
+
list(options?: {
|
|
3830
|
+
includeMembers?: false
|
|
3831
|
+
organizationId?: string
|
|
3832
|
+
}): Promise<Omit<SanityProject, 'members'>[]>
|
|
3825
3833
|
/**
|
|
3826
3834
|
* Fetch a project by project ID
|
|
3827
3835
|
*
|
package/dist/index.browser.js
CHANGED
|
@@ -1607,8 +1607,8 @@ class ObservableProjectsClient {
|
|
|
1607
1607
|
this.#client = client, this.#httpRequest = httpRequest;
|
|
1608
1608
|
}
|
|
1609
1609
|
list(options) {
|
|
1610
|
-
const
|
|
1611
|
-
return _request(this.#client, this.#httpRequest, { uri });
|
|
1610
|
+
const query = {}, uri = "/projects";
|
|
1611
|
+
return options?.includeMembers === !1 && (query.includeMembers = "false"), options?.organizationId && (query.organizationId = options.organizationId), _request(this.#client, this.#httpRequest, { uri, query });
|
|
1612
1612
|
}
|
|
1613
1613
|
/**
|
|
1614
1614
|
* Fetch a project by project ID
|
|
@@ -1626,8 +1626,8 @@ class ProjectsClient {
|
|
|
1626
1626
|
this.#client = client, this.#httpRequest = httpRequest;
|
|
1627
1627
|
}
|
|
1628
1628
|
list(options) {
|
|
1629
|
-
const
|
|
1630
|
-
return lastValueFrom(_request(this.#client, this.#httpRequest, { uri }));
|
|
1629
|
+
const query = {}, uri = "/projects";
|
|
1630
|
+
return options?.includeMembers === !1 && (query.includeMembers = "false"), options?.organizationId && (query.organizationId = options.organizationId), lastValueFrom(_request(this.#client, this.#httpRequest, { uri, query }));
|
|
1631
1631
|
}
|
|
1632
1632
|
/**
|
|
1633
1633
|
* Fetch a project by project ID
|