@sanity/client 6.28.3-instruct.2 → 6.28.3-instruct.4

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.
@@ -1237,6 +1237,33 @@ declare interface InstructRequestBase {
1237
1237
  hidden: boolean
1238
1238
  }[]
1239
1239
  }
1240
+ /**
1241
+ * When localeSettings is provided on the request, instruct can write to date and datetime fields.
1242
+ * Otherwise, such fields will be ignored.
1243
+ */
1244
+ localeSettings?: {
1245
+ /**
1246
+ * A valid Unicode BCP 47 locale identifier used to interpret and format
1247
+ * natural language inputs and date output. Examples include "en-US", "fr-FR", or "ja-JP".
1248
+ *
1249
+ * This affects how phrases like "next Friday" or "in two weeks" are parsed,
1250
+ * and how resulting dates are presented (e.g., 12-hour vs 24-hour format).
1251
+ *
1252
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#getcanonicalocales
1253
+ */
1254
+ locale: string
1255
+ /**
1256
+ * A valid IANA time zone identifier used to resolve relative and absolute
1257
+ * date expressions to a specific point in time. Examples include
1258
+ * "America/New_York", "Europe/Paris", or "Asia/Tokyo".
1259
+ *
1260
+ * This ensures phrases like "tomorrow at 9am" are interpreted correctly
1261
+ * based on the user's local time.
1262
+ *
1263
+ * @see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
1264
+ */
1265
+ timeZone: string
1266
+ }
1240
1267
  }
1241
1268
 
1242
1269
  /** @beta */
@@ -1237,6 +1237,33 @@ declare interface InstructRequestBase {
1237
1237
  hidden: boolean
1238
1238
  }[]
1239
1239
  }
1240
+ /**
1241
+ * When localeSettings is provided on the request, instruct can write to date and datetime fields.
1242
+ * Otherwise, such fields will be ignored.
1243
+ */
1244
+ localeSettings?: {
1245
+ /**
1246
+ * A valid Unicode BCP 47 locale identifier used to interpret and format
1247
+ * natural language inputs and date output. Examples include "en-US", "fr-FR", or "ja-JP".
1248
+ *
1249
+ * This affects how phrases like "next Friday" or "in two weeks" are parsed,
1250
+ * and how resulting dates are presented (e.g., 12-hour vs 24-hour format).
1251
+ *
1252
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#getcanonicalocales
1253
+ */
1254
+ locale: string
1255
+ /**
1256
+ * A valid IANA time zone identifier used to resolve relative and absolute
1257
+ * date expressions to a specific point in time. Examples include
1258
+ * "America/New_York", "Europe/Paris", or "Asia/Tokyo".
1259
+ *
1260
+ * This ensures phrases like "tomorrow at 9am" are interpreted correctly
1261
+ * based on the user's local time.
1262
+ *
1263
+ * @see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
1264
+ */
1265
+ timeZone: string
1266
+ }
1240
1267
  }
1241
1268
 
1242
1269
  /** @beta */
package/dist/stega.d.cts CHANGED
@@ -1237,6 +1237,33 @@ declare interface InstructRequestBase {
1237
1237
  hidden: boolean
1238
1238
  }[]
1239
1239
  }
1240
+ /**
1241
+ * When localeSettings is provided on the request, instruct can write to date and datetime fields.
1242
+ * Otherwise, such fields will be ignored.
1243
+ */
1244
+ localeSettings?: {
1245
+ /**
1246
+ * A valid Unicode BCP 47 locale identifier used to interpret and format
1247
+ * natural language inputs and date output. Examples include "en-US", "fr-FR", or "ja-JP".
1248
+ *
1249
+ * This affects how phrases like "next Friday" or "in two weeks" are parsed,
1250
+ * and how resulting dates are presented (e.g., 12-hour vs 24-hour format).
1251
+ *
1252
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#getcanonicalocales
1253
+ */
1254
+ locale: string
1255
+ /**
1256
+ * A valid IANA time zone identifier used to resolve relative and absolute
1257
+ * date expressions to a specific point in time. Examples include
1258
+ * "America/New_York", "Europe/Paris", or "Asia/Tokyo".
1259
+ *
1260
+ * This ensures phrases like "tomorrow at 9am" are interpreted correctly
1261
+ * based on the user's local time.
1262
+ *
1263
+ * @see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
1264
+ */
1265
+ timeZone: string
1266
+ }
1240
1267
  }
1241
1268
 
1242
1269
  /** @beta */
package/dist/stega.d.ts CHANGED
@@ -1237,6 +1237,33 @@ declare interface InstructRequestBase {
1237
1237
  hidden: boolean
1238
1238
  }[]
1239
1239
  }
1240
+ /**
1241
+ * When localeSettings is provided on the request, instruct can write to date and datetime fields.
1242
+ * Otherwise, such fields will be ignored.
1243
+ */
1244
+ localeSettings?: {
1245
+ /**
1246
+ * A valid Unicode BCP 47 locale identifier used to interpret and format
1247
+ * natural language inputs and date output. Examples include "en-US", "fr-FR", or "ja-JP".
1248
+ *
1249
+ * This affects how phrases like "next Friday" or "in two weeks" are parsed,
1250
+ * and how resulting dates are presented (e.g., 12-hour vs 24-hour format).
1251
+ *
1252
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#getcanonicalocales
1253
+ */
1254
+ locale: string
1255
+ /**
1256
+ * A valid IANA time zone identifier used to resolve relative and absolute
1257
+ * date expressions to a specific point in time. Examples include
1258
+ * "America/New_York", "Europe/Paris", or "Asia/Tokyo".
1259
+ *
1260
+ * This ensures phrases like "tomorrow at 9am" are interpreted correctly
1261
+ * based on the user's local time.
1262
+ *
1263
+ * @see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
1264
+ */
1265
+ timeZone: string
1266
+ }
1240
1267
  }
1241
1268
 
1242
1269
  /** @beta */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanity/client",
3
- "version": "6.28.3-instruct.2",
3
+ "version": "6.28.3-instruct.4",
4
4
  "description": "Client for retrieving, creating and patching data from Sanity.io",
5
5
  "keywords": [
6
6
  "sanity",
@@ -18,7 +18,7 @@ export function _instruct<
18
18
  const dataset = hasDataset(client.config())
19
19
  return _request(client, httpRequest, {
20
20
  method: 'POST',
21
- uri: `/assist/tasks/instruct/${dataset}`,
21
+ uri: `/instruct/${dataset}`,
22
22
  body: request,
23
23
  })
24
24
  }
@@ -126,6 +126,35 @@ interface InstructRequestBase {
126
126
  hidden: boolean
127
127
  }[]
128
128
  }
129
+
130
+ /**
131
+ * When localeSettings is provided on the request, instruct can write to date and datetime fields.
132
+ * Otherwise, such fields will be ignored.
133
+ */
134
+ localeSettings?: {
135
+ /**
136
+ * A valid Unicode BCP 47 locale identifier used to interpret and format
137
+ * natural language inputs and date output. Examples include "en-US", "fr-FR", or "ja-JP".
138
+ *
139
+ * This affects how phrases like "next Friday" or "in two weeks" are parsed,
140
+ * and how resulting dates are presented (e.g., 12-hour vs 24-hour format).
141
+ *
142
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#getcanonicalocales
143
+ */
144
+ locale: string
145
+
146
+ /**
147
+ * A valid IANA time zone identifier used to resolve relative and absolute
148
+ * date expressions to a specific point in time. Examples include
149
+ * "America/New_York", "Europe/Paris", or "Asia/Tokyo".
150
+ *
151
+ * This ensures phrases like "tomorrow at 9am" are interpreted correctly
152
+ * based on the user's local time.
153
+ *
154
+ * @see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
155
+ */
156
+ timeZone: string
157
+ }
129
158
  }
130
159
 
131
160
  interface Sync {
@@ -3137,7 +3137,7 @@ ${selectionOpts}`);
3137
3137
  const dataset2 = hasDataset(client.config());
3138
3138
  return _request(client, httpRequest, {
3139
3139
  method: "POST",
3140
- uri: `/assist/tasks/instruct/${dataset2}`,
3140
+ uri: `/instruct/${dataset2}`,
3141
3141
  body: request
3142
3142
  });
3143
3143
  }