@sanity/cli 8.38.1 → 8.38.2

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.
@@ -38,14 +38,12 @@ import { convertAspectDocuments, formatFieldEntries } from '../media/pullAspects
38
38
  message: `Media library ${library.id} already defines ${modules.length} ${pluralize('aspect', modules.length)}. ` + 'Generate field modules from them (replaces the example fields)?'
39
39
  });
40
40
  if (!shouldPull) return false;
41
- if (skipped.length > 0) {
42
- for (const aspect of skipped){
43
- const errors = aspect.validationErrors.flatMap((group)=>group.map(({ message })=>message));
44
- output.warn(`Skipped aspect ${aspect.id}: ${[
45
- ...aspect.reasons,
46
- ...errors
47
- ].join('; ')}`);
48
- }
41
+ for (const aspect of skipped){
42
+ const errors = aspect.validationErrors.flatMap((group)=>group.map(({ message })=>message));
43
+ output.warn(`Skipped aspect ${aspect.id}: ${[
44
+ ...aspect.reasons,
45
+ ...errors
46
+ ].join('; ')}`);
49
47
  }
50
48
  // The config edit is resolved before anything touches the disk: bailing
51
49
  // after deleting the example modules would leave the scaffold declaring
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/actions/init/offerAspectPull.ts"],"sourcesContent":["import {mkdir, readFile, rm, writeFile} from 'node:fs/promises'\nimport path from 'node:path'\n\nimport {type Output} from '@sanity/cli-core'\nimport {confirm, logSymbols, spinner} from '@sanity/cli-core/ux'\n\nimport {getAspects, type MediaLibrary} from '../../services/mediaLibraries.js'\nimport {pluralize} from '../../util/pluralize.js'\nimport {replaceFieldEntries} from '../media/cliConfigFields.js'\nimport {\n convertAspectDocuments,\n formatFieldEntries,\n type PullableAspectDocument,\n} from '../media/pullAspects.js'\n\n/** Where the scaffold keeps field modules — the template's `fields[*].src` dir. */\nconst FIELDS_DIR = path.join('src', 'fields')\n\n/**\n * Offer to seed the freshly scaffolded config app from the organization's\n * existing aspects. Deploying the config mirrors it into the library —\n * stored aspects the config does not declare get deleted — so a scaffold\n * that starts from the example fields instead of the real ones is a loaded\n * footgun. Pulling at init time defuses it while we are still interactive\n * and authenticated.\n *\n * Only offered when the organization has exactly one active library (no\n * prompt-stacking during init); lookups and conversion errors degrade to a\n * silent skip — the scaffold is complete without this, and\n * `sanity media pull-aspects` covers it later.\n *\n * @returns `true` when the example fields were replaced by pulled modules.\n */\nexport async function offerAspectPull({\n library,\n output,\n outputPath,\n}: {\n library: MediaLibrary\n output: Output\n outputPath: string\n}): Promise<boolean> {\n const spin = spinner('Checking the media library for existing aspects').start()\n let documents: PullableAspectDocument[]\n try {\n documents = await getAspects(library.id)\n } catch {\n return false\n } finally {\n spin.stop()\n }\n if (documents.length === 0) return false\n\n const {modules, skipped} = convertAspectDocuments(documents)\n if (modules.length === 0) return false\n\n const shouldPull = await confirm({\n default: true,\n message:\n `Media library ${library.id} already defines ${modules.length} ${pluralize('aspect', modules.length)}. ` +\n 'Generate field modules from them (replaces the example fields)?',\n })\n if (!shouldPull) return false\n\n if (skipped.length > 0) {\n for (const aspect of skipped) {\n const errors = aspect.validationErrors.flatMap((group) => group.map(({message}) => message))\n output.warn(`Skipped aspect ${aspect.id}: ${[...aspect.reasons, ...errors].join('; ')}`)\n }\n }\n\n // The config edit is resolved before anything touches the disk: bailing\n // after deleting the example modules would leave the scaffold declaring\n // files that no longer exist. On bail the scaffold stays a consistent,\n // working pair (example fields + their declarations), and the caller's\n // `!pulledAspects` branch already points at `sanity media pull-aspects`.\n // The template is `typescriptOnly`, so the scaffold always writes this file.\n const configPath = path.join(outputPath, 'sanity.cli.ts')\n const entryLines = formatFieldEntries(modules, FIELDS_DIR.replaceAll(path.sep, '/')).split('\\n')\n\n const result = replaceFieldEntries(await readFile(configPath, 'utf8'), entryLines)\n if (!result.ok) {\n output.warn(\n `Could not seed the config from the existing aspects (${result.reason}) — the example fields are kept.`,\n )\n return false\n }\n\n // The example modules make way for the real ones: entries are replaced\n // wholesale in the config, so files left behind would just be orphans.\n const fieldsDir = path.join(outputPath, FIELDS_DIR)\n await rm(fieldsDir, {force: true, recursive: true})\n await mkdir(fieldsDir, {recursive: true})\n for (const module of modules) {\n await writeFile(path.join(fieldsDir, module.filename), module.source)\n }\n\n await writeFile(configPath, result.updated)\n output.log(\n `${logSymbols.success} Generated ${modules.length} field ${pluralize('module', modules.length)} from your media library and declared them in sanity.cli.ts`,\n )\n return true\n}\n"],"names":["mkdir","readFile","rm","writeFile","path","confirm","logSymbols","spinner","getAspects","pluralize","replaceFieldEntries","convertAspectDocuments","formatFieldEntries","FIELDS_DIR","join","offerAspectPull","library","output","outputPath","spin","start","documents","id","stop","length","modules","skipped","shouldPull","default","message","aspect","errors","validationErrors","flatMap","group","map","warn","reasons","configPath","entryLines","replaceAll","sep","split","result","ok","reason","fieldsDir","force","recursive","module","filename","source","updated","log","success"],"mappings":"AAAA,SAAQA,KAAK,EAAEC,QAAQ,EAAEC,EAAE,EAAEC,SAAS,QAAO,mBAAkB;AAC/D,OAAOC,UAAU,YAAW;AAG5B,SAAQC,OAAO,EAAEC,UAAU,EAAEC,OAAO,QAAO,sBAAqB;AAEhE,SAAQC,UAAU,QAA0B,mCAAkC;AAC9E,SAAQC,SAAS,QAAO,0BAAyB;AACjD,SAAQC,mBAAmB,QAAO,8BAA6B;AAC/D,SACEC,sBAAsB,EACtBC,kBAAkB,QAEb,0BAAyB;AAEhC,iFAAiF,GACjF,MAAMC,aAAaT,KAAKU,IAAI,CAAC,OAAO;AAEpC;;;;;;;;;;;;;;CAcC,GACD,OAAO,eAAeC,gBAAgB,EACpCC,OAAO,EACPC,MAAM,EACNC,UAAU,EAKX;IACC,MAAMC,OAAOZ,QAAQ,mDAAmDa,KAAK;IAC7E,IAAIC;IACJ,IAAI;QACFA,YAAY,MAAMb,WAAWQ,QAAQM,EAAE;IACzC,EAAE,OAAM;QACN,OAAO;IACT,SAAU;QACRH,KAAKI,IAAI;IACX;IACA,IAAIF,UAAUG,MAAM,KAAK,GAAG,OAAO;IAEnC,MAAM,EAACC,OAAO,EAAEC,OAAO,EAAC,GAAGf,uBAA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IAAI;IACvC,KAAK,MAAMC,UAAUxB,QAAS;QAC5B,MAAMtB,UAAUC,KAAKU,IAAI,CAACgC,WAAWG,OAAOC,QAAQ,GAAGD,OAAOE,MAAM;IACtE;IAEA,MAAMhD,UAAUmC,YAAYK,OAAOS,OAAO;IAC1CnC,OAAOoC,GAAG,CACR,GAAG/C,WAAWgD,OAAO,CAAC,WAAW,EAAE7B,QAAQD,MAAM,CAAC,OAAO,EAAEf,UAAU,UAAUgB,QAAQD,MAAM,EAAE,2DAA2D,CAAC;IAE7J,OAAO;AACT"}
1
+ {"version":3,"sources":["../../../src/actions/init/offerAspectPull.ts"],"sourcesContent":["import {mkdir, readFile, rm, writeFile} from 'node:fs/promises'\nimport path from 'node:path'\n\nimport {type Output} from '@sanity/cli-core'\nimport {confirm, logSymbols, spinner} from '@sanity/cli-core/ux'\n\nimport {getAspects, type MediaLibrary} from '../../services/mediaLibraries.js'\nimport {pluralize} from '../../util/pluralize.js'\nimport {replaceFieldEntries} from '../media/cliConfigFields.js'\nimport {\n convertAspectDocuments,\n formatFieldEntries,\n type PullableAspectDocument,\n} from '../media/pullAspects.js'\n\n/** Where the scaffold keeps field modules — the template's `fields[*].src` dir. */\nconst FIELDS_DIR = path.join('src', 'fields')\n\n/**\n * Offer to seed the freshly scaffolded config app from the organization's\n * existing aspects. Deploying the config mirrors it into the library —\n * stored aspects the config does not declare get deleted — so a scaffold\n * that starts from the example fields instead of the real ones is a loaded\n * footgun. Pulling at init time defuses it while we are still interactive\n * and authenticated.\n *\n * Only offered when the organization has exactly one active library (no\n * prompt-stacking during init); lookups and conversion errors degrade to a\n * silent skip — the scaffold is complete without this, and\n * `sanity media pull-aspects` covers it later.\n *\n * @returns `true` when the example fields were replaced by pulled modules.\n */\nexport async function offerAspectPull({\n library,\n output,\n outputPath,\n}: {\n library: MediaLibrary\n output: Output\n outputPath: string\n}): Promise<boolean> {\n const spin = spinner('Checking the media library for existing aspects').start()\n let documents: PullableAspectDocument[]\n try {\n documents = await getAspects(library.id)\n } catch {\n return false\n } finally {\n spin.stop()\n }\n if (documents.length === 0) return false\n\n const {modules, skipped} = convertAspectDocuments(documents)\n if (modules.length === 0) return false\n\n const shouldPull = await confirm({\n default: true,\n message:\n `Media library ${library.id} already defines ${modules.length} ${pluralize('aspect', modules.length)}. ` +\n 'Generate field modules from them (replaces the example fields)?',\n })\n if (!shouldPull) return false\n\n for (const aspect of skipped) {\n const errors = aspect.validationErrors.flatMap((group) => group.map(({message}) => message))\n output.warn(`Skipped aspect ${aspect.id}: ${[...aspect.reasons, ...errors].join('; ')}`)\n }\n\n // The config edit is resolved before anything touches the disk: bailing\n // after deleting the example modules would leave the scaffold declaring\n // files that no longer exist. On bail the scaffold stays a consistent,\n // working pair (example fields + their declarations), and the caller's\n // `!pulledAspects` branch already points at `sanity media pull-aspects`.\n // The template is `typescriptOnly`, so the scaffold always writes this file.\n const configPath = path.join(outputPath, 'sanity.cli.ts')\n const entryLines = formatFieldEntries(modules, FIELDS_DIR.replaceAll(path.sep, '/')).split('\\n')\n\n const result = replaceFieldEntries(await readFile(configPath, 'utf8'), entryLines)\n if (!result.ok) {\n output.warn(\n `Could not seed the config from the existing aspects (${result.reason}) — the example fields are kept.`,\n )\n return false\n }\n\n // The example modules make way for the real ones: entries are replaced\n // wholesale in the config, so files left behind would just be orphans.\n const fieldsDir = path.join(outputPath, FIELDS_DIR)\n await rm(fieldsDir, {force: true, recursive: true})\n await mkdir(fieldsDir, {recursive: true})\n for (const module of modules) {\n await writeFile(path.join(fieldsDir, module.filename), module.source)\n }\n\n await writeFile(configPath, result.updated)\n output.log(\n `${logSymbols.success} Generated ${modules.length} field ${pluralize('module', modules.length)} from your media library and declared them in sanity.cli.ts`,\n )\n return true\n}\n"],"names":["mkdir","readFile","rm","writeFile","path","confirm","logSymbols","spinner","getAspects","pluralize","replaceFieldEntries","convertAspectDocuments","formatFieldEntries","FIELDS_DIR","join","offerAspectPull","library","output","outputPath","spin","start","documents","id","stop","length","modules","skipped","shouldPull","default","message","aspect","errors","validationErrors","flatMap","group","map","warn","reasons","configPath","entryLines","replaceAll","sep","split","result","ok","reason","fieldsDir","force","recursive","module","filename","source","updated","log","success"],"mappings":"AAAA,SAAQA,KAAK,EAAEC,QAAQ,EAAEC,EAAE,EAAEC,SAAS,QAAO,mBAAkB;AAC/D,OAAOC,UAAU,YAAW;AAG5B,SAAQC,OAAO,EAAEC,UAAU,EAAEC,OAAO,QAAO,sBAAqB;AAEhE,SAAQC,UAAU,QAA0B,mCAAkC;AAC9E,SAAQC,SAAS,QAAO,0BAAyB;AACjD,SAAQC,mBAAmB,QAAO,8BAA6B;AAC/D,SACEC,sBAAsB,EACtBC,kBAAkB,QAEb,0BAAyB;AAEhC,iFAAiF,GACjF,MAAMC,aAAaT,KAAKU,IAAI,CAAC,OAAO;AAEpC;;;;;;;;;;;;;;CAcC,GACD,OAAO,eAAeC,gBAAgB,EACpCC,OAAO,EACPC,MAAM,EACNC,UAAU,EAKX;IACC,MAAMC,OAAOZ,QAAQ,mDAAmDa,KAAK;IAC7E,IAAIC;IACJ,IAAI;QACFA,YAAY,MAAMb,WAAWQ,QAAQM,EAAE;IACzC,EAAE,OAAM;QACN,OAAO;IACT,SAAU;QACRH,KAAKI,IAAI;IACX;IACA,IAAIF,UAAUG,MAAM,KAAK,GAAG,OAAO;IAEnC,MAAM,EAACC,OAAO,EAAEC,OAAO,EAAC,GAAGf,uBAAuBU;IAClD,IAAII,QAAQD,MAAM,KAAK,GAAG,OAAO;IAEjC,MAAMG,aAAa,MAAMtB,QAAQ;QAC/BuB,SAAS;QACTC,SACE,CAAC,cAAc,EAAEb,QAAQM,EAAE,CAAC,iBAAiB,EAAEG,QAAQD,MAAM,CAAC,CAAC,EAAEf,UAAU,UAAUgB,QAAQD,MAAM,EAAE,EAAE,CAAC,GACxG;IACJ;IACA,IAAI,CAACG,YAAY,OAAO;IAExB,KAAK,MAAMG,UAAUJ,QAAS;QAC5B,MAAMK,SAASD,OAAOE,gBAAgB,CAACC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using a specific SSO provider within an organization'
28
28
  }
29
29
  ];
30
- static flags = {
30
+ /* eslint-disable perfectionist/sort-objects -- Keep token login first in generated usage. */ static flags = {
31
31
  'with-token': Flags.boolean({
32
32
  description: 'Read token from standard input',
33
33
  exclusive: [
@@ -35,7 +35,6 @@ export class LoginCommand extends SanityCommand {
35
35
  'sso'
36
36
  ]
37
37
  }),
38
- // eslint-disable-next-line perfectionist/sort-objects -- Keep token login first in generated usage.
39
38
  experimental: Flags.boolean({
40
39
  default: false,
41
40
  hidden: true
@@ -69,7 +68,7 @@ export class LoginCommand extends SanityCommand {
69
68
  helpValue: '<name>'
70
69
  })
71
70
  };
72
- async run() {
71
+ /* eslint-enable perfectionist/sort-objects */ async run() {
73
72
  const { flags } = await this.parse(LoginCommand);
74
73
  const { 'sso-provider': ssoProvider, 'with-token': withToken, ...loginFlags } = flags;
75
74
  try {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/commands/login.ts"],"sourcesContent":["import {Command, Flags} from '@oclif/core'\nimport {type FlagInput} from '@oclif/core/interfaces'\nimport {exitCodes, SanityCommand} from '@sanity/cli-core'\n\nimport {login} from '../actions/auth/login/login.js'\nimport {LOGIN_PROVIDER_IDS} from '../actions/auth/login/loginInstructions.js'\nimport {readTokenFromStdin} from '../util/readTokenFromStdin.js'\n\nexport class LoginCommand extends SanityCommand<typeof LoginCommand> {\n static override description = 'Log in to your Sanity account'\n static override examples: Array<Command.Example> = [\n {\n command: '<%= config.bin %> <%= command.id %>',\n description: 'Log in using default settings',\n },\n {\n command: '<%= config.bin %> <%= command.id %> --with-token < token.txt',\n description: 'Log in using a token from standard input',\n },\n {\n command: '<%= config.bin %> <%= command.id %> --provider github --no-open',\n description: 'Login with GitHub provider, but do not open a browser window automatically',\n },\n {\n command: '<%= config.bin %> <%= command.id %> --sso my-organization',\n description: 'Log in using Single Sign-On with the \"my-organization\" slug',\n },\n {\n command:\n '<%= config.bin %> <%= command.id %> --sso my-organization --sso-provider \"Okta SSO\"',\n description: 'Log in using a specific SSO provider within an organization',\n },\n ]\n static override flags = {\n 'with-token': Flags.boolean({\n description: 'Read token from standard input',\n exclusive: ['provider', 'sso'],\n }),\n // eslint-disable-next-line perfectionist/sort-objects -- Keep token login first in generated usage.\n experimental: Flags.boolean({\n default: false,\n hidden: true,\n }),\n open: Flags.boolean({\n allowNo: true,\n default: true,\n description: 'Open a browser window to log in (`--no-open` only prints URL)',\n }),\n provider: Flags.string({\n description: `Log in using a provider ID (${LOGIN_PROVIDER_IDS.join(', ')})`,\n exclusive: ['sso', 'with-token'],\n helpValue: '<providerId>',\n }),\n sso: Flags.string({\n description: 'Log in using Single Sign-On, using the given organization slug',\n exclusive: ['provider', 'with-token'],\n helpValue: '<slug>',\n }),\n 'sso-provider': Flags.string({\n dependsOn: ['sso'],\n description: 'Select a specific SSO provider by name (use with --sso)',\n helpValue: '<name>',\n }),\n } satisfies FlagInput\n\n public async run(): Promise<void> {\n const {flags} = await this.parse(LoginCommand)\n const {'sso-provider': ssoProvider, 'with-token': withToken, ...loginFlags} = flags\n\n try {\n const token = withToken\n ? await readTokenFromStdin(\n 'Token is required on standard input. Run `sanity login --with-token < token.txt`.',\n )\n : undefined\n\n await login({\n ...loginFlags,\n output: this.output,\n ssoProvider,\n telemetry: this.telemetry,\n token,\n })\n this.log('Login successful')\n } catch (error) {\n const message = error instanceof Error ? error.message : String(error)\n this.error(`Login failed: ${message}`, {exit: exitCodes.RUNTIME_ERROR})\n }\n }\n}\n"],"names":["Flags","exitCodes","SanityCommand","login","LOGIN_PROVIDER_IDS","readTokenFromStdin","LoginCommand","description","examples","command","flags","boolean","exclusive","experimental","default","hidden","open","allowNo","provider","string","join","helpValue","sso","dependsOn","run","parse","ssoProvider","withToken","loginFlags","token","undefined","output","telemetry","log","error","message","Error","String","exit","RUNTIME_ERROR"],"mappings":"AAAA,SAAiBA,KAAK,QAAO,cAAa;AAE1C,SAAQC,SAAS,EAAEC,aAAa,QAAO,mBAAkB;AAEzD,SAAQC,KAA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3B,MAAM;gBACV,GAAGyB,UAAU;gBACbG,QAAQ,IAAI,CAACA,MAAM;gBACnBL;gBACAM,WAAW,IAAI,CAACA,SAAS;gBACzBH;YACF;YACA,IAAI,CAACI,GAAG,CAAC;QACX,EAAE,OAAOC,OAAO;YACd,MAAMC,UAAUD,iBAAiBE,QAAQF,MAAMC,OAAO,GAAGE,OAAOH;YAChE,IAAI,CAACA,KAAK,CAAC,CAAC,cAAc,EAAEC,SAAS,EAAE;gBAACG,MAAMrC,UAAUsC,aAAa;YAAA;QACvE;IACF;AACF"}
1
+ {"version":3,"sources":["../../src/commands/login.ts"],"sourcesContent":["import {Command, Flags} from '@oclif/core'\nimport {type FlagInput} from '@oclif/core/interfaces'\nimport {exitCodes, SanityCommand} from '@sanity/cli-core'\n\nimport {login} from '../actions/auth/login/login.js'\nimport {LOGIN_PROVIDER_IDS} from '../actions/auth/login/loginInstructions.js'\nimport {readTokenFromStdin} from '../util/readTokenFromStdin.js'\n\nexport class LoginCommand extends SanityCommand<typeof LoginCommand> {\n static override description = 'Log in to your Sanity account'\n static override examples: Array<Command.Example> = [\n {\n command: '<%= config.bin %> <%= command.id %>',\n description: 'Log in using default settings',\n },\n {\n command: '<%= config.bin %> <%= command.id %> --with-token < token.txt',\n description: 'Log in using a token from standard input',\n },\n {\n command: '<%= config.bin %> <%= command.id %> --provider github --no-open',\n description: 'Login with GitHub provider, but do not open a browser window automatically',\n },\n {\n command: '<%= config.bin %> <%= command.id %> --sso my-organization',\n description: 'Log in using Single Sign-On with the \"my-organization\" slug',\n },\n {\n command:\n '<%= config.bin %> <%= command.id %> --sso my-organization --sso-provider \"Okta SSO\"',\n description: 'Log in using a specific SSO provider within an organization',\n },\n ]\n /* eslint-disable perfectionist/sort-objects -- Keep token login first in generated usage. */\n static override flags = {\n 'with-token': Flags.boolean({\n description: 'Read token from standard input',\n exclusive: ['provider', 'sso'],\n }),\n experimental: Flags.boolean({\n default: false,\n hidden: true,\n }),\n open: Flags.boolean({\n allowNo: true,\n default: true,\n description: 'Open a browser window to log in (`--no-open` only prints URL)',\n }),\n provider: Flags.string({\n description: `Log in using a provider ID (${LOGIN_PROVIDER_IDS.join(', ')})`,\n exclusive: ['sso', 'with-token'],\n helpValue: '<providerId>',\n }),\n sso: Flags.string({\n description: 'Log in using Single Sign-On, using the given organization slug',\n exclusive: ['provider', 'with-token'],\n helpValue: '<slug>',\n }),\n 'sso-provider': Flags.string({\n dependsOn: ['sso'],\n description: 'Select a specific SSO provider by name (use with --sso)',\n helpValue: '<name>',\n }),\n } satisfies FlagInput\n /* eslint-enable perfectionist/sort-objects */\n\n public async run(): Promise<void> {\n const {flags} = await this.parse(LoginCommand)\n const {'sso-provider': ssoProvider, 'with-token': withToken, ...loginFlags} = flags\n\n try {\n const token = withToken\n ? await readTokenFromStdin(\n 'Token is required on standard input. Run `sanity login --with-token < token.txt`.',\n )\n : undefined\n\n await login({\n ...loginFlags,\n output: this.output,\n ssoProvider,\n telemetry: this.telemetry,\n token,\n })\n this.log('Login successful')\n } catch (error) {\n const message = error instanceof Error ? error.message : String(error)\n this.error(`Login failed: ${message}`, {exit: exitCodes.RUNTIME_ERROR})\n }\n }\n}\n"],"names":["Flags","exitCodes","SanityCommand","login","LOGIN_PROVIDER_IDS","readTokenFromStdin","LoginCommand","description","examples","command","flags","boolean","exclusive","experimental","default","hidden","open","allowNo","provider","string","join","helpValue","sso","dependsOn","run","parse","ssoProvider","withToken","loginFlags","token","undefined","output","telemetry","log","error","message","Error","String","exit","RUNTIME_ERROR"],"mappings":"AAAA,SAAiBA,KAAK,QAAO,cAAa;AAE1C,SAAQC,SAAS,EAAEC,aAAa,QAAO,mBAAkB;AAEzD,SAAQC,KAAK,QAAO,iCAAgC;AACpD,SAAQC,kBAAkB,QAAO,6CAA4C;AAC7E,SAAQC,kBAAkB,QAAO,gCAA+B;AAEhE,OAAO,MAAMC,qBAAqBJ;IAChC,OAAgBK,cAAc,gCAA+B;IAC7D,OAAgBC,WAAmC;QACjD;YACEC,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YACd,MAAMC,UAAUD,iBAAiBE,QAAQF,MAAMC,OAAO,GAAGE,OAAOH;YAChE,IAAI,CAACA,KAAK,CAAC,CAAC,cAAc,EAAEC,SAAS,EAAE;gBAACG,MAAMrC,UAAUsC,aAAa;YAAA;QACvE;IACF;AACF"}
@@ -101,7 +101,9 @@
101
101
  'installations/{installationId}/configs',
102
102
  'installations/{installationId}/configs/{configId}',
103
103
  'installations/{installationId}/interfaces',
104
+ 'organizations/{organizationId}/applications',
104
105
  'organizations/{organizationId}/applications/{applicationId}',
106
+ 'projects/{projectId}/applications',
105
107
  'projects/{projectId}/user-applications',
106
108
  'projects/{projectId}/user-applications/{userApplicationId}',
107
109
  'projects/{projectId}/user-applications/{userApplicationId}/config/{configKey}',
@@ -149,7 +151,9 @@
149
151
  'installations/{installationId}/configs',
150
152
  'installations/{installationId}/configs/{configId}',
151
153
  'installations/{installationId}/interfaces',
154
+ 'organizations/{organizationId}/applications',
152
155
  'organizations/{organizationId}/applications/{applicationId}',
156
+ 'projects/{projectId}/applications',
153
157
  'projects/{projectId}/user-applications',
154
158
  'projects/{projectId}/user-applications/{userApplicationId}',
155
159
  'projects/{projectId}/user-applications/{userApplicationId}/config/{configKey}',
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/generated/apiRoutes.ts"],"sourcesContent":["/**\n * GENERATED FILE - DO NOT EDIT\n *\n * Routing manifest for `sanity api`, distilled from the published OpenAPI\n * specifications at https://www.sanity.io/docs/api/openapi\n *\n * Regenerate with: pnpm generate:api-routes\n */\nimport {type ApiRouteEntry} from '../actions/api/types.js'\n\nexport const apiRoutes: ApiRouteEntry[] = [\n {\n defaultApiVersion: 'v2025-07-11',\n host: 'global',\n pathPatterns: [\n 'access/invites/me',\n 'access/organization/{resourceId}/users/roles/default',\n 'access/requests/me',\n 'access/robots/me',\n 'access/robots/me/rotate',\n 'access/{resourceType}/{resourceId}/invites',\n 'access/{resourceType}/{resourceId}/invites/token/{inviteToken}',\n 'access/{resourceType}/{resourceId}/invites/token/{inviteToken}/accept',\n 'access/{resourceType}/{resourceId}/invites/token/{inviteToken}/eligibility',\n 'access/{resourceType}/{resourceId}/invites/{inviteId}',\n 'access/{resourceType}/{resourceId}/permissions',\n 'access/{resourceType}/{resourceId}/permissions/{permissionName}',\n 'access/{resourceType}/{resourceId}/requests',\n 'access/{resourceType}/{resourceId}/requests/state',\n 'access/{resourceType}/{resourceId}/requests/{requestId}/accept',\n 'access/{resourceType}/{resourceId}/requests/{requestId}/decline',\n 'access/{resourceType}/{resourceId}/robots',\n 'access/{resourceType}/{resourceId}/robots/{robotId}',\n 'access/{resourceType}/{resourceId}/roles',\n 'access/{resourceType}/{resourceId}/roles/{roleName}',\n 'access/{resourceType}/{resourceId}/user-permissions/me',\n 'access/{resourceType}/{resourceId}/user-permissions/me/check',\n 'access/{resourceType}/{resourceId}/users',\n 'access/{resourceType}/{resourceId}/users/me',\n 'access/{resourceType}/{resourceId}/users/{sanityUserId}',\n 'access/{resourceType}/{resourceId}/users/{sanityUserId}/roles',\n 'access/{resourceType}/{resourceId}/users/{sanityUserId}/roles/{roleName}'\n ],\n slug: 'access-api',\n title: 'Access API reference'\n },\n {\n defaultApiVersion: 'v2025-02-19',\n host: 'project',\n pathPatterns: [\n 'data/actions/{dataset}'\n ],\n slug: 'actions',\n title: 'Actions API reference'\n },\n {\n defaultApiVersion: 'v2021-02-01',\n host: 'global',\n pathPatterns: [\n 'activity',\n 'activity/export/csv'\n ],\n slug: 'activity-log',\n title: 'Activity Log API Reference'\n },\n {\n defaultApiVersion: 'vX',\n host: 'project',\n pathPatterns: [\n 'agent/action/generate/{dataset}',\n 'agent/action/patch/{dataset}',\n 'agent/action/prompt/{dataset}',\n 'agent/action/transform/{dataset}',\n 'agent/action/translate/{dataset}'\n ],\n slug: 'agent-actions',\n title: 'Agent Actions'\n },\n {\n host: 'global',\n pathPatterns: [\n 'applications',\n 'applications/dashboards',\n 'applications/dashboards/{dashboardId}',\n 'applications/dashboards/{dashboardId}/configs',\n 'applications/dashboards/{dashboardId}/configs/{configId}',\n 'applications/{applicationId}',\n 'applications/{applicationId}/access',\n 'applications/{applicationId}/deployments',\n 'applications/{applicationId}/embeddable',\n 'applications/{applicationId}/icon',\n 'applications/{applicationId}/installations',\n 'applications/{applicationId}/interfaces',\n 'applications/{applicationId}/interfaces/{interfaceId}/icon',\n 'applications/{applicationId}/workspaces',\n 'deploy',\n 'deploy/quickstart',\n 'installations',\n 'installations/ai-features',\n 'installations/catalog',\n 'installations/defaults',\n 'installations/{installationId}',\n 'installations/{installationId}/access',\n 'installations/{installationId}/configs',\n 'installations/{installationId}/configs/{configId}',\n 'installations/{installationId}/interfaces',\n 'organizations/{organizationId}/applications/{applicationId}',\n 'projects/{projectId}/user-applications',\n 'projects/{projectId}/user-applications/{userApplicationId}',\n 'projects/{projectId}/user-applications/{userApplicationId}/config/{configKey}',\n 'projects/{projectId}/user-applications/{userApplicationId}/deployments',\n 'studiohosts/{appHost}/availability',\n 'user-applications',\n 'user-applications/auto-update-version/{userApplicationId}',\n 'user-applications/resolve/application',\n 'user-applications/resolve/project',\n 'user-applications/workspaces',\n 'user-applications/{userApplicationId}',\n 'user-applications/{userApplicationId}/applicationData',\n 'user-applications/{userApplicationId}/config/{configKey}',\n 'user-applications/{userApplicationId}/deployments',\n 'user-applications/{userApplicationId}/workspaces'\n ],\n slug: 'applications-api',\n title: 'Applications API Reference'\n },\n {\n host: 'project',\n pathPatterns: [\n 'applications',\n 'applications/dashboards',\n 'applications/dashboards/{dashboardId}',\n 'applications/dashboards/{dashboardId}/configs',\n 'applications/dashboards/{dashboardId}/configs/{configId}',\n 'applications/{applicationId}',\n 'applications/{applicationId}/access',\n 'applications/{applicationId}/deployments',\n 'applications/{applicationId}/embeddable',\n 'applications/{applicationId}/icon',\n 'applications/{applicationId}/installations',\n 'applications/{applicationId}/interfaces',\n 'applications/{applicationId}/interfaces/{interfaceId}/icon',\n 'applications/{applicationId}/workspaces',\n 'deploy',\n 'deploy/quickstart',\n 'installations',\n 'installations/ai-features',\n 'installations/catalog',\n 'installations/defaults',\n 'installations/{installationId}',\n 'installations/{installationId}/access',\n 'installations/{installationId}/configs',\n 'installations/{installationId}/configs/{configId}',\n 'installations/{installationId}/interfaces',\n 'organizations/{organizationId}/applications/{applicationId}',\n 'projects/{projectId}/user-applications',\n 'projects/{projectId}/user-applications/{userApplicationId}',\n 'projects/{projectId}/user-applications/{userApplicationId}/config/{configKey}',\n 'projects/{projectId}/user-applications/{userApplicationId}/deployments',\n 'studiohosts/{appHost}/availability',\n 'user-applications',\n 'user-applications/auto-update-version/{userApplicationId}',\n 'user-applications/resolve/application',\n 'user-applications/resolve/project',\n 'user-applications/workspaces',\n 'user-applications/{userApplicationId}',\n 'user-applications/{userApplicationId}/applicationData',\n 'user-applications/{userApplicationId}/config/{configKey}',\n 'user-applications/{userApplicationId}/deployments',\n 'user-applications/{userApplicationId}/workspaces'\n ],\n slug: 'applications-api',\n title: 'Applications API Reference'\n },\n {\n defaultApiVersion: 'v2024-06-24',\n host: 'project',\n pathPatterns: [\n 'assets/files/{dataset}',\n 'assets/files/{dataset}/from-url',\n 'assets/images/{dataset}',\n 'assets/images/{dataset}/from-url',\n 'assets/media-library-link/{dataset}'\n ],\n slug: 'assets',\n title: 'Assets API reference'\n },\n {\n defaultApiVersion: 'v2025-02-19',\n host: 'global',\n pathPatterns: [\n 'projects/{projectId}/datasets/{datasetName}/backups',\n 'projects/{projectId}/datasets/{datasetName}/backups/{backupId}',\n 'projects/{projectId}/datasets/{datasetName}/settings/backups'\n ],\n slug: 'backups',\n title: 'Backups API reference'\n },\n {\n defaultApiVersion: 'v1',\n host: 'global',\n pathPatterns: [\n 'projects/{project_id}/datasets/{dataset_name}/assets/{asset_id}/purges',\n 'projects/{project_id}/datasets/{dataset_name}/purges'\n ],\n slug: 'cdn-cache-purge',\n title: 'CDN Cache Purge API Reference'\n },\n {\n defaultApiVersion: 'vX',\n host: 'global',\n pathPatterns: [\n 'collaboration/comments',\n 'collaboration/comments/listen',\n 'collaboration/comments/query',\n 'collaboration/comments/{id}',\n 'collaboration/comments/{id}/reactions',\n 'collaboration/comments/{id}/reactions/{shortName}'\n ],\n slug: 'comments-api',\n title: 'Comments API reference'\n },\n {\n defaultApiVersion: 'vX',\n host: 'project',\n pathPatterns: [\n 'collaboration/comments',\n 'collaboration/comments/listen',\n 'collaboration/comments/query',\n 'collaboration/comments/{id}',\n 'collaboration/comments/{id}/reactions',\n 'collaboration/comments/{id}/reactions/{shortName}'\n ],\n slug: 'comments-api',\n title: 'Comments API reference'\n },\n {\n defaultApiVersion: 'vX',\n host: 'global',\n pathPatterns: [\n 'agent/prompt',\n 'agent/{organizationId}/threads/{threadId}'\n ],\n slug: 'content-agent',\n title: 'Content Agent API reference'\n },\n {\n host: 'global',\n pathPatterns: [\n 'context/knowledge-bases',\n 'context/knowledge-bases/{knowledgeBaseId}',\n 'context/knowledge-bases/{knowledgeBaseId}/apply',\n 'context/knowledge-bases/{knowledgeBaseId}/build',\n 'context/knowledge-bases/{knowledgeBaseId}/build/cancel',\n 'context/knowledge-bases/{knowledgeBaseId}/discard',\n 'context/knowledge-bases/{knowledgeBaseId}/documents',\n 'context/knowledge-bases/{knowledgeBaseId}/documents/{documentId}',\n 'context/knowledge-bases/{knowledgeBaseId}/documents/{documentId}/content',\n 'context/knowledge-bases/{knowledgeBaseId}/entries/{entryPath}/rebuild',\n 'context/knowledge-bases/{knowledgeBaseId}/instructions',\n 'context/knowledge-bases/{knowledgeBaseId}/instructions/check',\n 'context/knowledge-bases/{knowledgeBaseId}/instructions/draft',\n 'context/knowledge-bases/{knowledgeBaseId}/instructions/{instructionId}',\n 'context/knowledge-bases/{knowledgeBaseId}/issues/apply',\n 'context/knowledge-bases/{knowledgeBaseId}/issues/{issueId}/dismiss',\n 'context/knowledge-bases/{knowledgeBaseId}/issues/{issueId}/reopen',\n 'context/knowledge-bases/{knowledgeBaseId}/issues/{issueId}/resolve',\n 'context/knowledge-bases/{knowledgeBaseId}/jobs/{jobId}',\n 'context/knowledge-bases/{knowledgeBaseId}/sources',\n 'context/knowledge-bases/{knowledgeBaseId}/sources/{sourceId}',\n 'context/knowledge-bases/{knowledgeBaseId}/sources/{sourceId}/syncs',\n 'context/knowledge-bases/{knowledgeBaseId}/sources/{sourceId}/syncs/{syncId}',\n 'context/knowledge-bases/{knowledgeBaseId}/sources/{sourceId}/uploads',\n 'context/knowledge-bases/{knowledgeBaseId}/sync',\n 'context/organizations/{organizationId}/conversations/{threadId}',\n 'context/organizations/{organizationId}/mcp',\n 'context/organizations/{organizationId}/mcp/{mcpEndpoint}',\n 'context/organizations/{organizationId}/mcp/{mcpEndpoint}/initial-context',\n 'context/organizations/{organizationId}/mcp/{mcpEndpoint}/status'\n ],\n slug: 'context-api',\n title: 'Context API reference'\n },\n {\n defaultApiVersion: 'v2025-02-19',\n host: 'global',\n pathPatterns: [\n 'projects/{projectId}/datasets/copy',\n 'projects/{projectId}/datasets/{dataset}/copy'\n ],\n slug: 'copy',\n title: 'Copy API reference'\n },\n {\n defaultApiVersion: 'v2025-02-19',\n host: 'project',\n pathPatterns: [\n 'data/doc/{dataset}/{documentId}'\n ],\n slug: 'doc',\n title: 'Doc API reference'\n },\n {\n defaultApiVersion: 'vX',\n host: 'project',\n pathPatterns: [\n 'embeddings-index/query/{dataset}/{indexName}',\n 'embeddings-index/{dataset}',\n 'embeddings-index/{dataset}/{indexName}'\n ],\n slug: 'embeddings-index',\n title: 'Embeddings Index API reference (deprecated)'\n },\n {\n defaultApiVersion: 'v2025-02-19',\n host: 'project',\n pathPatterns: [\n 'data/export/{dataset}'\n ],\n slug: 'export',\n title: 'Export API reference'\n },\n {\n host: 'global',\n pathPatterns: [\n 'functions',\n 'functions/durables/callback/{callbackId}/failure',\n 'functions/durables/callback/{callbackId}/success',\n 'functions/durables/{functionId}/executions',\n 'functions/durables/{functionId}/executions/{executionId}',\n 'functions/durables/{functionId}/executions/{executionId}/stop',\n 'functions/{functionId}',\n 'functions/{functionId}/envvars',\n 'functions/{functionId}/envvars/{envVarKey}',\n 'functions/{functionId}/invoke',\n 'functions/{functionId}/logs',\n 'functions/{functionId}/logs/stream'\n ],\n slug: 'functions-api',\n title: 'Functions API reference'\n },\n {\n defaultApiVersion: 'v2025-02-19',\n host: 'project',\n pathPatterns: [\n 'data/history/{dataset}/documents/{documentId}',\n 'data/history/{dataset}/transactions',\n 'data/history/{dataset}/transactions/{documentIds}'\n ],\n slug: 'history',\n title: 'History API reference'\n },\n {\n defaultApiVersion: 'v2021-06-07',\n host: 'global',\n pathPatterns: [\n 'jobs/{jobId}',\n 'jobs/{jobId}/listen'\n ],\n slug: 'jobs',\n title: 'Jobs API reference'\n },\n {\n defaultApiVersion: 'v2025-02-19',\n host: 'project',\n pathPatterns: [\n 'data/listen/{dataset}'\n ],\n slug: 'listen',\n title: 'Listen API reference'\n },\n {\n defaultApiVersion: 'v2025-02-19',\n host: 'project',\n pathPatterns: [\n 'data/live/events/{dataset}'\n ],\n slug: 'live',\n title: 'Live Content API reference'\n },\n {\n defaultApiVersion: 'v2025-02-19',\n host: 'global',\n pathPatterns: [\n 'media-libraries/{libraryId}/from-url',\n 'media-libraries/{libraryId}/mutate',\n 'media-libraries/{libraryId}/query',\n 'media-libraries/{libraryId}/references/documents/{assetId}/to',\n 'media-libraries/{libraryId}/refsearch',\n 'media-libraries/{libraryId}/signing-keys',\n 'media-libraries/{libraryId}/signing-keys/{keyId}',\n 'media-libraries/{libraryId}/upload',\n 'media-libraries/{libraryId}/video/{videoId}/playback-info',\n 'media-libraries/{libraryId}/video/{videoId}/playback/{type}',\n 'media-libraries/{libraryId}/video/{videoId}/renditions/{name}',\n 'media-libraries/{libraryId}/video/{videoId}/subtitles',\n 'media-libraries/{libraryId}/video/{videoId}/subtitles/upload',\n 'media-libraries/{libraryId}/video/{videoId}/subtitles/{subtitleId}'\n ],\n slug: 'media-library',\n title: 'Media Library API reference'\n },\n {\n defaultApiVersion: 'v2025-09-09',\n host: 'project',\n pathPatterns: [\n 'media-libraries/{libraryId}/from-url',\n 'media-libraries/{libraryId}/mutate',\n 'media-libraries/{libraryId}/query',\n 'media-libraries/{libraryId}/references/documents/{assetId}/to',\n 'media-libraries/{libraryId}/refsearch',\n 'media-libraries/{libraryId}/signing-keys',\n 'media-libraries/{libraryId}/signing-keys/{keyId}',\n 'media-libraries/{libraryId}/upload',\n 'media-libraries/{libraryId}/video/{videoId}/playback-info',\n 'media-libraries/{libraryId}/video/{videoId}/playback/{type}',\n 'media-libraries/{libraryId}/video/{videoId}/renditions/{name}',\n 'media-libraries/{libraryId}/video/{videoId}/subtitles',\n 'media-libraries/{libraryId}/video/{videoId}/subtitles/upload',\n 'media-libraries/{libraryId}/video/{videoId}/subtitles/{subtitleId}'\n ],\n slug: 'media-library',\n title: 'Media Library API reference'\n },\n {\n defaultApiVersion: 'v2025-02-19',\n host: 'project',\n pathPatterns: [\n 'data/mutate/{dataset}'\n ],\n slug: 'mutation',\n title: 'Mutation API reference'\n },\n {\n defaultApiVersion: 'v2021-06-07',\n host: 'global',\n pathPatterns: [\n 'projects',\n 'projects/{projectId}',\n 'projects/{projectId}/cors',\n 'projects/{projectId}/cors/{id}',\n 'projects/{projectId}/datasets',\n 'projects/{projectId}/datasets/copy',\n 'projects/{projectId}/datasets/{datasetName}/tags/{tagIdentifier}',\n 'projects/{projectId}/datasets/{name}',\n 'projects/{projectId}/datasets/{name}/copy',\n 'projects/{projectId}/datasets/{name}/settings/embeddings',\n 'projects/{projectId}/datasets/{name}/tags',\n 'projects/{projectId}/features',\n 'projects/{projectId}/permissions',\n 'projects/{projectId}/tags',\n 'projects/{projectId}/tags/{tagIdentifier}',\n 'projects/{projectId}/tokens',\n 'projects/{projectId}/tokens/{tokenId}',\n 'projects/{projectId}/users/{userId}'\n ],\n slug: 'projects-api',\n title: 'Projects API reference'\n },\n {\n defaultApiVersion: 'v2025-02-19',\n host: 'project',\n pathPatterns: [\n 'data/query/{dataset}'\n ],\n slug: 'query',\n title: 'Query API reference'\n },\n {\n defaultApiVersion: 'v2021-10-04',\n host: 'global',\n pathPatterns: [\n 'auth/organizations/{organizationId}/providers/{providerId}/projects/{projectId}/role-mappings',\n 'organizations/{organizationId}/acl',\n 'organizations/{organizationId}/acl/{sanityUserId}',\n 'organizations/{organizationId}/grants',\n 'projects/{projectId}/acl',\n 'projects/{projectId}/acl/{projectUserId}',\n 'projects/{projectId}/datasets/{datasetName}/acl',\n 'projects/{projectId}/datasets/{datasetName}/grants',\n 'projects/{projectId}/grants',\n 'projects/{projectId}/grants/{projectUserId}',\n 'projects/{projectId}/permissionResourceSchemas',\n 'projects/{projectId}/permissionResources',\n 'projects/{projectId}/permissionResources/{resourceId}',\n 'projects/{projectId}/roles',\n 'projects/{projectId}/roles/{roleName}'\n ],\n slug: 'roles',\n title: 'Roles API reference'\n },\n {\n defaultApiVersion: 'v2022-04-01',\n host: 'project',\n pathPatterns: [\n 'publish/{projectId}/{dataset}',\n 'schedules/{projectId}/{dataset}',\n 'schedules/{projectId}/{dataset}/{scheduleId}',\n 'schedules/{projectId}/{dataset}/{scheduleId}/publish',\n 'unpublish/{projectId}/{dataset}'\n ],\n slug: 'scheduling',\n title: 'Scheduling API reference'\n },\n {\n defaultApiVersion: 'v2026-09-01',\n host: 'global',\n pathPatterns: [\n 'usage/{resourceType}/{resourceId}/history',\n 'usage/{resourceType}/{resourceId}/snapshot',\n 'usage/{resourceType}/{resourceId}/{scope}/history',\n 'usage/{resourceType}/{resourceId}/{scope}/snapshot'\n ],\n slug: 'usage-api',\n title: 'Usage API reference'\n },\n {\n defaultApiVersion: 'v2026-04-27',\n host: 'global',\n pathPatterns: [\n 'organizations/{organizationId}/attribute-definitions',\n 'organizations/{organizationId}/attribute-definitions/{key}',\n 'organizations/{organizationId}/users/me/attributes',\n 'organizations/{organizationId}/users/{sanityUserId}/attributes'\n ],\n slug: 'user-attributes',\n title: 'User attributes API reference'\n },\n {\n defaultApiVersion: 'v2025-02-19',\n host: 'project',\n pathPatterns: [\n 'hooks/projects/{projectId}',\n 'hooks/projects/{projectId}/attempts/{attemptId}',\n 'hooks/projects/{projectId}/{id}',\n 'hooks/projects/{projectId}/{id}/attempts',\n 'hooks/projects/{projectId}/{id}/messages',\n 'hooks/projects/{projectId}/{id}/messages/{messageId}/attempts'\n ],\n slug: 'webhooks',\n title: 'Webhooks API reference'\n }\n]\n"],"names":["apiRoutes","defaultApiVersion","host","pathPatterns","slug","title"],"mappings":"AAAA;;;;;;;CAOC,GAGD,OAAO,MAAMA,YAA6B;IACxC;QACEC,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;YACA;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;YACA;YACA;YACA;YACA;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEH,MAAM;QACNC,cAAc;YACZ;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEH,MAAM;QACNC,cAAc;YACZ;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;YACA;YACA;YACA;YACA;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;YACA;YACA;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;YACA;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;YACA;YACA;YACA;YACA;YACA;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;YACA;YACA;YACA;YACA;YACA;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;YACA;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEH,MAAM;QACNC,cAAc;YACZ;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;YACA;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;YACA;YACA;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEH,MAAM;QACNC,cAAc;YACZ;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;YACA;YACA;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;YACA;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;YACA;YACA;YACA;YACA;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;YACA;YACA;YACA;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;YACA;YACA;YACA;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;YACA;YACA;YACA;YACA;YACA;SACD;QACDC,MAAM;QACNC,OAAO;IACT;CACD,CAAA"}
1
+ {"version":3,"sources":["../../src/generated/apiRoutes.ts"],"sourcesContent":["/**\n * GENERATED FILE - DO NOT EDIT\n *\n * Routing manifest for `sanity api`, distilled from the published OpenAPI\n * specifications at https://www.sanity.io/docs/api/openapi\n *\n * Regenerate with: pnpm generate:api-routes\n */\nimport {type ApiRouteEntry} from '../actions/api/types.js'\n\nexport const apiRoutes: ApiRouteEntry[] = [\n {\n defaultApiVersion: 'v2025-07-11',\n host: 'global',\n pathPatterns: [\n 'access/invites/me',\n 'access/organization/{resourceId}/users/roles/default',\n 'access/requests/me',\n 'access/robots/me',\n 'access/robots/me/rotate',\n 'access/{resourceType}/{resourceId}/invites',\n 'access/{resourceType}/{resourceId}/invites/token/{inviteToken}',\n 'access/{resourceType}/{resourceId}/invites/token/{inviteToken}/accept',\n 'access/{resourceType}/{resourceId}/invites/token/{inviteToken}/eligibility',\n 'access/{resourceType}/{resourceId}/invites/{inviteId}',\n 'access/{resourceType}/{resourceId}/permissions',\n 'access/{resourceType}/{resourceId}/permissions/{permissionName}',\n 'access/{resourceType}/{resourceId}/requests',\n 'access/{resourceType}/{resourceId}/requests/state',\n 'access/{resourceType}/{resourceId}/requests/{requestId}/accept',\n 'access/{resourceType}/{resourceId}/requests/{requestId}/decline',\n 'access/{resourceType}/{resourceId}/robots',\n 'access/{resourceType}/{resourceId}/robots/{robotId}',\n 'access/{resourceType}/{resourceId}/roles',\n 'access/{resourceType}/{resourceId}/roles/{roleName}',\n 'access/{resourceType}/{resourceId}/user-permissions/me',\n 'access/{resourceType}/{resourceId}/user-permissions/me/check',\n 'access/{resourceType}/{resourceId}/users',\n 'access/{resourceType}/{resourceId}/users/me',\n 'access/{resourceType}/{resourceId}/users/{sanityUserId}',\n 'access/{resourceType}/{resourceId}/users/{sanityUserId}/roles',\n 'access/{resourceType}/{resourceId}/users/{sanityUserId}/roles/{roleName}'\n ],\n slug: 'access-api',\n title: 'Access API reference'\n },\n {\n defaultApiVersion: 'v2025-02-19',\n host: 'project',\n pathPatterns: [\n 'data/actions/{dataset}'\n ],\n slug: 'actions',\n title: 'Actions API reference'\n },\n {\n defaultApiVersion: 'v2021-02-01',\n host: 'global',\n pathPatterns: [\n 'activity',\n 'activity/export/csv'\n ],\n slug: 'activity-log',\n title: 'Activity Log API Reference'\n },\n {\n defaultApiVersion: 'vX',\n host: 'project',\n pathPatterns: [\n 'agent/action/generate/{dataset}',\n 'agent/action/patch/{dataset}',\n 'agent/action/prompt/{dataset}',\n 'agent/action/transform/{dataset}',\n 'agent/action/translate/{dataset}'\n ],\n slug: 'agent-actions',\n title: 'Agent Actions'\n },\n {\n host: 'global',\n pathPatterns: [\n 'applications',\n 'applications/dashboards',\n 'applications/dashboards/{dashboardId}',\n 'applications/dashboards/{dashboardId}/configs',\n 'applications/dashboards/{dashboardId}/configs/{configId}',\n 'applications/{applicationId}',\n 'applications/{applicationId}/access',\n 'applications/{applicationId}/deployments',\n 'applications/{applicationId}/embeddable',\n 'applications/{applicationId}/icon',\n 'applications/{applicationId}/installations',\n 'applications/{applicationId}/interfaces',\n 'applications/{applicationId}/interfaces/{interfaceId}/icon',\n 'applications/{applicationId}/workspaces',\n 'deploy',\n 'deploy/quickstart',\n 'installations',\n 'installations/ai-features',\n 'installations/catalog',\n 'installations/defaults',\n 'installations/{installationId}',\n 'installations/{installationId}/access',\n 'installations/{installationId}/configs',\n 'installations/{installationId}/configs/{configId}',\n 'installations/{installationId}/interfaces',\n 'organizations/{organizationId}/applications',\n 'organizations/{organizationId}/applications/{applicationId}',\n 'projects/{projectId}/applications',\n 'projects/{projectId}/user-applications',\n 'projects/{projectId}/user-applications/{userApplicationId}',\n 'projects/{projectId}/user-applications/{userApplicationId}/config/{configKey}',\n 'projects/{projectId}/user-applications/{userApplicationId}/deployments',\n 'studiohosts/{appHost}/availability',\n 'user-applications',\n 'user-applications/auto-update-version/{userApplicationId}',\n 'user-applications/resolve/application',\n 'user-applications/resolve/project',\n 'user-applications/workspaces',\n 'user-applications/{userApplicationId}',\n 'user-applications/{userApplicationId}/applicationData',\n 'user-applications/{userApplicationId}/config/{configKey}',\n 'user-applications/{userApplicationId}/deployments',\n 'user-applications/{userApplicationId}/workspaces'\n ],\n slug: 'applications-api',\n title: 'Applications API Reference'\n },\n {\n host: 'project',\n pathPatterns: [\n 'applications',\n 'applications/dashboards',\n 'applications/dashboards/{dashboardId}',\n 'applications/dashboards/{dashboardId}/configs',\n 'applications/dashboards/{dashboardId}/configs/{configId}',\n 'applications/{applicationId}',\n 'applications/{applicationId}/access',\n 'applications/{applicationId}/deployments',\n 'applications/{applicationId}/embeddable',\n 'applications/{applicationId}/icon',\n 'applications/{applicationId}/installations',\n 'applications/{applicationId}/interfaces',\n 'applications/{applicationId}/interfaces/{interfaceId}/icon',\n 'applications/{applicationId}/workspaces',\n 'deploy',\n 'deploy/quickstart',\n 'installations',\n 'installations/ai-features',\n 'installations/catalog',\n 'installations/defaults',\n 'installations/{installationId}',\n 'installations/{installationId}/access',\n 'installations/{installationId}/configs',\n 'installations/{installationId}/configs/{configId}',\n 'installations/{installationId}/interfaces',\n 'organizations/{organizationId}/applications',\n 'organizations/{organizationId}/applications/{applicationId}',\n 'projects/{projectId}/applications',\n 'projects/{projectId}/user-applications',\n 'projects/{projectId}/user-applications/{userApplicationId}',\n 'projects/{projectId}/user-applications/{userApplicationId}/config/{configKey}',\n 'projects/{projectId}/user-applications/{userApplicationId}/deployments',\n 'studiohosts/{appHost}/availability',\n 'user-applications',\n 'user-applications/auto-update-version/{userApplicationId}',\n 'user-applications/resolve/application',\n 'user-applications/resolve/project',\n 'user-applications/workspaces',\n 'user-applications/{userApplicationId}',\n 'user-applications/{userApplicationId}/applicationData',\n 'user-applications/{userApplicationId}/config/{configKey}',\n 'user-applications/{userApplicationId}/deployments',\n 'user-applications/{userApplicationId}/workspaces'\n ],\n slug: 'applications-api',\n title: 'Applications API Reference'\n },\n {\n defaultApiVersion: 'v2024-06-24',\n host: 'project',\n pathPatterns: [\n 'assets/files/{dataset}',\n 'assets/files/{dataset}/from-url',\n 'assets/images/{dataset}',\n 'assets/images/{dataset}/from-url',\n 'assets/media-library-link/{dataset}'\n ],\n slug: 'assets',\n title: 'Assets API reference'\n },\n {\n defaultApiVersion: 'v2025-02-19',\n host: 'global',\n pathPatterns: [\n 'projects/{projectId}/datasets/{datasetName}/backups',\n 'projects/{projectId}/datasets/{datasetName}/backups/{backupId}',\n 'projects/{projectId}/datasets/{datasetName}/settings/backups'\n ],\n slug: 'backups',\n title: 'Backups API reference'\n },\n {\n defaultApiVersion: 'v1',\n host: 'global',\n pathPatterns: [\n 'projects/{project_id}/datasets/{dataset_name}/assets/{asset_id}/purges',\n 'projects/{project_id}/datasets/{dataset_name}/purges'\n ],\n slug: 'cdn-cache-purge',\n title: 'CDN Cache Purge API Reference'\n },\n {\n defaultApiVersion: 'vX',\n host: 'global',\n pathPatterns: [\n 'collaboration/comments',\n 'collaboration/comments/listen',\n 'collaboration/comments/query',\n 'collaboration/comments/{id}',\n 'collaboration/comments/{id}/reactions',\n 'collaboration/comments/{id}/reactions/{shortName}'\n ],\n slug: 'comments-api',\n title: 'Comments API reference'\n },\n {\n defaultApiVersion: 'vX',\n host: 'project',\n pathPatterns: [\n 'collaboration/comments',\n 'collaboration/comments/listen',\n 'collaboration/comments/query',\n 'collaboration/comments/{id}',\n 'collaboration/comments/{id}/reactions',\n 'collaboration/comments/{id}/reactions/{shortName}'\n ],\n slug: 'comments-api',\n title: 'Comments API reference'\n },\n {\n defaultApiVersion: 'vX',\n host: 'global',\n pathPatterns: [\n 'agent/prompt',\n 'agent/{organizationId}/threads/{threadId}'\n ],\n slug: 'content-agent',\n title: 'Content Agent API reference'\n },\n {\n host: 'global',\n pathPatterns: [\n 'context/knowledge-bases',\n 'context/knowledge-bases/{knowledgeBaseId}',\n 'context/knowledge-bases/{knowledgeBaseId}/apply',\n 'context/knowledge-bases/{knowledgeBaseId}/build',\n 'context/knowledge-bases/{knowledgeBaseId}/build/cancel',\n 'context/knowledge-bases/{knowledgeBaseId}/discard',\n 'context/knowledge-bases/{knowledgeBaseId}/documents',\n 'context/knowledge-bases/{knowledgeBaseId}/documents/{documentId}',\n 'context/knowledge-bases/{knowledgeBaseId}/documents/{documentId}/content',\n 'context/knowledge-bases/{knowledgeBaseId}/entries/{entryPath}/rebuild',\n 'context/knowledge-bases/{knowledgeBaseId}/instructions',\n 'context/knowledge-bases/{knowledgeBaseId}/instructions/check',\n 'context/knowledge-bases/{knowledgeBaseId}/instructions/draft',\n 'context/knowledge-bases/{knowledgeBaseId}/instructions/{instructionId}',\n 'context/knowledge-bases/{knowledgeBaseId}/issues/apply',\n 'context/knowledge-bases/{knowledgeBaseId}/issues/{issueId}/dismiss',\n 'context/knowledge-bases/{knowledgeBaseId}/issues/{issueId}/reopen',\n 'context/knowledge-bases/{knowledgeBaseId}/issues/{issueId}/resolve',\n 'context/knowledge-bases/{knowledgeBaseId}/jobs/{jobId}',\n 'context/knowledge-bases/{knowledgeBaseId}/sources',\n 'context/knowledge-bases/{knowledgeBaseId}/sources/{sourceId}',\n 'context/knowledge-bases/{knowledgeBaseId}/sources/{sourceId}/syncs',\n 'context/knowledge-bases/{knowledgeBaseId}/sources/{sourceId}/syncs/{syncId}',\n 'context/knowledge-bases/{knowledgeBaseId}/sources/{sourceId}/uploads',\n 'context/knowledge-bases/{knowledgeBaseId}/sync',\n 'context/organizations/{organizationId}/conversations/{threadId}',\n 'context/organizations/{organizationId}/mcp',\n 'context/organizations/{organizationId}/mcp/{mcpEndpoint}',\n 'context/organizations/{organizationId}/mcp/{mcpEndpoint}/initial-context',\n 'context/organizations/{organizationId}/mcp/{mcpEndpoint}/status'\n ],\n slug: 'context-api',\n title: 'Context API reference'\n },\n {\n defaultApiVersion: 'v2025-02-19',\n host: 'global',\n pathPatterns: [\n 'projects/{projectId}/datasets/copy',\n 'projects/{projectId}/datasets/{dataset}/copy'\n ],\n slug: 'copy',\n title: 'Copy API reference'\n },\n {\n defaultApiVersion: 'v2025-02-19',\n host: 'project',\n pathPatterns: [\n 'data/doc/{dataset}/{documentId}'\n ],\n slug: 'doc',\n title: 'Doc API reference'\n },\n {\n defaultApiVersion: 'vX',\n host: 'project',\n pathPatterns: [\n 'embeddings-index/query/{dataset}/{indexName}',\n 'embeddings-index/{dataset}',\n 'embeddings-index/{dataset}/{indexName}'\n ],\n slug: 'embeddings-index',\n title: 'Embeddings Index API reference (deprecated)'\n },\n {\n defaultApiVersion: 'v2025-02-19',\n host: 'project',\n pathPatterns: [\n 'data/export/{dataset}'\n ],\n slug: 'export',\n title: 'Export API reference'\n },\n {\n host: 'global',\n pathPatterns: [\n 'functions',\n 'functions/durables/callback/{callbackId}/failure',\n 'functions/durables/callback/{callbackId}/success',\n 'functions/durables/{functionId}/executions',\n 'functions/durables/{functionId}/executions/{executionId}',\n 'functions/durables/{functionId}/executions/{executionId}/stop',\n 'functions/{functionId}',\n 'functions/{functionId}/envvars',\n 'functions/{functionId}/envvars/{envVarKey}',\n 'functions/{functionId}/invoke',\n 'functions/{functionId}/logs',\n 'functions/{functionId}/logs/stream'\n ],\n slug: 'functions-api',\n title: 'Functions API reference'\n },\n {\n defaultApiVersion: 'v2025-02-19',\n host: 'project',\n pathPatterns: [\n 'data/history/{dataset}/documents/{documentId}',\n 'data/history/{dataset}/transactions',\n 'data/history/{dataset}/transactions/{documentIds}'\n ],\n slug: 'history',\n title: 'History API reference'\n },\n {\n defaultApiVersion: 'v2021-06-07',\n host: 'global',\n pathPatterns: [\n 'jobs/{jobId}',\n 'jobs/{jobId}/listen'\n ],\n slug: 'jobs',\n title: 'Jobs API reference'\n },\n {\n defaultApiVersion: 'v2025-02-19',\n host: 'project',\n pathPatterns: [\n 'data/listen/{dataset}'\n ],\n slug: 'listen',\n title: 'Listen API reference'\n },\n {\n defaultApiVersion: 'v2025-02-19',\n host: 'project',\n pathPatterns: [\n 'data/live/events/{dataset}'\n ],\n slug: 'live',\n title: 'Live Content API reference'\n },\n {\n defaultApiVersion: 'v2025-02-19',\n host: 'global',\n pathPatterns: [\n 'media-libraries/{libraryId}/from-url',\n 'media-libraries/{libraryId}/mutate',\n 'media-libraries/{libraryId}/query',\n 'media-libraries/{libraryId}/references/documents/{assetId}/to',\n 'media-libraries/{libraryId}/refsearch',\n 'media-libraries/{libraryId}/signing-keys',\n 'media-libraries/{libraryId}/signing-keys/{keyId}',\n 'media-libraries/{libraryId}/upload',\n 'media-libraries/{libraryId}/video/{videoId}/playback-info',\n 'media-libraries/{libraryId}/video/{videoId}/playback/{type}',\n 'media-libraries/{libraryId}/video/{videoId}/renditions/{name}',\n 'media-libraries/{libraryId}/video/{videoId}/subtitles',\n 'media-libraries/{libraryId}/video/{videoId}/subtitles/upload',\n 'media-libraries/{libraryId}/video/{videoId}/subtitles/{subtitleId}'\n ],\n slug: 'media-library',\n title: 'Media Library API reference'\n },\n {\n defaultApiVersion: 'v2025-09-09',\n host: 'project',\n pathPatterns: [\n 'media-libraries/{libraryId}/from-url',\n 'media-libraries/{libraryId}/mutate',\n 'media-libraries/{libraryId}/query',\n 'media-libraries/{libraryId}/references/documents/{assetId}/to',\n 'media-libraries/{libraryId}/refsearch',\n 'media-libraries/{libraryId}/signing-keys',\n 'media-libraries/{libraryId}/signing-keys/{keyId}',\n 'media-libraries/{libraryId}/upload',\n 'media-libraries/{libraryId}/video/{videoId}/playback-info',\n 'media-libraries/{libraryId}/video/{videoId}/playback/{type}',\n 'media-libraries/{libraryId}/video/{videoId}/renditions/{name}',\n 'media-libraries/{libraryId}/video/{videoId}/subtitles',\n 'media-libraries/{libraryId}/video/{videoId}/subtitles/upload',\n 'media-libraries/{libraryId}/video/{videoId}/subtitles/{subtitleId}'\n ],\n slug: 'media-library',\n title: 'Media Library API reference'\n },\n {\n defaultApiVersion: 'v2025-02-19',\n host: 'project',\n pathPatterns: [\n 'data/mutate/{dataset}'\n ],\n slug: 'mutation',\n title: 'Mutation API reference'\n },\n {\n defaultApiVersion: 'v2021-06-07',\n host: 'global',\n pathPatterns: [\n 'projects',\n 'projects/{projectId}',\n 'projects/{projectId}/cors',\n 'projects/{projectId}/cors/{id}',\n 'projects/{projectId}/datasets',\n 'projects/{projectId}/datasets/copy',\n 'projects/{projectId}/datasets/{datasetName}/tags/{tagIdentifier}',\n 'projects/{projectId}/datasets/{name}',\n 'projects/{projectId}/datasets/{name}/copy',\n 'projects/{projectId}/datasets/{name}/settings/embeddings',\n 'projects/{projectId}/datasets/{name}/tags',\n 'projects/{projectId}/features',\n 'projects/{projectId}/permissions',\n 'projects/{projectId}/tags',\n 'projects/{projectId}/tags/{tagIdentifier}',\n 'projects/{projectId}/tokens',\n 'projects/{projectId}/tokens/{tokenId}',\n 'projects/{projectId}/users/{userId}'\n ],\n slug: 'projects-api',\n title: 'Projects API reference'\n },\n {\n defaultApiVersion: 'v2025-02-19',\n host: 'project',\n pathPatterns: [\n 'data/query/{dataset}'\n ],\n slug: 'query',\n title: 'Query API reference'\n },\n {\n defaultApiVersion: 'v2021-10-04',\n host: 'global',\n pathPatterns: [\n 'auth/organizations/{organizationId}/providers/{providerId}/projects/{projectId}/role-mappings',\n 'organizations/{organizationId}/acl',\n 'organizations/{organizationId}/acl/{sanityUserId}',\n 'organizations/{organizationId}/grants',\n 'projects/{projectId}/acl',\n 'projects/{projectId}/acl/{projectUserId}',\n 'projects/{projectId}/datasets/{datasetName}/acl',\n 'projects/{projectId}/datasets/{datasetName}/grants',\n 'projects/{projectId}/grants',\n 'projects/{projectId}/grants/{projectUserId}',\n 'projects/{projectId}/permissionResourceSchemas',\n 'projects/{projectId}/permissionResources',\n 'projects/{projectId}/permissionResources/{resourceId}',\n 'projects/{projectId}/roles',\n 'projects/{projectId}/roles/{roleName}'\n ],\n slug: 'roles',\n title: 'Roles API reference'\n },\n {\n defaultApiVersion: 'v2022-04-01',\n host: 'project',\n pathPatterns: [\n 'publish/{projectId}/{dataset}',\n 'schedules/{projectId}/{dataset}',\n 'schedules/{projectId}/{dataset}/{scheduleId}',\n 'schedules/{projectId}/{dataset}/{scheduleId}/publish',\n 'unpublish/{projectId}/{dataset}'\n ],\n slug: 'scheduling',\n title: 'Scheduling API reference'\n },\n {\n defaultApiVersion: 'v2026-09-01',\n host: 'global',\n pathPatterns: [\n 'usage/{resourceType}/{resourceId}/history',\n 'usage/{resourceType}/{resourceId}/snapshot',\n 'usage/{resourceType}/{resourceId}/{scope}/history',\n 'usage/{resourceType}/{resourceId}/{scope}/snapshot'\n ],\n slug: 'usage-api',\n title: 'Usage API reference'\n },\n {\n defaultApiVersion: 'v2026-04-27',\n host: 'global',\n pathPatterns: [\n 'organizations/{organizationId}/attribute-definitions',\n 'organizations/{organizationId}/attribute-definitions/{key}',\n 'organizations/{organizationId}/users/me/attributes',\n 'organizations/{organizationId}/users/{sanityUserId}/attributes'\n ],\n slug: 'user-attributes',\n title: 'User attributes API reference'\n },\n {\n defaultApiVersion: 'v2025-02-19',\n host: 'project',\n pathPatterns: [\n 'hooks/projects/{projectId}',\n 'hooks/projects/{projectId}/attempts/{attemptId}',\n 'hooks/projects/{projectId}/{id}',\n 'hooks/projects/{projectId}/{id}/attempts',\n 'hooks/projects/{projectId}/{id}/messages',\n 'hooks/projects/{projectId}/{id}/messages/{messageId}/attempts'\n ],\n slug: 'webhooks',\n title: 'Webhooks API reference'\n }\n]\n"],"names":["apiRoutes","defaultApiVersion","host","pathPatterns","slug","title"],"mappings":"AAAA;;;;;;;CAOC,GAGD,OAAO,MAAMA,YAA6B;IACxC;QACEC,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;YACA;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;YACA;YACA;YACA;YACA;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEH,MAAM;QACNC,cAAc;YACZ;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEH,MAAM;QACNC,cAAc;YACZ;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;YACA;YACA;YACA;YACA;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;YACA;YACA;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;YACA;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;YACA;YACA;YACA;YACA;YACA;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;YACA;YACA;YACA;YACA;YACA;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;YACA;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEH,MAAM;QACNC,cAAc;YACZ;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;YACA;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;YACA;YACA;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEH,MAAM;QACNC,cAAc;YACZ;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;YACA;YACA;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;YACA;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;YACA;YACA;YACA;YACA;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;YACA;YACA;YACA;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;YACA;YACA;YACA;SACD;QACDC,MAAM;QACNC,OAAO;IACT;IACA;QACEJ,mBAAmB;QACnBC,MAAM;QACNC,cAAc;YACZ;YACA;YACA;YACA;YACA;YACA;SACD;QACDC,MAAM;QACNC,OAAO;IACT;CACD,CAAA"}