@superblocksteam/cli 2.0.3-next.181 → 2.0.3-next.183
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/{generated-CA4LRNVU.js → generated-BOH37UWZ.js} +1 -1
- package/dist/index.js +3618 -29
- package/oclif.manifest.json +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -292446,7 +292446,7 @@ var templates = {
|
|
|
292446
292446
|
"shim-loader.mjs": 'import path from "path";\nimport { pathToFileURL } from "url";\n\nconst overrideMap = {\n "@superblocksteam/library": "./dist/superblocks-library-shim/index.js",\n};\n\nexport async function resolve(specifier, context, nextResolve) {\n if (overrideMap[specifier]) {\n const fullPath = path.resolve(overrideMap[specifier]);\n return {\n shortCircuit: true,\n url: pathToFileURL(fullPath).href,\n };\n }\n\n return nextResolve(specifier, context);\n}\n',
|
|
292447
292447
|
"src/do-eval-to-sdk.ts": 'import fs from "fs";\nimport path from "path";\nimport { fileURLToPath } from "url";\n\n// finds all JavaScript files in the `dist/apis-to-transform` directory,\n// imports each module, converts its JSON representation to SDK,\n// and outputs a JSON map with filenames as keys and SDK content as values.\n\nasync function main() {\n const __filename = fileURLToPath(import.meta.url);\n const __dirname = path.dirname(__filename);\n\n const apisDir = path.resolve(__dirname, "./to-sdk");\n\n const files = fs.readdirSync(apisDir);\n\n const jsFiles = files.filter(\n (file) => file.endsWith(".js") && file !== "__template__.js",\n );\n\n const results: Record<string, string> = {};\n\n for (const jsFile of jsFiles) {\n const filePath = path.join(apisDir, jsFile);\n const absolutePath = path.resolve(filePath);\n\n try {\n const fileUrl = new URL(`file://${absolutePath}`);\n const module = await import(fileUrl.href);\n\n const defaultExport = module.default;\n\n if (defaultExport && typeof defaultExport.toSDK === "function") {\n const sdkData = await defaultExport.toSDK();\n\n results[jsFile] = sdkData;\n } else {\n console.warn(`${jsFile}: Default export doesn\'t have a toSDK method`);\n }\n } catch (error) {\n console.error(`Error processing ${jsFile}:`, error);\n }\n }\n\n console.log(JSON.stringify(results, null, 2));\n}\n\nmain().catch((error) => {\n console.error("Error:", error);\n process.exit(1);\n});\n',
|
|
292448
292448
|
"src/do-eval-to-yaml.ts": 'import fs from "fs";\nimport path from "path";\nimport { fileURLToPath } from "url";\nimport yaml from "yaml";\n\n// finds all JavaScript files in the `dist/apis-to-transform` directory,\n// imports each module, converts its JSON representation to YAML,\n// and outputs a JSON map with filenames as keys and YAML content as values.\n\nasync function main() {\n const __filename = fileURLToPath(import.meta.url);\n const __dirname = path.dirname(__filename);\n\n const apisDir = path.resolve(__dirname, "./to-yaml");\n\n const files = fs.readdirSync(apisDir);\n\n const jsFiles = files.filter((file) => file.endsWith(".js"));\n\n const results: Record<string, string> = {};\n\n for (const jsFile of jsFiles) {\n const filePath = path.join(apisDir, jsFile);\n const absolutePath = path.resolve(filePath);\n\n try {\n const fileUrl = new URL(`file://${absolutePath}`);\n const module = await import(fileUrl.href);\n\n const defaultExport = module.default;\n\n if (defaultExport && typeof defaultExport.toJSON === "function") {\n const jsonData = await defaultExport.toJSON();\n\n const yamlContent = yaml.stringify(jsonData);\n\n results[jsFile] = yamlContent;\n } else {\n console.warn(`${jsFile}: Default export doesn\'t have a toJSON method`);\n }\n } catch (error) {\n console.error(`Error processing ${jsFile}:`, error);\n }\n }\n\n console.log(JSON.stringify(results, null, 2));\n}\n\nmain().catch((error) => {\n console.error("Error:", error);\n process.exit(1);\n});\n',
|
|
292449
|
-
"src/superblocks-library-shim/index.ts": '/* eslint-disable */\nimport typescript_eslint_parser from "@typescript-eslint/parser";\nimport { CallExpression, ExpressionStatement, FunctionExpression, Node, parse, Program, UnaryExpression } from "acorn";\nimport { ESLint } from "eslint";\nimport { format } from "prettier";\n\nexport type JsonValue =\n | undefined\n | null\n | number\n | string\n | boolean\n | Array<JsonValue>\n | { [key: string]: JsonValue };\nexport type State = { [key: string]: JsonValue };\nexport type Binding<T> = T | ((state: State) => T);\n\n// DEPRECATED\nexport const code = (\n fn: string,\n options: { iife?: boolean } = { iife: false },\n): string => {\n // Parse the function string\n const ast = parse(fn, {\n ecmaVersion: "latest",\n sourceType: "script",\n });\n\n // Find the function declaration/expression\n let functionNode;\n\n // Walk through the AST to find the function\n if (ast.body[0].type === "FunctionDeclaration") {\n // Function declaration: function name() {}\n functionNode = ast.body[0];\n } else if (\n ast.body[0].type === "ExpressionStatement" &&\n (ast.body[0].expression.type === "FunctionExpression" ||\n ast.body[0].expression.type === "ArrowFunctionExpression")\n ) {\n // Function expression: const name = function() {} or const name = () => {}\n functionNode = ast.body[0].expression;\n } else if (\n ast.body[0].type === "VariableDeclaration" &&\n (ast.body[0].declarations[0]?.init?.type === "FunctionExpression" ||\n ast.body[0].declarations[0]?.init?.type === "ArrowFunctionExpression")\n ) {\n // Variable declaration: const name = function() {} or const name = () => {}\n functionNode = ast.body[0].declarations[0]?.init;\n }\n\n if (!functionNode) {\n throw new Error("Could not find a function in the provided string");\n }\n\n // Get the function body\n const body = functionNode.body;\n\n // Extract the source from the original string\n // For arrow functions with an expression body, we return the expression\n if (\n functionNode.type === "ArrowFunctionExpression" &&\n body.type !== "BlockStatement"\n ) {\n // Arrow function with expression body: () => 42\n const expressionCode = fn.substring(fn.indexOf("=>") + 2).trim();\n return options.iife\n ? `(() => ${expressionCode})()`\n : `return ${expressionCode}`;\n }\n\n // For functions with block bodies, extract content between braces\n const start = body.start + 1; // Skip the opening brace\n const end = body.end - 1; // Skip the closing brace\n\n // Get the raw body content\n const rawBodyLines = fn.substring(start, end).split("\\n");\n\n if (rawBodyLines.length <= 1) {\n // Single line body, just trim it\n const bodyCode = rawBodyLines[0].trim();\n\n if (options.iife) {\n const paramStart = fn.indexOf("(");\n const paramEnd = fn.indexOf(")", paramStart);\n const params = fn.substring(paramStart, paramEnd + 1);\n return `(${params} => { ${bodyCode} })()`;\n }\n\n return bodyCode;\n }\n\n // For multi-line bodies, normalize indentation\n // Find the minimum indentation level (ignoring empty lines)\n let minIndent = Infinity;\n for (const line of rawBodyLines) {\n const trimmedLine = line.trimStart();\n if (trimmedLine.length > 0) {\n const indent = line.length - trimmedLine.length;\n minIndent = Math.min(minIndent, indent);\n }\n }\n\n // Remove the common indentation from each line\n const normalizedLines = rawBodyLines.map((line) => {\n if (line.trimStart().length === 0) return "";\n return line.substring(minIndent);\n });\n\n // Join the normalized lines\n const bodyCode = normalizedLines\n .join(" ")\n .replace(/\\s{2,}/g, " ")\n .trim();\n\n if (options.iife) {\n const paramStart = fn.indexOf("(");\n const paramEnd = fn.indexOf(")", paramStart);\n const params = fn.substring(paramStart, paramEnd + 1);\n return `(${params} => { ${bodyCode} })()`;\n }\n\n return bodyCode;\n};\n\nasync function binding(binding: Binding<string>): Promise<string> {\n if (typeof binding === "function") {\n // (() => 5)() -> `${(() => 5)()}`\n return `\\`\\$\\{${await toJS(binding)}\\}\\``;\n }\n\n return `\\`${binding}\\``;\n}\n\ninterface Codec {\n toJSON(): Promise<JsonValue>;\n toSDK(entities: string[]): Promise<string>;\n}\n\nexport abstract class Block implements Codec {\n protected name: string;\n\n constructor(name: string) {\n this.name = name;\n }\n\n public abstract toJSON(): Promise<JsonValue>;\n public abstract toSDK(entities: string[]): Promise<string>;\n\n public static fromJSON(json: any, entities: string[]): Block {\n if (json?.step) {\n return Integration.fromJSON(json, entities);\n }\n\n if ("conditional" in json) {\n return Conditional.fromJSON(json, entities);\n }\n\n if ("loop" in json) {\n return Loop.fromJSON(json, entities);\n }\n\n if ("parallel" in json) {\n return Parallel.fromJSON(json, entities);\n }\n\n if ("tryCatch" in json) {\n return TryCatch.fromJSON(json, entities);\n }\n\n if ("variables" in json) {\n return Variables.fromJSON(json, entities);\n }\n\n if ("throw" in json) {\n return Throw.fromJSON(json, entities);\n }\n\n if ("return" in json) {\n return Return.fromJSON(json, entities);\n }\n\n throw new Error("mysterious block");\n }\n}\n\nexport abstract class Integration extends Block {\n protected integration: string;\n\n constructor(name: string, integration: string) {\n super(name);\n\n this.integration = integration;\n }\n\n public abstract toJSON(): Promise<JsonValue>;\n public abstract toSDK(entities: string[]): Promise<string>;\n\n public static fromJSON(json: any, entities: string[]): Block {\n if ("javascript" in json?.step) {\n return JavaScript.fromJSON(json, entities);\n }\n\n if ("python" in json?.step) {\n return Python.fromJSON(json, entities);\n }\n\n if ("postgres" in json?.step) {\n return PostgreSQL.fromJSON(json, entities);\n }\n\n if ("databricks" in json?.step) {\n return Databricks.fromJSON(json, entities);\n }\n\n if ("email" in json?.step) {\n return Email.fromJSON(json, entities);\n }\n\n if ("restapi" in json?.step || "restapiintegration" in json?.step) {\n return RestApi.fromJSON(json, entities);\n }\n\n throw new Error("mysterious integration");\n }\n}\n\nexport class Python extends Integration {\n private fn: string;\n\n constructor(name: string, config: {\n fn: string;\n }) {\n super(name, "python");\n\n this.fn = config.fn;\n }\n\n public async toJSON(): Promise<JsonValue> {\n return {\n name: this.name,\n step: {\n integration: "python",\n python: {\n body: this.fn,\n },\n },\n };\n }\n\n public async toSDK(entities: string[]): Promise<string> {\n return `new Python("${this.name}", { fn: ${this.fn} })`;\n }\n\n public static fromJSON(json: any, entities: string[]): Python {\n return new Python(json?.name, {\n fn: json?.step?.python?.body,\n });\n }\n}\n\nexport class JavaScript extends Integration {\n private fn: (_: State) => JsonValue;\n\n constructor(\n name: string,\n config: {\n fn: (_: State) => JsonValue;\n },\n ) {\n super(name, "javascript");\n\n this.fn = config.fn;\n }\n\n public async toJSON(): Promise<JsonValue> {\n return {\n name: this.name,\n step: {\n integration: "javascript",\n javascript: {\n body: await toJSBody(this.fn, { block: false, function: true }),\n },\n },\n };\n }\n\n public async toSDK(entities: string[]): Promise<string> {\n return `new JavaScript("${this.name}", { fn: ${signature(code(this.fn.toString()), entities)} })`;\n }\n\n public static fromJSON(json: any, entities: string[]): JavaScript {\n const args = [json?.step?.javascript?.body]\n const references = referenced(json?.step?.javascript?.body, entities)\n\n if (references.length > 0) {\n args.unshift(`{ ${references.join(", ")} }`)\n }\n\n return new JavaScript(json?.name, {\n fn: new Function(...args) as (_: State) => JsonValue,\n });\n }\n}\n\n// TODO(Frank): There is way too much in common between Snowflake and PostgreSQL. Need to add a parent class for these.\nexport class Snowflake extends Integration {\n private statement: Binding<string>;\n\n constructor(\n name: string,\n integration: string,\n config: {\n statement: Binding<string>;\n },\n ) {\n super(name, integration);\n\n this.statement = config.statement;\n }\n\n public async toJSON(): Promise<JsonValue> {\n return {\n name: this.name,\n step: {\n integration: this.integration,\n snowflake: {\n body: await binding(this.statement),\n usePreparedSql: false,\n },\n },\n };\n }\n\n public async toSDK(entities: string[]): Promise<string> {\n return `new Snowflake("${this.name}", "${this.integration}", { statement: ${typeof this.statement === "function" ? signatureV2(await toJSBody(this.statement), entities) : `"${this.statement}"`} })`;\n }\n\n public static fromJSON(json: any, entities: string[]): Snowflake {\n return new Snowflake(json?.name, json?.step?.integration, {\n statement: fromBinding(\n json?.step?.snowflake?.body as string | undefined,\n entities,\n ),\n });\n }\n}\n\nexport class PostgreSQL extends Integration {\n private statement: Binding<string>;\n\n constructor(\n name: string,\n integration: string,\n config: {\n statement: Binding<string>;\n },\n ) {\n super(name, integration);\n\n this.statement = config.statement;\n }\n\n public async toJSON(): Promise<JsonValue> {\n return {\n name: this.name,\n step: {\n integration: this.integration,\n postgres: {\n body: await binding(this.statement),\n usePreparedSql: false,\n operation: "run_sql",\n },\n },\n };\n }\n\n public async toSDK(entities: string[]): Promise<string> {\n return `new PostgreSQL("${this.name}", "${this.integration}", { statement: ${typeof this.statement === "function" ? signatureV2(await toJSBody(this.statement), entities) : `"${this.statement}"`} })`;\n }\n\n public static fromJSON(json: any, entities: string[]): PostgreSQL {\n return new PostgreSQL(json?.name, json?.step?.integration, {\n statement: fromBinding(\n json?.step?.postgres?.body as string | undefined,\n entities,\n ),\n });\n }\n}\n\nexport class RestApi extends Integration {\n private method: string;\n private url: Binding<string>;\n private headers?: { key: Binding<string>; value: Binding<string> }[];\n private params?: { key: Binding<string>; value: Binding<string> }[];\n private body?: Binding<string>;\n private fromOpenApiSpec?: boolean;\n\n constructor(\n name: string,\n integration: string = "restapi",\n config: {\n method: string;\n url: Binding<string>;\n headers?: { key: Binding<string>; value: Binding<string> }[];\n params?: { key: Binding<string>; value: Binding<string> }[];\n body?: Binding<string>;\n },\n fromOpenApiSpec: boolean = false,\n ) {\n super(name, integration);\n\n this.method = config.method;\n this.url = config.url;\n this.headers = config.headers;\n this.params = config.params;\n this.body = config.body;\n this.fromOpenApiSpec = fromOpenApiSpec;\n }\n\n public async toJSON(): Promise<JsonValue> {\n return {\n name: this.name,\n step: {\n integration: this.integration,\n [this.isIntegration() ? "restapiintegration" : "restapi"]: {\n httpMethod: this.method,\n ...(this.url ? { [this.isIntegration() ? "urlPath" : "path"]: await binding(this.url) } : {}),\n ...(this.headers ? { headers: await Promise.all(this.headers.map(async (header) => ({ key: await binding(header.key), value: await binding(header.value) }))) } : {}),\n ...(this.params ? { params: await Promise.all(this.params.map(async (param) => ({ key: await binding(param.key), value: await binding(param.value) }))) } : {}),\n ...(this.body ? { body: await binding(this.body) } : {}),\n ...(this.fromOpenApiSpec ? { openApiAction: `${this.method} ${await binding(this.url)}` } : {}),\n\n // Other params that I might need to add.\n responseType: "auto",\n bodyType: "jsonBody",\n },\n },\n };\n }\n\n private isIntegration(): boolean {\n return this.integration !== "restapi";\n }\n\n public async toSDK(entities: string[]): Promise<string> {\n const parts: string[] = [`method: "${this.method}"`];\n\n if (this.url) {\n parts.push(\n `url: ${\n typeof this.url === "function"\n ? signatureV2(await toJSBody(this.url), entities)\n : `"${this.url}"`\n }`,\n );\n }\n\n if (this.headers) {\n const headers = (\n await Promise.all(this.headers.map(async (h) =>\n `{ key: ${\n typeof h.key === "function"\n ? signatureV2(await toJSBody(h.key), entities)\n : `"${h.key}"`\n }, value: ${\n typeof h.value === "function"\n ? signatureV2(await toJSBody(h.value), entities)\n : `"${h.value}"`\n } }`,\n ))\n ).join(", ");\n parts.push(`headers: [${headers}]`);\n }\n\n if (this.params) {\n const params = (\n await Promise.all(this.params.map(async (p) =>\n `{ key: ${\n typeof p.key === "function"\n ? signatureV2(await toJSBody(p.key), entities)\n : `"${p.key}"`\n }, value: ${\n typeof p.value === "function"\n ? signatureV2(await toJSBody(p.value), entities)\n : `"${p.value}"`\n } }`,\n ))\n ).join(", ");\n parts.push(`params: [${params}]`);\n }\n\n if (this.body) {\n parts.push(\n `body: ${\n typeof this.body === "function"\n ? signatureV2(await toJSBody(this.body), entities)\n : JSON.stringify(this.body)\n }`,\n );\n }\n\n return `new RestApi("${this.name}", "${this.integration}", { ${parts.join(", ")} }, ${this.fromOpenApiSpec})`;\n }\n\n public static fromJSON(json: any, entities: string[]): RestApi {\n const config = json?.step?.[json?.step?.integration === "restapi" ? "restapi" : "restapiintegration"]\n\n return new RestApi(json?.name, json?.step?.integration, {\n method: config?.httpMethod,\n url: fromBinding(config?.[json?.step?.integration === "restapi" ? "path" : "urlPath"], entities),\n headers: config?.headers?.map((header: any) => ({ key: fromBinding(header.key, entities), value: fromBinding(header.value, entities) })),\n params: config?.params?.map((param: any) => ({ key: fromBinding(param.key, entities), value: fromBinding(param.value, entities) })),\n body: fromBinding(config?.body, entities),\n }, config?.openApiAction && config.openApiAction !== "");\n }\n}\n\nexport class Email extends Integration {\n private subject: Binding<string>;\n private from: Binding<string>; // comma separated list\n private to: Binding<string>; // comma separated list\n private cc?: Binding<string>; // comma separated list\n private bcc?: Binding<string>; // comma separated list\n private body: Binding<string>;\n\n constructor(\n name: string,\n config: {\n from: Binding<string>;\n to: Binding<string>;\n subject: Binding<string>;\n cc?: Binding<string>;\n bcc?: Binding<string>;\n body?: Binding<string>;\n },\n ) {\n super(name, "email");\n\n this.from = config.from;\n this.to = config.to;\n this.subject = config.subject;\n this.cc = config.cc;\n this.bcc = config.bcc;\n this.body = config.body;\n }\n\n public async toJSON(): Promise<JsonValue> {\n return {\n name: this.name,\n step: {\n integration: "email",\n email: {\n ...(this.from ? { emailFrom: await binding(this.from) } : {}),\n ...(this.to ? { emailTo: await binding(this.to) } : {}),\n ...(this.cc ? { emailCc: await binding(this.cc) } : {}),\n ...(this.bcc ? { emailBcc: await binding(this.bcc) } : {}),\n ...(this.subject ? { emailSubject: await binding(this.subject) } : {}),\n ...(this.body ? { emailBody: await binding(this.body) } : {}),\n },\n },\n };\n }\n\n public async toSDK(entities: string[]): Promise<string> {\n const parts: string[] = [];\n\n if (this.from) {\n parts.push(\n `from: ${\n typeof this.from === "function"\n ? signatureV2(code(this.from.toString()), entities)\n : `"${this.from}"`\n }`,\n );\n }\n\n if (this.to) {\n parts.push(\n `to: ${\n typeof this.to === "function"\n ? signatureV2(code(this.to.toString()), entities)\n : `"${this.to}"`\n }`,\n );\n }\n\n if (this.cc) {\n parts.push(\n `cc: ${\n typeof this.cc === "function"\n ? signatureV2(code(this.cc.toString()), entities)\n : `"${this.cc}"`\n }`,\n );\n }\n\n if (this.bcc) {\n parts.push(\n `bcc: ${\n typeof this.bcc === "function"\n ? signatureV2(code(this.bcc.toString()), entities)\n : `"${this.bcc}"`\n }`,\n );\n }\n\n if (this.subject) {\n parts.push(\n `subject: ${\n typeof this.subject === "function"\n ? signatureV2(code(this.subject.toString()), entities)\n : `"${this.subject}"`\n }`,\n );\n }\n\n if (this.body) {\n parts.push(\n `body: ${\n typeof this.body === "function"\n ? signatureV2(code(this.body.toString()), entities)\n : `"${this.body}"`\n }`,\n );\n }\n\n return `new Email("${this.name}", { ${parts.join(", ")} })`;\n }\n\n public static fromJSON(json: any, entities: string[]): Email {\n return new Email(json?.name, {\n from: fromBinding(json?.step?.email?.emailFrom, entities),\n to: fromBinding(json?.step?.email?.emailTo, entities),\n subject: fromBinding(json?.step?.email?.emailSubject, entities),\n body: fromBinding(json?.step?.email?.emailBody, entities),\n cc: json?.step?.email?.emailCc ? fromBinding(json?.step?.email?.emailCc, entities) : undefined,\n bcc: json?.step?.email?.emailBcc ? fromBinding(json?.step?.email?.emailBcc, entities) : undefined,\n });\n }\n}\n\nexport class Databricks extends Integration {\n private statement: Binding<string>;\n\n constructor(\n name: string,\n integration: string,\n config: {\n statement: Binding<string>;\n },\n ) {\n super(name, integration);\n\n this.statement = config.statement;\n }\n\n public async toJSON(): Promise<JsonValue> {\n return {\n name: this.name,\n step: {\n integration: this.integration,\n databricks: {\n runSql: {\n sqlBody: await binding(this.statement),\n useParameterized: false,\n },\n },\n },\n };\n }\n\n public async toSDK(entities: string[]): Promise<string> {\n return `new Databricks("${this.name}", "${this.integration}", { statement: ${typeof this.statement === "function" ? signatureV2(await toJSBody(this.statement), entities) : `"${this.statement}"`} })`;\n }\n\n public static fromJSON(json: any, entities: string[]): Databricks {\n return new Databricks(json?.name, json?.step?.integration, {\n statement: fromBinding(\n json?.step?.databricks?.runSql?.sqlBody as string,\n entities,\n ),\n });\n }\n}\n\nexport type Condition = {\n when: Binding<boolean>;\n then: Block[];\n};\n\nasync function conditionToSDK(condition: Condition, entities: string[]): Promise<string> {\n return `{ when: ${typeof condition.when === "function" ? signatureV2(await toJSBody(condition.when), entities) : condition.when}, then: [${(await Promise.all(condition.then.map(async (block) => await block.toSDK(entities)))).join(",")}] }`\n}\n\nexport type Conditions = {\n if: Condition;\n elif?: Condition[];\n else?: Block[];\n};\n\nexport class Conditional extends Block {\n public conditions: Conditions;\n\n constructor(name: string, config: Conditions) {\n super(name);\n\n this.conditions = config;\n }\n\n public async toJSON(): Promise<JsonValue> {\n return {\n name: this.name,\n conditional: {\n if: {\n condition: await toJS<boolean>(this.conditions.if.when),\n blocks: await Promise.all(this.conditions.if.then.map(async (block) => await block.toJSON())),\n },\n ...await (async () =>\n this.conditions.elif\n ? {\n elseIf: await Promise.all(this.conditions.elif.map(async (condition) => ({\n condition: await toJS<boolean>(condition.when),\n blocks: await Promise.all(condition.then.map(async (block) => await block.toJSON())),\n }))),\n }\n : { elseIf: [] })(),\n else: this.conditions.else ? {\n blocks: await Promise.all(this.conditions.else.map(async (block) => await block.toJSON()))\n } : undefined,\n },\n };\n }\n\n public static fromJSON(json: any, entities: string[]): Conditional {\n return new Conditional(json?.name, {\n if: {\n when: fromJS<boolean>(json?.conditional?.if?.condition, entities),\n then: json?.conditional?.if?.blocks.map((block: any) =>\n Block.fromJSON(block, entities),\n ),\n },\n elif: json?.conditional?.elseIf ? json?.conditional?.elseIf?.map((condition: any) => ({\n when: fromJS<boolean>(condition.condition, entities),\n then: condition.blocks.map((block: any) => Block.fromJSON(block, entities)),\n })) : [],\n else: json?.conditional?.else ? json?.conditional?.else?.blocks?.map((block: any) => Block.fromJSON(block, entities)) : [],\n });\n }\n\n public async toSDK(entities: string[]): Promise<string> {\n return `new Conditional("${this.name}", { if: ${await conditionToSDK(this.conditions.if, entities)}, elif: [${this.conditions.elif ? (await Promise.all(this.conditions.elif?.map(async (condition) => await conditionToSDK(condition, entities)))).join(",") : \'\'}], else: ${this.conditions.else ? (await Promise.all(this.conditions.else?.map(async (block) => await block.toSDK(entities)))).join(",") : "undefined"} })`;\n }\n}\n\nexport class Parallel extends Block {\n private over: Binding<JsonValue[]>;\n private blocks: Block[];\n private variables: { item: string };\n\n constructor(\n name: string,\n config: {\n over: Binding<JsonValue[]>;\n variables: { item: string };\n blocks: Block[];\n },\n ) {\n super(name);\n\n this.over = config.over;\n this.blocks = config.blocks;\n this.variables = config.variables;\n }\n\n public async toJSON(): Promise<JsonValue> {\n return {\n name: this.name,\n parallel: {\n dynamic: {\n blocks: await Promise.all(this.blocks?.map(async (block) => await block.toJSON())),\n paths: await toJS<JsonValue[]>(this.over),\n variables: this.variables,\n },\n wait: "WAIT_ALL",\n },\n };\n }\n\n public async toSDK(entities: string[]): Promise<string> {\n return `new Parallel("${this.name}", { over: ${typeof this.over === "function" ? signatureV2(await toJSBody(this.over), entities) : this.over}, variables: ${this.variables}, blocks: ${await Promise.all(this.blocks.map(async (block) => await block.toSDK(entities)).join(","))} })`;\n }\n\n public static fromJSON(json: any, entities: string[]): Parallel {\n return new Parallel(json?.name, {\n over: fromJS<JsonValue[]>(json?.parallel?.dynamic?.paths, entities),\n variables: {\n item: json?.parallel?.dynamic?.variables?.item,\n },\n blocks: json?.parallel?.dynamic?.blocks.map((block: any) =>\n Block.fromJSON(block, entities),\n ),\n });\n }\n}\n\nexport class Loop extends Block {\n private over: Binding<JsonValue[]>; // NOTE(Frank): Only for each loops are supported at the moment.\n private blocks: Block[];\n private variables: { item: string; index: string };\n\n constructor(\n name: string,\n config: {\n over: Binding<JsonValue[]>;\n variables: { item: string; index: string };\n blocks: Block[];\n },\n ) {\n super(name);\n\n this.over = config.over;\n this.variables = config.variables;\n this.blocks = config.blocks;\n }\n\n public async toJSON(): Promise<JsonValue> {\n return {\n name: this.name,\n loop: {\n range: await toJS<JsonValue[]>(this.over),\n type: "TYPE_FOREACH",\n variables: this.variables,\n blocks: await Promise.all(this.blocks.map(async (block) => await block.toJSON())),\n },\n };\n }\n\n public async toSDK(entities: string[]): Promise<string> {\n return `new Loop("${this.name}", { over: ${typeof this.over === "function" ? signatureV2(await toJSBody(this.over), entities) : this.over}, variables: ${this.variables}, blocks: ${await Promise.all(this.blocks.map(async (block) => await block.toSDK(entities)).join(","))} })`;\n }\n\n public static fromJSON(json: any, entities: string[]): Loop {\n return new Loop(json?.name, {\n over: fromJS<JsonValue[]>(json?.loop?.range, entities),\n variables: {\n item: json?.loop?.variables?.item,\n index: json?.loop?.variables?.index,\n },\n blocks: json?.loop?.blocks.map((block: any) =>\n Block.fromJSON(block, entities),\n ),\n });\n }\n}\n\nexport class Variables extends Block {\n private variables: { key: string, value: Binding<JsonValue> }[];\n\n constructor(\n name: string,\n variables: { key: string, value: Binding<JsonValue> }[],\n ) {\n super(name);\n\n this.variables = variables;\n }\n\n public async toJSON(): Promise<JsonValue> {\n return {\n name: this.name,\n variables: {\n items: await Promise.all(this.variables.map(async (variable) => {\n return {\n key: variable.key,\n value: await toJS<JsonValue>(variable.value),\n type: "TYPE_SIMPLE",\n mode: "MODE_READWRITE",\n };\n }))\n },\n };\n }\n \n public async toSDK(entities: string[]): Promise<string> {\n return `new Variables("${this.name}", [${this.variables?.map((variable) => `{ key: "${variable.key}", value: ${typeof variable.value === "function" ? signature(code(variable.value.toString(), { iife: true }), entities) : variable.value} }`).join(",")}])`;\n }\n\n public static fromJSON(json: any, entities: string[]): Variables {\n return new Variables(json?.name, json?.variables?.items?.map((variable: any) => ({\n key: variable.key,\n value: fromBinding(variable.value, entities),\n })));\n }\n}\n\nexport class TryCatch extends Block {\n private try: Block[];\n private catch: Block[];\n private finally?: Block[];\n private variables: { error: string };\n\n constructor(\n name: string,\n config: {\n try: Block[];\n catch: Block[];\n finally?: Block[];\n variables: { error: string };\n },\n ) {\n super(name);\n\n this.try = config.try;\n this.catch = config.catch;\n this.finally = config.finally;\n this.variables = config.variables;\n }\n\n public async toJSON(): Promise<JsonValue> {\n return {\n name: this.name,\n tryCatch: {\n try: { blocks: await Promise.all(this.try.map(async (block) => await block.toJSON())) },\n catch: { blocks: await Promise.all(this.catch.map(async (block) => await block.toJSON())) },\n finally: { blocks: this.finally ? await Promise.all(this.finally.map(async (block) => await block.toJSON())) : [] },\n variables: this.variables,\n },\n };\n }\n\n public async toSDK(entities: string[]): Promise<string> {\n return `new TryCatch("${this.name}", { try: ${await Promise.all(this.try.map(async (block) => await block.toSDK(entities)).join(","))}, catch: ${await Promise.all(this.catch.map(async (block) => await block.toSDK(entities)).join(","))}, finally: ${this.finally?.map(async (block) => await block.toSDK(entities)).join(", ")} })`;\n }\n\n public static fromJSON(json: any, entities: string[]): TryCatch {\n return new TryCatch(json?.name, {\n try: json?.tryCatch?.try.blocks.map((block: any) => Block.fromJSON(block, entities)),\n catch: json?.tryCatch?.catch.blocks.map((block: any) => Block.fromJSON(block, entities)),\n finally: json?.tryCatch?.finally?.blocks.map((block: any) => Block.fromJSON(block, entities)),\n variables: {\n error: json?.tryCatch?.variables?.error,\n },\n });\n }\n}\n\nexport class Throw extends Block {\n private error: Binding<JsonValue>;\n\n constructor(\n name: string,\n config: {\n error: Binding<JsonValue>;\n },\n ) {\n super(name);\n\n this.error = config.error;\n }\n\n public async toJSON(): Promise<JsonValue> {\n return {\n name: this.name,\n throw: {\n error: await toJS<JsonValue>(this.error),\n },\n };\n }\n\n public async toSDK(entities: string[]): Promise<string> {\n return `new Throw("${this.name}", { error: ${typeof this.error === "function" ? signature(code(this.error.toString()), entities) : JSON.stringify(this.error)} })`;\n }\n\n public static fromJSON(json: any, entities: string[]): Throw {\n return new Throw(json?.name, {\n error: fromJS(json?.throw?.error, entities),\n });\n }\n}\n\nexport class Return extends Block {\n private data: Binding<JsonValue>;\n\n constructor(\n name: string,\n config: {\n data: Binding<JsonValue>;\n },\n ) {\n super(name);\n\n this.data = config.data;\n }\n\n public async toJSON(): Promise<JsonValue> {\n return {\n name: this.name,\n return: {\n data: await toJS<JsonValue>(this.data),\n },\n };\n }\n\n public async toSDK(entities: string[]): Promise<string> {\n return `new Return("${this.name}", { data: ${typeof this.data === "function" ? signature(code(this.data.toString()), entities) : JSON.stringify(this.data)} })`;\n }\n\n public static fromJSON(json: any, entities: string[]): Return {\n return new Return(json?.name, {\n data: fromJS(json?.return?.data, entities),\n });\n }\n}\n\nexport class Api {\n private blocks: Block[];\n private name: string;\n\n constructor(name: string, blocks: Block[]) {\n this.name = name;\n this.blocks = blocks;\n }\n\n public async toSDK(entities: string[]): Promise<string> {\n const imports =\n "import { Api, JavaScript, Python, PostgreSQL, Snowflake, RestApi, Databricks, Conditional, Parallel, Loop, TryCatch, Variables, Throw, Return } from \'@superblocksteam/library\'";\n return `${imports}\\n\\nexport default new Api("${this.name}", [${(await Promise.all(this.blocks.map(async (block) => await block.toSDK(entities)))).join(",")}])`;\n }\n\n public static fromJSON(json: any, entities: string[]): Api {\n // NOTE(Frank): Would probs unmarshal this into the protobuf types and then do the conversion.\n return new Api(\n json?.metadata?.name as string,\n (json.blocks as any[]).map((block) => Block.fromJSON(block, entities)),\n );\n }\n\n public async toJSON(): Promise<JsonValue> {\n const api: {\n metadata: {\n name: string;\n timestamps: {\n updated: string;\n };\n };\n trigger: {\n application: {};\n };\n blocks: JsonValue[];\n } = {\n metadata: {\n name: this.name,\n timestamps: {\n updated: new Date().toISOString(),\n },\n },\n trigger: {\n application: {},\n },\n blocks: [],\n };\n\n api.blocks = await Promise.all(this.blocks.map(async (block) => await block.toJSON()));\n\n return api;\n }\n}\n\nfunction referenced(data: string, entities: string[]): string[] {\n return entities.reduce((acc: string[], entity: string) => {\n if (data.includes(entity)) {\n acc.push(entity);\n }\n return acc;\n }, []);\n}\n\nfunction signature(data: string, entities: string[]): string {\n return `({ ${referenced(data, entities).join(", ")} }) => {${data}}`;\n}\n\nfunction signatureV2(data: string, entities: string[]): string {\n return `({ ${referenced(data, entities).join(", ")} }) => ${data}`;\n}\n\n/**\n * Converts a string binding, which comprise 99% of dynamic integration fields, into a function returning an interpolated string.\n *\n * fromBinding(`https://${ \'goo\' + \'gle\' }.com/${ Dropdown1.value }`, [\'Dropdown1\']) -> ({ Dropdown1 }) => `https://${\'goo\' + \'gle\'}.com/${Dropdown1.value}`\n *\n * @param value - The value to convert.\n * @param entities - The master list of possible entities that could be referenced in the binding.\n *\n * @returns The converted value.\n */\nexport function fromBinding(value: string, entities: string[]): Binding<string> {\n if (!value) {\n return "";\n }\n\n if (!value.startsWith("`") || !value.endsWith("`")) {\n return value;\n }\n\n const args: string[] = [`return ${value}`]\n const references: string[] = referenced(value, entities);\n\n if (references.length === 0) {\n try {\n return eval(value) as string;\n } catch (e) {\n console.error(`We couldn\'t tranform the binding ${value} to the SDK. Ensure the AI hasn\'t hallucinated a variable.`);\n throw e;\n }\n }\n\n // only add the arguments if we have references\n args.unshift(`{ ${references} }`);\n\n return new Function(...args) as (_: State) => string;\n}\n\nasync function beautifyAndOptionallyCondense<T extends JsonValue>(value: ((state: State) => T), node: Node, options: { condense?: boolean, block?: boolean } = { condense: true, block: true }) {\n let start: number = node.start;\n let end: number = node.end;\n\n if (!options.block) {\n start += 1;\n end -= 1;\n }\n \n const beautified = await beautify(value.toString().slice(start, end))\n\n if (options.condense) {\n return beautified.replace(/\\s*\\n\\s*/g, \' \').replace(/\\s+/g, \' \').trim();\n }\n\n return beautified\n}\n\nfunction createAst(value: string): Program {\n return parse(value, {\n ecmaVersion: "latest",\n sourceType: "script",\n preserveParens: false,\n });\n}\n\nasync function toJSBody<T extends JsonValue>(value: ((state: State) => T), options: { block?: boolean, condense?: boolean, function?: boolean } = { block: true, condense: true, function: false }): Promise<string> {\n if (typeof value !== "function") {\n return `\\`${JSON.stringify(value)}\\``\n }\n\n // parse the code\n const ast = createAst(value.toString());\n const program = ast.body[0];\n\n switch (program.type) {\n case "ExpressionStatement":\n const body = ((program as ExpressionStatement).expression as FunctionExpression).body;\n\n if (body.type === \'BlockStatement\') {\n return await beautifyAndOptionallyCondense(value, body, options)\n }\n\n return `${options.function ? "return " : ""}${value.toString().slice(body.start, body.end)}`\n case "FunctionDeclaration":\n let contents = value.toString().slice(program.body.start, program.body.end)\n\n if (program.body.type !== \'BlockStatement\') {\n return contents\n }\n \n if (!options.function && program.body.body.length === 1 && program.body.body[0].type === \'ReturnStatement\') {\n return value.toString().slice(program.body.body[0].argument.start, program.body.body[0].argument.end)\n }\n\n return await beautifyAndOptionallyCondense(value, program.body, options)\n\n default:\n throw new Error("you found a case we haven\'t handled yet")\n }\n}\n\nexport async function toJS<T extends JsonValue>(value: Binding<T>): Promise<string> {\n return `(() => ${typeof value === "function" ? await toJSBody(value) : JSON.stringify(value)})()`\n}\n\nexport function fromJS<T extends JsonValue>(\n value: string,\n entities: string[] = [],\n): Binding<T> {\n // determine if there are entities referenced in the value\n const refs = referenced(value, entities).join(", ")\n\n // remove any surrounding whitespace\n value = value.trim()\n\n let unaryOps: string[] = [];\n let call = (createAst(value).body[0] as ExpressionStatement).expression;\n\n while (call?.type === \'UnaryExpression\') {\n unaryOps.push((call as UnaryExpression).operator);\n call = (call as unknown as UnaryExpression).argument as CallExpression;\n }\n \n const fn = (call as CallExpression).callee;\n let body = value;\n let prefix = "return ";\n\n // handle iife\n if (fn?.type === "ArrowFunctionExpression") {\n // i\'m not happy with this but I don\'t see another immediate way to handle this.\n // this will result in a correct result but one that isn\'t idemopotent.\n if (unaryOps.length > 0) {\n return new Function(`{ ${refs} }`, `${prefix}${body}`) as (_: State) => T;\n }\n\n\n body = value.slice(fn.body.start, fn.body.end)\n\n if (fn.body.type === \'BlockStatement\') {\n // drop the opening "{" and closing "}"\n body = body.slice(1, -1)\n prefix = ""\n } \n } else if (refs.length === 0) {\n // we\'re not an iife nor do we have references.\n // we might have to revisit this implementation since this technically reduces to a static value down to it\'s most minimal form.\n return eval(value) as T\n }\n\n // we\'re either an iife or a static value with refs.\n return new Function(`{ ${refs} }`, `${prefix}${body}`) as (_: State) => T;\n}\n\nexport async function beautify(code: string): Promise<string> {\n const eslint = new ESLint({\n fix: true,\n overrideConfigFile: true,\n baseConfig: {\n languageOptions: {\n parser: typescript_eslint_parser,\n parserOptions: {\n ecmaVersion: 2020,\n sourceType: "module",\n },\n },\n rules: {\n "arrow-body-style": "error",\n },\n },\n });\n\n code = (await eslint.lintText(code))[0]?.output || code;\n\n return await format(code, {\n parser: "typescript",\n tabWidth: 2,\n // singleQuote: true,\n trailingComma: "none",\n semi: true,\n bracketSpacing: true,\n arrowParens: "always",\n bracketSameLine: false,\n embeddedLanguageFormatting: "auto",\n quoteProps: "as-needed",\n insertPragma: false,\n requirePragma: false,\n useTabs: false,\n endOfLine: "auto",\n arrowFunctionParentheses: "always",\n // plugins: ["prettier-plugin-organize-imports"],\n });\n}\n',
|
|
292449
|
+
"src/superblocks-library-shim/index.ts": '/* eslint-disable */\nimport typescript_eslint_parser from "@typescript-eslint/parser";\nimport { CallExpression, ExpressionStatement, FunctionExpression, Node, parse, Program, UnaryExpression } from "acorn";\nimport { ESLint } from "eslint";\nimport { format } from "prettier";\n\nexport type JsonValue =\n | undefined\n | null\n | number\n | string\n | boolean\n | Array<JsonValue>\n | { [key: string]: JsonValue };\nexport type State = { [key: string]: JsonValue };\nexport type Binding<T> = T | ((state: State) => T);\n\n// DEPRECATED\nexport const code = (\n fn: string,\n options: { iife?: boolean } = { iife: false },\n): string => {\n // Parse the function string\n const ast = parse(fn, {\n ecmaVersion: "latest",\n sourceType: "script",\n });\n\n // Find the function declaration/expression\n let functionNode;\n\n // Walk through the AST to find the function\n if (ast.body[0].type === "FunctionDeclaration") {\n // Function declaration: function name() {}\n functionNode = ast.body[0];\n } else if (\n ast.body[0].type === "ExpressionStatement" &&\n (ast.body[0].expression.type === "FunctionExpression" ||\n ast.body[0].expression.type === "ArrowFunctionExpression")\n ) {\n // Function expression: const name = function() {} or const name = () => {}\n functionNode = ast.body[0].expression;\n } else if (\n ast.body[0].type === "VariableDeclaration" &&\n (ast.body[0].declarations[0]?.init?.type === "FunctionExpression" ||\n ast.body[0].declarations[0]?.init?.type === "ArrowFunctionExpression")\n ) {\n // Variable declaration: const name = function() {} or const name = () => {}\n functionNode = ast.body[0].declarations[0]?.init;\n }\n\n if (!functionNode) {\n throw new Error("Could not find a function in the provided string");\n }\n\n // Get the function body\n const body = functionNode.body;\n\n // Extract the source from the original string\n // For arrow functions with an expression body, we return the expression\n if (\n functionNode.type === "ArrowFunctionExpression" &&\n body.type !== "BlockStatement"\n ) {\n // Arrow function with expression body: () => 42\n const expressionCode = fn.substring(fn.indexOf("=>") + 2).trim();\n return options.iife\n ? `(() => ${expressionCode})()`\n : `return ${expressionCode}`;\n }\n\n // For functions with block bodies, extract content between braces\n const start = body.start + 1; // Skip the opening brace\n const end = body.end - 1; // Skip the closing brace\n\n // Get the raw body content\n const rawBodyLines = fn.substring(start, end).split("\\n");\n\n if (rawBodyLines.length <= 1) {\n // Single line body, just trim it\n const bodyCode = rawBodyLines[0].trim();\n\n if (options.iife) {\n const paramStart = fn.indexOf("(");\n const paramEnd = fn.indexOf(")", paramStart);\n const params = fn.substring(paramStart, paramEnd + 1);\n return `(${params} => { ${bodyCode} })()`;\n }\n\n return bodyCode;\n }\n\n // For multi-line bodies, normalize indentation\n // Find the minimum indentation level (ignoring empty lines)\n let minIndent = Infinity;\n for (const line of rawBodyLines) {\n const trimmedLine = line.trimStart();\n if (trimmedLine.length > 0) {\n const indent = line.length - trimmedLine.length;\n minIndent = Math.min(minIndent, indent);\n }\n }\n\n // Remove the common indentation from each line\n const normalizedLines = rawBodyLines.map((line) => {\n if (line.trimStart().length === 0) return "";\n return line.substring(minIndent);\n });\n\n // Join the normalized lines\n const bodyCode = normalizedLines\n .join(" ")\n .replace(/\\s{2,}/g, " ")\n .trim();\n\n if (options.iife) {\n const paramStart = fn.indexOf("(");\n const paramEnd = fn.indexOf(")", paramStart);\n const params = fn.substring(paramStart, paramEnd + 1);\n return `(${params} => { ${bodyCode} })()`;\n }\n\n return bodyCode;\n};\n\nasync function binding(binding: Binding<string>): Promise<string> {\n if (typeof binding === "function") {\n // (() => 5)() -> `${(() => 5)()}`\n return `\\`\\$\\{${await toJS(binding)}\\}\\``;\n }\n\n return `\\`${binding}\\``;\n}\n\ninterface Codec {\n toJSON(): Promise<JsonValue>;\n toSDK(entities: string[]): Promise<string>;\n}\n\nexport abstract class Block implements Codec {\n protected name: string;\n\n constructor(name: string) {\n this.name = name;\n }\n\n public abstract toJSON(): Promise<JsonValue>;\n public abstract toSDK(entities: string[]): Promise<string>;\n\n public static fromJSON(json: any, entities: string[]): Block {\n if (json?.step) {\n return Integration.fromJSON(json, entities);\n }\n\n if ("conditional" in json) {\n return Conditional.fromJSON(json, entities);\n }\n\n if ("loop" in json) {\n return Loop.fromJSON(json, entities);\n }\n\n if ("parallel" in json) {\n return Parallel.fromJSON(json, entities);\n }\n\n if ("tryCatch" in json) {\n return TryCatch.fromJSON(json, entities);\n }\n\n if ("variables" in json) {\n return Variables.fromJSON(json, entities);\n }\n\n if ("throw" in json) {\n return Throw.fromJSON(json, entities);\n }\n\n if ("return" in json) {\n return Return.fromJSON(json, entities);\n }\n\n throw new Error("mysterious block");\n }\n}\n\nexport abstract class Integration extends Block {\n protected integration: string;\n\n constructor(name: string, integration: string) {\n super(name);\n\n this.integration = integration;\n }\n\n public abstract toJSON(): Promise<JsonValue>;\n public abstract toSDK(entities: string[]): Promise<string>;\n\n public static fromJSON(json: any, entities: string[]): Block {\n if ("javascript" in json?.step) {\n return JavaScript.fromJSON(json, entities);\n }\n\n if ("python" in json?.step) {\n return Python.fromJSON(json, entities);\n }\n\n if ("postgres" in json?.step) {\n return PostgreSQL.fromJSON(json, entities);\n }\n\n if ("databricks" in json?.step) {\n return Databricks.fromJSON(json, entities);\n }\n\n if ("email" in json?.step) {\n return Email.fromJSON(json, entities);\n }\n\n if ("restapi" in json?.step || "restapiintegration" in json?.step) {\n return RestApi.fromJSON(json, entities);\n }\n\n if ("jira" in json?.step) {\n return Jira.fromJSON(json, entities);\n }\n\n if ("github" in json?.step) {\n return GitHub.fromJSON(json, entities);\n }\n\n throw new Error("mysterious integration");\n }\n}\n\nexport class Python extends Integration {\n private fn: string;\n\n constructor(name: string, config: {\n fn: string;\n }) {\n super(name, "python");\n\n this.fn = config.fn;\n }\n\n public async toJSON(): Promise<JsonValue> {\n return {\n name: this.name,\n step: {\n integration: "python",\n python: {\n body: this.fn,\n },\n },\n };\n }\n\n public async toSDK(entities: string[]): Promise<string> {\n return `new Python("${this.name}", { fn: ${this.fn} })`;\n }\n\n public static fromJSON(json: any, entities: string[]): Python {\n return new Python(json?.name, {\n fn: json?.step?.python?.body,\n });\n }\n}\n\nexport class JavaScript extends Integration {\n private fn: (_: State) => JsonValue;\n\n constructor(\n name: string,\n config: {\n fn: (_: State) => JsonValue;\n },\n ) {\n super(name, "javascript");\n\n this.fn = config.fn;\n }\n\n public async toJSON(): Promise<JsonValue> {\n return {\n name: this.name,\n step: {\n integration: "javascript",\n javascript: {\n body: await toJSBody(this.fn, { block: false, function: true }),\n },\n },\n };\n }\n\n public async toSDK(entities: string[]): Promise<string> {\n return `new JavaScript("${this.name}", { fn: ${signature(code(this.fn.toString()), entities)} })`;\n }\n\n public static fromJSON(json: any, entities: string[]): JavaScript {\n const args = [json?.step?.javascript?.body]\n const references = referenced(json?.step?.javascript?.body, entities)\n\n if (references.length > 0) {\n args.unshift(`{ ${references.join(", ")} }`)\n }\n\n return new JavaScript(json?.name, {\n fn: new Function(...args) as (_: State) => JsonValue,\n });\n }\n}\n\n// TODO(Frank): There is way too much in common between Snowflake and PostgreSQL. Need to add a parent class for these.\nexport class Snowflake extends Integration {\n private statement: Binding<string>;\n\n constructor(\n name: string,\n integration: string,\n config: {\n statement: Binding<string>;\n },\n ) {\n super(name, integration);\n\n this.statement = config.statement;\n }\n\n public async toJSON(): Promise<JsonValue> {\n return {\n name: this.name,\n step: {\n integration: this.integration,\n snowflake: {\n body: await binding(this.statement),\n usePreparedSql: false,\n },\n },\n };\n }\n\n public async toSDK(entities: string[]): Promise<string> {\n return `new Snowflake("${this.name}", "${this.integration}", { statement: ${typeof this.statement === "function" ? signatureV2(await toJSBody(this.statement), entities) : `"${this.statement}"`} })`;\n }\n\n public static fromJSON(json: any, entities: string[]): Snowflake {\n return new Snowflake(json?.name, json?.step?.integration, {\n statement: fromBinding(\n json?.step?.snowflake?.body as string | undefined,\n entities,\n ),\n });\n }\n}\n\nexport class PostgreSQL extends Integration {\n private statement: Binding<string>;\n\n constructor(\n name: string,\n integration: string,\n config: {\n statement: Binding<string>;\n },\n ) {\n super(name, integration);\n\n this.statement = config.statement;\n }\n\n public async toJSON(): Promise<JsonValue> {\n return {\n name: this.name,\n step: {\n integration: this.integration,\n postgres: {\n body: await binding(this.statement),\n usePreparedSql: false,\n operation: "run_sql",\n },\n },\n };\n }\n\n public async toSDK(entities: string[]): Promise<string> {\n return `new PostgreSQL("${this.name}", "${this.integration}", { statement: ${typeof this.statement === "function" ? signatureV2(await toJSBody(this.statement), entities) : `"${this.statement}"`} })`;\n }\n\n public static fromJSON(json: any, entities: string[]): PostgreSQL {\n return new PostgreSQL(json?.name, json?.step?.integration, {\n statement: fromBinding(\n json?.step?.postgres?.body as string | undefined,\n entities,\n ),\n });\n }\n}\n\nexport class RestApi extends Integration {\n private method: string;\n private url: Binding<string>;\n private headers?: { key: Binding<string>; value: Binding<string> }[];\n private params?: { key: Binding<string>; value: Binding<string> }[];\n private body?: Binding<string>;\n private openapi?: {\n path: string;\n }\n \n protected type: string;\n\n constructor(\n name: string,\n integration: string = "restapi",\n config: {\n method: string;\n url: Binding<string>;\n headers?: { key: Binding<string>; value: Binding<string> }[];\n params?: { key: Binding<string>; value: Binding<string> }[];\n body?: Binding<string>;\n },\n openapi?: {\n path: string;\n }\n ) {\n super(name, integration);\n\n this.method = config.method;\n this.url = config.url;\n this.headers = config.headers;\n this.params = config.params;\n this.body = config.body;\n this.openapi = openapi;\n this.type = this.isIntegration() ? "restapiintegration" : "restapi"\n }\n\n public async toJSON(): Promise<JsonValue> {\n const openApiAction = (): string => {\n if (!this.isIntegration()) {\n return undefined;\n }\n\n if (this.openapi?.path) {\n let path: string = this.openapi.path.trim();\n\n if (path.startsWith("`") && path.endsWith("`")) {\n path = path.slice(1, -1);\n }\n\n return `${this.method} ${path}`;\n }\n\n return \'genericHttpRequest\';\n }\n\n return {\n name: this.name,\n step: {\n integration: this.integration,\n [this.type]: {\n httpMethod: this.method,\n openApiAction: openApiAction(),\n ...(this.url ? { [this.isIntegration() ? "urlPath" : "path"]: await binding(this.url) } : {}),\n ...(this.headers ? { headers: await Promise.all(this.headers.map(async (header) => ({ key: await binding(header.key), value: await binding(header.value) }))) } : {}),\n ...(this.params ? { params: await Promise.all(this.params.map(async (param) => ({ key: await binding(param.key), value: await binding(param.value) }))) } : {}),\n ...(this.body ? { body: await binding(this.body) } : {}),\n\n // Other params that I might need to add.\n responseType: "auto",\n bodyType: "jsonBody",\n },\n },\n };\n }\n\n private isIntegration(): boolean {\n return this.integration !== "restapi";\n }\n\n public async toSDK(entities: string[]): Promise<string> {\n return `new RestApi(${await this.constructorParametersString(entities)})`;\n }\n\n protected async constructorParametersString(entities: string[]): Promise<string> {\n const parts: string[] = [`method: "${this.method}"`];\n\n if (this.url) {\n parts.push(\n `url: ${\n typeof this.url === "function"\n ? signatureV2(await toJSBody(this.url), entities)\n : `"${this.url}"`\n }`,\n );\n }\n\n if (this.headers) {\n const headers = (\n await Promise.all(this.headers.map(async (h) =>\n `{ key: ${\n typeof h.key === "function"\n ? signatureV2(await toJSBody(h.key), entities)\n : `"${h.key}"`\n }, value: ${\n typeof h.value === "function"\n ? signatureV2(await toJSBody(h.value), entities)\n : `"${h.value}"`\n } }`,\n ))\n ).join(", ");\n parts.push(`headers: [${headers}]`);\n }\n\n if (this.params) {\n const params = (\n await Promise.all(this.params.map(async (p) =>\n `{ key: ${\n typeof p.key === "function"\n ? signatureV2(await toJSBody(p.key), entities)\n : `"${p.key}"`\n }, value: ${\n typeof p.value === "function"\n ? signatureV2(await toJSBody(p.value), entities)\n : `"${p.value}"`\n } }`,\n ))\n ).join(", ");\n parts.push(`params: [${params}]`);\n }\n\n if (this.body) {\n parts.push(\n `body: ${\n typeof this.body === "function"\n ? signatureV2(await toJSBody(this.body), entities)\n : JSON.stringify(this.body)\n }`,\n );\n }\n\n return `"${this.name}", "${this.integration}", { ${parts.join(", ")} }, ${JSON.stringify(this.openapi)}`\n }\n\n public static fromJSON(json: any, entities: string[]): RestApi {\n const config = json?.step?.[json?.step?.integration === "restapi" ? "restapi" : "restapiintegration"]\n\n if (json?.step?.integration === "restapiintegration") {\n return new RestApi(json?.name, json?.step?.integration, OpenApi.configFromJSON(config, entities), OpenApi.openapiFromJSON(config))\n }\n\n return new RestApi(json?.name, json?.step?.integration, {\n method: config?.httpMethod,\n url: fromBinding(config?.path, entities),\n headers: config?.headers?.map((header: any) => ({ key: fromBinding(header.key, entities), value: fromBinding(header.value, entities) })),\n params: config?.params?.map((param: any) => ({ key: fromBinding(param.key, entities), value: fromBinding(param.value, entities) })),\n body: fromBinding(config?.body, entities),\n }, OpenApi.openapiFromJSON(config));\n }\n}\n\nexport class OpenApi extends RestApi {\n constructor(\n name: string,\n integration: string,\n config: {\n method: string;\n url: Binding<string>;\n headers?: { key: Binding<string>; value: Binding<string> }[];\n params?: { key: Binding<string>; value: Binding<string> }[];\n body?: Binding<string>;\n },\n openapi?: {\n path: string;\n }\n ) {\n super(name, integration, config, openapi);\n }\n\n public static configFromJSON(json: any, entities: string[]): {\n method: string;\n url: Binding<string>;\n headers?: { key: Binding<string>; value: Binding<string> }[];\n params?: { key: Binding<string>; value: Binding<string> }[];\n body?: Binding<string>;\n } {\n return {\n method: json?.httpMethod,\n url: fromBinding(json?.urlPath, entities),\n headers: json?.headers?.map((header: any) => ({ key: fromBinding(header.key, entities), value: fromBinding(header.value, entities) })),\n params: json?.params?.map((param: any) => ({ key: fromBinding(param.key, entities), value: fromBinding(param.value, entities) })),\n body: fromBinding(json?.body, entities),\n }\n }\n\n public static openapiFromJSON(json: any): {\n path: string;\n } {\n return json?.openApiAction && json.openApiAction !== "" && json.openApiAction !== "genericHttpRequest" ? { path: json.openApiAction.split(" ")[1] } : undefined\n }\n}\n\nexport class Jira extends OpenApi {\n constructor(\n name: string,\n integration: string,\n config: {\n method: string;\n url: Binding<string>;\n headers?: { key: Binding<string>; value: Binding<string> }[];\n params?: { key: Binding<string>; value: Binding<string> }[];\n body?: Binding<string>;\n },\n openapi?: {\n path: string;\n }\n ) {\n super(name, integration, config, openapi);\n this.type = "jira"\n }\n\n public async toSDK(entities: string[]): Promise<string> {\n return `new Jira(${await this.constructorParametersString(entities)})`;\n }\n\n public static fromJSON(json: any, entities: string[]): Jira {\n return new Jira(json?.name, json?.step?.integration, OpenApi.configFromJSON(json?.step?.jira, entities), OpenApi.openapiFromJSON(json?.step?.jira))\n }\n}\n\nexport class GitHub extends OpenApi {\n constructor(\n name: string,\n integration: string,\n config: {\n method: string;\n url: Binding<string>;\n headers?: { key: Binding<string>; value: Binding<string> }[];\n params?: { key: Binding<string>; value: Binding<string> }[];\n body?: Binding<string>;\n },\n openapi?: {\n path: string;\n }\n ) {\n super(name, integration, config, openapi);\n this.type = "github"\n }\n\n public async toSDK(entities: string[]): Promise<string> {\n return `new GitHub(${await this.constructorParametersString(entities)})`;\n }\n\n public static fromJSON(json: any, entities: string[]): GitHub {\n return new GitHub(json?.name, json?.step?.integration, OpenApi.configFromJSON(json?.step?.github, entities), OpenApi.openapiFromJSON(json?.step?.github))\n }\n}\n\nexport class Email extends Integration {\n private subject: Binding<string>;\n private from: Binding<string>; // comma separated list\n private to: Binding<string>; // comma separated list\n private cc?: Binding<string>; // comma separated list\n private bcc?: Binding<string>; // comma separated list\n private body: Binding<string>;\n\n constructor(\n name: string,\n config: {\n from: Binding<string>;\n to: Binding<string>;\n subject: Binding<string>;\n cc?: Binding<string>;\n bcc?: Binding<string>;\n body?: Binding<string>;\n },\n ) {\n super(name, "email");\n\n this.from = config.from;\n this.to = config.to;\n this.subject = config.subject;\n this.cc = config.cc;\n this.bcc = config.bcc;\n this.body = config.body;\n }\n\n public async toJSON(): Promise<JsonValue> {\n return {\n name: this.name,\n step: {\n integration: "email",\n email: {\n ...(this.from ? { emailFrom: await binding(this.from) } : {}),\n ...(this.to ? { emailTo: await binding(this.to) } : {}),\n ...(this.cc ? { emailCc: await binding(this.cc) } : {}),\n ...(this.bcc ? { emailBcc: await binding(this.bcc) } : {}),\n ...(this.subject ? { emailSubject: await binding(this.subject) } : {}),\n ...(this.body ? { emailBody: await binding(this.body) } : {}),\n },\n },\n };\n }\n\n public async toSDK(entities: string[]): Promise<string> {\n const parts: string[] = [];\n\n if (this.from) {\n parts.push(\n `from: ${\n typeof this.from === "function"\n ? signatureV2(code(this.from.toString()), entities)\n : `"${this.from}"`\n }`,\n );\n }\n\n if (this.to) {\n parts.push(\n `to: ${\n typeof this.to === "function"\n ? signatureV2(code(this.to.toString()), entities)\n : `"${this.to}"`\n }`,\n );\n }\n\n if (this.cc) {\n parts.push(\n `cc: ${\n typeof this.cc === "function"\n ? signatureV2(code(this.cc.toString()), entities)\n : `"${this.cc}"`\n }`,\n );\n }\n\n if (this.bcc) {\n parts.push(\n `bcc: ${\n typeof this.bcc === "function"\n ? signatureV2(code(this.bcc.toString()), entities)\n : `"${this.bcc}"`\n }`,\n );\n }\n\n if (this.subject) {\n parts.push(\n `subject: ${\n typeof this.subject === "function"\n ? signatureV2(code(this.subject.toString()), entities)\n : `"${this.subject}"`\n }`,\n );\n }\n\n if (this.body) {\n parts.push(\n `body: ${\n typeof this.body === "function"\n ? signatureV2(code(this.body.toString()), entities)\n : `"${this.body}"`\n }`,\n );\n }\n\n return `new Email("${this.name}", { ${parts.join(", ")} })`;\n }\n\n public static fromJSON(json: any, entities: string[]): Email {\n return new Email(json?.name, {\n from: fromBinding(json?.step?.email?.emailFrom, entities),\n to: fromBinding(json?.step?.email?.emailTo, entities),\n subject: fromBinding(json?.step?.email?.emailSubject, entities),\n body: fromBinding(json?.step?.email?.emailBody, entities),\n cc: json?.step?.email?.emailCc ? fromBinding(json?.step?.email?.emailCc, entities) : undefined,\n bcc: json?.step?.email?.emailBcc ? fromBinding(json?.step?.email?.emailBcc, entities) : undefined,\n });\n }\n}\n\nexport class Databricks extends Integration {\n private statement: Binding<string>;\n\n constructor(\n name: string,\n integration: string,\n config: {\n statement: Binding<string>;\n },\n ) {\n super(name, integration);\n\n this.statement = config.statement;\n }\n\n public async toJSON(): Promise<JsonValue> {\n return {\n name: this.name,\n step: {\n integration: this.integration,\n databricks: {\n runSql: {\n sqlBody: await binding(this.statement),\n useParameterized: false,\n },\n },\n },\n };\n }\n\n public async toSDK(entities: string[]): Promise<string> {\n return `new Databricks("${this.name}", "${this.integration}", { statement: ${typeof this.statement === "function" ? signatureV2(await toJSBody(this.statement), entities) : `"${this.statement}"`} })`;\n }\n\n public static fromJSON(json: any, entities: string[]): Databricks {\n return new Databricks(json?.name, json?.step?.integration, {\n statement: fromBinding(\n json?.step?.databricks?.runSql?.sqlBody as string,\n entities,\n ),\n });\n }\n}\n\nexport type Condition = {\n when: Binding<boolean>;\n then: Block[];\n};\n\nasync function conditionToSDK(condition: Condition, entities: string[]): Promise<string> {\n return `{ when: ${typeof condition.when === "function" ? signatureV2(await toJSBody(condition.when), entities) : condition.when}, then: [${(await Promise.all(condition.then.map(async (block) => await block.toSDK(entities)))).join(",")}] }`\n}\n\nexport type Conditions = {\n if: Condition;\n elif?: Condition[];\n else?: Block[];\n};\n\nexport class Conditional extends Block {\n public conditions: Conditions;\n\n constructor(name: string, config: Conditions) {\n super(name);\n\n this.conditions = config;\n }\n\n public async toJSON(): Promise<JsonValue> {\n return {\n name: this.name,\n conditional: {\n if: {\n condition: await toJS<boolean>(this.conditions.if.when),\n blocks: await Promise.all(this.conditions.if.then.map(async (block) => await block.toJSON())),\n },\n ...await (async () =>\n this.conditions.elif\n ? {\n elseIf: await Promise.all(this.conditions.elif.map(async (condition) => ({\n condition: await toJS<boolean>(condition.when),\n blocks: await Promise.all(condition.then.map(async (block) => await block.toJSON())),\n }))),\n }\n : { elseIf: [] })(),\n else: this.conditions.else ? {\n blocks: await Promise.all(this.conditions.else.map(async (block) => await block.toJSON()))\n } : undefined,\n },\n };\n }\n\n public static fromJSON(json: any, entities: string[]): Conditional {\n return new Conditional(json?.name, {\n if: {\n when: fromJS<boolean>(json?.conditional?.if?.condition, entities),\n then: json?.conditional?.if?.blocks.map((block: any) =>\n Block.fromJSON(block, entities),\n ),\n },\n elif: json?.conditional?.elseIf ? json?.conditional?.elseIf?.map((condition: any) => ({\n when: fromJS<boolean>(condition.condition, entities),\n then: condition.blocks.map((block: any) => Block.fromJSON(block, entities)),\n })) : [],\n else: json?.conditional?.else ? json?.conditional?.else?.blocks?.map((block: any) => Block.fromJSON(block, entities)) : [],\n });\n }\n\n public async toSDK(entities: string[]): Promise<string> {\n return `new Conditional("${this.name}", { if: ${await conditionToSDK(this.conditions.if, entities)}, elif: [${this.conditions.elif ? (await Promise.all(this.conditions.elif?.map(async (condition) => await conditionToSDK(condition, entities)))).join(",") : \'\'}], else: ${this.conditions.else ? (await Promise.all(this.conditions.else?.map(async (block) => await block.toSDK(entities)))).join(",") : "undefined"} })`;\n }\n}\n\nexport class Parallel extends Block {\n private over: Binding<JsonValue[]>;\n private blocks: Block[];\n private variables: { item: string };\n\n constructor(\n name: string,\n config: {\n over: Binding<JsonValue[]>;\n variables: { item: string };\n blocks: Block[];\n },\n ) {\n super(name);\n\n this.over = config.over;\n this.blocks = config.blocks;\n this.variables = config.variables;\n }\n\n public async toJSON(): Promise<JsonValue> {\n return {\n name: this.name,\n parallel: {\n dynamic: {\n blocks: await Promise.all(this.blocks?.map(async (block) => await block.toJSON())),\n paths: await toJS<JsonValue[]>(this.over),\n variables: this.variables,\n },\n wait: "WAIT_ALL",\n },\n };\n }\n\n public async toSDK(entities: string[]): Promise<string> {\n return `new Parallel("${this.name}", { over: ${typeof this.over === "function" ? signatureV2(await toJSBody(this.over), entities) : this.over}, variables: ${this.variables}, blocks: ${await Promise.all(this.blocks.map(async (block) => await block.toSDK(entities)).join(","))} })`;\n }\n\n public static fromJSON(json: any, entities: string[]): Parallel {\n return new Parallel(json?.name, {\n over: fromJS<JsonValue[]>(json?.parallel?.dynamic?.paths, entities),\n variables: {\n item: json?.parallel?.dynamic?.variables?.item,\n },\n blocks: json?.parallel?.dynamic?.blocks.map((block: any) =>\n Block.fromJSON(block, entities),\n ),\n });\n }\n}\n\nexport class Loop extends Block {\n private over: Binding<JsonValue[]>; // NOTE(Frank): Only for each loops are supported at the moment.\n private blocks: Block[];\n private variables: { item: string; index: string };\n\n constructor(\n name: string,\n config: {\n over: Binding<JsonValue[]>;\n variables: { item: string; index: string };\n blocks: Block[];\n },\n ) {\n super(name);\n\n this.over = config.over;\n this.variables = config.variables;\n this.blocks = config.blocks;\n }\n\n public async toJSON(): Promise<JsonValue> {\n return {\n name: this.name,\n loop: {\n range: await toJS<JsonValue[]>(this.over),\n type: "TYPE_FOREACH",\n variables: this.variables,\n blocks: await Promise.all(this.blocks.map(async (block) => await block.toJSON())),\n },\n };\n }\n\n public async toSDK(entities: string[]): Promise<string> {\n return `new Loop("${this.name}", { over: ${typeof this.over === "function" ? signatureV2(await toJSBody(this.over), entities) : this.over}, variables: ${this.variables}, blocks: ${await Promise.all(this.blocks.map(async (block) => await block.toSDK(entities)).join(","))} })`;\n }\n\n public static fromJSON(json: any, entities: string[]): Loop {\n return new Loop(json?.name, {\n over: fromJS<JsonValue[]>(json?.loop?.range, entities),\n variables: {\n item: json?.loop?.variables?.item,\n index: json?.loop?.variables?.index,\n },\n blocks: json?.loop?.blocks.map((block: any) =>\n Block.fromJSON(block, entities),\n ),\n });\n }\n}\n\nexport class Variables extends Block {\n private variables: { key: string, value: Binding<JsonValue> }[];\n\n constructor(\n name: string,\n variables: { key: string, value: Binding<JsonValue> }[],\n ) {\n super(name);\n\n this.variables = variables;\n }\n\n public async toJSON(): Promise<JsonValue> {\n return {\n name: this.name,\n variables: {\n items: await Promise.all(this.variables.map(async (variable) => {\n return {\n key: variable.key,\n value: await toJS<JsonValue>(variable.value),\n type: "TYPE_SIMPLE",\n mode: "MODE_READWRITE",\n };\n }))\n },\n };\n }\n \n public async toSDK(entities: string[]): Promise<string> {\n return `new Variables("${this.name}", [${this.variables?.map((variable) => `{ key: "${variable.key}", value: ${typeof variable.value === "function" ? signature(code(variable.value.toString(), { iife: true }), entities) : variable.value} }`).join(",")}])`;\n }\n\n public static fromJSON(json: any, entities: string[]): Variables {\n return new Variables(json?.name, json?.variables?.items?.map((variable: any) => ({\n key: variable.key,\n value: fromBinding(variable.value, entities),\n })));\n }\n}\n\nexport class TryCatch extends Block {\n private try: Block[];\n private catch: Block[];\n private finally?: Block[];\n private variables: { error: string };\n\n constructor(\n name: string,\n config: {\n try: Block[];\n catch: Block[];\n finally?: Block[];\n variables: { error: string };\n },\n ) {\n super(name);\n\n this.try = config.try;\n this.catch = config.catch;\n this.finally = config.finally;\n this.variables = config.variables;\n }\n\n public async toJSON(): Promise<JsonValue> {\n return {\n name: this.name,\n tryCatch: {\n try: { blocks: await Promise.all(this.try.map(async (block) => await block.toJSON())) },\n catch: { blocks: await Promise.all(this.catch.map(async (block) => await block.toJSON())) },\n finally: { blocks: this.finally ? await Promise.all(this.finally.map(async (block) => await block.toJSON())) : [] },\n variables: this.variables,\n },\n };\n }\n\n public async toSDK(entities: string[]): Promise<string> {\n return `new TryCatch("${this.name}", { try: ${await Promise.all(this.try.map(async (block) => await block.toSDK(entities)).join(","))}, catch: ${await Promise.all(this.catch.map(async (block) => await block.toSDK(entities)).join(","))}, finally: ${this.finally?.map(async (block) => await block.toSDK(entities)).join(", ")} })`;\n }\n\n public static fromJSON(json: any, entities: string[]): TryCatch {\n return new TryCatch(json?.name, {\n try: json?.tryCatch?.try.blocks.map((block: any) => Block.fromJSON(block, entities)),\n catch: json?.tryCatch?.catch.blocks.map((block: any) => Block.fromJSON(block, entities)),\n finally: json?.tryCatch?.finally?.blocks.map((block: any) => Block.fromJSON(block, entities)),\n variables: {\n error: json?.tryCatch?.variables?.error,\n },\n });\n }\n}\n\nexport class Throw extends Block {\n private error: Binding<JsonValue>;\n\n constructor(\n name: string,\n config: {\n error: Binding<JsonValue>;\n },\n ) {\n super(name);\n\n this.error = config.error;\n }\n\n public async toJSON(): Promise<JsonValue> {\n return {\n name: this.name,\n throw: {\n error: await toJS<JsonValue>(this.error),\n },\n };\n }\n\n public async toSDK(entities: string[]): Promise<string> {\n return `new Throw("${this.name}", { error: ${typeof this.error === "function" ? signature(code(this.error.toString()), entities) : JSON.stringify(this.error)} })`;\n }\n\n public static fromJSON(json: any, entities: string[]): Throw {\n return new Throw(json?.name, {\n error: fromJS(json?.throw?.error, entities),\n });\n }\n}\n\nexport class Return extends Block {\n private data: Binding<JsonValue>;\n\n constructor(\n name: string,\n config: {\n data: Binding<JsonValue>;\n },\n ) {\n super(name);\n\n this.data = config.data;\n }\n\n public async toJSON(): Promise<JsonValue> {\n return {\n name: this.name,\n return: {\n data: await toJS<JsonValue>(this.data),\n },\n };\n }\n\n public async toSDK(entities: string[]): Promise<string> {\n return `new Return("${this.name}", { data: ${typeof this.data === "function" ? signature(code(this.data.toString()), entities) : JSON.stringify(this.data)} })`;\n }\n\n public static fromJSON(json: any, entities: string[]): Return {\n return new Return(json?.name, {\n data: fromJS(json?.return?.data, entities),\n });\n }\n}\n\nexport class Api {\n private blocks: Block[];\n private name: string;\n\n constructor(name: string, blocks: Block[]) {\n this.name = name;\n this.blocks = blocks;\n }\n\n public async toSDK(entities: string[]): Promise<string> {\n const imports =\n "import { Api, JavaScript, Python, PostgreSQL, Snowflake, RestApi, Databricks, Conditional, Parallel, Loop, TryCatch, Variables, Throw, Return } from \'@superblocksteam/library\'";\n return `${imports}\\n\\nexport default new Api("${this.name}", [${(await Promise.all(this.blocks.map(async (block) => await block.toSDK(entities)))).join(",")}])`;\n }\n\n public static fromJSON(json: any, entities: string[]): Api {\n // NOTE(Frank): Would probs unmarshal this into the protobuf types and then do the conversion.\n return new Api(\n json?.metadata?.name as string,\n (json.blocks as any[]).map((block) => Block.fromJSON(block, entities)),\n );\n }\n\n public async toJSON(): Promise<JsonValue> {\n const api: {\n metadata: {\n name: string;\n timestamps: {\n updated: string;\n };\n };\n trigger: {\n application: {};\n };\n blocks: JsonValue[];\n } = {\n metadata: {\n name: this.name,\n timestamps: {\n updated: new Date().toISOString(),\n },\n },\n trigger: {\n application: {},\n },\n blocks: [],\n };\n\n api.blocks = await Promise.all(this.blocks.map(async (block) => await block.toJSON()));\n\n return api;\n }\n}\n\nfunction referenced(data: string, entities: string[]): string[] {\n return entities.reduce((acc: string[], entity: string) => {\n if (data.includes(entity)) {\n acc.push(entity);\n }\n return acc;\n }, []);\n}\n\nfunction signature(data: string, entities: string[]): string {\n return `({ ${referenced(data, entities).join(", ")} }) => {${data}}`;\n}\n\nfunction signatureV2(data: string, entities: string[]): string {\n return `({ ${referenced(data, entities).join(", ")} }) => ${data}`;\n}\n\n/**\n * Converts a string binding, which comprise 99% of dynamic integration fields, into a function returning an interpolated string.\n *\n * fromBinding(`https://${ \'goo\' + \'gle\' }.com/${ Dropdown1.value }`, [\'Dropdown1\']) -> ({ Dropdown1 }) => `https://${\'goo\' + \'gle\'}.com/${Dropdown1.value}`\n *\n * @param value - The value to convert.\n * @param entities - The master list of possible entities that could be referenced in the binding.\n *\n * @returns The converted value.\n */\nexport function fromBinding(value: string, entities: string[]): Binding<string> {\n if (!value) {\n return "";\n }\n\n if (!value.startsWith("`") || !value.endsWith("`")) {\n return value;\n }\n\n const args: string[] = [`return ${value}`]\n const references: string[] = referenced(value, entities);\n\n if (references.length === 0) {\n try {\n return eval(value) as string;\n } catch (e) {\n console.error(`We couldn\'t tranform the binding ${value} to the SDK. Ensure the AI hasn\'t hallucinated a variable.`);\n throw e;\n }\n }\n\n // only add the arguments if we have references\n args.unshift(`{ ${references} }`);\n\n return new Function(...args) as (_: State) => string;\n}\n\nasync function beautifyAndOptionallyCondense<T extends JsonValue>(value: ((state: State) => T), node: Node, options: { condense?: boolean, block?: boolean } = { condense: true, block: true }) {\n let start: number = node.start;\n let end: number = node.end;\n\n if (!options.block) {\n start += 1;\n end -= 1;\n }\n \n const beautified = await beautify(value.toString().slice(start, end))\n\n if (options.condense) {\n return beautified.replace(/\\s*\\n\\s*/g, \' \').replace(/\\s+/g, \' \').trim();\n }\n\n return beautified\n}\n\nfunction createAst(value: string): Program {\n return parse(value, {\n ecmaVersion: "latest",\n sourceType: "script",\n preserveParens: false,\n });\n}\n\nasync function toJSBody<T extends JsonValue>(value: ((state: State) => T), options: { block?: boolean, condense?: boolean, function?: boolean } = { block: true, condense: true, function: false }): Promise<string> {\n if (typeof value !== "function") {\n return `\\`${JSON.stringify(value)}\\``\n }\n\n // parse the code\n const ast = createAst(value.toString());\n const program = ast.body[0];\n\n switch (program.type) {\n case "ExpressionStatement":\n const body = ((program as ExpressionStatement).expression as FunctionExpression).body;\n\n if (body.type === \'BlockStatement\') {\n return await beautifyAndOptionallyCondense(value, body, options)\n }\n\n return `${options.function ? "return " : ""}${value.toString().slice(body.start, body.end)}`\n case "FunctionDeclaration":\n let contents = value.toString().slice(program.body.start, program.body.end)\n\n if (program.body.type !== \'BlockStatement\') {\n return contents\n }\n \n if (!options.function && program.body.body.length === 1 && program.body.body[0].type === \'ReturnStatement\') {\n return value.toString().slice(program.body.body[0].argument.start, program.body.body[0].argument.end)\n }\n\n return await beautifyAndOptionallyCondense(value, program.body, options)\n\n default:\n throw new Error("you found a case we haven\'t handled yet")\n }\n}\n\nexport async function toJS<T extends JsonValue>(value: Binding<T>): Promise<string> {\n return `(() => ${typeof value === "function" ? await toJSBody(value) : JSON.stringify(value)})()`\n}\n\nexport function fromJS<T extends JsonValue>(\n value: string,\n entities: string[] = [],\n): Binding<T> {\n // determine if there are entities referenced in the value\n const refs = referenced(value, entities).join(", ")\n\n // remove any surrounding whitespace\n value = value.trim()\n\n let unaryOps: string[] = [];\n let call = (createAst(value).body[0] as ExpressionStatement).expression;\n\n while (call?.type === \'UnaryExpression\') {\n unaryOps.push((call as UnaryExpression).operator);\n call = (call as unknown as UnaryExpression).argument as CallExpression;\n }\n \n const fn = (call as CallExpression).callee;\n let body = value;\n let prefix = "return ";\n\n // handle iife\n if (fn?.type === "ArrowFunctionExpression") {\n // i\'m not happy with this but I don\'t see another immediate way to handle this.\n // this will result in a correct result but one that isn\'t idemopotent.\n if (unaryOps.length > 0) {\n return new Function(`{ ${refs} }`, `${prefix}${body}`) as (_: State) => T;\n }\n\n\n body = value.slice(fn.body.start, fn.body.end)\n\n if (fn.body.type === \'BlockStatement\') {\n // drop the opening "{" and closing "}"\n body = body.slice(1, -1)\n prefix = ""\n } \n } else if (refs.length === 0) {\n // we\'re not an iife nor do we have references.\n // we might have to revisit this implementation since this technically reduces to a static value down to it\'s most minimal form.\n return eval(value) as T\n }\n\n // we\'re either an iife or a static value with refs.\n return new Function(`{ ${refs} }`, `${prefix}${body}`) as (_: State) => T;\n}\n\nexport async function beautify(code: string): Promise<string> {\n const eslint = new ESLint({\n fix: true,\n overrideConfigFile: true,\n baseConfig: {\n languageOptions: {\n parser: typescript_eslint_parser,\n parserOptions: {\n ecmaVersion: 2020,\n sourceType: "module",\n },\n },\n rules: {\n "arrow-body-style": "error",\n },\n },\n });\n\n code = (await eslint.lintText(code))[0]?.output || code;\n\n return await format(code, {\n parser: "typescript",\n tabWidth: 2,\n // singleQuote: true,\n trailingComma: "none",\n semi: true,\n bracketSpacing: true,\n arrowParens: "always",\n bracketSameLine: false,\n embeddedLanguageFormatting: "auto",\n quoteProps: "as-needed",\n insertPragma: false,\n requirePragma: false,\n useTabs: false,\n endOfLine: "auto",\n arrowFunctionParentheses: "always",\n // plugins: ["prettier-plugin-organize-imports"],\n });\n}\n',
|
|
292450
292450
|
"src/to-sdk/__template__.ts": 'import { Api } from "@superblocksteam/library";\n\nconst json = {};\n\nconst entities = [];\n\nconst api = Api.fromJSON(json, entities);\n\nexport default {\n toSDK: async () => await api.toSDK(entities),\n};\n',
|
|
292451
292451
|
"tsconfig.json": '{\n "compilerOptions": {\n "target": "ES2020",\n "module": "ESNext",\n "moduleResolution": "bundler",\n "baseUrl": ".",\n "outDir": "dist",\n "rootDir": "src",\n "esModuleInterop": true,\n "resolveJsonModule": true,\n "skipLibCheck": true,\n "types": [\n "node"\n ],\n "paths": {\n "@superblocksteam/library": [\n "src/superblocks-library-shim"\n ]\n }\n },\n "include": [\n "src"\n ],\n "exclude": [\n "node_modules",\n "dist",\n ]\n}'
|
|
292452
292452
|
}
|
|
@@ -292701,7 +292701,9 @@ var datasourceSdkClassByType = {
|
|
|
292701
292701
|
rockset: "Rockset",
|
|
292702
292702
|
gsheets: "GoogleSheets",
|
|
292703
292703
|
kafka: "Kafka",
|
|
292704
|
-
kinesis: "Kinesis"
|
|
292704
|
+
kinesis: "Kinesis",
|
|
292705
|
+
jira: "Jira",
|
|
292706
|
+
github: "GitHub"
|
|
292705
292707
|
};
|
|
292706
292708
|
var openApiIntegrationTypes = [
|
|
292707
292709
|
"airtable",
|
|
@@ -292794,7 +292796,8 @@ function isDatabaseIntegration(integration) {
|
|
|
292794
292796
|
// ../../../vite-plugin-file-sync/dist/ai-service/integrations/to-sdk-prompt.js
|
|
292795
292797
|
init_cjs_shims();
|
|
292796
292798
|
var integrationsToSdkPromptContent = (integrations) => {
|
|
292797
|
-
const integrationsBySdkClassName = integrations.reduce((acc, integration) => {
|
|
292799
|
+
const integrationsBySdkClassName = integrations.filter(Boolean).reduce((acc, integration) => {
|
|
292800
|
+
integration.metadata = getIntegrationMetadata(integration);
|
|
292798
292801
|
const sdkClassName = getSdkClassName(integration.type);
|
|
292799
292802
|
if (!sdkClassName) {
|
|
292800
292803
|
return acc;
|
|
@@ -292806,11 +292809,3394 @@ var integrationsToSdkPromptContent = (integrations) => {
|
|
|
292806
292809
|
return formatSdkClassContent(sdkClassName, integrations2);
|
|
292807
292810
|
});
|
|
292808
292811
|
};
|
|
292809
|
-
var
|
|
292810
|
-
|
|
292811
|
-
|
|
292812
|
-
|
|
292813
|
-
|
|
292812
|
+
var getIntegrationMetadata = (integration) => {
|
|
292813
|
+
if (integration.type === "github") {
|
|
292814
|
+
return {
|
|
292815
|
+
// LARGE
|
|
292816
|
+
openApiSpec: {
|
|
292817
|
+
openapi: "3.0.3",
|
|
292818
|
+
info: {
|
|
292819
|
+
version: "1.1.4",
|
|
292820
|
+
title: "GitHub"
|
|
292821
|
+
},
|
|
292822
|
+
servers: [
|
|
292823
|
+
{
|
|
292824
|
+
url: "https://api.github.com"
|
|
292825
|
+
}
|
|
292826
|
+
],
|
|
292827
|
+
paths: {
|
|
292828
|
+
"/repos/{owner}/{repo}/pulls/{pull_number}": {
|
|
292829
|
+
get: {
|
|
292830
|
+
summary: "Get a PR",
|
|
292831
|
+
description: 'Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub\'s products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.\n\nLists details of a pull request by providing its number.\n\nWhen you get, [create](https://docs.github.com/rest/reference/pulls/#create-a-pull-request), or [edit](https://docs.github.com/rest/reference/pulls#update-a-pull-request) a pull request, GitHub creates a merge commit to test whether the pull request can be automatically merged into the base branch. This test commit is not added to the base branch or the head branch. You can review the status of the test commit using the `mergeable` key. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)".\n\nThe value of the `mergeable` attribute can be `true`, `false`, or `null`. If the value is `null`, then GitHub has started a background job to compute the mergeability. After giving the job time to complete, resubmit the request. When the job finishes, you will see a non-`null` value for the `mergeable` attribute in the response. If `mergeable` is `true`, then `merge_commit_sha` will be the SHA of the _test_ merge commit.\n\nThe value of the `merge_commit_sha` attribute changes depending on the state of the pull request. Before merging a pull request, the `merge_commit_sha` attribute holds the SHA of the _test_ merge commit. After merging a pull request, the `merge_commit_sha` attribute changes depending on how you merged the pull request:\n\n* If merged as a [merge commit](https://docs.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit.\n* If merged via a [squash](https://docs.github.com/articles/about-merge-methods-on-github/#squashing-your-merge-commits), `merge_commit_sha` represents the SHA of the squashed commit on the base branch.\n* If [rebased](https://docs.github.com/articles/about-merge-methods-on-github/#rebasing-and-merging-your-commits), `merge_commit_sha` represents the commit that the base branch was updated to.\n\nPass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats.',
|
|
292832
|
+
parameters: [
|
|
292833
|
+
{
|
|
292834
|
+
$ref: "#/components/parameters/owner"
|
|
292835
|
+
},
|
|
292836
|
+
{
|
|
292837
|
+
$ref: "#/components/parameters/repo"
|
|
292838
|
+
},
|
|
292839
|
+
{
|
|
292840
|
+
$ref: "#/components/parameters/pull-number"
|
|
292841
|
+
}
|
|
292842
|
+
],
|
|
292843
|
+
responses: {
|
|
292844
|
+
"200": {
|
|
292845
|
+
description: "Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats.",
|
|
292846
|
+
content: {
|
|
292847
|
+
"application/json": {
|
|
292848
|
+
schema: {
|
|
292849
|
+
$ref: "#/components/schemas/pull-request"
|
|
292850
|
+
}
|
|
292851
|
+
}
|
|
292852
|
+
}
|
|
292853
|
+
},
|
|
292854
|
+
"304": {
|
|
292855
|
+
$ref: "#/components/responses/not_modified"
|
|
292856
|
+
},
|
|
292857
|
+
"404": {
|
|
292858
|
+
$ref: "#/components/responses/not_found"
|
|
292859
|
+
},
|
|
292860
|
+
"500": {
|
|
292861
|
+
$ref: "#/components/responses/internal_error"
|
|
292862
|
+
},
|
|
292863
|
+
"503": {
|
|
292864
|
+
$ref: "#/components/responses/service_unavailable"
|
|
292865
|
+
}
|
|
292866
|
+
}
|
|
292867
|
+
}
|
|
292868
|
+
},
|
|
292869
|
+
"/repos/{owner}/{repo}/pulls": {
|
|
292870
|
+
get: {
|
|
292871
|
+
summary: "List PRs",
|
|
292872
|
+
description: "Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.",
|
|
292873
|
+
parameters: [
|
|
292874
|
+
{
|
|
292875
|
+
$ref: "#/components/parameters/owner"
|
|
292876
|
+
},
|
|
292877
|
+
{
|
|
292878
|
+
$ref: "#/components/parameters/repo"
|
|
292879
|
+
},
|
|
292880
|
+
{
|
|
292881
|
+
name: "state",
|
|
292882
|
+
description: "Either `open`, `closed`, or `all` to filter by state.",
|
|
292883
|
+
in: "query",
|
|
292884
|
+
required: false,
|
|
292885
|
+
schema: {
|
|
292886
|
+
type: "string",
|
|
292887
|
+
enum: ["open", "closed", "all"],
|
|
292888
|
+
default: "open"
|
|
292889
|
+
}
|
|
292890
|
+
},
|
|
292891
|
+
{
|
|
292892
|
+
name: "head",
|
|
292893
|
+
description: "Filter pulls by head user or head organization and branch name in the format of `user:ref-name` or `organization:ref-name`. For example: `github:new-script-format` or `octocat:test-branch`.",
|
|
292894
|
+
in: "query",
|
|
292895
|
+
required: false,
|
|
292896
|
+
schema: {
|
|
292897
|
+
type: "string"
|
|
292898
|
+
}
|
|
292899
|
+
},
|
|
292900
|
+
{
|
|
292901
|
+
name: "base",
|
|
292902
|
+
description: "Filter pulls by base branch name. Example: `gh-pages`.",
|
|
292903
|
+
in: "query",
|
|
292904
|
+
required: false,
|
|
292905
|
+
schema: {
|
|
292906
|
+
type: "string"
|
|
292907
|
+
}
|
|
292908
|
+
},
|
|
292909
|
+
{
|
|
292910
|
+
name: "sort",
|
|
292911
|
+
description: "What to sort results by. `popularity` will sort by the number of comments. `long-running` will sort by date created and will limit the results to pull requests that have been open for more than a month and have had activity within the past month.",
|
|
292912
|
+
in: "query",
|
|
292913
|
+
required: false,
|
|
292914
|
+
schema: {
|
|
292915
|
+
type: "string",
|
|
292916
|
+
enum: ["created", "updated", "popularity", "long-running"],
|
|
292917
|
+
default: "created"
|
|
292918
|
+
}
|
|
292919
|
+
},
|
|
292920
|
+
{
|
|
292921
|
+
name: "direction",
|
|
292922
|
+
description: "The direction of the sort. Default: `desc` when sort is `created` or sort is not specified, otherwise `asc`.",
|
|
292923
|
+
in: "query",
|
|
292924
|
+
required: false,
|
|
292925
|
+
schema: {
|
|
292926
|
+
type: "string",
|
|
292927
|
+
enum: ["asc", "desc"]
|
|
292928
|
+
}
|
|
292929
|
+
},
|
|
292930
|
+
{
|
|
292931
|
+
$ref: "#/components/parameters/per-page"
|
|
292932
|
+
},
|
|
292933
|
+
{
|
|
292934
|
+
$ref: "#/components/parameters/page"
|
|
292935
|
+
}
|
|
292936
|
+
],
|
|
292937
|
+
responses: {
|
|
292938
|
+
"200": {
|
|
292939
|
+
description: "Response",
|
|
292940
|
+
content: {
|
|
292941
|
+
"application/json": {
|
|
292942
|
+
schema: {
|
|
292943
|
+
type: "array",
|
|
292944
|
+
items: {
|
|
292945
|
+
$ref: "#/components/schemas/pull-request-simple"
|
|
292946
|
+
}
|
|
292947
|
+
}
|
|
292948
|
+
}
|
|
292949
|
+
},
|
|
292950
|
+
headers: {
|
|
292951
|
+
Link: {
|
|
292952
|
+
$ref: "#/components/headers/link"
|
|
292953
|
+
}
|
|
292954
|
+
}
|
|
292955
|
+
},
|
|
292956
|
+
"304": {
|
|
292957
|
+
$ref: "#/components/responses/not_modified"
|
|
292958
|
+
},
|
|
292959
|
+
"422": {
|
|
292960
|
+
$ref: "#/components/responses/validation_failed"
|
|
292961
|
+
}
|
|
292962
|
+
},
|
|
292963
|
+
"x-github": {
|
|
292964
|
+
githubCloudOnly: false,
|
|
292965
|
+
enabledForGitHubApps: true,
|
|
292966
|
+
category: "pulls",
|
|
292967
|
+
subcategory: "pulls"
|
|
292968
|
+
}
|
|
292969
|
+
}
|
|
292970
|
+
}
|
|
292971
|
+
},
|
|
292972
|
+
components: {
|
|
292973
|
+
parameters: {
|
|
292974
|
+
owner: {
|
|
292975
|
+
name: "owner",
|
|
292976
|
+
description: "The account owner of the repository. The name is not case sensitive.",
|
|
292977
|
+
in: "path",
|
|
292978
|
+
required: true,
|
|
292979
|
+
schema: {
|
|
292980
|
+
type: "string"
|
|
292981
|
+
}
|
|
292982
|
+
},
|
|
292983
|
+
repo: {
|
|
292984
|
+
name: "repo",
|
|
292985
|
+
description: "The name of the repository without the `.git` extension. The name is not case sensitive.",
|
|
292986
|
+
in: "path",
|
|
292987
|
+
required: true,
|
|
292988
|
+
schema: {
|
|
292989
|
+
type: "string"
|
|
292990
|
+
}
|
|
292991
|
+
},
|
|
292992
|
+
"pull-number": {
|
|
292993
|
+
name: "pull_number",
|
|
292994
|
+
description: "The number that identifies the pull request.",
|
|
292995
|
+
in: "path",
|
|
292996
|
+
required: true,
|
|
292997
|
+
schema: {
|
|
292998
|
+
type: "integer"
|
|
292999
|
+
}
|
|
293000
|
+
}
|
|
293001
|
+
},
|
|
293002
|
+
schemas: {
|
|
293003
|
+
"simple-user": {
|
|
293004
|
+
title: "Simple User",
|
|
293005
|
+
description: "A GitHub user.",
|
|
293006
|
+
type: "object",
|
|
293007
|
+
properties: {
|
|
293008
|
+
name: {
|
|
293009
|
+
nullable: true,
|
|
293010
|
+
type: "string"
|
|
293011
|
+
},
|
|
293012
|
+
email: {
|
|
293013
|
+
nullable: true,
|
|
293014
|
+
type: "string"
|
|
293015
|
+
},
|
|
293016
|
+
login: {
|
|
293017
|
+
type: "string",
|
|
293018
|
+
example: "octocat"
|
|
293019
|
+
},
|
|
293020
|
+
id: {
|
|
293021
|
+
type: "integer",
|
|
293022
|
+
example: 1
|
|
293023
|
+
},
|
|
293024
|
+
node_id: {
|
|
293025
|
+
type: "string",
|
|
293026
|
+
example: "MDQ6VXNlcjE="
|
|
293027
|
+
},
|
|
293028
|
+
avatar_url: {
|
|
293029
|
+
type: "string",
|
|
293030
|
+
format: "uri",
|
|
293031
|
+
example: "https://github.com/images/error/octocat_happy.gif"
|
|
293032
|
+
},
|
|
293033
|
+
gravatar_id: {
|
|
293034
|
+
type: "string",
|
|
293035
|
+
example: "41d064eb2195891e12d0413f63227ea7",
|
|
293036
|
+
nullable: true
|
|
293037
|
+
},
|
|
293038
|
+
url: {
|
|
293039
|
+
type: "string",
|
|
293040
|
+
format: "uri",
|
|
293041
|
+
example: "https://api.github.com/users/octocat"
|
|
293042
|
+
},
|
|
293043
|
+
html_url: {
|
|
293044
|
+
type: "string",
|
|
293045
|
+
format: "uri",
|
|
293046
|
+
example: "https://github.com/octocat"
|
|
293047
|
+
},
|
|
293048
|
+
followers_url: {
|
|
293049
|
+
type: "string",
|
|
293050
|
+
format: "uri",
|
|
293051
|
+
example: "https://api.github.com/users/octocat/followers"
|
|
293052
|
+
},
|
|
293053
|
+
following_url: {
|
|
293054
|
+
type: "string",
|
|
293055
|
+
example: "https://api.github.com/users/octocat/following{/other_user}"
|
|
293056
|
+
},
|
|
293057
|
+
gists_url: {
|
|
293058
|
+
type: "string",
|
|
293059
|
+
example: "https://api.github.com/users/octocat/gists{/gist_id}"
|
|
293060
|
+
},
|
|
293061
|
+
starred_url: {
|
|
293062
|
+
type: "string",
|
|
293063
|
+
example: "https://api.github.com/users/octocat/starred{/owner}{/repo}"
|
|
293064
|
+
},
|
|
293065
|
+
subscriptions_url: {
|
|
293066
|
+
type: "string",
|
|
293067
|
+
format: "uri",
|
|
293068
|
+
example: "https://api.github.com/users/octocat/subscriptions"
|
|
293069
|
+
},
|
|
293070
|
+
organizations_url: {
|
|
293071
|
+
type: "string",
|
|
293072
|
+
format: "uri",
|
|
293073
|
+
example: "https://api.github.com/users/octocat/orgs"
|
|
293074
|
+
},
|
|
293075
|
+
repos_url: {
|
|
293076
|
+
type: "string",
|
|
293077
|
+
format: "uri",
|
|
293078
|
+
example: "https://api.github.com/users/octocat/repos"
|
|
293079
|
+
},
|
|
293080
|
+
events_url: {
|
|
293081
|
+
type: "string",
|
|
293082
|
+
example: "https://api.github.com/users/octocat/events{/privacy}"
|
|
293083
|
+
},
|
|
293084
|
+
received_events_url: {
|
|
293085
|
+
type: "string",
|
|
293086
|
+
format: "uri",
|
|
293087
|
+
example: "https://api.github.com/users/octocat/received_events"
|
|
293088
|
+
},
|
|
293089
|
+
type: {
|
|
293090
|
+
type: "string",
|
|
293091
|
+
example: "User"
|
|
293092
|
+
},
|
|
293093
|
+
site_admin: {
|
|
293094
|
+
type: "boolean"
|
|
293095
|
+
},
|
|
293096
|
+
starred_at: {
|
|
293097
|
+
type: "string",
|
|
293098
|
+
example: '"2020-07-09T00:17:55Z"'
|
|
293099
|
+
}
|
|
293100
|
+
},
|
|
293101
|
+
required: [
|
|
293102
|
+
"avatar_url",
|
|
293103
|
+
"events_url",
|
|
293104
|
+
"followers_url",
|
|
293105
|
+
"following_url",
|
|
293106
|
+
"gists_url",
|
|
293107
|
+
"gravatar_id",
|
|
293108
|
+
"html_url",
|
|
293109
|
+
"id",
|
|
293110
|
+
"node_id",
|
|
293111
|
+
"login",
|
|
293112
|
+
"organizations_url",
|
|
293113
|
+
"received_events_url",
|
|
293114
|
+
"repos_url",
|
|
293115
|
+
"site_admin",
|
|
293116
|
+
"starred_url",
|
|
293117
|
+
"subscriptions_url",
|
|
293118
|
+
"type",
|
|
293119
|
+
"url"
|
|
293120
|
+
]
|
|
293121
|
+
},
|
|
293122
|
+
link: {
|
|
293123
|
+
title: "Link",
|
|
293124
|
+
description: "Hypermedia Link",
|
|
293125
|
+
type: "object",
|
|
293126
|
+
properties: {
|
|
293127
|
+
href: {
|
|
293128
|
+
type: "string"
|
|
293129
|
+
}
|
|
293130
|
+
},
|
|
293131
|
+
required: ["href"]
|
|
293132
|
+
},
|
|
293133
|
+
"nullable-milestone": {
|
|
293134
|
+
title: "Milestone",
|
|
293135
|
+
description: "A collection of related issues and pull requests.",
|
|
293136
|
+
type: "object",
|
|
293137
|
+
properties: {
|
|
293138
|
+
url: {
|
|
293139
|
+
type: "string",
|
|
293140
|
+
format: "uri",
|
|
293141
|
+
example: "https://api.github.com/repos/octocat/Hello-World/milestones/1"
|
|
293142
|
+
},
|
|
293143
|
+
html_url: {
|
|
293144
|
+
type: "string",
|
|
293145
|
+
format: "uri",
|
|
293146
|
+
example: "https://github.com/octocat/Hello-World/milestones/v1.0"
|
|
293147
|
+
},
|
|
293148
|
+
labels_url: {
|
|
293149
|
+
type: "string",
|
|
293150
|
+
format: "uri",
|
|
293151
|
+
example: "https://api.github.com/repos/octocat/Hello-World/milestones/1/labels"
|
|
293152
|
+
},
|
|
293153
|
+
id: {
|
|
293154
|
+
type: "integer",
|
|
293155
|
+
example: 1002604
|
|
293156
|
+
},
|
|
293157
|
+
node_id: {
|
|
293158
|
+
type: "string",
|
|
293159
|
+
example: "MDk6TWlsZXN0b25lMTAwMjYwNA=="
|
|
293160
|
+
},
|
|
293161
|
+
number: {
|
|
293162
|
+
description: "The number of the milestone.",
|
|
293163
|
+
type: "integer",
|
|
293164
|
+
example: 42
|
|
293165
|
+
},
|
|
293166
|
+
state: {
|
|
293167
|
+
description: "The state of the milestone.",
|
|
293168
|
+
example: "open",
|
|
293169
|
+
type: "string",
|
|
293170
|
+
enum: ["open", "closed"],
|
|
293171
|
+
default: "open"
|
|
293172
|
+
},
|
|
293173
|
+
title: {
|
|
293174
|
+
description: "The title of the milestone.",
|
|
293175
|
+
example: "v1.0",
|
|
293176
|
+
type: "string"
|
|
293177
|
+
},
|
|
293178
|
+
description: {
|
|
293179
|
+
type: "string",
|
|
293180
|
+
example: "Tracking milestone for version 1.0",
|
|
293181
|
+
nullable: true
|
|
293182
|
+
},
|
|
293183
|
+
creator: {
|
|
293184
|
+
$ref: "#/components/schemas/nullable-simple-user"
|
|
293185
|
+
},
|
|
293186
|
+
open_issues: {
|
|
293187
|
+
type: "integer",
|
|
293188
|
+
example: 4
|
|
293189
|
+
},
|
|
293190
|
+
closed_issues: {
|
|
293191
|
+
type: "integer",
|
|
293192
|
+
example: 8
|
|
293193
|
+
},
|
|
293194
|
+
created_at: {
|
|
293195
|
+
type: "string",
|
|
293196
|
+
format: "date-time",
|
|
293197
|
+
example: "2011-04-10T20:09:31Z"
|
|
293198
|
+
},
|
|
293199
|
+
updated_at: {
|
|
293200
|
+
type: "string",
|
|
293201
|
+
format: "date-time",
|
|
293202
|
+
example: "2014-03-03T18:58:10Z"
|
|
293203
|
+
},
|
|
293204
|
+
closed_at: {
|
|
293205
|
+
type: "string",
|
|
293206
|
+
format: "date-time",
|
|
293207
|
+
example: "2013-02-12T13:22:01Z",
|
|
293208
|
+
nullable: true
|
|
293209
|
+
},
|
|
293210
|
+
due_on: {
|
|
293211
|
+
type: "string",
|
|
293212
|
+
format: "date-time",
|
|
293213
|
+
example: "2012-10-09T23:39:01Z",
|
|
293214
|
+
nullable: true
|
|
293215
|
+
}
|
|
293216
|
+
},
|
|
293217
|
+
required: [
|
|
293218
|
+
"closed_issues",
|
|
293219
|
+
"creator",
|
|
293220
|
+
"description",
|
|
293221
|
+
"due_on",
|
|
293222
|
+
"closed_at",
|
|
293223
|
+
"id",
|
|
293224
|
+
"node_id",
|
|
293225
|
+
"labels_url",
|
|
293226
|
+
"html_url",
|
|
293227
|
+
"number",
|
|
293228
|
+
"open_issues",
|
|
293229
|
+
"state",
|
|
293230
|
+
"title",
|
|
293231
|
+
"url",
|
|
293232
|
+
"created_at",
|
|
293233
|
+
"updated_at"
|
|
293234
|
+
],
|
|
293235
|
+
nullable: true
|
|
293236
|
+
},
|
|
293237
|
+
"nullable-simple-user": {
|
|
293238
|
+
title: "Simple User",
|
|
293239
|
+
description: "A GitHub user.",
|
|
293240
|
+
type: "object",
|
|
293241
|
+
properties: {
|
|
293242
|
+
name: {
|
|
293243
|
+
nullable: true,
|
|
293244
|
+
type: "string"
|
|
293245
|
+
},
|
|
293246
|
+
email: {
|
|
293247
|
+
nullable: true,
|
|
293248
|
+
type: "string"
|
|
293249
|
+
},
|
|
293250
|
+
login: {
|
|
293251
|
+
type: "string",
|
|
293252
|
+
example: "octocat"
|
|
293253
|
+
},
|
|
293254
|
+
id: {
|
|
293255
|
+
type: "integer",
|
|
293256
|
+
example: 1
|
|
293257
|
+
},
|
|
293258
|
+
node_id: {
|
|
293259
|
+
type: "string",
|
|
293260
|
+
example: "MDQ6VXNlcjE="
|
|
293261
|
+
},
|
|
293262
|
+
avatar_url: {
|
|
293263
|
+
type: "string",
|
|
293264
|
+
format: "uri",
|
|
293265
|
+
example: "https://github.com/images/error/octocat_happy.gif"
|
|
293266
|
+
},
|
|
293267
|
+
gravatar_id: {
|
|
293268
|
+
type: "string",
|
|
293269
|
+
example: "41d064eb2195891e12d0413f63227ea7",
|
|
293270
|
+
nullable: true
|
|
293271
|
+
},
|
|
293272
|
+
url: {
|
|
293273
|
+
type: "string",
|
|
293274
|
+
format: "uri",
|
|
293275
|
+
example: "https://api.github.com/users/octocat"
|
|
293276
|
+
},
|
|
293277
|
+
html_url: {
|
|
293278
|
+
type: "string",
|
|
293279
|
+
format: "uri",
|
|
293280
|
+
example: "https://github.com/octocat"
|
|
293281
|
+
},
|
|
293282
|
+
followers_url: {
|
|
293283
|
+
type: "string",
|
|
293284
|
+
format: "uri",
|
|
293285
|
+
example: "https://api.github.com/users/octocat/followers"
|
|
293286
|
+
},
|
|
293287
|
+
following_url: {
|
|
293288
|
+
type: "string",
|
|
293289
|
+
example: "https://api.github.com/users/octocat/following{/other_user}"
|
|
293290
|
+
},
|
|
293291
|
+
gists_url: {
|
|
293292
|
+
type: "string",
|
|
293293
|
+
example: "https://api.github.com/users/octocat/gists{/gist_id}"
|
|
293294
|
+
},
|
|
293295
|
+
starred_url: {
|
|
293296
|
+
type: "string",
|
|
293297
|
+
example: "https://api.github.com/users/octocat/starred{/owner}{/repo}"
|
|
293298
|
+
},
|
|
293299
|
+
subscriptions_url: {
|
|
293300
|
+
type: "string",
|
|
293301
|
+
format: "uri",
|
|
293302
|
+
example: "https://api.github.com/users/octocat/subscriptions"
|
|
293303
|
+
},
|
|
293304
|
+
organizations_url: {
|
|
293305
|
+
type: "string",
|
|
293306
|
+
format: "uri",
|
|
293307
|
+
example: "https://api.github.com/users/octocat/orgs"
|
|
293308
|
+
},
|
|
293309
|
+
repos_url: {
|
|
293310
|
+
type: "string",
|
|
293311
|
+
format: "uri",
|
|
293312
|
+
example: "https://api.github.com/users/octocat/repos"
|
|
293313
|
+
},
|
|
293314
|
+
events_url: {
|
|
293315
|
+
type: "string",
|
|
293316
|
+
example: "https://api.github.com/users/octocat/events{/privacy}"
|
|
293317
|
+
},
|
|
293318
|
+
received_events_url: {
|
|
293319
|
+
type: "string",
|
|
293320
|
+
format: "uri",
|
|
293321
|
+
example: "https://api.github.com/users/octocat/received_events"
|
|
293322
|
+
},
|
|
293323
|
+
type: {
|
|
293324
|
+
type: "string",
|
|
293325
|
+
example: "User"
|
|
293326
|
+
},
|
|
293327
|
+
site_admin: {
|
|
293328
|
+
type: "boolean"
|
|
293329
|
+
},
|
|
293330
|
+
starred_at: {
|
|
293331
|
+
type: "string",
|
|
293332
|
+
example: '"2020-07-09T00:17:55Z"'
|
|
293333
|
+
}
|
|
293334
|
+
},
|
|
293335
|
+
required: [
|
|
293336
|
+
"avatar_url",
|
|
293337
|
+
"events_url",
|
|
293338
|
+
"followers_url",
|
|
293339
|
+
"following_url",
|
|
293340
|
+
"gists_url",
|
|
293341
|
+
"gravatar_id",
|
|
293342
|
+
"html_url",
|
|
293343
|
+
"id",
|
|
293344
|
+
"node_id",
|
|
293345
|
+
"login",
|
|
293346
|
+
"organizations_url",
|
|
293347
|
+
"received_events_url",
|
|
293348
|
+
"repos_url",
|
|
293349
|
+
"site_admin",
|
|
293350
|
+
"starred_url",
|
|
293351
|
+
"subscriptions_url",
|
|
293352
|
+
"type",
|
|
293353
|
+
"url"
|
|
293354
|
+
],
|
|
293355
|
+
nullable: true
|
|
293356
|
+
},
|
|
293357
|
+
"pull-request": {
|
|
293358
|
+
type: "object",
|
|
293359
|
+
title: "Pull Request",
|
|
293360
|
+
description: "Pull requests let you tell others about changes you've pushed to a repository on GitHub. Once a pull request is sent, interested parties can review the set of changes, discuss potential modifications, and even push follow-up commits if necessary.",
|
|
293361
|
+
properties: {
|
|
293362
|
+
url: {
|
|
293363
|
+
type: "string",
|
|
293364
|
+
format: "uri",
|
|
293365
|
+
example: "https://api.github.com/repos/octocat/Hello-World/pulls/1347"
|
|
293366
|
+
},
|
|
293367
|
+
id: {
|
|
293368
|
+
type: "integer",
|
|
293369
|
+
example: 1
|
|
293370
|
+
},
|
|
293371
|
+
node_id: {
|
|
293372
|
+
type: "string",
|
|
293373
|
+
example: "MDExOlB1bGxSZXF1ZXN0MQ=="
|
|
293374
|
+
},
|
|
293375
|
+
html_url: {
|
|
293376
|
+
type: "string",
|
|
293377
|
+
format: "uri",
|
|
293378
|
+
example: "https://github.com/octocat/Hello-World/pull/1347"
|
|
293379
|
+
},
|
|
293380
|
+
diff_url: {
|
|
293381
|
+
type: "string",
|
|
293382
|
+
format: "uri",
|
|
293383
|
+
example: "https://github.com/octocat/Hello-World/pull/1347.diff"
|
|
293384
|
+
},
|
|
293385
|
+
patch_url: {
|
|
293386
|
+
type: "string",
|
|
293387
|
+
format: "uri",
|
|
293388
|
+
example: "https://github.com/octocat/Hello-World/pull/1347.patch"
|
|
293389
|
+
},
|
|
293390
|
+
issue_url: {
|
|
293391
|
+
type: "string",
|
|
293392
|
+
format: "uri",
|
|
293393
|
+
example: "https://api.github.com/repos/octocat/Hello-World/issues/1347"
|
|
293394
|
+
},
|
|
293395
|
+
commits_url: {
|
|
293396
|
+
type: "string",
|
|
293397
|
+
format: "uri",
|
|
293398
|
+
example: "https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits"
|
|
293399
|
+
},
|
|
293400
|
+
review_comments_url: {
|
|
293401
|
+
type: "string",
|
|
293402
|
+
format: "uri",
|
|
293403
|
+
example: "https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments"
|
|
293404
|
+
},
|
|
293405
|
+
review_comment_url: {
|
|
293406
|
+
type: "string",
|
|
293407
|
+
example: "https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}"
|
|
293408
|
+
},
|
|
293409
|
+
comments_url: {
|
|
293410
|
+
type: "string",
|
|
293411
|
+
format: "uri",
|
|
293412
|
+
example: "https://api.github.com/repos/octocat/Hello-World/issues/1347/comments"
|
|
293413
|
+
},
|
|
293414
|
+
statuses_url: {
|
|
293415
|
+
type: "string",
|
|
293416
|
+
format: "uri",
|
|
293417
|
+
example: "https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e"
|
|
293418
|
+
},
|
|
293419
|
+
number: {
|
|
293420
|
+
description: "Number uniquely identifying the pull request within its repository.",
|
|
293421
|
+
example: 42,
|
|
293422
|
+
type: "integer"
|
|
293423
|
+
},
|
|
293424
|
+
state: {
|
|
293425
|
+
description: "State of this Pull Request. Either `open` or `closed`.",
|
|
293426
|
+
enum: ["open", "closed"],
|
|
293427
|
+
example: "open",
|
|
293428
|
+
type: "string"
|
|
293429
|
+
},
|
|
293430
|
+
locked: {
|
|
293431
|
+
type: "boolean",
|
|
293432
|
+
example: true
|
|
293433
|
+
},
|
|
293434
|
+
title: {
|
|
293435
|
+
description: "The title of the pull request.",
|
|
293436
|
+
example: "Amazing new feature",
|
|
293437
|
+
type: "string"
|
|
293438
|
+
},
|
|
293439
|
+
user: {
|
|
293440
|
+
$ref: "#/components/schemas/simple-user"
|
|
293441
|
+
},
|
|
293442
|
+
body: {
|
|
293443
|
+
type: "string",
|
|
293444
|
+
example: "Please pull these awesome changes",
|
|
293445
|
+
nullable: true
|
|
293446
|
+
},
|
|
293447
|
+
labels: {
|
|
293448
|
+
type: "array",
|
|
293449
|
+
items: {
|
|
293450
|
+
type: "object",
|
|
293451
|
+
properties: {
|
|
293452
|
+
id: {
|
|
293453
|
+
type: "integer",
|
|
293454
|
+
format: "int64"
|
|
293455
|
+
},
|
|
293456
|
+
node_id: {
|
|
293457
|
+
type: "string"
|
|
293458
|
+
},
|
|
293459
|
+
url: {
|
|
293460
|
+
type: "string"
|
|
293461
|
+
},
|
|
293462
|
+
name: {
|
|
293463
|
+
type: "string"
|
|
293464
|
+
},
|
|
293465
|
+
description: {
|
|
293466
|
+
type: "string",
|
|
293467
|
+
nullable: true
|
|
293468
|
+
},
|
|
293469
|
+
color: {
|
|
293470
|
+
type: "string"
|
|
293471
|
+
},
|
|
293472
|
+
default: {
|
|
293473
|
+
type: "boolean"
|
|
293474
|
+
}
|
|
293475
|
+
},
|
|
293476
|
+
required: [
|
|
293477
|
+
"id",
|
|
293478
|
+
"node_id",
|
|
293479
|
+
"url",
|
|
293480
|
+
"name",
|
|
293481
|
+
"description",
|
|
293482
|
+
"color",
|
|
293483
|
+
"default"
|
|
293484
|
+
]
|
|
293485
|
+
}
|
|
293486
|
+
},
|
|
293487
|
+
milestone: {
|
|
293488
|
+
$ref: "#/components/schemas/nullable-milestone"
|
|
293489
|
+
},
|
|
293490
|
+
active_lock_reason: {
|
|
293491
|
+
type: "string",
|
|
293492
|
+
example: "too heated",
|
|
293493
|
+
nullable: true
|
|
293494
|
+
},
|
|
293495
|
+
created_at: {
|
|
293496
|
+
type: "string",
|
|
293497
|
+
format: "date-time",
|
|
293498
|
+
example: "2011-01-26T19:01:12Z"
|
|
293499
|
+
},
|
|
293500
|
+
updated_at: {
|
|
293501
|
+
type: "string",
|
|
293502
|
+
format: "date-time",
|
|
293503
|
+
example: "2011-01-26T19:01:12Z"
|
|
293504
|
+
},
|
|
293505
|
+
closed_at: {
|
|
293506
|
+
type: "string",
|
|
293507
|
+
format: "date-time",
|
|
293508
|
+
example: "2011-01-26T19:01:12Z",
|
|
293509
|
+
nullable: true
|
|
293510
|
+
},
|
|
293511
|
+
merged_at: {
|
|
293512
|
+
type: "string",
|
|
293513
|
+
format: "date-time",
|
|
293514
|
+
example: "2011-01-26T19:01:12Z",
|
|
293515
|
+
nullable: true
|
|
293516
|
+
},
|
|
293517
|
+
merge_commit_sha: {
|
|
293518
|
+
type: "string",
|
|
293519
|
+
example: "e5bd3914e2e596debea16f433f57875b5b90bcd6",
|
|
293520
|
+
nullable: true
|
|
293521
|
+
},
|
|
293522
|
+
assignee: {
|
|
293523
|
+
$ref: "#/components/schemas/nullable-simple-user"
|
|
293524
|
+
},
|
|
293525
|
+
assignees: {
|
|
293526
|
+
type: "array",
|
|
293527
|
+
items: {
|
|
293528
|
+
$ref: "#/components/schemas/simple-user"
|
|
293529
|
+
},
|
|
293530
|
+
nullable: true
|
|
293531
|
+
},
|
|
293532
|
+
requested_reviewers: {
|
|
293533
|
+
type: "array",
|
|
293534
|
+
items: {
|
|
293535
|
+
$ref: "#/components/schemas/simple-user"
|
|
293536
|
+
},
|
|
293537
|
+
nullable: true
|
|
293538
|
+
},
|
|
293539
|
+
requested_teams: {
|
|
293540
|
+
type: "array",
|
|
293541
|
+
items: {
|
|
293542
|
+
$ref: "#/components/schemas/team-simple"
|
|
293543
|
+
},
|
|
293544
|
+
nullable: true
|
|
293545
|
+
},
|
|
293546
|
+
head: {
|
|
293547
|
+
type: "object",
|
|
293548
|
+
properties: {
|
|
293549
|
+
label: {
|
|
293550
|
+
type: "string"
|
|
293551
|
+
},
|
|
293552
|
+
ref: {
|
|
293553
|
+
type: "string"
|
|
293554
|
+
},
|
|
293555
|
+
repo: {
|
|
293556
|
+
type: "object",
|
|
293557
|
+
nullable: true,
|
|
293558
|
+
properties: {
|
|
293559
|
+
archive_url: {
|
|
293560
|
+
type: "string"
|
|
293561
|
+
},
|
|
293562
|
+
assignees_url: {
|
|
293563
|
+
type: "string"
|
|
293564
|
+
},
|
|
293565
|
+
blobs_url: {
|
|
293566
|
+
type: "string"
|
|
293567
|
+
},
|
|
293568
|
+
branches_url: {
|
|
293569
|
+
type: "string"
|
|
293570
|
+
},
|
|
293571
|
+
collaborators_url: {
|
|
293572
|
+
type: "string"
|
|
293573
|
+
},
|
|
293574
|
+
comments_url: {
|
|
293575
|
+
type: "string"
|
|
293576
|
+
},
|
|
293577
|
+
commits_url: {
|
|
293578
|
+
type: "string"
|
|
293579
|
+
},
|
|
293580
|
+
compare_url: {
|
|
293581
|
+
type: "string"
|
|
293582
|
+
},
|
|
293583
|
+
contents_url: {
|
|
293584
|
+
type: "string"
|
|
293585
|
+
},
|
|
293586
|
+
contributors_url: {
|
|
293587
|
+
type: "string",
|
|
293588
|
+
format: "uri"
|
|
293589
|
+
},
|
|
293590
|
+
deployments_url: {
|
|
293591
|
+
type: "string",
|
|
293592
|
+
format: "uri"
|
|
293593
|
+
},
|
|
293594
|
+
description: {
|
|
293595
|
+
type: "string",
|
|
293596
|
+
nullable: true
|
|
293597
|
+
},
|
|
293598
|
+
downloads_url: {
|
|
293599
|
+
type: "string",
|
|
293600
|
+
format: "uri"
|
|
293601
|
+
},
|
|
293602
|
+
events_url: {
|
|
293603
|
+
type: "string",
|
|
293604
|
+
format: "uri"
|
|
293605
|
+
},
|
|
293606
|
+
fork: {
|
|
293607
|
+
type: "boolean"
|
|
293608
|
+
},
|
|
293609
|
+
forks_url: {
|
|
293610
|
+
type: "string",
|
|
293611
|
+
format: "uri"
|
|
293612
|
+
},
|
|
293613
|
+
full_name: {
|
|
293614
|
+
type: "string"
|
|
293615
|
+
},
|
|
293616
|
+
git_commits_url: {
|
|
293617
|
+
type: "string"
|
|
293618
|
+
},
|
|
293619
|
+
git_refs_url: {
|
|
293620
|
+
type: "string"
|
|
293621
|
+
},
|
|
293622
|
+
git_tags_url: {
|
|
293623
|
+
type: "string"
|
|
293624
|
+
},
|
|
293625
|
+
hooks_url: {
|
|
293626
|
+
type: "string",
|
|
293627
|
+
format: "uri"
|
|
293628
|
+
},
|
|
293629
|
+
html_url: {
|
|
293630
|
+
type: "string",
|
|
293631
|
+
format: "uri"
|
|
293632
|
+
},
|
|
293633
|
+
id: {
|
|
293634
|
+
type: "integer"
|
|
293635
|
+
},
|
|
293636
|
+
node_id: {
|
|
293637
|
+
type: "string"
|
|
293638
|
+
},
|
|
293639
|
+
issue_comment_url: {
|
|
293640
|
+
type: "string"
|
|
293641
|
+
},
|
|
293642
|
+
issue_events_url: {
|
|
293643
|
+
type: "string"
|
|
293644
|
+
},
|
|
293645
|
+
issues_url: {
|
|
293646
|
+
type: "string"
|
|
293647
|
+
},
|
|
293648
|
+
keys_url: {
|
|
293649
|
+
type: "string"
|
|
293650
|
+
},
|
|
293651
|
+
labels_url: {
|
|
293652
|
+
type: "string"
|
|
293653
|
+
},
|
|
293654
|
+
languages_url: {
|
|
293655
|
+
type: "string",
|
|
293656
|
+
format: "uri"
|
|
293657
|
+
},
|
|
293658
|
+
merges_url: {
|
|
293659
|
+
type: "string",
|
|
293660
|
+
format: "uri"
|
|
293661
|
+
},
|
|
293662
|
+
milestones_url: {
|
|
293663
|
+
type: "string"
|
|
293664
|
+
},
|
|
293665
|
+
name: {
|
|
293666
|
+
type: "string"
|
|
293667
|
+
},
|
|
293668
|
+
notifications_url: {
|
|
293669
|
+
type: "string"
|
|
293670
|
+
},
|
|
293671
|
+
owner: {
|
|
293672
|
+
type: "object",
|
|
293673
|
+
properties: {
|
|
293674
|
+
avatar_url: {
|
|
293675
|
+
type: "string",
|
|
293676
|
+
format: "uri"
|
|
293677
|
+
},
|
|
293678
|
+
events_url: {
|
|
293679
|
+
type: "string"
|
|
293680
|
+
},
|
|
293681
|
+
followers_url: {
|
|
293682
|
+
type: "string",
|
|
293683
|
+
format: "uri"
|
|
293684
|
+
},
|
|
293685
|
+
following_url: {
|
|
293686
|
+
type: "string"
|
|
293687
|
+
},
|
|
293688
|
+
gists_url: {
|
|
293689
|
+
type: "string"
|
|
293690
|
+
},
|
|
293691
|
+
gravatar_id: {
|
|
293692
|
+
type: "string",
|
|
293693
|
+
nullable: true
|
|
293694
|
+
},
|
|
293695
|
+
html_url: {
|
|
293696
|
+
type: "string",
|
|
293697
|
+
format: "uri"
|
|
293698
|
+
},
|
|
293699
|
+
id: {
|
|
293700
|
+
type: "integer"
|
|
293701
|
+
},
|
|
293702
|
+
node_id: {
|
|
293703
|
+
type: "string"
|
|
293704
|
+
},
|
|
293705
|
+
login: {
|
|
293706
|
+
type: "string"
|
|
293707
|
+
},
|
|
293708
|
+
organizations_url: {
|
|
293709
|
+
type: "string",
|
|
293710
|
+
format: "uri"
|
|
293711
|
+
},
|
|
293712
|
+
received_events_url: {
|
|
293713
|
+
type: "string",
|
|
293714
|
+
format: "uri"
|
|
293715
|
+
},
|
|
293716
|
+
repos_url: {
|
|
293717
|
+
type: "string",
|
|
293718
|
+
format: "uri"
|
|
293719
|
+
},
|
|
293720
|
+
site_admin: {
|
|
293721
|
+
type: "boolean"
|
|
293722
|
+
},
|
|
293723
|
+
starred_url: {
|
|
293724
|
+
type: "string"
|
|
293725
|
+
},
|
|
293726
|
+
subscriptions_url: {
|
|
293727
|
+
type: "string",
|
|
293728
|
+
format: "uri"
|
|
293729
|
+
},
|
|
293730
|
+
type: {
|
|
293731
|
+
type: "string"
|
|
293732
|
+
},
|
|
293733
|
+
url: {
|
|
293734
|
+
type: "string",
|
|
293735
|
+
format: "uri"
|
|
293736
|
+
}
|
|
293737
|
+
},
|
|
293738
|
+
required: [
|
|
293739
|
+
"avatar_url",
|
|
293740
|
+
"events_url",
|
|
293741
|
+
"followers_url",
|
|
293742
|
+
"following_url",
|
|
293743
|
+
"gists_url",
|
|
293744
|
+
"gravatar_id",
|
|
293745
|
+
"html_url",
|
|
293746
|
+
"id",
|
|
293747
|
+
"node_id",
|
|
293748
|
+
"login",
|
|
293749
|
+
"organizations_url",
|
|
293750
|
+
"received_events_url",
|
|
293751
|
+
"repos_url",
|
|
293752
|
+
"site_admin",
|
|
293753
|
+
"starred_url",
|
|
293754
|
+
"subscriptions_url",
|
|
293755
|
+
"type",
|
|
293756
|
+
"url"
|
|
293757
|
+
]
|
|
293758
|
+
},
|
|
293759
|
+
private: {
|
|
293760
|
+
type: "boolean"
|
|
293761
|
+
},
|
|
293762
|
+
pulls_url: {
|
|
293763
|
+
type: "string"
|
|
293764
|
+
},
|
|
293765
|
+
releases_url: {
|
|
293766
|
+
type: "string"
|
|
293767
|
+
},
|
|
293768
|
+
stargazers_url: {
|
|
293769
|
+
type: "string",
|
|
293770
|
+
format: "uri"
|
|
293771
|
+
},
|
|
293772
|
+
statuses_url: {
|
|
293773
|
+
type: "string"
|
|
293774
|
+
},
|
|
293775
|
+
subscribers_url: {
|
|
293776
|
+
type: "string",
|
|
293777
|
+
format: "uri"
|
|
293778
|
+
},
|
|
293779
|
+
subscription_url: {
|
|
293780
|
+
type: "string",
|
|
293781
|
+
format: "uri"
|
|
293782
|
+
},
|
|
293783
|
+
tags_url: {
|
|
293784
|
+
type: "string",
|
|
293785
|
+
format: "uri"
|
|
293786
|
+
},
|
|
293787
|
+
teams_url: {
|
|
293788
|
+
type: "string",
|
|
293789
|
+
format: "uri"
|
|
293790
|
+
},
|
|
293791
|
+
trees_url: {
|
|
293792
|
+
type: "string"
|
|
293793
|
+
},
|
|
293794
|
+
url: {
|
|
293795
|
+
type: "string",
|
|
293796
|
+
format: "uri"
|
|
293797
|
+
},
|
|
293798
|
+
clone_url: {
|
|
293799
|
+
type: "string"
|
|
293800
|
+
},
|
|
293801
|
+
default_branch: {
|
|
293802
|
+
type: "string"
|
|
293803
|
+
},
|
|
293804
|
+
forks: {
|
|
293805
|
+
type: "integer"
|
|
293806
|
+
},
|
|
293807
|
+
forks_count: {
|
|
293808
|
+
type: "integer"
|
|
293809
|
+
},
|
|
293810
|
+
git_url: {
|
|
293811
|
+
type: "string"
|
|
293812
|
+
},
|
|
293813
|
+
has_downloads: {
|
|
293814
|
+
type: "boolean"
|
|
293815
|
+
},
|
|
293816
|
+
has_issues: {
|
|
293817
|
+
type: "boolean"
|
|
293818
|
+
},
|
|
293819
|
+
has_projects: {
|
|
293820
|
+
type: "boolean"
|
|
293821
|
+
},
|
|
293822
|
+
has_wiki: {
|
|
293823
|
+
type: "boolean"
|
|
293824
|
+
},
|
|
293825
|
+
has_pages: {
|
|
293826
|
+
type: "boolean"
|
|
293827
|
+
},
|
|
293828
|
+
has_discussions: {
|
|
293829
|
+
type: "boolean"
|
|
293830
|
+
},
|
|
293831
|
+
homepage: {
|
|
293832
|
+
type: "string",
|
|
293833
|
+
format: "uri",
|
|
293834
|
+
nullable: true
|
|
293835
|
+
},
|
|
293836
|
+
language: {
|
|
293837
|
+
type: "string",
|
|
293838
|
+
nullable: true
|
|
293839
|
+
},
|
|
293840
|
+
master_branch: {
|
|
293841
|
+
type: "string"
|
|
293842
|
+
},
|
|
293843
|
+
archived: {
|
|
293844
|
+
type: "boolean"
|
|
293845
|
+
},
|
|
293846
|
+
disabled: {
|
|
293847
|
+
type: "boolean"
|
|
293848
|
+
},
|
|
293849
|
+
visibility: {
|
|
293850
|
+
description: "The repository visibility: public, private, or internal.",
|
|
293851
|
+
type: "string"
|
|
293852
|
+
},
|
|
293853
|
+
mirror_url: {
|
|
293854
|
+
type: "string",
|
|
293855
|
+
format: "uri",
|
|
293856
|
+
nullable: true
|
|
293857
|
+
},
|
|
293858
|
+
open_issues: {
|
|
293859
|
+
type: "integer"
|
|
293860
|
+
},
|
|
293861
|
+
open_issues_count: {
|
|
293862
|
+
type: "integer"
|
|
293863
|
+
},
|
|
293864
|
+
permissions: {
|
|
293865
|
+
type: "object",
|
|
293866
|
+
properties: {
|
|
293867
|
+
admin: {
|
|
293868
|
+
type: "boolean"
|
|
293869
|
+
},
|
|
293870
|
+
maintain: {
|
|
293871
|
+
type: "boolean"
|
|
293872
|
+
},
|
|
293873
|
+
push: {
|
|
293874
|
+
type: "boolean"
|
|
293875
|
+
},
|
|
293876
|
+
triage: {
|
|
293877
|
+
type: "boolean"
|
|
293878
|
+
},
|
|
293879
|
+
pull: {
|
|
293880
|
+
type: "boolean"
|
|
293881
|
+
}
|
|
293882
|
+
},
|
|
293883
|
+
required: ["admin", "pull", "push"]
|
|
293884
|
+
},
|
|
293885
|
+
temp_clone_token: {
|
|
293886
|
+
type: "string"
|
|
293887
|
+
},
|
|
293888
|
+
allow_merge_commit: {
|
|
293889
|
+
type: "boolean"
|
|
293890
|
+
},
|
|
293891
|
+
allow_squash_merge: {
|
|
293892
|
+
type: "boolean"
|
|
293893
|
+
},
|
|
293894
|
+
allow_rebase_merge: {
|
|
293895
|
+
type: "boolean"
|
|
293896
|
+
},
|
|
293897
|
+
license: {
|
|
293898
|
+
type: "object",
|
|
293899
|
+
properties: {
|
|
293900
|
+
key: {
|
|
293901
|
+
type: "string"
|
|
293902
|
+
},
|
|
293903
|
+
name: {
|
|
293904
|
+
type: "string"
|
|
293905
|
+
},
|
|
293906
|
+
url: {
|
|
293907
|
+
type: "string",
|
|
293908
|
+
format: "uri",
|
|
293909
|
+
nullable: true
|
|
293910
|
+
},
|
|
293911
|
+
spdx_id: {
|
|
293912
|
+
type: "string",
|
|
293913
|
+
nullable: true
|
|
293914
|
+
},
|
|
293915
|
+
node_id: {
|
|
293916
|
+
type: "string"
|
|
293917
|
+
}
|
|
293918
|
+
},
|
|
293919
|
+
required: [
|
|
293920
|
+
"key",
|
|
293921
|
+
"name",
|
|
293922
|
+
"url",
|
|
293923
|
+
"spdx_id",
|
|
293924
|
+
"node_id"
|
|
293925
|
+
],
|
|
293926
|
+
nullable: true
|
|
293927
|
+
},
|
|
293928
|
+
pushed_at: {
|
|
293929
|
+
type: "string",
|
|
293930
|
+
format: "date-time"
|
|
293931
|
+
},
|
|
293932
|
+
size: {
|
|
293933
|
+
type: "integer"
|
|
293934
|
+
},
|
|
293935
|
+
ssh_url: {
|
|
293936
|
+
type: "string"
|
|
293937
|
+
},
|
|
293938
|
+
stargazers_count: {
|
|
293939
|
+
type: "integer"
|
|
293940
|
+
},
|
|
293941
|
+
svn_url: {
|
|
293942
|
+
type: "string",
|
|
293943
|
+
format: "uri"
|
|
293944
|
+
},
|
|
293945
|
+
topics: {
|
|
293946
|
+
type: "array",
|
|
293947
|
+
items: {
|
|
293948
|
+
type: "string"
|
|
293949
|
+
}
|
|
293950
|
+
},
|
|
293951
|
+
watchers: {
|
|
293952
|
+
type: "integer"
|
|
293953
|
+
},
|
|
293954
|
+
watchers_count: {
|
|
293955
|
+
type: "integer"
|
|
293956
|
+
},
|
|
293957
|
+
created_at: {
|
|
293958
|
+
type: "string",
|
|
293959
|
+
format: "date-time"
|
|
293960
|
+
},
|
|
293961
|
+
updated_at: {
|
|
293962
|
+
type: "string",
|
|
293963
|
+
format: "date-time"
|
|
293964
|
+
},
|
|
293965
|
+
allow_forking: {
|
|
293966
|
+
type: "boolean"
|
|
293967
|
+
},
|
|
293968
|
+
is_template: {
|
|
293969
|
+
type: "boolean"
|
|
293970
|
+
},
|
|
293971
|
+
web_commit_signoff_required: {
|
|
293972
|
+
type: "boolean"
|
|
293973
|
+
}
|
|
293974
|
+
},
|
|
293975
|
+
required: [
|
|
293976
|
+
"archive_url",
|
|
293977
|
+
"assignees_url",
|
|
293978
|
+
"blobs_url",
|
|
293979
|
+
"branches_url",
|
|
293980
|
+
"collaborators_url",
|
|
293981
|
+
"comments_url",
|
|
293982
|
+
"commits_url",
|
|
293983
|
+
"compare_url",
|
|
293984
|
+
"contents_url",
|
|
293985
|
+
"contributors_url",
|
|
293986
|
+
"deployments_url",
|
|
293987
|
+
"description",
|
|
293988
|
+
"downloads_url",
|
|
293989
|
+
"events_url",
|
|
293990
|
+
"fork",
|
|
293991
|
+
"forks_url",
|
|
293992
|
+
"full_name",
|
|
293993
|
+
"git_commits_url",
|
|
293994
|
+
"git_refs_url",
|
|
293995
|
+
"git_tags_url",
|
|
293996
|
+
"hooks_url",
|
|
293997
|
+
"html_url",
|
|
293998
|
+
"id",
|
|
293999
|
+
"node_id",
|
|
294000
|
+
"issue_comment_url",
|
|
294001
|
+
"issue_events_url",
|
|
294002
|
+
"issues_url",
|
|
294003
|
+
"keys_url",
|
|
294004
|
+
"labels_url",
|
|
294005
|
+
"languages_url",
|
|
294006
|
+
"merges_url",
|
|
294007
|
+
"milestones_url",
|
|
294008
|
+
"name",
|
|
294009
|
+
"notifications_url",
|
|
294010
|
+
"owner",
|
|
294011
|
+
"private",
|
|
294012
|
+
"pulls_url",
|
|
294013
|
+
"releases_url",
|
|
294014
|
+
"stargazers_url",
|
|
294015
|
+
"statuses_url",
|
|
294016
|
+
"subscribers_url",
|
|
294017
|
+
"subscription_url",
|
|
294018
|
+
"tags_url",
|
|
294019
|
+
"teams_url",
|
|
294020
|
+
"trees_url",
|
|
294021
|
+
"url",
|
|
294022
|
+
"clone_url",
|
|
294023
|
+
"default_branch",
|
|
294024
|
+
"forks",
|
|
294025
|
+
"forks_count",
|
|
294026
|
+
"git_url",
|
|
294027
|
+
"has_downloads",
|
|
294028
|
+
"has_issues",
|
|
294029
|
+
"has_projects",
|
|
294030
|
+
"has_wiki",
|
|
294031
|
+
"has_pages",
|
|
294032
|
+
"has_discussions",
|
|
294033
|
+
"homepage",
|
|
294034
|
+
"language",
|
|
294035
|
+
"archived",
|
|
294036
|
+
"disabled",
|
|
294037
|
+
"mirror_url",
|
|
294038
|
+
"open_issues",
|
|
294039
|
+
"open_issues_count",
|
|
294040
|
+
"license",
|
|
294041
|
+
"pushed_at",
|
|
294042
|
+
"size",
|
|
294043
|
+
"ssh_url",
|
|
294044
|
+
"stargazers_count",
|
|
294045
|
+
"svn_url",
|
|
294046
|
+
"watchers",
|
|
294047
|
+
"watchers_count",
|
|
294048
|
+
"created_at",
|
|
294049
|
+
"updated_at"
|
|
294050
|
+
]
|
|
294051
|
+
},
|
|
294052
|
+
sha: {
|
|
294053
|
+
type: "string"
|
|
294054
|
+
},
|
|
294055
|
+
user: {
|
|
294056
|
+
type: "object",
|
|
294057
|
+
properties: {
|
|
294058
|
+
avatar_url: {
|
|
294059
|
+
type: "string",
|
|
294060
|
+
format: "uri"
|
|
294061
|
+
},
|
|
294062
|
+
events_url: {
|
|
294063
|
+
type: "string"
|
|
294064
|
+
},
|
|
294065
|
+
followers_url: {
|
|
294066
|
+
type: "string",
|
|
294067
|
+
format: "uri"
|
|
294068
|
+
},
|
|
294069
|
+
following_url: {
|
|
294070
|
+
type: "string"
|
|
294071
|
+
},
|
|
294072
|
+
gists_url: {
|
|
294073
|
+
type: "string"
|
|
294074
|
+
},
|
|
294075
|
+
gravatar_id: {
|
|
294076
|
+
type: "string",
|
|
294077
|
+
nullable: true
|
|
294078
|
+
},
|
|
294079
|
+
html_url: {
|
|
294080
|
+
type: "string",
|
|
294081
|
+
format: "uri"
|
|
294082
|
+
},
|
|
294083
|
+
id: {
|
|
294084
|
+
type: "integer"
|
|
294085
|
+
},
|
|
294086
|
+
node_id: {
|
|
294087
|
+
type: "string"
|
|
294088
|
+
},
|
|
294089
|
+
login: {
|
|
294090
|
+
type: "string"
|
|
294091
|
+
},
|
|
294092
|
+
organizations_url: {
|
|
294093
|
+
type: "string",
|
|
294094
|
+
format: "uri"
|
|
294095
|
+
},
|
|
294096
|
+
received_events_url: {
|
|
294097
|
+
type: "string",
|
|
294098
|
+
format: "uri"
|
|
294099
|
+
},
|
|
294100
|
+
repos_url: {
|
|
294101
|
+
type: "string",
|
|
294102
|
+
format: "uri"
|
|
294103
|
+
},
|
|
294104
|
+
site_admin: {
|
|
294105
|
+
type: "boolean"
|
|
294106
|
+
},
|
|
294107
|
+
starred_url: {
|
|
294108
|
+
type: "string"
|
|
294109
|
+
},
|
|
294110
|
+
subscriptions_url: {
|
|
294111
|
+
type: "string",
|
|
294112
|
+
format: "uri"
|
|
294113
|
+
},
|
|
294114
|
+
type: {
|
|
294115
|
+
type: "string"
|
|
294116
|
+
},
|
|
294117
|
+
url: {
|
|
294118
|
+
type: "string",
|
|
294119
|
+
format: "uri"
|
|
294120
|
+
}
|
|
294121
|
+
},
|
|
294122
|
+
required: [
|
|
294123
|
+
"avatar_url",
|
|
294124
|
+
"events_url",
|
|
294125
|
+
"followers_url",
|
|
294126
|
+
"following_url",
|
|
294127
|
+
"gists_url",
|
|
294128
|
+
"gravatar_id",
|
|
294129
|
+
"html_url",
|
|
294130
|
+
"id",
|
|
294131
|
+
"node_id",
|
|
294132
|
+
"login",
|
|
294133
|
+
"organizations_url",
|
|
294134
|
+
"received_events_url",
|
|
294135
|
+
"repos_url",
|
|
294136
|
+
"site_admin",
|
|
294137
|
+
"starred_url",
|
|
294138
|
+
"subscriptions_url",
|
|
294139
|
+
"type",
|
|
294140
|
+
"url"
|
|
294141
|
+
]
|
|
294142
|
+
}
|
|
294143
|
+
},
|
|
294144
|
+
required: ["label", "ref", "repo", "sha", "user"]
|
|
294145
|
+
},
|
|
294146
|
+
base: {
|
|
294147
|
+
type: "object",
|
|
294148
|
+
properties: {
|
|
294149
|
+
label: {
|
|
294150
|
+
type: "string"
|
|
294151
|
+
},
|
|
294152
|
+
ref: {
|
|
294153
|
+
type: "string"
|
|
294154
|
+
},
|
|
294155
|
+
repo: {
|
|
294156
|
+
type: "object",
|
|
294157
|
+
properties: {
|
|
294158
|
+
archive_url: {
|
|
294159
|
+
type: "string"
|
|
294160
|
+
},
|
|
294161
|
+
assignees_url: {
|
|
294162
|
+
type: "string"
|
|
294163
|
+
},
|
|
294164
|
+
blobs_url: {
|
|
294165
|
+
type: "string"
|
|
294166
|
+
},
|
|
294167
|
+
branches_url: {
|
|
294168
|
+
type: "string"
|
|
294169
|
+
},
|
|
294170
|
+
collaborators_url: {
|
|
294171
|
+
type: "string"
|
|
294172
|
+
},
|
|
294173
|
+
comments_url: {
|
|
294174
|
+
type: "string"
|
|
294175
|
+
},
|
|
294176
|
+
commits_url: {
|
|
294177
|
+
type: "string"
|
|
294178
|
+
},
|
|
294179
|
+
compare_url: {
|
|
294180
|
+
type: "string"
|
|
294181
|
+
},
|
|
294182
|
+
contents_url: {
|
|
294183
|
+
type: "string"
|
|
294184
|
+
},
|
|
294185
|
+
contributors_url: {
|
|
294186
|
+
type: "string",
|
|
294187
|
+
format: "uri"
|
|
294188
|
+
},
|
|
294189
|
+
deployments_url: {
|
|
294190
|
+
type: "string",
|
|
294191
|
+
format: "uri"
|
|
294192
|
+
},
|
|
294193
|
+
description: {
|
|
294194
|
+
type: "string",
|
|
294195
|
+
nullable: true
|
|
294196
|
+
},
|
|
294197
|
+
downloads_url: {
|
|
294198
|
+
type: "string",
|
|
294199
|
+
format: "uri"
|
|
294200
|
+
},
|
|
294201
|
+
events_url: {
|
|
294202
|
+
type: "string",
|
|
294203
|
+
format: "uri"
|
|
294204
|
+
},
|
|
294205
|
+
fork: {
|
|
294206
|
+
type: "boolean"
|
|
294207
|
+
},
|
|
294208
|
+
forks_url: {
|
|
294209
|
+
type: "string",
|
|
294210
|
+
format: "uri"
|
|
294211
|
+
},
|
|
294212
|
+
full_name: {
|
|
294213
|
+
type: "string"
|
|
294214
|
+
},
|
|
294215
|
+
git_commits_url: {
|
|
294216
|
+
type: "string"
|
|
294217
|
+
},
|
|
294218
|
+
git_refs_url: {
|
|
294219
|
+
type: "string"
|
|
294220
|
+
},
|
|
294221
|
+
git_tags_url: {
|
|
294222
|
+
type: "string"
|
|
294223
|
+
},
|
|
294224
|
+
hooks_url: {
|
|
294225
|
+
type: "string",
|
|
294226
|
+
format: "uri"
|
|
294227
|
+
},
|
|
294228
|
+
html_url: {
|
|
294229
|
+
type: "string",
|
|
294230
|
+
format: "uri"
|
|
294231
|
+
},
|
|
294232
|
+
id: {
|
|
294233
|
+
type: "integer"
|
|
294234
|
+
},
|
|
294235
|
+
is_template: {
|
|
294236
|
+
type: "boolean"
|
|
294237
|
+
},
|
|
294238
|
+
node_id: {
|
|
294239
|
+
type: "string"
|
|
294240
|
+
},
|
|
294241
|
+
issue_comment_url: {
|
|
294242
|
+
type: "string"
|
|
294243
|
+
},
|
|
294244
|
+
issue_events_url: {
|
|
294245
|
+
type: "string"
|
|
294246
|
+
},
|
|
294247
|
+
issues_url: {
|
|
294248
|
+
type: "string"
|
|
294249
|
+
},
|
|
294250
|
+
keys_url: {
|
|
294251
|
+
type: "string"
|
|
294252
|
+
},
|
|
294253
|
+
labels_url: {
|
|
294254
|
+
type: "string"
|
|
294255
|
+
},
|
|
294256
|
+
languages_url: {
|
|
294257
|
+
type: "string",
|
|
294258
|
+
format: "uri"
|
|
294259
|
+
},
|
|
294260
|
+
merges_url: {
|
|
294261
|
+
type: "string",
|
|
294262
|
+
format: "uri"
|
|
294263
|
+
},
|
|
294264
|
+
milestones_url: {
|
|
294265
|
+
type: "string"
|
|
294266
|
+
},
|
|
294267
|
+
name: {
|
|
294268
|
+
type: "string"
|
|
294269
|
+
},
|
|
294270
|
+
notifications_url: {
|
|
294271
|
+
type: "string"
|
|
294272
|
+
},
|
|
294273
|
+
owner: {
|
|
294274
|
+
type: "object",
|
|
294275
|
+
properties: {
|
|
294276
|
+
avatar_url: {
|
|
294277
|
+
type: "string",
|
|
294278
|
+
format: "uri"
|
|
294279
|
+
},
|
|
294280
|
+
events_url: {
|
|
294281
|
+
type: "string"
|
|
294282
|
+
},
|
|
294283
|
+
followers_url: {
|
|
294284
|
+
type: "string",
|
|
294285
|
+
format: "uri"
|
|
294286
|
+
},
|
|
294287
|
+
following_url: {
|
|
294288
|
+
type: "string"
|
|
294289
|
+
},
|
|
294290
|
+
gists_url: {
|
|
294291
|
+
type: "string"
|
|
294292
|
+
},
|
|
294293
|
+
gravatar_id: {
|
|
294294
|
+
type: "string",
|
|
294295
|
+
nullable: true
|
|
294296
|
+
},
|
|
294297
|
+
html_url: {
|
|
294298
|
+
type: "string",
|
|
294299
|
+
format: "uri"
|
|
294300
|
+
},
|
|
294301
|
+
id: {
|
|
294302
|
+
type: "integer"
|
|
294303
|
+
},
|
|
294304
|
+
node_id: {
|
|
294305
|
+
type: "string"
|
|
294306
|
+
},
|
|
294307
|
+
login: {
|
|
294308
|
+
type: "string"
|
|
294309
|
+
},
|
|
294310
|
+
organizations_url: {
|
|
294311
|
+
type: "string",
|
|
294312
|
+
format: "uri"
|
|
294313
|
+
},
|
|
294314
|
+
received_events_url: {
|
|
294315
|
+
type: "string",
|
|
294316
|
+
format: "uri"
|
|
294317
|
+
},
|
|
294318
|
+
repos_url: {
|
|
294319
|
+
type: "string",
|
|
294320
|
+
format: "uri"
|
|
294321
|
+
},
|
|
294322
|
+
site_admin: {
|
|
294323
|
+
type: "boolean"
|
|
294324
|
+
},
|
|
294325
|
+
starred_url: {
|
|
294326
|
+
type: "string"
|
|
294327
|
+
},
|
|
294328
|
+
subscriptions_url: {
|
|
294329
|
+
type: "string",
|
|
294330
|
+
format: "uri"
|
|
294331
|
+
},
|
|
294332
|
+
type: {
|
|
294333
|
+
type: "string"
|
|
294334
|
+
},
|
|
294335
|
+
url: {
|
|
294336
|
+
type: "string",
|
|
294337
|
+
format: "uri"
|
|
294338
|
+
}
|
|
294339
|
+
},
|
|
294340
|
+
required: [
|
|
294341
|
+
"avatar_url",
|
|
294342
|
+
"events_url",
|
|
294343
|
+
"followers_url",
|
|
294344
|
+
"following_url",
|
|
294345
|
+
"gists_url",
|
|
294346
|
+
"gravatar_id",
|
|
294347
|
+
"html_url",
|
|
294348
|
+
"id",
|
|
294349
|
+
"node_id",
|
|
294350
|
+
"login",
|
|
294351
|
+
"organizations_url",
|
|
294352
|
+
"received_events_url",
|
|
294353
|
+
"repos_url",
|
|
294354
|
+
"site_admin",
|
|
294355
|
+
"starred_url",
|
|
294356
|
+
"subscriptions_url",
|
|
294357
|
+
"type",
|
|
294358
|
+
"url"
|
|
294359
|
+
]
|
|
294360
|
+
},
|
|
294361
|
+
private: {
|
|
294362
|
+
type: "boolean"
|
|
294363
|
+
},
|
|
294364
|
+
pulls_url: {
|
|
294365
|
+
type: "string"
|
|
294366
|
+
},
|
|
294367
|
+
releases_url: {
|
|
294368
|
+
type: "string"
|
|
294369
|
+
},
|
|
294370
|
+
stargazers_url: {
|
|
294371
|
+
type: "string",
|
|
294372
|
+
format: "uri"
|
|
294373
|
+
},
|
|
294374
|
+
statuses_url: {
|
|
294375
|
+
type: "string"
|
|
294376
|
+
},
|
|
294377
|
+
subscribers_url: {
|
|
294378
|
+
type: "string",
|
|
294379
|
+
format: "uri"
|
|
294380
|
+
},
|
|
294381
|
+
subscription_url: {
|
|
294382
|
+
type: "string",
|
|
294383
|
+
format: "uri"
|
|
294384
|
+
},
|
|
294385
|
+
tags_url: {
|
|
294386
|
+
type: "string",
|
|
294387
|
+
format: "uri"
|
|
294388
|
+
},
|
|
294389
|
+
teams_url: {
|
|
294390
|
+
type: "string",
|
|
294391
|
+
format: "uri"
|
|
294392
|
+
},
|
|
294393
|
+
trees_url: {
|
|
294394
|
+
type: "string"
|
|
294395
|
+
},
|
|
294396
|
+
url: {
|
|
294397
|
+
type: "string",
|
|
294398
|
+
format: "uri"
|
|
294399
|
+
},
|
|
294400
|
+
clone_url: {
|
|
294401
|
+
type: "string"
|
|
294402
|
+
},
|
|
294403
|
+
default_branch: {
|
|
294404
|
+
type: "string"
|
|
294405
|
+
},
|
|
294406
|
+
forks: {
|
|
294407
|
+
type: "integer"
|
|
294408
|
+
},
|
|
294409
|
+
forks_count: {
|
|
294410
|
+
type: "integer"
|
|
294411
|
+
},
|
|
294412
|
+
git_url: {
|
|
294413
|
+
type: "string"
|
|
294414
|
+
},
|
|
294415
|
+
has_downloads: {
|
|
294416
|
+
type: "boolean"
|
|
294417
|
+
},
|
|
294418
|
+
has_issues: {
|
|
294419
|
+
type: "boolean"
|
|
294420
|
+
},
|
|
294421
|
+
has_projects: {
|
|
294422
|
+
type: "boolean"
|
|
294423
|
+
},
|
|
294424
|
+
has_wiki: {
|
|
294425
|
+
type: "boolean"
|
|
294426
|
+
},
|
|
294427
|
+
has_pages: {
|
|
294428
|
+
type: "boolean"
|
|
294429
|
+
},
|
|
294430
|
+
has_discussions: {
|
|
294431
|
+
type: "boolean"
|
|
294432
|
+
},
|
|
294433
|
+
homepage: {
|
|
294434
|
+
type: "string",
|
|
294435
|
+
format: "uri",
|
|
294436
|
+
nullable: true
|
|
294437
|
+
},
|
|
294438
|
+
language: {
|
|
294439
|
+
type: "string",
|
|
294440
|
+
nullable: true
|
|
294441
|
+
},
|
|
294442
|
+
master_branch: {
|
|
294443
|
+
type: "string"
|
|
294444
|
+
},
|
|
294445
|
+
archived: {
|
|
294446
|
+
type: "boolean"
|
|
294447
|
+
},
|
|
294448
|
+
disabled: {
|
|
294449
|
+
type: "boolean"
|
|
294450
|
+
},
|
|
294451
|
+
visibility: {
|
|
294452
|
+
description: "The repository visibility: public, private, or internal.",
|
|
294453
|
+
type: "string"
|
|
294454
|
+
},
|
|
294455
|
+
mirror_url: {
|
|
294456
|
+
type: "string",
|
|
294457
|
+
format: "uri",
|
|
294458
|
+
nullable: true
|
|
294459
|
+
},
|
|
294460
|
+
open_issues: {
|
|
294461
|
+
type: "integer"
|
|
294462
|
+
},
|
|
294463
|
+
open_issues_count: {
|
|
294464
|
+
type: "integer"
|
|
294465
|
+
},
|
|
294466
|
+
permissions: {
|
|
294467
|
+
type: "object",
|
|
294468
|
+
properties: {
|
|
294469
|
+
admin: {
|
|
294470
|
+
type: "boolean"
|
|
294471
|
+
},
|
|
294472
|
+
maintain: {
|
|
294473
|
+
type: "boolean"
|
|
294474
|
+
},
|
|
294475
|
+
push: {
|
|
294476
|
+
type: "boolean"
|
|
294477
|
+
},
|
|
294478
|
+
triage: {
|
|
294479
|
+
type: "boolean"
|
|
294480
|
+
},
|
|
294481
|
+
pull: {
|
|
294482
|
+
type: "boolean"
|
|
294483
|
+
}
|
|
294484
|
+
},
|
|
294485
|
+
required: ["admin", "pull", "push"]
|
|
294486
|
+
},
|
|
294487
|
+
temp_clone_token: {
|
|
294488
|
+
type: "string"
|
|
294489
|
+
},
|
|
294490
|
+
allow_merge_commit: {
|
|
294491
|
+
type: "boolean"
|
|
294492
|
+
},
|
|
294493
|
+
allow_squash_merge: {
|
|
294494
|
+
type: "boolean"
|
|
294495
|
+
},
|
|
294496
|
+
allow_rebase_merge: {
|
|
294497
|
+
type: "boolean"
|
|
294498
|
+
},
|
|
294499
|
+
license: {
|
|
294500
|
+
$ref: "#/components/schemas/nullable-license-simple"
|
|
294501
|
+
},
|
|
294502
|
+
pushed_at: {
|
|
294503
|
+
type: "string",
|
|
294504
|
+
format: "date-time"
|
|
294505
|
+
},
|
|
294506
|
+
size: {
|
|
294507
|
+
type: "integer"
|
|
294508
|
+
},
|
|
294509
|
+
ssh_url: {
|
|
294510
|
+
type: "string"
|
|
294511
|
+
},
|
|
294512
|
+
stargazers_count: {
|
|
294513
|
+
type: "integer"
|
|
294514
|
+
},
|
|
294515
|
+
svn_url: {
|
|
294516
|
+
type: "string",
|
|
294517
|
+
format: "uri"
|
|
294518
|
+
},
|
|
294519
|
+
topics: {
|
|
294520
|
+
type: "array",
|
|
294521
|
+
items: {
|
|
294522
|
+
type: "string"
|
|
294523
|
+
}
|
|
294524
|
+
},
|
|
294525
|
+
watchers: {
|
|
294526
|
+
type: "integer"
|
|
294527
|
+
},
|
|
294528
|
+
watchers_count: {
|
|
294529
|
+
type: "integer"
|
|
294530
|
+
},
|
|
294531
|
+
created_at: {
|
|
294532
|
+
type: "string",
|
|
294533
|
+
format: "date-time"
|
|
294534
|
+
},
|
|
294535
|
+
updated_at: {
|
|
294536
|
+
type: "string",
|
|
294537
|
+
format: "date-time"
|
|
294538
|
+
},
|
|
294539
|
+
allow_forking: {
|
|
294540
|
+
type: "boolean"
|
|
294541
|
+
},
|
|
294542
|
+
web_commit_signoff_required: {
|
|
294543
|
+
type: "boolean"
|
|
294544
|
+
}
|
|
294545
|
+
},
|
|
294546
|
+
required: [
|
|
294547
|
+
"archive_url",
|
|
294548
|
+
"assignees_url",
|
|
294549
|
+
"blobs_url",
|
|
294550
|
+
"branches_url",
|
|
294551
|
+
"collaborators_url",
|
|
294552
|
+
"comments_url",
|
|
294553
|
+
"commits_url",
|
|
294554
|
+
"compare_url",
|
|
294555
|
+
"contents_url",
|
|
294556
|
+
"contributors_url",
|
|
294557
|
+
"deployments_url",
|
|
294558
|
+
"description",
|
|
294559
|
+
"downloads_url",
|
|
294560
|
+
"events_url",
|
|
294561
|
+
"fork",
|
|
294562
|
+
"forks_url",
|
|
294563
|
+
"full_name",
|
|
294564
|
+
"git_commits_url",
|
|
294565
|
+
"git_refs_url",
|
|
294566
|
+
"git_tags_url",
|
|
294567
|
+
"hooks_url",
|
|
294568
|
+
"html_url",
|
|
294569
|
+
"id",
|
|
294570
|
+
"node_id",
|
|
294571
|
+
"issue_comment_url",
|
|
294572
|
+
"issue_events_url",
|
|
294573
|
+
"issues_url",
|
|
294574
|
+
"keys_url",
|
|
294575
|
+
"labels_url",
|
|
294576
|
+
"languages_url",
|
|
294577
|
+
"merges_url",
|
|
294578
|
+
"milestones_url",
|
|
294579
|
+
"name",
|
|
294580
|
+
"notifications_url",
|
|
294581
|
+
"owner",
|
|
294582
|
+
"private",
|
|
294583
|
+
"pulls_url",
|
|
294584
|
+
"releases_url",
|
|
294585
|
+
"stargazers_url",
|
|
294586
|
+
"statuses_url",
|
|
294587
|
+
"subscribers_url",
|
|
294588
|
+
"subscription_url",
|
|
294589
|
+
"tags_url",
|
|
294590
|
+
"teams_url",
|
|
294591
|
+
"trees_url",
|
|
294592
|
+
"url",
|
|
294593
|
+
"clone_url",
|
|
294594
|
+
"default_branch",
|
|
294595
|
+
"forks",
|
|
294596
|
+
"forks_count",
|
|
294597
|
+
"git_url",
|
|
294598
|
+
"has_downloads",
|
|
294599
|
+
"has_issues",
|
|
294600
|
+
"has_projects",
|
|
294601
|
+
"has_wiki",
|
|
294602
|
+
"has_pages",
|
|
294603
|
+
"has_discussions",
|
|
294604
|
+
"homepage",
|
|
294605
|
+
"language",
|
|
294606
|
+
"archived",
|
|
294607
|
+
"disabled",
|
|
294608
|
+
"mirror_url",
|
|
294609
|
+
"open_issues",
|
|
294610
|
+
"open_issues_count",
|
|
294611
|
+
"license",
|
|
294612
|
+
"pushed_at",
|
|
294613
|
+
"size",
|
|
294614
|
+
"ssh_url",
|
|
294615
|
+
"stargazers_count",
|
|
294616
|
+
"svn_url",
|
|
294617
|
+
"watchers",
|
|
294618
|
+
"watchers_count",
|
|
294619
|
+
"created_at",
|
|
294620
|
+
"updated_at"
|
|
294621
|
+
]
|
|
294622
|
+
},
|
|
294623
|
+
sha: {
|
|
294624
|
+
type: "string"
|
|
294625
|
+
},
|
|
294626
|
+
user: {
|
|
294627
|
+
type: "object",
|
|
294628
|
+
properties: {
|
|
294629
|
+
avatar_url: {
|
|
294630
|
+
type: "string",
|
|
294631
|
+
format: "uri"
|
|
294632
|
+
},
|
|
294633
|
+
events_url: {
|
|
294634
|
+
type: "string"
|
|
294635
|
+
},
|
|
294636
|
+
followers_url: {
|
|
294637
|
+
type: "string",
|
|
294638
|
+
format: "uri"
|
|
294639
|
+
},
|
|
294640
|
+
following_url: {
|
|
294641
|
+
type: "string"
|
|
294642
|
+
},
|
|
294643
|
+
gists_url: {
|
|
294644
|
+
type: "string"
|
|
294645
|
+
},
|
|
294646
|
+
gravatar_id: {
|
|
294647
|
+
type: "string",
|
|
294648
|
+
nullable: true
|
|
294649
|
+
},
|
|
294650
|
+
html_url: {
|
|
294651
|
+
type: "string",
|
|
294652
|
+
format: "uri"
|
|
294653
|
+
},
|
|
294654
|
+
id: {
|
|
294655
|
+
type: "integer"
|
|
294656
|
+
},
|
|
294657
|
+
node_id: {
|
|
294658
|
+
type: "string"
|
|
294659
|
+
},
|
|
294660
|
+
login: {
|
|
294661
|
+
type: "string"
|
|
294662
|
+
},
|
|
294663
|
+
organizations_url: {
|
|
294664
|
+
type: "string",
|
|
294665
|
+
format: "uri"
|
|
294666
|
+
},
|
|
294667
|
+
received_events_url: {
|
|
294668
|
+
type: "string",
|
|
294669
|
+
format: "uri"
|
|
294670
|
+
},
|
|
294671
|
+
repos_url: {
|
|
294672
|
+
type: "string",
|
|
294673
|
+
format: "uri"
|
|
294674
|
+
},
|
|
294675
|
+
site_admin: {
|
|
294676
|
+
type: "boolean"
|
|
294677
|
+
},
|
|
294678
|
+
starred_url: {
|
|
294679
|
+
type: "string"
|
|
294680
|
+
},
|
|
294681
|
+
subscriptions_url: {
|
|
294682
|
+
type: "string",
|
|
294683
|
+
format: "uri"
|
|
294684
|
+
},
|
|
294685
|
+
type: {
|
|
294686
|
+
type: "string"
|
|
294687
|
+
},
|
|
294688
|
+
url: {
|
|
294689
|
+
type: "string",
|
|
294690
|
+
format: "uri"
|
|
294691
|
+
}
|
|
294692
|
+
},
|
|
294693
|
+
required: [
|
|
294694
|
+
"avatar_url",
|
|
294695
|
+
"events_url",
|
|
294696
|
+
"followers_url",
|
|
294697
|
+
"following_url",
|
|
294698
|
+
"gists_url",
|
|
294699
|
+
"gravatar_id",
|
|
294700
|
+
"html_url",
|
|
294701
|
+
"id",
|
|
294702
|
+
"node_id",
|
|
294703
|
+
"login",
|
|
294704
|
+
"organizations_url",
|
|
294705
|
+
"received_events_url",
|
|
294706
|
+
"repos_url",
|
|
294707
|
+
"site_admin",
|
|
294708
|
+
"starred_url",
|
|
294709
|
+
"subscriptions_url",
|
|
294710
|
+
"type",
|
|
294711
|
+
"url"
|
|
294712
|
+
]
|
|
294713
|
+
}
|
|
294714
|
+
},
|
|
294715
|
+
required: ["label", "ref", "repo", "sha", "user"]
|
|
294716
|
+
},
|
|
294717
|
+
_links: {
|
|
294718
|
+
type: "object",
|
|
294719
|
+
properties: {
|
|
294720
|
+
comments: {
|
|
294721
|
+
$ref: "#/components/schemas/link"
|
|
294722
|
+
},
|
|
294723
|
+
commits: {
|
|
294724
|
+
$ref: "#/components/schemas/link"
|
|
294725
|
+
},
|
|
294726
|
+
statuses: {
|
|
294727
|
+
$ref: "#/components/schemas/link"
|
|
294728
|
+
},
|
|
294729
|
+
html: {
|
|
294730
|
+
$ref: "#/components/schemas/link"
|
|
294731
|
+
},
|
|
294732
|
+
issue: {
|
|
294733
|
+
$ref: "#/components/schemas/link"
|
|
294734
|
+
},
|
|
294735
|
+
review_comments: {
|
|
294736
|
+
$ref: "#/components/schemas/link"
|
|
294737
|
+
},
|
|
294738
|
+
review_comment: {
|
|
294739
|
+
$ref: "#/components/schemas/link"
|
|
294740
|
+
},
|
|
294741
|
+
self: {
|
|
294742
|
+
$ref: "#/components/schemas/link"
|
|
294743
|
+
}
|
|
294744
|
+
},
|
|
294745
|
+
required: [
|
|
294746
|
+
"comments",
|
|
294747
|
+
"commits",
|
|
294748
|
+
"statuses",
|
|
294749
|
+
"html",
|
|
294750
|
+
"issue",
|
|
294751
|
+
"review_comments",
|
|
294752
|
+
"review_comment",
|
|
294753
|
+
"self"
|
|
294754
|
+
]
|
|
294755
|
+
},
|
|
294756
|
+
author_association: {
|
|
294757
|
+
$ref: "#/components/schemas/author-association"
|
|
294758
|
+
},
|
|
294759
|
+
auto_merge: {
|
|
294760
|
+
$ref: "#/components/schemas/auto-merge"
|
|
294761
|
+
},
|
|
294762
|
+
draft: {
|
|
294763
|
+
description: "Indicates whether or not the pull request is a draft.",
|
|
294764
|
+
example: false,
|
|
294765
|
+
type: "boolean"
|
|
294766
|
+
},
|
|
294767
|
+
merged: {
|
|
294768
|
+
type: "boolean"
|
|
294769
|
+
},
|
|
294770
|
+
mergeable: {
|
|
294771
|
+
type: "boolean",
|
|
294772
|
+
example: true,
|
|
294773
|
+
nullable: true
|
|
294774
|
+
},
|
|
294775
|
+
rebaseable: {
|
|
294776
|
+
type: "boolean",
|
|
294777
|
+
example: true,
|
|
294778
|
+
nullable: true
|
|
294779
|
+
},
|
|
294780
|
+
mergeable_state: {
|
|
294781
|
+
type: "string",
|
|
294782
|
+
example: "clean"
|
|
294783
|
+
},
|
|
294784
|
+
merged_by: {
|
|
294785
|
+
$ref: "#/components/schemas/nullable-simple-user"
|
|
294786
|
+
},
|
|
294787
|
+
comments: {
|
|
294788
|
+
type: "integer",
|
|
294789
|
+
example: 10
|
|
294790
|
+
},
|
|
294791
|
+
review_comments: {
|
|
294792
|
+
type: "integer",
|
|
294793
|
+
example: 0
|
|
294794
|
+
},
|
|
294795
|
+
maintainer_can_modify: {
|
|
294796
|
+
description: "Indicates whether maintainers can modify the pull request.",
|
|
294797
|
+
example: true,
|
|
294798
|
+
type: "boolean"
|
|
294799
|
+
},
|
|
294800
|
+
commits: {
|
|
294801
|
+
type: "integer",
|
|
294802
|
+
example: 3
|
|
294803
|
+
},
|
|
294804
|
+
additions: {
|
|
294805
|
+
type: "integer",
|
|
294806
|
+
example: 100
|
|
294807
|
+
},
|
|
294808
|
+
deletions: {
|
|
294809
|
+
type: "integer",
|
|
294810
|
+
example: 3
|
|
294811
|
+
},
|
|
294812
|
+
changed_files: {
|
|
294813
|
+
type: "integer",
|
|
294814
|
+
example: 5
|
|
294815
|
+
}
|
|
294816
|
+
},
|
|
294817
|
+
required: [
|
|
294818
|
+
"_links",
|
|
294819
|
+
"assignee",
|
|
294820
|
+
"labels",
|
|
294821
|
+
"base",
|
|
294822
|
+
"body",
|
|
294823
|
+
"closed_at",
|
|
294824
|
+
"comments_url",
|
|
294825
|
+
"commits_url",
|
|
294826
|
+
"created_at",
|
|
294827
|
+
"diff_url",
|
|
294828
|
+
"head",
|
|
294829
|
+
"html_url",
|
|
294830
|
+
"id",
|
|
294831
|
+
"node_id",
|
|
294832
|
+
"issue_url",
|
|
294833
|
+
"merge_commit_sha",
|
|
294834
|
+
"merged_at",
|
|
294835
|
+
"milestone",
|
|
294836
|
+
"number",
|
|
294837
|
+
"patch_url",
|
|
294838
|
+
"review_comment_url",
|
|
294839
|
+
"review_comments_url",
|
|
294840
|
+
"statuses_url",
|
|
294841
|
+
"state",
|
|
294842
|
+
"locked",
|
|
294843
|
+
"title",
|
|
294844
|
+
"updated_at",
|
|
294845
|
+
"url",
|
|
294846
|
+
"user",
|
|
294847
|
+
"author_association",
|
|
294848
|
+
"auto_merge",
|
|
294849
|
+
"additions",
|
|
294850
|
+
"changed_files",
|
|
294851
|
+
"comments",
|
|
294852
|
+
"commits",
|
|
294853
|
+
"deletions",
|
|
294854
|
+
"mergeable",
|
|
294855
|
+
"mergeable_state",
|
|
294856
|
+
"merged",
|
|
294857
|
+
"maintainer_can_modify",
|
|
294858
|
+
"merged_by",
|
|
294859
|
+
"review_comments"
|
|
294860
|
+
]
|
|
294861
|
+
},
|
|
294862
|
+
"team-simple": {
|
|
294863
|
+
title: "Team Simple",
|
|
294864
|
+
description: "Groups of organization members that gives permissions on specified repositories.",
|
|
294865
|
+
type: "object",
|
|
294866
|
+
properties: {
|
|
294867
|
+
id: {
|
|
294868
|
+
description: "Unique identifier of the team",
|
|
294869
|
+
type: "integer",
|
|
294870
|
+
example: 1
|
|
294871
|
+
},
|
|
294872
|
+
node_id: {
|
|
294873
|
+
type: "string",
|
|
294874
|
+
example: "MDQ6VGVhbTE="
|
|
294875
|
+
},
|
|
294876
|
+
url: {
|
|
294877
|
+
description: "URL for the team",
|
|
294878
|
+
type: "string",
|
|
294879
|
+
format: "uri",
|
|
294880
|
+
example: "https://api.github.com/organizations/1/team/1"
|
|
294881
|
+
},
|
|
294882
|
+
members_url: {
|
|
294883
|
+
type: "string",
|
|
294884
|
+
example: "https://api.github.com/organizations/1/team/1/members{/member}"
|
|
294885
|
+
},
|
|
294886
|
+
name: {
|
|
294887
|
+
description: "Name of the team",
|
|
294888
|
+
type: "string",
|
|
294889
|
+
example: "Justice League"
|
|
294890
|
+
},
|
|
294891
|
+
description: {
|
|
294892
|
+
description: "Description of the team",
|
|
294893
|
+
type: "string",
|
|
294894
|
+
nullable: true,
|
|
294895
|
+
example: "A great team."
|
|
294896
|
+
},
|
|
294897
|
+
permission: {
|
|
294898
|
+
description: "Permission that the team will have for its repositories",
|
|
294899
|
+
type: "string",
|
|
294900
|
+
example: "admin"
|
|
294901
|
+
},
|
|
294902
|
+
privacy: {
|
|
294903
|
+
description: "The level of privacy this team should have",
|
|
294904
|
+
type: "string",
|
|
294905
|
+
example: "closed"
|
|
294906
|
+
},
|
|
294907
|
+
notification_setting: {
|
|
294908
|
+
description: "The notification setting the team has set",
|
|
294909
|
+
type: "string",
|
|
294910
|
+
example: "notifications_enabled"
|
|
294911
|
+
},
|
|
294912
|
+
html_url: {
|
|
294913
|
+
type: "string",
|
|
294914
|
+
format: "uri",
|
|
294915
|
+
example: "https://github.com/orgs/rails/teams/core"
|
|
294916
|
+
},
|
|
294917
|
+
repositories_url: {
|
|
294918
|
+
type: "string",
|
|
294919
|
+
format: "uri",
|
|
294920
|
+
example: "https://api.github.com/organizations/1/team/1/repos"
|
|
294921
|
+
},
|
|
294922
|
+
slug: {
|
|
294923
|
+
type: "string",
|
|
294924
|
+
example: "justice-league"
|
|
294925
|
+
},
|
|
294926
|
+
ldap_dn: {
|
|
294927
|
+
description: "Distinguished Name (DN) that team maps to within LDAP environment",
|
|
294928
|
+
example: "uid=example,ou=users,dc=github,dc=com",
|
|
294929
|
+
type: "string"
|
|
294930
|
+
}
|
|
294931
|
+
},
|
|
294932
|
+
required: [
|
|
294933
|
+
"id",
|
|
294934
|
+
"node_id",
|
|
294935
|
+
"url",
|
|
294936
|
+
"members_url",
|
|
294937
|
+
"name",
|
|
294938
|
+
"description",
|
|
294939
|
+
"permission",
|
|
294940
|
+
"html_url",
|
|
294941
|
+
"repositories_url",
|
|
294942
|
+
"slug"
|
|
294943
|
+
]
|
|
294944
|
+
},
|
|
294945
|
+
"author-association": {
|
|
294946
|
+
title: "author_association",
|
|
294947
|
+
type: "string",
|
|
294948
|
+
example: "OWNER",
|
|
294949
|
+
description: "How the author is associated with the repository.",
|
|
294950
|
+
enum: [
|
|
294951
|
+
"COLLABORATOR",
|
|
294952
|
+
"CONTRIBUTOR",
|
|
294953
|
+
"FIRST_TIMER",
|
|
294954
|
+
"FIRST_TIME_CONTRIBUTOR",
|
|
294955
|
+
"MANNEQUIN",
|
|
294956
|
+
"MEMBER",
|
|
294957
|
+
"NONE",
|
|
294958
|
+
"OWNER"
|
|
294959
|
+
]
|
|
294960
|
+
},
|
|
294961
|
+
"auto-merge": {
|
|
294962
|
+
title: "Auto merge",
|
|
294963
|
+
description: "The status of auto merging a pull request.",
|
|
294964
|
+
type: "object",
|
|
294965
|
+
properties: {
|
|
294966
|
+
enabled_by: {
|
|
294967
|
+
$ref: "#/components/schemas/simple-user"
|
|
294968
|
+
},
|
|
294969
|
+
merge_method: {
|
|
294970
|
+
type: "string",
|
|
294971
|
+
description: "The merge method to use.",
|
|
294972
|
+
enum: ["merge", "squash", "rebase"]
|
|
294973
|
+
},
|
|
294974
|
+
commit_title: {
|
|
294975
|
+
type: "string",
|
|
294976
|
+
description: "Title for the merge commit message."
|
|
294977
|
+
},
|
|
294978
|
+
commit_message: {
|
|
294979
|
+
type: "string",
|
|
294980
|
+
description: "Commit message for the merge commit."
|
|
294981
|
+
}
|
|
294982
|
+
},
|
|
294983
|
+
required: [
|
|
294984
|
+
"enabled_by",
|
|
294985
|
+
"merge_method",
|
|
294986
|
+
"commit_title",
|
|
294987
|
+
"commit_message"
|
|
294988
|
+
],
|
|
294989
|
+
nullable: true
|
|
294990
|
+
},
|
|
294991
|
+
"pull-request-merge-result": {
|
|
294992
|
+
title: "Pull Request Merge Result",
|
|
294993
|
+
description: "Pull Request Merge Result",
|
|
294994
|
+
type: "object",
|
|
294995
|
+
properties: {
|
|
294996
|
+
sha: {
|
|
294997
|
+
type: "string"
|
|
294998
|
+
},
|
|
294999
|
+
merged: {
|
|
295000
|
+
type: "boolean"
|
|
295001
|
+
},
|
|
295002
|
+
message: {
|
|
295003
|
+
type: "string"
|
|
295004
|
+
}
|
|
295005
|
+
},
|
|
295006
|
+
required: ["merged", "message", "sha"]
|
|
295007
|
+
},
|
|
295008
|
+
"pull-request-review-request": {
|
|
295009
|
+
title: "Pull Request Review Request",
|
|
295010
|
+
description: "Pull Request Review Request",
|
|
295011
|
+
type: "object",
|
|
295012
|
+
properties: {
|
|
295013
|
+
users: {
|
|
295014
|
+
type: "array",
|
|
295015
|
+
items: {
|
|
295016
|
+
$ref: "#/components/schemas/simple-user"
|
|
295017
|
+
}
|
|
295018
|
+
},
|
|
295019
|
+
teams: {
|
|
295020
|
+
type: "array",
|
|
295021
|
+
items: {
|
|
295022
|
+
$ref: "#/components/schemas/team"
|
|
295023
|
+
}
|
|
295024
|
+
}
|
|
295025
|
+
},
|
|
295026
|
+
required: ["users", "teams"]
|
|
295027
|
+
},
|
|
295028
|
+
"pull-request-simple": {
|
|
295029
|
+
title: "Pull Request Simple",
|
|
295030
|
+
description: "Pull Request Simple",
|
|
295031
|
+
type: "object",
|
|
295032
|
+
properties: {
|
|
295033
|
+
url: {
|
|
295034
|
+
type: "string",
|
|
295035
|
+
format: "uri",
|
|
295036
|
+
example: "https://api.github.com/repos/octocat/Hello-World/pulls/1347"
|
|
295037
|
+
},
|
|
295038
|
+
id: {
|
|
295039
|
+
type: "integer",
|
|
295040
|
+
example: 1
|
|
295041
|
+
},
|
|
295042
|
+
node_id: {
|
|
295043
|
+
type: "string",
|
|
295044
|
+
example: "MDExOlB1bGxSZXF1ZXN0MQ=="
|
|
295045
|
+
},
|
|
295046
|
+
html_url: {
|
|
295047
|
+
type: "string",
|
|
295048
|
+
format: "uri",
|
|
295049
|
+
example: "https://github.com/octocat/Hello-World/pull/1347"
|
|
295050
|
+
},
|
|
295051
|
+
diff_url: {
|
|
295052
|
+
type: "string",
|
|
295053
|
+
format: "uri",
|
|
295054
|
+
example: "https://github.com/octocat/Hello-World/pull/1347.diff"
|
|
295055
|
+
},
|
|
295056
|
+
patch_url: {
|
|
295057
|
+
type: "string",
|
|
295058
|
+
format: "uri",
|
|
295059
|
+
example: "https://github.com/octocat/Hello-World/pull/1347.patch"
|
|
295060
|
+
},
|
|
295061
|
+
issue_url: {
|
|
295062
|
+
type: "string",
|
|
295063
|
+
format: "uri",
|
|
295064
|
+
example: "https://api.github.com/repos/octocat/Hello-World/issues/1347"
|
|
295065
|
+
},
|
|
295066
|
+
commits_url: {
|
|
295067
|
+
type: "string",
|
|
295068
|
+
format: "uri",
|
|
295069
|
+
example: "https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits"
|
|
295070
|
+
},
|
|
295071
|
+
review_comments_url: {
|
|
295072
|
+
type: "string",
|
|
295073
|
+
format: "uri",
|
|
295074
|
+
example: "https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments"
|
|
295075
|
+
},
|
|
295076
|
+
review_comment_url: {
|
|
295077
|
+
type: "string",
|
|
295078
|
+
example: "https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}"
|
|
295079
|
+
},
|
|
295080
|
+
comments_url: {
|
|
295081
|
+
type: "string",
|
|
295082
|
+
format: "uri",
|
|
295083
|
+
example: "https://api.github.com/repos/octocat/Hello-World/issues/1347/comments"
|
|
295084
|
+
},
|
|
295085
|
+
statuses_url: {
|
|
295086
|
+
type: "string",
|
|
295087
|
+
format: "uri",
|
|
295088
|
+
example: "https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e"
|
|
295089
|
+
},
|
|
295090
|
+
number: {
|
|
295091
|
+
type: "integer",
|
|
295092
|
+
example: 1347
|
|
295093
|
+
},
|
|
295094
|
+
state: {
|
|
295095
|
+
type: "string",
|
|
295096
|
+
example: "open"
|
|
295097
|
+
},
|
|
295098
|
+
locked: {
|
|
295099
|
+
type: "boolean",
|
|
295100
|
+
example: true
|
|
295101
|
+
},
|
|
295102
|
+
title: {
|
|
295103
|
+
type: "string",
|
|
295104
|
+
example: "new-feature"
|
|
295105
|
+
},
|
|
295106
|
+
user: {
|
|
295107
|
+
$ref: "#/components/schemas/nullable-simple-user"
|
|
295108
|
+
},
|
|
295109
|
+
body: {
|
|
295110
|
+
type: "string",
|
|
295111
|
+
example: "Please pull these awesome changes",
|
|
295112
|
+
nullable: true
|
|
295113
|
+
},
|
|
295114
|
+
labels: {
|
|
295115
|
+
type: "array",
|
|
295116
|
+
items: {
|
|
295117
|
+
type: "object",
|
|
295118
|
+
properties: {
|
|
295119
|
+
id: {
|
|
295120
|
+
type: "integer",
|
|
295121
|
+
format: "int64"
|
|
295122
|
+
},
|
|
295123
|
+
node_id: {
|
|
295124
|
+
type: "string"
|
|
295125
|
+
},
|
|
295126
|
+
url: {
|
|
295127
|
+
type: "string"
|
|
295128
|
+
},
|
|
295129
|
+
name: {
|
|
295130
|
+
type: "string"
|
|
295131
|
+
},
|
|
295132
|
+
description: {
|
|
295133
|
+
type: "string"
|
|
295134
|
+
},
|
|
295135
|
+
color: {
|
|
295136
|
+
type: "string"
|
|
295137
|
+
},
|
|
295138
|
+
default: {
|
|
295139
|
+
type: "boolean"
|
|
295140
|
+
}
|
|
295141
|
+
},
|
|
295142
|
+
required: [
|
|
295143
|
+
"id",
|
|
295144
|
+
"node_id",
|
|
295145
|
+
"url",
|
|
295146
|
+
"name",
|
|
295147
|
+
"description",
|
|
295148
|
+
"color",
|
|
295149
|
+
"default"
|
|
295150
|
+
]
|
|
295151
|
+
}
|
|
295152
|
+
},
|
|
295153
|
+
milestone: {
|
|
295154
|
+
$ref: "#/components/schemas/nullable-milestone"
|
|
295155
|
+
},
|
|
295156
|
+
active_lock_reason: {
|
|
295157
|
+
type: "string",
|
|
295158
|
+
example: "too heated",
|
|
295159
|
+
nullable: true
|
|
295160
|
+
},
|
|
295161
|
+
created_at: {
|
|
295162
|
+
type: "string",
|
|
295163
|
+
format: "date-time",
|
|
295164
|
+
example: "2011-01-26T19:01:12Z"
|
|
295165
|
+
},
|
|
295166
|
+
updated_at: {
|
|
295167
|
+
type: "string",
|
|
295168
|
+
format: "date-time",
|
|
295169
|
+
example: "2011-01-26T19:01:12Z"
|
|
295170
|
+
},
|
|
295171
|
+
closed_at: {
|
|
295172
|
+
type: "string",
|
|
295173
|
+
format: "date-time",
|
|
295174
|
+
example: "2011-01-26T19:01:12Z",
|
|
295175
|
+
nullable: true
|
|
295176
|
+
},
|
|
295177
|
+
merged_at: {
|
|
295178
|
+
type: "string",
|
|
295179
|
+
format: "date-time",
|
|
295180
|
+
example: "2011-01-26T19:01:12Z",
|
|
295181
|
+
nullable: true
|
|
295182
|
+
},
|
|
295183
|
+
merge_commit_sha: {
|
|
295184
|
+
type: "string",
|
|
295185
|
+
example: "e5bd3914e2e596debea16f433f57875b5b90bcd6",
|
|
295186
|
+
nullable: true
|
|
295187
|
+
},
|
|
295188
|
+
assignee: {
|
|
295189
|
+
$ref: "#/components/schemas/nullable-simple-user"
|
|
295190
|
+
},
|
|
295191
|
+
assignees: {
|
|
295192
|
+
type: "array",
|
|
295193
|
+
items: {
|
|
295194
|
+
$ref: "#/components/schemas/simple-user"
|
|
295195
|
+
},
|
|
295196
|
+
nullable: true
|
|
295197
|
+
},
|
|
295198
|
+
requested_reviewers: {
|
|
295199
|
+
type: "array",
|
|
295200
|
+
items: {
|
|
295201
|
+
$ref: "#/components/schemas/simple-user"
|
|
295202
|
+
},
|
|
295203
|
+
nullable: true
|
|
295204
|
+
},
|
|
295205
|
+
requested_teams: {
|
|
295206
|
+
type: "array",
|
|
295207
|
+
items: {
|
|
295208
|
+
$ref: "#/components/schemas/team"
|
|
295209
|
+
},
|
|
295210
|
+
nullable: true
|
|
295211
|
+
},
|
|
295212
|
+
head: {
|
|
295213
|
+
type: "object",
|
|
295214
|
+
properties: {
|
|
295215
|
+
label: {
|
|
295216
|
+
type: "string"
|
|
295217
|
+
},
|
|
295218
|
+
ref: {
|
|
295219
|
+
type: "string"
|
|
295220
|
+
},
|
|
295221
|
+
repo: {
|
|
295222
|
+
$ref: "#/components/schemas/repository"
|
|
295223
|
+
},
|
|
295224
|
+
sha: {
|
|
295225
|
+
type: "string"
|
|
295226
|
+
},
|
|
295227
|
+
user: {
|
|
295228
|
+
$ref: "#/components/schemas/nullable-simple-user"
|
|
295229
|
+
}
|
|
295230
|
+
},
|
|
295231
|
+
required: ["label", "ref", "repo", "sha", "user"]
|
|
295232
|
+
},
|
|
295233
|
+
base: {
|
|
295234
|
+
type: "object",
|
|
295235
|
+
properties: {
|
|
295236
|
+
label: {
|
|
295237
|
+
type: "string"
|
|
295238
|
+
},
|
|
295239
|
+
ref: {
|
|
295240
|
+
type: "string"
|
|
295241
|
+
},
|
|
295242
|
+
repo: {
|
|
295243
|
+
$ref: "#/components/schemas/repository"
|
|
295244
|
+
},
|
|
295245
|
+
sha: {
|
|
295246
|
+
type: "string"
|
|
295247
|
+
},
|
|
295248
|
+
user: {
|
|
295249
|
+
$ref: "#/components/schemas/nullable-simple-user"
|
|
295250
|
+
}
|
|
295251
|
+
},
|
|
295252
|
+
required: ["label", "ref", "repo", "sha", "user"]
|
|
295253
|
+
},
|
|
295254
|
+
_links: {
|
|
295255
|
+
type: "object",
|
|
295256
|
+
properties: {
|
|
295257
|
+
comments: {
|
|
295258
|
+
$ref: "#/components/schemas/link"
|
|
295259
|
+
},
|
|
295260
|
+
commits: {
|
|
295261
|
+
$ref: "#/components/schemas/link"
|
|
295262
|
+
},
|
|
295263
|
+
statuses: {
|
|
295264
|
+
$ref: "#/components/schemas/link"
|
|
295265
|
+
},
|
|
295266
|
+
html: {
|
|
295267
|
+
$ref: "#/components/schemas/link"
|
|
295268
|
+
},
|
|
295269
|
+
issue: {
|
|
295270
|
+
$ref: "#/components/schemas/link"
|
|
295271
|
+
},
|
|
295272
|
+
review_comments: {
|
|
295273
|
+
$ref: "#/components/schemas/link"
|
|
295274
|
+
},
|
|
295275
|
+
review_comment: {
|
|
295276
|
+
$ref: "#/components/schemas/link"
|
|
295277
|
+
},
|
|
295278
|
+
self: {
|
|
295279
|
+
$ref: "#/components/schemas/link"
|
|
295280
|
+
}
|
|
295281
|
+
},
|
|
295282
|
+
required: [
|
|
295283
|
+
"comments",
|
|
295284
|
+
"commits",
|
|
295285
|
+
"statuses",
|
|
295286
|
+
"html",
|
|
295287
|
+
"issue",
|
|
295288
|
+
"review_comments",
|
|
295289
|
+
"review_comment",
|
|
295290
|
+
"self"
|
|
295291
|
+
]
|
|
295292
|
+
},
|
|
295293
|
+
author_association: {
|
|
295294
|
+
$ref: "#/components/schemas/author-association"
|
|
295295
|
+
},
|
|
295296
|
+
auto_merge: {
|
|
295297
|
+
$ref: "#/components/schemas/auto-merge"
|
|
295298
|
+
},
|
|
295299
|
+
draft: {
|
|
295300
|
+
description: "Indicates whether or not the pull request is a draft.",
|
|
295301
|
+
example: false,
|
|
295302
|
+
type: "boolean"
|
|
295303
|
+
}
|
|
295304
|
+
},
|
|
295305
|
+
required: [
|
|
295306
|
+
"_links",
|
|
295307
|
+
"assignee",
|
|
295308
|
+
"labels",
|
|
295309
|
+
"base",
|
|
295310
|
+
"body",
|
|
295311
|
+
"closed_at",
|
|
295312
|
+
"comments_url",
|
|
295313
|
+
"commits_url",
|
|
295314
|
+
"created_at",
|
|
295315
|
+
"diff_url",
|
|
295316
|
+
"head",
|
|
295317
|
+
"html_url",
|
|
295318
|
+
"id",
|
|
295319
|
+
"node_id",
|
|
295320
|
+
"issue_url",
|
|
295321
|
+
"merge_commit_sha",
|
|
295322
|
+
"merged_at",
|
|
295323
|
+
"milestone",
|
|
295324
|
+
"number",
|
|
295325
|
+
"patch_url",
|
|
295326
|
+
"review_comment_url",
|
|
295327
|
+
"review_comments_url",
|
|
295328
|
+
"statuses_url",
|
|
295329
|
+
"state",
|
|
295330
|
+
"locked",
|
|
295331
|
+
"title",
|
|
295332
|
+
"updated_at",
|
|
295333
|
+
"url",
|
|
295334
|
+
"user",
|
|
295335
|
+
"author_association",
|
|
295336
|
+
"auto_merge"
|
|
295337
|
+
]
|
|
295338
|
+
},
|
|
295339
|
+
"basic-error": {
|
|
295340
|
+
title: "Basic Error",
|
|
295341
|
+
description: "Basic Error",
|
|
295342
|
+
type: "object",
|
|
295343
|
+
properties: {
|
|
295344
|
+
message: {
|
|
295345
|
+
type: "string"
|
|
295346
|
+
},
|
|
295347
|
+
documentation_url: {
|
|
295348
|
+
type: "string"
|
|
295349
|
+
},
|
|
295350
|
+
url: {
|
|
295351
|
+
type: "string"
|
|
295352
|
+
},
|
|
295353
|
+
status: {
|
|
295354
|
+
type: "string"
|
|
295355
|
+
}
|
|
295356
|
+
}
|
|
295357
|
+
}
|
|
295358
|
+
},
|
|
295359
|
+
responses: {
|
|
295360
|
+
not_modified: {
|
|
295361
|
+
description: "Not modified"
|
|
295362
|
+
},
|
|
295363
|
+
not_found: {
|
|
295364
|
+
description: "Resource not found",
|
|
295365
|
+
content: {
|
|
295366
|
+
"application/json": {
|
|
295367
|
+
schema: {
|
|
295368
|
+
$ref: "#/components/schemas/basic-error"
|
|
295369
|
+
}
|
|
295370
|
+
}
|
|
295371
|
+
}
|
|
295372
|
+
},
|
|
295373
|
+
internal_error: {
|
|
295374
|
+
description: "Internal Error",
|
|
295375
|
+
content: {
|
|
295376
|
+
"application/json": {
|
|
295377
|
+
schema: {
|
|
295378
|
+
$ref: "#/components/schemas/basic-error"
|
|
295379
|
+
}
|
|
295380
|
+
}
|
|
295381
|
+
}
|
|
295382
|
+
},
|
|
295383
|
+
service_unavailable: {
|
|
295384
|
+
description: "Service unavailable",
|
|
295385
|
+
content: {
|
|
295386
|
+
"application/json": {
|
|
295387
|
+
schema: {
|
|
295388
|
+
type: "object",
|
|
295389
|
+
properties: {
|
|
295390
|
+
code: {
|
|
295391
|
+
type: "string"
|
|
295392
|
+
},
|
|
295393
|
+
message: {
|
|
295394
|
+
type: "string"
|
|
295395
|
+
},
|
|
295396
|
+
documentation_url: {
|
|
295397
|
+
type: "string"
|
|
295398
|
+
}
|
|
295399
|
+
}
|
|
295400
|
+
}
|
|
295401
|
+
}
|
|
295402
|
+
}
|
|
295403
|
+
}
|
|
295404
|
+
}
|
|
295405
|
+
}
|
|
295406
|
+
}
|
|
295407
|
+
};
|
|
295408
|
+
}
|
|
295409
|
+
if (integration.type === "jira") {
|
|
295410
|
+
return {
|
|
295411
|
+
openApiSpec: {
|
|
295412
|
+
openapi: "3.0.1",
|
|
295413
|
+
info: {
|
|
295414
|
+
title: "Jira Cloud"
|
|
295415
|
+
},
|
|
295416
|
+
servers: [
|
|
295417
|
+
{
|
|
295418
|
+
url: "https://your-domain.atlassian.net"
|
|
295419
|
+
}
|
|
295420
|
+
],
|
|
295421
|
+
paths: {
|
|
295422
|
+
"/rest/api/2/issue/{issueIdOrKey}": {
|
|
295423
|
+
get: {
|
|
295424
|
+
summary: "Get issue",
|
|
295425
|
+
description: "Returns the details for an issue.\n\nThe issue is identified by its ID or key, however, if the identifier doesn't match an issue, a case-insensitive search and check for moved issues is performed. If a matching issue is found its details are returned, a 302 or other redirect is **not** returned. The issue key returned in the response is the key of the issue found.\n\nThis operation can be accessed anonymously.\n\n**[Permissions](#permissions) required:**\n\n * *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in.\n * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue.",
|
|
295426
|
+
parameters: [
|
|
295427
|
+
{
|
|
295428
|
+
name: "issueIdOrKey",
|
|
295429
|
+
in: "path",
|
|
295430
|
+
description: "The ID or key of the issue.",
|
|
295431
|
+
required: true,
|
|
295432
|
+
schema: {
|
|
295433
|
+
type: "string"
|
|
295434
|
+
}
|
|
295435
|
+
},
|
|
295436
|
+
{
|
|
295437
|
+
name: "fields",
|
|
295438
|
+
in: "query",
|
|
295439
|
+
description: "A list of fields to return for the issue. This parameter accepts a comma-separated list. Use it to retrieve a subset of fields. Allowed values:\n\n * `*all` Returns all fields.\n * `*navigable` Returns navigable fields.\n * Any issue field, prefixed with a minus to exclude.\n\nExamples:\n\n * `summary,comment` Returns only the summary and comments fields.\n * `-description` Returns all (default) fields except description.\n * `*navigable,-comment` Returns all navigable fields except comment.\n\nThis parameter may be specified multiple times. For example, `fields=field1,field2& fields=field3`.\n\nNote: All fields are returned by default. This differs from [Search for issues using JQL (GET)](#api-rest-api-2-search-get) and [Search for issues using JQL (POST)](#api-rest-api-2-search-post) where the default is all navigable fields.",
|
|
295440
|
+
schema: {
|
|
295441
|
+
type: "array",
|
|
295442
|
+
items: {
|
|
295443
|
+
type: "string",
|
|
295444
|
+
default: "*all"
|
|
295445
|
+
}
|
|
295446
|
+
}
|
|
295447
|
+
},
|
|
295448
|
+
{
|
|
295449
|
+
name: "fieldsByKeys",
|
|
295450
|
+
in: "query",
|
|
295451
|
+
description: "Whether fields in `fields` are referenced by keys rather than IDs. This parameter is useful where fields have been added by a connect app and a field's key may differ from its ID.",
|
|
295452
|
+
schema: {
|
|
295453
|
+
type: "boolean",
|
|
295454
|
+
default: false
|
|
295455
|
+
}
|
|
295456
|
+
},
|
|
295457
|
+
{
|
|
295458
|
+
name: "expand",
|
|
295459
|
+
in: "query",
|
|
295460
|
+
description: "Use [expand](#expansion) to include additional information about the issues in the response. This parameter accepts a comma-separated list. Expand options include:\n\n * `renderedFields` Returns field values rendered in HTML format.\n * `names` Returns the display name of each field.\n * `schema` Returns the schema describing a field type.\n * `transitions` Returns all possible transitions for the issue.\n * `editmeta` Returns information about how each field can be edited.\n * `changelog` Returns a list of recent updates to an issue, sorted by date, starting from the most recent.\n * `versionedRepresentations` Returns a JSON array for each version of a field's value, with the highest number representing the most recent version. Note: When included in the request, the `fields` parameter is ignored.",
|
|
295461
|
+
schema: {
|
|
295462
|
+
type: "string"
|
|
295463
|
+
}
|
|
295464
|
+
},
|
|
295465
|
+
{
|
|
295466
|
+
name: "properties",
|
|
295467
|
+
in: "query",
|
|
295468
|
+
description: "A list of issue properties to return for the issue. This parameter accepts a comma-separated list. Allowed values:\n\n * `*all` Returns all issue properties.\n * Any issue property key, prefixed with a minus to exclude.\n\nExamples:\n\n * `*all` Returns all properties.\n * `*all,-prop1` Returns all properties except `prop1`.\n * `prop1,prop2` Returns `prop1` and `prop2` properties.\n\nThis parameter may be specified multiple times. For example, `properties=prop1,prop2& properties=prop3`.",
|
|
295469
|
+
schema: {
|
|
295470
|
+
type: "array",
|
|
295471
|
+
items: {
|
|
295472
|
+
type: "string",
|
|
295473
|
+
default: "null"
|
|
295474
|
+
}
|
|
295475
|
+
}
|
|
295476
|
+
},
|
|
295477
|
+
{
|
|
295478
|
+
name: "updateHistory",
|
|
295479
|
+
in: "query",
|
|
295480
|
+
description: "Whether the project in which the issue is created is added to the user's **Recently viewed** project list, as shown under **Projects** in Jira. This also populates the [JQL issues search](#api-rest-api-2-search-get) `lastViewed` field.",
|
|
295481
|
+
schema: {
|
|
295482
|
+
type: "boolean",
|
|
295483
|
+
default: false
|
|
295484
|
+
}
|
|
295485
|
+
}
|
|
295486
|
+
],
|
|
295487
|
+
responses: {
|
|
295488
|
+
"200": {
|
|
295489
|
+
description: "Returned if the request is successful.",
|
|
295490
|
+
content: {
|
|
295491
|
+
"application/json": {
|
|
295492
|
+
schema: {
|
|
295493
|
+
$ref: "#/components/schemas/IssueBean"
|
|
295494
|
+
},
|
|
295495
|
+
example: '{"id":"10002","self":"https://your-domain.atlassian.net/rest/api/2/issue/10002","key":"ED-1","fields":{"watcher":{"self":"https://your-domain.atlassian.net/rest/api/2/issue/EX-1/watchers","isWatching":false,"watchCount":1,"watchers":[{"self":"https://your-domain.atlassian.net/rest/api/2/user?accountId=5b10a2844c20165700ede21g","accountId":"5b10a2844c20165700ede21g","displayName":"Mia Krystof","active":false}]},"attachment":[{"id":10001,"self":"https://your-domain.atlassian.net/rest/api/2/attachments/10001","filename":"debuglog.txt","author":{"self":"https://your-domain.atlassian.net/rest/api/2/user?accountId=5b10a2844c20165700ede21g","key":"","accountId":"5b10a2844c20165700ede21g","accountType":"atlassian","name":"","avatarUrls":{"48x48":"https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48","24x24":"https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24","16x16":"https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16","32x32":"https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32"},"displayName":"Mia Krystof","active":false},"created":"2023-09-18T07:39:03.936+0000","size":2460,"mimeType":"text/plain","content":"https://your-domain.atlassian.net/jira/rest/api/3/attachment/content/10001"}],"sub-tasks":[{"id":"10000","type":{"id":"10000","name":"","inward":"Parent","outward":"Sub-task"},"outwardIssue":{"id":"10003","key":"ED-2","self":"https://your-domain.atlassian.net/rest/api/2/issue/ED-2","fields":{"status":{"iconUrl":"https://your-domain.atlassian.net/images/icons/statuses/open.png","name":"Open"}}}}],"description":"Main order flow broken","project":{"self":"https://your-domain.atlassian.net/rest/api/2/project/EX","id":"10000","key":"EX","name":"Example","avatarUrls":{"48x48":"https://your-domain.atlassian.net/secure/projectavatar?size=large&pid=10000","24x24":"https://your-domain.atlassian.net/secure/projectavatar?size=small&pid=10000","16x16":"https://your-domain.atlassian.net/secure/projectavatar?size=xsmall&pid=10000","32x32":"https://your-domain.atlassian.net/secure/projectavatar?size=medium&pid=10000"},"projectCategory":{"self":"https://your-domain.atlassian.net/rest/api/2/projectCategory/10000","id":"10000","name":"FIRST","description":"First Project Category"},"simplified":false,"style":"classic","insight":{"totalIssueCount":100,"lastIssueUpdateTime":"2023-09-18T07:39:03.934+0000"}},"comment":[{"self":"https://your-domain.atlassian.net/rest/api/2/issue/10010/comment/10000","id":"10000","author":{"self":"https://your-domain.atlassian.net/rest/api/2/user?accountId=5b10a2844c20165700ede21g","accountId":"5b10a2844c20165700ede21g","displayName":"Mia Krystof","active":false},"body":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eget venenatis elit. Duis eu justo eget augue iaculis fermentum. Sed semper quam laoreet nisi egestas at posuere augue semper.","updateAuthor":{"self":"https://your-domain.atlassian.net/rest/api/2/user?accountId=5b10a2844c20165700ede21g","accountId":"5b10a2844c20165700ede21g","displayName":"Mia Krystof","active":false},"created":"2021-01-17T12:34:00.000+0000","updated":"2021-01-18T23:45:00.000+0000","visibility":{"type":"role","value":"Administrators","identifier":"Administrators"}}],"issuelinks":[{"id":"10001","type":{"id":"10000","name":"Dependent","inward":"depends on","outward":"is depended by"},"outwardIssue":{"id":"10004L","key":"PR-2","self":"https://your-domain.atlassian.net/rest/api/2/issue/PR-2","fields":{"status":{"iconUrl":"https://your-domain.atlassian.net/images/icons/statuses/open.png","name":"Open"}}}},{"id":"10002","type":{"id":"10000","name":"Dependent","inward":"depends on","outward":"is depended by"},"inwardIssue":{"id":"10004","key":"PR-3","self":"https://your-domain.atlassian.net/rest/api/2/issue/PR-3","fields":{"status":{"iconUrl":"https://your-domain.atlassian.net/images/icons/statuses/open.png","name":"Open"}}}}],"worklog":[{"self":"https://your-domain.atlassian.net/rest/api/2/issue/10010/worklog/10000","author":{"self":"https://your-domain.atlassian.net/rest/api/2/user?accountId=5b10a2844c20165700ede21g","accountId":"5b10a2844c20165700ede21g","displayName":"Mia Krystof","active":false},"updateAuthor":{"self":"https://your-domain.atlassian.net/rest/api/2/user?accountId=5b10a2844c20165700ede21g","accountId":"5b10a2844c20165700ede21g","displayName":"Mia Krystof","active":false},"comment":"I did some work here.","updated":"2021-01-18T23:45:00.000+0000","visibility":{"type":"group","value":"jira-developers","identifier":"276f955c-63d7-42c8-9520-92d01dca0625"},"started":"2021-01-17T12:34:00.000+0000","timeSpent":"3h 20m","timeSpentSeconds":12000,"id":"100028","issueId":"10002"}],"updated":1,"timetracking":{"originalEstimate":"10m","remainingEstimate":"3m","timeSpent":"6m","originalEstimateSeconds":600,"remainingEstimateSeconds":200,"timeSpentSeconds":400}}}'
|
|
295496
|
+
}
|
|
295497
|
+
}
|
|
295498
|
+
},
|
|
295499
|
+
"401": {
|
|
295500
|
+
description: "Returned if the authentication credentials are incorrect or missing."
|
|
295501
|
+
},
|
|
295502
|
+
"404": {
|
|
295503
|
+
description: "Returned if the issue is not found or the user does not have permission to view it."
|
|
295504
|
+
}
|
|
295505
|
+
},
|
|
295506
|
+
deprecated: false,
|
|
295507
|
+
security: [
|
|
295508
|
+
{
|
|
295509
|
+
basicAuth: []
|
|
295510
|
+
},
|
|
295511
|
+
{
|
|
295512
|
+
OAuth2: ["read:jira-work"]
|
|
295513
|
+
},
|
|
295514
|
+
{}
|
|
295515
|
+
],
|
|
295516
|
+
"x-atlassian-oauth2-scopes": [
|
|
295517
|
+
{
|
|
295518
|
+
state: "Current",
|
|
295519
|
+
scheme: "OAuth2",
|
|
295520
|
+
scopes: ["read:jira-work"]
|
|
295521
|
+
},
|
|
295522
|
+
{
|
|
295523
|
+
state: "Beta",
|
|
295524
|
+
scheme: "OAuth2",
|
|
295525
|
+
scopes: [
|
|
295526
|
+
"read:issue-meta:jira",
|
|
295527
|
+
"read:issue-security-level:jira",
|
|
295528
|
+
"read:issue.vote:jira",
|
|
295529
|
+
"read:issue.changelog:jira",
|
|
295530
|
+
"read:avatar:jira",
|
|
295531
|
+
"read:issue:jira",
|
|
295532
|
+
"read:status:jira",
|
|
295533
|
+
"read:user:jira",
|
|
295534
|
+
"read:field-configuration:jira"
|
|
295535
|
+
]
|
|
295536
|
+
}
|
|
295537
|
+
],
|
|
295538
|
+
"x-atlassian-connect-scope": "READ"
|
|
295539
|
+
}
|
|
295540
|
+
},
|
|
295541
|
+
"/rest/api/2/search": {
|
|
295542
|
+
get: {
|
|
295543
|
+
summary: "Search for issues using JQL (GET)",
|
|
295544
|
+
description: "Searches for issues using [JQL](https://confluence.atlassian.com/x/egORLQ).\n\nIf the JQL query expression is too large to be encoded as a query parameter, use the [POST](#api-rest-api-2-search-post) version of this resource.\n\nThis operation can be accessed anonymously.\n\n**[Permissions](#permissions) required:** Issues are included in the response where the user has:\n\n * *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the issue.\n * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue.",
|
|
295545
|
+
parameters: [
|
|
295546
|
+
{
|
|
295547
|
+
name: "jql",
|
|
295548
|
+
in: "query",
|
|
295549
|
+
description: "The [JQL](https://confluence.atlassian.com/x/egORLQ) that defines the search. Note:\n\n * If no JQL expression is provided, all issues are returned.\n * `username` and `userkey` cannot be used as search terms due to privacy reasons. Use `accountId` instead.\n * If a user has hidden their email address in their user profile, partial matches of the email address will not find the user. An exact match is required.",
|
|
295550
|
+
schema: {
|
|
295551
|
+
type: "string",
|
|
295552
|
+
example: "project = HSP"
|
|
295553
|
+
},
|
|
295554
|
+
"x-showInExample": "true"
|
|
295555
|
+
},
|
|
295556
|
+
{
|
|
295557
|
+
name: "startAt",
|
|
295558
|
+
in: "query",
|
|
295559
|
+
description: "The index of the first item to return in a page of results (page offset).",
|
|
295560
|
+
schema: {
|
|
295561
|
+
type: "integer",
|
|
295562
|
+
format: "int32",
|
|
295563
|
+
default: 0
|
|
295564
|
+
}
|
|
295565
|
+
},
|
|
295566
|
+
{
|
|
295567
|
+
name: "maxResults",
|
|
295568
|
+
in: "query",
|
|
295569
|
+
description: "The maximum number of items to return per page. To manage page size, Jira may return fewer items per page where a large number of fields are requested. The greatest number of items returned per page is achieved when requesting `id` or `key` only.",
|
|
295570
|
+
schema: {
|
|
295571
|
+
type: "integer",
|
|
295572
|
+
format: "int32",
|
|
295573
|
+
default: 50
|
|
295574
|
+
}
|
|
295575
|
+
},
|
|
295576
|
+
{
|
|
295577
|
+
name: "validateQuery",
|
|
295578
|
+
in: "query",
|
|
295579
|
+
description: "Determines how to validate the JQL query and treat the validation results. Supported values are:\n\n * `strict` Returns a 400 response code if any errors are found, along with a list of all errors (and warnings).\n * `warn` Returns all errors as warnings.\n * `none` No validation is performed.\n * `true` *Deprecated* A legacy synonym for `strict`.\n * `false` *Deprecated* A legacy synonym for `warn`.\n\nNote: If the JQL is not correctly formed a 400 response code is returned, regardless of the `validateQuery` value.",
|
|
295580
|
+
schema: {
|
|
295581
|
+
type: "string",
|
|
295582
|
+
default: "strict",
|
|
295583
|
+
enum: ["strict", "warn", "none", "true", "false"]
|
|
295584
|
+
}
|
|
295585
|
+
},
|
|
295586
|
+
{
|
|
295587
|
+
name: "fields",
|
|
295588
|
+
in: "query",
|
|
295589
|
+
description: "A list of fields to return for each issue, use it to retrieve a subset of fields. This parameter accepts a comma-separated list. Expand options include:\n\n * `*all` Returns all fields.\n * `*navigable` Returns navigable fields.\n * Any issue field, prefixed with a minus to exclude.\n\nExamples:\n\n * `summary,comment` Returns only the summary and comments fields.\n * `-description` Returns all navigable (default) fields except description.\n * `*all,-comment` Returns all fields except comments.\n\nThis parameter may be specified multiple times. For example, `fields=field1,field2&fields=field3`.\n\nNote: All navigable fields are returned by default. This differs from [GET issue](#api-rest-api-2-issue-issueIdOrKey-get) where the default is all fields.",
|
|
295590
|
+
schema: {
|
|
295591
|
+
type: "array",
|
|
295592
|
+
items: {
|
|
295593
|
+
type: "string",
|
|
295594
|
+
default: "*navigable"
|
|
295595
|
+
}
|
|
295596
|
+
}
|
|
295597
|
+
},
|
|
295598
|
+
{
|
|
295599
|
+
name: "expand",
|
|
295600
|
+
in: "query",
|
|
295601
|
+
description: "Use [expand](#expansion) to include additional information about issues in the response. This parameter accepts a comma-separated list. Expand options include:\n\n * `renderedFields` Returns field values rendered in HTML format.\n * `names` Returns the display name of each field.\n * `schema` Returns the schema describing a field type.\n * `transitions` Returns all possible transitions for the issue.\n * `operations` Returns all possible operations for the issue.\n * `editmeta` Returns information about how each field can be edited.\n * `changelog` Returns a list of recent updates to an issue, sorted by date, starting from the most recent.\n * `versionedRepresentations` Instead of `fields`, returns `versionedRepresentations` a JSON array containing each version of a field's value, with the highest numbered item representing the most recent version.",
|
|
295602
|
+
schema: {
|
|
295603
|
+
type: "string"
|
|
295604
|
+
}
|
|
295605
|
+
},
|
|
295606
|
+
{
|
|
295607
|
+
name: "properties",
|
|
295608
|
+
in: "query",
|
|
295609
|
+
description: "A list of issue property keys for issue properties to include in the results. This parameter accepts a comma-separated list. Multiple properties can also be provided using an ampersand separated list. For example, `properties=prop1,prop2&properties=prop3`. A maximum of 5 issue property keys can be specified.",
|
|
295610
|
+
schema: {
|
|
295611
|
+
type: "array",
|
|
295612
|
+
items: {
|
|
295613
|
+
type: "string"
|
|
295614
|
+
}
|
|
295615
|
+
}
|
|
295616
|
+
},
|
|
295617
|
+
{
|
|
295618
|
+
name: "fieldsByKeys",
|
|
295619
|
+
in: "query",
|
|
295620
|
+
description: "Reference fields by their key (rather than ID).",
|
|
295621
|
+
schema: {
|
|
295622
|
+
type: "boolean",
|
|
295623
|
+
default: false
|
|
295624
|
+
}
|
|
295625
|
+
}
|
|
295626
|
+
],
|
|
295627
|
+
responses: {
|
|
295628
|
+
"200": {
|
|
295629
|
+
description: "Returned if the request is successful.",
|
|
295630
|
+
content: {
|
|
295631
|
+
"application/json": {
|
|
295632
|
+
schema: {
|
|
295633
|
+
$ref: "#/components/schemas/SearchResults"
|
|
295634
|
+
},
|
|
295635
|
+
example: `{"expand":"names,schema","startAt":0,"maxResults":50,"total":1,"issues":[{"expand":"","id":"10002","self":"https://your-domain.atlassian.net/rest/api/2/issue/10002","key":"ED-1","fields":{"watcher":{"self":"https://your-domain.atlassian.net/rest/api/2/issue/EX-1/watchers","isWatching":false,"watchCount":1,"watchers":[{"self":"https://your-domain.atlassian.net/rest/api/2/user?accountId=5b10a2844c20165700ede21g","accountId":"5b10a2844c20165700ede21g","displayName":"Mia Krystof","active":false}]},"attachment":[{"id":10001,"self":"https://your-domain.atlassian.net/rest/api/2/attachments/10001","filename":"debuglog.txt","author":{"self":"https://your-domain.atlassian.net/rest/api/2/user?accountId=5b10a2844c20165700ede21g","key":"","accountId":"5b10a2844c20165700ede21g","accountType":"atlassian","name":"","avatarUrls":{"48x48":"https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48","24x24":"https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24","16x16":"https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16","32x32":"https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32"},"displayName":"Mia Krystof","active":false},"created":"2023-09-18T07:39:03.936+0000","size":2460,"mimeType":"text/plain","content":"https://your-domain.atlassian.net/jira/rest/api/3/attachment/content/10001"}],"sub-tasks":[{"id":"10000","type":{"id":"10000","name":"","inward":"Parent","outward":"Sub-task"},"outwardIssue":{"id":"10003","key":"ED-2","self":"https://your-domain.atlassian.net/rest/api/2/issue/ED-2","fields":{"status":{"iconUrl":"https://your-domain.atlassian.net/images/icons/statuses/open.png","name":"Open"}}}}],"description":"Main order flow broken","project":{"self":"https://your-domain.atlassian.net/rest/api/2/project/EX","id":"10000","key":"EX","name":"Example","avatarUrls":{"48x48":"https://your-domain.atlassian.net/secure/projectavatar?size=large&pid=10000","24x24":"https://your-domain.atlassian.net/secure/projectavatar?size=small&pid=10000","16x16":"https://your-domain.atlassian.net/secure/projectavatar?size=xsmall&pid=10000","32x32":"https://your-domain.atlassian.net/secure/projectavatar?size=medium&pid=10000"},"projectCategory":{"self":"https://your-domain.atlassian.net/rest/api/2/projectCategory/10000","id":"10000","name":"FIRST","description":"First Project Category"},"simplified":false,"style":"classic","insight":{"totalIssueCount":100,"lastIssueUpdateTime":"2023-09-18T07:39:03.934+0000"}},"comment":[{"self":"https://your-domain.atlassian.net/rest/api/2/issue/10010/comment/10000","id":"10000","author":{"self":"https://your-domain.atlassian.net/rest/api/2/user?accountId=5b10a2844c20165700ede21g","accountId":"5b10a2844c20165700ede21g","displayName":"Mia Krystof","active":false},"body":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eget venenatis elit. Duis eu justo eget augue iaculis fermentum. Sed semper quam laoreet nisi egestas at posuere augue semper.","updateAuthor":{"self":"https://your-domain.atlassian.net/rest/api/2/user?accountId=5b10a2844c20165700ede21g","accountId":"5b10a2844c20165700ede21g","displayName":"Mia Krystof","active":false},"created":"2021-01-17T12:34:00.000+0000","updated":"2021-01-18T23:45:00.000+0000","visibility":{"type":"role","value":"Administrators","identifier":"Administrators"}}],"issuelinks":[{"id":"10001","type":{"id":"10000","name":"Dependent","inward":"depends on","outward":"is depended by"},"outwardIssue":{"id":"10004L","key":"PR-2","self":"https://your-domain.atlassian.net/rest/api/2/issue/PR-2","fields":{"status":{"iconUrl":"https://your-domain.atlassian.net/images/icons/statuses/open.png","name":"Open"}}}},{"id":"10002","type":{"id":"10000","name":"Dependent","inward":"depends on","outward":"is depended by"},"inwardIssue":{"id":"10004","key":"PR-3","self":"https://your-domain.atlassian.net/rest/api/2/issue/PR-3","fields":{"status":{"iconUrl":"https://your-domain.atlassian.net/images/icons/statuses/open.png","name":"Open"}}}}],"worklog":[{"self":"https://your-domain.atlassian.net/rest/api/2/issue/10010/worklog/10000","author":{"self":"https://your-domain.atlassian.net/rest/api/2/user?accountId=5b10a2844c20165700ede21g","accountId":"5b10a2844c20165700ede21g","displayName":"Mia Krystof","active":false},"updateAuthor":{"self":"https://your-domain.atlassian.net/rest/api/2/user?accountId=5b10a2844c20165700ede21g","accountId":"5b10a2844c20165700ede21g","displayName":"Mia Krystof","active":false},"comment":"I did some work here.","updated":"2021-01-18T23:45:00.000+0000","visibility":{"type":"group","value":"jira-developers","identifier":"276f955c-63d7-42c8-9520-92d01dca0625"},"started":"2021-01-17T12:34:00.000+0000","timeSpent":"3h 20m","timeSpentSeconds":12000,"id":"100028","issueId":"10002"}],"updated":1,"timetracking":{"originalEstimate":"10m","remainingEstimate":"3m","timeSpent":"6m","originalEstimateSeconds":600,"remainingEstimateSeconds":200,"timeSpentSeconds":400}}}],"warningMessages":["The value 'bar' does not exist for the field 'foo'."]}`
|
|
295636
|
+
}
|
|
295637
|
+
}
|
|
295638
|
+
},
|
|
295639
|
+
"400": {
|
|
295640
|
+
description: "Returned if the JQL query is invalid."
|
|
295641
|
+
},
|
|
295642
|
+
"401": {
|
|
295643
|
+
description: "Returned if the authentication credentials are incorrect or missing."
|
|
295644
|
+
}
|
|
295645
|
+
},
|
|
295646
|
+
deprecated: false,
|
|
295647
|
+
security: [
|
|
295648
|
+
{
|
|
295649
|
+
basicAuth: []
|
|
295650
|
+
},
|
|
295651
|
+
{
|
|
295652
|
+
OAuth2: ["read:jira-work"]
|
|
295653
|
+
},
|
|
295654
|
+
{}
|
|
295655
|
+
]
|
|
295656
|
+
},
|
|
295657
|
+
post: {
|
|
295658
|
+
tags: ["Issue search"],
|
|
295659
|
+
summary: "Search for issues using JQL (POST)",
|
|
295660
|
+
description: "Searches for issues using [JQL](https://confluence.atlassian.com/x/egORLQ).\n\nThere is a [GET](#api-rest-api-2-search-get) version of this resource that can be used for smaller JQL query expressions.\n\nThis operation can be accessed anonymously.\n\n**[Permissions](#permissions) required:** Issues are included in the response where the user has:\n\n * *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the issue.\n * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue.",
|
|
295661
|
+
operationId: "searchForIssuesUsingJqlPost",
|
|
295662
|
+
parameters: [],
|
|
295663
|
+
requestBody: {
|
|
295664
|
+
description: "A JSON object containing the search request.",
|
|
295665
|
+
content: {
|
|
295666
|
+
"application/json": {
|
|
295667
|
+
schema: {
|
|
295668
|
+
$ref: "#/components/schemas/SearchRequestBean"
|
|
295669
|
+
},
|
|
295670
|
+
example: {
|
|
295671
|
+
expand: ["names", "schema", "operations"],
|
|
295672
|
+
fields: ["summary", "status", "assignee"],
|
|
295673
|
+
fieldsByKeys: false,
|
|
295674
|
+
jql: "project = HSP",
|
|
295675
|
+
maxResults: 15,
|
|
295676
|
+
startAt: 0
|
|
295677
|
+
}
|
|
295678
|
+
}
|
|
295679
|
+
},
|
|
295680
|
+
required: true
|
|
295681
|
+
},
|
|
295682
|
+
responses: {
|
|
295683
|
+
"200": {
|
|
295684
|
+
description: "Returned if the request is successful.",
|
|
295685
|
+
content: {
|
|
295686
|
+
"application/json": {
|
|
295687
|
+
schema: {
|
|
295688
|
+
$ref: "#/components/schemas/SearchResults"
|
|
295689
|
+
},
|
|
295690
|
+
example: `{"expand":"names,schema","startAt":0,"maxResults":50,"total":1,"issues":[{"expand":"","id":"10002","self":"https://your-domain.atlassian.net/rest/api/2/issue/10002","key":"ED-1","fields":{"watcher":{"self":"https://your-domain.atlassian.net/rest/api/2/issue/EX-1/watchers","isWatching":false,"watchCount":1,"watchers":[{"self":"https://your-domain.atlassian.net/rest/api/2/user?accountId=5b10a2844c20165700ede21g","accountId":"5b10a2844c20165700ede21g","displayName":"Mia Krystof","active":false}]},"attachment":[{"id":10001,"self":"https://your-domain.atlassian.net/rest/api/2/attachments/10001","filename":"debuglog.txt","author":{"self":"https://your-domain.atlassian.net/rest/api/2/user?accountId=5b10a2844c20165700ede21g","key":"","accountId":"5b10a2844c20165700ede21g","accountType":"atlassian","name":"","avatarUrls":{"48x48":"https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48","24x24":"https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24","16x16":"https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16","32x32":"https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32"},"displayName":"Mia Krystof","active":false},"created":"2023-09-18T07:39:03.936+0000","size":2460,"mimeType":"text/plain","content":"https://your-domain.atlassian.net/jira/rest/api/3/attachment/content/10001"}],"sub-tasks":[{"id":"10000","type":{"id":"10000","name":"","inward":"Parent","outward":"Sub-task"},"outwardIssue":{"id":"10003","key":"ED-2","self":"https://your-domain.atlassian.net/rest/api/2/issue/ED-2","fields":{"status":{"iconUrl":"https://your-domain.atlassian.net/images/icons/statuses/open.png","name":"Open"}}}}],"description":"Main order flow broken","project":{"self":"https://your-domain.atlassian.net/rest/api/2/project/EX","id":"10000","key":"EX","name":"Example","avatarUrls":{"48x48":"https://your-domain.atlassian.net/secure/projectavatar?size=large&pid=10000","24x24":"https://your-domain.atlassian.net/secure/projectavatar?size=small&pid=10000","16x16":"https://your-domain.atlassian.net/secure/projectavatar?size=xsmall&pid=10000","32x32":"https://your-domain.atlassian.net/secure/projectavatar?size=medium&pid=10000"},"projectCategory":{"self":"https://your-domain.atlassian.net/rest/api/2/projectCategory/10000","id":"10000","name":"FIRST","description":"First Project Category"},"simplified":false,"style":"classic","insight":{"totalIssueCount":100,"lastIssueUpdateTime":"2023-09-18T07:39:03.934+0000"}},"comment":[{"self":"https://your-domain.atlassian.net/rest/api/2/issue/10010/comment/10000","id":"10000","author":{"self":"https://your-domain.atlassian.net/rest/api/2/user?accountId=5b10a2844c20165700ede21g","accountId":"5b10a2844c20165700ede21g","displayName":"Mia Krystof","active":false},"body":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eget venenatis elit. Duis eu justo eget augue iaculis fermentum. Sed semper quam laoreet nisi egestas at posuere augue semper.","updateAuthor":{"self":"https://your-domain.atlassian.net/rest/api/2/user?accountId=5b10a2844c20165700ede21g","accountId":"5b10a2844c20165700ede21g","displayName":"Mia Krystof","active":false},"created":"2021-01-17T12:34:00.000+0000","updated":"2021-01-18T23:45:00.000+0000","visibility":{"type":"role","value":"Administrators","identifier":"Administrators"}}],"issuelinks":[{"id":"10001","type":{"id":"10000","name":"Dependent","inward":"depends on","outward":"is depended by"},"outwardIssue":{"id":"10004L","key":"PR-2","self":"https://your-domain.atlassian.net/rest/api/2/issue/PR-2","fields":{"status":{"iconUrl":"https://your-domain.atlassian.net/images/icons/statuses/open.png","name":"Open"}}}},{"id":"10002","type":{"id":"10000","name":"Dependent","inward":"depends on","outward":"is depended by"},"inwardIssue":{"id":"10004","key":"PR-3","self":"https://your-domain.atlassian.net/rest/api/2/issue/PR-3","fields":{"status":{"iconUrl":"https://your-domain.atlassian.net/images/icons/statuses/open.png","name":"Open"}}}}],"worklog":[{"self":"https://your-domain.atlassian.net/rest/api/2/issue/10010/worklog/10000","author":{"self":"https://your-domain.atlassian.net/rest/api/2/user?accountId=5b10a2844c20165700ede21g","accountId":"5b10a2844c20165700ede21g","displayName":"Mia Krystof","active":false},"updateAuthor":{"self":"https://your-domain.atlassian.net/rest/api/2/user?accountId=5b10a2844c20165700ede21g","accountId":"5b10a2844c20165700ede21g","displayName":"Mia Krystof","active":false},"comment":"I did some work here.","updated":"2021-01-18T23:45:00.000+0000","visibility":{"type":"group","value":"jira-developers","identifier":"276f955c-63d7-42c8-9520-92d01dca0625"},"started":"2021-01-17T12:34:00.000+0000","timeSpent":"3h 20m","timeSpentSeconds":12000,"id":"100028","issueId":"10002"}],"updated":1,"timetracking":{"originalEstimate":"10m","remainingEstimate":"3m","timeSpent":"6m","originalEstimateSeconds":600,"remainingEstimateSeconds":200,"timeSpentSeconds":400}}}],"warningMessages":["The value 'bar' does not exist for the field 'foo'."]}`
|
|
295691
|
+
}
|
|
295692
|
+
}
|
|
295693
|
+
},
|
|
295694
|
+
"400": {
|
|
295695
|
+
description: "Returned if the JQL query is invalid."
|
|
295696
|
+
},
|
|
295697
|
+
"401": {
|
|
295698
|
+
description: "Returned if the authentication credentials are incorrect or missing."
|
|
295699
|
+
}
|
|
295700
|
+
},
|
|
295701
|
+
deprecated: false,
|
|
295702
|
+
security: [
|
|
295703
|
+
{
|
|
295704
|
+
basicAuth: []
|
|
295705
|
+
},
|
|
295706
|
+
{
|
|
295707
|
+
OAuth2: ["read:jira-work"]
|
|
295708
|
+
},
|
|
295709
|
+
{}
|
|
295710
|
+
],
|
|
295711
|
+
"x-atlassian-oauth2-scopes": [
|
|
295712
|
+
{
|
|
295713
|
+
state: "Current",
|
|
295714
|
+
scheme: "OAuth2",
|
|
295715
|
+
scopes: ["read:jira-work"]
|
|
295716
|
+
},
|
|
295717
|
+
{
|
|
295718
|
+
state: "Beta",
|
|
295719
|
+
scheme: "OAuth2",
|
|
295720
|
+
scopes: [
|
|
295721
|
+
"read:issue-details:jira",
|
|
295722
|
+
"read:field.default-value:jira",
|
|
295723
|
+
"read:field.option:jira",
|
|
295724
|
+
"read:field:jira",
|
|
295725
|
+
"read:group:jira"
|
|
295726
|
+
]
|
|
295727
|
+
}
|
|
295728
|
+
],
|
|
295729
|
+
"x-atlassian-connect-scope": "READ"
|
|
295730
|
+
}
|
|
295731
|
+
}
|
|
295732
|
+
},
|
|
295733
|
+
components: {
|
|
295734
|
+
schemas: {
|
|
295735
|
+
IssueBean: {
|
|
295736
|
+
type: "object",
|
|
295737
|
+
properties: {
|
|
295738
|
+
changelog: {
|
|
295739
|
+
description: "Details of changelogs associated with the issue.",
|
|
295740
|
+
readOnly: true,
|
|
295741
|
+
allOf: [
|
|
295742
|
+
{
|
|
295743
|
+
$ref: "#/components/schemas/PageOfChangelogs"
|
|
295744
|
+
}
|
|
295745
|
+
]
|
|
295746
|
+
},
|
|
295747
|
+
editmeta: {
|
|
295748
|
+
description: "The metadata for the fields on the issue that can be amended.",
|
|
295749
|
+
readOnly: true,
|
|
295750
|
+
allOf: [
|
|
295751
|
+
{
|
|
295752
|
+
$ref: "#/components/schemas/IssueUpdateMetadata"
|
|
295753
|
+
}
|
|
295754
|
+
]
|
|
295755
|
+
},
|
|
295756
|
+
expand: {
|
|
295757
|
+
type: "string",
|
|
295758
|
+
description: "Expand options that include additional issue details in the response.",
|
|
295759
|
+
readOnly: true,
|
|
295760
|
+
xml: {
|
|
295761
|
+
attribute: true
|
|
295762
|
+
}
|
|
295763
|
+
},
|
|
295764
|
+
fields: {
|
|
295765
|
+
type: "object",
|
|
295766
|
+
additionalProperties: {}
|
|
295767
|
+
},
|
|
295768
|
+
fieldsToInclude: {
|
|
295769
|
+
$ref: "#/components/schemas/IncludedFields"
|
|
295770
|
+
},
|
|
295771
|
+
id: {
|
|
295772
|
+
type: "string",
|
|
295773
|
+
description: "The ID of the issue.",
|
|
295774
|
+
readOnly: true
|
|
295775
|
+
},
|
|
295776
|
+
key: {
|
|
295777
|
+
type: "string",
|
|
295778
|
+
description: "The key of the issue.",
|
|
295779
|
+
readOnly: true
|
|
295780
|
+
},
|
|
295781
|
+
names: {
|
|
295782
|
+
type: "object",
|
|
295783
|
+
additionalProperties: {
|
|
295784
|
+
type: "string",
|
|
295785
|
+
readOnly: true
|
|
295786
|
+
},
|
|
295787
|
+
description: "The ID and name of each field present on the issue.",
|
|
295788
|
+
readOnly: true
|
|
295789
|
+
},
|
|
295790
|
+
operations: {
|
|
295791
|
+
description: "The operations that can be performed on the issue.",
|
|
295792
|
+
readOnly: true,
|
|
295793
|
+
allOf: [
|
|
295794
|
+
{
|
|
295795
|
+
$ref: "#/components/schemas/Operations"
|
|
295796
|
+
}
|
|
295797
|
+
]
|
|
295798
|
+
},
|
|
295799
|
+
properties: {
|
|
295800
|
+
type: "object",
|
|
295801
|
+
additionalProperties: {
|
|
295802
|
+
readOnly: true
|
|
295803
|
+
},
|
|
295804
|
+
description: "Details of the issue properties identified in the request.",
|
|
295805
|
+
readOnly: true
|
|
295806
|
+
},
|
|
295807
|
+
renderedFields: {
|
|
295808
|
+
type: "object",
|
|
295809
|
+
additionalProperties: {
|
|
295810
|
+
readOnly: true
|
|
295811
|
+
},
|
|
295812
|
+
description: "The rendered value of each field present on the issue.",
|
|
295813
|
+
readOnly: true
|
|
295814
|
+
},
|
|
295815
|
+
schema: {
|
|
295816
|
+
type: "object",
|
|
295817
|
+
additionalProperties: {
|
|
295818
|
+
$ref: "#/components/schemas/JsonTypeBean"
|
|
295819
|
+
},
|
|
295820
|
+
description: "The schema describing each field present on the issue.",
|
|
295821
|
+
readOnly: true
|
|
295822
|
+
},
|
|
295823
|
+
self: {
|
|
295824
|
+
type: "string",
|
|
295825
|
+
description: "The URL of the issue details.",
|
|
295826
|
+
format: "uri",
|
|
295827
|
+
readOnly: true
|
|
295828
|
+
},
|
|
295829
|
+
transitions: {
|
|
295830
|
+
type: "array",
|
|
295831
|
+
description: "The transitions that can be performed on the issue.",
|
|
295832
|
+
readOnly: true,
|
|
295833
|
+
items: {
|
|
295834
|
+
$ref: "#/components/schemas/IssueTransition"
|
|
295835
|
+
}
|
|
295836
|
+
},
|
|
295837
|
+
versionedRepresentations: {
|
|
295838
|
+
type: "object",
|
|
295839
|
+
additionalProperties: {
|
|
295840
|
+
type: "object",
|
|
295841
|
+
additionalProperties: {
|
|
295842
|
+
readOnly: true
|
|
295843
|
+
},
|
|
295844
|
+
readOnly: true
|
|
295845
|
+
},
|
|
295846
|
+
description: "The versions of each field on the issue.",
|
|
295847
|
+
readOnly: true
|
|
295848
|
+
}
|
|
295849
|
+
},
|
|
295850
|
+
additionalProperties: false,
|
|
295851
|
+
description: "Details about an issue.",
|
|
295852
|
+
xml: {
|
|
295853
|
+
name: "issue"
|
|
295854
|
+
}
|
|
295855
|
+
},
|
|
295856
|
+
IncludedFields: {
|
|
295857
|
+
type: "object",
|
|
295858
|
+
properties: {
|
|
295859
|
+
actuallyIncluded: {
|
|
295860
|
+
uniqueItems: true,
|
|
295861
|
+
type: "array",
|
|
295862
|
+
items: {
|
|
295863
|
+
type: "string"
|
|
295864
|
+
}
|
|
295865
|
+
},
|
|
295866
|
+
excluded: {
|
|
295867
|
+
uniqueItems: true,
|
|
295868
|
+
type: "array",
|
|
295869
|
+
items: {
|
|
295870
|
+
type: "string"
|
|
295871
|
+
}
|
|
295872
|
+
},
|
|
295873
|
+
included: {
|
|
295874
|
+
uniqueItems: true,
|
|
295875
|
+
type: "array",
|
|
295876
|
+
items: {
|
|
295877
|
+
type: "string"
|
|
295878
|
+
}
|
|
295879
|
+
}
|
|
295880
|
+
},
|
|
295881
|
+
additionalProperties: false
|
|
295882
|
+
},
|
|
295883
|
+
IssueTransition: {
|
|
295884
|
+
type: "object",
|
|
295885
|
+
properties: {
|
|
295886
|
+
expand: {
|
|
295887
|
+
type: "string",
|
|
295888
|
+
description: "Expand options that include additional transition details in the response.",
|
|
295889
|
+
readOnly: true
|
|
295890
|
+
},
|
|
295891
|
+
fields: {
|
|
295892
|
+
type: "object",
|
|
295893
|
+
additionalProperties: {
|
|
295894
|
+
$ref: "#/components/schemas/FieldMetadata"
|
|
295895
|
+
},
|
|
295896
|
+
description: "Details of the fields associated with the issue transition screen. Use this information to populate `fields` and `update` in a transition request.",
|
|
295897
|
+
readOnly: true
|
|
295898
|
+
},
|
|
295899
|
+
hasScreen: {
|
|
295900
|
+
type: "boolean",
|
|
295901
|
+
description: "Whether there is a screen associated with the issue transition.",
|
|
295902
|
+
readOnly: true
|
|
295903
|
+
},
|
|
295904
|
+
id: {
|
|
295905
|
+
type: "string",
|
|
295906
|
+
description: "The ID of the issue transition. Required when specifying a transition to undertake."
|
|
295907
|
+
},
|
|
295908
|
+
isAvailable: {
|
|
295909
|
+
type: "boolean",
|
|
295910
|
+
description: "Whether the transition is available to be performed.",
|
|
295911
|
+
readOnly: true
|
|
295912
|
+
},
|
|
295913
|
+
isConditional: {
|
|
295914
|
+
type: "boolean",
|
|
295915
|
+
description: "Whether the issue has to meet criteria before the issue transition is applied.",
|
|
295916
|
+
readOnly: true
|
|
295917
|
+
},
|
|
295918
|
+
isGlobal: {
|
|
295919
|
+
type: "boolean",
|
|
295920
|
+
description: "Whether the issue transition is global, that is, the transition is applied to issues regardless of their status.",
|
|
295921
|
+
readOnly: true
|
|
295922
|
+
},
|
|
295923
|
+
isInitial: {
|
|
295924
|
+
type: "boolean",
|
|
295925
|
+
description: "Whether this is the initial issue transition for the workflow.",
|
|
295926
|
+
readOnly: true
|
|
295927
|
+
},
|
|
295928
|
+
looped: {
|
|
295929
|
+
type: "boolean"
|
|
295930
|
+
},
|
|
295931
|
+
name: {
|
|
295932
|
+
type: "string",
|
|
295933
|
+
description: "The name of the issue transition.",
|
|
295934
|
+
readOnly: true
|
|
295935
|
+
},
|
|
295936
|
+
to: {
|
|
295937
|
+
description: "Details of the issue status after the transition.",
|
|
295938
|
+
readOnly: true,
|
|
295939
|
+
allOf: [
|
|
295940
|
+
{
|
|
295941
|
+
$ref: "#/components/schemas/StatusDetails"
|
|
295942
|
+
}
|
|
295943
|
+
]
|
|
295944
|
+
}
|
|
295945
|
+
},
|
|
295946
|
+
additionalProperties: true,
|
|
295947
|
+
description: "Details of an issue transition."
|
|
295948
|
+
},
|
|
295949
|
+
PageOfChangelogs: {
|
|
295950
|
+
type: "object",
|
|
295951
|
+
properties: {
|
|
295952
|
+
histories: {
|
|
295953
|
+
type: "array",
|
|
295954
|
+
description: "The list of changelogs.",
|
|
295955
|
+
readOnly: true,
|
|
295956
|
+
items: {
|
|
295957
|
+
$ref: "#/components/schemas/Changelog"
|
|
295958
|
+
}
|
|
295959
|
+
},
|
|
295960
|
+
maxResults: {
|
|
295961
|
+
type: "integer",
|
|
295962
|
+
description: "The maximum number of results that could be on the page.",
|
|
295963
|
+
format: "int32",
|
|
295964
|
+
readOnly: true
|
|
295965
|
+
},
|
|
295966
|
+
startAt: {
|
|
295967
|
+
type: "integer",
|
|
295968
|
+
description: "The index of the first item returned on the page.",
|
|
295969
|
+
format: "int32",
|
|
295970
|
+
readOnly: true
|
|
295971
|
+
},
|
|
295972
|
+
total: {
|
|
295973
|
+
type: "integer",
|
|
295974
|
+
description: "The number of results on the page.",
|
|
295975
|
+
format: "int32",
|
|
295976
|
+
readOnly: true
|
|
295977
|
+
}
|
|
295978
|
+
},
|
|
295979
|
+
additionalProperties: false,
|
|
295980
|
+
description: "A page of changelogs."
|
|
295981
|
+
},
|
|
295982
|
+
Changelog: {
|
|
295983
|
+
type: "object",
|
|
295984
|
+
properties: {
|
|
295985
|
+
author: {
|
|
295986
|
+
description: "The user who made the change.",
|
|
295987
|
+
readOnly: true,
|
|
295988
|
+
allOf: [
|
|
295989
|
+
{
|
|
295990
|
+
$ref: "#/components/schemas/UserDetails"
|
|
295991
|
+
}
|
|
295992
|
+
]
|
|
295993
|
+
},
|
|
295994
|
+
created: {
|
|
295995
|
+
type: "string",
|
|
295996
|
+
description: "The date on which the change took place.",
|
|
295997
|
+
format: "date-time",
|
|
295998
|
+
readOnly: true
|
|
295999
|
+
},
|
|
296000
|
+
historyMetadata: {
|
|
296001
|
+
description: "The history metadata associated with the changed.",
|
|
296002
|
+
readOnly: true,
|
|
296003
|
+
allOf: [
|
|
296004
|
+
{
|
|
296005
|
+
$ref: "#/components/schemas/HistoryMetadata"
|
|
296006
|
+
}
|
|
296007
|
+
]
|
|
296008
|
+
},
|
|
296009
|
+
id: {
|
|
296010
|
+
type: "string",
|
|
296011
|
+
description: "The ID of the changelog.",
|
|
296012
|
+
readOnly: true
|
|
296013
|
+
},
|
|
296014
|
+
items: {
|
|
296015
|
+
type: "array",
|
|
296016
|
+
description: "The list of items changed.",
|
|
296017
|
+
readOnly: true,
|
|
296018
|
+
items: {
|
|
296019
|
+
$ref: "#/components/schemas/ChangeDetails"
|
|
296020
|
+
}
|
|
296021
|
+
}
|
|
296022
|
+
},
|
|
296023
|
+
additionalProperties: false,
|
|
296024
|
+
description: "A log of changes made to issue fields. Changelogs related to workflow associations are currently being deprecated."
|
|
296025
|
+
},
|
|
296026
|
+
SearchResults: {
|
|
296027
|
+
type: "object",
|
|
296028
|
+
properties: {
|
|
296029
|
+
expand: {
|
|
296030
|
+
type: "string",
|
|
296031
|
+
description: "Expand options that include additional search result details in the response.",
|
|
296032
|
+
readOnly: true
|
|
296033
|
+
},
|
|
296034
|
+
issues: {
|
|
296035
|
+
type: "array",
|
|
296036
|
+
description: "The list of issues found by the search.",
|
|
296037
|
+
readOnly: true,
|
|
296038
|
+
items: {
|
|
296039
|
+
$ref: "#/components/schemas/IssueBean"
|
|
296040
|
+
}
|
|
296041
|
+
},
|
|
296042
|
+
maxResults: {
|
|
296043
|
+
type: "integer",
|
|
296044
|
+
description: "The maximum number of results that could be on the page.",
|
|
296045
|
+
format: "int32",
|
|
296046
|
+
readOnly: true
|
|
296047
|
+
},
|
|
296048
|
+
names: {
|
|
296049
|
+
type: "object",
|
|
296050
|
+
additionalProperties: {
|
|
296051
|
+
type: "string",
|
|
296052
|
+
readOnly: true
|
|
296053
|
+
},
|
|
296054
|
+
description: "The ID and name of each field in the search results.",
|
|
296055
|
+
readOnly: true
|
|
296056
|
+
},
|
|
296057
|
+
schema: {
|
|
296058
|
+
type: "object",
|
|
296059
|
+
additionalProperties: {
|
|
296060
|
+
$ref: "#/components/schemas/JsonTypeBean"
|
|
296061
|
+
},
|
|
296062
|
+
description: "The schema describing the field types in the search results.",
|
|
296063
|
+
readOnly: true
|
|
296064
|
+
},
|
|
296065
|
+
startAt: {
|
|
296066
|
+
type: "integer",
|
|
296067
|
+
description: "The index of the first item returned on the page.",
|
|
296068
|
+
format: "int32",
|
|
296069
|
+
readOnly: true
|
|
296070
|
+
},
|
|
296071
|
+
total: {
|
|
296072
|
+
type: "integer",
|
|
296073
|
+
description: "The number of results on the page.",
|
|
296074
|
+
format: "int32",
|
|
296075
|
+
readOnly: true
|
|
296076
|
+
},
|
|
296077
|
+
warningMessages: {
|
|
296078
|
+
type: "array",
|
|
296079
|
+
description: "Any warnings related to the JQL query.",
|
|
296080
|
+
readOnly: true,
|
|
296081
|
+
items: {
|
|
296082
|
+
type: "string",
|
|
296083
|
+
readOnly: true
|
|
296084
|
+
}
|
|
296085
|
+
}
|
|
296086
|
+
},
|
|
296087
|
+
additionalProperties: false,
|
|
296088
|
+
description: "The result of a JQL search."
|
|
296089
|
+
},
|
|
296090
|
+
JsonTypeBean: {
|
|
296091
|
+
required: ["type"],
|
|
296092
|
+
type: "object",
|
|
296093
|
+
properties: {
|
|
296094
|
+
configuration: {
|
|
296095
|
+
type: "object",
|
|
296096
|
+
additionalProperties: {
|
|
296097
|
+
readOnly: true
|
|
296098
|
+
},
|
|
296099
|
+
description: "If the field is a custom field, the configuration of the field.",
|
|
296100
|
+
readOnly: true
|
|
296101
|
+
},
|
|
296102
|
+
custom: {
|
|
296103
|
+
type: "string",
|
|
296104
|
+
description: "If the field is a custom field, the URI of the field.",
|
|
296105
|
+
readOnly: true
|
|
296106
|
+
},
|
|
296107
|
+
customId: {
|
|
296108
|
+
type: "integer",
|
|
296109
|
+
description: "If the field is a custom field, the custom ID of the field.",
|
|
296110
|
+
format: "int64",
|
|
296111
|
+
readOnly: true
|
|
296112
|
+
},
|
|
296113
|
+
items: {
|
|
296114
|
+
type: "string",
|
|
296115
|
+
description: "When the data type is an array, the name of the field items within the array.",
|
|
296116
|
+
readOnly: true
|
|
296117
|
+
},
|
|
296118
|
+
system: {
|
|
296119
|
+
type: "string",
|
|
296120
|
+
description: "If the field is a system field, the name of the field.",
|
|
296121
|
+
readOnly: true
|
|
296122
|
+
},
|
|
296123
|
+
type: {
|
|
296124
|
+
type: "string",
|
|
296125
|
+
description: "The data type of the field.",
|
|
296126
|
+
readOnly: true
|
|
296127
|
+
}
|
|
296128
|
+
},
|
|
296129
|
+
additionalProperties: false,
|
|
296130
|
+
description: "The schema of a field."
|
|
296131
|
+
},
|
|
296132
|
+
UserDetails: {
|
|
296133
|
+
type: "object",
|
|
296134
|
+
properties: {
|
|
296135
|
+
accountId: {
|
|
296136
|
+
maxLength: 128,
|
|
296137
|
+
type: "string",
|
|
296138
|
+
description: "The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*."
|
|
296139
|
+
},
|
|
296140
|
+
accountType: {
|
|
296141
|
+
type: "string",
|
|
296142
|
+
description: "The type of account represented by this user. This will be one of 'atlassian' (normal users), 'app' (application user) or 'customer' (Jira Service Desk customer user)",
|
|
296143
|
+
readOnly: true
|
|
296144
|
+
},
|
|
296145
|
+
active: {
|
|
296146
|
+
type: "boolean",
|
|
296147
|
+
description: "Whether the user is active.",
|
|
296148
|
+
readOnly: true
|
|
296149
|
+
},
|
|
296150
|
+
avatarUrls: {
|
|
296151
|
+
description: "The avatars of the user.",
|
|
296152
|
+
readOnly: true,
|
|
296153
|
+
allOf: [
|
|
296154
|
+
{
|
|
296155
|
+
$ref: "#/components/schemas/AvatarUrlsBean"
|
|
296156
|
+
}
|
|
296157
|
+
]
|
|
296158
|
+
},
|
|
296159
|
+
displayName: {
|
|
296160
|
+
type: "string",
|
|
296161
|
+
description: "The display name of the user. Depending on the user\u2019s privacy settings, this may return an alternative value.",
|
|
296162
|
+
readOnly: true
|
|
296163
|
+
},
|
|
296164
|
+
emailAddress: {
|
|
296165
|
+
type: "string",
|
|
296166
|
+
description: "The email address of the user. Depending on the user\u2019s privacy settings, this may be returned as null.",
|
|
296167
|
+
readOnly: true
|
|
296168
|
+
},
|
|
296169
|
+
key: {
|
|
296170
|
+
type: "string",
|
|
296171
|
+
description: "This property is no longer available and will be removed from the documentation soon. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details.",
|
|
296172
|
+
readOnly: true
|
|
296173
|
+
},
|
|
296174
|
+
name: {
|
|
296175
|
+
type: "string",
|
|
296176
|
+
description: "This property is no longer available and will be removed from the documentation soon. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details.",
|
|
296177
|
+
readOnly: true
|
|
296178
|
+
},
|
|
296179
|
+
self: {
|
|
296180
|
+
type: "string",
|
|
296181
|
+
description: "The URL of the user.",
|
|
296182
|
+
readOnly: true
|
|
296183
|
+
},
|
|
296184
|
+
timeZone: {
|
|
296185
|
+
type: "string",
|
|
296186
|
+
description: "The time zone specified in the user's profile. Depending on the user\u2019s privacy settings, this may be returned as null.",
|
|
296187
|
+
readOnly: true
|
|
296188
|
+
}
|
|
296189
|
+
},
|
|
296190
|
+
additionalProperties: false,
|
|
296191
|
+
description: "User details permitted by the user's Atlassian Account privacy settings. However, be aware of these exceptions:\n\n * User record deleted from Atlassian: This occurs as the result of a right to be forgotten request. In this case, `displayName` provides an indication and other parameters have default values or are blank (for example, email is blank).\n * User record corrupted: This occurs as a results of events such as a server import and can only happen to deleted users. In this case, `accountId` returns *unknown* and all other parameters have fallback values.\n * User record unavailable: This usually occurs due to an internal service outage. In this case, all parameters have fallback values."
|
|
296192
|
+
}
|
|
296193
|
+
}
|
|
296194
|
+
}
|
|
296195
|
+
}
|
|
296196
|
+
};
|
|
296197
|
+
}
|
|
296198
|
+
if (integration.name === "CustomersAPI") {
|
|
296199
|
+
return {
|
|
292814
296200
|
openApiSpec: {
|
|
292815
296201
|
openapi: "3.0.3",
|
|
292816
296202
|
info: {
|
|
@@ -292936,12 +296322,7 @@ var formatSdkClassContent = (sdkClassName, integrations) => {
|
|
|
292936
296322
|
},
|
|
292937
296323
|
loyalty_status: {
|
|
292938
296324
|
type: "string",
|
|
292939
|
-
enum: [
|
|
292940
|
-
"Bronze",
|
|
292941
|
-
"Silver",
|
|
292942
|
-
"Gold",
|
|
292943
|
-
"Platinum"
|
|
292944
|
-
]
|
|
296325
|
+
enum: ["Bronze", "Silver", "Gold", "Platinum"]
|
|
292945
296326
|
}
|
|
292946
296327
|
}
|
|
292947
296328
|
}
|
|
@@ -292993,12 +296374,7 @@ var formatSdkClassContent = (sdkClassName, integrations) => {
|
|
|
292993
296374
|
},
|
|
292994
296375
|
loyalty_status: {
|
|
292995
296376
|
type: "string",
|
|
292996
|
-
enum: [
|
|
292997
|
-
"Bronze",
|
|
292998
|
-
"Silver",
|
|
292999
|
-
"Gold",
|
|
293000
|
-
"Platinum"
|
|
293001
|
-
]
|
|
296377
|
+
enum: ["Bronze", "Silver", "Gold", "Platinum"]
|
|
293002
296378
|
}
|
|
293003
296379
|
}
|
|
293004
296380
|
}
|
|
@@ -293011,9 +296387,222 @@ var formatSdkClassContent = (sdkClassName, integrations) => {
|
|
|
293011
296387
|
}
|
|
293012
296388
|
}
|
|
293013
296389
|
}
|
|
293014
|
-
}
|
|
293015
|
-
}
|
|
293016
|
-
|
|
296390
|
+
};
|
|
296391
|
+
}
|
|
296392
|
+
if (integration.name === "InternalLaunchAPI") {
|
|
296393
|
+
return {
|
|
296394
|
+
openApiSpec: {
|
|
296395
|
+
openapi: "3.0.3",
|
|
296396
|
+
info: {
|
|
296397
|
+
title: "Launches API",
|
|
296398
|
+
description: "API for retrieving launch data",
|
|
296399
|
+
version: "1.0.0",
|
|
296400
|
+
contact: {
|
|
296401
|
+
name: "API Support"
|
|
296402
|
+
}
|
|
296403
|
+
},
|
|
296404
|
+
servers: [
|
|
296405
|
+
{
|
|
296406
|
+
url: "https://agent.superblocks.com/v2",
|
|
296407
|
+
description: "Production server"
|
|
296408
|
+
}
|
|
296409
|
+
],
|
|
296410
|
+
paths: {
|
|
296411
|
+
"/execute/8edef7b6-8e7a-4e38-b3a7-f1cfd09a1bf5": {
|
|
296412
|
+
post: {
|
|
296413
|
+
summary: "Get Launches",
|
|
296414
|
+
description: "Retrieves launch data from the system",
|
|
296415
|
+
operationId: "getLaunches",
|
|
296416
|
+
tags: ["Launches"],
|
|
296417
|
+
requestBody: {
|
|
296418
|
+
description: "Request parameters for retrieving launches",
|
|
296419
|
+
required: false,
|
|
296420
|
+
content: {
|
|
296421
|
+
"application/json": {
|
|
296422
|
+
schema: {
|
|
296423
|
+
type: "object",
|
|
296424
|
+
properties: {
|
|
296425
|
+
filters: {
|
|
296426
|
+
type: "object",
|
|
296427
|
+
description: "Optional filters for launch data",
|
|
296428
|
+
additionalProperties: true
|
|
296429
|
+
},
|
|
296430
|
+
limit: {
|
|
296431
|
+
type: "integer",
|
|
296432
|
+
description: "Maximum number of launches to return",
|
|
296433
|
+
minimum: 1,
|
|
296434
|
+
maximum: 1e3,
|
|
296435
|
+
example: 100
|
|
296436
|
+
},
|
|
296437
|
+
offset: {
|
|
296438
|
+
type: "integer",
|
|
296439
|
+
description: "Number of launches to skip",
|
|
296440
|
+
minimum: 0,
|
|
296441
|
+
example: 0
|
|
296442
|
+
}
|
|
296443
|
+
}
|
|
296444
|
+
}
|
|
296445
|
+
}
|
|
296446
|
+
}
|
|
296447
|
+
},
|
|
296448
|
+
responses: {
|
|
296449
|
+
"200": {
|
|
296450
|
+
description: "Successfully retrieved launches",
|
|
296451
|
+
content: {
|
|
296452
|
+
"application/json": {
|
|
296453
|
+
schema: {
|
|
296454
|
+
type: "object",
|
|
296455
|
+
properties: {
|
|
296456
|
+
execution: {
|
|
296457
|
+
type: "string",
|
|
296458
|
+
description: "Execution ID for the request",
|
|
296459
|
+
example: "abc123-def456-ghi789"
|
|
296460
|
+
},
|
|
296461
|
+
output: {
|
|
296462
|
+
type: "object",
|
|
296463
|
+
properties: {
|
|
296464
|
+
result: {
|
|
296465
|
+
type: "array",
|
|
296466
|
+
items: {
|
|
296467
|
+
type: "object",
|
|
296468
|
+
description: "Launch data object"
|
|
296469
|
+
},
|
|
296470
|
+
description: "Array of launch data objects"
|
|
296471
|
+
}
|
|
296472
|
+
}
|
|
296473
|
+
},
|
|
296474
|
+
status: {
|
|
296475
|
+
type: "string",
|
|
296476
|
+
description: "Status of the request",
|
|
296477
|
+
example: "success"
|
|
296478
|
+
}
|
|
296479
|
+
}
|
|
296480
|
+
}
|
|
296481
|
+
}
|
|
296482
|
+
}
|
|
296483
|
+
},
|
|
296484
|
+
"400": {
|
|
296485
|
+
description: "Bad request",
|
|
296486
|
+
content: {
|
|
296487
|
+
"application/json": {
|
|
296488
|
+
schema: {
|
|
296489
|
+
type: "object",
|
|
296490
|
+
properties: {
|
|
296491
|
+
error: {
|
|
296492
|
+
type: "string",
|
|
296493
|
+
example: "Invalid request parameters"
|
|
296494
|
+
},
|
|
296495
|
+
status: {
|
|
296496
|
+
type: "string",
|
|
296497
|
+
example: "error"
|
|
296498
|
+
}
|
|
296499
|
+
}
|
|
296500
|
+
}
|
|
296501
|
+
}
|
|
296502
|
+
}
|
|
296503
|
+
},
|
|
296504
|
+
"401": {
|
|
296505
|
+
description: "Unauthorized",
|
|
296506
|
+
content: {
|
|
296507
|
+
"application/json": {
|
|
296508
|
+
schema: {
|
|
296509
|
+
type: "object",
|
|
296510
|
+
properties: {
|
|
296511
|
+
error: {
|
|
296512
|
+
type: "string",
|
|
296513
|
+
example: "Authentication required"
|
|
296514
|
+
},
|
|
296515
|
+
status: {
|
|
296516
|
+
type: "string",
|
|
296517
|
+
example: "error"
|
|
296518
|
+
}
|
|
296519
|
+
}
|
|
296520
|
+
}
|
|
296521
|
+
}
|
|
296522
|
+
}
|
|
296523
|
+
},
|
|
296524
|
+
"404": {
|
|
296525
|
+
description: "Not found",
|
|
296526
|
+
content: {
|
|
296527
|
+
"application/json": {
|
|
296528
|
+
schema: {
|
|
296529
|
+
type: "object",
|
|
296530
|
+
properties: {
|
|
296531
|
+
error: {
|
|
296532
|
+
type: "string",
|
|
296533
|
+
example: "Endpoint not found"
|
|
296534
|
+
},
|
|
296535
|
+
status: {
|
|
296536
|
+
type: "string",
|
|
296537
|
+
example: "error"
|
|
296538
|
+
}
|
|
296539
|
+
}
|
|
296540
|
+
}
|
|
296541
|
+
}
|
|
296542
|
+
}
|
|
296543
|
+
},
|
|
296544
|
+
"500": {
|
|
296545
|
+
description: "Internal server error",
|
|
296546
|
+
content: {
|
|
296547
|
+
"application/json": {
|
|
296548
|
+
schema: {
|
|
296549
|
+
type: "object",
|
|
296550
|
+
properties: {
|
|
296551
|
+
error: {
|
|
296552
|
+
type: "string",
|
|
296553
|
+
example: "Internal server error"
|
|
296554
|
+
},
|
|
296555
|
+
status: {
|
|
296556
|
+
type: "string",
|
|
296557
|
+
example: "error"
|
|
296558
|
+
}
|
|
296559
|
+
}
|
|
296560
|
+
}
|
|
296561
|
+
}
|
|
296562
|
+
}
|
|
296563
|
+
}
|
|
296564
|
+
},
|
|
296565
|
+
security: [
|
|
296566
|
+
{
|
|
296567
|
+
ApiKeyAuth: []
|
|
296568
|
+
},
|
|
296569
|
+
{
|
|
296570
|
+
BearerAuth: []
|
|
296571
|
+
}
|
|
296572
|
+
]
|
|
296573
|
+
}
|
|
296574
|
+
}
|
|
296575
|
+
},
|
|
296576
|
+
components: {
|
|
296577
|
+
securitySchemes: {
|
|
296578
|
+
ApiKeyAuth: {
|
|
296579
|
+
type: "apiKey",
|
|
296580
|
+
in: "header",
|
|
296581
|
+
name: "X-API-Key",
|
|
296582
|
+
description: "API key for authentication"
|
|
296583
|
+
},
|
|
296584
|
+
BearerAuth: {
|
|
296585
|
+
type: "http",
|
|
296586
|
+
scheme: "bearer",
|
|
296587
|
+
bearerFormat: "JWT",
|
|
296588
|
+
description: "Bearer token authentication"
|
|
296589
|
+
}
|
|
296590
|
+
}
|
|
296591
|
+
},
|
|
296592
|
+
tags: [
|
|
296593
|
+
{
|
|
296594
|
+
name: "Launches",
|
|
296595
|
+
description: "Operations related to launch data"
|
|
296596
|
+
}
|
|
296597
|
+
]
|
|
296598
|
+
}
|
|
296599
|
+
};
|
|
296600
|
+
}
|
|
296601
|
+
return integration.metadata;
|
|
296602
|
+
};
|
|
296603
|
+
var formatSdkClassContent = (sdkClassName, integrations) => {
|
|
296604
|
+
const metadataById = integrations.map(({ name: description, id: id2, metadata }) => ({ id: id2, description, metadata }));
|
|
296605
|
+
return `class ${sdkClassName} extends ${openApiIntegrationTypes.includes(sdkClassName.toLowerCase()) ? "RestApi" : "Integration"} {
|
|
293017
296606
|
static integrations: Integrations = ${JSON.stringify(metadataById)};
|
|
293018
296607
|
|
|
293019
296608
|
// the rest of the type from above ...
|
|
@@ -293021,7 +296610,7 @@ var formatSdkClassContent = (sdkClassName, integrations) => {
|
|
|
293021
296610
|
};
|
|
293022
296611
|
var getSdkClassName = (integrationType) => {
|
|
293023
296612
|
let effectiveType = integrationType;
|
|
293024
|
-
if (openApiIntegrationTypes.includes(effectiveType)) {
|
|
296613
|
+
if (!(effectiveType in datasourceSdkClassByType) && openApiIntegrationTypes.includes(effectiveType)) {
|
|
293025
296614
|
effectiveType = "restapiintegration";
|
|
293026
296615
|
}
|
|
293027
296616
|
if (effectiveType in datasourceSdkClassByType) {
|
|
@@ -293037,7 +296626,7 @@ init_cjs_shims();
|
|
|
293037
296626
|
init_cjs_shims();
|
|
293038
296627
|
var generated = {};
|
|
293039
296628
|
try {
|
|
293040
|
-
generated = await import("./generated-
|
|
296629
|
+
generated = await import("./generated-BOH37UWZ.js");
|
|
293041
296630
|
} catch (_error) {
|
|
293042
296631
|
getLogger().warn("[ai-service] Generated markdown modules not found. Run `pnpm generate:markdown` first.");
|
|
293043
296632
|
}
|
|
@@ -318421,7 +322010,7 @@ var import_util28 = __toESM(require_dist3(), 1);
|
|
|
318421
322010
|
// ../sdk/package.json
|
|
318422
322011
|
var package_default = {
|
|
318423
322012
|
name: "@superblocksteam/sdk",
|
|
318424
|
-
version: "2.0.3-next.
|
|
322013
|
+
version: "2.0.3-next.183",
|
|
318425
322014
|
type: "module",
|
|
318426
322015
|
description: "Superblocks JS SDK",
|
|
318427
322016
|
homepage: "https://www.superblocks.com",
|
|
@@ -318463,8 +322052,8 @@ var package_default = {
|
|
|
318463
322052
|
"@rollup/wasm-node": "^4.35.0",
|
|
318464
322053
|
"@superblocksteam/bucketeer-sdk": "0.5.0",
|
|
318465
322054
|
"@superblocksteam/shared": "0.9160.0",
|
|
318466
|
-
"@superblocksteam/util": "2.0.3-next.
|
|
318467
|
-
"@superblocksteam/vite-plugin-file-sync": "2.0.3-next.
|
|
322055
|
+
"@superblocksteam/util": "2.0.3-next.183",
|
|
322056
|
+
"@superblocksteam/vite-plugin-file-sync": "2.0.3-next.183",
|
|
318468
322057
|
"@vitejs/plugin-react": "^4.3.4",
|
|
318469
322058
|
axios: "^1.4.0",
|
|
318470
322059
|
chokidar: "^4.0.3",
|
|
@@ -325438,7 +329027,7 @@ async function startVite({ app, httpServer: httpServer2, root: root2, mode, port
|
|
|
325438
329027
|
};
|
|
325439
329028
|
const isCustomBuildEnabled2 = await isCustomComponentsEnabled();
|
|
325440
329029
|
const customFolder = path34.join(root2, "custom");
|
|
325441
|
-
const cdnUrl = "https://assets-cdn.superblocks.com/library/2.0.3-next.
|
|
329030
|
+
const cdnUrl = "https://assets-cdn.superblocks.com/library/2.0.3-next.183";
|
|
325442
329031
|
const env3 = loadEnv(mode, root2, "");
|
|
325443
329032
|
const hmrPort = await getFreePort();
|
|
325444
329033
|
const hmrOptions = {
|