@sanity/client 8.5.0 → 8.6.1
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/{browserUpload-C7PwCs-C.js → browserUpload-BTQyjHMj.js} +2 -2
- package/dist/{browserUpload-C7PwCs-C.js.map → browserUpload-BTQyjHMj.js.map} +1 -1
- package/dist/{browserUpload-D-2Rmfjo.js → browserUpload-QxCD0Hp6.js} +2 -2
- package/dist/{browserUpload-D-2Rmfjo.js.map → browserUpload-QxCD0Hp6.js.map} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/index.node.d.ts +48 -1
- package/dist/index.node.js +5 -4
- package/dist/index.node.js.map +1 -1
- package/dist/media-library.d.ts +1 -1
- package/dist/{request-BhMuKj0D.js → request-CYLhJzOA.js} +3 -2
- package/dist/request-CYLhJzOA.js.map +1 -0
- package/dist/{request-SnMg7nUX.js → request-DXOkY5MQ.js} +3 -2
- package/dist/request-DXOkY5MQ.js.map +1 -0
- package/dist/{types-CtHEe8SF.d.ts → types-B1XLvey7.d.ts} +49 -2
- package/package.json +2 -2
- package/src/context/openapi.json +663 -2
- package/src/context/types.gen.ts +48 -1
- package/src/data/dataMethods.ts +2 -5
- package/src/http/request.ts +2 -10
- package/dist/request-BhMuKj0D.js.map +0 -1
- package/dist/request-SnMg7nUX.js.map +0 -1
package/dist/index.node.d.ts
CHANGED
|
@@ -2201,7 +2201,7 @@ interface paths {
|
|
|
2201
2201
|
get?: never;
|
|
2202
2202
|
/**
|
|
2203
2203
|
* Record a conversation
|
|
2204
|
-
* @description Upserts the conversation telemetry for one thread. `threadId` identifies the conversation within your organization — reuse means the same conversation. Messages replace the stored transcript wholesale; `metadata` and model fields only overwrite when present. Last write per thread wins — retries are safe.
|
|
2204
|
+
* @description Upserts the conversation telemetry for one thread. `threadId` identifies the conversation within your organization — reuse means the same conversation. Messages replace the stored transcript wholesale; `metadata`, `sharing`, and model fields only overwrite when present. Last write per thread wins — retries are safe. `sharing` records your opt-in to share telemetry with Sanity: metadata-only metrics, or full transcripts.
|
|
2205
2205
|
*/
|
|
2206
2206
|
put: operations['saveConversation'];
|
|
2207
2207
|
post?: never;
|
|
@@ -2271,6 +2271,15 @@ interface components {
|
|
|
2271
2271
|
/** Format: date-time */
|
|
2272
2272
|
classifiedAt: string | null;
|
|
2273
2273
|
classificationError: string | null;
|
|
2274
|
+
/**
|
|
2275
|
+
* @description ConversationSharing
|
|
2276
|
+
* @default null
|
|
2277
|
+
*/
|
|
2278
|
+
sharing: {
|
|
2279
|
+
metrics?: boolean;
|
|
2280
|
+
conversations?: boolean;
|
|
2281
|
+
contact?: string;
|
|
2282
|
+
} | null;
|
|
2274
2283
|
};
|
|
2275
2284
|
/** @description A `sanity.context.entry` document, one outline node stored in the bound dataset. Not returned by any endpoint; published so GROQ reads against the dataset can be typed. The entries endpoints serve the validated wire view. */
|
|
2276
2285
|
EntryDoc: {
|
|
@@ -2626,6 +2635,11 @@ interface operations {
|
|
|
2626
2635
|
refreshInFlight: boolean;
|
|
2627
2636
|
openIssueCount: number;
|
|
2628
2637
|
instructionCount: number;
|
|
2638
|
+
/** @description Actor */
|
|
2639
|
+
createdBy: {
|
|
2640
|
+
id: string | null;
|
|
2641
|
+
displayName: string | null;
|
|
2642
|
+
} | null;
|
|
2629
2643
|
/** Format: date-time */
|
|
2630
2644
|
createdAt: string;
|
|
2631
2645
|
/** Format: date-time */
|
|
@@ -2718,6 +2732,11 @@ interface operations {
|
|
|
2718
2732
|
refreshInFlight: boolean;
|
|
2719
2733
|
openIssueCount: number;
|
|
2720
2734
|
instructionCount: number;
|
|
2735
|
+
/** @description Actor */
|
|
2736
|
+
createdBy: {
|
|
2737
|
+
id: string | null;
|
|
2738
|
+
displayName: string | null;
|
|
2739
|
+
} | null;
|
|
2721
2740
|
/** Format: date-time */
|
|
2722
2741
|
createdAt: string;
|
|
2723
2742
|
/** Format: date-time */
|
|
@@ -2800,6 +2819,11 @@ interface operations {
|
|
|
2800
2819
|
refreshInFlight: boolean;
|
|
2801
2820
|
openIssueCount: number;
|
|
2802
2821
|
instructionCount: number;
|
|
2822
|
+
/** @description Actor */
|
|
2823
|
+
createdBy: {
|
|
2824
|
+
id: string | null;
|
|
2825
|
+
displayName: string | null;
|
|
2826
|
+
} | null;
|
|
2803
2827
|
/** Format: date-time */
|
|
2804
2828
|
createdAt: string;
|
|
2805
2829
|
/** Format: date-time */
|
|
@@ -2914,6 +2938,11 @@ interface operations {
|
|
|
2914
2938
|
refreshInFlight: boolean;
|
|
2915
2939
|
openIssueCount: number;
|
|
2916
2940
|
instructionCount: number;
|
|
2941
|
+
/** @description Actor */
|
|
2942
|
+
createdBy: {
|
|
2943
|
+
id: string | null;
|
|
2944
|
+
displayName: string | null;
|
|
2945
|
+
} | null;
|
|
2917
2946
|
/** Format: date-time */
|
|
2918
2947
|
createdAt: string;
|
|
2919
2948
|
/** Format: date-time */
|
|
@@ -3927,6 +3956,12 @@ interface operations {
|
|
|
3927
3956
|
metadata?: {
|
|
3928
3957
|
[key: string]: string | string[];
|
|
3929
3958
|
};
|
|
3959
|
+
/** @description ConversationSharing */
|
|
3960
|
+
sharing?: {
|
|
3961
|
+
metrics?: boolean;
|
|
3962
|
+
conversations?: boolean;
|
|
3963
|
+
contact?: string;
|
|
3964
|
+
};
|
|
3930
3965
|
};
|
|
3931
3966
|
};
|
|
3932
3967
|
};
|
|
@@ -3979,6 +4014,12 @@ interface operations {
|
|
|
3979
4014
|
/** Format: date-time */
|
|
3980
4015
|
classifiedAt: string | null;
|
|
3981
4016
|
classificationError: string | null;
|
|
4017
|
+
/** @description ConversationSharing */
|
|
4018
|
+
sharing: {
|
|
4019
|
+
metrics?: boolean;
|
|
4020
|
+
conversations?: boolean;
|
|
4021
|
+
contact?: string;
|
|
4022
|
+
} | null;
|
|
3982
4023
|
/** Format: date-time */
|
|
3983
4024
|
createdAt: string;
|
|
3984
4025
|
/** Format: date-time */
|
|
@@ -4060,6 +4101,12 @@ interface operations {
|
|
|
4060
4101
|
/** Format: date-time */
|
|
4061
4102
|
classifiedAt: string | null;
|
|
4062
4103
|
classificationError: string | null;
|
|
4104
|
+
/** @description ConversationSharing */
|
|
4105
|
+
sharing: {
|
|
4106
|
+
metrics?: boolean;
|
|
4107
|
+
conversations?: boolean;
|
|
4108
|
+
contact?: string;
|
|
4109
|
+
} | null;
|
|
4063
4110
|
/** Format: date-time */
|
|
4064
4111
|
createdAt: string;
|
|
4065
4112
|
/** Format: date-time */
|
package/dist/index.node.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { n as __exportAll } from "./rolldown-runtime-4YWMqDIC.js";
|
|
2
|
-
import { a as ServerError, c as isHttpError, i as CorsOriginError, l as isQueryParseError, o as formatQueryParseError, r as ClientError, t as defineRequester } from "./request-
|
|
2
|
+
import { a as ServerError, c as isHttpError, i as CorsOriginError, l as isQueryParseError, o as formatQueryParseError, r as ClientError, t as defineRequester } from "./request-DXOkY5MQ.js";
|
|
3
3
|
import { t as isRecord } from "./isRecord-Kfmt-nk-.js";
|
|
4
4
|
import { t as require_dist } from "./dist-C5K_YcEU.js";
|
|
5
5
|
import { isTimeoutError } from "get-it";
|
|
6
|
+
import { anySignal } from "get-it/any-signal";
|
|
6
7
|
import { debug } from "get-it/middleware";
|
|
7
8
|
import { Observable, catchError, concat, defer, finalize, isObservable, lastValueFrom, map, merge, mergeMap, of, share, tap, throwError, timer } from "rxjs";
|
|
8
9
|
import { getDraftId, getPublishedId, getVersionFromId, getVersionId, isDraftId, isVersionId } from "@sanity/client/csm";
|
|
@@ -1204,7 +1205,7 @@ function _prepareRequest(client, options) {
|
|
|
1204
1205
|
function _observe(userSignal, run) {
|
|
1205
1206
|
return new Observable((subscriber) => {
|
|
1206
1207
|
let controller = new AbortController();
|
|
1207
|
-
return run(userSignal ?
|
|
1208
|
+
return run(userSignal ? anySignal([userSignal, controller.signal]) : controller.signal).then((value) => {
|
|
1208
1209
|
subscriber.next(value), subscriber.complete();
|
|
1209
1210
|
}, (err) => subscriber.error(err)), () => controller.abort();
|
|
1210
1211
|
});
|
|
@@ -1505,7 +1506,7 @@ function _upload(client, _httpRequest, assetType, body, opts = {}) {
|
|
|
1505
1506
|
body
|
|
1506
1507
|
};
|
|
1507
1508
|
return typeof XMLHttpRequest < "u" ? defer(async () => {
|
|
1508
|
-
let { uploadWithProgress } = await import("./browserUpload-
|
|
1509
|
+
let { uploadWithProgress } = await import("./browserUpload-QxCD0Hp6.js"), req = _prepareRequest(client, { ...baseRequest });
|
|
1509
1510
|
return uploadWithProgress({
|
|
1510
1511
|
url: appendQuery(req.url, req.query),
|
|
1511
1512
|
method: req.method ?? "POST",
|
|
@@ -4505,7 +4506,7 @@ function defineDeprecatedCreateClient(createClient) {
|
|
|
4505
4506
|
return printNoDefaultExport(), createClient(config);
|
|
4506
4507
|
};
|
|
4507
4508
|
}
|
|
4508
|
-
var name = "@sanity/client", version = "8.
|
|
4509
|
+
var name = "@sanity/client", version = "8.6.1";
|
|
4509
4510
|
const log = createDebug("sanity:client");
|
|
4510
4511
|
function isNodeReadableStream(value) {
|
|
4511
4512
|
return typeof value != "object" || !value || !("pipe" in value) ? !1 : typeof value.pipe == "function";
|