@executor-js/plugin-openapi 1.5.14 → 1.5.16

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 (62) hide show
  1. package/dist/AddOpenApiSource-U7AYB224.js +369 -0
  2. package/dist/AddOpenApiSource-U7AYB224.js.map +1 -0
  3. package/dist/{OpenApiAccountsPanel-Y2RGBSSL.js → OpenApiAccountsPanel-GHFHHE6P.js} +15 -39
  4. package/dist/OpenApiAccountsPanel-GHFHHE6P.js.map +1 -0
  5. package/dist/{UpdateSpecSection-MIZ5GLBM.js → UpdateSpecSection-PLCBUU4I.js} +4 -4
  6. package/dist/UpdateSpecSection-PLCBUU4I.js.map +1 -0
  7. package/dist/api/group.d.ts +0 -21
  8. package/dist/api/index.d.ts +0 -21
  9. package/dist/{chunk-PNOEE3ET.js → chunk-3FM2SWM4.js} +643 -569
  10. package/dist/chunk-3FM2SWM4.js.map +1 -0
  11. package/dist/chunk-CKBX4SXK.js +95 -0
  12. package/dist/chunk-CKBX4SXK.js.map +1 -0
  13. package/dist/{chunk-GS5YN6J4.js → chunk-CPPTKUOW.js} +5 -14
  14. package/dist/chunk-CPPTKUOW.js.map +1 -0
  15. package/dist/{chunk-RFSMGUBJ.js → chunk-KVPUDOJZ.js} +83 -8
  16. package/dist/chunk-KVPUDOJZ.js.map +1 -0
  17. package/dist/{chunk-PAHWRRS3.js → chunk-QQFCICLX.js} +4 -13
  18. package/dist/chunk-QQFCICLX.js.map +1 -0
  19. package/dist/client.js +4 -5
  20. package/dist/client.js.map +1 -1
  21. package/dist/core.js +25 -15
  22. package/dist/core.js.map +1 -1
  23. package/dist/index.js +4 -5
  24. package/dist/index.js.map +1 -1
  25. package/dist/react/atoms.d.ts +0 -22
  26. package/dist/react/client.d.ts +0 -21
  27. package/dist/react/index.d.ts +2 -0
  28. package/dist/sdk/backing.d.ts +54 -0
  29. package/dist/sdk/config.d.ts +0 -2
  30. package/dist/sdk/derive-auth.d.ts +5 -3
  31. package/dist/sdk/extract.d.ts +12 -1
  32. package/dist/sdk/index.d.ts +2 -1
  33. package/dist/sdk/invoke.d.ts +12 -1
  34. package/dist/sdk/plugin.d.ts +4 -10
  35. package/dist/sdk/presets.d.ts +0 -1
  36. package/dist/sdk/preview.d.ts +79 -0
  37. package/dist/sdk/types.d.ts +53 -0
  38. package/dist/testing/index.d.ts +0 -6
  39. package/package.json +6 -5
  40. package/dist/AddOpenApiSource-7TI5XUUY.js +0 -765
  41. package/dist/AddOpenApiSource-7TI5XUUY.js.map +0 -1
  42. package/dist/OpenApiAccountsPanel-Y2RGBSSL.js.map +0 -1
  43. package/dist/UpdateSpecSection-MIZ5GLBM.js.map +0 -1
  44. package/dist/chunk-GS5YN6J4.js.map +0 -1
  45. package/dist/chunk-I2XDCVVM.js +0 -712
  46. package/dist/chunk-I2XDCVVM.js.map +0 -1
  47. package/dist/chunk-MZWZQ24W.js +0 -226
  48. package/dist/chunk-MZWZQ24W.js.map +0 -1
  49. package/dist/chunk-PAHWRRS3.js.map +0 -1
  50. package/dist/chunk-PNOEE3ET.js.map +0 -1
  51. package/dist/chunk-RFSMGUBJ.js.map +0 -1
  52. package/dist/react/GoogleProductPicker.d.ts +0 -9
  53. package/dist/sdk/google-discovery.d.ts +0 -43
  54. package/dist/sdk/google-discovery.test.d.ts +0 -1
  55. package/dist/sdk/google-oauth-batches.d.ts +0 -13
  56. package/dist/sdk/google-oauth-batches.test.d.ts +0 -1
  57. package/dist/sdk/google-oauth-scopes.d.ts +0 -3
  58. package/dist/sdk/google-oauth-scopes.test.d.ts +0 -1
  59. package/dist/sdk/google-presets.d.ts +0 -16
  60. package/dist/sdk/google-presets.test.d.ts +0 -1
  61. package/dist/sdk/google-product-picker-scopes.test.d.ts +0 -1
  62. /package/dist/sdk/{google-bundle.test.d.ts → store.test.d.ts} +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/sdk/google-discovery.ts","../src/sdk/google-oauth-scopes.ts","../src/sdk/derive-auth.ts"],"sourcesContent":["// Converts Google Discovery documents directly into OpenAPI 3.x. Public\n// Discovery converters currently target Swagger 2.0 or a broad conversion\n// pipeline; this adapter emits the shape Executor parses while preserving\n// Executor-specific tool ids and query semantics.\nimport { Effect, Option, Predicate, Schema, SchemaGetter } from \"effect\";\nimport { HttpClient, HttpClientRequest } from \"effect/unstable/http\";\n\nimport { OpenApiParseError } from \"./errors\";\nimport { compactGoogleOAuthScopes } from \"./google-oauth-scopes\";\nimport type { SpecFetchCredentials } from \"./parse\";\nimport type { Authentication } from \"./types\";\nimport { AuthTemplateSlug } from \"@executor-js/sdk/shared\";\n\nconst DISCOVERY_SERVICE_HOST = \"https://www.googleapis.com/discovery/v1/apis\";\nconst GOOGLE_BUNDLE_BASE_URL = \"https://www.googleapis.com/\";\nconst GOOGLE_OAUTH_AUTHORIZATION_URL = \"https://accounts.google.com/o/oauth2/v2/auth\";\nconst GOOGLE_OAUTH_TOKEN_URL = \"https://oauth2.googleapis.com/token\";\nconst OPENAPI_SCHEMA_TYPES = new Set([\n \"array\",\n \"boolean\",\n \"integer\",\n \"null\",\n \"number\",\n \"object\",\n \"string\",\n]);\n\ntype JsonPrimitive = string | number | boolean | null;\ntype JsonValue = JsonPrimitive | readonly JsonValue[] | { readonly [key: string]: JsonValue };\n\ntype OpenApiSchemaObject = {\n readonly $ref?: string;\n readonly type?: \"array\" | \"boolean\" | \"integer\" | \"null\" | \"number\" | \"object\" | \"string\";\n readonly description?: string;\n readonly title?: string;\n readonly format?: string;\n readonly readOnly?: boolean;\n readonly default?: JsonValue;\n readonly enum?: readonly JsonValue[];\n readonly items?: OpenApiSchemaObject;\n readonly properties?: Record<string, OpenApiSchemaObject>;\n readonly required?: readonly string[];\n readonly additionalProperties?: boolean | OpenApiSchemaObject;\n};\n\ntype OpenApiParameterObject = {\n readonly name: string;\n readonly in: \"path\" | \"query\" | \"header\";\n readonly required: boolean;\n readonly description?: string;\n readonly schema: OpenApiSchemaObject;\n readonly style?: \"form\";\n readonly explode?: boolean;\n readonly allowReserved?: boolean;\n};\n\ntype OpenApiOperationObject = {\n readonly operationId: string;\n readonly \"x-executor-toolPath\": string;\n readonly \"x-executor-pathTemplate\"?: string;\n readonly tags?: readonly string[];\n readonly description?: string;\n readonly servers?: readonly { readonly url: string }[];\n readonly parameters: readonly OpenApiParameterObject[];\n readonly requestBody?: {\n readonly required: false;\n readonly content: {\n readonly \"application/json\": {\n readonly schema: OpenApiSchemaObject;\n };\n };\n };\n readonly responses: {\n readonly \"200\": {\n readonly description: \"Successful response\";\n readonly content: {\n readonly \"application/json\": {\n readonly schema: OpenApiSchemaObject;\n };\n };\n };\n };\n readonly security?: readonly Record<string, readonly string[]>[];\n readonly \"x-google-scopes\": readonly string[];\n};\n\ntype OpenApiDocument = {\n readonly openapi: \"3.1.0\";\n readonly info: {\n readonly title: string;\n readonly version: string;\n };\n readonly servers: readonly { readonly url: string }[];\n readonly paths: Record<string, Record<string, OpenApiOperationObject>>;\n readonly components: {\n readonly schemas: Record<string, OpenApiSchemaObject>;\n readonly securitySchemes?: Record<\n string,\n {\n readonly type: \"oauth2\";\n readonly flows: {\n readonly authorizationCode: {\n readonly authorizationUrl: string;\n readonly tokenUrl: string;\n readonly scopes: Record<string, string>;\n };\n };\n }\n >;\n };\n readonly security?: readonly Record<string, readonly string[]>[];\n readonly \"x-executor-origin\":\n | {\n readonly kind: \"googleDiscovery\";\n readonly discoveryUrl: string;\n readonly service: string;\n readonly version: string;\n }\n | {\n readonly kind: \"googleDiscoveryBundle\";\n readonly services: readonly {\n readonly discoveryUrl: string;\n readonly service: string;\n readonly version: string;\n }[];\n };\n};\n\nconst TextOption = Schema.OptionFromOptional(Schema.Trim).pipe(\n Schema.decode({\n decode: SchemaGetter.transform((value) => Option.filter(value, (text) => text.length > 0)),\n encode: SchemaGetter.transform((value) => value),\n }),\n Schema.withDecodingDefaultType(Effect.succeed(Option.none())),\n);\nconst TextArray = Schema.optional(Schema.Array(Schema.String)).pipe(\n Schema.withDecodingDefaultType(Effect.succeed([] as string[])),\n);\nconst UnknownRecord = Schema.Record(Schema.String, Schema.Unknown);\nconst UnknownRecordWithDefault = Schema.optional(UnknownRecord).pipe(\n Schema.withDecodingDefaultType(Effect.succeed({})),\n);\n\nconst DiscoveryParameter = Schema.Struct({\n type: Schema.optional(Schema.String),\n description: TextOption,\n properties: UnknownRecordWithDefault,\n items: Schema.optional(Schema.Unknown),\n additionalProperties: Schema.optional(Schema.Union([Schema.Boolean, Schema.Unknown])),\n enum: TextArray,\n format: Schema.optional(Schema.String),\n readOnly: Schema.optional(Schema.Boolean),\n default: Schema.optional(Schema.Union([Schema.String, Schema.Number, Schema.Boolean])),\n $ref: Schema.optional(Schema.String),\n location: Schema.optional(Schema.Literals([\"path\", \"query\", \"header\"])),\n required: Schema.optional(Schema.Boolean),\n repeated: Schema.optional(Schema.Boolean),\n});\ntype DiscoveryParameter = typeof DiscoveryParameter.Type;\n\nconst DiscoveryRef = Schema.Struct({\n $ref: Schema.optional(Schema.String),\n});\n\nconst DiscoveryMethod = Schema.Struct({\n id: TextOption,\n description: TextOption,\n httpMethod: Schema.optional(Schema.String),\n path: TextOption,\n parameters: UnknownRecordWithDefault,\n request: Schema.optional(DiscoveryRef),\n response: Schema.optional(DiscoveryRef),\n scopes: TextArray,\n});\ntype DiscoveryMethod = typeof DiscoveryMethod.Type;\n\nconst DiscoveryResource = Schema.Struct({\n methods: UnknownRecordWithDefault,\n resources: UnknownRecordWithDefault,\n});\n\nconst DiscoveryDocument = Schema.Struct({\n name: TextOption,\n version: TextOption,\n title: TextOption,\n rootUrl: TextOption,\n servicePath: Schema.optional(Schema.Trim).pipe(\n Schema.withDecodingDefaultType(Effect.succeed(\"\")),\n ),\n parameters: UnknownRecordWithDefault,\n methods: UnknownRecordWithDefault,\n resources: UnknownRecordWithDefault,\n schemas: UnknownRecordWithDefault,\n auth: Schema.optional(\n Schema.Struct({\n oauth2: Schema.optional(\n Schema.Struct({\n scopes: Schema.optional(\n Schema.Record(\n Schema.String,\n Schema.Struct({\n description: TextOption,\n }),\n ),\n ).pipe(Schema.withDecodingDefaultType(Effect.succeed({}))),\n }),\n ),\n }),\n ),\n});\ntype DiscoveryDocument = typeof DiscoveryDocument.Type;\n\nexport interface GoogleDiscoveryOpenApiConversion {\n readonly specText: string;\n readonly baseUrl: string;\n readonly title: string;\n readonly service: string;\n readonly version: string;\n readonly discoveryUrls?: readonly string[];\n /** The v2 oauth auth template the converted integration declares, when the\n * Discovery document advertises OAuth2 scopes. */\n readonly authenticationTemplate?: readonly Authentication[];\n}\n\nconst decodeDiscoveryDocument = Schema.decodeUnknownSync(DiscoveryDocument);\nconst decodeDiscoveryParameter = Schema.decodeUnknownSync(DiscoveryParameter);\nconst decodeDiscoveryMethod = Schema.decodeUnknownSync(DiscoveryMethod);\nconst decodeDiscoveryResource = Schema.decodeUnknownSync(DiscoveryResource);\nconst parseJson = Schema.decodeUnknownEffect(Schema.fromJsonString(Schema.Unknown));\n\nconst normalizeDiscoveryUrl = (discoveryUrl: string): string => {\n const trimmed = discoveryUrl.trim();\n if (!URL.canParse(trimmed)) return trimmed;\n const parsed = new URL(trimmed);\n if (parsed.pathname !== \"/$discovery/rest\") return trimmed;\n const version = parsed.searchParams.get(\"version\")?.trim();\n if (!version) return trimmed;\n const host = parsed.hostname.toLowerCase();\n if (!host.endsWith(\".googleapis.com\")) return trimmed;\n const rawService = host.slice(0, -\".googleapis.com\".length);\n const service =\n rawService === \"calendar-json\"\n ? \"calendar\"\n : rawService.endsWith(\"-json\")\n ? rawService.slice(0, -5)\n : rawService;\n return service ? `${DISCOVERY_SERVICE_HOST}/${service}/${version}/rest` : trimmed;\n};\n\nexport const isGoogleDiscoveryUrl = (url: string): boolean => {\n const trimmed = url.trim();\n if (!URL.canParse(trimmed)) return false;\n const parsed = new URL(trimmed);\n const host = parsed.hostname.toLowerCase();\n if (!host.endsWith(\"googleapis.com\")) return false;\n return parsed.pathname.includes(\"/discovery/\") || parsed.pathname.includes(\"$discovery\");\n};\n\nexport const fetchGoogleDiscoveryDocument = Effect.fn(\"OpenApi.fetchGoogleDiscoveryDocument\")(\n function* (discoveryUrl: string, credentials?: SpecFetchCredentials) {\n const client = yield* HttpClient.HttpClient;\n const requestUrl = new URL(discoveryUrl);\n for (const [name, value] of Object.entries(credentials?.queryParams ?? {})) {\n requestUrl.searchParams.set(name, value);\n }\n let request = HttpClientRequest.get(requestUrl.toString()).pipe(\n HttpClientRequest.setHeader(\"Accept\", \"application/json, */*\"),\n );\n for (const [name, value] of Object.entries(credentials?.headers ?? {})) {\n request = HttpClientRequest.setHeader(request, name, value);\n }\n const response = yield* client.execute(request).pipe(\n Effect.mapError(\n () =>\n new OpenApiParseError({\n message: \"Failed to fetch Google Discovery document\",\n }),\n ),\n );\n if (response.status < 200 || response.status >= 300) {\n return yield* new OpenApiParseError({\n message: `Failed to fetch Google Discovery document: HTTP ${response.status}`,\n });\n }\n return yield* response.text.pipe(\n Effect.mapError(\n () =>\n new OpenApiParseError({\n message: \"Failed to read Google Discovery document body\",\n }),\n ),\n );\n },\n);\n\nconst schemaRef = (name: string) => `#/components/schemas/${name}`;\n\nconst identitySchemaName = (name: string): string => name;\n\nconst schemaComponentPart = (value: string): string =>\n value\n .trim()\n .replace(/[^A-Za-z0-9._-]+/g, \"_\")\n .replace(/^_+|_+$/g, \"\") || \"schema\";\n\nconst normalizeDiscoveryPathTemplate = (pathTemplate: string): string =>\n pathTemplate.replaceAll(/\\{\\+([^{}]+)\\}/g, \"{$1}\");\n\nconst pathUsesReservedExpansion = (pathTemplate: string, parameterName: string): boolean =>\n pathTemplate.includes(`{+${parameterName}}`);\n\nconst uniquePathKey = (\n paths: Record<string, Record<string, OpenApiOperationObject>>,\n preferredPath: string,\n method: string,\n toolPath: string,\n): string => {\n if (!paths[preferredPath]?.[method]) return preferredPath;\n const disambiguated = `/${toolPath.replace(/[^A-Za-z0-9._~-]+/g, \"/\")}`;\n if (!paths[disambiguated]?.[method]) return disambiguated;\n let index = 2;\n while (paths[`${disambiguated}/${index}`]?.[method]) index += 1;\n return `${disambiguated}/${index}`;\n};\n\nconst discoveryDescription = (value: unknown): string | undefined =>\n typeof value === \"string\"\n ? value\n : Option.isOption(value) && Option.isSome(value)\n ? typeof value.value === \"string\"\n ? value.value\n : undefined\n : undefined;\n\nconst isRecord = (value: unknown): value is Record<string, unknown> =>\n typeof value === \"object\" && value !== null && !Array.isArray(value);\n\nconst jsonValue = (value: unknown): JsonValue | undefined => {\n if (\n value === null ||\n typeof value === \"string\" ||\n typeof value === \"number\" ||\n typeof value === \"boolean\"\n ) {\n return value;\n }\n if (Array.isArray(value)) {\n const values = value.map(jsonValue);\n return values.every(Predicate.isNotUndefined) ? values : undefined;\n }\n if (!isRecord(value)) return undefined;\n const entries = Object.entries(value).flatMap(([key, item]) => {\n const converted = jsonValue(item);\n return converted === undefined ? [] : [[key, converted] as const];\n });\n return Object.fromEntries(entries);\n};\n\nconst stringArray = (value: unknown): readonly string[] | undefined => {\n if (!Array.isArray(value)) return undefined;\n const strings = value.filter((item): item is string => typeof item === \"string\");\n return strings.length === value.length ? strings : undefined;\n};\n\nconst schemaType = (value: unknown): OpenApiSchemaObject[\"type\"] | undefined =>\n typeof value === \"string\" && OPENAPI_SCHEMA_TYPES.has(value)\n ? (value as OpenApiSchemaObject[\"type\"])\n : undefined;\n\nconst discoverySchemaToOpenApiSchema = (\n raw: unknown,\n schemaNameForRef: (name: string) => string = identitySchemaName,\n): OpenApiSchemaObject => {\n if (!isRecord(raw)) return {};\n const schema = raw;\n if (typeof schema.$ref === \"string\") return { $ref: schemaRef(schemaNameForRef(schema.$ref)) };\n\n const description = discoveryDescription(schema.description);\n const title = discoveryDescription(schema.title);\n const defaultValue = jsonValue(schema.default);\n const enumValues = Array.isArray(schema.enum)\n ? schema.enum.map(jsonValue).filter(Predicate.isNotUndefined)\n : [];\n const format = typeof schema.format === \"string\" ? schema.format : undefined;\n const readOnly = typeof schema.readOnly === \"boolean\" ? schema.readOnly : undefined;\n const type = schemaType(schema.type);\n\n const base = {\n ...(description !== undefined ? { description } : {}),\n ...(title !== undefined ? { title } : {}),\n ...(format !== undefined ? { format } : {}),\n ...(readOnly !== undefined ? { readOnly } : {}),\n ...(defaultValue !== undefined ? { default: defaultValue } : {}),\n ...(enumValues.length > 0 ? { enum: enumValues } : {}),\n } satisfies OpenApiSchemaObject;\n\n if (type === \"array\") {\n return {\n ...base,\n type: \"array\",\n items: discoverySchemaToOpenApiSchema(schema.items, schemaNameForRef),\n };\n }\n\n const properties = schema.properties;\n if (\n type === \"object\" ||\n (isRecord(properties) && Object.keys(properties).length > 0) ||\n schema.additionalProperties !== undefined\n ) {\n const convertedProperties = isRecord(properties)\n ? Object.fromEntries(\n Object.entries(properties).map(([name, value]) => [\n name,\n discoverySchemaToOpenApiSchema(value, schemaNameForRef),\n ]),\n )\n : undefined;\n const required = stringArray(schema.required);\n const additionalProperties =\n schema.additionalProperties === undefined\n ? undefined\n : typeof schema.additionalProperties === \"boolean\"\n ? schema.additionalProperties\n : discoverySchemaToOpenApiSchema(schema.additionalProperties, schemaNameForRef);\n return {\n ...base,\n type: \"object\",\n ...(convertedProperties && Object.keys(convertedProperties).length > 0\n ? { properties: convertedProperties }\n : {}),\n ...(required && required.length > 0 ? { required } : {}),\n ...(additionalProperties !== undefined ? { additionalProperties } : {}),\n };\n }\n\n return type !== undefined ? { ...base, type } : base;\n};\n\nconst parameterSchema = (\n parameter: DiscoveryParameter,\n schemaNameForRef: (name: string) => string = identitySchemaName,\n): OpenApiSchemaObject => {\n const base = discoverySchemaToOpenApiSchema(parameter, schemaNameForRef);\n return parameter.repeated\n ? {\n type: \"array\",\n items: base,\n }\n : base;\n};\n\nconst methodToolPath = (service: string, methodId: string): string =>\n methodId.startsWith(`${service}.`) ? methodId.slice(service.length + 1) : methodId;\n\nconst collectMethods = (resource: unknown): DiscoveryMethod[] => {\n const decoded = decodeDiscoveryResource(resource);\n const direct = Object.values(decoded.methods ?? {}).map((raw) => decodeDiscoveryMethod(raw));\n const nested = Object.values(decoded.resources ?? {}).flatMap(collectMethods);\n return [...direct, ...nested];\n};\n\nconst discoveryScopes = (document: DiscoveryDocument): Record<string, string> =>\n Object.fromEntries(\n Object.entries(document.auth?.oauth2?.scopes ?? {}).map(([scope, value]) => [\n scope,\n Option.getOrElse(value.description, () => \"\"),\n ]),\n );\n\n// The scope set the converted integration DECLARES (and that `oauth.start`\n// requests at connect) must match the consent the picker previews. Both run the\n// raw Discovery union through `compactGoogleOAuthScopes`, which drops scopes a\n// user OAuth consent screen can't show (`chat.bot`/`chat.app.*`/`keep`) and\n// collapses sub-scopes under their broad parent (`gmail.*` → `mail.google.com`,\n// `userinfo.email` → `email`). Descriptions are preserved where the raw map had\n// them; compaction-introduced identity scopes (`email`/`profile`) fall back to\n// the broad parent's description. Per-operation `x-google-scopes`/`security`\n// stay RAW — they describe which scope each method needs, not consent.\nconst compactDiscoveryScopeMap = (raw: Record<string, string>): Record<string, string> => {\n const descriptionFor = (scope: string): string => {\n if (raw[scope] !== undefined) return raw[scope];\n if (scope === \"email\") return raw[\"https://www.googleapis.com/auth/userinfo.email\"] ?? \"\";\n if (scope === \"profile\") return raw[\"https://www.googleapis.com/auth/userinfo.profile\"] ?? \"\";\n return \"\";\n };\n return Object.fromEntries(\n compactGoogleOAuthScopes(Object.keys(raw)).map((scope) => [scope, descriptionFor(scope)]),\n );\n};\n\nconst allDiscoveryMethods = (document: DiscoveryDocument): DiscoveryMethod[] => [\n ...Object.values(document.methods ?? {}).map((raw) => decodeDiscoveryMethod(raw)),\n ...Object.values(document.resources ?? {}).flatMap(collectMethods),\n];\n\ntype DiscoveryDocumentInfo = {\n readonly discoveryUrl: string;\n readonly document: DiscoveryDocument;\n readonly service: string;\n readonly version: string;\n readonly rootUrl: string;\n readonly baseUrl: string;\n readonly title: string;\n};\n\nconst discoveryDocumentInfo = (\n document: DiscoveryDocument,\n discoveryUrl: string,\n): Effect.Effect<DiscoveryDocumentInfo, OpenApiParseError> =>\n Effect.gen(function* () {\n const service = Option.getOrUndefined(document.name);\n const version = Option.getOrUndefined(document.version);\n const rootUrl = Option.getOrUndefined(document.rootUrl);\n if (!service || !version || !rootUrl) {\n return yield* new OpenApiParseError({\n message: \"Google Discovery document is missing one of: name, version, rootUrl\",\n });\n }\n\n return {\n discoveryUrl,\n document,\n service,\n version,\n rootUrl,\n baseUrl: new URL(document.servicePath || \"\", rootUrl).toString(),\n title: Option.getOrElse(document.title, () => `${service} ${version}`),\n };\n });\n\nconst buildDiscoveryOperation = (input: {\n readonly document: DiscoveryDocument;\n readonly method: DiscoveryMethod;\n readonly toolPath: string;\n readonly pathTemplate: string;\n readonly schemaNameForRef?: (name: string) => string;\n readonly serverUrl?: string;\n readonly tags?: readonly string[];\n}): OpenApiOperationObject => {\n const mergedParameters = new Map<string, DiscoveryParameter>();\n for (const [name, raw] of Object.entries(input.document.parameters ?? {})) {\n const parameter = decodeDiscoveryParameter(raw);\n if (parameter.location) mergedParameters.set(name, parameter);\n }\n for (const [name, raw] of Object.entries(input.method.parameters ?? {})) {\n const parameter = decodeDiscoveryParameter(raw);\n if (parameter.location) mergedParameters.set(name, parameter);\n }\n\n const methodScopes = input.method.scopes ?? [];\n const methodDescription = Option.getOrUndefined(input.method.description);\n const schemaNameForRef = input.schemaNameForRef ?? identitySchemaName;\n\n return {\n operationId: input.toolPath,\n \"x-executor-toolPath\": input.toolPath,\n \"x-executor-pathTemplate\": input.pathTemplate,\n ...(input.tags && input.tags.length > 0 ? { tags: input.tags } : {}),\n ...(methodDescription !== undefined ? { description: methodDescription } : {}),\n ...(input.serverUrl ? { servers: [{ url: input.serverUrl }] } : {}),\n parameters: [...mergedParameters.entries()].flatMap(([name, parameter]) => {\n const location = parameter.location;\n if (!location) return [];\n const description = Option.getOrUndefined(parameter.description);\n const allowReserved =\n location === \"path\" && pathUsesReservedExpansion(input.pathTemplate, name);\n return [\n {\n name,\n in: location,\n required: location === \"path\" ? true : parameter.required === true,\n ...(description !== undefined ? { description } : {}),\n schema: parameterSchema(parameter, schemaNameForRef),\n ...(location === \"query\"\n ? { style: \"form\" as const, explode: parameter.repeated === true }\n : {}),\n ...(allowReserved ? { allowReserved: true } : {}),\n },\n ];\n }),\n ...(input.method.request?.$ref\n ? {\n requestBody: {\n required: false,\n content: {\n \"application/json\": {\n schema: { $ref: schemaRef(schemaNameForRef(input.method.request.$ref)) },\n },\n },\n },\n }\n : {}),\n responses: {\n \"200\": {\n description: \"Successful response\",\n content: {\n \"application/json\": {\n schema: input.method.response?.$ref\n ? { $ref: schemaRef(schemaNameForRef(input.method.response.$ref)) }\n : {},\n },\n },\n },\n },\n ...(methodScopes.length > 0 ? { security: [{ googleOAuth2: methodScopes }] } : {}),\n \"x-google-scopes\": methodScopes,\n };\n};\n\nconst GOOGLE_OAUTH_SECURITY_SCHEME = \"googleOAuth2\";\n\n/** The v2 oauth auth template for a Google-discovery integration. The spec\n * itself carries the matching `securitySchemes.googleOAuth2` entry; this is the\n * catalog-level template a connection's access token renders through. */\nconst googleOauthTemplate = (scopes: Record<string, string>): readonly Authentication[] =>\n // A Google-discovery integration is ALWAYS OAuth, so it ALWAYS declares its\n // oauth method — even when the compacted scope set is empty (e.g. a bundle of\n // only limited-consent APIs like Google Keep, whose scopes Google won't grant\n // through standard consent). Without this the integration declares no auth\n // method and the \"Add account\" / \"Add a connection\" actions are disabled, so\n // you can't even start the flow. Empty `scopes` just requests no scope.\n [\n {\n slug: AuthTemplateSlug.make(GOOGLE_OAUTH_SECURITY_SCHEME),\n kind: \"oauth2\",\n authorizationUrl: GOOGLE_OAUTH_AUTHORIZATION_URL,\n tokenUrl: GOOGLE_OAUTH_TOKEN_URL,\n scopes: Object.keys(scopes),\n },\n ];\n\nexport const convertGoogleDiscoveryToOpenApi = Effect.fn(\"OpenApi.convertGoogleDiscovery\")(\n function* (input: { readonly discoveryUrl: string; readonly documentText: string }) {\n const parsed = yield* parseJson(input.documentText).pipe(\n Effect.mapError(\n () =>\n new OpenApiParseError({\n message: \"Failed to parse Google Discovery document\",\n }),\n ),\n );\n const document = yield* Effect.try({\n try: () => decodeDiscoveryDocument(parsed),\n catch: () =>\n new OpenApiParseError({\n message: \"Failed to decode Google Discovery document\",\n }),\n });\n\n const info = yield* discoveryDocumentInfo(document, input.discoveryUrl);\n const { service, version, baseUrl, title } = info;\n const paths: Record<string, Record<string, OpenApiOperationObject>> = {};\n\n for (const method of allDiscoveryMethods(document)) {\n const methodId = Option.getOrUndefined(method.id);\n const pathTemplate = Option.getOrUndefined(method.path);\n if (!methodId || !pathTemplate || !method.httpMethod) continue;\n\n const toolPath = methodToolPath(service, methodId);\n const path = normalizeDiscoveryPathTemplate(\n pathTemplate.startsWith(\"/\") ? pathTemplate : `/${pathTemplate}`,\n );\n const methodKey = method.httpMethod.toLowerCase();\n const pathKey = uniquePathKey(paths, path, methodKey, toolPath);\n\n paths[pathKey] ??= {};\n paths[pathKey]![methodKey] = buildDiscoveryOperation({\n document,\n method,\n toolPath,\n pathTemplate: pathTemplate.startsWith(\"/\") ? pathTemplate : `/${pathTemplate}`,\n });\n }\n\n const scopes = compactDiscoveryScopeMap(discoveryScopes(document));\n const authenticationTemplate = googleOauthTemplate(scopes);\n\n const spec: OpenApiDocument = {\n openapi: \"3.1.0\",\n info: {\n title,\n version,\n },\n servers: [{ url: baseUrl }],\n paths,\n components: {\n schemas: Object.fromEntries(\n Object.entries(document.schemas ?? {}).map(([name, schema]) => [\n name,\n discoverySchemaToOpenApiSchema(schema),\n ]),\n ),\n ...(authenticationTemplate\n ? {\n securitySchemes: {\n googleOAuth2: {\n type: \"oauth2\",\n flows: {\n authorizationCode: {\n authorizationUrl: GOOGLE_OAUTH_AUTHORIZATION_URL,\n tokenUrl: GOOGLE_OAUTH_TOKEN_URL,\n scopes,\n },\n },\n },\n },\n }\n : {}),\n },\n ...(authenticationTemplate ? { security: [{ googleOAuth2: Object.keys(scopes) }] } : {}),\n \"x-executor-origin\": {\n kind: \"googleDiscovery\",\n discoveryUrl: normalizeDiscoveryUrl(input.discoveryUrl),\n service,\n version,\n },\n };\n\n return {\n // @effect-diagnostics-next-line preferSchemaOverJson:off\n specText: JSON.stringify(spec),\n baseUrl,\n title,\n service,\n version,\n ...(authenticationTemplate ? { authenticationTemplate } : {}),\n };\n },\n);\n\nexport const convertGoogleDiscoveryBundleToOpenApi = Effect.fn(\n \"OpenApi.convertGoogleDiscoveryBundle\",\n)(function* (input: {\n readonly documents: readonly { readonly discoveryUrl: string; readonly documentText: string }[];\n}) {\n if (input.documents.length === 0) {\n return yield* new OpenApiParseError({\n message: \"Google Discovery bundle requires at least one document\",\n });\n }\n\n const infos = yield* Effect.forEach(input.documents, ({ discoveryUrl, documentText }) =>\n Effect.gen(function* () {\n const parsed = yield* parseJson(documentText).pipe(\n Effect.mapError(\n () =>\n new OpenApiParseError({\n message: \"Failed to parse Google Discovery document\",\n }),\n ),\n );\n const document = yield* Effect.try({\n try: () => decodeDiscoveryDocument(parsed),\n catch: () =>\n new OpenApiParseError({\n message: \"Failed to decode Google Discovery document\",\n }),\n });\n return yield* discoveryDocumentInfo(document, discoveryUrl);\n }),\n );\n\n const paths: Record<string, Record<string, OpenApiOperationObject>> = {};\n const schemas: Record<string, OpenApiSchemaObject> = {};\n const rawScopes: Record<string, string> = {};\n\n for (const info of infos) {\n const schemaPrefix = schemaComponentPart(`${info.service}_${info.version}`);\n const schemaNameForRef = (name: string) => `${schemaPrefix}_${schemaComponentPart(name)}`;\n\n for (const [scope, description] of Object.entries(discoveryScopes(info.document))) {\n rawScopes[scope] ??= description;\n }\n\n for (const [name, schema] of Object.entries(info.document.schemas ?? {})) {\n schemas[schemaNameForRef(name)] = discoverySchemaToOpenApiSchema(schema, schemaNameForRef);\n }\n\n for (const method of allDiscoveryMethods(info.document)) {\n const methodId = Option.getOrUndefined(method.id);\n const rawPathTemplate = Option.getOrUndefined(method.path);\n if (!methodId || !rawPathTemplate || !method.httpMethod) continue;\n\n const toolPath = methodId;\n const wirePath = rawPathTemplate.startsWith(\"/\") ? rawPathTemplate : `/${rawPathTemplate}`;\n const openApiPath = normalizeDiscoveryPathTemplate(wirePath);\n const methodKey = method.httpMethod.toLowerCase();\n const pathKey = uniquePathKey(paths, openApiPath, methodKey, toolPath);\n\n paths[pathKey] ??= {};\n paths[pathKey]![methodKey] = buildDiscoveryOperation({\n document: info.document,\n method,\n toolPath,\n pathTemplate: wirePath,\n schemaNameForRef,\n serverUrl: info.baseUrl,\n tags: [info.title],\n });\n }\n }\n\n const scopes = compactDiscoveryScopeMap(rawScopes);\n const authenticationTemplate = googleOauthTemplate(scopes);\n const spec: OpenApiDocument = {\n openapi: \"3.1.0\",\n info: {\n title: \"Google\",\n version: \"google-discovery-bundle\",\n },\n servers: [{ url: GOOGLE_BUNDLE_BASE_URL }],\n paths,\n components: {\n schemas,\n ...(authenticationTemplate\n ? {\n securitySchemes: {\n googleOAuth2: {\n type: \"oauth2\",\n flows: {\n authorizationCode: {\n authorizationUrl: GOOGLE_OAUTH_AUTHORIZATION_URL,\n tokenUrl: GOOGLE_OAUTH_TOKEN_URL,\n scopes,\n },\n },\n },\n },\n }\n : {}),\n },\n ...(authenticationTemplate ? { security: [{ googleOAuth2: Object.keys(scopes) }] } : {}),\n \"x-executor-origin\": {\n kind: \"googleDiscoveryBundle\",\n services: infos.map((info) => ({\n discoveryUrl: normalizeDiscoveryUrl(info.discoveryUrl),\n service: info.service,\n version: info.version,\n })),\n },\n };\n\n return {\n // @effect-diagnostics-next-line preferSchemaOverJson:off\n specText: JSON.stringify(spec),\n baseUrl: GOOGLE_BUNDLE_BASE_URL,\n title: \"Google\",\n service: \"google\",\n version: \"google-discovery-bundle\",\n discoveryUrls: infos.map((info) => normalizeDiscoveryUrl(info.discoveryUrl)),\n ...(authenticationTemplate ? { authenticationTemplate } : {}),\n };\n});\n","const googleUserConsentBlockedScopes = new Set([\n \"https://www.googleapis.com/auth/chat.bot\",\n \"https://www.googleapis.com/auth/chat.import\",\n \"https://www.googleapis.com/auth/keep\",\n \"https://www.googleapis.com/auth/keep.readonly\",\n]);\n\nconst googleUserConsentBlockedScopePrefixes = [\"https://www.googleapis.com/auth/chat.app.\"];\n\nconst googleBroadScopeGroups: readonly {\n readonly broad: string;\n readonly prefixes: readonly string[];\n}[] = [\n {\n broad: \"https://mail.google.com/\",\n prefixes: [\"https://www.googleapis.com/auth/gmail.\"],\n },\n {\n broad: \"https://www.googleapis.com/auth/calendar\",\n prefixes: [\"https://www.googleapis.com/auth/calendar.\"],\n },\n {\n broad: \"https://www.googleapis.com/auth/drive\",\n prefixes: [\"https://www.googleapis.com/auth/drive.\"],\n },\n];\n\nconst normalizeGoogleIdentityScope = (scope: string): string =>\n scope === \"https://www.googleapis.com/auth/userinfo.email\"\n ? \"email\"\n : scope === \"https://www.googleapis.com/auth/userinfo.profile\"\n ? \"profile\"\n : scope;\n\nconst orderedUniqueScopes = (scopes: Iterable<string>): string[] => {\n const ordered: string[] = [];\n const seen = new Set<string>();\n for (const scope of scopes) {\n const trimmed = scope.trim();\n if (!trimmed || seen.has(trimmed)) continue;\n seen.add(trimmed);\n ordered.push(trimmed);\n }\n return ordered;\n};\n\nexport const isGoogleUserConsentOAuthScope = (scope: string): boolean =>\n !googleUserConsentBlockedScopes.has(scope) &&\n !googleUserConsentBlockedScopePrefixes.some((prefix) => scope.startsWith(prefix));\n\nexport const filterGoogleUserConsentOAuthScopes = (scopes: Iterable<string>): string[] =>\n orderedUniqueScopes(scopes).filter(isGoogleUserConsentOAuthScope);\n\nexport const compactGoogleOAuthScopes = (scopes: Iterable<string>): string[] => {\n const ordered = filterGoogleUserConsentOAuthScopes([...scopes].map(normalizeGoogleIdentityScope));\n const present = new Set(ordered);\n return ordered.filter(\n (scope) =>\n !googleBroadScopeGroups.some(\n (group) =>\n scope !== group.broad &&\n present.has(group.broad) &&\n group.prefixes.some((prefix) => scope.startsWith(prefix)),\n ),\n );\n};\n","// Spec-detected auth → stored `Authentication` templates, shared by every add\n// path. The React add flow derives templates from the preview before calling\n// `addSpec`; `addSpec` itself falls back to the same derivation when the\n// caller omits `authenticationTemplate` (the agentic/API path has no client\n// to do it). One implementation so the web UI and headless callers cannot\n// drift: an integration added over MCP gets the same auth methods the add\n// page would have produced.\nimport * as Option from \"effect/Option\";\n\nimport { AuthTemplateSlug, type OAuthAuthentication } from \"@executor-js/sdk/shared\";\n\nimport type { HeaderPreset, OAuth2Preset, SpecPreview } from \"./preview\";\nimport type { APIKeyAuthentication, Authentication } from \"./types\";\nimport { resolveServerUrl } from \"./openapi-utils\";\n\n// ---------------------------------------------------------------------------\n// OpenAPI url helpers — specs sometimes ship relative OAuth endpoints; resolve\n// them against the chosen base URL so the stored auth template is absolute.\n// ---------------------------------------------------------------------------\n\nexport function resolveOAuthUrl(url: string, baseUrl: string): string {\n if (!url) return url;\n // oxlint-disable-next-line executor/no-try-catch-or-throw -- boundary: URL constructor normalizes provider metadata URLs\n try {\n new URL(url);\n return url;\n } catch {\n if (!baseUrl) return url;\n // oxlint-disable-next-line executor/no-try-catch-or-throw -- boundary: URL constructor resolves relative provider metadata URLs\n try {\n return new URL(url, baseUrl).toString();\n } catch {\n return url;\n }\n }\n}\n\nconst standardOidcIdentityScopes = [\"openid\", \"email\", \"profile\"] as const;\n\nconst identityScopesForPreset = (\n identityScopes: OAuth2Preset[\"identityScopes\"],\n): readonly string[] => {\n if (identityScopes === false) return [];\n return identityScopes === \"auto\" ? standardOidcIdentityScopes : identityScopes;\n};\n\nexport const resolvedOAuthScopes = (\n apiScopes: Iterable<string>,\n identityScopes: OAuth2Preset[\"identityScopes\"],\n): string[] => {\n const merged = new Set(apiScopes);\n for (const scope of identityScopesForPreset(identityScopes)) merged.add(scope);\n return [...merged];\n};\n\n// ---------------------------------------------------------------------------\n// Auth-template builders — turn a preview preset into the integration's stored\n// `Authentication` template (v2). The header preset becomes an `apiKey` template\n// whose secret header value renders the resolved credential via `variable(token)`;\n// the oauth2 preset becomes an `oauth` template carrying the provider endpoints.\n// ---------------------------------------------------------------------------\n\nconst headerPrefix = (preset: HeaderPreset, headerName: string): string | undefined => {\n const label = preset.label.toLowerCase();\n if (headerName.toLowerCase() === \"authorization\") {\n if (label.includes(\"bearer\")) return \"Bearer \";\n if (label.includes(\"basic\")) return \"Basic \";\n }\n return undefined;\n};\n\nconst apiKeyTemplateFromHeaderPreset = (\n preset: HeaderPreset,\n slug: AuthTemplateSlug,\n): APIKeyAuthentication => ({\n slug,\n kind: \"apikey\",\n // Every secret header shares the one credential input (the canonical\n // `token`, stored as an absent placement variable).\n placements: preset.secretHeaders.map((headerName) => {\n const prefix = headerPrefix(preset, headerName);\n return { carrier: \"header\" as const, name: headerName, ...(prefix ? { prefix } : {}) };\n }),\n});\n\nconst oauthTemplateFromPreset = (\n preset: OAuth2Preset,\n baseUrl: string,\n slug: AuthTemplateSlug,\n scopes: readonly string[],\n): OAuthAuthentication => ({\n slug,\n kind: \"oauth2\",\n authorizationUrl: resolveOAuthUrl(\n Option.getOrElse(preset.authorizationUrl, () => \"\"),\n baseUrl,\n ),\n tokenUrl: resolveOAuthUrl(preset.tokenUrl, baseUrl),\n scopes: [...scopes],\n});\n\n// ---------------------------------------------------------------------------\n// All spec-detected auth methods → the union of stored `Authentication`\n// templates. Header presets become apiKey templates; each oauth2 preset becomes\n// an oauth template (with its declared API scopes plus, for auth-code flows,\n// the standard identity scopes). Slugs stay deterministic per method so the\n// stored template is stable across previews of the same spec.\n// ---------------------------------------------------------------------------\n\nexport const detectedAuthenticationTemplates = (\n headerPresets: readonly HeaderPreset[],\n oauth2Presets: readonly OAuth2Preset[],\n baseUrl: string,\n): readonly Authentication[] => {\n const templates: Authentication[] = [];\n headerPresets.forEach((preset, index) => {\n templates.push(\n apiKeyTemplateFromHeaderPreset(preset, AuthTemplateSlug.make(`apikey-${index}`)),\n );\n });\n for (const preset of oauth2Presets) {\n const scopes = resolvedOAuthScopes(Object.keys(preset.scopes), preset.identityScopes);\n templates.push(\n oauthTemplateFromPreset(\n preset,\n baseUrl,\n AuthTemplateSlug.make(`oauth-${preset.securitySchemeName}`),\n scopes,\n ),\n );\n }\n return templates;\n};\n\nexport const firstBaseUrlForPreview = (preview: SpecPreview): string => {\n const firstServer = preview.servers[0];\n return firstServer\n ? resolveServerUrl(firstServer.url, Option.getOrUndefined(firstServer.variables), {})\n : \"\";\n};\n\n/** The fallback `addSpec` uses when no explicit template was passed: every\n * spec-detected method, resolved against the integration's base URL. */\nexport const deriveAuthenticationTemplateFromPreview = (\n preview: SpecPreview,\n baseUrl: string | undefined,\n): readonly Authentication[] =>\n detectedAuthenticationTemplates(\n preview.headerPresets,\n preview.oauth2Presets,\n baseUrl ?? firstBaseUrlForPreview(preview),\n );\n"],"mappings":";;;;;;AAIA,SAAS,QAAQ,QAAQ,WAAW,QAAQ,oBAAoB;AAChE,SAAS,YAAY,yBAAyB;;;ACL9C,IAAM,iCAAiC,oBAAI,IAAI;AAAA,EAC7C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAED,IAAM,wCAAwC,CAAC,2CAA2C;AAE1F,IAAM,yBAGA;AAAA,EACJ;AAAA,IACE,OAAO;AAAA,IACP,UAAU,CAAC,wCAAwC;AAAA,EACrD;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,UAAU,CAAC,2CAA2C;AAAA,EACxD;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,UAAU,CAAC,wCAAwC;AAAA,EACrD;AACF;AAEA,IAAM,+BAA+B,CAAC,UACpC,UAAU,mDACN,UACA,UAAU,qDACR,YACA;AAER,IAAM,sBAAsB,CAAC,WAAuC;AAClE,QAAM,UAAoB,CAAC;AAC3B,QAAM,OAAO,oBAAI,IAAY;AAC7B,aAAW,SAAS,QAAQ;AAC1B,UAAM,UAAU,MAAM,KAAK;AAC3B,QAAI,CAAC,WAAW,KAAK,IAAI,OAAO,EAAG;AACnC,SAAK,IAAI,OAAO;AAChB,YAAQ,KAAK,OAAO;AAAA,EACtB;AACA,SAAO;AACT;AAEO,IAAM,gCAAgC,CAAC,UAC5C,CAAC,+BAA+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,YAA8B,CAAC;AACrC,gBAAc,QAAQ,CAAC,QAAQ,UAAU;AACvC,cAAU;AAAA,MACR,+BAA+B,QAAQC,kBAAiB,KAAK,UAAU,KAAK,EAAE,CAAC;AAAA,IACjF;AAAA,EACF,CAAC;AACD,aAAW,UAAU,eAAe;AAClC,UAAM,SAAS,oBAAoB,OAAO,KAAK,OAAO,MAAM,GAAG,OAAO,cAAc;AACpF,cAAU;AAAA,MACR;AAAA,QACE;AAAA,QACA;AAAA,QACAA,kBAAiB,KAAK,SAAS,OAAO,kBAAkB,EAAE;AAAA,QAC1D;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACA,SAAO;AACT;AAEO,IAAM,yBAAyB,CAAC,YAAiC;AACtE,QAAM,cAAc,QAAQ,QAAQ,CAAC;AACrC,SAAO,cACH,iBAAiB,YAAY,KAAY,uBAAe,YAAY,SAAS,GAAG,CAAC,CAAC,IAClF;AACN;AAIO,IAAM,0CAA0C,CACrD,SACA,YAEA;AAAA,EACE,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,WAAW,uBAAuB,OAAO;AAC3C;","names":["Option","AuthTemplateSlug","AuthTemplateSlug"]}
@@ -1,226 +0,0 @@
1
- // src/sdk/google-presets.ts
2
- var gd = (service, version) => `https://www.googleapis.com/discovery/v1/apis/${service}/${version}/rest`;
3
- var GOOGLE_G = "https://fonts.gstatic.com/s/i/productlogos/googleg/v6/192px.svg";
4
- var GOOGLE_BUNDLE_PRESET_ID = "google";
5
- var googleOpenApiBundlePreset = {
6
- id: GOOGLE_BUNDLE_PRESET_ID,
7
- name: "Google",
8
- summary: "Bundle Gmail, Calendar, Drive, Docs, and other Google APIs into one source.",
9
- icon: GOOGLE_G,
10
- featured: true
11
- };
12
- var googleOpenApiPresets = [
13
- {
14
- id: "google-calendar",
15
- name: "Google Calendar",
16
- summary: "Calendars, events, ACLs, and scheduling.",
17
- url: gd("calendar", "v3"),
18
- icon: "https://fonts.gstatic.com/s/i/productlogos/calendar_2020q4/v8/192px.svg",
19
- featured: true,
20
- oauthAudience: "standard-user"
21
- },
22
- {
23
- id: "google-gmail",
24
- name: "Gmail",
25
- summary: "Messages, threads, labels, and drafts.",
26
- url: gd("gmail", "v1"),
27
- icon: "https://fonts.gstatic.com/s/i/productlogos/gmail_2020q4/v8/web-96dp/logo_gmail_2020q4_color_2x_web_96dp.png",
28
- featured: true,
29
- oauthAudience: "standard-user"
30
- },
31
- {
32
- id: "google-sheets",
33
- name: "Google Sheets",
34
- summary: "Spreadsheets, values, ranges, and formatting.",
35
- url: gd("sheets", "v4"),
36
- icon: "https://fonts.gstatic.com/s/i/productlogos/sheets_2020q4/v8/192px.svg",
37
- featured: true,
38
- oauthAudience: "standard-user"
39
- },
40
- {
41
- id: "google-drive",
42
- name: "Google Drive",
43
- summary: "Files, folders, permissions, and shared drives.",
44
- url: gd("drive", "v3"),
45
- icon: "https://fonts.gstatic.com/s/i/productlogos/drive_2020q4/v8/192px.svg",
46
- featured: true,
47
- oauthAudience: "standard-user"
48
- },
49
- {
50
- id: "google-docs",
51
- name: "Google Docs",
52
- summary: "Documents, structural edits, and formatting.",
53
- url: gd("docs", "v1"),
54
- icon: "https://fonts.gstatic.com/s/i/productlogos/docs_2020q4/v12/192px.svg",
55
- featured: true,
56
- oauthAudience: "standard-user"
57
- },
58
- {
59
- id: "google-slides",
60
- name: "Google Slides",
61
- summary: "Presentations, slides, page elements, and deck updates.",
62
- url: gd("slides", "v1"),
63
- icon: "https://fonts.gstatic.com/s/i/productlogos/slides_2020q4/v12/192px.svg",
64
- oauthAudience: "standard-user"
65
- },
66
- {
67
- id: "google-forms",
68
- name: "Google Forms",
69
- summary: "Forms, questions, responses, and quizzes.",
70
- url: "https://forms.googleapis.com/$discovery/rest?version=v1",
71
- icon: "https://fonts.gstatic.com/s/i/productlogos/forms_2020q4/v6/192px.svg",
72
- oauthAudience: "standard-user"
73
- },
74
- {
75
- id: "google-tasks",
76
- name: "Google Tasks",
77
- summary: "Task lists, task items, notes, and due dates.",
78
- url: gd("tasks", "v1"),
79
- icon: "https://fonts.gstatic.com/s/i/productlogos/tasks/v5/192px.svg",
80
- oauthAudience: "standard-user"
81
- },
82
- {
83
- id: "google-people",
84
- name: "Google People",
85
- summary: "Contacts, profiles, directory people, and contact groups.",
86
- url: gd("people", "v1"),
87
- icon: "https://fonts.gstatic.com/s/i/productlogos/contacts_2022/v2/192px.svg",
88
- oauthAudience: "standard-user"
89
- },
90
- {
91
- id: "google-chat",
92
- name: "Google Chat",
93
- summary: "Spaces, messages, members, reactions, and chat workflows.",
94
- url: gd("chat", "v1"),
95
- icon: "https://fonts.gstatic.com/s/i/productlogos/chat_2020q4/v8/192px.svg",
96
- oauthAudience: "workspace-admin"
97
- },
98
- {
99
- id: "google-keep",
100
- name: "Google Keep",
101
- summary: "Notes, lists, attachments, and annotations.",
102
- url: "https://keep.googleapis.com/$discovery/rest?version=v1",
103
- icon: "https://fonts.gstatic.com/s/i/productlogos/keep_2020q4/v8/192px.svg",
104
- oauthAudience: "unsupported-user"
105
- },
106
- {
107
- id: "google-youtube-data",
108
- name: "YouTube Data",
109
- summary: "Channels, playlists, videos, comments, and uploads.",
110
- url: gd("youtube", "v3"),
111
- icon: "https://fonts.gstatic.com/s/i/productlogos/youtube/v9/192px.svg",
112
- oauthAudience: "advanced-user"
113
- },
114
- {
115
- id: "google-search-console",
116
- name: "Google Search Console",
117
- summary: "Sites, sitemaps, URL inspection, and search performance.",
118
- url: gd("searchconsole", "v1"),
119
- icon: GOOGLE_G,
120
- oauthAudience: "standard-user"
121
- },
122
- {
123
- id: "google-classroom",
124
- name: "Google Classroom",
125
- summary: "Courses, rosters, coursework, and grading.",
126
- url: gd("classroom", "v1"),
127
- icon: "https://fonts.gstatic.com/s/i/productlogos/classroom/v7/192px.svg",
128
- oauthAudience: "advanced-user"
129
- },
130
- {
131
- id: "google-admin-directory",
132
- name: "Google Admin Directory",
133
- summary: "Users, groups, org units, roles, and domain resources.",
134
- url: "https://admin.googleapis.com/$discovery/rest?version=directory_v1",
135
- icon: "https://fonts.gstatic.com/s/i/productlogos/admin_2020q4/v6/192px.svg",
136
- oauthAudience: "workspace-admin"
137
- },
138
- {
139
- id: "google-admin-reports",
140
- name: "Google Admin Reports",
141
- summary: "Audit events, usage reports, and admin activity logs.",
142
- url: "https://admin.googleapis.com/$discovery/rest?version=reports_v1",
143
- icon: "https://fonts.gstatic.com/s/i/productlogos/admin_2020q4/v6/192px.svg",
144
- oauthAudience: "workspace-admin"
145
- },
146
- {
147
- id: "google-apps-script",
148
- name: "Google Apps Script",
149
- summary: "Projects, deployments, and script execution.",
150
- url: gd("script", "v1"),
151
- icon: "https://fonts.gstatic.com/s/i/productlogos/apps_script/v10/192px.svg",
152
- oauthAudience: "advanced-user"
153
- },
154
- {
155
- id: "google-bigquery",
156
- name: "Google BigQuery",
157
- summary: "Datasets, tables, jobs, and analytical queries.",
158
- url: gd("bigquery", "v2"),
159
- icon: "https://fonts.gstatic.com/s/i/productlogos/google_cloud/v6/192px.svg",
160
- oauthAudience: "advanced-user"
161
- },
162
- {
163
- id: "google-cloud-resource-manager",
164
- name: "Google Cloud Resource Manager",
165
- summary: "Projects, folders, organizations, and IAM hierarchy.",
166
- url: "https://cloudresourcemanager.googleapis.com/$discovery/rest?version=v3",
167
- icon: "https://fonts.gstatic.com/s/i/productlogos/google_cloud/v6/192px.svg",
168
- oauthAudience: "advanced-user"
169
- }
170
- ];
171
- var googleStandardUserOAuthPresets = googleOpenApiPresets.filter(
172
- (preset) => preset.oauthAudience === "standard-user"
173
- );
174
- var googleOAuthConsentScopes = {
175
- "google-calendar": ["https://www.googleapis.com/auth/calendar"],
176
- "google-gmail": ["https://mail.google.com/"],
177
- "google-sheets": ["https://www.googleapis.com/auth/spreadsheets"],
178
- "google-drive": ["https://www.googleapis.com/auth/drive"],
179
- "google-docs": ["https://www.googleapis.com/auth/documents"],
180
- "google-slides": ["https://www.googleapis.com/auth/presentations"],
181
- "google-forms": ["https://www.googleapis.com/auth/forms.body"],
182
- "google-tasks": ["https://www.googleapis.com/auth/tasks"],
183
- "google-people": ["https://www.googleapis.com/auth/contacts"],
184
- "google-chat": ["https://www.googleapis.com/auth/chat.spaces"],
185
- "google-keep": ["https://www.googleapis.com/auth/keep"],
186
- "google-youtube-data": ["https://www.googleapis.com/auth/youtube"],
187
- "google-search-console": ["https://www.googleapis.com/auth/webmasters"],
188
- "google-classroom": ["https://www.googleapis.com/auth/classroom.courses"],
189
- "google-admin-directory": ["https://www.googleapis.com/auth/admin.directory.user"],
190
- "google-admin-reports": ["https://www.googleapis.com/auth/admin.reports.audit.readonly"],
191
- "google-apps-script": ["https://www.googleapis.com/auth/script.projects"],
192
- "google-bigquery": ["https://www.googleapis.com/auth/bigquery"],
193
- "google-cloud-resource-manager": ["https://www.googleapis.com/auth/cloud-platform"]
194
- };
195
- var googleOAuthConsentScopesForPreset = (presetId) => googleOAuthConsentScopes[presetId] ?? [];
196
- var normalizeGooglePresetUrl = (url) => {
197
- const trimmed = url.trim();
198
- if (!URL.canParse(trimmed)) return trimmed.replace(/\/$/, "");
199
- const parsed = new URL(trimmed);
200
- parsed.hash = "";
201
- parsed.searchParams.sort();
202
- return parsed.toString().replace(/\/$/, "");
203
- };
204
- var googlePresetsByNormalizedUrl = new Map(
205
- googleOpenApiPresets.flatMap(
206
- (preset) => preset.url ? [[normalizeGooglePresetUrl(preset.url), preset]] : []
207
- )
208
- );
209
- var googlePresetForDiscoveryUrl = (url) => googlePresetsByNormalizedUrl.get(normalizeGooglePresetUrl(url));
210
- var googleAudienceWarningsForUrls = (urls) => {
211
- const seen = /* @__PURE__ */ new Set();
212
- for (const url of urls) {
213
- const audience = googlePresetForDiscoveryUrl(url)?.oauthAudience;
214
- if (audience === "workspace-admin" || audience === "unsupported-user") seen.add(audience);
215
- }
216
- return [...seen];
217
- };
218
-
219
- export {
220
- GOOGLE_BUNDLE_PRESET_ID,
221
- googleOpenApiBundlePreset,
222
- googleOpenApiPresets,
223
- googleOAuthConsentScopesForPreset,
224
- googleAudienceWarningsForUrls
225
- };
226
- //# sourceMappingURL=chunk-MZWZQ24W.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/sdk/google-presets.ts"],"sourcesContent":["import type { OpenApiPreset } from \"./presets\";\n\nexport type GoogleOpenApiOAuthAudience =\n | \"standard-user\"\n | \"advanced-user\"\n | \"workspace-admin\"\n | \"unsupported-user\";\n\nexport type GoogleOpenApiPreset = OpenApiPreset & {\n readonly oauthAudience: GoogleOpenApiOAuthAudience;\n};\n\nconst gd = (service: string, version: string) =>\n `https://www.googleapis.com/discovery/v1/apis/${service}/${version}/rest`;\n\nconst GOOGLE_G = \"https://fonts.gstatic.com/s/i/productlogos/googleg/v6/192px.svg\";\nexport const GOOGLE_BUNDLE_PRESET_ID = \"google\";\n\nexport const googleOpenApiBundlePreset: OpenApiPreset = {\n id: GOOGLE_BUNDLE_PRESET_ID,\n name: \"Google\",\n summary: \"Bundle Gmail, Calendar, Drive, Docs, and other Google APIs into one source.\",\n icon: GOOGLE_G,\n featured: true,\n};\n\nexport const googleOpenApiPresets: readonly GoogleOpenApiPreset[] = [\n {\n id: \"google-calendar\",\n name: \"Google Calendar\",\n summary: \"Calendars, events, ACLs, and scheduling.\",\n url: gd(\"calendar\", \"v3\"),\n icon: \"https://fonts.gstatic.com/s/i/productlogos/calendar_2020q4/v8/192px.svg\",\n featured: true,\n oauthAudience: \"standard-user\",\n },\n {\n id: \"google-gmail\",\n name: \"Gmail\",\n summary: \"Messages, threads, labels, and drafts.\",\n url: gd(\"gmail\", \"v1\"),\n icon: \"https://fonts.gstatic.com/s/i/productlogos/gmail_2020q4/v8/web-96dp/logo_gmail_2020q4_color_2x_web_96dp.png\",\n featured: true,\n oauthAudience: \"standard-user\",\n },\n {\n id: \"google-sheets\",\n name: \"Google Sheets\",\n summary: \"Spreadsheets, values, ranges, and formatting.\",\n url: gd(\"sheets\", \"v4\"),\n icon: \"https://fonts.gstatic.com/s/i/productlogos/sheets_2020q4/v8/192px.svg\",\n featured: true,\n oauthAudience: \"standard-user\",\n },\n {\n id: \"google-drive\",\n name: \"Google Drive\",\n summary: \"Files, folders, permissions, and shared drives.\",\n url: gd(\"drive\", \"v3\"),\n icon: \"https://fonts.gstatic.com/s/i/productlogos/drive_2020q4/v8/192px.svg\",\n featured: true,\n oauthAudience: \"standard-user\",\n },\n {\n id: \"google-docs\",\n name: \"Google Docs\",\n summary: \"Documents, structural edits, and formatting.\",\n url: gd(\"docs\", \"v1\"),\n icon: \"https://fonts.gstatic.com/s/i/productlogos/docs_2020q4/v12/192px.svg\",\n featured: true,\n oauthAudience: \"standard-user\",\n },\n {\n id: \"google-slides\",\n name: \"Google Slides\",\n summary: \"Presentations, slides, page elements, and deck updates.\",\n url: gd(\"slides\", \"v1\"),\n icon: \"https://fonts.gstatic.com/s/i/productlogos/slides_2020q4/v12/192px.svg\",\n oauthAudience: \"standard-user\",\n },\n {\n id: \"google-forms\",\n name: \"Google Forms\",\n summary: \"Forms, questions, responses, and quizzes.\",\n url: \"https://forms.googleapis.com/$discovery/rest?version=v1\",\n icon: \"https://fonts.gstatic.com/s/i/productlogos/forms_2020q4/v6/192px.svg\",\n oauthAudience: \"standard-user\",\n },\n {\n id: \"google-tasks\",\n name: \"Google Tasks\",\n summary: \"Task lists, task items, notes, and due dates.\",\n url: gd(\"tasks\", \"v1\"),\n icon: \"https://fonts.gstatic.com/s/i/productlogos/tasks/v5/192px.svg\",\n oauthAudience: \"standard-user\",\n },\n {\n id: \"google-people\",\n name: \"Google People\",\n summary: \"Contacts, profiles, directory people, and contact groups.\",\n url: gd(\"people\", \"v1\"),\n icon: \"https://fonts.gstatic.com/s/i/productlogos/contacts_2022/v2/192px.svg\",\n oauthAudience: \"standard-user\",\n },\n {\n id: \"google-chat\",\n name: \"Google Chat\",\n summary: \"Spaces, messages, members, reactions, and chat workflows.\",\n url: gd(\"chat\", \"v1\"),\n icon: \"https://fonts.gstatic.com/s/i/productlogos/chat_2020q4/v8/192px.svg\",\n oauthAudience: \"workspace-admin\",\n },\n {\n id: \"google-keep\",\n name: \"Google Keep\",\n summary: \"Notes, lists, attachments, and annotations.\",\n url: \"https://keep.googleapis.com/$discovery/rest?version=v1\",\n icon: \"https://fonts.gstatic.com/s/i/productlogos/keep_2020q4/v8/192px.svg\",\n oauthAudience: \"unsupported-user\",\n },\n {\n id: \"google-youtube-data\",\n name: \"YouTube Data\",\n summary: \"Channels, playlists, videos, comments, and uploads.\",\n url: gd(\"youtube\", \"v3\"),\n icon: \"https://fonts.gstatic.com/s/i/productlogos/youtube/v9/192px.svg\",\n oauthAudience: \"advanced-user\",\n },\n {\n id: \"google-search-console\",\n name: \"Google Search Console\",\n summary: \"Sites, sitemaps, URL inspection, and search performance.\",\n url: gd(\"searchconsole\", \"v1\"),\n icon: GOOGLE_G,\n oauthAudience: \"standard-user\",\n },\n {\n id: \"google-classroom\",\n name: \"Google Classroom\",\n summary: \"Courses, rosters, coursework, and grading.\",\n url: gd(\"classroom\", \"v1\"),\n icon: \"https://fonts.gstatic.com/s/i/productlogos/classroom/v7/192px.svg\",\n oauthAudience: \"advanced-user\",\n },\n {\n id: \"google-admin-directory\",\n name: \"Google Admin Directory\",\n summary: \"Users, groups, org units, roles, and domain resources.\",\n url: \"https://admin.googleapis.com/$discovery/rest?version=directory_v1\",\n icon: \"https://fonts.gstatic.com/s/i/productlogos/admin_2020q4/v6/192px.svg\",\n oauthAudience: \"workspace-admin\",\n },\n {\n id: \"google-admin-reports\",\n name: \"Google Admin Reports\",\n summary: \"Audit events, usage reports, and admin activity logs.\",\n url: \"https://admin.googleapis.com/$discovery/rest?version=reports_v1\",\n icon: \"https://fonts.gstatic.com/s/i/productlogos/admin_2020q4/v6/192px.svg\",\n oauthAudience: \"workspace-admin\",\n },\n {\n id: \"google-apps-script\",\n name: \"Google Apps Script\",\n summary: \"Projects, deployments, and script execution.\",\n url: gd(\"script\", \"v1\"),\n icon: \"https://fonts.gstatic.com/s/i/productlogos/apps_script/v10/192px.svg\",\n oauthAudience: \"advanced-user\",\n },\n {\n id: \"google-bigquery\",\n name: \"Google BigQuery\",\n summary: \"Datasets, tables, jobs, and analytical queries.\",\n url: gd(\"bigquery\", \"v2\"),\n icon: \"https://fonts.gstatic.com/s/i/productlogos/google_cloud/v6/192px.svg\",\n oauthAudience: \"advanced-user\",\n },\n {\n id: \"google-cloud-resource-manager\",\n name: \"Google Cloud Resource Manager\",\n summary: \"Projects, folders, organizations, and IAM hierarchy.\",\n url: \"https://cloudresourcemanager.googleapis.com/$discovery/rest?version=v3\",\n icon: \"https://fonts.gstatic.com/s/i/productlogos/google_cloud/v6/192px.svg\",\n oauthAudience: \"advanced-user\",\n },\n];\n\nexport const googleStandardUserOAuthPresets = googleOpenApiPresets.filter(\n (preset) => preset.oauthAudience === \"standard-user\",\n);\n\n// ---------------------------------------------------------------------------\n// Representative consent scopes per preset.\n//\n// The picker shows the OAuth consent a user is about to grant BEFORE connecting\n// (the \"View scopes\" panel), but the authoritative scope list only exists in\n// each API's live Discovery document — which the add flow fetches lazily at\n// `addSpec` time. To preview consent without N network round-trips, each preset\n// declares the broad top-level scope(s) a full integration grants. These flow\n// through `googleOAuthConsentBatches` (which compacts sub-scopes under their\n// broad parent), so the previewed grant matches the unioned scopes the bundle\n// converter ultimately stores. Grounded against each API's published Discovery\n// `auth.oauth2.scopes`.\n// ---------------------------------------------------------------------------\n\nexport const googleOAuthConsentScopes: Readonly<Record<string, readonly string[]>> = {\n \"google-calendar\": [\"https://www.googleapis.com/auth/calendar\"],\n \"google-gmail\": [\"https://mail.google.com/\"],\n \"google-sheets\": [\"https://www.googleapis.com/auth/spreadsheets\"],\n \"google-drive\": [\"https://www.googleapis.com/auth/drive\"],\n \"google-docs\": [\"https://www.googleapis.com/auth/documents\"],\n \"google-slides\": [\"https://www.googleapis.com/auth/presentations\"],\n \"google-forms\": [\"https://www.googleapis.com/auth/forms.body\"],\n \"google-tasks\": [\"https://www.googleapis.com/auth/tasks\"],\n \"google-people\": [\"https://www.googleapis.com/auth/contacts\"],\n \"google-chat\": [\"https://www.googleapis.com/auth/chat.spaces\"],\n \"google-keep\": [\"https://www.googleapis.com/auth/keep\"],\n \"google-youtube-data\": [\"https://www.googleapis.com/auth/youtube\"],\n \"google-search-console\": [\"https://www.googleapis.com/auth/webmasters\"],\n \"google-classroom\": [\"https://www.googleapis.com/auth/classroom.courses\"],\n \"google-admin-directory\": [\"https://www.googleapis.com/auth/admin.directory.user\"],\n \"google-admin-reports\": [\"https://www.googleapis.com/auth/admin.reports.audit.readonly\"],\n \"google-apps-script\": [\"https://www.googleapis.com/auth/script.projects\"],\n \"google-bigquery\": [\"https://www.googleapis.com/auth/bigquery\"],\n \"google-cloud-resource-manager\": [\"https://www.googleapis.com/auth/cloud-platform\"],\n};\n\nexport const googleOAuthConsentScopesForPreset = (presetId: string): readonly string[] =>\n googleOAuthConsentScopes[presetId] ?? [];\n\n// ---------------------------------------------------------------------------\n// Resolve a stored/normalized Discovery URL back to its preset, so a bundled\n// `google` integration can surface each selected API's `oauthAudience` (e.g. a\n// caution on a connection's auth method when admin-only or unsupported-consent\n// APIs are part of the bundle).\n// ---------------------------------------------------------------------------\n\nconst normalizeGooglePresetUrl = (url: string): string => {\n const trimmed = url.trim();\n if (!URL.canParse(trimmed)) return trimmed.replace(/\\/$/, \"\");\n const parsed = new URL(trimmed);\n parsed.hash = \"\";\n parsed.searchParams.sort();\n return parsed.toString().replace(/\\/$/, \"\");\n};\n\nconst googlePresetsByNormalizedUrl: ReadonlyMap<string, GoogleOpenApiPreset> = new Map(\n googleOpenApiPresets.flatMap((preset) =>\n preset.url ? [[normalizeGooglePresetUrl(preset.url), preset] as const] : [],\n ),\n);\n\nexport const googlePresetForDiscoveryUrl = (url: string): GoogleOpenApiPreset | undefined =>\n googlePresetsByNormalizedUrl.get(normalizeGooglePresetUrl(url));\n\n/** The distinct caution-tier audiences (`workspace-admin`, `unsupported-user`)\n * among the supplied Discovery URLs — the ones whose consent the user should be\n * warned about. Returns `[]` when every URL is a standard/advanced API. */\nexport const googleAudienceWarningsForUrls = (\n urls: readonly string[],\n): readonly GoogleOpenApiOAuthAudience[] => {\n const seen = new Set<GoogleOpenApiOAuthAudience>();\n for (const url of urls) {\n const audience = googlePresetForDiscoveryUrl(url)?.oauthAudience;\n if (audience === \"workspace-admin\" || audience === \"unsupported-user\") seen.add(audience);\n }\n return [...seen];\n};\n"],"mappings":";AAYA,IAAM,KAAK,CAAC,SAAiB,YAC3B,gDAAgD,OAAO,IAAI,OAAO;AAEpE,IAAM,WAAW;AACV,IAAM,0BAA0B;AAEhC,IAAM,4BAA2C;AAAA,EACtD,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,SAAS;AAAA,EACT,MAAM;AAAA,EACN,UAAU;AACZ;AAEO,IAAM,uBAAuD;AAAA,EAClE;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,KAAK,GAAG,YAAY,IAAI;AAAA,IACxB,MAAM;AAAA,IACN,UAAU;AAAA,IACV,eAAe;AAAA,EACjB;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,KAAK,GAAG,SAAS,IAAI;AAAA,IACrB,MAAM;AAAA,IACN,UAAU;AAAA,IACV,eAAe;AAAA,EACjB;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,KAAK,GAAG,UAAU,IAAI;AAAA,IACtB,MAAM;AAAA,IACN,UAAU;AAAA,IACV,eAAe;AAAA,EACjB;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,KAAK,GAAG,SAAS,IAAI;AAAA,IACrB,MAAM;AAAA,IACN,UAAU;AAAA,IACV,eAAe;AAAA,EACjB;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,KAAK,GAAG,QAAQ,IAAI;AAAA,IACpB,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;AAAA,EACtD,uBAAuB,CAAC,yCAAyC;AAAA,EACjE,yBAAyB,CAAC,4CAA4C;AAAA,EACtE,oBAAoB,CAAC,mDAAmD;AAAA,EACxE,0BAA0B,CAAC,sDAAsD;AAAA,EACjF,wBAAwB,CAAC,8DAA8D;AAAA,EACvF,sBAAsB,CAAC,iDAAiD;AAAA,EACxE,mBAAmB,CAAC,0CAA0C;AAAA,EAC9D,iCAAiC,CAAC,gDAAgD;AACpF;AAEO,IAAM,oCAAoC,CAAC,aAChD,yBAAyB,QAAQ,KAAK,CAAC;AASzC,IAAM,2BAA2B,CAAC,QAAwB;AACxD,QAAM,UAAU,IAAI,KAAK;AACzB,MAAI,CAAC,IAAI,SAAS,OAAO,EAAG,QAAO,QAAQ,QAAQ,OAAO,EAAE;AAC5D,QAAM,SAAS,IAAI,IAAI,OAAO;AAC9B,SAAO,OAAO;AACd,SAAO,aAAa,KAAK;AACzB,SAAO,OAAO,SAAS,EAAE,QAAQ,OAAO,EAAE;AAC5C;AAEA,IAAM,+BAAyE,IAAI;AAAA,EACjF,qBAAqB;AAAA,IAAQ,CAAC,WAC5B,OAAO,MAAM,CAAC,CAAC,yBAAyB,OAAO,GAAG,GAAG,MAAM,CAAU,IAAI,CAAC;AAAA,EAC5E;AACF;AAEO,IAAM,8BAA8B,CAAC,QAC1C,6BAA6B,IAAI,yBAAyB,GAAG,CAAC;AAKzD,IAAM,gCAAgC,CAC3C,SAC0C;AAC1C,QAAM,OAAO,oBAAI,IAAgC;AACjD,aAAW,OAAO,MAAM;AACtB,UAAM,WAAW,4BAA4B,GAAG,GAAG;AACnD,QAAI,aAAa,qBAAqB,aAAa,mBAAoB,MAAK,IAAI,QAAQ;AAAA,EAC1F;AACA,SAAO,CAAC,GAAG,IAAI;AACjB;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/sdk/presets.ts"],"sourcesContent":["import { googleOpenApiBundlePreset, googleOpenApiPresets } from \"./google-presets\";\n\nexport interface OpenApiPreset {\n readonly id: string;\n readonly name: string;\n readonly summary: string;\n readonly url?: string;\n readonly icon?: string;\n readonly featured?: boolean;\n}\n\nconst openApiOnlyPresets: readonly OpenApiPreset[] = [\n {\n id: \"stripe\",\n name: \"Stripe\",\n summary: \"Payments, subscriptions, customers, and invoices.\",\n url: \"https://raw.githubusercontent.com/stripe/openapi/master/openapi/spec3.json\",\n icon: \"https://stripe.com/favicon.ico\",\n featured: true,\n },\n {\n id: \"github-rest\",\n name: \"GitHub REST\",\n summary: \"Repos, issues, pull requests, actions, and users.\",\n url: \"https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.github.com.json\",\n icon: \"https://svgl.app/library/github_dark.svg\",\n featured: true,\n },\n {\n id: \"vercel\",\n name: \"Vercel\",\n summary: \"Deployments, domains, projects, and edge config.\",\n url: \"https://openapi.vercel.sh\",\n icon: \"https://vercel.com/favicon.ico\",\n featured: true,\n },\n {\n id: \"cloudflare\",\n name: \"Cloudflare\",\n summary: \"DNS, workers, pages, R2, and security rules.\",\n url: \"https://raw.githubusercontent.com/cloudflare/api-schemas/main/openapi.json\",\n icon: \"https://cloudflare.com/favicon.ico\",\n featured: true,\n },\n {\n id: \"neon\",\n name: \"Neon\",\n summary: \"Serverless Postgres — projects, branches, and endpoints.\",\n url: \"https://neon.tech/api_spec/release/v2.json\",\n icon: \"https://neon.tech/favicon/favicon.ico\",\n featured: true,\n },\n {\n id: \"openai\",\n name: \"OpenAI\",\n summary: \"Models, files, responses, and fine-tuning.\",\n url: \"https://app.stainless.com/api/spec/documented/openai/openapi.documented.yml\",\n icon: \"https://svgl.app/library/openai_dark.svg\",\n featured: true,\n },\n {\n id: \"sentry\",\n name: \"Sentry\",\n summary: \"Error tracking, performance monitoring, and releases.\",\n url: \"https://raw.githubusercontent.com/getsentry/sentry-api-schema/main/openapi-derefed.json\",\n icon: \"https://svgl.app/library/sentry.svg\",\n featured: true,\n },\n {\n id: \"exa\",\n name: \"Exa\",\n summary: \"Web search, similar links, content retrieval, and answers.\",\n url: \"https://raw.githubusercontent.com/exa-labs/openapi-spec/refs/heads/master/exa-openapi-spec.yaml\",\n icon: \"https://exa.ai/images/favicon-32x32.png\",\n featured: true,\n },\n {\n id: \"exa-websets\",\n name: \"Exa Websets\",\n summary: \"Websets, enrichments, webhooks, and monitors.\",\n url: \"https://raw.githubusercontent.com/exa-labs/openapi-spec/refs/heads/master/exa-websets-spec.yaml\",\n icon: \"https://exa.ai/images/favicon-32x32.png\",\n featured: true,\n },\n {\n id: \"axiom\",\n name: \"Axiom\",\n summary: \"Log ingestion, querying, datasets, and monitors.\",\n url: \"https://axiom.co/docs/restapi/versions/v2.json\",\n icon: \"https://axiom.co/favicon.ico\",\n },\n {\n id: \"asana\",\n name: \"Asana\",\n summary: \"Tasks, projects, teams, and workspace management.\",\n url: \"https://raw.githubusercontent.com/APIs-guru/openapi-directory/main/APIs/asana.com/1.0/openapi.yaml\",\n icon: \"https://asana.com/favicon.ico\",\n },\n {\n id: \"twilio\",\n name: \"Twilio\",\n summary: \"SMS, voice, video, and messaging APIs.\",\n url: \"https://raw.githubusercontent.com/twilio/twilio-oai/main/spec/json/twilio_api_v2010.json\",\n icon: \"https://twilio.com/favicon.ico\",\n },\n {\n id: \"digitalocean\",\n name: \"DigitalOcean\",\n summary: \"Droplets, Kubernetes, databases, and networking.\",\n url: \"https://raw.githubusercontent.com/digitalocean/openapi/main/specification/DigitalOcean-public.v2.yaml\",\n icon: \"https://assets.digitalocean.com/favicon.ico\",\n },\n {\n id: \"petstore\",\n name: \"Petstore\",\n summary: \"Classic OpenAPI demo — no auth required.\",\n url: \"https://petstore3.swagger.io/api/v3/openapi.json\",\n icon: \"https://petstore3.swagger.io/favicon-32x32.png\",\n },\n {\n id: \"val-town\",\n name: \"Val Town\",\n summary: \"Vals, runs, blobs, and email/web endpoints.\",\n url: \"https://api.val.town/openapi.json\",\n icon: \"https://www.val.town/favicon.svg\",\n },\n {\n id: \"resend\",\n name: \"Resend\",\n summary: \"Transactional email sending and domain management.\",\n url: \"https://raw.githubusercontent.com/resend/resend-openapi/main/resend.yaml\",\n icon: \"https://resend.com/static/favicons/favicon.ico\",\n },\n {\n id: \"spotify\",\n name: \"Spotify\",\n summary: \"Tracks, albums, playlists, library, and playback.\",\n url: \"https://raw.githubusercontent.com/sonallux/spotify-web-api/refs/heads/main/official-spotify-open-api.yml\",\n icon: \"https://svgl.app/library/spotify.svg\",\n },\n];\n\nexport { googleOpenApiPresets, googleStandardUserOAuthPresets } from \"./google-presets\";\n\nexport const openApiPresets: readonly OpenApiPreset[] = [\n googleOpenApiBundlePreset,\n ...openApiOnlyPresets,\n ...googleOpenApiPresets,\n];\n"],"mappings":";;;;;;AAWA,IAAM,qBAA+C;AAAA,EACnD;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,KAAK;AAAA,IACL,MAAM;AAAA,IACN,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,KAAK;AAAA,IACL,MAAM;AAAA,IACN,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,KAAK;AAAA,IACL,MAAM;AAAA,IACN,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,KAAK;AAAA,IACL,MAAM;AAAA,IACN,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,KAAK;AAAA,IACL,MAAM;AAAA,IACN,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,KAAK;AAAA,IACL,MAAM;AAAA,IACN,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,IAAI;AAAA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