diff --git a/packages/web-api/.eslintignore b/packages/web-api/.eslintignore deleted file mode 120000 index 5169d53c8..000000000 --- a/packages/web-api/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -../../lint-configs/.eslintignore \ No newline at end of file diff --git a/packages/web-api/.eslintrc.js b/packages/web-api/.eslintrc.js deleted file mode 120000 index 5962fa3ca..000000000 --- a/packages/web-api/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -../../lint-configs/.eslintrc.js \ No newline at end of file diff --git a/packages/web-api/.vscode/launch.json b/packages/web-api/.vscode/launch.json index 68863cc64..756ca0ade 100644 --- a/packages/web-api/.vscode/launch.json +++ b/packages/web-api/.vscode/launch.json @@ -1,7 +1,4 @@ { - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { @@ -9,17 +6,10 @@ "request": "launch", "name": "Web API Tests", "program": "${workspaceFolder}/node_modules/mocha/bin/_mocha", - "args": [ - "--timeout", - "999999", - "--colors", - "${workspaceFolder}/src/*.spec.js" - ], + "args": ["--timeout", "999999", "--colors", "${workspaceFolder}/src/*.spec.js"], "internalConsoleOptions": "openOnSessionStart", - "skipFiles": [ - "/**" - ], + "skipFiles": ["/**"], "cwd": "${workspaceFolder}" - }, + } ] } diff --git a/packages/web-api/.vscode/settings.json b/packages/web-api/.vscode/settings.json index 6de18e4ed..97bef4c57 100644 --- a/packages/web-api/.vscode/settings.json +++ b/packages/web-api/.vscode/settings.json @@ -1,3 +1,3 @@ { - "typescript.tsdk": "./node_modules/typescript/lib" + "typescript.tsdk": "./node_modules/typescript/lib" } diff --git a/packages/web-api/api-extractor.json b/packages/web-api/api-extractor.json deleted file mode 100644 index dbbbba8b5..000000000 --- a/packages/web-api/api-extractor.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - /** - * Config file for API Extractor. For more info, please visit: https://api-extractor.com - */ - "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", - - "mainEntryPointFilePath": "/dist/index.d.ts", - - "apiReport": { - "enabled": false - }, - - "docModel": { - "enabled": true, - "apiJsonFilePath": "/../../support/ref-docs/models/.api.json" - }, - - "dtsRollup": { - "enabled": false - }, - - "tsdocMetadata": { - "enabled": false - }, - - "messages": { - "extractorMessageReporting": { - // Disable release tagging warnings - "ae-missing-release-tag": { - "logLevel": "none" - } - } - } -} diff --git a/packages/web-api/biome.json b/packages/web-api/biome.json new file mode 100644 index 000000000..be3f4babf --- /dev/null +++ b/packages/web-api/biome.json @@ -0,0 +1,19 @@ +{ + "$schema": "https://biomejs.dev/schemas/1.8.3/schema.json", + "extends": ["../../biome.json"], + "overrides": [ + { + "include": ["src/types/response/**/*.ts"], + "linter": { + "rules": { + "complexity": { + "noBannedTypes": "off" + }, + "suspicious": { + "noExplicitAny": "off" + } + } + } + } + ] +} diff --git a/packages/web-api/package.json b/packages/web-api/package.json index fcfb3b8f8..7ba7d7b68 100644 --- a/packages/web-api/package.json +++ b/packages/web-api/package.json @@ -4,22 +4,10 @@ "description": "Official library for using the Slack Platform's Web API", "author": "Slack Technologies, LLC", "license": "MIT", - "keywords": [ - "slack", - "web-api", - "bot", - "client", - "http", - "api", - "proxy", - "rate-limiting", - "pagination" - ], + "keywords": ["slack", "web-api", "bot", "client", "http", "api", "proxy", "rate-limiting", "pagination"], "main": "dist/index.js", "types": "./dist/index.d.ts", - "files": [ - "dist/**/*" - ], + "files": ["dist/**/*"], "engines": { "node": ">= 18", "npm": ">= 8.6.0" @@ -36,14 +24,13 @@ "prepare": "npm run build", "build": "npm run build:clean && tsc", "build:clean": "shx rm -rf ./dist ./coverage", - "lint": "eslint --fix --ext .ts src", - "mocha": "mocha --config .mocharc.json src/*.spec.js", + "lint": "npx @biomejs/biome check --write .", + "mocha": "mocha --config .mocharc.json \"./src/**/*.spec.ts\"", "test": "npm run lint && npm run test:types && npm run test:integration && npm run test:unit", "test:integration": "npm run build && node test/integration/commonjs-project/index.js && node test/integration/esm-project/index.mjs && npm run test:integration:ts", "test:integration:ts": "cd test/integration/ts-4.7-project && npm i && npm run build", "test:unit": "npm run build && c8 npm run mocha", "test:types": "tsd", - "ref-docs:model": "api-extractor run", "watch": "npx nodemon --watch 'src' --ext 'ts' --exec npm run build" }, "dependencies": { @@ -61,23 +48,15 @@ "retry": "^0.13.1" }, "devDependencies": { - "@microsoft/api-extractor": "^7", + "@biomejs/biome": "^1.8.3", "@tsconfig/recommended": "^1", + "@types/busboy": "^1.5.4", "@types/chai": "^4", "@types/mocha": "^10", "@types/sinon": "^17", - "@typescript-eslint/eslint-plugin": "^6", - "@typescript-eslint/parser": "^6", "busboy": "^1", "c8": "^10.1.2", "chai": "^4", - "eslint": "^8", - "eslint-config-airbnb-base": "^15", - "eslint-config-airbnb-typescript": "^17", - "eslint-plugin-import": "^2", - "eslint-plugin-import-newlines": "^1.3.4", - "eslint-plugin-jsdoc": "^48", - "eslint-plugin-node": "^11", "mocha": "^10", "nock": "^13", "shx": "^0.3.2", diff --git a/packages/web-api/src/WebClient.spec.js b/packages/web-api/src/WebClient.spec.js deleted file mode 100644 index 40ff34729..000000000 --- a/packages/web-api/src/WebClient.spec.js +++ /dev/null @@ -1,1678 +0,0 @@ -require('mocha'); -const fs = require('fs'); -const path = require('path'); -const { Agent } = require('https'); -const { assert, expect } = require('chai'); -const { WebClient, buildThreadTsWarningMessage } = require('./WebClient'); -const { ErrorCode } = require('./errors'); -const { LogLevel } = require('./logger'); -const { addAppMetadata } = require('./instrument'); -const { rapidRetryPolicy } = require('./retry-policies'); -const { Methods } = require('./methods'); -const nock = require('nock'); -const Busboy = require('busboy'); -const sinon = require('sinon'); -const { buildLegacyMethodWarning, buildGeneralFilesUploadWarning, buildInvalidFilesUploadParamError } = require('./file-upload'); -const axios = require('axios').default; - -const token = 'xoxb-faketoken'; - -describe('WebClient', function () { - - describe('constructor()', function () { - it('should build a default client given a token', function () { - const client = new WebClient(token); - assert.instanceOf(client, WebClient); - assert.equal(client.token, token); - assert.equal(client.slackApiUrl, 'https://slack.com/api/') - assert.equal(client.axios.defaults.headers.Authorization, `Bearer ${token}`); - }); - - it('should build a client without a token', function () { - const client = new WebClient(); - assert.instanceOf(client, WebClient); - assert.notExists(client.axios.defaults.headers.Authorization); - }); - }); - - describe('Methods superclass', function () { - it('should fail to construct classes that don\'t extend WebClient', function () { - assert.throws(function () { - class X extends Methods { - apiCall() {} - } - new X(); - }); - }); - - it('should succeed when constructing WebClient', function () { - assert.doesNotThrow(function () { - new WebClient(); - }); - }); - - it('should succeed when constructing a class that extends WebClient', function () { - assert.doesNotThrow(function () { - class X extends WebClient {} - new X(); - }); - }); - }); - - describe('has an option to change the log output severity', function () { - let sandbox = null; - beforeEach(function () { - sandbox = sinon.createSandbox(); - sandbox.stub(console, 'debug'); - }); - afterEach(function () { - sandbox.restore(); - }); - it('outputs a debug log on initialization', function () { - const debuggingClient = new WebClient(token, { logLevel: LogLevel.DEBUG }); - const output = console.debug.getCalls()[0].args.join(' '); - assert.isNotEmpty(output); // should have at least 1 log line, but not asserting since that is an implementation detail - }); - }); - - describe('has a logger option', function () { - let sandbox = null; - beforeEach(function () { - this.logger = { - debug: sinon.spy(), - info: sinon.spy(), - warn: sinon.spy(), - error: sinon.spy(), - setLevel: sinon.spy(), - setName: sinon.spy(), - }; - sandbox = sinon.createSandbox(); - sandbox.stub(console, 'debug'); - }); - afterEach(function () { - sandbox.restore(); - }); - it('sends logs to a logger and not to stdout', function () { - const debuggingClient = new WebClient(token, { logLevel: LogLevel.DEBUG, logger: this.logger }); - assert.isTrue(this.logger.debug.called); - assert.isEmpty(console.debug.getCalls()); - }); - it('never modifies the original logger', function () { - new WebClient(token, { logger: this.logger }); - // Calling #setName of the given logger is destructive - assert.isFalse(this.logger.setName.called); - }); - }); - - describe('has an option to override the Axios timeout value', function () { - it('should log warning and throw error if timeout exceeded', function (done) { - const timeoutOverride = 1; // ms, guaranteed failure - - const logger = { - debug: sinon.spy(), - info: sinon.spy(), - warn: sinon.spy(), - error: sinon.spy(), - setLevel: sinon.spy(), - setName: sinon.spy(), - }; - - const client = new WebClient(undefined, { - timeout: timeoutOverride, - retryConfig: { retries: 0 }, - logLevel: LogLevel.WARN, - logger - }); - - client.apiCall('users.list') - .then(_ => { - done(new Error("expected timeout to throw error")); - }) - .catch(error => { - try { - assert.isTrue(logger.warn.calledOnce, 'expected Logger to be called once'); - assert.instanceOf(error, Error); - assert.equal(error.code, ErrorCode.RequestError); - assert.equal(error.original.config.timeout, timeoutOverride); - assert.equal(error.original.isAxiosError, true); - done(); - } catch (err) { - done(err); - } - }); - }); - }); - - describe('apiCall()', function () { - beforeEach(function () { - this.client = new WebClient(token, { retryConfig: rapidRetryPolicy }); - }); - - describe('when making a successful call', function () { - beforeEach(function () { - this.scope = nock('https://slack.com') - .post(/api/) - .reply(200, { ok: true, - response_metadata: { - warnings: ['testWarning1', 'testWarning2'], - messages: [ - "[ERROR] unsupported type: sections [json-pointer:/blocks/0/type]", - "[WARN] A Content-Type HTTP header was presented but did not declare a charset, such as a 'utf-8'" - ] - } - }); - }); - - it('should return results in a Promise', function () { - const r = this.client.apiCall('method'); - return r.then((result) => { - assert(result.ok); - this.scope.done(); - }); - }); - - it('should send warnings to logs from both response_metadata.warnings & response_metadata.messages', function() { - const logger = { - debug: sinon.spy(), - info: sinon.spy(), - warn: sinon.spy(), - error: sinon.spy(), - setLevel: sinon.spy(), - setName: sinon.spy(), - }; - const warnClient = new WebClient(token, { logLevel: LogLevel.WARN, logger }); - return warnClient.apiCall('method') - .then(() => { - assert.isTrue(logger.warn.calledThrice); - }); - }); - - it('should send response_metadata.messages errors to logs', function() { - const logger = { - debug: sinon.spy(), - info: sinon.spy(), - warn: sinon.spy(), - error: sinon.spy(), - setLevel: sinon.spy(), - setName: sinon.spy(), - }; - const errorClient = new WebClient(token, { logLevel: LogLevel.ERROR, logger }); - return errorClient.apiCall('method') - .then(() => { - assert.isTrue(logger.error.calledOnce); - }); - }); - - const attachmentWarningTestPatterns = [ - { method: 'chat.postMessage', args: { channel: "C123", attachments: [{ blocks: [] }] } }, - { method: 'chat.postMessage', args: { channel: "C123", attachments: [{ blocks: [], fallback: " " }] } }, - ]; - const textWarningTestPatterns = [ - { method: 'chat.postEphemeral', args: { channel: "C123", blocks: [] } }, - { method: 'chat.postMessage', args: { channel: "C123", blocks: [] } }, - { method: 'chat.scheduleMessage', args: { channel: "C123", post_at: "100000000", blocks: [] } }, - ]; - const warningTestPatterns = textWarningTestPatterns.concat(attachmentWarningTestPatterns); - - attachmentWarningTestPatterns.reduce((acc, { method, args }) => { - const attachmentPatterns = [{ fallback: "fallback" }].map((attachmentOverrides) => { - const attachments = args.attachments.map( attachment => { - return Object.assign({}, attachment, attachmentOverrides); - }) - return { method, args: Object.assign({}, args, { attachments }) }; - }); - - return acc.concat(attachmentPatterns) - }, []).forEach(({ method, args }) => { - it(`should not send warning to logs when client executes ${method} without text but with attachment fallback argument`, function () { - const logger = { - debug: sinon.spy(), - info: sinon.spy(), - warn: sinon.spy(), - error: sinon.spy(), - setLevel: sinon.spy(), - setName: sinon.spy(), - }; - const warnClient = new WebClient(token, { logLevel: LogLevel.WARN, logger }); - return warnClient.apiCall(method, args).then(() => { - assert.equal(logger.warn.callCount, 3) - }); - }); - }); - - warningTestPatterns.reduce((acc, { method, args }) => { - const textPatterns = [{ text: "text" }] - .map((v) => ({ method, args: Object.assign({}, v, args) })) - return acc.concat(textPatterns) - }, []).forEach(({ method, args }) => { - it(`should not send warning to logs when client executes ${method} with text argument`, function () { - const logger = { - debug: sinon.spy(), - info: sinon.spy(), - warn: sinon.spy(), - error: sinon.spy(), - setLevel: sinon.spy(), - setName: sinon.spy(), - }; - const warnClient = new WebClient(token, { logLevel: LogLevel.WARN, logger }); - return warnClient.apiCall(method, args) - .then(() => { - assert.isTrue(logger.warn.calledThrice); - }); - }); - }); - - textWarningTestPatterns.reduce((acc, { method, args }) => { - const textPatterns = [{ text: "" }, { text: null }, {}] - .map((v) => ({ method, args: Object.assign({}, v, args) })) - return acc.concat(textPatterns) - }, []).forEach(({ method, args }) => { - it(`should send a text-argument-specific warning to logs when client executes ${method} without text argument(${args.text === "" ? "empty" : args.text})`, function () { - const logger = { - debug: sinon.spy(), - info: sinon.spy(), - warn: sinon.spy(), - error: sinon.spy(), - setLevel: sinon.spy(), - setName: sinon.spy(), - }; - const warnClient = new WebClient(token, { logLevel: LogLevel.WARN, logger }); - return warnClient.apiCall(method, args) - .then(() => { - assert.equal(logger.warn.callCount, 4) - }); - }); - }); - - attachmentWarningTestPatterns.reduce((acc, { method, args }) => { - const textPatterns = [{ text: "" }, { text: null }, {}] - .map((v) => ({ method, args: Object.assign({}, v, args) })) - return acc.concat(textPatterns) - }, []).forEach(({ method, args }) => { - it(`should send both text and fallback-argument-specific warning to logs when client executes ${method} without text argument(${args.text === "" ? "empty" : args.text}) nor without attachment-level fallback argument (${args.attachments[0].fallback === " " ? "empty" : args.attachments[0].fallback})`, function () { - const logger = { - debug: sinon.spy(), - info: sinon.spy(), - warn: sinon.spy(), - error: sinon.spy(), - setLevel: sinon.spy(), - setName: sinon.spy(), - }; - const warnClient = new WebClient(token, { logLevel: LogLevel.WARN, logger }); - return warnClient.apiCall(method, args) - .then(() => { - assert.equal(logger.warn.callCount, 5) - }); - }); - }); - - const threadTsTestPatterns = [ - { method: 'chat.postEphemeral' }, - { method: 'chat.postMessage' }, - { method: 'chat.scheduleMessage' }, - { method: 'files.upload' }, - ]; - - threadTsTestPatterns.reduce((acc, { method, args }) => { - const threadTs = [{ thread_ts: 1503435956.000247, text: 'text' }] - .map((v) => ({ method, args: Object.assign({}, v, args) })) - return acc.concat(threadTs) - }, []).forEach(({ method, args }) => { - it(`should send warning to logs when thread_ts in ${method} arguments is a float`, function () { - const logger = { - debug: sinon.spy(), - info: sinon.spy(), - warn: sinon.spy(), - error: sinon.spy(), - setLevel: sinon.spy(), - setName: sinon.spy(), - }; - const warnClient = new WebClient(token, { logLevel: LogLevel.WARN, logger }); - return warnClient.apiCall(method, args) - .then(() => { - // assume no warning about thread_ts has been sent - let warnedAboutThreadTS = false; - - // for each of the calls made of this method's spy function - const spyCalls = logger.warn.getCalls(); - for (const call of spyCalls) { - // determine whether it was called with the correct warning as arguments - if (call.args[0] === buildThreadTsWarningMessage(method)) { - warnedAboutThreadTS = true; - break; - } - } - if (!warnedAboutThreadTS) { - assert.fail(`Expected a warning when thread_ts in ${method} is a float but got none`); - } - }); - }); - }); - - threadTsTestPatterns.reduce((acc, { method, args }) => { - const threadTs = [{ thread_ts: '1503435956.000247', text: 'text' }] - .map((v) => ({ method, args: Object.assign({}, v, args) })) - return acc.concat(threadTs) - }, []).forEach(({ method, args }) => { - it(`should not send warning to logs when thread_ts in ${method} arguments is a string`, function () { - const logger = { - debug: sinon.spy(), - info: sinon.spy(), - warn: sinon.spy(), - error: sinon.spy(), - setLevel: sinon.spy(), - setName: sinon.spy(), - }; - const warnClient = new WebClient(token, { logLevel: LogLevel.WARN, logger }); - return warnClient.apiCall(method, args) - .then(() => { - logger.warn.getCalls().forEach((call) => { - assert.notEqual(call.args[0], buildThreadTsWarningMessage(method)); - }); - }); - }); - }); - - it('warns when user is accessing the files.upload (legacy) method', async () => { - const logger = { - info: sinon.spy(), - warn: sinon.spy(), - debug: sinon.spy(), - error: sinon.spy(), - setLevel: sinon.spy(), - setName: sinon.spy(), - } - const client = new WebClient(token, { logLevel: LogLevel.INFO, logger }); - const res = await client.apiCall('files.upload', {}); - - // both must be true to pass this test - let warnedAboutLegacyFilesUpload = false; - let infoAboutRecommendedFilesUploadV2 = false; - - // check the warn spy for whether it was called with the correct warning - logger.warn.getCalls().forEach(call => { - if (call.args[0] === buildLegacyMethodWarning('files.upload')) { - warnedAboutLegacyFilesUpload = true; - } - }); - // check the info spy for whether it was called with the correct warning - logger.info.getCalls().forEach(call => { - if (call.args[0] === buildGeneralFilesUploadWarning()) { - infoAboutRecommendedFilesUploadV2 = true; - } - }) - if (!warnedAboutLegacyFilesUpload || !infoAboutRecommendedFilesUploadV2) { - assert.fail('Should have logged a warning and info when files.upload is used'); - } - }); - - }); - - describe('with OAuth scopes in the response headers', function () { - it('should expose a scopes and acceptedScopes properties on the result', function () { - const scope = nock('https://slack.com') - .post(/api/) - .reply(200, { ok: true }, { - 'X-OAuth-Scopes': 'files:read, chat:write:bot', - 'X-Accepted-OAuth-Scopes': 'files:read' - }); - return this.client.apiCall('method') - .then((result) => { - assert.deepNestedInclude(result.response_metadata, { scopes: ['files:read', 'chat:write:bot'] }); - assert.deepNestedInclude(result.response_metadata, { acceptedScopes: ['files:read'] }); - scope.done(); - }) - }); - }); - - describe('when called with bad options', function () { - it('should reject its Promise with TypeError', function (done) { - const results = [ - this.client.apiCall('method', 4), - this.client.apiCall('method', 'a string'), - this.client.apiCall('method', false), - ]; - const caughtErrors = results.map((r) => { - return r - .then(() => { - // if any of these promises resolve, this test fails - assert(false); - }) - .catch((error) => { - // each promise should reject with the right kind of error - assert.instanceOf(error, TypeError); - }); - }); - Promise.all(caughtErrors) - .then(() => done()); - }); - }); - - describe('when an API call fails', function () { - it('should return a Promise which rejects on error', function (done) { - const client = new WebClient(undefined, { retryConfig: { retries: 0 } }); - - this.scope = nock('https://slack.com') - .post(/api/) - .reply(500); - - client.apiCall('method').catch((error) => { - assert.instanceOf(error, Error); - this.scope.done(); - done(); - }); - }); - }); - - it('should fail with WebAPIPlatformError when the API response has an error', function (done) { - const scope = nock('https://slack.com') - .post(/api/) - .reply(200, { ok: false, error: 'bad error' }); - this.client.apiCall('method') - .catch((error) => { - assert.instanceOf(error, Error); - assert.equal(error.code, ErrorCode.PlatformError); - assert.nestedPropertyVal(error, 'data.ok', false); - assert.nestedPropertyVal(error, 'data.error', 'bad error'); - scope.done(); - done(); - }); - }); - - it('should fail with WebAPIHTTPError when the API response has an unexpected status', function (done) { - const body = { foo: 'bar' }; - const scope = nock('https://slack.com') - .post(/api/) - .reply(500, body); - const client = new WebClient(token, { retryConfig: { retries: 0 } }); - client.apiCall('method') - .catch((error) => { - assert.instanceOf(error, Error); - assert.equal(error.code, ErrorCode.HTTPError); - assert.equal(error.statusCode, 500); - assert.exists(error.headers); - assert.deepEqual(error.body, body); - scope.done(); - done(); - }); - }); - - it('should fail with WebAPIRequestError when the API request fails', function (done) { - // One known request error is when the node encounters an ECONNREFUSED. In order to simulate this, rather than - // using nock, we send the request to a host:port that is not listening. - const client = new WebClient(token, { slackApiUrl: 'https://localhost:8999/api/', retryConfig: { retries: 0 } }); - client.apiCall('method') - .catch((error) => { - assert.instanceOf(error, Error); - assert.equal(error.code, ErrorCode.RequestError); - assert.instanceOf(error.original, Error); - done(); - }); - }); - - it('should properly serialize simple API arguments', function () { - const scope = nock('https://slack.com') - // NOTE: this could create false negatives if the serialization order changes (it shouldn't matter) - .post(/api/, 'team_id=T12345678&foo=stringval&bar=42&baz=false') - .reply(200, { ok: true }); - return this.client.apiCall('method', { foo: 'stringval', bar: 42, baz: false, team_id: 'T12345678' }) - .then(() => { - scope.done(); - }); - }); - - it('should properly serialize complex API arguments', function () { - const scope = nock('https://slack.com') - // NOTE: this could create false negatives if the serialization order changes (it shouldn't matter) - .post(/api/, 'arraything=%5B%7B%22foo%22%3A%22stringval%22%2C%22bar%22%3A42%2C%22baz%22%3Afalse%2C%22zup%22%3A%5B%22one%22%2C%22two%22%2C%22three%22%5D%7D%5D&objectthing=%7B%22foo%22%3A7%2C%22hum%22%3Afalse%7D') - .reply(200, { ok: true }); - return this.client.apiCall('method', { - // TODO: include things like quotes and emojis - arraything: [{ - foo: 'stringval', - bar: 42, - baz: false, - zup: ['one', 'two', 'three'] - }], - objectthing: { - foo: 7, - hum: false, - }, - }) - .then(() => { - scope.done(); - }); - }); - - it('should remove undefined or null values from simple API arguments', function () { - const scope = nock('https://slack.com') - .post(/api/, 'something=else') - .reply(200, { ok: true }); - return this.client.apiCall('method', { - something_undefined: undefined, - something_null: null, - something: 'else' - }) - .then(() => { - scope.done(); - }); - }); - - describe('when API arguments contain binary to upload', function () { - beforeEach(function () { - const self = this; - self.scope = nock('https://slack.com') - .post(/api/) - // rather than matching on the body, that nock cannot do for content-type multipart/form-data, we use the - // response to signal that the body was correctly serialized - .reply(function (_uri, requestBody, cb) { - // busboy is a parser for for multipart/form-data bodies - const busboy = Busboy({ headers: this.req.headers }); - // capture state about all the parts that are in the body - const parts = { files: [], fields: [], errors: [] }; - - // attaching event handlers to track incoming parts - busboy.on('file', (fieldname, file, filename) => { - parts.files.push({ fieldname, filename }); - file.resume(); - }); - busboy.on('field', (fieldname, value) => { - parts.fields.push({ fieldname, value }); - }); - busboy.on('error', (error) => { - parts.errors.push(error); - }); - busboy.on('finish', () => { - // when the parser is done, respond to the request with the state captured - if (parts.errors.length > 0) { - cb(parts.errors[0]); - } else { - // the response must contain `ok: true` for the client to accept it - parts.ok = true; - cb(null, [200, JSON.stringify(parts)]); - } - }); - - // Write incoming string body to busboy parser - busboy.end(requestBody ? Buffer.from(requestBody, 'hex') : undefined); - }); - }); - - // TODO: resolve this test failure starting in September 2022 - // it('should properly serialize when the binary argument is a ReadableStream', function () { - // const imageStream = fs.createReadStream(path.resolve('test', 'fixtures', 'train.jpg')); - // return this.client.apiCall('upload', { - // someBinaryField: imageStream, - // }) - // .then((parts) => { - // assert.lengthOf(parts.files, 1); - // const file = parts.files[0]; - // // the filename is picked up from the the ReadableStream since it originates from fs - // assert.include(file, { fieldname: 'someBinaryField', filename: 'train.jpg' }); - // }); - // }); - - // TODO: some tests with streams/buffers that originate from formiddable and/or request - // TODO: resolve this test failure starting in September 2022 - // it('should use a default name when binary argument is a Buffer', function () { - // const imageBuffer = fs.readFileSync(path.resolve('test', 'fixtures', 'train.jpg')); - // // intentially vague about the method name and argument name - // return this.client.apiCall('upload', { - // someBinaryField: imageBuffer, - // }) - // .then((parts) => { - // assert.lengthOf(parts.files, 1); - // const file = parts.files[0]; - // assert.include(file, { fieldname: 'someBinaryField' }); - // assert.isString(file.filename); - // }); - // }); - - // TODO: resolve this test failure starting in September 2022 - // it('should filter out undefined values', function () { - // const imageBuffer = fs.readFileSync(path.resolve('test', 'fixtures', 'train.jpg')); - // return this.client.apiCall('upload', { - // // the binary argument is necessary to trigger form data serialization - // someBinaryField: imageBuffer, - // someUndefinedField: undefined, - // }) - // .then((parts) => { - // assert.lengthOf(parts.fields, 0); - // }) - // }); - }); - - describe('metadata in the user agent', function () { - it('should set the user agent to contain package metadata', function () { - const scope = nock('https://slack.com', { - reqheaders: { - 'User-Agent': (value) => { - const metadata = parseUserAgentIntoMetadata(value) - // NOTE: this assert isn't that strong and doesn't say anything about the values. at this time, there - // isn't a good way to test this without dupicating the logic of the code under test. - assert.containsAllKeys(metadata, ['node', '@slack:web-api']); - // NOTE: there's an assumption that if there's any keys besides these left at all, its the platform part - delete metadata.node; - delete metadata['@slack:client']; - assert.isNotEmpty(metadata); - return true; - }, - }, - }) - .post(/api/) - .reply(200, { ok: true }); - return this.client.apiCall('method') - .then(() => { - scope.done(); - }); - }); - - it('should set the user agent to contain application metadata', function () { - const [name, version] = ['appmedataname', 'appmetadataversion']; - addAppMetadata({ name, version }); - const scope = nock('https://slack.com', { - reqheaders: { - 'User-Agent': (value) => { - const metadata = parseUserAgentIntoMetadata(value) - assert.propertyVal(metadata, name, version); - return true; - }, - }, - }) - .post(/api/) - .reply(200, { ok: true }); - // NOTE: appMetaData is only evalued on client construction, so we cannot use the client already created - const client = new WebClient(token, { retryConfig: rapidRetryPolicy }); - return client.apiCall('method') - .then(() => { - scope.done(); - }); - }); - }); - - describe('with string response body for some reason', function () { - it('should try to parse the body', function () { - const scope = nock('https://slack.com') - .post(/api/) - .reply(200, '{ "ok": true, "response_metadata": { "foo": "bar" } }', { - 'X-OAuth-Scopes': 'files:read, chat:write:bot', - 'X-Accepted-OAuth-Scopes': 'files:read' - }); - return this.client.apiCall('method') - .then((result) => { - assert.deepNestedInclude(result.response_metadata, { scopes: ['files:read', 'chat:write:bot'] }); - assert.deepNestedInclude(result.response_metadata, { acceptedScopes: ['files:read'] }); - assert.deepNestedInclude(result.response_metadata, { foo: 'bar' }); - scope.done(); - }) - }); - it('should work even if the body is not a JSON data', function () { - const scope = nock('https://slack.com') - .post(/api/) - .reply(200, 'something wrong!', { - 'X-OAuth-Scopes': 'files:read, chat:write:bot', - 'X-Accepted-OAuth-Scopes': 'files:read' - }); - return this.client.apiCall('method') - .catch(err => { - assert.equal(err.message, 'An API error occurred: something wrong!'); - scope.done(); - }); - }); - }); - }); - - describe('apiCall() - without a token', function () { - it('should make successful api calls', function () { - const client = new WebClient(undefined, { retryConfig: rapidRetryPolicy }); - - const scope = nock('https://slack.com') - // NOTE: this could create false negatives if the serialization order changes (it shouldn't matter) - .post(/api/, 'foo=stringval') - .reply(200, { ok: true }); - - const r = client.apiCall('method', { foo: 'stringval' }); - return r.then((result) => { - scope.done(); - }); - }); - }); - - describe('apiCall() - when using static headers', function () { - it('should include static headers on api request', function () { - const client = new WebClient(token, { headers: { 'X-XYZ': 'value' } }); - const scope = nock('https://slack.com', { - reqheaders: { - 'X-XYZ': 'value' - } - }) - .post(/api/) - .reply(200, { ok: true }); - const r = client.apiCall('method'); - return r.then((result) => { - scope.done(); - }); - }); - it('should override Authorization header if passed as an option to apiCall()', function () { - const client = new WebClient(token, { headers: { 'X-XYZ': 'value' } }); - const scope = nock('https://slack.com', { - reqheaders: { - 'X-XYZ': 'value', - 'Authorization': 'Bearer xoxp-superfake' - } - }) - .post(/api/) - .reply(200, { ok: true }); - const r = client.apiCall('method', { token: 'xoxp-superfake' }); - return r.then((result) => { - scope.done(); - }); - }); - }); - - describe('named method aliases (facets)', function () { - beforeEach(function () { - this.client = new WebClient(token, { retryConfig: rapidRetryPolicy }); - }); - it('should properly mount methods as functions', function () { - // This test doesn't exhaustively check all the method aliases, it just tries a couple. - // This should be enough since all methods are mounted in the exact same way. - const scope = nock('https://slack.com') - .post('/api/chat.postMessage', 'foo=stringval') - .reply(200, { ok: true }) - // Trying this method because its mounted one layer "deeper" - .post('/api/team.profile.get') - .reply(200, { ok: true }); - return Promise.all([this.client.chat.postMessage({ foo: 'stringval' }), this.client.team.profile.get()]) - .then(() => { - scope.done(); - }); - }); - }) - - describe('paginate()', function () { - beforeEach(function () { - this.client = new WebClient(token, { retryConfig: rapidRetryPolicy }); - this.method = 'conversations.list'; - }); - - describe('when not given shouldStop predicate', function () { - it('should return an AsyncIterator', function () { - const iterator = this.client.paginate(this.method); - assert.isOk(iterator[Symbol.asyncIterator]); - }); - it('can iterate multiple pages', async function () { - const scope = nock('https://slack.com') - .post(/api/) - .reply(200, { ok: true, response_metadata: { next_cursor: 'CURSOR' } }) - .post(/api/, (body) => { - // NOTE: limit value is compared as a string because nock doesn't properly serialize the param into a number - return body.limit && body.limit === '200' && body.cursor && body.cursor === 'CURSOR'; - }) - .reply(200, { ok: true }); - const iterator = this.client.paginate(this.method); - - const { value: firstPage, done: firstDone } = await iterator.next(); - assert.isOk(firstPage); - assert.isFalse(firstDone); - const { value: secondPage, done: secondDone } = await iterator.next(); - assert.isOk(secondPage); - assert.isFalse(secondDone); - const { value: thirdPage, done: thirdDone } = await iterator.next(); - assert.isNotOk(thirdPage); - assert.isTrue(thirdDone); - - scope.done(); - }); - it('can iterate multiple pages with limit items per page', async function () { - const limit = 4; - const scope = nock('https://slack.com') - .post(/api/, (body) => { - // NOTE: limit value is compared as a string because nock doesn't properly serialize the param into a number - return body.limit && body.limit === limit.toString(); - }) - .reply(200, { ok: true, response_metadata: { next_cursor: 'CURSOR' } }) - .post(/api/, (body) => { - // NOTE: limit value is compared as a string because nock doesn't properly serialize the param into a number - return body.limit && body.limit === limit.toString() && body.cursor && body.cursor === 'CURSOR'; - }) - .reply(200, { ok: true }); - const iterator = this.client.paginate(this.method, { limit }); - - const { value: firstPage, done: firstDone } = await iterator.next(); - assert.isOk(firstPage); - assert.isFalse(firstDone); - const { value: secondPage, done: secondDone } = await iterator.next(); - assert.isOk(secondPage); - assert.isFalse(secondDone); - const { value: thirdPage, done: thirdDone } = await iterator.next(); - assert.isNotOk(thirdPage); - assert.isTrue(thirdDone); - - scope.done(); - }); - it('can resume iteration from a result with an existing cursor', async function () { - const cursor = 'PRE_CURSOR'; - const scope = nock('https://slack.com') - .post(/api/, (body) => { - return body.cursor && body.cursor === cursor; - }) - .reply(200, { ok: true, response_metadata: { next_cursor: 'CURSOR' } }) - .post(/api/, (body) => { - return body.cursor && body.cursor === 'CURSOR'; - }) - .reply(200, { ok: true }); - const iterator = this.client.paginate(this.method, { cursor }); - - const { value: firstPage, done: firstDone } = await iterator.next(); - assert.isOk(firstPage); - assert.isFalse(firstDone); - const { value: secondPage, done: secondDone } = await iterator.next(); - assert.isOk(secondPage); - assert.isFalse(secondDone); - const { value: thirdPage, done: thirdDone } = await iterator.next(); - assert.isNotOk(thirdPage); - assert.isTrue(thirdDone); - - scope.done(); - }); - }); - - describe('when given shouldStop predicate', function () { - it('should iterate until the end when shouldStop always returns false', async function () { - const scope = nock('https://slack.com') - .post(/api/) - .reply(200, { ok: true, response_metadata: { next_cursor: 'CURSOR' } }) - .post(/api/, (body) => { - // NOTE: limit value is compared as a string because nock doesn't properly serialize the param into a number - return body.limit && body.limit === '200' && body.cursor && body.cursor === 'CURSOR'; - }) - .reply(200, { ok: true }); - - const neverStop = sinon.fake.returns(false); - await this.client.paginate(this.method, {}, neverStop); - assert.equal(neverStop.callCount, 2); - - scope.done(); - }); - it('should only iterate once when shouldStop always returns true', async function () { - const scope = nock('https://slack.com') - .post(/api/) - .reply(200, { ok: true, response_metadata: { next_cursor: 'CURSOR' } }); - - const neverStop = sinon.fake.returns(true); - await this.client.paginate(this.method, {}, neverStop); - assert.equal(neverStop.callCount, 1); - - scope.done(); - }); - it('should iterate twice when shouldStop always returns false then true', async function () { - const scope = nock('https://slack.com') - .post(/api/) - .reply(200, { ok: true, response_metadata: { next_cursor: 'CURSOR_1' } }) - .post(/api/, (body) => { - return body.cursor && body.cursor === 'CURSOR_1'; - }) - .reply(200, { ok: true, response_metadata: { next_cursor: 'CURSOR_2' } }) - - const shouldStop = sinon.stub(); - shouldStop.onCall(0).returns(false); - shouldStop.onCall(1).returns(true); - await this.client.paginate(this.method, {}, shouldStop); - assert.equal(shouldStop.callCount, 2); - - scope.done(); - }); - - describe('when given a reduce function', function () { - it('should resolve for the accumulated value', async function () { - const scope = nock('https://slack.com') - .post(/api/) - .reply(200, { ok: true, v: 1, response_metadata: { next_cursor: 'CURSOR' } }) - .post(/api/, (body) => { - // NOTE: limit value is compared as a string because nock doesn't properly serialize the param into a number - return body.limit && body.limit === '200' && body.cursor && body.cursor === 'CURSOR'; - }) - .reply(200, { ok: true, v: 2 }); - - const sum = await this.client.paginate(this.method, {}, () => false, (acc, page) => { - if (acc === undefined) { - acc = 0; - } - if (page.v && typeof page.v === 'number') { - acc += page.v; - } - return acc; - }); - assert.equal(sum, 3); - - scope.done(); - }); - }); - }); - }); - - describe('has option to change slackApiUrl', function () { - it('should send requests to an alternative URL', function () { - const alternativeUrl = 'http://12.34.56.78/api/'; - const scope = nock(alternativeUrl) - .post(/api\/method/) - .reply(200, { ok: true }); - const client = new WebClient(token, { slackApiUrl: alternativeUrl }); - return client.apiCall('method'); - }); - }); - - describe('has an option to set a custom HTTP agent', function () { - it('should send a request using the custom agent', function () { - const agent = new Agent({ keepAlive: true }); - const spy = sinon.spy(agent, 'addRequest'); - const client = new WebClient(token, { agent, retryConfig: rapidRetryPolicy }); - return client.apiCall('method') - .catch(() => { - assert(spy.called); - }) - .then(() => { - agent.addRequest.restore(); - agent.destroy(); - }) - .catch((error) => { - agent.addRequest.restore(); - agent.destroy(); - throw error; - }); - }); - }); - - describe('has an option to set request concurrency', function () { - // TODO: factor out common logic into test helpers - const responseDelay = 100; // ms - - beforeEach(function () { - const self = this; - self.testStart = Date.now(); - self.scope = nock('https://slack.com') - .persist() - .post(/api/) - .delay(responseDelay) - .reply(function (uri, requestBody) { - // NOTE: the assumption is that this function gets called right away when the request body is available, - // not after the delay - const diff = Date.now() - self.testStart; - return [200, JSON.stringify({ ok: true, diff })]; - }); - }); - - it('should have a default conncurrency of 100', function () { - const client = new WebClient(token); - const requests = []; - for (let i = 0; i < 101; i++) { - requests.push(client.apiCall(`${i}`)); - } - return Promise.all(requests) - .then((responses) => { - // verify all responses are present - assert.lengthOf(responses, 101); - - // verify that maxRequestConcurrency requests were all sent concurrently - const concurrentResponses = responses.slice(0, 100); // the first 100 responses - concurrentResponses.forEach((r) => assert.isBelow(r.diff, responseDelay)); - - // verify that any requests after maxRequestConcurrency were delayed by the responseDelay - const queuedResponses = responses.slice(100); - const minDiff = concurrentResponses[concurrentResponses.length - 1].diff + responseDelay; - queuedResponses.forEach((r) => assert.isAtLeast(r.diff, minDiff)); - }); - }); - - it('should allow concurrency to be set', function () { - const client = new WebClient(token, { maxRequestConcurrency: 1 }); - const requests = [client.apiCall('1'), client.apiCall('2')]; - return Promise.all(requests) - .then((responses) => { - // verify all responses are present - assert.lengthOf(responses, 2); - - // verify that maxRequestConcurrency requets were all sent concurrently - const concurrentResponses = responses.slice(0, 1); // the first response - concurrentResponses.forEach((r) => assert.isBelow(r.diff, responseDelay)); - - // verify that any requests after maxRequestConcurrency were delayed by the responseDelay - const queuedResponses = responses.slice(1);// the second response - const minDiff = concurrentResponses[concurrentResponses.length - 1].diff + responseDelay; - queuedResponses.forEach((r) => { assert.isAtLeast(r.diff, minDiff) }); - }); - }); - - afterEach(function () { - this.scope.persist(false); - }); - }); - - describe('has an option to set the retry policy ', function () { - it('retries a request which fails to get a response', function () { - const scope = nock('https://slack.com') - .post(/api/) - .replyWithError('could be a ECONNREFUSED, ENOTFOUND, ETIMEDOUT, ECONNRESET') - .post(/api/) - .reply(200, { ok: true }); - const client = new WebClient(token, { retryConfig: rapidRetryPolicy }); - return client.apiCall('method') - .then((resp) => { - assert.propertyVal(resp, 'ok', true); - scope.done(); - }); - }); - it('retries a request whose response has a status code that is not 200 nor 429 (rate limited)', function () { - const scope = nock('https://slack.com') - .post(/api/) - .reply(500) - .post(/api/) - .reply(200, { ok: true }); - const client = new WebClient(token, { retryConfig: rapidRetryPolicy }); - return client.apiCall('method') - .then((resp) => { - assert.propertyVal(resp, 'ok', true); - scope.done(); - }); - }); - }); - - describe('has rate limit handling', function () { - describe('when configured to reject rate-limited calls', function () { - beforeEach(function () { - this.client = new WebClient(token, { rejectRateLimitedCalls: true }); - }); - - it('should reject with a WebAPIRateLimitedError when a request fails due to rate-limiting', function (done) { - const retryAfter = 5; - const scope = nock('https://slack.com') - .post(/api/) - .reply(429, '', { 'retry-after': retryAfter }); - this.client.apiCall('method') - .catch((error) => { - assert.instanceOf(error, Error); - assert.equal(error.code, ErrorCode.RateLimitedError); - assert.equal(error.retryAfter, retryAfter); - scope.done(); - done(); - }); - }); - - it('should emit a rate_limited event on the client', function (done) { - const spy = sinon.spy(); - const scope = nock('https://slack.com') - .post(/api/) - .reply(429, {}, { 'retry-after': 0 }); - const client = new WebClient(token, { rejectRateLimitedCalls: true }); - client.on('rate_limited', spy); - client.apiCall('method', { foo: 'bar' }) - .catch((err) => { - assert(spy.calledOnceWith(0, sinon.match({ url: 'method', body: { foo: 'bar' } }))) - scope.done(); - done(); - }); - }); - }); - - it('should automatically retry the request after the specified timeout', function () { - const retryAfter = 1; - const scope = nock('https://slack.com') - .post(/api/) - .reply(429, '', { 'retry-after': retryAfter }) - .post(/api/) - .reply(200, { ok: true }); - const client = new WebClient(token, { retryConfig: rapidRetryPolicy }); - const startTime = Date.now(); - return client.apiCall('method') - .then(() => { - const diff = Date.now() - startTime; - assert.isAtLeast(diff, retryAfter * 1000, 'elapsed time is at least a second'); - scope.done(); - }); - }); - - it('should include retryAfter metadata if the response has retry info', function () { - const scope = nock('https://slack.com') - .post(/api/) - .reply(200, { ok: true }, { 'retry-after': 100 }); - const client = new WebClient(token); - return client.apiCall('method') - .then((data) => { - assert(data.response_metadata.retryAfter === 100); - scope.done(); - }); - }); - - it('should pause the remaining requests in queue', function () { - const startTime = Date.now(); - const retryAfter = 1; - const scope = nock('https://slack.com') - .post(/api/) - .reply(429, '', { 'retry-after': retryAfter }) - .post(/api/) - .reply(200, function (uri, requestBody) { - return JSON.stringify({ ok: true, diff: Date.now() - startTime }); - }) - .post(/api/) - .reply(200, function (uri, requestBody) { - return JSON.stringify({ ok: true, diff: Date.now() - startTime }); - }); - const client = new WebClient(token, { retryConfig: rapidRetryPolicy, maxRequestConcurrency: 1 }); - const firstCall = client.apiCall('method'); - const secondCall = client.apiCall('method'); - return Promise.all([firstCall, secondCall]) - .then(([firstResult, secondResult]) => { - assert.isAtLeast(firstResult.diff, retryAfter * 1000); - assert.isAtLeast(secondResult.diff, retryAfter * 1000); - scope.done(); - }); - }); - - it('should emit a rate_limited event on the client', function (done) { - const spy = sinon.spy(); - const scope = nock('https://slack.com') - .post(/api/) - .reply(429, {}, { 'retry-after': 0 }); - const client = new WebClient(token, { retryConfig: { retries: 0 } }); - client.on('rate_limited', spy); - client.apiCall('method', { foo: 'bar' }) - .catch((err) => { - assert(spy.calledOnceWith(0, sinon.match({ url: 'method', body: { foo: 'bar' } }))) - scope.done(); - done(); - }); - }); - }); - - it('should throw an error if the response has no retry info', function (done) { - const scope = nock('https://slack.com') - .post(/api/) - .reply(429, {}, { 'retry-after': undefined }); - const client = new WebClient(token); - client.apiCall('method') - .catch((err) => { - assert.instanceOf(err, Error); - scope.done(); - done(); - }); - }); - - it('should throw an error if the response has an invalid retry-after header', function (done) { - const scope = nock('https://slack.com') - .post(/api/) - .reply(429, {}, { 'retry-after': 'notanumber' }); - const client = new WebClient(token); - client.apiCall('method') - .catch((err) => { - assert.instanceOf(err, Error); - assert.include(err.message, 'retry-after header: notanumber', 'Raw retry-after header value included in error'); - scope.done(); - done(); - }); - }); - - describe('admin.inviteRequests.* APIs', function () { - const client = new WebClient(token); - - beforeEach(function() { - this.scope = nock('https://slack.com') - .post(/api/) - .reply(200, function (_uri, body) { - return { ok: true, body: body }; - }); - }); - - it('properly serializes arguments to admin.inviteRequests.approve', async function () { - const res = await client.admin.inviteRequests.approve({ team_id: 'T123', invite_request_id: 'I123' }); - assert.equal(res.body, 'team_id=T123&invite_request_id=I123'); - this.scope.done(); - }); - it('properly serializes arguments to admin.inviteRequests.deny', async function () { - const res = await client.admin.inviteRequests.deny({ team_id: 'T123', invite_request_id: 'I123' }); - assert.equal(res.body, 'team_id=T123&invite_request_id=I123'); - this.scope.done(); - }); - it('properly serializes arguments to admin.inviteRequests.list', async function () { - const res = await client.admin.inviteRequests.list({ team_id: 'T123', limit: 10, cursor: 'position' }); - assert.equal(res.body, 'team_id=T123&limit=10&cursor=position'); - this.scope.done(); - }); - it('properly serializes arguments to admin.inviteRequests.approved.list', async function () { - const res = await client.admin.inviteRequests.approved.list({ team_id: 'T123', limit: 10, cursor: 'position' }); - assert.equal(res.body, 'team_id=T123&limit=10&cursor=position'); - this.scope.done(); - }); - it('properly serializes arguments to admin.inviteRequests.denied.list', async function () { - const res = await client.admin.inviteRequests.denied.list({ team_id: 'T123', limit: 10, cursor: 'position' }); - assert.equal(res.body, 'team_id=T123&limit=10&cursor=position'); - this.scope.done(); - }); - }); - - describe('admin.usergroups.* APIs', function () { - const client = new WebClient(token); - - beforeEach(function() { - this.scope = nock('https://slack.com') - .post(/api/) - .reply(200, function (_uri, body) { - return { ok: true, body: body }; - }); - }); - - it('properly serializes string of comma-separated channel_ids argument to admin.usergroups.addChannels', async function () { - const res = await client.admin.usergroups.addChannels({ team_id: 'T123', usergroup_id: 'S123', channel_ids: 'C123,C234' }); - assert.equal(res.body, 'team_id=T123&usergroup_id=S123&channel_ids=C123%2CC234'); - this.scope.done(); - }); - it('properly serializes array of channel_ids argument to admin.usergroups.addChannels', async function () { - const res = await client.admin.usergroups.addChannels({ team_id: 'T123', usergroup_id: 'S123', channel_ids: ['C123','C234'] }); // URL encoded "['C123','C234']" - assert.equal(res.body, 'team_id=T123&usergroup_id=S123&channel_ids=%5B%22C123%22%2C%22C234%22%5D'); - this.scope.done(); - }); - it('properly serializes arguments to admin.usergroups.listChannels', async function () { - const res = await client.admin.usergroups.listChannels({ team_id: 'T123', include_num_members: true, usergroup_id: 'S123' }); - assert.equal(res.body, 'team_id=T123&include_num_members=true&usergroup_id=S123'); - this.scope.done(); - }); - it('properly serializes string of comma-separated channel_ids argument to admin.usergroups.removeChannels', async function () { - const res = await client.admin.usergroups.removeChannels({ usergroup_id: 'S123', channel_ids: 'C123,C234' }); - assert.equal(res.body, 'usergroup_id=S123&channel_ids=C123%2CC234'); // URL encoded "C123,C234" - this.scope.done(); - }); - it('properly serializes array of channel_ids argument to admin.usergroups.removeChannels', async function () { - const res = await client.admin.usergroups.removeChannels({ usergroup_id: 'S123', channel_ids: ['C123','C234'] }); - assert.equal(res.body, 'usergroup_id=S123&channel_ids=%5B%22C123%22%2C%22C234%22%5D'); // URL encoded "['C123','C234']" - this.scope.done(); - }); - }); - - describe('apps.event.authorizations.list API', function () { - it('should not send the token in the body if token is passed as a method argument', function () { - const client = new WebClient(); - const scope = nock('https://slack.com') - .post(/api/) - .reply(200, (_uri, body) => { - assert.notInclude(body, token); - console.log('body is', body); - return { ok: true } - }); - return client.apps.event.authorizations.list({ - token, - }) - .then(() => { - scope.done(); - }); - }); - it('should not send the token in the body if token passed as client constructor', function () { - const client = new WebClient(token); - const scope = nock('https://slack.com') - .post(/api/) - .reply(200, (_uri, body) => { - assert.notInclude(body, token); - return { ok: true } - }); - return client.apps.event.authorizations.list({ - }) - .then(() => { - scope.done(); - }); - }); - }); - - describe('getAllFileUploads', () => { - const client = new WebClient(token); - it('adds a single file data to uploads with content supplied', async () => { - const testWithContent = { - content: 'Happiness!', // test string - filename: 'happiness.txt', - title: 'Testing Happiness', - channels: 'C1234', - }; - - // returns exactly one file upload - const res = await client.getAllFileUploads(testWithContent); - assert.equal(res.length, 1); - }); - it('adds a single file data to uploads with file supplied', async () => { - const testWithFile = { - file: './test/fixtures/test-txt.txt', // test string - filename: 'test.txt', - title: 'Test file', - channels: 'C1234', - }; - - const res = await client.getAllFileUploads(testWithFile); - assert.equal(res.length, 1); - }); - it('adds multiple files data to an upload', async () => { - const files = ['txt', 'jpg', 'svg', 'png']; - const fileUploads = files.map((ext) => { - const filename = `test-${ext}.${ext}`; - return { - file: fs.createReadStream(`./test/fixtures/${filename}`), - filename - } - }); - const entryWithFileUploads = { - channel_id: 'C1234', - initial_comment: `Here is a single comment wit many files attached`, - title: `Many files`, - file_uploads: fileUploads, - }; - // 4 entries added - const res = await client.getAllFileUploads(entryWithFileUploads); - assert.equal(res.length, 4); - - // check the filename of each entry matches - files.forEach((ext, idx) => { - const filename = `test-${ext}.${ext}`; - assert.equal(res[idx].filename, filename); - }); - }); - it('adds single and multiple files data to uploads', async () => { - const files = ['txt', 'jpg', 'svg', 'png']; - const fileUploads = files.map((ext) => { - const filename = `test-${ext}.${ext}`; - return { - file: fs.createReadStream(`./test/fixtures/${filename}`), - filename - } - }); - const entryWithFileUploadsAndSingleFile = { - file_uploads: fileUploads, - file: './test/fixtures/test-txt.txt', // test string - filename: 'test.txt', - title: 'Test file', - channels: 'C1234', - }; - // 1 entry at the top level + 4 jobs from files in files_uploads - const res = await client.getAllFileUploads(entryWithFileUploadsAndSingleFile); - assert.equal(res.length, 5); - }); - it('handles multiple files with a single channel_id, initial_comment and/or thread_ts', async () => { - const validPattern = { - initial_comment: 'Here are the files!', - thread_ts: '1223313423434.131321', - channel_id: 'C123', - file_uploads: [ - { - file: './test/fixtures/test-txt.txt', - filename: 'test-txt.txt', - }, - { - file: './test/fixtures/test-png.png', - filename: 'test-png.png', - }, - ], - }; - const invalidPattern = { - file_uploads: [ - { - file: './test/fixtures/test-txt.txt', - filename: 'test-txt.txt', - initial_comment: 'Here are the files!', - thread_ts: '1223313423434.131321', - channel_id: 'C123', - }, - { - file: './test/fixtures/test-png.png', - filename: 'test-png.png', - initial_comment: 'Here are the files!', - thread_ts: '1223313423434.131321', - channel_id: 'C123', - }, - ], - }; - // in this case the two file uploads should be sent along with a single - // message corresponding to initial_comment - const res = await client.getAllFileUploads(validPattern); - res.forEach((entry) => { - assert.equal(entry.initial_comment, validPattern.initial_comment); - assert.equal(entry.thread_ts, validPattern.thread_ts); - assert.equal(entry.channel_id, validPattern.channel_id); - }); - - // in this case, there should be an error - try { - const res2 = await client.getAllFileUploads(invalidPattern); - assert.fail('Should have thrown an error for invalid arguments but didnt'); - } catch (error) { - assert.equal(error.message, buildInvalidFilesUploadParamError()); - } - }); - }); - - describe('fetchAllUploadURLExternal', () => { - let client; - beforeEach(() => { - client = new WebClient(token); - }); - afterEach(() => { - client = null; - }); - it('makes calls to files.getUploadURLExternal for each fileUpload', async () => { - const testFileUploads = [{ - channel_id: 'C1234', - filename: 'test-txt.txt', - initial_comment: 'Doo ba doo here is the: test-txt.txt', - title: 'Spaghetti test-txt.txt', - data: Buffer.from('Here is a txt file'), - length: 18, - }]; - - var spy = sinon.spy(); - client.files.getUploadURLExternal = spy; - await client.fetchAllUploadURLExternal(testFileUploads); - assert.isTrue(spy.calledOnce); - }); - it('honours overriden token provided as an argument', async () => { - const tokenOverride = 'overriden-token'; - const testFileUploads = [{ - channel_id: 'C1234', - filename: 'test-txt.txt', - initial_comment: 'Doo ba doo here is the: test-txt.txt', - title: 'Spaghetti test-txt.txt', - data: Buffer.from('Here is a txt file'), - length: 18, - token: tokenOverride, - }]; - - var spy = sinon.spy(); - client.files.getUploadURLExternal = spy; - await client.fetchAllUploadURLExternal(testFileUploads); - assert.isTrue(spy.calledWith(sinon.match({ token: tokenOverride })), 'token override not passed through to underlying `files.getUploadURLExternal` API method'); - }); - }); - - describe('completeFileUploads', () => { - let client; - beforeEach(() => { - client = new WebClient(token); - }); - afterEach(() => { - client = null; - }); - it('rejects with an error when missing required file id', async () => { - const invalidTestFileUploadsToComplete = [{ - channel_id: 'C1234', - // missing file_id field - filename: 'test-txt.txt', - initial_comment: 'Doo ba doo here is the: test-txt.txt', - title: 'Spaghetti test-txt.txt', - }]; - - // should reject because of missing file_id - try { - const res = await client.completeFileUploads(invalidTestFileUploadsToComplete); - assert.fail('Should have errored but did not'); - } catch (err) { - assert.equal(err.message, 'Missing required file id for file upload completion'); - } - - }); - it('makes calls to files.completeUploadExternal for each fileUpload', async () => { - const testFileUploadsToComplete = [{ - channel_id: 'C1234', - file_id: 'test', - filename: 'test-txt.txt', - initial_comment: 'Doo ba doo here is the: test-txt.txt', - title: 'Spaghetti test-txt.txt', - }]; - - var spy = sinon.spy(); - client.files.completeUploadExternal = spy; - await client.completeFileUploads(testFileUploadsToComplete); - assert.isTrue(spy.calledOnce); - }); - it('honours overriden token provided as an argument', async () => { - const tokenOverride = 'overriden-token'; - const testFileUploadsToComplete = [{ - channel_id: 'C1234', - file_id: 'test', - filename: 'test-txt.txt', - initial_comment: 'Doo ba doo here is the: test-txt.txt', - title: 'Spaghetti test-txt.txt', - token: tokenOverride, - }]; - - var spy = sinon.spy(); - client.files.completeUploadExternal = spy; - await client.completeFileUploads(testFileUploadsToComplete); - assert.isTrue(spy.calledWith(sinon.match({ token: tokenOverride })), 'token override not passed through to underlying `files.completeUploadExternal` API method'); - }); - }); - - describe('postFileUploadsToExternalURL', () => { - const client = new WebClient(token); - - it('rejects with an error when missing required upload_url', async () => { - const invalidTestFileUploadsToComplete = [{ - channel_id: 'C1234', - // missing upload_url field - filename: 'test-txt.txt', - initial_comment: 'Doo ba doo here is the: test-txt.txt', - title: 'Spaghetti test-txt.txt', - }]; - - // should reject because of missing upload_url - try { - const res = await client.postFileUploadsToExternalURL(invalidTestFileUploadsToComplete); - assert.fail('Should have rejected with an error but did not'); - } catch (error) { - assert.equal(error.message.startsWith('No upload url found for file'), true); - } - }); - }); - - describe('getFileInfo', () => { - const client = new WebClient(token); - client.getAllFileUploads = sinon.spy(); - client.completeFileUploads = sinon.spy(); - client.fetchAllUploadURLExternal = sinon.spy(() => { - return []; - }); - client.postFileUploadsToExternalURL = sinon.spy(() => { - return [{ - files: [{ id: 'F123', title: 'test.txt'}], - }] - }); - - // since v7, the behavior has been changed - it('is not called when request_file_info is true or undefined', async () => { - client.getFileInfo = sinon.spy(); - // set initial files upload arguments with request_file_info true - const withRequestFileInfoTrue = { - file: Buffer.from('test'), - filename: 'test.txt', - request_file_info: true, - }; - await client.filesUploadV2(withRequestFileInfoTrue); - // since v7, the behavior has been changed - assert.equal(client.getFileInfo.called, false); - - const withRequestFileInfoOmitted = { - file: Buffer.from('test'), - filename: 'test.txt', - } - await client.filesUploadV2(withRequestFileInfoOmitted); - // since v7, the behavior has been changed - assert.equal(client.getFileInfo.calledTwice, false); - }); - it('is not called when request_file_info is set as false', async () => { - client.getFileInfo = sinon.spy(); - const withRequestFileInfoFalse = { - file: Buffer.from('test'), - filename: 'test.txt', - request_file_info: false, - }; - await client.filesUploadV2(withRequestFileInfoFalse); - assert.equal(client.getFileInfo.called, false); - }); - }); - - describe('has an option to suppress request error from Axios', () => { - - beforeEach(function () { - this.scope = nock('https://slack.com') - .post(/api/) - .replyWithError('Request failed!!') - }) - - it('the \'original\' property is attached when the option, attachOriginalToWebAPIRequestError is absent', async () => { - const client = new WebClient(token, { - retryConfig: { retries: 0 }, - }); - - client.apiCall('conversations/list').catch((error) => { - expect(error).to.haveOwnProperty('original') - this.scope.done(); - done(); - }); - - }); - - it('the \'original\' property is attached when the option, attachOriginalToWebAPIRequestError is set to true', async () => { - const client = new WebClient(token, { - attachOriginalToWebAPIRequestError: true, - retryConfig: { retries: 0 }, - }); - - client.apiCall('conversations/list').catch((error) => { - expect(error).to.haveOwnProperty('original') - this.scope.done(); - done(); - }); - }); - - it('the \'original\' property is not attached when the option, attachOriginalToWebAPIRequestError is set to false', async () => { - const client = new WebClient(token, { - attachOriginalToWebAPIRequestError: false, - retryConfig: { retries: 0 }, - }); - - client.apiCall('conversations/list').catch((error) => { - expect(error).not.to.haveOwnProperty('original') - this.scope.done(); - done(); - }); - }); - }); - - afterEach(function () { - nock.cleanAll(); - }); -}); - -// Helpers -function parseUserAgentIntoMetadata(userAgent) { - // naive implementation, this might break on platforms whose names or version numbers have spaces or slashes in them, - // and that if app metadata keys or values have spaces or slashes in them. - const parts = userAgent.split(' '); - return parts.reduce((digest, part) => { - const [key, val] = part.split('/'); - digest[key] = val; - return digest; - }, {}); -} diff --git a/packages/web-api/src/WebClient.spec.ts b/packages/web-api/src/WebClient.spec.ts new file mode 100644 index 000000000..03a4165c1 --- /dev/null +++ b/packages/web-api/src/WebClient.spec.ts @@ -0,0 +1,1350 @@ +import fs from 'node:fs'; +import { assert, expect } from 'chai'; +import nock from 'nock'; +import sinon from 'sinon'; +import { type WebAPICallResult, WebClient, WebClientEvent, buildThreadTsWarningMessage } from './WebClient'; +import { ErrorCode, type WebAPIRequestError } from './errors'; +import { + buildGeneralFilesUploadWarning, + buildInvalidFilesUploadParamError, + buildLegacyMethodWarning, +} from './file-upload'; +import { addAppMetadata } from './instrument'; +import { LogLevel, type Logger } from './logger'; +import { rapidRetryPolicy } from './retry-policies'; + +const token = 'xoxb-faketoken'; + +describe('WebClient', () => { + const sandbox = sinon.createSandbox(); + let debugMock: sinon.SinonStub; + let logger: Logger; + let client: WebClient; + + beforeEach(() => { + debugMock = sandbox.stub(console, 'debug'); + logger = { + debug: sinon.spy(), + info: sinon.spy(), + warn: sinon.spy(), + error: sinon.spy(), + getLevel: sinon.spy(), + setLevel: sinon.spy(), + setName: sinon.spy(), + }; + }); + + afterEach(() => { + sandbox.restore(); + nock.cleanAll(); + }); + + describe('constructor()', () => { + it('should build a default client given a token', () => { + const client = new WebClient(token); + assert.instanceOf(client, WebClient); + assert.equal(client.token, token); + assert.equal(client.slackApiUrl, 'https://slack.com/api/'); + }); + + it('should build a client without a token', () => { + const client = new WebClient(); + assert.instanceOf(client, WebClient); + }); + }); + + describe('Methods superclass', () => { + it('should succeed when constructing WebClient', () => { + assert.doesNotThrow(() => { + new WebClient(); + }); + }); + + it('should succeed when constructing a class that extends WebClient', () => { + assert.doesNotThrow(() => { + class X extends WebClient {} + new X(); + }); + }); + }); + + describe('has an option to change the log output severity', () => { + it('outputs a debug log on initialization', () => { + new WebClient(token, { logLevel: LogLevel.DEBUG }); + const output = debugMock.getCalls()[0].args.join(' '); + assert.isNotEmpty(output); // should have at least 1 log line, but not asserting since that is an implementation detail + }); + }); + + describe('has a logger option', () => { + it('sends logs to a logger and not to stdout', () => { + new WebClient(token, { logLevel: LogLevel.DEBUG, logger }); + assert.isTrue((logger.debug as sinon.SinonStub).called); + assert.isEmpty(debugMock.getCalls()); + }); + it('never modifies the original logger', () => { + new WebClient(token, { logger }); + // Calling #setName of the given logger is destructive + assert.isFalse((logger.setName as sinon.SinonStub).called); + }); + }); + + describe('has an option to override the Axios timeout value', () => { + it('should log warning and throw error if timeout exceeded', async () => { + const timeoutOverride = 1; // ms, guaranteed failure + + const client = new WebClient(undefined, { + timeout: timeoutOverride, + retryConfig: { retries: 0 }, + logLevel: LogLevel.WARN, + logger, + }); + + try { + await client.apiCall('users.list'); + assert.fail('expected error to be thrown'); + } catch (e) { + // biome-ignore lint/suspicious/noExplicitAny: TODO: type this better, should be whatever error class web-api throws for timeouts + const error = e as any; + assert.isTrue((logger.warn as sinon.SinonStub).calledOnce, 'expected Logger to be called once'); + assert.equal(error.code, ErrorCode.RequestError); + assert.equal(error.original.config.timeout, timeoutOverride); + assert.equal(error.original.isAxiosError, true); + assert.instanceOf(error, Error); + } + }); + }); + + describe('apiCall()', () => { + beforeEach(() => { + client = new WebClient(token, { retryConfig: rapidRetryPolicy }); + }); + + describe('when making a successful call', () => { + let scope: nock.Scope; + beforeEach(() => { + scope = nock('https://slack.com') + .post(/api/) + .reply(200, { + ok: true, + response_metadata: { + warnings: ['testWarning1', 'testWarning2'], + messages: [ + '[ERROR] unsupported type: sections [json-pointer:/blocks/0/type]', + "[WARN] A Content-Type HTTP header was presented but did not declare a charset, such as a 'utf-8'", + ], + }, + }); + }); + + it('should return results in a Promise', async () => { + const result = await client.apiCall('method'); + assert(result.ok); + scope.done(); + }); + + it('should send warnings to logs from both response_metadata.warnings & response_metadata.messages', async () => { + const warnClient = new WebClient(token, { logLevel: LogLevel.WARN, logger }); + await warnClient.apiCall('method'); + assert.isTrue((logger.warn as sinon.SinonStub).calledThrice); + }); + + it('should send response_metadata.messages errors to logs', async () => { + const errorClient = new WebClient(token, { logLevel: LogLevel.ERROR, logger }); + await errorClient.apiCall('method'); + assert.isTrue((logger.error as sinon.SinonStub).calledOnce); + }); + + type MethodArgs = { method: string; args: Record }; + const attachmentWarningTestPatterns: MethodArgs[] = [ + { method: 'chat.postMessage', args: { channel: 'C123', attachments: [{ blocks: [] }] } }, + { method: 'chat.postMessage', args: { channel: 'C123', attachments: [{ blocks: [], fallback: ' ' }] } }, + ]; + const textWarningTestPatterns: MethodArgs[] = [ + { method: 'chat.postEphemeral', args: { channel: 'C123', blocks: [] } }, + { method: 'chat.postMessage', args: { channel: 'C123', blocks: [] } }, + { method: 'chat.scheduleMessage', args: { channel: 'C123', post_at: '100000000', blocks: [] } }, + ]; + const warningTestPatterns = textWarningTestPatterns.concat(attachmentWarningTestPatterns); + + const attachPatterns = attachmentWarningTestPatterns.reduce((acc, { method, args }) => { + const attachmentPatterns = [{ fallback: 'fallback' }].map((attachmentOverrides) => { + const attachments = (args.attachments as Record[]).map((attachment) => { + return Object.assign({}, attachment, attachmentOverrides); + }); + return { method, args: Object.assign({}, args, { attachments }) }; + }); + + return acc.concat(attachmentPatterns); + }, [] as MethodArgs[]); + for (const { method, args } of attachPatterns) { + it(`should not send warning to logs when client executes ${method} without text but with attachment fallback argument`, async () => { + const warnClient = new WebClient(token, { logLevel: LogLevel.WARN, logger }); + await warnClient.apiCall(method, args); + assert.equal((logger.warn as sinon.SinonStub).callCount, 3); + }); + } + + const warningPatterns = warningTestPatterns.reduce((acc, { method, args }) => { + const textPatterns = [{ text: 'text' }].map((v) => ({ method, args: Object.assign({}, v, args) })); + return acc.concat(textPatterns); + }, [] as MethodArgs[]); + for (const { method, args } of warningPatterns) { + it(`should not send warning to logs when client executes ${method} with text argument`, async () => { + const warnClient = new WebClient(token, { logLevel: LogLevel.WARN, logger }); + await warnClient.apiCall(method, args); + assert.isTrue((logger.warn as sinon.SinonStub).calledThrice); + }); + } + + const textPatterns = textWarningTestPatterns.reduce((acc, { method, args }) => { + const textPatterns = [{ text: '' }, { text: null }, {}].map((v) => ({ + method, + args: Object.assign({}, v, args), + })); + return acc.concat(textPatterns); + }, [] as MethodArgs[]); + for (const { method, args } of textPatterns) { + it(`should send a text-argument-specific warning to logs when client executes ${method} without text argument(${args.text === '' ? 'empty' : args.text})`, async () => { + const warnClient = new WebClient(token, { logLevel: LogLevel.WARN, logger }); + await warnClient.apiCall(method, args); + assert.equal((logger.warn as sinon.SinonStub).callCount, 4); + }); + } + + const attachWarnPatterns = attachmentWarningTestPatterns.reduce((acc, { method, args }) => { + const textPatterns = [{ text: '' }, { text: null }, {}].map((v) => ({ + method, + args: Object.assign({}, v, args), + })); + return acc.concat(textPatterns); + }, [] as MethodArgs[]); + for (const { method, args } of attachWarnPatterns) { + it(`should send both text and fallback-argument-specific warning to logs when client executes ${method} without text argument(${args.text === '' ? 'empty' : args.text}) nor without attachment-level fallback argument`, async () => { + const warnClient = new WebClient(token, { logLevel: LogLevel.WARN, logger }); + await warnClient.apiCall(method, args); + assert.equal((logger.warn as sinon.SinonStub).callCount, 5); + }); + } + + const threadTsTestPatterns = [ + { method: 'chat.postEphemeral' }, + { method: 'chat.postMessage' }, + { method: 'chat.scheduleMessage' }, + { method: 'files.upload' }, + ]; + + const threadPatterns = threadTsTestPatterns.reduce((acc, { method }) => { + const threadTs = [{ thread_ts: 1503435956.000247, text: 'text' }].map((v) => ({ + method, + args: v, + })); + return acc.concat(threadTs); + }, [] as MethodArgs[]); + for (const { method, args } of threadPatterns) { + it(`should send warning to logs when thread_ts in ${method} arguments is a float`, async () => { + const warnClient = new WebClient(token, { logLevel: LogLevel.WARN, logger }); + await warnClient.apiCall(method, args); + // assume no warning about thread_ts has been sent + let warnedAboutThreadTS = false; + + // for each of the calls made of this method's spy function + const spyCalls = (logger.warn as sinon.SinonStub).getCalls(); + for (const call of spyCalls) { + // determine whether it was called with the correct warning as arguments + if (call.args[0] === buildThreadTsWarningMessage(method)) { + warnedAboutThreadTS = true; + break; + } + } + if (!warnedAboutThreadTS) { + assert.fail(`Expected a warning when thread_ts in ${method} is a float but got none`); + } + }); + } + + const threadTsPatterns = threadTsTestPatterns.reduce((acc, { method }) => { + const threadTs = [{ thread_ts: '1503435956.000247', text: 'text' }].map((v) => ({ + method, + args: v, + })); + return acc.concat(threadTs); + }, [] as MethodArgs[]); + for (const { method, args } of threadTsPatterns) { + it(`should not send warning to logs when thread_ts in ${method} arguments is a string`, async () => { + const warnClient = new WebClient(token, { logLevel: LogLevel.WARN, logger }); + await warnClient.apiCall(method, args); + for (const call of (logger.warn as sinon.SinonStub).getCalls()) { + assert.notEqual(call.args[0], buildThreadTsWarningMessage(method)); + } + }); + } + + it('warns when user is accessing the files.upload (legacy) method', async () => { + const client = new WebClient(token, { logLevel: LogLevel.INFO, logger }); + await client.apiCall('files.upload', {}); + + // both must be true to pass this test + let warnedAboutLegacyFilesUpload = false; + let infoAboutRecommendedFilesUploadV2 = false; + + // check the warn spy for whether it was called with the correct warning + for (const call of (logger.warn as sinon.SinonStub).getCalls()) { + if (call.args[0] === buildLegacyMethodWarning('files.upload')) { + warnedAboutLegacyFilesUpload = true; + } + } + // check the info spy for whether it was called with the correct warning + for (const call of (logger.info as sinon.SinonStub).getCalls()) { + if (call.args[0] === buildGeneralFilesUploadWarning()) { + infoAboutRecommendedFilesUploadV2 = true; + } + } + if (!warnedAboutLegacyFilesUpload || !infoAboutRecommendedFilesUploadV2) { + assert.fail('Should have logged a warning and info when files.upload is used'); + } + }); + }); + + describe('with OAuth scopes in the response headers', () => { + it('should expose a scopes and acceptedScopes properties on the result', async () => { + const scope = nock('https://slack.com').post(/api/).reply( + 200, + { ok: true }, + { + 'X-OAuth-Scopes': 'files:read, chat:write:bot', + 'X-Accepted-OAuth-Scopes': 'files:read', + }, + ); + const result = await client.apiCall('method'); + assert.deepNestedInclude(result.response_metadata, { scopes: ['files:read', 'chat:write:bot'] }); + assert.deepNestedInclude(result.response_metadata, { acceptedScopes: ['files:read'] }); + scope.done(); + }); + }); + + describe('when called with bad options', () => { + it('should reject its Promise with TypeError', async () => { + const results = await Promise.allSettled([ + // @ts-expect-error: api client should be passed an object + client.apiCall('method', 4), + // @ts-expect-error: api client should be passed an object + client.apiCall('method', 'a string'), + // @ts-expect-error: api client should be passed an object + client.apiCall('method', false), + ]); + for (const result of results) { + if (result.status === 'fulfilled') { + assert.fail('unexpected fulfilled promise when using API client with invalid arguments'); + } else { + assert.instanceOf(result.reason, TypeError); + } + } + }); + }); + + describe('when an API call fails', () => { + it('should return a Promise which rejects on error', async () => { + const client = new WebClient(undefined, { retryConfig: { retries: 0 } }); + + const scope = nock('https://slack.com').post(/api/).reply(500); + + try { + await client.apiCall('method'); + assert.fail('expected error to be thrown'); + } catch (error) { + assert.instanceOf(error, Error); + scope.done(); + } + }); + }); + + it('should fail with WebAPIPlatformError when the API response has an error', async () => { + const scope = nock('https://slack.com').post(/api/).reply(200, { ok: false, error: 'bad error' }); + try { + await client.apiCall('method'); + assert.fail('expected thrown exception'); + } catch (error) { + assert.instanceOf(error, Error); + assert.nestedPropertyVal(error, 'code', ErrorCode.PlatformError); + assert.nestedPropertyVal(error, 'data.ok', false); + assert.nestedPropertyVal(error, 'data.error', 'bad error'); + scope.done(); + } + }); + + it('should fail with WebAPIHTTPError when the API response has an unexpected status', async () => { + const body = { foo: 'bar' }; + const scope = nock('https://slack.com').post(/api/).reply(500, body); + const client = new WebClient(token, { retryConfig: { retries: 0 } }); + try { + await client.apiCall('method'); + assert.fail('expected error to be thrown'); + } catch (error) { + assert.nestedPropertyVal(error, 'code', ErrorCode.HTTPError); + assert.nestedPropertyVal(error, 'statusCode', 500); + // TODO: type this closer to the actual error we throw + const e = error as Record; + assert.exists(e.headers); + assert.deepEqual(e.body, body); + assert.instanceOf(error, Error); + scope.done(); + } + }); + + it('should fail with WebAPIRequestError when the API request fails', async () => { + // One known request error is when the node encounters an ECONNREFUSED. In order to simulate this, rather than + // using nock, we send the request to a host:port that is not listening. + const client = new WebClient(token, { slackApiUrl: 'https://localhost:8999/api/', retryConfig: { retries: 0 } }); + try { + await client.apiCall('method'); + assert.fail('expected error to be thrown'); + } catch (error) { + assert.nestedPropertyVal(error, 'code', ErrorCode.RequestError); + assert.instanceOf(error, Error); + assert.instanceOf((error as WebAPIRequestError).original, Error); + } + }); + + it('should properly serialize simple API arguments', async () => { + const scope = nock('https://slack.com') + // NOTE: this could create false negatives if the serialization order changes (it shouldn't matter) + .post(/api/, 'team_id=T12345678&foo=stringval&bar=42&baz=false') + .reply(200, { ok: true }); + await client.apiCall('method', { foo: 'stringval', bar: 42, baz: false, team_id: 'T12345678' }); + scope.done(); + }); + + it('should properly serialize complex API arguments', async () => { + const scope = nock('https://slack.com') + // NOTE: this could create false negatives if the serialization order changes (it shouldn't matter) + .post( + /api/, + 'arraything=%5B%7B%22foo%22%3A%22stringval%22%2C%22bar%22%3A42%2C%22baz%22%3Afalse%2C%22zup%22%3A%5B%22one%22%2C%22two%22%2C%22three%22%5D%7D%5D&objectthing=%7B%22foo%22%3A7%2C%22hum%22%3Afalse%7D', + ) + .reply(200, { ok: true }); + await client.apiCall('method', { + // TODO: include things like quotes and emojis + arraything: [ + { + foo: 'stringval', + bar: 42, + baz: false, + zup: ['one', 'two', 'three'], + }, + ], + objectthing: { + foo: 7, + hum: false, + }, + }); + scope.done(); + }); + + it('should remove undefined or null values from simple API arguments', async () => { + const scope = nock('https://slack.com').post(/api/, 'something=else').reply(200, { ok: true }); + await client.apiCall('method', { + something_undefined: undefined, + something_null: null, + something: 'else', + }); + scope.done(); + }); + + describe('metadata in the user agent', () => { + it('should set the user agent to contain package metadata', async () => { + const scope = nock('https://slack.com', { + reqheaders: { + 'User-Agent': (value) => { + const metadata = parseUserAgentIntoMetadata(value); + // NOTE: this assert isn't that strong and doesn't say anything about the values. at this time, there + // isn't a good way to test this without dupicating the logic of the code under test. + assert.containsAllKeys(metadata, ['node', '@slack:web-api']); + // NOTE: there's an assumption that if there's any keys besides these left at all, its the platform part + metadata.node = undefined; + metadata['@slack:client'] = undefined; + assert.isNotEmpty(metadata); + return true; + }, + }, + }) + .post(/api/) + .reply(200, { ok: true }); + await client.apiCall('method'); + scope.done(); + }); + + it('should set the user agent to contain application metadata', async () => { + const [name, version] = ['appmedataname', 'appmetadataversion']; + addAppMetadata({ name, version }); + const scope = nock('https://slack.com', { + reqheaders: { + 'User-Agent': (value) => { + const metadata = parseUserAgentIntoMetadata(value); + assert.propertyVal(metadata, name, version); + return true; + }, + }, + }) + .post(/api/) + .reply(200, { ok: true }); + // NOTE: appMetaData is only evalued on client construction, so we cannot use the client already created + const client = new WebClient(token, { retryConfig: rapidRetryPolicy }); + await client.apiCall('method'); + scope.done(); + }); + }); + + describe('with string response body for some reason', () => { + it('should try to parse the body', async () => { + const scope = nock('https://slack.com') + .post(/api/) + .reply(200, '{ "ok": true, "response_metadata": { "foo": "bar" } }', { + 'X-OAuth-Scopes': 'files:read, chat:write:bot', + 'X-Accepted-OAuth-Scopes': 'files:read', + }); + const result = await client.apiCall('method'); + assert.deepNestedInclude(result.response_metadata, { scopes: ['files:read', 'chat:write:bot'] }); + assert.deepNestedInclude(result.response_metadata, { acceptedScopes: ['files:read'] }); + assert.deepNestedInclude(result.response_metadata, { foo: 'bar' }); + scope.done(); + }); + it('should work even if the body is not a JSON data', async () => { + const scope = nock('https://slack.com').post(/api/).reply(200, 'something wrong!', { + 'X-OAuth-Scopes': 'files:read, chat:write:bot', + 'X-Accepted-OAuth-Scopes': 'files:read', + }); + try { + await client.apiCall('method'); + assert.fail('expected error to be thrown'); + } catch (err) { + assert.equal((err as Error).message, 'An API error occurred: something wrong!'); + scope.done(); + } + }); + }); + }); + + describe('apiCall() - without a token', () => { + it('should make successful api calls', async () => { + const client = new WebClient(undefined, { retryConfig: rapidRetryPolicy }); + + const scope = nock('https://slack.com') + // NOTE: this could create false negatives if the serialization order changes (it shouldn't matter) + .post(/api/, 'foo=stringval') + .reply(200, { ok: true }); + + await client.apiCall('method', { foo: 'stringval' }); + scope.done(); + }); + }); + + describe('apiCall() - when using static headers', () => { + it('should include static headers on api request', async () => { + const client = new WebClient(token, { headers: { 'X-XYZ': 'value' } }); + const scope = nock('https://slack.com', { + reqheaders: { + 'X-XYZ': 'value', + }, + }) + .post(/api/) + .reply(200, { ok: true }); + await client.apiCall('method'); + scope.done(); + }); + it('should override Authorization header if passed as an option to apiCall()', async () => { + const client = new WebClient(token, { headers: { 'X-XYZ': 'value' } }); + const scope = nock('https://slack.com', { + reqheaders: { + 'X-XYZ': 'value', + Authorization: 'Bearer xoxp-superfake', + }, + }) + .post(/api/) + .reply(200, { ok: true }); + await client.apiCall('method', { token: 'xoxp-superfake' }); + scope.done(); + }); + }); + + describe('named method aliases (facets)', () => { + beforeEach(() => { + client = new WebClient(token, { retryConfig: rapidRetryPolicy }); + }); + it('should properly mount methods as functions', async () => { + // This test doesn't exhaustively check all the method aliases, it just tries a couple. + // This should be enough since all methods are mounted in the exact same way. + const scope = nock('https://slack.com') + .post('/api/chat.postMessage', 'channel=c&text=t') + .reply(200, { ok: true }) + // Trying this method because its mounted one layer "deeper" + .post('/api/team.profile.get') + .reply(200, { ok: true }); + await Promise.all([client.chat.postMessage({ channel: 'c', text: 't' }), client.team.profile.get()]); + scope.done(); + }); + }); + + describe('paginate()', () => { + const method = 'conversations.list'; + beforeEach(() => { + client = new WebClient(token, { retryConfig: rapidRetryPolicy }); + }); + + describe('when not given shouldStop predicate', () => { + it('should return an AsyncIterator', () => { + const iterator = client.paginate(method); + assert.isOk(iterator[Symbol.asyncIterator]); + }); + it('can iterate multiple pages', async () => { + const scope = nock('https://slack.com') + .post(/api/) + .reply(200, { ok: true, response_metadata: { next_cursor: 'CURSOR' } }) + .post(/api/, (body) => { + // NOTE: limit value is compared as a string because nock doesn't properly serialize the param into a number + return body.limit && body.limit === '200' && body.cursor && body.cursor === 'CURSOR'; + }) + .reply(200, { ok: true }); + const iterator = client.paginate(method); + + // @ts-expect-error TODO: the types do not line up here + const { value: firstPage, done: firstDone } = await iterator.next(); + assert.isOk(firstPage); + assert.isFalse(firstDone); + // @ts-expect-error TODO: the types do not line up here + const { value: secondPage, done: secondDone } = await iterator.next(); + assert.isOk(secondPage); + assert.isFalse(secondDone); + // @ts-expect-error TODO: the types do not line up here + const { value: thirdPage, done: thirdDone } = await iterator.next(); + assert.isNotOk(thirdPage); + assert.isTrue(thirdDone); + + scope.done(); + }); + it('can iterate multiple pages with limit items per page', async () => { + const limit = 4; + const scope = nock('https://slack.com') + .post(/api/, (body) => { + // NOTE: limit value is compared as a string because nock doesn't properly serialize the param into a number + return body.limit && body.limit === limit.toString(); + }) + .reply(200, { ok: true, response_metadata: { next_cursor: 'CURSOR' } }) + .post(/api/, (body) => { + // NOTE: limit value is compared as a string because nock doesn't properly serialize the param into a number + return body.limit && body.limit === limit.toString() && body.cursor && body.cursor === 'CURSOR'; + }) + .reply(200, { ok: true }); + const iterator = client.paginate(method, { limit }); + + // @ts-expect-error TODO: the types do not line up here + const { value: firstPage, done: firstDone } = await iterator.next(); + assert.isOk(firstPage); + assert.isFalse(firstDone); + // @ts-expect-error TODO: the types do not line up here + const { value: secondPage, done: secondDone } = await iterator.next(); + assert.isOk(secondPage); + assert.isFalse(secondDone); + // @ts-expect-error TODO: the types do not line up here + const { value: thirdPage, done: thirdDone } = await iterator.next(); + assert.isNotOk(thirdPage); + assert.isTrue(thirdDone); + + scope.done(); + }); + it('can resume iteration from a result with an existing cursor', async () => { + const cursor = 'PRE_CURSOR'; + const scope = nock('https://slack.com') + .post(/api/, (body) => { + return body.cursor && body.cursor === cursor; + }) + .reply(200, { ok: true, response_metadata: { next_cursor: 'CURSOR' } }) + .post(/api/, (body) => { + return body.cursor && body.cursor === 'CURSOR'; + }) + .reply(200, { ok: true }); + const iterator = client.paginate(method, { cursor }); + + // @ts-expect-error TODO: the types do not line up here + const { value: firstPage, done: firstDone } = await iterator.next(); + assert.isOk(firstPage); + assert.isFalse(firstDone); + // @ts-expect-error TODO: the types do not line up here + const { value: secondPage, done: secondDone } = await iterator.next(); + assert.isOk(secondPage); + assert.isFalse(secondDone); + // @ts-expect-error TODO: the types do not line up here + const { value: thirdPage, done: thirdDone } = await iterator.next(); + assert.isNotOk(thirdPage); + assert.isTrue(thirdDone); + + scope.done(); + }); + }); + + describe('when given shouldStop predicate', () => { + it('should iterate until the end when shouldStop always returns false', async () => { + const scope = nock('https://slack.com') + .post(/api/) + .reply(200, { ok: true, response_metadata: { next_cursor: 'CURSOR' } }) + .post(/api/, (body) => { + // NOTE: limit value is compared as a string because nock doesn't properly serialize the param into a number + return body.limit && body.limit === '200' && body.cursor && body.cursor === 'CURSOR'; + }) + .reply(200, { ok: true }); + + const neverStop = sinon.fake.returns(false); + await client.paginate(method, {}, neverStop); + assert.equal(neverStop.callCount, 2); + + scope.done(); + }); + it('should only iterate once when shouldStop always returns true', async () => { + const scope = nock('https://slack.com') + .post(/api/) + .reply(200, { ok: true, response_metadata: { next_cursor: 'CURSOR' } }); + + const neverStop = sinon.fake.returns(true); + await client.paginate(method, {}, neverStop); + assert.equal(neverStop.callCount, 1); + + scope.done(); + }); + it('should iterate twice when shouldStop always returns false then true', async () => { + const scope = nock('https://slack.com') + .post(/api/) + .reply(200, { ok: true, response_metadata: { next_cursor: 'CURSOR_1' } }) + .post(/api/, (body) => { + return body.cursor && body.cursor === 'CURSOR_1'; + }) + .reply(200, { ok: true, response_metadata: { next_cursor: 'CURSOR_2' } }); + + const shouldStop = sinon.stub(); + shouldStop.onCall(0).returns(false); + shouldStop.onCall(1).returns(true); + await client.paginate(method, {}, shouldStop); + assert.equal(shouldStop.callCount, 2); + + scope.done(); + }); + + describe('when given a reduce function', () => { + it('should resolve for the accumulated value', async () => { + const scope = nock('https://slack.com') + .post(/api/) + .reply(200, { ok: true, v: 1, response_metadata: { next_cursor: 'CURSOR' } }) + .post(/api/, (body) => { + // NOTE: limit value is compared as a string because nock doesn't properly serialize the param into a number + return body.limit && body.limit === '200' && body.cursor && body.cursor === 'CURSOR'; + }) + .reply(200, { ok: true, v: 2 }); + + const sum = await client.paginate( + method, + {}, + () => false, + (acc, page) => { + const p = page as WebAPICallResult & { v: number }; + if (acc === undefined) { + // biome-ignore lint/style/noParameterAssign: TODO: dont reassign params + acc = 0; + } + if (p.v && typeof p.v === 'number') { + // biome-ignore lint/style/noParameterAssign: TODO: dont reassign params + acc += p.v; + } + return acc; + }, + ); + assert.equal(sum, 3); + + scope.done(); + }); + }); + }); + }); + + describe('has option to change slackApiUrl', () => { + it('should send requests to an alternative URL', async () => { + const alternativeUrl = 'http://12.34.56.78/api/'; + nock(alternativeUrl) + .post(/api\/method/) + .reply(200, { ok: true }); + const client = new WebClient(token, { slackApiUrl: alternativeUrl }); + await client.apiCall('method'); + }); + }); + + describe('has an option to set request concurrency', () => { + // TODO: factor out common logic into test helpers + const responseDelay = 100; // ms + let testStart: number; + let scope: nock.Scope; + + beforeEach(() => { + testStart = Date.now(); + scope = nock('https://slack.com') + .persist() + .post(/api/) + .delay(responseDelay) + .reply((_uri, _requestBody) => { + // NOTE: the assumption is that this function gets called right away when the request body is available, + // not after the delay + const diff = Date.now() - testStart; + return [200, JSON.stringify({ ok: true, diff })]; + }); + }); + + afterEach(() => { + scope.persist(false); + }); + + it('should have a default conncurrency of 100', async () => { + const client = new WebClient(token); + const requests = []; + for (let i = 0; i < 101; i++) { + requests.push(client.apiCall(`${i}`)); + } + const responses = (await Promise.all(requests)) as (WebAPICallResult & { diff: number })[]; + // verify all responses are present + assert.lengthOf(responses, 101); + + // verify that maxRequestConcurrency requests were all sent concurrently + const concurrentResponses = responses.slice(0, 100); // the first 100 responses + for (const r of concurrentResponses) { + assert.isBelow(r.diff, responseDelay); + } + + // verify that any requests after maxRequestConcurrency were delayed by the responseDelay + const queuedResponses = responses.slice(100); + const minDiff = concurrentResponses[concurrentResponses.length - 1].diff + responseDelay; + for (const r of queuedResponses) assert.isAtLeast(r.diff, minDiff); + }); + + it('should allow concurrency to be set', async () => { + const client = new WebClient(token, { maxRequestConcurrency: 1 }); + const requests = [client.apiCall('1'), client.apiCall('2')]; + const responses = (await Promise.all(requests)) as (WebAPICallResult & { diff: number })[]; + // verify all responses are present + assert.lengthOf(responses, 2); + + // verify that maxRequestConcurrency requets were all sent concurrently + const concurrentResponses = responses.slice(0, 1); // the first response + for (const r of concurrentResponses) assert.isBelow(r.diff, responseDelay); + + // verify that any requests after maxRequestConcurrency were delayed by the responseDelay + const queuedResponses = responses.slice(1); // the second response + const minDiff = concurrentResponses[concurrentResponses.length - 1].diff + responseDelay; + for (const r of queuedResponses) { + assert.isAtLeast(r.diff, minDiff); + } + }); + }); + + describe('has an option to set the retry policy ', () => { + it('retries a request which fails to get a response', async () => { + const scope = nock('https://slack.com') + .post(/api/) + .replyWithError('could be a ECONNREFUSED, ENOTFOUND, ETIMEDOUT, ECONNRESET') + .post(/api/) + .reply(200, { ok: true }); + const client = new WebClient(token, { retryConfig: rapidRetryPolicy }); + const resp = await client.apiCall('method'); + assert.propertyVal(resp, 'ok', true); + scope.done(); + }); + it('retries a request whose response has a status code that is not 200 nor 429 (rate limited)', async () => { + const scope = nock('https://slack.com').post(/api/).reply(500).post(/api/).reply(200, { ok: true }); + const client = new WebClient(token, { retryConfig: rapidRetryPolicy }); + const resp = await client.apiCall('method'); + assert.propertyVal(resp, 'ok', true); + scope.done(); + }); + }); + + describe('has rate limit handling', () => { + describe('when configured to reject rate-limited calls', () => { + beforeEach(() => { + client = new WebClient(token, { rejectRateLimitedCalls: true }); + }); + + it('should reject with a WebAPIRateLimitedError when a request fails due to rate-limiting', async () => { + const retryAfter = 5; + const scope = nock('https://slack.com') + .post(/api/) + .reply(429, '', { 'retry-after': String(retryAfter) }); + try { + await client.apiCall('method'); + assert.fail('expected error to be thrown'); + } catch (error) { + assert.propertyVal(error, 'code', ErrorCode.RateLimitedError); + assert.propertyVal(error, 'retryAfter', retryAfter); + assert.instanceOf(error, Error); + scope.done(); + } + }); + + it('should emit a rate_limited event on the client', async () => { + const spy = sinon.spy(); + const scope = nock('https://slack.com') + .post(/api/) + .reply(429, {}, { 'retry-after': String(0) }); + const client = new WebClient(token, { rejectRateLimitedCalls: true }); + client.on(WebClientEvent.RATE_LIMITED, spy); + try { + await client.apiCall('method', { foo: 'bar' }); + assert.fail('expected error to be thrown'); + } catch (_err) { + assert(spy.calledOnceWith(0, sinon.match({ url: 'method', body: { foo: 'bar' } }))); + scope.done(); + } + }); + }); + + it('should automatically retry the request after the specified timeout', async () => { + const retryAfter = 1; + const scope = nock('https://slack.com') + .post(/api/) + .reply(429, '', { 'retry-after': String(retryAfter) }) + .post(/api/) + .reply(200, { ok: true }); + const client = new WebClient(token, { retryConfig: rapidRetryPolicy }); + const startTime = Date.now(); + await client.apiCall('method'); + const diff = Date.now() - startTime; + assert.isAtLeast(diff, retryAfter * 1000, 'elapsed time is at least a second'); + scope.done(); + }); + + it('should include retryAfter metadata if the response has retry info', async () => { + const scope = nock('https://slack.com') + .post(/api/) + .reply(200, { ok: true }, { 'retry-after': String(100) }); + const client = new WebClient(token); + const data = await client.apiCall('method'); + assert(data.response_metadata?.retryAfter === 100); + scope.done(); + }); + + it('should pause the remaining requests in queue', async () => { + const startTime = Date.now(); + const retryAfter = 1; + const scope = nock('https://slack.com') + .post(/api/) + .reply(429, '', { 'retry-after': String(retryAfter) }) + .post(/api/) + .reply(200, (_uri, _requestBody) => JSON.stringify({ ok: true, diff: Date.now() - startTime })) + .post(/api/) + .reply(200, (_uri, _requestBody) => JSON.stringify({ ok: true, diff: Date.now() - startTime })); + const client = new WebClient(token, { retryConfig: rapidRetryPolicy, maxRequestConcurrency: 1 }); + const firstCall = client.apiCall('method'); + const secondCall = client.apiCall('method'); + const [firstResult, secondResult] = (await Promise.all([firstCall, secondCall])) as (WebAPICallResult & { + diff: number; + })[]; + assert.isAtLeast(firstResult.diff, retryAfter * 1000); + assert.isAtLeast(secondResult.diff, retryAfter * 1000); + scope.done(); + }); + + it('should emit a rate_limited event on the client', async () => { + const spy = sinon.spy(); + const scope = nock('https://slack.com') + .post(/api/) + .reply(429, {}, { 'retry-after': String(0) }); + const client = new WebClient(token, { retryConfig: { retries: 0 } }); + client.on(WebClientEvent.RATE_LIMITED, spy); + try { + await client.apiCall('method', { foo: 'bar' }); + assert.fail('expected error to be thrown'); + } catch (_err) { + assert(spy.calledOnceWith(0, sinon.match({ url: 'method', body: { foo: 'bar' } }))); + scope.done(); + } + }); + }); + + it('should throw an error if the response has no retry info', async () => { + // @ts-expect-error header values cannot be undefined + const scope = nock('https://slack.com').post(/api/).reply(429, {}, { 'retry-after': undefined }); + const client = new WebClient(token); + try { + await client.apiCall('method'); + assert.fail('expected error to be thrown'); + } catch (err) { + assert.instanceOf(err, Error); + scope.done(); + } + }); + + it('should throw an error if the response has an invalid retry-after header', async () => { + const scope = nock('https://slack.com').post(/api/).reply(429, {}, { 'retry-after': 'notanumber' }); + const client = new WebClient(token); + try { + await client.apiCall('method'); + assert.fail('expected error to be thrown'); + } catch (err) { + assert.instanceOf(err, Error); + assert.include(err.message, 'retry-after header: notanumber', 'Raw retry-after header value included in error'); + scope.done(); + } + }); + + describe('apps.event.authorizations.list API', () => { + it('should not send the token in the body if token is passed as a method argument', async () => { + const client = new WebClient(); + const scope = nock('https://slack.com') + .post(/api/) + .reply(200, (_uri, body) => { + assert.notInclude(body, token); + console.log('body is', body); + return { ok: true }; + }); + await client.apps.event.authorizations.list({ + token, + event_context: 'foo', + }); + scope.done(); + }); + it('should not send the token in the body if token passed as client constructor', async () => { + const client = new WebClient(token); + const scope = nock('https://slack.com') + .post(/api/) + .reply(200, (_uri, body) => { + assert.notInclude(body, token); + return { ok: true }; + }); + await client.apps.event.authorizations.list({ event_context: 'foo' }); + scope.done(); + }); + }); + + describe('getAllFileUploads', () => { + const client = new WebClient(token); + it('adds a single file data to uploads with content supplied', async () => { + const testWithContent = { + content: 'Happiness!', // test string + filename: 'happiness.txt', + title: 'Testing Happiness', + channels: 'C1234', + }; + + // returns exactly one file upload + // @ts-expect-error getAllFileUploads is a private method, TODO: refactor into own function/module that is more easily testable + const res = await client.getAllFileUploads(testWithContent); + assert.equal(res.length, 1); + }); + it('adds a single file data to uploads with file supplied', async () => { + const testWithFile = { + file: './test/fixtures/test-txt.txt', // test string + filename: 'test.txt', + title: 'Test file', + channels: 'C1234', + }; + + // @ts-expect-error getAllFileUploads is a private method, TODO: refactor into own function/module that is more easily testable + const res = await client.getAllFileUploads(testWithFile); + assert.equal(res.length, 1); + }); + it('adds multiple files data to an upload', async () => { + const files = ['txt', 'jpg', 'svg', 'png']; + const fileUploads = files.map((ext) => { + const filename = `test-${ext}.${ext}`; + return { + file: fs.createReadStream(`./test/fixtures/${filename}`), + filename, + }; + }); + const entryWithFileUploads = { + channel_id: 'C1234', + initial_comment: 'Here is a single comment wit many files attached', + title: 'Many files', + file_uploads: fileUploads, + }; + // 4 entries added + // @ts-expect-error getAllFileUploads is a private method, TODO: refactor into own function/module that is more easily testable + const res = await client.getAllFileUploads(entryWithFileUploads); + assert.equal(res.length, 4); + + // check the filename of each entry matches + files.forEach((ext, idx) => { + const filename = `test-${ext}.${ext}`; + assert.equal(res[idx].filename, filename); + }); + }); + it('adds single and multiple files data to uploads', async () => { + const files = ['txt', 'jpg', 'svg', 'png']; + const fileUploads = files.map((ext) => { + const filename = `test-${ext}.${ext}`; + return { + file: fs.createReadStream(`./test/fixtures/${filename}`), + filename, + }; + }); + const entryWithFileUploadsAndSingleFile = { + file_uploads: fileUploads, + file: './test/fixtures/test-txt.txt', // test string + filename: 'test.txt', + title: 'Test file', + channels: 'C1234', + }; + // 1 entry at the top level + 4 jobs from files in files_uploads + // @ts-expect-error getAllFileUploads is a private method, TODO: refactor into own function/module that is more easily testable + const res = await client.getAllFileUploads(entryWithFileUploadsAndSingleFile); + assert.equal(res.length, 5); + }); + it('handles multiple files with a single channel_id, initial_comment and/or thread_ts', async () => { + const validPattern = { + initial_comment: 'Here are the files!', + thread_ts: '1223313423434.131321', + channel_id: 'C123', + file_uploads: [ + { + file: './test/fixtures/test-txt.txt', + filename: 'test-txt.txt', + }, + { + file: './test/fixtures/test-png.png', + filename: 'test-png.png', + }, + ], + }; + const invalidPattern = { + file_uploads: [ + { + file: './test/fixtures/test-txt.txt', + filename: 'test-txt.txt', + initial_comment: 'Here are the files!', + thread_ts: '1223313423434.131321', + channel_id: 'C123', + }, + { + file: './test/fixtures/test-png.png', + filename: 'test-png.png', + initial_comment: 'Here are the files!', + thread_ts: '1223313423434.131321', + channel_id: 'C123', + }, + ], + }; + // in this case the two file uploads should be sent along with a single + // message corresponding to initial_comment + // @ts-expect-error getAllFileUploads is a private method, TODO: refactor into own function/module that is more easily testable + const res = await client.getAllFileUploads(validPattern); + for (const entry of res) { + assert.equal(entry.initial_comment, validPattern.initial_comment); + assert.equal(entry.thread_ts, validPattern.thread_ts); + assert.equal(entry.channel_id, validPattern.channel_id); + } + + // in this case, there should be an error + try { + // @ts-expect-error getAllFileUploads is a private method, TODO: refactor into own function/module that is more easily testable + await client.getAllFileUploads(invalidPattern); + assert.fail('Should have thrown an error for invalid arguments but didnt'); + } catch (error) { + assert.equal((error as Error).message, buildInvalidFilesUploadParamError()); + } + }); + }); + + describe('fetchAllUploadURLExternal', () => { + beforeEach(() => { + client = new WebClient(token); + }); + it('makes calls to files.getUploadURLExternal for each fileUpload', async () => { + const testFileUploads = [ + { + channel_id: 'C1234', + filename: 'test-txt.txt', + initial_comment: 'Doo ba doo here is the: test-txt.txt', + title: 'Spaghetti test-txt.txt', + data: Buffer.from('Here is a txt file'), + length: 18, + }, + ]; + + const spy = sinon.spy(); + client.files.getUploadURLExternal = spy; + // @ts-expect-error fetchAllFileUploadURLExternal is a private method, TODO: refactor into own function/module that is more easily testable + await client.fetchAllUploadURLExternal(testFileUploads); + assert.isTrue(spy.calledOnce); + }); + it('honours overriden token provided as an argument', async () => { + const tokenOverride = 'overriden-token'; + const testFileUploads = [ + { + channel_id: 'C1234', + filename: 'test-txt.txt', + initial_comment: 'Doo ba doo here is the: test-txt.txt', + title: 'Spaghetti test-txt.txt', + data: Buffer.from('Here is a txt file'), + length: 18, + token: tokenOverride, + }, + ]; + + const spy = sinon.spy(); + client.files.getUploadURLExternal = spy; + // @ts-expect-error fetchAllFileUploadURLExternal is a private method, TODO: refactor into own function/module that is more easily testable + await client.fetchAllUploadURLExternal(testFileUploads); + assert.isTrue( + spy.calledWith(sinon.match({ token: tokenOverride })), + 'token override not passed through to underlying `files.getUploadURLExternal` API method', + ); + }); + }); + + describe('completeFileUploads', () => { + beforeEach(() => { + client = new WebClient(token); + }); + it('rejects with an error when missing required file id', async () => { + const invalidTestFileUploadsToComplete = [ + { + channel_id: 'C1234', + // missing file_id field + filename: 'test-txt.txt', + initial_comment: 'Doo ba doo here is the: test-txt.txt', + title: 'Spaghetti test-txt.txt', + }, + ]; + + // should reject because of missing file_id + try { + // @ts-expect-error completeFileUploads is a private method, TODO: refactor into own function/module that is more easily testable + await client.completeFileUploads(invalidTestFileUploadsToComplete); + assert.fail('Should have errored but did not'); + } catch (err) { + assert.equal((err as Error).message, 'Missing required file id for file upload completion'); + } + }); + it('makes calls to files.completeUploadExternal for each fileUpload', async () => { + const testFileUploadsToComplete = [ + { + channel_id: 'C1234', + file_id: 'test', + filename: 'test-txt.txt', + initial_comment: 'Doo ba doo here is the: test-txt.txt', + title: 'Spaghetti test-txt.txt', + }, + ]; + + const spy = sinon.spy(); + client.files.completeUploadExternal = spy; + // @ts-expect-error completeFileUploads is a private method, TODO: refactor into own function/module that is more easily testable + await client.completeFileUploads(testFileUploadsToComplete); + assert.isTrue(spy.calledOnce); + }); + it('honours overriden token provided as an argument', async () => { + const tokenOverride = 'overriden-token'; + const testFileUploadsToComplete = [ + { + channel_id: 'C1234', + file_id: 'test', + filename: 'test-txt.txt', + initial_comment: 'Doo ba doo here is the: test-txt.txt', + title: 'Spaghetti test-txt.txt', + token: tokenOverride, + }, + ]; + + const spy = sinon.spy(); + client.files.completeUploadExternal = spy; + // @ts-expect-error completeFileUploads is a private method, TODO: refactor into own function/module that is more easily testable + await client.completeFileUploads(testFileUploadsToComplete); + assert.isTrue( + spy.calledWith(sinon.match({ token: tokenOverride })), + 'token override not passed through to underlying `files.completeUploadExternal` API method', + ); + }); + }); + + describe('postFileUploadsToExternalURL', () => { + const client = new WebClient(token); + + it('rejects with an error when missing required upload_url', async () => { + const invalidTestFileUploadsToComplete = [ + { + channel_id: 'C1234', + // missing upload_url field + filename: 'test-txt.txt', + initial_comment: 'Doo ba doo here is the: test-txt.txt', + title: 'Spaghetti test-txt.txt', + }, + ]; + + // should reject because of missing upload_url + try { + // @ts-expect-error postFileUploadsToExternalURL is a private method, TODO: refactor into own function/module that is more easily testable + await client.postFileUploadsToExternalURL(invalidTestFileUploadsToComplete); + assert.fail('Should have rejected with an error but did not'); + } catch (error) { + assert.equal((error as Error).message.startsWith('No upload url found for file'), true); + } + }); + }); + + describe('has an option to suppress request error from Axios', () => { + let scope: nock.Scope; + beforeEach(() => { + scope = nock('https://slack.com').post(/api/).replyWithError('Request failed!!'); + }); + + it("the 'original' property is attached when the option, attachOriginalToWebAPIRequestError is absent", async () => { + const client = new WebClient(token, { + retryConfig: { retries: 0 }, + }); + + try { + await client.apiCall('conversations/list'); + } catch (error) { + expect(error).to.haveOwnProperty('original'); + scope.done(); + } + }); + + it("the 'original' property is attached when the option, attachOriginalToWebAPIRequestError is set to true", async () => { + const client = new WebClient(token, { + attachOriginalToWebAPIRequestError: true, + retryConfig: { retries: 0 }, + }); + + try { + await client.apiCall('conversations/list'); + } catch (error) { + expect(error).to.haveOwnProperty('original'); + scope.done(); + } + }); + + it("the 'original' property is not attached when the option, attachOriginalToWebAPIRequestError is set to false", async () => { + const client = new WebClient(token, { + attachOriginalToWebAPIRequestError: false, + retryConfig: { retries: 0 }, + }); + + try { + await client.apiCall('conversations/list'); + } catch (error) { + expect(error).not.to.haveOwnProperty('original'); + scope.done(); + } + }); + }); +}); + +// Helpers +function parseUserAgentIntoMetadata(userAgent: string) { + // naive implementation, this might break on platforms whose names or version numbers have spaces or slashes in them, + // and that if app metadata keys or values have spaces or slashes in them. + const parts = userAgent.split(' '); + return parts.reduce( + (digest, part) => { + const [key, val] = part.split('/'); + digest[key] = val; + return digest; + }, + {} as Record, + ); +} diff --git a/packages/web-api/src/WebClient.ts b/packages/web-api/src/WebClient.ts index 07a0d7609..ab8a20f3c 100644 --- a/packages/web-api/src/WebClient.ts +++ b/packages/web-api/src/WebClient.ts @@ -1,12 +1,12 @@ -import { Agent } from 'http'; -import { basename } from 'path'; -import { stringify as qsStringify } from 'querystring'; -import { Readable } from 'stream'; -import { SecureContextOptions } from 'tls'; -import { TextDecoder } from 'util'; -import zlib from 'zlib'; - -import axios, { AxiosHeaderValue, AxiosInstance, AxiosResponse } from 'axios'; +import type { Agent } from 'node:http'; +import { basename } from 'node:path'; +import { stringify as qsStringify } from 'node:querystring'; +import type { Readable } from 'node:stream'; +import type { SecureContextOptions } from 'node:tls'; +import { TextDecoder } from 'node:util'; +import zlib from 'node:zlib'; + +import axios, { type AxiosHeaderValue, type AxiosInstance, type AxiosResponse } from 'axios'; import FormData from 'form-data'; import isElectron from 'is-electron'; import isStream from 'is-stream'; @@ -27,10 +27,10 @@ import { } from './file-upload'; import delay from './helpers'; import { getUserAgent } from './instrument'; -import { LogLevel, Logger, getLogger } from './logger'; +import { LogLevel, type Logger, getLogger } from './logger'; import { Methods } from './methods'; -import { RetryOptions, tenRetriesInAboutThirtyMinutes } from './retry-policies'; -import { CursorPaginationEnabled } from './types/request/common'; +import { type RetryOptions, tenRetriesInAboutThirtyMinutes } from './retry-policies'; +import type { CursorPaginationEnabled } from './types/request/common'; import type { FileUploadV2Job, @@ -50,7 +50,19 @@ import type { * Helpers */ // Props on axios default headers object to ignore when retrieving full list of actual headers sent in any HTTP requests -const axiosHeaderPropsToIgnore = ['delete', 'common', 'get', 'put', 'head', 'post', 'link', 'patch', 'purge', 'unlink', 'options']; +const axiosHeaderPropsToIgnore = [ + 'delete', + 'common', + 'get', + 'put', + 'head', + 'post', + 'link', + 'patch', + 'purge', + 'unlink', + 'options', +]; const defaultFilename = 'Untitled'; const defaultPageSize = 200; const noopPageReducer: PageReducer = () => undefined; @@ -72,12 +84,12 @@ export interface WebClientOptions { headers?: Record; teamId?: string; /** - * Indicates whether to attach the original error to a Web API request error. - * When set to true, the original error object will be attached to the Web API request error. - * @type {boolean} - * @default true - */ - attachOriginalToWebAPIRequestError?: boolean, + * Indicates whether to attach the original error to a Web API request error. + * When set to true, the original error object will be attached to the Web API request error. + * @type {boolean} + * @default true + */ + attachOriginalToWebAPIRequestError?: boolean; } export type TLSOptions = Pick; @@ -105,17 +117,19 @@ export interface WebAPICallResult { } // NOTE: should there be an async predicate? -export interface PaginatePredicate { - (page: WebAPICallResult): boolean | undefined | void; -} +export type PaginatePredicate = (page: WebAPICallResult) => boolean | undefined | undefined; -// eslint-disable-next-line @typescript-eslint/no-explicit-any -export interface PageReducer { - (accumulator: A | undefined, page: WebAPICallResult, index: number): A; -} +// biome-ignore lint/suspicious/noExplicitAny: reduce accumulator can be anything +export type PageReducer = (accumulator: A | undefined, page: WebAPICallResult, index: number) => A; -export type PageAccumulator = - R extends (accumulator: (infer A) | undefined, page: WebAPICallResult, index: number) => infer A ? A : never; +export type PageAccumulator = R extends ( + accumulator: infer A | undefined, + page: WebAPICallResult, + index: number, + // biome-ignore lint/suspicious/noRedeclare: TODO: what is being redeclared here? +) => infer A + ? A + : never; /** * A client for Slack's Web API @@ -184,20 +198,23 @@ export class WebClient extends Methods { /** * @param token - An API token to authenticate/authorize with Slack (usually start with `xoxp`, `xoxb`) */ - public constructor(token?: string, { - slackApiUrl = 'https://slack.com/api/', - logger = undefined, - logLevel = undefined, - maxRequestConcurrency = 100, - retryConfig = tenRetriesInAboutThirtyMinutes, - agent = undefined, - tls = undefined, - timeout = 0, - rejectRateLimitedCalls = false, - headers = {}, - teamId = undefined, - attachOriginalToWebAPIRequestError = true, - }: WebClientOptions = {}) { + public constructor( + token?: string, + { + slackApiUrl = 'https://slack.com/api/', + logger = undefined, + logLevel = undefined, + maxRequestConcurrency = 100, + retryConfig = tenRetriesInAboutThirtyMinutes, + agent = undefined, + tls = undefined, + timeout = 0, + rejectRateLimitedCalls = false, + headers = {}, + teamId = undefined, + attachOriginalToWebAPIRequestError = true, + }: WebClientOptions = {}, + ) { super(); this.token = token; @@ -242,7 +259,7 @@ export class WebClient extends Methods { proxy: false, }); // serializeApiCallOptions will always determine the appropriate content-type - delete this.axios.defaults.headers.post['Content-Type']; + this.axios.defaults.headers.post['Content-Type'] = undefined; this.logger.debug('initialized'); } @@ -271,10 +288,14 @@ export class WebClient extends Methods { const headers: Record = {}; if (options.token) headers.Authorization = `Bearer ${options.token}`; - const response = await this.makeRequest(method, { - team_id: this.teamId, - ...options, - }, headers); + const response = await this.makeRequest( + method, + { + team_id: this.teamId, + ...options, + }, + headers, + ); const result = await this.buildResult(response); this.logger.debug(`http request result: ${JSON.stringify(result)}`); @@ -286,7 +307,7 @@ export class WebClient extends Methods { // log warnings and errors in response metadata messages // related to https://api.slack.com/changelog/2016-09-28-response-metadata-is-on-the-way if (result.response_metadata !== undefined && result.response_metadata.messages !== undefined) { - result.response_metadata.messages.forEach((msg) => { + for (const msg of result.response_metadata.messages) { const errReg: RegExp = /\[ERROR\](.*)/; const warnReg: RegExp = /\[WARN\](.*)/; if (errReg.test(msg)) { @@ -300,16 +321,17 @@ export class WebClient extends Methods { this.logger.warn(warnMatch[1].trim()); } } - }); + } } // If result's content is gzip, "ok" property is not returned with successful response // TODO: look into simplifying this code block to only check for the second condition // if an { ok: false } body applies for all API errors - if (!result.ok && (response.headers['content-type'] !== 'application/gzip')) { - throw platformErrorFromResult(result as (WebAPICallResult & { error: string; })); - } else if ('ok' in result && result.ok === false) { - throw platformErrorFromResult(result as (WebAPICallResult & { error: string; })); + if (!result.ok && response.headers['content-type'] !== 'application/gzip') { + throw platformErrorFromResult(result as WebAPICallResult & { error: string }); + } + if ('ok' in result && result.ok === false) { + throw platformErrorFromResult(result as WebAPICallResult & { error: string }); } this.logger.debug(`apiCall('${method}') end`); return result; @@ -335,11 +357,7 @@ export class WebClient extends Methods { * @param reduce - a callback that can be used to accumulate a value that the return promise is resolved to */ public paginate(method: string, options?: Record): AsyncIterable; - public paginate( - method: string, - options: Record, - shouldStop: PaginatePredicate, - ): Promise; + public paginate(method: string, options: Record, shouldStop: PaginatePredicate): Promise; public paginate>( method: string, options: Record, @@ -351,12 +369,12 @@ export class WebClient extends Methods { options?: Record, shouldStop?: PaginatePredicate, reduce?: PageReducer, - ): (Promise | AsyncIterable) { + ): Promise | AsyncIterable { const pageSize = (() => { if (options !== undefined && typeof options.limit === 'number') { const { limit } = options; // eslint-disable-next-line no-param-reassign - delete options.limit; + options.limit = undefined; return limit; } return defaultPageSize; @@ -387,7 +405,7 @@ export class WebClient extends Methods { return generatePages.call(this); } - const pageReducer: PageReducer = (reduce !== undefined) ? reduce : noopPageReducer; + const pageReducer: PageReducer = reduce !== undefined ? reduce : noopPageReducer; let index = 0; return (async () => { @@ -433,9 +451,9 @@ export class WebClient extends Methods { * **#3**: Complete uploads {@link https://api.slack.com/methods/files.completeUploadExternal files.completeUploadExternal} * @param options */ - public async filesUploadV2(options: FilesUploadV2Arguments): Promise< - WebAPICallResult & { files: FilesCompleteUploadExternalResponse[] } - > { + public async filesUploadV2( + options: FilesUploadV2Arguments, + ): Promise { this.logger.debug('files.uploadV2() start'); // 1 const fileUploads = await this.getAllFileUploads(options); @@ -461,22 +479,25 @@ export class WebClient extends Methods { * which to send the file data to and an id for the file * @param fileUploads */ - private async fetchAllUploadURLExternal(fileUploads: FileUploadV2Job[]): - Promise> { - return Promise.all(fileUploads.map((upload: FileUploadV2Job) => { - /* eslint-disable @typescript-eslint/consistent-type-assertions */ - const options = { - filename: upload.filename, - length: upload.length, - alt_text: upload.alt_text, - snippet_type: upload.snippet_type, - } as FilesGetUploadURLExternalArguments; - if ('token' in upload) { - options.token = upload.token; - } + private async fetchAllUploadURLExternal( + fileUploads: FileUploadV2Job[], + ): Promise> { + return Promise.all( + fileUploads.map((upload: FileUploadV2Job) => { + /* eslint-disable @typescript-eslint/consistent-type-assertions */ + const options = { + filename: upload.filename, + length: upload.length, + alt_text: upload.alt_text, + snippet_type: upload.snippet_type, + } as FilesGetUploadURLExternalArguments; + if ('token' in upload) { + options.token = upload.token; + } - return this.files.getUploadURLExternal(options); - })); + return this.files.getUploadURLExternal(options); + }), + ); } /** @@ -484,12 +505,9 @@ export class WebClient extends Methods { * @param fileUploads * @returns */ - private async completeFileUploads(fileUploads: FileUploadV2Job[]): - Promise> { + private async completeFileUploads(fileUploads: FileUploadV2Job[]): Promise { const toComplete: FilesCompleteUploadExternalArguments[] = Object.values(getAllFileUploadsToComplete(fileUploads)); - return Promise.all( - toComplete.map((job: FilesCompleteUploadExternalArguments) => this.files.completeUploadExternal(job)), - ); + return Promise.all(toComplete.map((job) => this.files.completeUploadExternal(job))); } /** @@ -497,29 +515,37 @@ export class WebClient extends Methods { * @param fileUploads * @returns */ - private async postFileUploadsToExternalURL(fileUploads: FileUploadV2Job[], options: FilesUploadV2Arguments) - : Promise> { - return Promise.all(fileUploads.map(async (upload: FileUploadV2Job) => { - const { upload_url, file_id, filename, data } = upload; - // either file or content will be defined - const body = data; - - // try to post to external url - if (upload_url) { - const headers: Record = {}; - if (options.token) headers.Authorization = `Bearer ${options.token}`; - - const uploadRes = await this.makeRequest(upload_url, { - body, - }, headers); - if (uploadRes.status !== 200) { - return Promise.reject(Error(`Failed to upload file (id:${file_id}, filename: ${filename})`)); + private async postFileUploadsToExternalURL( + fileUploads: FileUploadV2Job[], + options: FilesUploadV2Arguments, + ): Promise> { + return Promise.all( + fileUploads.map(async (upload: FileUploadV2Job) => { + const { upload_url, file_id, filename, data } = upload; + // either file or content will be defined + const body = data; + + // try to post to external url + if (upload_url) { + const headers: Record = {}; + if (options.token) headers.Authorization = `Bearer ${options.token}`; + + const uploadRes = await this.makeRequest( + upload_url, + { + body, + }, + headers, + ); + if (uploadRes.status !== 200) { + return Promise.reject(Error(`Failed to upload file (id:${file_id}, filename: ${filename})`)); + } + const returnData = { ok: true, body: uploadRes.data } as WebAPICallResult; + return Promise.resolve(returnData); } - const returnData = { ok: true, body: uploadRes.data } as WebAPICallResult; - return Promise.resolve(returnData); - } - return Promise.reject(Error(`No upload url found for file (id: ${file_id}, filename: ${filename}`)); - })); + return Promise.reject(Error(`No upload url found for file (id: ${file_id}, filename: ${filename}`)); + }), + ); } /** @@ -550,91 +576,99 @@ export class WebClient extends Methods { headers: Record = {}, ): Promise { // TODO: better input types - remove any - const task = () => this.requestQueue.add(async () => { - const requestURL = (url.startsWith('https' || 'http')) ? url : `${this.axios.getUri() + url}`; - - try { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const config: any = { - headers, - ...this.tlsConfig, - }; - // admin.analytics.getFile returns a binary response - // To be able to parse it, it should be read as an ArrayBuffer - if (url.endsWith('admin.analytics.getFile')) { - config.responseType = 'arraybuffer'; - } - // apps.event.authorizations.list will reject HTTP requests that send token in the body - // TODO: consider applying this change to all methods - though that will require thorough integration testing - if (url.endsWith('apps.event.authorizations.list')) { - // eslint-disable-next-line no-param-reassign - delete body.token; - } - this.logger.debug(`http request url: ${requestURL}`); - this.logger.debug(`http request body: ${JSON.stringify(redact(body))}`); - // compile all headers - some set by default under the hood by axios - that will be sent along - let allHeaders: Record = Object.keys(this.axios.defaults.headers) - .reduce((acc, cur) => { - if (!axiosHeaderPropsToIgnore.includes(cur)) { - acc[cur] = this.axios.defaults.headers[cur]; - } - return acc; - }, {} as Record); - - allHeaders = { - ...this.axios.defaults.headers.common, - ...allHeaders, - ...headers, - }; - this.logger.debug(`http request headers: ${JSON.stringify(redact(allHeaders))}`); - const response = await this.axios.post(url, body, config); - this.logger.debug('http response received'); - - if (response.status === 429) { - const retrySec = parseRetryHeaders(response); - if (retrySec !== undefined) { - this.emit(WebClientEvent.RATE_LIMITED, retrySec, { url, body }); - if (this.rejectRateLimitedCalls) { - throw new AbortError(rateLimitedErrorWithDelay(retrySec)); + const task = () => + this.requestQueue.add(async () => { + const requestURL = url.startsWith('https' || 'http') ? url : `${this.axios.getUri() + url}`; + + try { + // biome-ignore lint/suspicious/noExplicitAny: TODO: type this + const config: any = { + headers, + ...this.tlsConfig, + }; + // admin.analytics.getFile returns a binary response + // To be able to parse it, it should be read as an ArrayBuffer + if (url.endsWith('admin.analytics.getFile')) { + config.responseType = 'arraybuffer'; + } + // apps.event.authorizations.list will reject HTTP requests that send token in the body + // TODO: consider applying this change to all methods - though that will require thorough integration testing + if (url.endsWith('apps.event.authorizations.list')) { + // eslint-disable-next-line no-param-reassign + body.token = undefined; + } + this.logger.debug(`http request url: ${requestURL}`); + this.logger.debug(`http request body: ${JSON.stringify(redact(body))}`); + // compile all headers - some set by default under the hood by axios - that will be sent along + let allHeaders: Record = Object.keys( + this.axios.defaults.headers, + ).reduce( + (acc, cur) => { + if (!axiosHeaderPropsToIgnore.includes(cur)) { + acc[cur] = this.axios.defaults.headers[cur]; + } + return acc; + }, + {} as Record, + ); + + allHeaders = { + ...this.axios.defaults.headers.common, + ...allHeaders, + ...headers, + }; + this.logger.debug(`http request headers: ${JSON.stringify(redact(allHeaders))}`); + const response = await this.axios.post(url, body, config); + this.logger.debug('http response received'); + + if (response.status === 429) { + const retrySec = parseRetryHeaders(response); + if (retrySec !== undefined) { + this.emit(WebClientEvent.RATE_LIMITED, retrySec, { url, body }); + if (this.rejectRateLimitedCalls) { + throw new AbortError(rateLimitedErrorWithDelay(retrySec)); + } + this.logger.info(`API Call failed due to rate limiting. Will retry in ${retrySec} seconds.`); + // pause the request queue and then delay the rejection by the amount of time in the retry header + this.requestQueue.pause(); + // NOTE: if there was a way to introspect the current RetryOperation and know what the next timeout + // would be, then we could subtract that time from the following delay, knowing that it the next + // attempt still wouldn't occur until after the rate-limit header has specified. an even better + // solution would be to subtract the time from only the timeout of this next attempt of the + // RetryOperation. this would result in the staying paused for the entire duration specified in the + // header, yet this operation not having to pay the timeout cost in addition to that. + await delay(retrySec * 1000); + // resume the request queue and throw a non-abort error to signal a retry + this.requestQueue.start(); + // TODO: We may want to have more detailed info such as team_id, params except tokens, and so on. + throw new Error(`A rate limit was exceeded (url: ${url}, retry-after: ${retrySec})`); } - this.logger.info(`API Call failed due to rate limiting. Will retry in ${retrySec} seconds.`); - // pause the request queue and then delay the rejection by the amount of time in the retry header - this.requestQueue.pause(); - // NOTE: if there was a way to introspect the current RetryOperation and know what the next timeout - // would be, then we could subtract that time from the following delay, knowing that it the next - // attempt still wouldn't occur until after the rate-limit header has specified. an even better - // solution would be to subtract the time from only the timeout of this next attempt of the - // RetryOperation. this would result in the staying paused for the entire duration specified in the - // header, yet this operation not having to pay the timeout cost in addition to that. - await delay(retrySec * 1000); - // resume the request queue and throw a non-abort error to signal a retry - this.requestQueue.start(); - // TODO: We may want to have more detailed info such as team_id, params except tokens, and so on. - throw new Error(`A rate limit was exceeded (url: ${url}, retry-after: ${retrySec})`); - } else { // TODO: turn this into some CodedError - throw new AbortError(new Error(`Retry header did not contain a valid timeout (url: ${url}, retry-after header: ${response.headers['retry-after']})`)); + throw new AbortError( + new Error( + `Retry header did not contain a valid timeout (url: ${url}, retry-after header: ${response.headers['retry-after']})`, + ), + ); } - } - // Slack's Web API doesn't use meaningful status codes besides 429 and 200 - if (response.status !== 200) { - throw httpErrorFromResponse(response); - } + // Slack's Web API doesn't use meaningful status codes besides 429 and 200 + if (response.status !== 200) { + throw httpErrorFromResponse(response); + } - return response; - } catch (error) { - // To make this compatible with tsd, casting here instead of `catch (error: any)` - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const e = error as any; - this.logger.warn('http request failed', e.message); - if (e.request) { - throw requestErrorWithOriginal(e, this.attachOriginalToWebAPIRequestError); + return response; + } catch (error) { + // To make this compatible with tsd, casting here instead of `catch (error: any)` + // biome-ignore lint/suspicious/noExplicitAny: errors can be anything + const e = error as any; + this.logger.warn('http request failed', e.message); + if (e.request) { + throw requestErrorWithOriginal(e, this.attachOriginalToWebAPIRequestError); + } + throw error; } - throw error; - } - }); - // eslint-disable-next-line @typescript-eslint/no-explicit-any + }); + // biome-ignore lint/suspicious/noExplicitAny: http responses can be anything return pRetry(task, this.retryConfig) as Promise>; } @@ -646,12 +680,14 @@ export class WebClient extends Methods { * @param options - arguments for the Web API method * @param headers - a mutable object representing the HTTP headers for the outgoing request */ - private serializeApiCallOptions(options: Record, headers?: Record): string | - Readable { + private serializeApiCallOptions( + options: Record, + headers?: Record, + ): string | Readable { // The following operation both flattens complex objects into a JSON-encoded strings and searches the values for // binary content - let containsBinaryData: boolean = false; - // eslint-disable-next-line @typescript-eslint/no-explicit-any + let containsBinaryData = false; + // biome-ignore lint/suspicious/noExplicitAny: call options can be anything const flattened = Object.entries(options).map<[string, any] | []>(([key, value]) => { if (value === undefined || value === null) { return []; @@ -673,58 +709,52 @@ export class WebClient extends Methods { // A body with binary content should be serialized as multipart/form-data if (containsBinaryData) { this.logger.debug('Request arguments contain binary data'); - const form = flattened.reduce( - (frm, [key, value]) => { - if (Buffer.isBuffer(value) || isStream(value)) { - const opts: FormData.AppendOptions = {}; - opts.filename = (() => { - // attempt to find filename from `value`. adapted from: - // https://github.com/form-data/form-data/blob/028c21e0f93c5fefa46a7bbf1ba753e4f627ab7a/lib/form_data.js#L227-L230 - // formidable and the browser add a name property - // fs- and request- streams have path property - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const streamOrBuffer: any = (value as any); - if (typeof streamOrBuffer.name === 'string') { - return basename(streamOrBuffer.name); - } - if (typeof streamOrBuffer.path === 'string') { - return basename(streamOrBuffer.path); - } - return defaultFilename; - })(); - frm.append(key as string, value, opts); - } else if (key !== undefined && value !== undefined) { - frm.append(key, value); - } - return frm; - }, - new FormData(), - ); + const form = flattened.reduce((frm, [key, value]) => { + if (Buffer.isBuffer(value) || isStream(value)) { + const opts: FormData.AppendOptions = {}; + opts.filename = (() => { + // attempt to find filename from `value`. adapted from: + // https://github.com/form-data/form-data/blob/028c21e0f93c5fefa46a7bbf1ba753e4f627ab7a/lib/form_data.js#L227-L230 + // formidable and the browser add a name property + // fs- and request- streams have path property + // biome-ignore lint/suspicious/noExplicitAny: form values can be anything + const streamOrBuffer: any = value as any; + if (typeof streamOrBuffer.name === 'string') { + return basename(streamOrBuffer.name); + } + if (typeof streamOrBuffer.path === 'string') { + return basename(streamOrBuffer.path); + } + return defaultFilename; + })(); + frm.append(key as string, value, opts); + } else if (key !== undefined && value !== undefined) { + frm.append(key, value); + } + return frm; + }, new FormData()); if (headers) { // Copying FormData-generated headers into headers param // not reassigning to headers param since it is passed by reference and behaves as an inout param - Object.entries(form.getHeaders()).forEach(([header, value]) => { - // eslint-disable-next-line no-param-reassign + for (const [header, value] of Object.entries(form.getHeaders())) { headers[header] = value; - }); + } } return form; } // Otherwise, a simple key-value object is returned - // eslint-disable-next-line no-param-reassign if (headers) headers['Content-Type'] = 'application/x-www-form-urlencoded'; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const initialValue: { [key: string]: any; } = {}; - return qsStringify(flattened.reduce( - (accumulator, [key, value]) => { + // biome-ignore lint/suspicious/noExplicitAny: form values can be anything + const initialValue: { [key: string]: any } = {}; + return qsStringify( + flattened.reduce((accumulator, [key, value]) => { if (key !== undefined && value !== undefined) { accumulator[key] = value; } return accumulator; - }, - initialValue, - )); + }, initialValue), + ); } /** @@ -748,19 +778,20 @@ export class WebClient extends Methods { } return resolve(buf.toString().split('\n')); }); - }).then((res) => res) + }) + .then((res) => res) .catch((err) => { throw err; }); - const fileData: Array = []; + const fileData: Array< + AdminAnalyticsMemberDetails | AdminAnalyticsPublicChannelDetails | AdminAnalyticsPublicChannelMetadataDetails + > = []; if (Array.isArray(unzippedData)) { - unzippedData.forEach((dataset) => { + for (const dataset of unzippedData) { if (dataset && dataset.length > 0) { fileData.push(JSON.parse(dataset)); } - }); + } } data = { file_data: fileData }; } catch (err) { @@ -791,7 +822,9 @@ export class WebClient extends Methods { data.response_metadata.scopes = (response.headers['x-oauth-scopes'] as string).trim().split(/\s*,\s*/); } if (response.headers['x-accepted-oauth-scopes'] !== undefined) { - data.response_metadata.acceptedScopes = (response.headers['x-accepted-oauth-scopes'] as string).trim().split(/\s*,\s*/); + data.response_metadata.acceptedScopes = (response.headers['x-accepted-oauth-scopes'] as string) + .trim() + .split(/\s*,\s*/); } // add retry metadata from headers @@ -835,7 +868,7 @@ function paginationOptionsForNextPage( */ function parseRetryHeaders(response: AxiosResponse): number | undefined { if (response.headers['retry-after'] !== undefined) { - const retryAfter = parseInt((response.headers['retry-after'] as string), 10); + const retryAfter = Number.parseInt(response.headers['retry-after'] as string, 10); if (!Number.isNaN(retryAfter)) { return retryAfter; @@ -874,19 +907,18 @@ function warnIfFallbackIsMissing(method: string, logger: Logger, options?: Recor const hasAttachments = (args: Record) => Array.isArray(args.attachments) && args.attachments.length; - const missingAttachmentFallbackDetected = (args: Record) => Array.isArray(args.attachments) && + const missingAttachmentFallbackDetected = (args: Record) => + Array.isArray(args.attachments) && args.attachments.some((attachment) => !attachment.fallback || attachment.fallback.trim() === ''); - const isEmptyText = (args: Record) => args.text === undefined || args.text === null || args.text === ''; + const isEmptyText = (args: Record) => + args.text === undefined || args.text === null || args.text === ''; - const buildMissingTextWarning = () => `The top-level \`text\` argument is missing in the request payload for a ${method} call - ` + - 'It\'s a best practice to always provide a `text` argument when posting a message. ' + - 'The `text` is used in places where the content cannot be rendered such as: ' + - 'system push notifications, assistive technology such as screen readers, etc.'; + const buildMissingTextWarning = () => + `The top-level \`text\` argument is missing in the request payload for a ${method} call - It's a best practice to always provide a \`text\` argument when posting a message. The \`text\` is used in places where the content cannot be rendered such as: system push notifications, assistive technology such as screen readers, etc.`; - const buildMissingFallbackWarning = () => `Additionally, the attachment-level \`fallback\` argument is missing in the request payload for a ${method} call - ` + - 'To avoid this warning, it is recommended to always provide a top-level `text` argument when posting a message. ' + - 'Alternatively, you can provide an attachment-level `fallback` argument, though this is now considered a legacy field (see https://api.slack.com/reference/messaging/attachments#legacy_fields for more details).'; + const buildMissingFallbackWarning = () => + `Additionally, the attachment-level \`fallback\` argument is missing in the request payload for a ${method} call - To avoid this warning, it is recommended to always provide a top-level \`text\` argument when posting a message. Alternatively, you can provide an attachment-level \`fallback\` argument, though this is now considered a legacy field (see https://api.slack.com/reference/messaging/attachments#legacy_fields for more details).`; if (isTargetMethod && typeof options === 'object') { if (hasAttachments(options)) { if (missingAttachmentFallbackDetected(options) && isEmptyText(options)) { @@ -924,7 +956,7 @@ export function buildThreadTsWarningMessage(method: string): string { * @returns */ function redact(body: Record): Record { - // eslint-disable-next-line @typescript-eslint/no-explicit-any + // biome-ignore lint/suspicious/noExplicitAny: objects can be anything const flattened = Object.entries(body).map<[string, any] | []>(([key, value]) => { // no value provided if (value === undefined || value === null) { @@ -948,14 +980,11 @@ function redact(body: Record): Record { }); // return as object - const initialValue: { [key: string]: unknown; } = {}; - return flattened.reduce( - (accumulator, [key, value]) => { - if (key !== undefined && value !== undefined) { - accumulator[key] = value; - } - return accumulator; - }, - initialValue, - ); + const initialValue: { [key: string]: unknown } = {}; + return flattened.reduce((accumulator, [key, value]) => { + if (key !== undefined && value !== undefined) { + accumulator[key] = value; + } + return accumulator; + }, initialValue); } diff --git a/packages/web-api/src/errors.ts b/packages/web-api/src/errors.ts index 13213ee9e..c6698acf6 100644 --- a/packages/web-api/src/errors.ts +++ b/packages/web-api/src/errors.ts @@ -1,8 +1,8 @@ -import { IncomingHttpHeaders } from 'http'; +import type { IncomingHttpHeaders } from 'node:http'; -import { AxiosResponse } from 'axios'; +import type { AxiosResponse } from 'axios'; -import { WebAPICallResult } from './WebClient'; +import type { WebAPICallResult } from './WebClient'; /** * All errors produced by this package adhere to this interface @@ -33,7 +33,7 @@ export interface WebAPIFileUploadInvalidArgumentsError extends CodedError { code: ErrorCode.FileUploadInvalidArgumentsError; data: WebAPICallResult & { error: string; - } + }; } export interface WebAPIPlatformError extends CodedError { @@ -53,7 +53,7 @@ export interface WebAPIHTTPError extends CodedError { statusCode: number; statusMessage: string; headers: IncomingHttpHeaders; - // eslint-disable-next-line @typescript-eslint/no-explicit-any + // biome-ignore lint/suspicious/noExplicitAny: HTTP response bodies might be anything body?: any; } @@ -85,7 +85,7 @@ export function requestErrorWithOriginal(original: Error, attachOriginal: boolea if (attachOriginal) { error.original = original; } - return (error as WebAPIRequestError); + return error as WebAPIRequestError; } /** @@ -100,27 +100,27 @@ export function httpErrorFromResponse(response: AxiosResponse): WebAPIHTTPError error.statusCode = response.status; error.statusMessage = response.statusText; const nonNullHeaders: Record = {}; - Object.keys(response.headers).forEach((k) => { + for (const k of Object.keys(response.headers)) { if (k && response.headers[k]) { nonNullHeaders[k] = response.headers[k]; } - }); + } error.headers = nonNullHeaders; error.body = response.data; - return (error as WebAPIHTTPError); + return error as WebAPIHTTPError; } /** * A factory to create WebAPIPlatformError objects * @param result - Web API call result */ -export function platformErrorFromResult(result: WebAPICallResult & { error: string; }): WebAPIPlatformError { +export function platformErrorFromResult(result: WebAPICallResult & { error: string }): WebAPIPlatformError { const error = errorWithCode( new Error(`An API error occurred: ${result.error}`), ErrorCode.PlatformError, ) as Partial; error.data = result; - return (error as WebAPIPlatformError); + return error as WebAPIPlatformError; } /** @@ -133,5 +133,5 @@ export function rateLimitedErrorWithDelay(retrySec: number): WebAPIRateLimitedEr ErrorCode.RateLimitedError, ) as Partial; error.retryAfter = retrySec; - return (error as WebAPIRateLimitedError); + return error as WebAPIRateLimitedError; } diff --git a/packages/web-api/src/file-upload.spec.js b/packages/web-api/src/file-upload.spec.ts similarity index 70% rename from packages/web-api/src/file-upload.spec.js rename to packages/web-api/src/file-upload.spec.ts index 5be64e77a..10fe3275f 100644 --- a/packages/web-api/src/file-upload.spec.js +++ b/packages/web-api/src/file-upload.spec.ts @@ -1,24 +1,41 @@ -require('mocha'); -const { assert } = require('chai'); -const sinon = require('sinon'); -const { createReadStream, statSync, writeFileSync, unlinkSync } = require('fs'); -const { ErrorCode } = require('./errors'); -const { - getFileDataAsStream, - getFileDataLength, - getFileData, - getFileUploadJob, - getAllFileUploadsToComplete, - getMultipleFileUploadJobs, +import { createReadStream, statSync, unlinkSync, writeFileSync } from 'node:fs'; +import { assert } from 'chai'; +import sinon from 'sinon'; +import { ErrorCode } from './errors'; +import { + buildChannelsWarning, buildLegacyFileTypeWarning, buildMissingExtensionWarning, - buildMissingFileNameWarning, buildMissingFileIdError, - buildChannelsWarning, + buildMissingFileNameWarning, buildMultipleChannelsErrorMsg, -} = require('./file-upload'); + getAllFileUploadsToComplete, + getFileData, + getFileDataAsStream, + getFileDataLength, + getFileUploadJob, + getMultipleFileUploadJobs, +} from './file-upload'; +import type { Logger } from './logger'; +import type { FileUploadBinaryContents, FileUploadStringContents } from './types/request/files'; describe('file-upload', () => { + const sandbox = sinon.createSandbox(); + let logger: Logger; + beforeEach(() => { + logger = { + debug: sinon.spy(), + info: sinon.spy(), + warn: sinon.spy(), + error: sinon.spy(), + getLevel: sinon.spy(), + setLevel: sinon.spy(), + setName: sinon.spy(), + }; + }); + afterEach(() => { + sandbox.restore(); + }); describe('getFileUploadJob', () => { it('returns a fileUploadEntry', async () => { const valid = { @@ -28,7 +45,7 @@ describe('file-upload', () => { alt_text: 'an image of a thing', initial_comment: 'lorem ipsum', }; - const res = await getFileUploadJob(valid); + const res = await getFileUploadJob(valid, logger); // supplied values assert.equal(valid.initial_comment, res.initial_comment); assert.equal(valid.alt_text, res.alt_text); @@ -40,62 +57,50 @@ describe('file-upload', () => { assert.isDefined(res.length); }); it('warns if legacy filetype', async () => { - this.logger = { - warn: sinon.spy(), - }; const containsFileType = { filename: 'test.txt', file: Buffer.from('test'), filetype: 'txt', }; - await getFileUploadJob(containsFileType, this.logger); - assert.isTrue(this.logger.warn.calledOnceWith(buildLegacyFileTypeWarning())); + await getFileUploadJob(containsFileType, logger); + assert.isTrue((logger.warn as sinon.SinonSpy).calledOnceWith(buildLegacyFileTypeWarning())); }); it('warns when missing or invalid filename', async () => { - this.logger = { - warn: sinon.spy(), - }; const missingFileName = { file: Buffer.from('test'), }; - await getFileUploadJob(missingFileName, this.logger); - assert.isTrue(this.logger.warn.calledOnceWith(buildMissingFileNameWarning())); + await getFileUploadJob(missingFileName, logger); + assert.isTrue((logger.warn as sinon.SinonSpy).calledOnceWith(buildMissingFileNameWarning())); }); it('warns when possibly missing a file extension in filename supplied', async () => { - this.logger = { - warn: sinon.spy(), - }; const filename = 'should-have-extension'; const missingFileNameExtension = { file: Buffer.from('test'), filename, }; - await getFileUploadJob(missingFileNameExtension, this.logger); - assert.isTrue(this.logger.warn.calledOnceWith(buildMissingExtensionWarning(filename))); + await getFileUploadJob(missingFileNameExtension, logger); + assert.isTrue((logger.warn as sinon.SinonSpy).calledOnceWith(buildMissingExtensionWarning(filename))); }); it('warns when channels is supplied', async () => { - this.logger = { - warn: sinon.spy(), - }; const channelsSupplied = { file: Buffer.from('test'), filename: 'test', - channels: 'C1234' + channels: 'C1234', }; - await getFileUploadJob(channelsSupplied, this.logger); - assert.isTrue(this.logger.warn.calledWith(buildChannelsWarning())); + await getFileUploadJob(channelsSupplied, logger); + assert.isTrue((logger.warn as sinon.SinonSpy).calledWith(buildChannelsWarning())); }); it('errors when channels is supplied with csv value, aka multiple channels', async () => { const multipleChannelsSuppliedAsCsv = { file: Buffer.from('test'), filename: 'test', - channels: 'C1234,C5678' // multiple chnanel + channels: 'C1234,C5678', // multiple chnanel }; try { - await getFileUploadJob(multipleChannelsSuppliedAsCsv, this.logger); + await getFileUploadJob(multipleChannelsSuppliedAsCsv, logger); assert.fail('Should have errored out but didnt'); } catch (error) { - assert.equal(error.message, buildMultipleChannelsErrorMsg()); + assert.equal((error as Error).message, buildMultipleChannelsErrorMsg()); } }); }); @@ -118,10 +123,7 @@ describe('file-upload', () => { }, ], }; - this.logger = { - warn: sinon.spy(), - }; - const res = await getMultipleFileUploadJobs(valid, this.logger); + const res = await getMultipleFileUploadJobs(valid, logger); // supplied values assert.equal(valid.initial_comment, res[0].initial_comment); assert.equal(valid.initial_comment, res[1].initial_comment); @@ -131,10 +133,10 @@ describe('file-upload', () => { assert.equal(valid.channel_id, res[1].channel_id); assert.equal(valid.token, res[0].token); assert.equal(valid.token, res[1].token); - assert.equal(valid.file_uploads[0].file, res[0].file); + assert.equal(valid.file_uploads[0].file, (res[0] as FileUploadBinaryContents).file); assert.equal(valid.file_uploads[0].filename, res[0].filename); assert.equal(valid.file_uploads[0].alt_text, res[0].alt_text); - assert.equal(valid.file_uploads[1].content, res[1].content); + assert.equal(valid.file_uploads[1].content, (res[1] as FileUploadStringContents).content); assert.equal(valid.file_uploads[1].filename, res[1].filename); // calculated values @@ -149,63 +151,75 @@ describe('file-upload', () => { const invalidFileUpload = {}; // this call to getFileData should error try { + // @ts-expect-error passing invalid arguments const res = await getFileData(invalidFileUpload); // if we get here this test is failed - assert.fail(res, "an error", "Expected an error but got an output"); + assert.fail(res.toString(), 'an error', 'Expected an error but got an output'); } catch (err) { - assert.equal(err.message, 'Either a file or content field is required for valid file upload. You cannot supply both'); - assert.equal(err.code, ErrorCode.FileUploadInvalidArgumentsError); + assert.propertyVal( + err, + 'message', + 'Either a file or content field is required for valid file upload. You cannot supply both', + ); + assert.propertyVal(err, 'code', ErrorCode.FileUploadInvalidArgumentsError); } }); it('handles invalid input for file or content or when both supplied', async () => { // both content and file supplied - let invalidFileUpload = { + const invalidFileUpload = { file: 50, content: 50, - filename: 'Test File' + filename: 'Test File', }; try { + // @ts-expect-error passing invalid arguments const res = await getFileData(invalidFileUpload); - assert.fail(res, "an error", "Was expecting an error, but got a result"); + assert.fail(res.toString(), 'an error', 'Was expecting an error, but got a result'); } catch (err) { - assert.equal(err.message, 'Either a file or content field is required for valid file upload. You cannot supply both'); - assert.equal(err.code, ErrorCode.FileUploadInvalidArgumentsError); + assert.propertyVal( + err, + 'message', + 'Either a file or content field is required for valid file upload. You cannot supply both', + ); + assert.propertyVal(err, 'code', ErrorCode.FileUploadInvalidArgumentsError); } // file supplied invalid type of valid - invalidFileUpload = { + const invalidFileUpload2 = { file: 50, - filename: 'Test File' - } + filename: 'Test File', + }; try { - const res = await getFileData(invalidFileUpload); - assert.fail(res, "an error", "Was expecting an error, but got a result"); + // @ts-expect-error passing invalid arguments + const res = await getFileData(invalidFileUpload2); + assert.fail(res.toString(), 'an error', 'Was expecting an error, but got a result'); } catch (err) { - assert.equal(err.message, 'file must be a valid string path, buffer or Readable'); - assert.equal(err.code, ErrorCode.FileUploadInvalidArgumentsError); + assert.propertyVal(err, 'message', 'file must be a valid string path, buffer or Readable'); + assert.propertyVal(err, 'code', ErrorCode.FileUploadInvalidArgumentsError); } // content supplied invalid type of field - invalidFileUpload = { + const invalidFileUpload3 = { content: 50, - filename: 'Test File' - } + filename: 'Test File', + }; try { - const res = await getFileData(invalidFileUpload); - assert.fail(res, "an error", "Was expecting an error, but got a result"); + // @ts-expect-error passing invalid arguments + const res = await getFileData(invalidFileUpload3); + assert.fail(res.toString(), 'an error', 'Was expecting an error, but got a result'); } catch (err) { - assert.equal(err.message, 'content must be a string'); - assert.equal(err.code, ErrorCode.FileUploadInvalidArgumentsError); + assert.propertyVal(err, 'message', 'content must be a string'); + assert.propertyVal(err, 'code', ErrorCode.FileUploadInvalidArgumentsError); } }); it('handles file as buffer', async () => { const fileUpload = { file: Buffer.from('Hello'), - filename: 'It\'s me', + filename: "It's me", }; const res = await getFileData(fileUpload); res.forEach((int, idx) => { - assert.equal(int, fileUpload.file[idx]) + assert.equal(int, fileUpload.file[idx]); }); }); it('handles file as string when valid path', async () => { @@ -214,13 +228,9 @@ describe('file-upload', () => { filename: 'Test File', }; - try { - const res = await getFileData(fileUpload); - // should return a buffer - assert.equal(Buffer.isBuffer(res), true); - } catch (err) { - assert.fail(err, "no error"); - } + const res = await getFileData(fileUpload); + // should return a buffer + assert.equal(Buffer.isBuffer(res), true); }); it('handles file as string when invalid path', async () => { const fileUpload = { @@ -229,10 +239,14 @@ describe('file-upload', () => { }; try { const res = await getFileData(fileUpload); - assert.fail(res, "no error", "Expected no error, but got one"); + assert.fail(res.toString(), 'no error', 'Expected no error, but got one'); } catch (err) { - assert.equal(err.message, `Unable to resolve file data for ${fileUpload.file}. Please supply a filepath string, or binary data Buffer or String directly.`); - assert.equal(err.code, ErrorCode.FileUploadInvalidArgumentsError); + assert.propertyVal( + err, + 'message', + `Unable to resolve file data for ${fileUpload.file}. Please supply a filepath string, or binary data Buffer or String directly.`, + ); + assert.propertyVal(err, 'code', ErrorCode.FileUploadInvalidArgumentsError); } }); it('handles file as ReadStream', async () => { @@ -241,30 +255,22 @@ describe('file-upload', () => { filename: 'Test File', }; // should not error - try { - const res = await getFileData(fileUpload); - // should return file data from the stream - assert.equal(Buffer.isBuffer(res), true); - } catch (err) { - assert.fail(err, "no error", "Expected no error here, but got one"); - } - + const res = await getFileData(fileUpload); + // should return file data from the stream + assert.equal(Buffer.isBuffer(res), true); }); it('handles content as string', async () => { - let validFileUpload = { + const validFileUpload = { content: 'Happiness', - filename: 'Test File' + filename: 'Test File', }; - try { - const res = await getFileData(validFileUpload); - assert.equal(Buffer.isBuffer(res), true); - } catch (err) { - assert.fail(res, "a buffer file data", "Was expecting no error, but got one"); - } + const res = await getFileData(validFileUpload); + assert.equal(Buffer.isBuffer(res), true); }); }); describe('getFileDataLength', () => { it('errors when data is undefined', () => { + // @ts-expect-error calling method in a forbidden way assert.throws(() => getFileDataLength()); }); it('returns correct byte length', () => { @@ -274,29 +280,31 @@ describe('file-upload', () => { }); describe('getFileDataAsStream', () => { it('reads file data in from a stream', async () => { - const shouldNotThrow = async () => await getFileDataAsStream(await createReadStream('./test/fixtures/test-txt.txt')); + const shouldNotThrow = async () => await getFileDataAsStream(createReadStream('./test/fixtures/test-txt.txt')); assert.doesNotThrow(shouldNotThrow); }); it('errors if file is empty', async () => { try { - const res = await getFileDataAsStream(await createReadStream('./test/fixtures/test-txt-empty.txt')); + await getFileDataAsStream(createReadStream('./test/fixtures/test-txt-empty.txt')); + assert.fail('expected exception to be thrown but was not'); } catch (err) { - assert.equal(err.message, 'No data in supplied file'); + assert.propertyVal(err, 'message', 'No data in supplied file'); } }); it('ensures complete file is uploaded', async () => { try { // create a large file - let largeBuffer = Buffer.alloc(100000, '0123456789876543210\n'); + const largeBuffer = Buffer.alloc(100000, '0123456789876543210\n'); writeFileSync('./test/fixtures/test-txt-large.txt', largeBuffer); const res = await getFileDataAsStream(createReadStream('./test/fixtures/test-txt-large.txt')); // assert file size of the res is the same as the file size of the buffer - const expectedSize = statSync('./test/fixtures/test-txt-large.txt').size - const actualSize = Buffer.byteLength(res) + const expectedSize = statSync('./test/fixtures/test-txt-large.txt').size; + const actualSize = Buffer.byteLength(res); assert.equal(actualSize, expectedSize); - + } catch (e) { + assert.fail('exception thrown!', e); } finally { // cleanup large file unlinkSync('./test/fixtures/test-txt-large.txt'); @@ -314,8 +322,8 @@ describe('file-upload', () => { // same as below in fileUploadJob2 channel_id: '1', initial_comment: 'Hi', - thread_ts: '1.0' - } + thread_ts: '1.0', + }; const fileUploadJob2 = { file: Buffer.from('test'), filename: 'test.txt', @@ -324,15 +332,15 @@ describe('file-upload', () => { // same as above in fileUploadJob1 channel_id: '1', initial_comment: 'Hi', - thread_ts: '1.0' - } + thread_ts: '1.0', + }; const fileUploadJobs = [fileUploadJob1, fileUploadJob2]; const toComplete = getAllFileUploadsToComplete(fileUploadJobs); - // there should be one job to complete + // there should be one job to complete assert.equal(Object.keys(toComplete).length, 1); - // that job should contain two file uploads + // that job should contain two file uploads // we can verity this by checking files const job = Object.values(toComplete)[0]; assert.equal(job.files.length, 2); @@ -356,7 +364,7 @@ describe('file-upload', () => { thread_ts: '1.0', // different from fileUploadJob2 initial_comment: 'Hi', - } + }; const fileUploadJob2 = { file: Buffer.from('test'), filename: 'test.txt', @@ -367,11 +375,11 @@ describe('file-upload', () => { thread_ts: '1.0', // different from fileUploadJob1 initial_comment: 'Bye', - } + }; const fileUploadJobs = [fileUploadJob1, fileUploadJob2]; const toComplete = getAllFileUploadsToComplete(fileUploadJobs); - // there should be two jobs to complete + // there should be two jobs to complete assert.equal(Object.keys(toComplete).length, 2); // each job should contain one file upload @@ -383,7 +391,7 @@ describe('file-upload', () => { // checks that this upload matches the original fileUploadJobs entry assert.equal(fileUploadJobs[idx].file_id, job.files[0].id); assert.equal(fileUploadJobs[idx].title, job.files[0].title); - }) + }); }); it('should group uploads with non matching thread_ts separately regardless of whether initial_comments match', () => { const fileUploadJob1 = { @@ -396,7 +404,7 @@ describe('file-upload', () => { initial_comment: 'Hi', // different from fileUploadJob2 thread_ts: '1.0', - } + }; const fileUploadJob2 = { file: Buffer.from('test'), filename: 'test.txt', @@ -407,11 +415,11 @@ describe('file-upload', () => { initial_comment: 'Hi', // different from fileUploadJob1 thread_ts: '2.0', - } + }; const fileUploadJobs = [fileUploadJob1, fileUploadJob2]; const toComplete = getAllFileUploadsToComplete(fileUploadJobs); - // there should be two jobs to complete + // there should be two jobs to complete assert.equal(Object.keys(toComplete).length, 2); // each job should contain one file upload @@ -423,9 +431,9 @@ describe('file-upload', () => { // checks that this upload matches the original fileUploadJobs entry assert.equal(fileUploadJobs[idx].file_id, job.files[0].id); assert.equal(fileUploadJobs[idx].title, job.files[0].title); - }) + }); }); - }) + }); describe('when channel_id is different', () => { it('should not group uploads', () => { // even if all other details are the same, it should never group uploads if the channel_id doesn't match @@ -437,8 +445,8 @@ describe('file-upload', () => { initial_comment: 'Hi', thread_ts: '1.0', - channel_id: '1' - } + channel_id: '1', + }; const fileUploadJob2 = { file: Buffer.from('test'), filename: 'test.txt', @@ -447,17 +455,17 @@ describe('file-upload', () => { initial_comment: 'Hi', thread_ts: '1.0', - channel_id: 'Not 1' - } + channel_id: 'Not 1', + }; const fileUploadJobs = [fileUploadJob1, fileUploadJob2]; const toComplete = getAllFileUploadsToComplete(fileUploadJobs); - // there should be 2 jobs to complete + // there should be 2 jobs to complete assert.equal(Object.keys(toComplete).length, 2); }); }); it('should correctly group entries with matching channel_ids, non-matching channel_ids, missing, channel_id', () => { - // fileUploadJob1 and 2 should be grouped together in one job because their channel_id and initial comment match + // fileUploadJob1 and 2 should be grouped together in one job because their channel_id and initial comment match const fileUploadJob1 = { file: Buffer.from('test'), filename: 'test.txt', @@ -466,7 +474,7 @@ describe('file-upload', () => { channel_id: '1', initial_comment: 'Hi', - } + }; const fileUploadJob2 = { file: Buffer.from('test'), filename: 'test.txt', @@ -475,7 +483,7 @@ describe('file-upload', () => { channel_id: '1', initial_comment: 'Hi', - } + }; // should be it's own job even though the channel id matches because it's missing thread_ts and initial_comment const fileUploadJob3 = { file: Buffer.from('test'), @@ -484,7 +492,7 @@ describe('file-upload', () => { title: 'test3', channel_id: '1', - } + }; // should be it's own job, it's missing a channel id, so its private and cant be grouped in a message const fileUploadJob4 = { file: Buffer.from('test'), @@ -494,13 +502,14 @@ describe('file-upload', () => { thread_ts: '1.0', initial_comment: 'Bye', - } + }; const fileUploadJobs = [fileUploadJob1, fileUploadJob2, fileUploadJob3, fileUploadJob4]; + // @ts-expect-error TODO: unions of function parameters must apply to intersection of them, too const toComplete = getAllFileUploadsToComplete(fileUploadJobs); - // there should be 3 total jobs to complete + // there should be 3 total jobs to complete assert.equal(Object.keys(toComplete).length, 3); - }) + }); it('should error if a file_id is missing from any fileUpload entry', () => { const fileUploadJob1 = { file: Buffer.from('test'), @@ -508,16 +517,16 @@ describe('file-upload', () => { title: 'test1', initial_comment: 'Hi', thread_ts: '1.0', - channel_id: '1' - } + channel_id: '1', + }; const fileUploadJobs = [fileUploadJob1]; try { - const toComplete = getAllFileUploadsToComplete(fileUploadJobs); + getAllFileUploadsToComplete(fileUploadJobs); assert.fail('Should fail with error because of missing file_id but did not'); } catch (error) { - assert.equal(error.message, buildMissingFileIdError()); + assert.propertyVal(error, 'message', buildMissingFileIdError()); } - }) + }); it('should correctly group entries with no channel_ids', () => { const fileUploadJob1 = { file: Buffer.from('test'), @@ -525,20 +534,19 @@ describe('file-upload', () => { file_id: 'id1', title: 'test1', initial_comment: 'Hi', - } + }; const fileUploadJob2 = { file: Buffer.from('test'), filename: 'test.txt', file_id: 'id2', title: 'test2', initial_comment: 'Hi', - } + }; const fileUploadJobs = [fileUploadJob1, fileUploadJob2]; const toComplete = getAllFileUploadsToComplete(fileUploadJobs); - // there should be 1 total jobs to complete assert.equal(Object.keys(toComplete).length, 1); - }) + }); }); }); diff --git a/packages/web-api/src/file-upload.ts b/packages/web-api/src/file-upload.ts index 78e26f3fd..09ff422ee 100644 --- a/packages/web-api/src/file-upload.ts +++ b/packages/web-api/src/file-upload.ts @@ -1,10 +1,10 @@ -import { readFileSync } from 'fs'; -import { Readable } from 'stream'; +import { readFileSync } from 'node:fs'; +import { Readable } from 'node:stream'; -import { Logger } from '@slack/logger'; +import type { Logger } from '@slack/logger'; import { ErrorCode, errorWithCode } from './errors'; -import { +import type { FileUploadV2, FileUploadV2Job, FilesCompleteUploadExternalArguments, @@ -30,7 +30,7 @@ export async function getFileUploadJob( filename: options.filename ?? fileName, initial_comment: options.initial_comment, snippet_type: options.snippet_type, - title: options.title ?? (options.filename ?? fileName), // default title to filename unless otherwise specified + title: options.title ?? options.filename ?? fileName, // default title to filename unless otherwise specified // calculated data: fileData, length: fileDataBytesLength, @@ -83,55 +83,63 @@ export async function getFileUploadJob( * }); * ``` * @param options provided by user -*/ + */ export async function getMultipleFileUploadJobs( options: FilesUploadV2Arguments, logger: Logger, ): Promise { if ('file_uploads' in options) { // go through each file_upload and create a job for it - return Promise.all(options.file_uploads.map((upload) => { - // ensure no omitted properties included in files_upload entry - // these properties are valid only at the top-level, not - // inside file_uploads. - const { channel_id, channels, initial_comment, thread_ts } = upload as FileUploadV2; - if (channel_id || channels || initial_comment || thread_ts) { + return Promise.all( + options.file_uploads.map((upload) => { + // ensure no omitted properties included in files_upload entry + // these properties are valid only at the top-level, not + // inside file_uploads. + const { channel_id, channels, initial_comment, thread_ts } = upload as FileUploadV2; + if (channel_id || channels || initial_comment || thread_ts) { + throw errorWithCode( + new Error(buildInvalidFilesUploadParamError()), + ErrorCode.FileUploadInvalidArgumentsError, + ); + } + // takes any channel_id, initial_comment and thread_ts + // supplied at the top level. + const uploadJobArgs: Record = { + ...upload, + channels: options.channels, + channel_id: options.channel_id, + initial_comment: options.initial_comment, + }; + if ('thread_ts' in options) { + uploadJobArgs.thread_ts = options.thread_ts; + } + if ('token' in options) { + uploadJobArgs.token = options.token; + } + if ('content' in upload) { + return getFileUploadJob( + { + content: upload.content, + ...uploadJobArgs, + }, + logger, + ); + } + if ('file' in upload) { + return getFileUploadJob( + { + file: upload.file, + ...uploadJobArgs, + }, + logger, + ); + } throw errorWithCode( - new Error(buildInvalidFilesUploadParamError()), + new Error('Either a file or content field is required for valid file upload. You must supply one'), ErrorCode.FileUploadInvalidArgumentsError, ); - } - // takes any channel_id, initial_comment and thread_ts - // supplied at the top level. - const uploadJobArgs: Record = { - ...upload, - channels: options.channels, - channel_id: options.channel_id, - initial_comment: options.initial_comment, - }; - if ('thread_ts' in options) { - uploadJobArgs.thread_ts = options.thread_ts; - } - if ('token' in options) { - uploadJobArgs.token = options.token; - } - if ('content' in upload) { - return getFileUploadJob({ - content: upload.content, - ...uploadJobArgs, - }, logger); - } - if ('file' in upload) { - return getFileUploadJob({ - file: upload.file, - ...uploadJobArgs, - }, logger); - } - throw errorWithCode( - new Error('Either a file or content field is required for valid file upload. You must supply one'), - ErrorCode.FileUploadInvalidArgumentsError, - ); - })); + }), + ); } throw new Error(buildFilesUploadMissingMessage()); } @@ -159,7 +167,9 @@ export async function getFileData(options: FilesUploadV2Arguments | FileUploadV2 return dataBuffer; } catch (error) { throw errorWithCode( - new Error(`Unable to resolve file data for ${file}. Please supply a filepath string, or binary data Buffer or String directly.`), + new Error( + `Unable to resolve file data for ${file}. Please supply a filepath string, or binary data Buffer or String directly.`, + ), ErrorCode.FileUploadInvalidArgumentsError, ); } @@ -182,10 +192,7 @@ export function getFileDataLength(data: Buffer): number { if (data) { return Buffer.byteLength(data, 'utf8'); } - throw errorWithCode( - new Error(buildFileSizeErrorMsg()), - ErrorCode.FileUploadReadFileDataError, - ); + throw errorWithCode(new Error(buildFileSizeErrorMsg()), ErrorCode.FileUploadReadFileDataError); } export async function getFileDataAsStream(readable: Readable): Promise { @@ -194,7 +201,7 @@ export async function getFileDataAsStream(readable: Readable): Promise { return new Promise((resolve, reject) => { readable.on('readable', () => { let chunk: Buffer; - /* eslint-disable no-cond-assign */ + // biome-ignore lint/suspicious/noAssignInExpressions: being terse, this is OK while ((chunk = readable.read()) !== null) { chunks.push(chunk); } @@ -219,10 +226,11 @@ export async function getFileDataAsStream(readable: Readable): Promise { * @param fileUploads * @returns */ -export function getAllFileUploadsToComplete(fileUploads: FileUploadV2Job[]): -Record { +export function getAllFileUploadsToComplete( + fileUploads: FileUploadV2Job[], +): Record { const toComplete: Record = {}; - fileUploads.forEach((upload) => { + for (const upload of fileUploads) { const { channel_id, thread_ts, initial_comment, file_id, title } = upload; if (file_id) { const compareString = `:::${channel_id}:::${thread_ts}:::${initial_comment}`; @@ -247,7 +255,7 @@ Record { } else { throw new Error(buildMissingFileIdError()); } - }); + } return toComplete; } @@ -257,7 +265,7 @@ Record { * lower-level utilities. * @param method * @param logger -*/ + */ export function warnIfNotUsingFilesUploadV2(method: string, logger: Logger): void { const targetMethods = ['files.upload']; const isTargetMethod = targetMethods.includes(method); @@ -284,10 +292,7 @@ export function warnIfChannels(options: FilesUploadV2Arguments | FileUploadV2, l export function errorIfChannelsCsv(options: FilesUploadV2Arguments | FileUploadV2): void { const channels = options.channels ? options.channels.split(',') : []; if (channels.length > 1) { - throw errorWithCode( - new Error(buildMultipleChannelsErrorMsg()), - ErrorCode.FileUploadInvalidArgumentsError, - ); + throw errorWithCode(new Error(buildMultipleChannelsErrorMsg()), ErrorCode.FileUploadInvalidArgumentsError); } } @@ -305,10 +310,9 @@ export function errorIfInvalidOrMissingFileData(options: FilesUploadV2Arguments ErrorCode.FileUploadInvalidArgumentsError, ); } - /* eslint-disable @typescript-eslint/no-explicit-any */ if ('file' in options) { const { file } = options; - if (file && !(typeof file === 'string' || Buffer.isBuffer(file) || (file as any) instanceof Readable)) { + if (file && !(typeof file === 'string' || Buffer.isBuffer(file) || file instanceof Readable)) { throw errorWithCode( new Error('file must be a valid string path, buffer or Readable'), ErrorCode.FileUploadInvalidArgumentsError, @@ -316,10 +320,7 @@ export function errorIfInvalidOrMissingFileData(options: FilesUploadV2Arguments } } if ('content' in options && options.content && typeof options.content !== 'string') { - throw errorWithCode( - new Error('content must be a string'), - ErrorCode.FileUploadInvalidArgumentsError, - ); + throw errorWithCode(new Error('content must be a string'), ErrorCode.FileUploadInvalidArgumentsError); } } @@ -369,15 +370,19 @@ export function buildFileSizeErrorMsg(): string { } export function buildLegacyFileTypeWarning(): string { - return 'filetype is no longer a supported field in files.uploadV2.' + + return ( + 'filetype is no longer a supported field in files.uploadV2.' + ' \nPlease remove this field. To indicate file type, please do so via the required filename property' + - ' using the appropriate file extension, e.g. image.png, text.txt'; + ' using the appropriate file extension, e.g. image.png, text.txt' + ); } export function buildMissingFileNameWarning(): string { - return 'filename is a required field for files.uploadV2. \n For backwards compatibility and ease of migration, ' + + return ( + 'filename is a required field for files.uploadV2. \n For backwards compatibility and ease of migration, ' + 'defaulting the filename. For best experience and consistent unfurl behavior, you' + - ' should set the filename property with correct file extension, e.g. image.png, text.txt'; + ' should set the filename property with correct file extension, e.g. image.png, text.txt' + ); } export function buildMissingExtensionWarning(filename: string): string { @@ -389,8 +394,10 @@ export function buildLegacyMethodWarning(method: string): string { } export function buildGeneralFilesUploadWarning(): string { - return 'Our latest recommendation is to use client.files.uploadV2() method, ' + - 'which is mostly compatible and much stabler, instead.'; + return ( + 'Our latest recommendation is to use client.files.uploadV2() method, ' + + 'which is mostly compatible and much stabler, instead.' + ); } export function buildFilesUploadMissingMessage(): string { @@ -398,8 +405,10 @@ export function buildFilesUploadMissingMessage(): string { } export function buildChannelsWarning(): string { - return 'Although the \'channels\' parameter is still supported for smoother migration from legacy files.upload, ' + - 'we recommend using the new channel_id parameter with a single str value instead (e.g. \'C12345\').'; + return ( + "Although the 'channels' parameter is still supported for smoother migration from legacy files.upload, " + + "we recommend using the new channel_id parameter with a single str value instead (e.g. 'C12345')." + ); } export function buildMultipleChannelsErrorMsg(): string { @@ -407,6 +416,8 @@ export function buildMultipleChannelsErrorMsg(): string { } export function buildInvalidFilesUploadParamError(): string { - return 'You may supply file_uploads only for a single channel, comment, thread respectively. ' + - 'Therefore, please supply any channel_id, initial_comment, thread_ts in the top-layer.'; + return ( + 'You may supply file_uploads only for a single channel, comment, thread respectively. ' + + 'Therefore, please supply any channel_id, initial_comment, thread_ts in the top-layer.' + ); } diff --git a/packages/web-api/src/instrument.ts b/packages/web-api/src/instrument.ts index d47f30eea..a45440a95 100644 --- a/packages/web-api/src/instrument.ts +++ b/packages/web-api/src/instrument.ts @@ -1,5 +1,5 @@ -import * as os from 'os'; -import { basename } from 'path'; +import * as os from 'node:os'; +import { basename } from 'node:path'; // eslint-disable-next-line @typescript-eslint/no-var-requires, import/no-commonjs const packageJson = require('../package.json'); @@ -17,9 +17,10 @@ function replaceSlashes(s: string): string { // v1.16.2 and use of the --unstable flag. Once support for this exists without the --unstable flag, we can improve // the `os` module deno shim to correctly report operating system from a deno runtime. Until then, the below `os`- // based code will report "browser/undefined" from a deno runtime. -const baseUserAgent = `${replaceSlashes(packageJson.name)}/${packageJson.version} ` + - `${basename(process.title)}/${process.version.replace('v', '')} ` + - `${os.platform()}/${os.release()}`; +const baseUserAgent = + `${replaceSlashes(packageJson.name)}/${packageJson.version} ` + + `${basename(process.title)}/${process.version.replace('v', '')} ` + + `${os.platform()}/${os.release()}`; const appMetadata: { [key: string]: string } = {}; @@ -28,7 +29,7 @@ const appMetadata: { [key: string]: string } = {}; * @param appMetadata.name - name of tool to be counted in instrumentation * @param appMetadata.version - version of tool to be counted in instrumentation */ -export function addAppMetadata({ name, version }: { name: string, version: string }): void { +export function addAppMetadata({ name, version }: { name: string; version: string }): void { appMetadata[replaceSlashes(name)] = version; } @@ -36,7 +37,9 @@ export function addAppMetadata({ name, version }: { name: string, version: strin * Returns the current User-Agent value for instrumentation */ export function getUserAgent(): string { - const appIdentifier = Object.entries(appMetadata).map(([name, version]) => `${name}/${version}`).join(' '); + const appIdentifier = Object.entries(appMetadata) + .map(([name, version]) => `${name}/${version}`) + .join(' '); // only prepend the appIdentifier when its not empty - return ((appIdentifier.length > 0) ? `${appIdentifier} ` : '') + baseUserAgent; + return (appIdentifier.length > 0 ? `${appIdentifier} ` : '') + baseUserAgent; } diff --git a/packages/web-api/src/logger.ts b/packages/web-api/src/logger.ts index e9509fdb8..6cbe25a35 100644 --- a/packages/web-api/src/logger.ts +++ b/packages/web-api/src/logger.ts @@ -1,4 +1,4 @@ -import { ConsoleLogger, LogLevel, Logger } from '@slack/logger'; +import { ConsoleLogger, type LogLevel, type Logger } from '@slack/logger'; export { Logger, LogLevel } from '@slack/logger'; @@ -14,7 +14,9 @@ export function getLogger(name: string, level: LogLevel, existingLogger?: Logger // Set up the logger. const logger: Logger = (() => { - if (existingLogger !== undefined) { return existingLogger; } + if (existingLogger !== undefined) { + return existingLogger; + } return new ConsoleLogger(); })(); logger.setName(`web-api:${name}:${instanceId}`); diff --git a/packages/web-api/src/methods.ts b/packages/web-api/src/methods.ts index a8a92df49..7d42d151a 100644 --- a/packages/web-api/src/methods.ts +++ b/packages/web-api/src/methods.ts @@ -1,6 +1,6 @@ import { EventEmitter } from 'eventemitter3'; -import { WebAPICallResult, WebClient, WebClientEvent } from './WebClient'; +import { type WebAPICallResult, WebClient, type WebClientEvent } from './WebClient'; // Request, followed by response, types import type { @@ -501,29 +501,41 @@ import type { /** * Generic method definition */ -export default interface Method< - MethodArguments, - MethodResult extends WebAPICallResult = WebAPICallResult, -> { - (options: MethodArguments): Promise; -} +type MethodWithRequiredArgument = ( + options: MethodArguments, +) => Promise; +type MethodWithOptionalArgument = ( + options?: MethodArguments, +) => Promise; + +export default MethodWithOptionalArgument; /** - * Binds a certain `method` and its arguments and result types to the `apiCall` method in `WebClient`. + * Binds a certain `method` and its (required) arguments and result types to the `apiCall` method in `WebClient`. */ function bindApiCall( self: Methods, method: string, -): Method { - // We have to 'assert' that the bound method does indeed return the more specific `Result` type instead of just - // `WebAPICallResult` - return self.apiCall.bind(self, method) as Method; +): MethodWithRequiredArgument { + const apiMethod = self.apiCall.bind(self, method); + return apiMethod as MethodWithRequiredArgument; +} + +/** + * Binds a certain `method` and its (required) arguments and result types to the `apiCall` method in `WebClient`. + */ +function bindApiCallWithOptionalArgument( + self: Methods, + method: string, +): MethodWithOptionalArgument { + const apiMethod = self.apiCall.bind(self, method); + return apiMethod as MethodWithOptionalArgument; } function bindFilesUploadV2( self: Methods, -): Method { - return self.filesUploadV2.bind(self) as unknown as Method; +): MethodWithRequiredArgument { + return self.filesUploadV2.bind(self) as unknown as MethodWithRequiredArgument; } /** @@ -549,7 +561,10 @@ export abstract class Methods extends EventEmitter { * @description Retrieve analytics data for a given date, presented as a compressed JSON file. * @see {@link https://api.slack.com/methods/api.test `api.test` API reference}. */ - getFile: bindApiCall(this, 'admin.analytics.getFile'), + getFile: bindApiCall( + this, + 'admin.analytics.getFile', + ), }, apps: { activities: { @@ -557,7 +572,10 @@ export abstract class Methods extends EventEmitter { * @description Get logs for a specified team/org. * @see {@link https://api.slack.com/methods/admin.apps.activities.list `admin.apps.activities.list` API reference}. */ - list: bindApiCall(this, 'admin.apps.activities.list'), + list: bindApiCallWithOptionalArgument( + this, + 'admin.apps.activities.list', + ), }, /** * @description Approve an app for installation on a workspace. @@ -569,19 +587,28 @@ export abstract class Methods extends EventEmitter { * @description List approved apps for an org or workspace. * @see {@link https://api.slack.com/methods/admin.apps.approved.list `admin.apps.approved.list` API reference}. */ - list: bindApiCall(this, 'admin.apps.approved.list'), + list: bindApiCall( + this, + 'admin.apps.approved.list', + ), }, /** * @description Clear an app resolution. * @see {@link https://api.slack.com/methods/admin.apps.clearResolution `admin.apps.clearResolution` API reference}. */ - clearResolution: bindApiCall(this, 'admin.apps.clearResolution'), + clearResolution: bindApiCall( + this, + 'admin.apps.clearResolution', + ), config: { /** * @description Look up the app config for connectors by their IDs. * @see {@link https://api.slack.com/methods/admin.apps.config.lookup `admin.apps.config.lookup` API reference}. */ - lookup: bindApiCall(this, 'admin.apps.config.lookup'), + lookup: bindApiCall( + this, + 'admin.apps.config.lookup', + ), /** * @description Set the app config for a connector. * @see {@link https://api.slack.com/methods/admin.apps.config.set `admin.apps.config.set` API reference}. @@ -593,12 +620,18 @@ export abstract class Methods extends EventEmitter { * @description Cancel app request for team. * @see {@link https://api.slack.com/methods/admin.apps.requests.cancel `admin.apps.requests.cancel` API reference}. */ - cancel: bindApiCall(this, 'admin.apps.requests.cancel'), + cancel: bindApiCall( + this, + 'admin.apps.requests.cancel', + ), /** * @description List app requests for a team/workspace. * @see {@link https://api.slack.com/methods/admin.apps.requests.list `admin.apps.requests.list` API reference}. */ - list: bindApiCall(this, 'admin.apps.requests.list'), + list: bindApiCall( + this, + 'admin.apps.requests.list', + ), }, /** * @description Restrict an app for installation on a workspace. @@ -610,8 +643,10 @@ export abstract class Methods extends EventEmitter { * @description List restricted apps for an org or workspace. * @see {@link https://api.slack.com/methods/admin.apps.restricted.list `admin.apps.restricted.list` API reference}. */ - list: - bindApiCall(this, 'admin.apps.restricted.list'), + list: bindApiCall( + this, + 'admin.apps.restricted.list', + ), }, /** * @description Uninstall an app from one or many workspaces, or an entire enterprise organization. @@ -625,17 +660,26 @@ export abstract class Methods extends EventEmitter { * @description Assign entities to a particular authentication policy. * @see {@link https://api.slack.com/methods/admin.auth.policy.assignEntities `admin.auth.policy.assignEntities` API reference}. */ - assignEntities: bindApiCall(this, 'admin.auth.policy.assignEntities'), + assignEntities: bindApiCall( + this, + 'admin.auth.policy.assignEntities', + ), /** * @description Fetch all the entities assigned to a particular authentication policy by name. * @see {@link https://api.slack.com/methods/admin.auth.policy.getEntities `admin.auth.policy.getEntities` API reference}. */ - getEntities: bindApiCall(this, 'admin.auth.policy.getEntities'), + getEntities: bindApiCall( + this, + 'admin.auth.policy.getEntities', + ), /** * @description Remove specified entities from a specified authentication policy. * @see {@link https://api.slack.com/methods/admin.auth.policy.removeEntities `admin.auth.policy.removeEntities` API reference}. */ - removeEntities: bindApiCall(this, 'admin.auth.policy.removeEntities'), + removeEntities: bindApiCall( + this, + 'admin.auth.policy.removeEntities', + ), }, }, barriers: { @@ -653,7 +697,10 @@ export abstract class Methods extends EventEmitter { * @description Get all Information Barriers for your organization. * @see {@link https://api.slack.com/methods/admin.barriers.list `admin.barriers.list` API reference}. */ - list: bindApiCall(this, 'admin.barriers.list'), + list: bindApiCallWithOptionalArgument( + this, + 'admin.barriers.list', + ), /** * @description Update an existing Information Barrier. * @see {@link https://api.slack.com/methods/admin.barriers.update `admin.barriers.update` API reference}. @@ -665,90 +712,101 @@ export abstract class Methods extends EventEmitter { * @description Archive a public or private channel. * @see {@link https://api.slack.com/methods/admin.conversations.archive `admin.conversations.archive` API reference}. */ - archive: bindApiCall(this, 'admin.conversations.archive'), + archive: bindApiCall( + this, + 'admin.conversations.archive', + ), /** * @description Archive public or private channels in bulk. * @see {@link https://api.slack.com/methods/admin.conversations.bulkArchive `admin.conversations.bulkArchive` API reference}. */ - bulkArchive: bindApiCall(this, 'admin.conversations.bulkArchive'), + bulkArchive: bindApiCall( + this, + 'admin.conversations.bulkArchive', + ), /** * @description Delete public or private channels in bulk. * @see {@link https://api.slack.com/methods/admin.conversations.bulkDelet `admin.conversations.bulkDelete` API reference}. */ - bulkDelete: bindApiCall(this, 'admin.conversations.bulkDelete'), + bulkDelete: bindApiCall( + this, + 'admin.conversations.bulkDelete', + ), /** * @description Move public or private channels in bulk. * @see {@link https://api.slack.com/methods/admin.conversations.bulkMove `admin.conversations.bulkMove` API reference}. */ - bulkMove: bindApiCall(this, 'admin.conversations.bulkMove'), + bulkMove: bindApiCall( + this, + 'admin.conversations.bulkMove', + ), /** * @description Convert a public channel to a private channel. * @see {@link https://api.slack.com/methods/admin.conversations.convertToPrivate `admin.conversations.convertToPrivate` API reference}. */ - convertToPrivate: - bindApiCall( - this, - 'admin.conversations.convertToPrivate', - ), + convertToPrivate: bindApiCall< + AdminConversationsConvertToPrivateArguments, + AdminConversationsConvertToPrivateResponse + >(this, 'admin.conversations.convertToPrivate'), /** * @description Convert a private channel to a public channel. * @see {@link https://api.slack.com/methods/admin.conversations.convertToPublic `admin.conversations.convertToPublic` API reference}. */ - convertToPublic: - bindApiCall( - this, - 'admin.conversations.convertToPublic', - ), + convertToPublic: bindApiCall< + AdminConversationsConvertToPublicArguments, + AdminConversationsConvertToPublicResponse + >(this, 'admin.conversations.convertToPublic'), /** * @description Create a public or private channel-based conversation. * @see {@link https://api.slack.com/methods/admin.conversations.create `admin.conversations.create` API reference}. */ - create: bindApiCall(this, 'admin.conversations.create'), + create: bindApiCall( + this, + 'admin.conversations.create', + ), /** * @description Delete a public or private channel. * @see {@link https://api.slack.com/methods/admin.conversations.delete `admin.conversations.delete` API reference}. */ - delete: bindApiCall(this, 'admin.conversations.delete'), + delete: bindApiCall( + this, + 'admin.conversations.delete', + ), /** * @description Disconnect a connected channel from one or more workspaces. * @see {@link https://api.slack.com/methods/admin.conversations.disconnectShared `admin.conversations.disconnectShared` API reference}. */ - disconnectShared: - bindApiCall( - this, - 'admin.conversations.disconnectShared', - ), + disconnectShared: bindApiCall< + AdminConversationsDisconnectSharedArguments, + AdminConversationsDisconnectSharedResponse + >(this, 'admin.conversations.disconnectShared'), ekm: { /** * @description List all disconnected channels — i.e., channels that were once connected to other workspaces * and then disconnected — and the corresponding original channel IDs for key revocation with EKM. * @see {@link https://api.slack.com/methods/admin.conversations.ekm.listOriginalConnectedChannelInfo `admin.conversations.ekm.listOriginalConnectedChannelInfo` API reference}. */ - listOriginalConnectedChannelInfo: - bindApiCall( - this, - 'admin.conversations.ekm.listOriginalConnectedChannelInfo', - ), + listOriginalConnectedChannelInfo: bindApiCallWithOptionalArgument< + AdminConversationsEKMListOriginalConnectedChannelInfoArguments, + AdminConversationsEkmListOriginalConnectedChannelInfoResponse + >(this, 'admin.conversations.ekm.listOriginalConnectedChannelInfo'), }, /** * @description Get conversation preferences for a public or private channel. * @see {@link https://api.slack.com/methods/admin.conversations.getConversationPrefs `admin.conversations.getConversationPrefs` API reference}. */ - getConversationPrefs: - bindApiCall( - this, - 'admin.conversations.getConversationPrefs', - ), + getConversationPrefs: bindApiCall< + AdminConversationsGetConversationPrefsArguments, + AdminConversationsGetConversationPrefsResponse + >(this, 'admin.conversations.getConversationPrefs'), /** * @description Get a conversation's retention policy. * @see {@link https://api.slack.com/methods/admin.conversations.getCustomRetention `admin.conversations.getCustomRetention` API reference}. */ - getCustomRetention: - bindApiCall( - this, - 'admin.conversations.getCustomRetention', - ), + getCustomRetention: bindApiCall< + AdminConversationsGetCustomRetentionArguments, + AdminConversationsGetCustomRetentionResponse + >(this, 'admin.conversations.getCustomRetention'), /** * @description Get all the workspaces a given public or private channel is connected to within * this Enterprise org. @@ -762,80 +820,84 @@ export abstract class Methods extends EventEmitter { * @description Invite a user to a public or private channel. * @see {@link https://api.slack.com/methods/admin.conversations.invite `admin.conversations.invite` API reference}. */ - invite: bindApiCall(this, 'admin.conversations.invite'), + invite: bindApiCall( + this, + 'admin.conversations.invite', + ), /** * @description Returns channels on the given team using the filters. * @see {@link https://api.slack.com/methods/admin.conversations.lookup `admin.conversations.lookup` API reference}. */ - lookup: bindApiCall(this, 'admin.conversations.lookup'), + lookup: bindApiCall( + this, + 'admin.conversations.lookup', + ), /** * @description Remove a conversation's retention policy. * @see {@link https://api.slack.com/methods/admin.conversations.removeCustomRetention `admin.conversations.removeCustomRetention` API reference}. */ - removeCustomRetention: - bindApiCall( - this, - 'admin.conversations.removeCustomRetention', - ), + removeCustomRetention: bindApiCall< + AdminConversationsRemoveCustomRetentionArguments, + AdminConversationsRemoveCustomRetentionResponse + >(this, 'admin.conversations.removeCustomRetention'), /** * @description Rename a public or private channel. * @see {@link https://api.slack.com/methods/admin.conversations.rename `admin.conversations.rename` API reference}. */ - rename: bindApiCall(this, 'admin.conversations.rename'), + rename: bindApiCall( + this, + 'admin.conversations.rename', + ), restrictAccess: { /** * @description Add an allowlist of IDP groups for accessing a channel. * @see {@link https://api.slack.com/methods/admin.conversations.restrictAccess.addGroup `admin.conversations.restrictAccess.addGroup` API reference}. */ - addGroup: bindApiCall( - this, - 'admin.conversations.restrictAccess.addGroup', - ), + addGroup: bindApiCall< + AdminConversationsRestrictAccessAddGroupArguments, + AdminConversationsRestrictAccessAddGroupResponse + >(this, 'admin.conversations.restrictAccess.addGroup'), /** * @description List all IDP Groups linked to a channel. * @see {@link https://api.slack.com/methods/admin.conversations.restrictAccess.listGroups `admin.conversations.restrictAccess.listGroups` API reference}. */ - listGroups: - bindApiCall( - this, - 'admin.conversations.restrictAccess.listGroups', - ), + listGroups: bindApiCall< + AdminConversationsRestrictAccessListGroupsArguments, + AdminConversationsRestrictAccessListGroupsResponse + >(this, 'admin.conversations.restrictAccess.listGroups'), /** * @description Remove a linked IDP group linked from a private channel. * @see {@link https://api.slack.com/methods/admin.conversations.restrictAccess.removeGroup `admin.conversations.restrictAccess.removeGroup` API reference}. */ - removeGroup: - bindApiCall( - this, - 'admin.conversations.restrictAccess.removeGroup', - ), + removeGroup: bindApiCall< + AdminConversationsRestrictAccessRemoveGroupArguments, + AdminConversationsRestrictAccessRemoveGroupResponse + >(this, 'admin.conversations.restrictAccess.removeGroup'), }, /** * @description Search for public or private channels in an Enterprise organization. * @see {@link https://api.slack.com/methods/admin.conversations.search `admin.conversations.search` API reference}. */ - search: bindApiCall(this, 'admin.conversations.search'), + search: bindApiCallWithOptionalArgument( + this, + 'admin.conversations.search', + ), /** * @description Set the posting permissions for a public or private channel. * @see {@link https://api.slack.com/methods/admin.conversations.setConversationPrefs `admin.conversations.setConversationPrefs` API reference}. */ - setConversationPrefs: - bindApiCall( - this, - 'admin.conversations.setConversationPrefs', - ), + setConversationPrefs: bindApiCall< + AdminConversationsSetConversationPrefsArguments, + AdminConversationsSetConversationPrefsResponse + >(this, 'admin.conversations.setConversationPrefs'), /** * @description Set a conversation's retention policy. * @see {@link https://api.slack.com/methods/admin.conversations.setCustomRetention `admin.conversations.setCustomRetention` API reference}. */ - setCustomRetention: - bindApiCall( - this, - 'admin.conversations.setCustomRetention', - ), + setCustomRetention: bindApiCall< + AdminConversationsSetCustomRetentionArguments, + AdminConversationsSetCustomRetentionResponse + >(this, 'admin.conversations.setCustomRetention'), /** * @description Set the workspaces in an Enterprise grid org that connect to a public or private channel. * @see {@link https://api.slack.com/methods/admin.conversations.setTeams `admin.conversations.setTeams` API reference}. @@ -868,7 +930,7 @@ export abstract class Methods extends EventEmitter { * @description List emoji for an Enterprise Grid organization. * @see {@link https://api.slack.com/methods/admin.emoji.list `admin.emoji.list` API reference}. */ - list: bindApiCall(this, 'admin.emoji.list'), + list: bindApiCallWithOptionalArgument(this, 'admin.emoji.list'), /** * @description Remove an emoji across an Enterprise Grid organization. * @see {@link https://api.slack.com/methods/admin.emoji.remove `admin.emoji.remove` API reference}. @@ -892,13 +954,19 @@ export abstract class Methods extends EventEmitter { * it is limited to particular named entities. * @see {@link https://api.slack.com/methods/admin.functions.permissions.lookup `admin.functions.permissions.lookup` API reference}. */ - lookup: bindApiCall(this, 'admin.functions.permissions.lookup'), + lookup: bindApiCall( + this, + 'admin.functions.permissions.lookup', + ), /** * @description Set the visibility of a Slack function and define the users or workspaces if * it is set to named_entities. * @see {@link https://api.slack.com/methods/admin.functions.permissions.set `admin.functions.permissions.set` API reference}. */ - set: bindApiCall(this, 'admin.functions.permissions.set'), + set: bindApiCall( + this, + 'admin.functions.permissions.set', + ), }, }, inviteRequests: { @@ -934,30 +1002,45 @@ export abstract class Methods extends EventEmitter { * @description Deny a workspace invite request. * @see {@link https://api.slack.com/methods/admin.inviteRequests.deny `admin.inviteRequests.deny` API reference}. */ - deny: bindApiCall(this, 'admin.inviteRequests.deny'), + deny: bindApiCall( + this, + 'admin.inviteRequests.deny', + ), /** * @description List all pending workspace invite requests. * @see {@link https://api.slack.com/methods/admin.inviteRequests.list `admin.inviteRequests.list` API reference}. */ - list: bindApiCall(this, 'admin.inviteRequests.list'), + list: bindApiCall( + this, + 'admin.inviteRequests.list', + ), }, roles: { /** * @description Adds members to the specified role with the specified scopes. * @see {@link https://api.slack.com/methods/admin.roles.addAssignments `admin.roles.addAssignments` API reference}. */ - addAssignments: bindApiCall(this, 'admin.roles.addAssignments'), + addAssignments: bindApiCall( + this, + 'admin.roles.addAssignments', + ), /** * @description Lists assignments for all roles across entities. * Options to scope results by any combination of roles or entities. * @see {@link https://api.slack.com/methods/admin.roles.listAssignments `admin.roles.listAssignments` API reference}. */ - listAssignments: bindApiCall(this, 'admin.roles.listAssignments'), + listAssignments: bindApiCallWithOptionalArgument< + AdminRolesListAssignmentsArguments, + AdminRolesListAssignmentsResponse + >(this, 'admin.roles.listAssignments'), /** * @description Removes a set of users from a role for the given scopes and entities. * @see {@link https://api.slack.com/methods/admin.roles.removeAssignments `admin.roles.removeAssignments` API reference}. */ - removeAssignments: bindApiCall(this, 'admin.roles.removeAssignments'), + removeAssignments: bindApiCall( + this, + 'admin.roles.removeAssignments', + ), }, teams: { admins: { @@ -976,7 +1059,7 @@ export abstract class Methods extends EventEmitter { * @description List all teams on an Enterprise organization. * @see {@link https://api.slack.com/methods/admin.teams.list `admin.teams.list` API reference}. */ - list: bindApiCall(this, 'admin.teams.list'), + list: bindApiCallWithOptionalArgument(this, 'admin.teams.list'), owners: { /** * @description List all of the owners on a given workspace. @@ -989,35 +1072,34 @@ export abstract class Methods extends EventEmitter { * @description Fetch information about settings in a workspace. * @see {@link https://api.slack.com/methods/admin.teams.owners.list `admin.teams.owners.list` API reference}. */ - info: bindApiCall(this, 'admin.teams.settings.info'), + info: bindApiCall( + this, + 'admin.teams.settings.info', + ), /** * @description Set the default channels of a workspace. * @see {@link https://api.slack.com/methods/admin.teams.settings.setDefaultChannels `admin.teams.settings.setDefaultChannels` API reference}. */ - setDefaultChannels: - bindApiCall( - this, - 'admin.teams.settings.setDefaultChannels', - ), + setDefaultChannels: bindApiCall< + AdminTeamsSettingsSetDefaultChannelsArguments, + AdminTeamsSettingsSetDefaultChannelsResponse + >(this, 'admin.teams.settings.setDefaultChannels'), /** * @description Set the description of a given workspace. * @see {@link https://api.slack.com/methods/admin.teams.settings.setDescription `admin.teams.settings.setDescription` API reference}. */ - setDescription: - bindApiCall( - this, - 'admin.teams.settings.setDescription', - ), + setDescription: bindApiCall< + AdminTeamsSettingsSetDescriptionArguments, + AdminTeamsSettingsSetDescriptionResponse + >(this, 'admin.teams.settings.setDescription'), /** * @description Set the discoverability of a given workspace. * @see {@link https://api.slack.com/methods/admin.teams.settings.setDiscoverability `admin.teams.settings.setDiscoverability` API reference}. */ - setDiscoverability: - bindApiCall( - this, - 'admin.teams.settings.setDiscoverability', - ), + setDiscoverability: bindApiCall< + AdminTeamsSettingsSetDiscoverabilityArguments, + AdminTeamsSettingsSetDiscoverabilityResponse + >(this, 'admin.teams.settings.setDiscoverability'), /** * @description Sets the icon of a workspace. * @see {@link https://api.slack.com/methods/admin.teams.settings.setIcon `admin.teams.settings.setIcon` API reference}. @@ -1085,7 +1167,7 @@ export abstract class Methods extends EventEmitter { * @description List users on a workspace. * @see {@link https://api.slack.com/methods/admin.users.list `admin.users.list` API reference}. */ - list: bindApiCall(this, 'admin.users.list'), + list: bindApiCallWithOptionalArgument(this, 'admin.users.list'), /** * @description Remove a user from a workspace. * @see {@link https://api.slack.com/methods/admin.users.remove `admin.users.remove` API reference}. @@ -1122,17 +1204,26 @@ export abstract class Methods extends EventEmitter { * @description List active user sessions for an organization. * @see {@link https://api.slack.com/methods/admin.users.session.list `admin.users.session.list` API reference}. */ - list: bindApiCall(this, 'admin.users.session.list'), + list: bindApiCallWithOptionalArgument( + this, + 'admin.users.session.list', + ), /** * @description Wipes all valid sessions on all devices for a given user. * @see {@link https://api.slack.com/methods/admin.users.session.reset `admin.users.session.reset` API reference}. */ - reset: bindApiCall(this, 'admin.users.session.reset'), + reset: bindApiCall( + this, + 'admin.users.session.reset', + ), /** * @description Enqueues an asynchronous job to wipe all valid sessions on all devices for a given user list. * @see {@link https://api.slack.com/methods/admin.users.session.resetBulk `admin.users.session.resetBulk` API reference}. */ - resetBulk: bindApiCall(this, 'admin.users.session.resetBulk'), + resetBulk: bindApiCall( + this, + 'admin.users.session.resetBulk', + ), /** * @description Configure the user-level session settings—the session duration and what happens when the client * closes—for one or more users. @@ -1152,19 +1243,15 @@ export abstract class Methods extends EventEmitter { * @description Set an expiration for a guest user. * @see {@link https://api.slack.com/methods/admin.users.setExpiration `admin.users.setExpiration` API reference}. */ - setExpiration: - bindApiCall( - this, - 'admin.users.setExpiration', - ), + setExpiration: bindApiCall( + this, + 'admin.users.setExpiration', + ), /** * @description Set an existing guest, regular user, or admin user to be a workspace owner. * @see {@link https://api.slack.com/methods/admin.users.setOwner `admin.users.setOwner` API reference}. */ - setOwner: bindApiCall( - this, - 'admin.users.setOwner', - ), + setOwner: bindApiCall(this, 'admin.users.setOwner'), /** * @description Set an existing guest user, admin user, or owner to be a regular user. * @see {@link https://api.slack.com/methods/admin.users.setRegular `admin.users.setRegular` API reference}. @@ -1191,30 +1278,45 @@ export abstract class Methods extends EventEmitter { * @description Add collaborators to workflows within the team or enterprise. * @see {@link https://api.slack.com/methods/admin.workflows.collaborators.add `admin.workflows.collaborators.add` API reference}. */ - add: bindApiCall(this, 'admin.workflows.collaborators.add'), + add: bindApiCall( + this, + 'admin.workflows.collaborators.add', + ), /** * @description Remove collaborators from workflows within the team or enterprise. * @see {@link https://api.slack.com/methods/admin.workflows.collaborators.remove `admin.workflows.collaborators.remove` API reference}. */ - remove: bindApiCall(this, 'admin.workflows.collaborators.remove'), + remove: bindApiCall( + this, + 'admin.workflows.collaborators.remove', + ), }, permissions: { /** * @description Look up the permissions for a set of workflows. * @see {@link https://api.slack.com/methods/admin.workflows.permissions.lookup `admin.workflows.permissions.lookup` API reference}. */ - lookup: bindApiCall(this, 'admin.workflows.permissions.lookup'), + lookup: bindApiCall( + this, + 'admin.workflows.permissions.lookup', + ), }, /** * @description Search workflows within the team or enterprise. * @see {@link https://api.slack.com/methods/admin.workflows.search `admin.workflows.search` API reference}. */ - search: bindApiCall(this, 'admin.workflows.search'), + search: bindApiCallWithOptionalArgument( + this, + 'admin.workflows.search', + ), /** * @description Unpublish workflows within the team or enterprise. * @see {@link https://api.slack.com/methods/admin.workflows.unpublish `admin.workflows.unpublish` API reference}. */ - unpublish: bindApiCall(this, 'admin.workflows.unpublish'), + unpublish: bindApiCall( + this, + 'admin.workflows.unpublish', + ), }, }; @@ -1223,7 +1325,7 @@ export abstract class Methods extends EventEmitter { * @description Checks API calling code. * @see {@link https://api.slack.com/methods/api.test `api.test` API reference}. */ - test: bindApiCall(this, 'api.test'), + test: bindApiCallWithOptionalArgument(this, 'api.test'), }; public readonly apps = { @@ -1233,7 +1335,10 @@ export abstract class Methods extends EventEmitter { * events and interactive payloads over. * @see {@link https://api.slack.com/methods/apps.connections.open `apps.connections.open` API reference}. */ - open: bindApiCall(this, 'apps.connections.open'), + open: bindApiCallWithOptionalArgument( + this, + 'apps.connections.open', + ), }, event: { authorizations: { @@ -1273,7 +1378,10 @@ export abstract class Methods extends EventEmitter { * @description Validate an app manifest. * @see {@link https://api.slack.com/methods/apps.manifest.validate `apps.manifest.validate` API reference}. */ - validate: bindApiCall(this, 'apps.manifest.validate'), + validate: bindApiCall( + this, + 'apps.manifest.validate', + ), }, /** * @description Uninstalls your app from a workspace. @@ -1287,15 +1395,15 @@ export abstract class Methods extends EventEmitter { * @description Revokes a token. * @see {@link https://api.slack.com/methods/auth.revoke `auth.revoke` API reference}. */ - revoke: bindApiCall(this, 'auth.revoke'), + revoke: bindApiCallWithOptionalArgument(this, 'auth.revoke'), teams: { /** * @description Obtain a full list of workspaces your org-wide app has been approved for. * @see {@link https://api.slack.com/methods/auth.teams.list `auth.teams.list` API reference}. */ - list: bindApiCall(this, 'auth.teams.list'), + list: bindApiCallWithOptionalArgument(this, 'auth.teams.list'), }, - test: bindApiCall(this, 'auth.test'), + test: bindApiCallWithOptionalArgument(this, 'auth.test'), }; public readonly bookmarks = { @@ -1326,7 +1434,7 @@ export abstract class Methods extends EventEmitter { * @description Gets information about a bot user. * @see {@link https://api.slack.com/methods/bots.info `bots.info` API reference}. */ - info: bindApiCall(this, 'bots.info'), + info: bindApiCallWithOptionalArgument(this, 'bots.info'), }; public readonly calls = { @@ -1356,7 +1464,10 @@ export abstract class Methods extends EventEmitter { * @see {@link https://api.slack.com/methods/calls.participants.add `calls.participants.add` API reference}. */ add: bindApiCall(this, 'calls.participants.add'), - remove: bindApiCall(this, 'calls.participants.remove'), + remove: bindApiCall( + this, + 'calls.participants.remove', + ), }, }; @@ -1377,7 +1488,7 @@ export abstract class Methods extends EventEmitter { * @description Create Canvas for a user. * @see {@link https://api.slack.com/methods/canvases.create `canvases.create` API reference}. */ - create: bindApiCall(this, 'canvases.create'), + create: bindApiCallWithOptionalArgument(this, 'canvases.create'), /** * @description Deletes a canvas. * @see {@link https://api.slack.com/methods/canvases.delete `canvases.delete` API reference}. @@ -1393,7 +1504,10 @@ export abstract class Methods extends EventEmitter { * @description Find sections matching the provided criteria. * @see {@link https://api.slack.com/methods/canvases.sections.lookup `canvases.sections.lookup` API reference}. */ - lookup: bindApiCall(this, 'canvases.sections.lookup'), + lookup: bindApiCall( + this, + 'canvases.sections.lookup', + ), }, }; @@ -1407,8 +1521,10 @@ export abstract class Methods extends EventEmitter { * @description Deletes a pending scheduled message from the queue. * @see {@link https://api.slack.com/methods/chat.deleteScheduledMessage `chat.deleteScheduledMessage` API reference}. */ - deleteScheduledMessage: - bindApiCall(this, 'chat.deleteScheduledMessage'), + deleteScheduledMessage: bindApiCall( + this, + 'chat.deleteScheduledMessage', + ), /** * @description Retrieve a permalink URL for a specific extant message. * @see {@link https://api.slack.com/methods/chat.getPermalink `chat.getPermalink` API reference}. @@ -1442,11 +1558,10 @@ export abstract class Methods extends EventEmitter { * @description Returns a list of scheduled messages. * @see {@link https://api.slack.com/methods/chat.scheduledMessages.list `chat.scheduledMessages.list` API reference}. */ - list: - bindApiCall( - this, - 'chat.scheduledMessages.list', - ), + list: bindApiCallWithOptionalArgument( + this, + 'chat.scheduledMessages.list', + ), }, /** * @description Provide custom unfurl behavior for user-posted URLs. @@ -1473,11 +1588,10 @@ export abstract class Methods extends EventEmitter { * @description Approves an invitation to a Slack Connect channel. * @see {@link https://api.slack.com/methods/conversations.approveSharedInvite `conversations.approveSharedInvite` API reference}. */ - approveSharedInvite: - bindApiCall( - this, - 'conversations.approveSharedInvite', - ), + approveSharedInvite: bindApiCall< + ConversationsApproveSharedInviteArguments, + ConversationsApproveSharedInviteResponse + >(this, 'conversations.approveSharedInvite'), /** * @description Archives a conversation. * @see {@link https://api.slack.com/methods/conversations.archive `conversations.archive` API reference}. @@ -1488,7 +1602,10 @@ export abstract class Methods extends EventEmitter { * @description Create a Channel Canvas for a channel. * @see {@link https://api.slack.com/methods/conversations.canvases.create `conversations.canvases.create` API reference}. */ - create: bindApiCall(this, 'conversations.canvases.create'), + create: bindApiCall( + this, + 'conversations.canvases.create', + ), }, /** * @description Closes a direct message or multi-person direct message. @@ -1504,18 +1621,20 @@ export abstract class Methods extends EventEmitter { * @description Declines an invitation to a Slack Connect channel. * @see {@link https://api.slack.com/methods/conversations.declineSharedInvite `conversations.declineSharedInvite` API reference}. */ - declineSharedInvite: - bindApiCall( - this, - 'conversations.declineSharedInvite', - ), + declineSharedInvite: bindApiCall< + ConversationsDeclineSharedInviteArguments, + ConversationsDeclineSharedInviteResponse + >(this, 'conversations.declineSharedInvite'), externalInvitePermissions: { /** * @description Convert a team in a shared channel from an External Limited channel to a fully shared Slack * Connect channel or vice versa. * @see {@link https://api.slack.com/methods/conversations.externalInvitePermissions.set `conversations.externalInvitePermissions.set` API reference}. */ - set: bindApiCall(this, 'conversations.externalInvitePermissions.set'), + set: bindApiCall< + ConversationsExternalInvitePermissionsSetArguments, + ConversationsExternalInvitePermissionsSetResponse + >(this, 'conversations.externalInvitePermissions.set'), }, /** * @description Fetches a conversation's history of messages and events. @@ -1559,17 +1678,19 @@ export abstract class Methods extends EventEmitter { * @description List all channels in a Slack team. * @see {@link https://api.slack.com/methods/conversations.list `conversations.list` API reference}. */ - list: bindApiCall(this, 'conversations.list'), + list: bindApiCallWithOptionalArgument( + this, + 'conversations.list', + ), /** * @description Lists shared channel invites that have been generated or received but have not been approved by * all parties. * @see {@link https://api.slack.com/methods/conversations.listConnectInvites `conversations.listConnectInvites` API reference}. */ - listConnectInvites: - bindApiCall( - this, - 'conversations.listConnectInvites', - ), + listConnectInvites: bindApiCallWithOptionalArgument< + ConversationsListConnectInvitesArguments, + ConversationsListConnectInvitesResponse + >(this, 'conversations.listConnectInvites'), /** * @description Sets the read cursor in a channel. * @see {@link https://api.slack.com/methods/conversations.mark `conversations.mark` API reference}. @@ -1599,8 +1720,10 @@ export abstract class Methods extends EventEmitter { * @description Sets the purpose for a conversation. * @see {@link https://api.slack.com/methods/conversations.setPurpose `conversations.setPurpose` API reference}. */ - setPurpose: - bindApiCall(this, 'conversations.setPurpose'), + setPurpose: bindApiCall( + this, + 'conversations.setPurpose', + ), /** * @description Sets the topic for a conversation. * @see {@link https://api.slack.com/methods/conversations.setTopic `conversations.setTopic` API reference}. @@ -1632,17 +1755,17 @@ export abstract class Methods extends EventEmitter { * @description Ends the current user's Do Not Disturb session immediately. * @see {@link https://api.slack.com/methods/dnd.endDnd `dnd.endDnd` API reference}. */ - endDnd: bindApiCall(this, 'dnd.endDnd'), + endDnd: bindApiCallWithOptionalArgument(this, 'dnd.endDnd'), /** * @description Ends the current user's snooze mode immediately. * @see {@link https://api.slack.com/methods/dnd.endSnooze `dnd.endSnooze` API reference}. */ - endSnooze: bindApiCall(this, 'dnd.endSnooze'), + endSnooze: bindApiCallWithOptionalArgument(this, 'dnd.endSnooze'), /** * @description Retrieves a user's current Do Not Disturb status. * @see {@link https://api.slack.com/methods/dnd.info `dnd.info` API reference}. */ - info: bindApiCall(this, 'dnd.info'), + info: bindApiCallWithOptionalArgument(this, 'dnd.info'), /** * @description Turns on Do Not Disturb mode for the current user, or changes its duration. * @see {@link https://api.slack.com/methods/dnd.setSnooze `dnd.setSnooze` API reference}. @@ -1660,7 +1783,7 @@ export abstract class Methods extends EventEmitter { * @description Lists custom emoji for a team. * @see {@link https://api.slack.com/methods/emoji.list `emoji.list` API reference}. */ - list: bindApiCall(this, 'emoji.list'), + list: bindApiCallWithOptionalArgument(this, 'emoji.list'), }; public readonly files = { @@ -1668,8 +1791,10 @@ export abstract class Methods extends EventEmitter { * @description Finishes an upload started with {@link https://api.slack.com/methods/files.getUploadURLExternal `files.getUploadURLExternal`}. * @see {@link https://api.slack.com/methods/files.completeUploadExternal `files.completeUploadExternal` API reference}. */ - completeUploadExternal: - bindApiCall(this, 'files.completeUploadExternal'), + completeUploadExternal: bindApiCall( + this, + 'files.completeUploadExternal', + ), /** * @description Deletes a file. * @see {@link https://api.slack.com/methods/files.delete `files.delete` API reference}. @@ -1679,8 +1804,10 @@ export abstract class Methods extends EventEmitter { * @description Gets a URL for an edge external file upload. * @see {@link https://api.slack.com/methods/files.getUploadURLExternal `files.getUploadURLExternal` API reference}. */ - getUploadURLExternal: - bindApiCall(this, 'files.getUploadURLExternal'), + getUploadURLExternal: bindApiCall( + this, + 'files.getUploadURLExternal', + ), /** * @description Gets information about a file. * @see {@link https://api.slack.com/methods/files.info `files.info` API reference}. @@ -1695,14 +1822,18 @@ export abstract class Methods extends EventEmitter { * @description Revokes public/external sharing access for a file. * @see {@link https://api.slack.com/methods/files.revokePublicURL `files.revokePublicURL` API reference}. */ - revokePublicURL: - bindApiCall(this, 'files.revokePublicURL'), + revokePublicURL: bindApiCall( + this, + 'files.revokePublicURL', + ), /** * @description Enables a file for public/external sharing. * @see {@link https://api.slack.com/methods/files.revokePublicURL `files.revokePublicURL` API reference}. */ - sharedPublicURL: - bindApiCall(this, 'files.sharedPublicURL'), + sharedPublicURL: bindApiCall( + this, + 'files.sharedPublicURL', + ), /** * @description Uploads or creates a file. * @deprecated Use `uploadV2` instead. See {@link https://api.slack.com/changelog/2024-04-a-better-way-to-upload-files-is-here-to-stay our post on retiring `files.upload`}. @@ -1721,7 +1852,7 @@ export abstract class Methods extends EventEmitter { * Will try to honor both single file or content data supplied as well * as multiple file uploads property. * @see {@link https://slack.dev/node-slack-sdk/web-api#upload-a-file `@slack/web-api` Upload a file documentation}. - */ + */ uploadV2: bindFilesUploadV2(this), comments: { /** @@ -1769,7 +1900,10 @@ export abstract class Methods extends EventEmitter { * @description Signal the failure to execute a Custom Function. * @see {@link https://api.slack.com/methods/functions.completeError `functions.completeError` API reference}. */ - completeError: bindApiCall(this, 'functions.completeError'), + completeError: bindApiCall( + this, + 'functions.completeError', + ), /** * @description Signal the successful completion of a Custom Function. * @see {@link https://api.slack.com/methods/functions.completeSuccess `functions.completeSuccess` API reference}. @@ -1820,7 +1954,10 @@ export abstract class Methods extends EventEmitter { * @description Get the identity of a user who has authorized {@link https://api.slack.com/authentication/sign-in-with-slack Sign in with Slack}. * @see {@link https://api.slack.com/methods/openid.connect.userInfo `openid.connect.userInfo` API reference}. */ - userInfo: bindApiCall(this, 'openid.connect.userInfo'), + userInfo: bindApiCallWithOptionalArgument( + this, + 'openid.connect.userInfo', + ), }, }; @@ -1857,7 +1994,7 @@ export abstract class Methods extends EventEmitter { * @description List reactions made by a user. * @see {@link https://api.slack.com/methods/reactions.list `reactions.list` API reference}. */ - list: bindApiCall(this, 'reactions.list'), + list: bindApiCallWithOptionalArgument(this, 'reactions.list'), /** * @description Removes a reaction from an item. * @see {@link https://api.slack.com/methods/reactions.remove `reactions.remove` API reference}. @@ -1892,7 +2029,7 @@ export abstract class Methods extends EventEmitter { * @description Lists all reminders created by or for a given user. * @see {@link https://api.slack.com/methods/reminders.list `reminders.list` API reference}. */ - list: bindApiCall(this, 'reminders.list'), + list: bindApiCallWithOptionalArgument(this, 'reminders.list'), }; public readonly rtm = { @@ -1900,13 +2037,13 @@ export abstract class Methods extends EventEmitter { * @description Starts a Real Time Messaging session. * @see {@link https://api.slack.com/methods/rtm.connect `rtm.connect` API reference}. */ - connect: bindApiCall(this, 'rtm.connect'), + connect: bindApiCallWithOptionalArgument(this, 'rtm.connect'), /** * @description Starts a Real Time Messaging session. * @deprecated Use `rtm.connect` instead. See {@link https://api.slack.com/changelog/2021-10-rtm-start-to-stop our post on retiring `rtm.start`}. * @see {@link https://api.slack.com/methods/rtm.start `rtm.start` API reference}. */ - start: bindApiCall(this, 'rtm.start'), + start: bindApiCallWithOptionalArgument(this, 'rtm.start'), }; public readonly search = { @@ -1932,12 +2069,18 @@ export abstract class Methods extends EventEmitter { * @description Gets the access logs for the current team. * @see {@link https://api.slack.com/methods/team.accessLogs `team.accessLogs` API reference}. */ - accessLogs: bindApiCall(this, 'team.accessLogs'), + accessLogs: bindApiCallWithOptionalArgument( + this, + 'team.accessLogs', + ), /** * @description Gets billable users information for the current team. * @see {@link https://api.slack.com/methods/team.billableInfo `team.billableInfo` API reference}. */ - billableInfo: bindApiCall(this, 'team.billableInfo'), + billableInfo: bindApiCallWithOptionalArgument( + this, + 'team.billableInfo', + ), billing: { /** * @description Reads a workspace's billing plan information. @@ -1950,7 +2093,10 @@ export abstract class Methods extends EventEmitter { * @description Disconnect an external organization. * @see {@link https://api.slack.com/methods/team.externalTeams.disconnect `team.externalTeams.disconnect` API reference}. */ - disconnect: bindApiCall(this, 'team.externalTeams.disconnect'), + disconnect: bindApiCall( + this, + 'team.externalTeams.disconnect', + ), /** * @description Returns a list of all the external teams connected and details about the connection. * @see {@link https://api.slack.com/methods/team.externalTeams.list `team.externalTeams.list` API reference}. @@ -1961,26 +2107,31 @@ export abstract class Methods extends EventEmitter { * @description Gets information about the current team. * @see {@link https://api.slack.com/methods/team.info `team.info` API reference}. */ - info: bindApiCall(this, 'team.info'), + info: bindApiCallWithOptionalArgument(this, 'team.info'), /** * @description Gets the integration logs for the current team. * @see {@link https://api.slack.com/methods/team.integrationLogs `team.integrationLogs` API reference}. */ - integrationLogs: - bindApiCall(this, 'team.integrationLogs'), + integrationLogs: bindApiCallWithOptionalArgument( + this, + 'team.integrationLogs', + ), preferences: { /** * @description Retrieve a list of a workspace's team preferences. * @see {@link https://api.slack.com/methods/team.preferences.list `team.preferences.list` API reference}. */ - list: bindApiCall(this, 'team.preferences.list'), + list: bindApiCallWithOptionalArgument( + this, + 'team.preferences.list', + ), }, profile: { /** * @description Retrieve a team's profile. * @see {@link https://api.slack.com/methods/team.profile.get `team.profile.get` API reference}. */ - get: bindApiCall(this, 'team.profile.get'), + get: bindApiCallWithOptionalArgument(this, 'team.profile.get'), }, }; @@ -2014,7 +2165,7 @@ export abstract class Methods extends EventEmitter { * @description List all User Groups for a team. * @see {@link https://api.slack.com/methods/usergroups.list `usergroups.list` API reference}. */ - list: bindApiCall(this, 'usergroups.list'), + list: bindApiCallWithOptionalArgument(this, 'usergroups.list'), /** * @description Update an existing User Group. * @see {@link https://api.slack.com/methods/usergroups.update `usergroups.update` API reference}. @@ -2025,10 +2176,7 @@ export abstract class Methods extends EventEmitter { * @description List all users in a User Group. * @see {@link https://api.slack.com/methods/usergroups.users.list `usergroups.users.list` API reference}. */ - list: bindApiCall( - this, - 'usergroups.users.list', - ), + list: bindApiCall(this, 'usergroups.users.list'), /** * @description Update the list of users in a User Group. * @see {@link https://api.slack.com/methods/usergroups.users.update `usergroups.users.update` API reference}. @@ -2056,7 +2204,10 @@ export abstract class Methods extends EventEmitter { * @description Lookup an email address to see if someone is on Slack. * @see {@link https://api.slack.com/methods/users.discoverableContacts.lookup `users.discoverableContacts.lookup` API reference}. */ - lookup: bindApiCall(this, 'users.discoverableContacts.lookup'), + lookup: bindApiCall( + this, + 'users.discoverableContacts.lookup', + ), }, /** * @description Gets user presence information. diff --git a/packages/web-api/src/retry-policies.ts b/packages/web-api/src/retry-policies.ts index 9e511e5d7..13588914b 100644 --- a/packages/web-api/src/retry-policies.ts +++ b/packages/web-api/src/retry-policies.ts @@ -1,11 +1,10 @@ -import { OperationOptions } from 'retry'; +import type { OperationOptions } from 'retry'; /** * Options to create retry policies. Extends from https://github.com/tim-kos/node-retry. */ // eslint-disable-next-line @typescript-eslint/no-empty-interface -export interface RetryOptions extends OperationOptions { -} +export interface RetryOptions extends OperationOptions {} /** * The default retry policy. Retry up to 10 times, over the span of about 30 minutes. It's not exact because diff --git a/packages/web-api/src/types/helpers.ts b/packages/web-api/src/types/helpers.ts index d49aefdfc..2ed361985 100644 --- a/packages/web-api/src/types/helpers.ts +++ b/packages/web-api/src/types/helpers.ts @@ -1,4 +1,4 @@ /** Omit all keys K from possible union types T */ export type ExcludeFromUnion = T extends T ? Omit : never; /** Allows to explicitly declare a function parameter as optional */ -export type OptionalArgument = T | void; +export type OptionalArgument = T | undefined; diff --git a/packages/web-api/src/types/request/admin/analytics.ts b/packages/web-api/src/types/request/admin/analytics.ts index 5229ff446..1e0ed463c 100644 --- a/packages/web-api/src/types/request/admin/analytics.ts +++ b/packages/web-api/src/types/request/admin/analytics.ts @@ -7,7 +7,7 @@ interface Date { */ date: string; } -interface MemberArgs extends Date { +export interface MemberArgs extends Date { /** * @description The type of analytics to retrieve. The options are currently limited to * `member` (for grid member analytics) and `public_channel` (for public channel analytics). @@ -21,7 +21,7 @@ interface TypeChannel { */ type: 'public_channel'; } -interface PublicChannelWithDate extends TypeChannel, Date { +export interface PublicChannelWithDate extends TypeChannel, Date { /** * @description Retrieve metadata for the `type` of analytics indicated. Can be used only with `type` set to * `public_channel` analytics. Omit the date parameter when using this argument. Defaults to `false`. @@ -29,7 +29,7 @@ interface PublicChannelWithDate extends TypeChannel, Date { */ metadata_only?: false; } -interface PublicChannelWithMetadata extends TypeChannel { +export interface PublicChannelWithMetadata extends TypeChannel { /** * @description Retrieve metadata for the `type` of analytics indicated. Can be used only with `type` set to * `public_channel` analytics. Omit the date parameter when using this argument. Defaults to `false`. diff --git a/packages/web-api/src/types/request/admin/apps.ts b/packages/web-api/src/types/request/admin/apps.ts index ec4e2052f..1e52a0349 100644 --- a/packages/web-api/src/types/request/admin/apps.ts +++ b/packages/web-api/src/types/request/admin/apps.ts @@ -1,24 +1,20 @@ -import { OptionalArgument } from '../../helpers'; +import type { OptionalArgument } from '../../helpers'; -import type { AppID, CursorPaginationEnabled, TokenOverridable } from '../common'; +import type { AppID, CursorPaginationEnabled, TeamID, TokenOverridable } from '../common'; -interface RequestID { +export interface RequestID { /** @description The id of the request. */ request_id: string; } // Models either app_id or request_id - but not both. -type AppOrRequestID = (AppID & { request_id?: never; }) | (RequestID & { app_id?: never; }); -interface EnterpriseID { +type AppOrRequestID = (AppID & { request_id?: never }) | (RequestID & { app_id?: never }); +export interface EnterpriseID { /** @description The ID of the enterprise. */ enterprise_id: string; } -interface TeamID { - /** @description The ID of the workspace. */ - team_id: string; -} // Models either enterprise_id or team_id - but not both. -type TeamOrEnterpriseID = (EnterpriseID & { team_id?: never; }) | (TeamID & { enterprise_id?: never }); -interface Certified { +type TeamOrEnterpriseID = (EnterpriseID & { team_id?: never }) | (TeamID & { enterprise_id?: never }); +export interface Certified { /** * @description Include certified apps. Defaults to `false`. */ @@ -26,37 +22,43 @@ interface Certified { } // https://api.slack.com/methods/admin.apps.activities.list -export type AdminAppsActivitiesListArguments = OptionalArgument & Partial & TokenOverridable & -CursorPaginationEnabled & { - /** - * @description The component ID of log events to be returned. Will be `FnXXXXXX` for functions, - * and `WfXXXXXX` for worflows. - */ - component_id?: string; - /** @description The component type of log events to be returned. */ - component_type?: 'events_api' | 'workflows' | 'functions' | 'tables'; - /** @description The event type of log events to be returned. */ - log_event_type?: string; - /** @description The latest timestamp of the log to retrieve (epoch microseconds). */ - max_date_created?: number; - /** @description The earliest timestamp of the log to retrieve (epoch microseconds). */ - min_date_created?: number; - /** @description The minimum log level of the log events to be returned. Defaults to `info`. */ - min_log_level?: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'fatal'; - /** @description The direction you want the data sorted by (always by timestamp). */ - sort_direction?: 'asc' | 'desc'; - /** @description The source of log events to be returned. */ - source?: 'slack' | 'developer'; - /** @description The trace ID of log events to be returned. */ - trace_id?: string; -}>; +export type AdminAppsActivitiesListArguments = OptionalArgument< + Partial & + Partial & + TokenOverridable & + CursorPaginationEnabled & { + /** + * @description The component ID of log events to be returned. Will be `FnXXXXXX` for functions, + * and `WfXXXXXX` for worflows. + */ + component_id?: string; + /** @description The component type of log events to be returned. */ + component_type?: 'events_api' | 'workflows' | 'functions' | 'tables'; + /** @description The event type of log events to be returned. */ + log_event_type?: string; + /** @description The latest timestamp of the log to retrieve (epoch microseconds). */ + max_date_created?: number; + /** @description The earliest timestamp of the log to retrieve (epoch microseconds). */ + min_date_created?: number; + /** @description The minimum log level of the log events to be returned. Defaults to `info`. */ + min_log_level?: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'fatal'; + /** @description The direction you want the data sorted by (always by timestamp). */ + sort_direction?: 'asc' | 'desc'; + /** @description The source of log events to be returned. */ + source?: 'slack' | 'developer'; + /** @description The trace ID of log events to be returned. */ + trace_id?: string; + } +>; // https://api.slack.com/methods/admin.apps.approve export type AdminAppsApproveArguments = AppOrRequestID & TeamOrEnterpriseID & TokenOverridable; // https://api.slack.com/methods/admin.apps.approved.list -export type AdminAppsApprovedListArguments = Partial & TokenOverridable & CursorPaginationEnabled -& Certified; +export type AdminAppsApprovedListArguments = Partial & + TokenOverridable & + CursorPaginationEnabled & + Certified; // https://api.slack.com/methods/admin.apps.clearResolution export type AdminAppsClearResolutionArguments = AppID & TeamOrEnterpriseID & TokenOverridable; @@ -84,15 +86,19 @@ export interface AdminAppsConfigSetArguments extends AppID, TokenOverridable { export type AdminAppsRequestsCancelArguments = RequestID & TeamOrEnterpriseID & TokenOverridable; // https://api.slack.com/methods/admin.apps.requests.list -export type AdminAppsRequestsListArguments = TeamOrEnterpriseID & Certified & TokenOverridable -& CursorPaginationEnabled; +export type AdminAppsRequestsListArguments = TeamOrEnterpriseID & + Certified & + TokenOverridable & + CursorPaginationEnabled; // https://api.slack.com/methods/admin.apps.restrict export type AdminAppsRestrictArguments = AppOrRequestID & TeamOrEnterpriseID & TokenOverridable; // https://api.slack.com/methods/admin.apps.restricted.list -export type AdminAppsRestrictedListArguments = TeamOrEnterpriseID & Certified & TokenOverridable -& CursorPaginationEnabled; +export type AdminAppsRestrictedListArguments = TeamOrEnterpriseID & + Certified & + TokenOverridable & + CursorPaginationEnabled; // https://api.slack.com/methods/admin.apps.uninstall export type AdminAppsUninstallArguments = AppID & TeamOrEnterpriseID & TokenOverridable; diff --git a/packages/web-api/src/types/request/admin/auth.ts b/packages/web-api/src/types/request/admin/auth.ts index 6291c1e44..91646bf0b 100644 --- a/packages/web-api/src/types/request/admin/auth.ts +++ b/packages/web-api/src/types/request/admin/auth.ts @@ -17,8 +17,11 @@ interface PolicyName { export interface AdminAuthPolicyAssignEntitiesArguments extends EntityIDs, EntityType, PolicyName, TokenOverridable {} // https://api.slack.com/methods/admin.auth.policy.getEntities -export interface AdminAuthPolicyGetEntitiesArguments extends Partial, PolicyName, TokenOverridable, - CursorPaginationEnabled {} +export interface AdminAuthPolicyGetEntitiesArguments + extends Partial, + PolicyName, + TokenOverridable, + CursorPaginationEnabled {} // https://api.slack.com/methods/admin.auth.policy.removeEntities export interface AdminAuthPolicyRemoveEntitiesArguments extends EntityIDs, EntityType, PolicyName, TokenOverridable {} diff --git a/packages/web-api/src/types/request/admin/barriers.ts b/packages/web-api/src/types/request/admin/barriers.ts index 0b12aac27..b892da21e 100644 --- a/packages/web-api/src/types/request/admin/barriers.ts +++ b/packages/web-api/src/types/request/admin/barriers.ts @@ -1,4 +1,4 @@ -import { OptionalArgument } from '../../helpers'; +import type { OptionalArgument } from '../../helpers'; import type { CursorPaginationEnabled, TokenOverridable } from '../common'; diff --git a/packages/web-api/src/types/request/admin/conversations.ts b/packages/web-api/src/types/request/admin/conversations.ts index a4700bacb..b7815fe6c 100644 --- a/packages/web-api/src/types/request/admin/conversations.ts +++ b/packages/web-api/src/types/request/admin/conversations.ts @@ -1,30 +1,34 @@ -import { OptionalArgument } from '../../helpers'; +import type { OptionalArgument } from '../../helpers'; import type { + ChannelID, ChannelIDs, CursorPaginationEnabled, SortDir, + TeamIDs, TokenOverridable, UserIDs, } from '../common'; -interface ChannelID { // an identical interface exists in src/types/request/conversations.ts, but it is only for invites - /** @description Encoded channel ID. */ - channel_id: string; -} - -type ChannelType = 'private' | 'private_exclude' | 'archived' | 'exclude_archived' | 'private_exclude_archived' | 'multi_workspace' | 'org_wide' | 'external_shared_exclude' | 'external_shared' | 'external_shared_private' | 'external_shared_archived' | 'exclude_org_shared'; +type ChannelType = + | 'private' + | 'private_exclude' + | 'archived' + | 'exclude_archived' + | 'private_exclude_archived' + | 'multi_workspace' + | 'org_wide' + | 'external_shared_exclude' + | 'external_shared' + | 'external_shared_private' + | 'external_shared_archived' + | 'exclude_org_shared'; interface GroupID { /** @description The {@link https://slack.com/help/articles/115001435788-Connect-identity-provider-groups-to-your-Enterprise-Grid-org IDP Group} ID. */ group_id: string; } -interface TeamIDs { - /** @description A list of team IDs to filter by (must include at least one ID). */ - team_ids: [string, ...string[]]; -} - // Interface to extend from specifically for the retrictAccess.* APIs, as the JSDoc is relevant only to these APIs interface RestrictAccessTeamID { /** @@ -58,12 +62,12 @@ export interface AdminConversationsConvertToPrivateArguments extends ChannelID, // https://api.slack.com/methods/admin.conversations.convertToPublic export interface AdminConversationsConvertToPublicArguments extends ChannelID, TokenOverridable {} -interface OrgWide { +export interface OrgWide { /** @description When `true`, the channel will be available org-wide. */ org_wide: true; team_id?: never; } -interface SpecificTeam { +export interface SpecificTeam { /** * @description When `false` (the default), the channel will be available to only * the workspace specified by `team_id`. @@ -78,14 +82,15 @@ interface SpecificTeam { type WorkspaceAccess = OrgWide | SpecificTeam; // https://api.slack.com/methods/admin.conversations.create -export type AdminConversationsCreateArguments = TokenOverridable & WorkspaceAccess & { - /** @description When `true`, creates a private channel instead of a public channel. */ - is_private: boolean; - /** @description Name of the public or private channel to create. */ - name: string; - /** @description Description of the public or private channel to create. */ - description?: string; -}; +export type AdminConversationsCreateArguments = TokenOverridable & + WorkspaceAccess & { + /** @description When `true`, creates a private channel instead of a public channel. */ + is_private: boolean; + /** @description Name of the public or private channel to create. */ + name: string; + /** @description Description of the public or private channel to create. */ + description?: string; + }; // https://api.slack.com/methods/admin.conversations.delete export interface AdminConversationsDeleteArguments extends ChannelID, TokenOverridable {} @@ -97,11 +102,14 @@ export interface AdminConversationsDisconnectSharedArguments extends ChannelID, } // https://api.slack.com/methods/admin.conversations.ekm.listOriginalConnectedChannelInfo -export type AdminConversationsEKMListOriginalConnectedChannelInfoArguments = OptionalArgument & -TokenOverridable & CursorPaginationEnabled & { - /** @description A comma-separated list of channels to filter to. */ - channel_ids?: string[]; -}>; +export type AdminConversationsEKMListOriginalConnectedChannelInfoArguments = OptionalArgument< + Partial & + TokenOverridable & + CursorPaginationEnabled & { + /** @description A comma-separated list of channels to filter to. */ + channel_ids?: string[]; + } +>; // https://api.slack.com/methods/admin.conversations.getConversationPrefs export interface AdminConversationsGetConversationPrefsArguments extends ChannelID, TokenOverridable {} @@ -110,15 +118,13 @@ export interface AdminConversationsGetConversationPrefsArguments extends Channel export interface AdminConversationsGetCustomRetentionArguments extends ChannelID, TokenOverridable {} // https://api.slack.com/methods/admin.conversations.getTeams -export interface AdminConversationsGetTeamsArguments - extends ChannelID, TokenOverridable, CursorPaginationEnabled {} +export interface AdminConversationsGetTeamsArguments extends ChannelID, TokenOverridable, CursorPaginationEnabled {} // https://api.slack.com/methods/admin.conversations.invite export interface AdminConversationsInviteArguments extends ChannelID, UserIDs, TokenOverridable {} // https://api.slack.com/methods/admin.conversations.lookup -export interface AdminConversationsLookupArguments - extends TeamIDs, TokenOverridable, CursorPaginationEnabled { +export interface AdminConversationsLookupArguments extends TeamIDs, TokenOverridable, CursorPaginationEnabled { /** * @description UNIX timestamp to filter by public channels where the most recent message * was sent before this parameter. @@ -138,46 +144,58 @@ export interface AdminConversationsRenameArguments extends ChannelID, TokenOverr } // https://api.slack.com/methods/admin.conversations.restrictAccess.addGroup -export interface AdminConversationsRestrictAccessAddGroupArguments extends ChannelID, GroupID, - RestrictAccessTeamID, TokenOverridable {} +export interface AdminConversationsRestrictAccessAddGroupArguments + extends ChannelID, + GroupID, + RestrictAccessTeamID, + TokenOverridable {} // https://api.slack.com/methods/admin.conversations.restrictAccess.listGroups -export interface AdminConversationsRestrictAccessListGroupsArguments extends ChannelID, RestrictAccessTeamID, - TokenOverridable {} +export interface AdminConversationsRestrictAccessListGroupsArguments + extends ChannelID, + RestrictAccessTeamID, + TokenOverridable {} // https://api.slack.com/methods/admin.conversations.restrictAccess.removeGroup -export interface AdminConversationsRestrictAccessRemoveGroupArguments extends ChannelID, GroupID, - RestrictAccessTeamID, TokenOverridable {} +export interface AdminConversationsRestrictAccessRemoveGroupArguments + extends ChannelID, + GroupID, + RestrictAccessTeamID, + TokenOverridable {} // https://api.slack.com/methods/admin.conversations.search -export type AdminConversationsSearchArguments = OptionalArgument & TokenOverridable & -CursorPaginationEnabled & { - /** @description Array of encoded team IDs, signifying the external orgs to search through. */ - connected_team_ids?: string[]; - /** @description Name of the channel to query by. */ - query?: string; - /** - * @description The type of channels to include or exclude in the search. For example `private` will search - * private channels, while `private_exclude` will exclude them. - * @see {@link https://api.slack.com/methods/admin.conversations.search#types Full list of channel types}. - */ - search_channel_types?: ChannelType[]; - /** - * @description Possible values are: - * - `relevant`: search ranking based on what we think is closest, - * - `name`: alphabetical, - * - `member_count`: number of users in the channel, - * - `created`: date channel was created. - * Defaults to `member_count`. - * You can optionally pair this with the `sort_dir` argument to change how it is sorted. - */ - sort?: 'relevant' | 'name' | 'member_count' | 'created'; - /** - * @description Only return the total count of channels. - * Omits channel data and allows access for admins without channel manager permissions. Defaults to `false`. - */ - total_count_only?: boolean; -}>; +export type AdminConversationsSearchArguments = OptionalArgument< + SortDir & + Partial & + TokenOverridable & + CursorPaginationEnabled & { + /** @description Array of encoded team IDs, signifying the external orgs to search through. */ + connected_team_ids?: string[]; + /** @description Name of the channel to query by. */ + query?: string; + /** + * @description The type of channels to include or exclude in the search. For example `private` will search + * private channels, while `private_exclude` will exclude them. + * @see {@link https://api.slack.com/methods/admin.conversations.search#types Full list of channel types}. + */ + search_channel_types?: ChannelType[]; + /** + * @description Possible values are: + * - `relevant`: search ranking based on what we think is closest, + * - `name`: alphabetical, + * - `member_count`: number of users in the channel, + * - `created`: date channel was created. + * Defaults to `member_count`. + * You can optionally pair this with the `sort_dir` argument to change how it is sorted. + */ + sort?: 'relevant' | 'name' | 'member_count' | 'created'; + /** + * @description Only return the total count of channels. + * Omits channel data and allows access for admins without channel manager permissions. Defaults to `false`. + */ + total_count_only?: boolean; + } +>; // https://api.slack.com/methods/admin.conversations.setConversationPrefs export interface AdminConversationsSetConversationPrefsArguments extends ChannelID, TokenOverridable { diff --git a/packages/web-api/src/types/request/admin/emoji.ts b/packages/web-api/src/types/request/admin/emoji.ts index f56f799a9..d133a499f 100644 --- a/packages/web-api/src/types/request/admin/emoji.ts +++ b/packages/web-api/src/types/request/admin/emoji.ts @@ -1,4 +1,4 @@ -import { OptionalArgument } from '../../helpers'; +import type { OptionalArgument } from '../../helpers'; import type { CursorPaginationEnabled, TokenOverridable } from '../common'; diff --git a/packages/web-api/src/types/request/admin/functions.ts b/packages/web-api/src/types/request/admin/functions.ts index 95d09bf62..ab1321fc7 100644 --- a/packages/web-api/src/types/request/admin/functions.ts +++ b/packages/web-api/src/types/request/admin/functions.ts @@ -9,8 +9,7 @@ export interface AdminFunctionsListArguments extends TokenOverridable, CursorPag } // https://api.slack.com/methods/admin.functions.permissions.lookup -export interface AdminFunctionsPermissionsLookupArguments - extends TokenOverridable { +export interface AdminFunctionsPermissionsLookupArguments extends TokenOverridable { /** @description An array of function IDs to get permissions for. */ function_ids: [string, ...string[]]; } diff --git a/packages/web-api/src/types/request/admin/inviteRequests.ts b/packages/web-api/src/types/request/admin/inviteRequests.ts index 9ed4c5e86..0dc155240 100644 --- a/packages/web-api/src/types/request/admin/inviteRequests.ts +++ b/packages/web-api/src/types/request/admin/inviteRequests.ts @@ -6,21 +6,31 @@ interface InviteRequestID { } // https://api.slack.com/methods/admin.inviteRequests.approve -export interface AdminInviteRequestsApproveArguments extends InviteRequestID, Required, - TokenOverridable {} +export interface AdminInviteRequestsApproveArguments + extends InviteRequestID, + Required, + TokenOverridable {} // https://api.slack.com/methods/admin.inviteRequests.approved.list -export interface AdminInviteRequestsApprovedListArguments extends Required, TokenOverridable, - CursorPaginationEnabled {} +export interface AdminInviteRequestsApprovedListArguments + extends Required, + TokenOverridable, + CursorPaginationEnabled {} // https://api.slack.com/methods/admin.inviteRequests.denied.list -export interface AdminInviteRequestsDeniedListArguments extends Required, TokenOverridable, - CursorPaginationEnabled {} +export interface AdminInviteRequestsDeniedListArguments + extends Required, + TokenOverridable, + CursorPaginationEnabled {} // https://api.slack.com/methods/admin.inviteRequests.deny -export interface AdminInviteRequestsDenyArguments extends InviteRequestID, Required, - TokenOverridable {} +export interface AdminInviteRequestsDenyArguments + extends InviteRequestID, + Required, + TokenOverridable {} // https://api.slack.com/methods/admin.inviteRequests.list -export interface AdminInviteRequestsListArguments extends Required, TokenOverridable, - CursorPaginationEnabled {} +export interface AdminInviteRequestsListArguments + extends Required, + TokenOverridable, + CursorPaginationEnabled {} diff --git a/packages/web-api/src/types/request/admin/roles.ts b/packages/web-api/src/types/request/admin/roles.ts index 64a00affa..06de727b1 100644 --- a/packages/web-api/src/types/request/admin/roles.ts +++ b/packages/web-api/src/types/request/admin/roles.ts @@ -1,8 +1,8 @@ -import { OptionalArgument } from '../../helpers'; +import type { OptionalArgument } from '../../helpers'; import type { CursorPaginationEnabled, SortDir, TokenOverridable, UserIDs } from '../common'; -interface EntityIDs { +export interface EntityIDs { /** * @description List of the entity IDs for which roles will be assigned/listed/removed. * These can be Org IDs (E12345), Team IDs (T12345) or Channel IDs (C12345). @@ -22,14 +22,18 @@ interface RoleID { export interface AdminRolesAddAssignmentsArguments extends EntityIDs, RoleID, UserIDs, TokenOverridable {} // https://api.slack.com/methods/admin.roles.listAssignments -export type AdminRolesListAssignmentsArguments = OptionalArgument & TokenOverridable & -CursorPaginationEnabled & SortDir & { - /** - * @description Collection of role ids to scope results by. - * @see {@link https://api.slack.com/methods/admin.roles.addAssignments#markdown Admin Roles under Usage info}. - */ - role_ids?: string[]; -}>; +export type AdminRolesListAssignmentsArguments = OptionalArgument< + Partial & + TokenOverridable & + CursorPaginationEnabled & + SortDir & { + /** + * @description Collection of role ids to scope results by. + * @see {@link https://api.slack.com/methods/admin.roles.addAssignments#markdown Admin Roles under Usage info}. + */ + role_ids?: string[]; + } +>; // https://api.slack.com/methods/admin.roles.removeAssignments export interface AdminRolesRemoveAssignmentsArguments extends EntityIDs, RoleID, UserIDs, TokenOverridable {} diff --git a/packages/web-api/src/types/request/admin/teams.ts b/packages/web-api/src/types/request/admin/teams.ts index 85569ef89..4f916774a 100644 --- a/packages/web-api/src/types/request/admin/teams.ts +++ b/packages/web-api/src/types/request/admin/teams.ts @@ -1,4 +1,4 @@ -import { OptionalArgument } from '../../helpers'; +import type { OptionalArgument } from '../../helpers'; import type { ChannelIDs, CursorPaginationEnabled, TeamID, TokenOverridable } from '../common'; diff --git a/packages/web-api/src/types/request/admin/usergroups.ts b/packages/web-api/src/types/request/admin/usergroups.ts index b424dea54..c9d0aa142 100644 --- a/packages/web-api/src/types/request/admin/usergroups.ts +++ b/packages/web-api/src/types/request/admin/usergroups.ts @@ -11,8 +11,11 @@ interface UsergroupID { } // https://api.slack.com/methods/admin.usergroups.addChannels -export interface AdminUsergroupsAddChannelsArguments extends ChannelIDs, UsergroupID, OptionalTeamAssignable, - TokenOverridable {} +export interface AdminUsergroupsAddChannelsArguments + extends ChannelIDs, + UsergroupID, + OptionalTeamAssignable, + TokenOverridable {} // https://api.slack.com/methods/admin.usergroups.addTeams export interface AdminUsergroupsAddTeamsArguments extends UsergroupID, TokenOverridable { diff --git a/packages/web-api/src/types/request/admin/users.ts b/packages/web-api/src/types/request/admin/users.ts index e72604dcf..7b4ce10ac 100644 --- a/packages/web-api/src/types/request/admin/users.ts +++ b/packages/web-api/src/types/request/admin/users.ts @@ -1,4 +1,4 @@ -import { OptionalArgument } from '../../helpers'; +import type { OptionalArgument } from '../../helpers'; import type { ChannelIDs, @@ -31,10 +31,10 @@ interface SessionExpirationTarget { web_only?: boolean; } -interface TeamIDWithoutDeactivatedWorkspaces extends TeamID { +export interface TeamIDWithoutDeactivatedWorkspaces extends TeamID { include_deactivated_user_workspaces?: false; } -interface DeactivatedWorkspacesWithoutTeamID { +export interface DeactivatedWorkspacesWithoutTeamID { team_id?: never; /** * @description Only applies when using an org token and when no `team_id` is provided. If `true`, return workspaces @@ -46,8 +46,8 @@ interface DeactivatedWorkspacesWithoutTeamID { // `admin.users.list` accepts either a team_id, or include_deactivated_user_workspaces=true, but not both type TeamIDOrDeactivatedWorkspaces = TeamIDWithoutDeactivatedWorkspaces | DeactivatedWorkspacesWithoutTeamID; -interface BothTeamAndUserID extends TeamID, UserID {} -interface NeitherTeamNorUserID { +export interface BothTeamAndUserID extends TeamID, UserID {} +export interface NeitherTeamNorUserID { team_id?: never; user_id?: never; } @@ -55,12 +55,21 @@ interface NeitherTeamNorUserID { type EitherTeamAndUserIDOrNeither = BothTeamAndUserID | NeitherTeamNorUserID; // https://api.slack.com/methods/admin.users.assign -export interface AdminUsersAssignArguments extends TeamID, UserID, Partial, IsRestricted, - IsUltraRestricted, TokenOverridable {} +export interface AdminUsersAssignArguments + extends TeamID, + UserID, + Partial, + IsRestricted, + IsUltraRestricted, + TokenOverridable {} // https://api.slack.com/methods/admin.users.invite -export interface AdminUsersInviteArguments extends ChannelIDs, TeamID, IsRestricted, IsUltraRestricted, - TokenOverridable { +export interface AdminUsersInviteArguments + extends ChannelIDs, + TeamID, + IsRestricted, + IsUltraRestricted, + TokenOverridable { /** @description The email address of the person to invite. */ email: string; /** @description An optional message to send to the user in the invite email. */ @@ -80,19 +89,22 @@ export interface AdminUsersInviteArguments extends ChannelIDs, TeamID, IsRestric /** * @description Allow this invite to be resent in the future if a user has not signed up yet. * Resending can only be done via the UI and has no expiration. Defaults to `false`. - */ + */ resend?: boolean; } // https://api.slack.com/methods/admin.users.list -export type AdminUsersListArguments = OptionalArgument; +export type AdminUsersListArguments = OptionalArgument< + TeamIDOrDeactivatedWorkspaces & + TokenOverridable & + CursorPaginationEnabled & { + /** + * @description If `true`, only active users will be returned. If `false`, only deactivated users will be returned. + * Default is `true`. + */ + is_active?: boolean; + } +>; // https://api.slack.com/methods/admin.users.remove export interface AdminUsersRemoveArguments extends TeamID, UserID, TokenOverridable {} @@ -110,8 +122,9 @@ export interface AdminUsersSessionInvalidateArguments extends TeamID, TokenOverr } // https://api.slack.com/methods/admin.users.session.list -export type AdminUsersSessionListArguments = OptionalArgument; +export type AdminUsersSessionListArguments = OptionalArgument< + EitherTeamAndUserIDOrNeither & TokenOverridable & CursorPaginationEnabled +>; // https://api.slack.com/methods/admin.users.session.reset export interface AdminUsersSessionResetArguments extends UserID, SessionExpirationTarget, TokenOverridable {} diff --git a/packages/web-api/src/types/request/admin/workflows.ts b/packages/web-api/src/types/request/admin/workflows.ts index 23a9c11b4..674160335 100644 --- a/packages/web-api/src/types/request/admin/workflows.ts +++ b/packages/web-api/src/types/request/admin/workflows.ts @@ -1,8 +1,8 @@ -import { OptionalArgument } from '../../helpers'; +import type { OptionalArgument } from '../../helpers'; import type { AppID, CursorPaginationEnabled, SortDir, TokenOverridable } from '../common'; -interface CollaboratorIDs { +export interface CollaboratorIDs { /** @description Array of collaborators (encoded user IDs) - maximum of 50 items. */ collaborator_ids: [string, ...string[]]; } @@ -28,19 +28,24 @@ export interface AdminWorkflowsPermissionsLookupArguments extends WorkflowIDs, T } // https://api.slack.com/methods/admin.workflows.search -export type AdminWorkflowsSearchArguments = OptionalArgument & Partial & SortDir & -TokenOverridable & CursorPaginationEnabled & { - /** @description Only include workflows with no collaborators in the result; default is `false`. */ - no_collaborators?: boolean; - /** @description Number of trigger IDs to fetch for each workflow; default is `0`. */ - num_trigger_ids?: number; - /** @description A search query to filter for workflow name or description. */ - query?: string; - /** @description The field used to sort the returned workflows. Currently only `premium_runs` is supported. */ - sort?: 'premium_runs'; - /** @description Source of workflow creation, either from `code` or `workflow_builder`. */ - source?: 'code' | 'workflow_builder'; -}>; +export type AdminWorkflowsSearchArguments = OptionalArgument< + Partial & + Partial & + SortDir & + TokenOverridable & + CursorPaginationEnabled & { + /** @description Only include workflows with no collaborators in the result; default is `false`. */ + no_collaborators?: boolean; + /** @description Number of trigger IDs to fetch for each workflow; default is `0`. */ + num_trigger_ids?: number; + /** @description A search query to filter for workflow name or description. */ + query?: string; + /** @description The field used to sort the returned workflows. Currently only `premium_runs` is supported. */ + sort?: 'premium_runs'; + /** @description Source of workflow creation, either from `code` or `workflow_builder`. */ + source?: 'code' | 'workflow_builder'; + } +>; // https://api.slack.com/methods/admin.workflows.unpublish export interface AdminWorkflowsUnpublishArguments extends WorkflowIDs, TokenOverridable {} diff --git a/packages/web-api/src/types/request/api.ts b/packages/web-api/src/types/request/api.ts index 4405b1abc..d800dba76 100644 --- a/packages/web-api/src/types/request/api.ts +++ b/packages/web-api/src/types/request/api.ts @@ -1,5 +1,5 @@ // https://api.slack.com/methods/api.test -import { OptionalArgument } from '../helpers'; +import type { OptionalArgument } from '../helpers'; export type APITestArguments = OptionalArgument<{ /** @description Error response to return. */ diff --git a/packages/web-api/src/types/request/apps.ts b/packages/web-api/src/types/request/apps.ts index 901f1ca91..2ea1ab398 100644 --- a/packages/web-api/src/types/request/apps.ts +++ b/packages/web-api/src/types/request/apps.ts @@ -1,4 +1,4 @@ -import { OptionalArgument } from '../helpers'; +import type { OptionalArgument } from '../helpers'; import type { AppID, CursorPaginationEnabled, OAuthCredentials, TokenOverridable } from './common'; import type { Manifest } from './manifest'; @@ -7,8 +7,7 @@ import type { Manifest } from './manifest'; export type AppsConnectionsOpenArguments = OptionalArgument; // https://api.slack.com/methods/apps.event.authorizations.list -export interface AppsEventAuthorizationsListArguments - extends TokenOverridable, CursorPaginationEnabled { +export interface AppsEventAuthorizationsListArguments extends TokenOverridable, CursorPaginationEnabled { event_context: string; } @@ -34,4 +33,6 @@ export interface AppsManifestValidateArguments extends Partial, TokenOver } // https://api.slack.com/methods/apps.uninstall -export interface AppsUninstallArguments extends Pick, TokenOverridable {} +export interface AppsUninstallArguments + extends Pick, + TokenOverridable {} diff --git a/packages/web-api/src/types/request/auth.ts b/packages/web-api/src/types/request/auth.ts index 3da910fe3..6d0def198 100644 --- a/packages/web-api/src/types/request/auth.ts +++ b/packages/web-api/src/types/request/auth.ts @@ -1,24 +1,29 @@ -import type { CursorPaginationEnabled, TokenOverridable } from './common'; import type { OptionalArgument } from '../helpers'; +import type { CursorPaginationEnabled, TokenOverridable } from './common'; // https://api.slack.com/methods/auth.revoke -export type AuthRevokeArguments = OptionalArgument; +export type AuthRevokeArguments = OptionalArgument< + TokenOverridable & { + /** + * @description Setting this parameter to `true` triggers a testing mode where the specified token + * will not actually be revoked. + */ + test?: boolean; + } +>; // https://api.slack.com/methods/auth.teams.list -export type AuthTeamsListArguments = OptionalArgument; +export type AuthTeamsListArguments = OptionalArgument< + TokenOverridable & + CursorPaginationEnabled & { + /** + * @description Whether to return icon paths for each workspace. + * An icon path represents a URI pointing to the image signifying the workspace. + * Defaults to `false`. + */ + include_icon?: boolean; + } +>; // https://api.slack.com/methods/auth.test export type AuthTestArguments = OptionalArgument; diff --git a/packages/web-api/src/types/request/bots.ts b/packages/web-api/src/types/request/bots.ts index f49b512b1..2b639ac7e 100644 --- a/packages/web-api/src/types/request/bots.ts +++ b/packages/web-api/src/types/request/bots.ts @@ -1,9 +1,12 @@ -import { OptionalArgument } from '../helpers'; +import type { OptionalArgument } from '../helpers'; import type { OptionalTeamAssignable, TokenOverridable } from './common'; // https://api.slack.com/methods/bots.info -export type BotsInfoArguments = OptionalArgument; +export type BotsInfoArguments = OptionalArgument< + TokenOverridable & + OptionalTeamAssignable & { + /** @description Bot ID, which starts with 'B', to retrieve information about. */ + bot?: string; + } +>; diff --git a/packages/web-api/src/types/request/calls.ts b/packages/web-api/src/types/request/calls.ts index 93097635d..d388a8420 100644 --- a/packages/web-api/src/types/request/calls.ts +++ b/packages/web-api/src/types/request/calls.ts @@ -1,5 +1,5 @@ -import type { TokenOverridable } from './common'; import type { CallUser } from '@slack/types'; +import type { TokenOverridable } from './common'; interface ID { /** @description `id` returned when registering the call using the `calls.add` method. */ diff --git a/packages/web-api/src/types/request/canvas.ts b/packages/web-api/src/types/request/canvas.ts index 38cd5ceea..5b5da6f13 100644 --- a/packages/web-api/src/types/request/canvas.ts +++ b/packages/web-api/src/types/request/canvas.ts @@ -1,11 +1,11 @@ -import type { ChannelIDs, TokenOverridable, UserIDs } from './common'; import type { OptionalArgument } from '../helpers'; +import type { ChannelIDs, TokenOverridable, UserIDs } from './common'; interface CanvasID { /** @description Encoded ID of the canvas. */ canvas_id: string; } -interface DocumentContent { +export interface DocumentContent { /** @description The type of content used to describe Canvas content. Always is `markdown`. */ type: 'markdown'; /** @description The markdown defining the Canvas content. */ @@ -33,16 +33,17 @@ interface BaseChange { } type ChangeWithSectionAndContent = Required & { /** @description The operation to perform on the canvas. */ - operation: 'insert_after' | 'insert_before' + operation: 'insert_after' | 'insert_before'; }; type ChangeWithContent = Required> & { /** @description The operation to perform on the canvas. */ operation: 'insert_at_start' | 'insert_at_end'; }; -type ChangeWithContentAndOptionalSection = BaseChange & Required> & { - /** @description The operation to perform on the canvas. */ - operation: 'replace'; -}; +type ChangeWithContentAndOptionalSection = BaseChange & + Required> & { + /** @description The operation to perform on the canvas. */ + operation: 'replace'; + }; type ChangeWithSection = Required> & { /** @description The operation to perform on the canvas. */ operation: 'delete'; @@ -50,8 +51,11 @@ type ChangeWithSection = Required> & { type Change = ChangeWithSection | ChangeWithContent | ChangeWithSectionAndContent | ChangeWithContentAndOptionalSection; // https://api.slack.com/methods/canvases.access.delete -export interface CanvasesAccessDeleteArguments extends CanvasID, Partial, TokenOverridable, - Partial {} +export interface CanvasesAccessDeleteArguments + extends CanvasID, + Partial, + TokenOverridable, + Partial {} // https://api.slack.com/methods/canvases.access.set export interface CanvasesAccessSetArguments extends CanvasID, Partial, TokenOverridable, Partial { @@ -60,12 +64,14 @@ export interface CanvasesAccessSetArguments extends CanvasID, Partial; +export type CanvasesCreateArguments = OptionalArgument< + TokenOverridable & { + /** @description Title of the newly created canvas. */ + title?: string; + /** @description Structure describing the type and contents of the Canvas being created. */ + document_content?: DocumentContent; + } +>; // https://api.slack.com/methods/canvases.sections.lookup export interface CanvasesSectionsLookupArguments extends CanvasID, TokenOverridable { diff --git a/packages/web-api/src/types/request/chat.ts b/packages/web-api/src/types/request/chat.ts index fff7ccf9a..e234f2df6 100644 --- a/packages/web-api/src/types/request/chat.ts +++ b/packages/web-api/src/types/request/chat.ts @@ -1,11 +1,5 @@ -import { OptionalArgument } from '../helpers'; +import type { OptionalArgument } from '../helpers'; -import type { - CursorPaginationEnabled, - OptionalTeamAssignable, - TimelinePaginationEnabled, - TokenOverridable, -} from './common'; import type { Block, // TODO: these will be combined into one in a new types release KnownBlock, @@ -13,12 +7,18 @@ import type { MessageAttachment, MessageMetadata, } from '@slack/types'; +import type { + CursorPaginationEnabled, + OptionalTeamAssignable, + TimelinePaginationEnabled, + TokenOverridable, +} from './common'; -interface Channel { +export interface Channel { /** @description Channel ID for the message. */ channel: string; } -interface ChannelAndTS extends Channel { +export interface ChannelAndTS extends Channel { /** @description Timestamp of the message. */ ts: string; } @@ -26,7 +26,7 @@ interface ChannelAndMessageTS extends Channel { /** @description Timestamp of the message. */ message_ts: string; } -interface AsUser { +export interface AsUser { /** * @description Pass `true` to act as the authed user with {@link https://api.slack.com/scopes/chat:write:user `chat:write:user` scope}. * Bot users in this context are considered authed users. If unused or `false`, the message will be acted upon with @@ -34,11 +34,11 @@ interface AsUser { */ as_user?: boolean; } -interface LinkNames { +export interface LinkNames { /** @description Find and link channel names and usernames. */ link_names?: boolean; } -interface Parse { +export interface Parse { /** * @description Change how messages are treated. Defaults to `none`. * @see {@link https://api.slack.com/reference/surfaces/formatting#automatic-parsing Formatting: Automatic parsing}. @@ -52,15 +52,15 @@ interface Text { */ text: string; } -interface ChannelAndText extends Channel, Text {} -interface ChannelAndBlocks extends Channel, Partial { +export interface ChannelAndText extends Channel, Text {} +export interface ChannelAndBlocks extends Channel, Partial { /** * @description An array of structured Blocks. * @see {@link https://api.slack.com/reference/block-kit/blocks Blocks reference}. */ blocks: (KnownBlock | Block)[]; } -interface ChannelAndAttachments extends Channel, Partial { +export interface ChannelAndAttachments extends Channel, Partial { /** * @description An array of structured attachments. * @see {@link https://api.slack.com/messaging/composing/layouts#attachments Adding secondary attachments}. @@ -72,21 +72,21 @@ interface ChannelAndAttachments extends Channel, Partial { // 2. channel and blocks // 3. channel and attachments type MessageContents = ChannelAndText | ChannelAndBlocks | ChannelAndAttachments; -interface ThreadTS { +export interface ThreadTS { /** * @description Provide another message's `ts` value to post this message in a thread. Avoid using a reply's `ts` * value; use its parent's value instead. */ thread_ts: string; } -interface WithinThreadReply extends Partial { +export interface WithinThreadReply extends Partial { /** * @description Used in conjunction with `thread_ts`, when set to `false` will make the reply only visibile within * a thread. */ reply_broadcast?: false; } -interface BroadcastedThreadReply extends ThreadTS { +export interface BroadcastedThreadReply extends ThreadTS { /** @description Used in conjunction with `thread_ts`, when set to `true` will broadcast the reply to the channel. */ reply_broadcast: boolean; } @@ -94,11 +94,11 @@ interface BroadcastedThreadReply extends ThreadTS { // or not broadcasted. Broadcasted replies are necessarily threaded, so `thread_ts` becomes required. type ReplyInThread = WithinThreadReply | BroadcastedThreadReply; -interface Metadata { +export interface Metadata { /** @description Object representing message metadata, which will be made accessible to any user or app. */ metadata?: MessageMetadata; } -interface IconEmoji { +export interface IconEmoji { as_user?: false; icon_url?: never; /** @@ -107,7 +107,7 @@ interface IconEmoji { */ icon_emoji?: string; } -interface IconURL { +export interface IconURL { as_user?: false; icon_emoji?: never; /** @@ -118,24 +118,26 @@ interface IconURL { } // Can only specify message icon via predefined authorship using one of emoji or URL, but not both. type Icon = IconEmoji | IconURL; -interface Username { +export interface Username { as_user?: false; /** @description Set your bot's username. Can only be used with `as_user` set to `false`. */ username?: string; } // This union keys on as_user: if it is undefined or false, then the Icon and Username types should be available // and adhered to. Otherwise if true, then no icon or username fields should be available. -type Authorship = (Icon & Username) | { - /** - * @description Pass `true` to act as the authed user with {@link https://api.slack.com/scopes/chat:write:user `chat:write:user` scope}. - * Bot users in this context are considered authed users. If unused or `false`, the message will be acted upon with - * {@link https://api.slack.com/scopes/chat:write:bot `chat:write:bot` scope}. - */ - as_user: true; - icon_emoji?: never; - icon_url?: never; -}; -interface Unfurls { +type Authorship = + | (Icon & Username) + | { + /** + * @description Pass `true` to act as the authed user with {@link https://api.slack.com/scopes/chat:write:user `chat:write:user` scope}. + * Bot users in this context are considered authed users. If unused or `false`, the message will be acted upon with + * {@link https://api.slack.com/scopes/chat:write:bot `chat:write:bot` scope}. + */ + as_user: true; + icon_emoji?: never; + icon_url?: never; + }; +export interface Unfurls { /** @description Pass `true` to enable unfurling of primarily text-based content. */ unfurl_links?: boolean; /** @description Pass `false` to disable unfurling of media content. */ @@ -158,32 +160,53 @@ export interface ChatGetPermalinkArguments extends ChannelAndMessageTS, TokenOve export interface ChatMeMessageArguments extends ChannelAndText, TokenOverridable {} // https://api.slack.com/methods/chat.postEphemeral -export type ChatPostEphemeralArguments = TokenOverridable & MessageContents & { - /** - * @description `id` of the user who will receive the ephemeral message. - * The user should be in the channel specified by the `channel` argument. - */ - user: string; -} & Authorship & Parse & LinkNames & Partial; +export type ChatPostEphemeralArguments = TokenOverridable & + MessageContents & { + /** + * @description `id` of the user who will receive the ephemeral message. + * The user should be in the channel specified by the `channel` argument. + */ + user: string; + } & Authorship & + Parse & + LinkNames & + Partial; // https://api.slack.com/methods/chat.postMessage -export type ChatPostMessageArguments = TokenOverridable & MessageContents & ReplyInThread & Authorship & Parse -& LinkNames & Metadata & Unfurls & { - /** @description Disable Slack markup parsing by setting to `false`. Enabled by default. */ - mrkdwn?: boolean; -}; +export type ChatPostMessageArguments = TokenOverridable & + MessageContents & + ReplyInThread & + Authorship & + Parse & + LinkNames & + Metadata & + Unfurls & { + /** @description Disable Slack markup parsing by setting to `false`. Enabled by default. */ + mrkdwn?: boolean; + }; // https://api.slack.com/methods/chat.scheduleMessage -export type ChatScheduleMessageArguments = TokenOverridable & MessageContents & { - /** @description Unix EPOCH timestamp of time in future to send the message. */ - post_at: string | number; -} & ReplyInThread & Parse & LinkNames & AsUser & Metadata & Unfurls; +export type ChatScheduleMessageArguments = TokenOverridable & + MessageContents & { + /** @description Unix EPOCH timestamp of time in future to send the message. */ + post_at: string | number; + } & ReplyInThread & + Parse & + LinkNames & + AsUser & + Metadata & + Unfurls; // https://api.slack.com/methods/chat.scheduledMessages.list -export type ChatScheduledMessagesListArguments = OptionalArgument & Partial>; +export type ChatScheduledMessagesListArguments = OptionalArgument< + TokenOverridable & + CursorPaginationEnabled & + OptionalTeamAssignable & + Pick & + Partial +>; -interface SourceAndUnfurlID { +export interface SourceAndUnfurlID { /** * @description The source of the link to unfurl. The source may either be `composer`, when the link is inside the * message composer, or `conversations_history`, when the link has been posted to a conversation. @@ -204,37 +227,41 @@ export type ChatUnfurlArguments = { * blocks or message attachments. */ unfurls: LinkUnfurls; -} & UnfurlTarget & TokenOverridable -& { - /** - * @description Provide a simply-formatted string to send as an ephemeral message to the user as invitation to - * authenticate further and enable full unfurling behavior. Provides two buttons, Not now or Never ask me again. - */ - user_auth_message?: string; - /** - * @description Set to `true` to indicate the user must install your Slack app to trigger unfurls for this domain. - * Defaults to `false`. - */ - user_auth_required?: boolean; - /** - * @description Send users to this custom URL where they will complete authentication in your app to fully trigger - * unfurling. Value should be properly URL-encoded. - */ - user_auth_url?: string; - /** - * @description Provide a JSON based array of structured blocks presented as URL-encoded string to send as an - * ephemeral message to the user as invitation to authenticate further and enable full unfurling behavior. - */ - user_auth_blocks?: (KnownBlock | Block)[]; -}; +} & UnfurlTarget & + TokenOverridable & { + /** + * @description Provide a simply-formatted string to send as an ephemeral message to the user as invitation to + * authenticate further and enable full unfurling behavior. Provides two buttons, Not now or Never ask me again. + */ + user_auth_message?: string; + /** + * @description Set to `true` to indicate the user must install your Slack app to trigger unfurls for this domain. + * Defaults to `false`. + */ + user_auth_required?: boolean; + /** + * @description Send users to this custom URL where they will complete authentication in your app to fully trigger + * unfurling. Value should be properly URL-encoded. + */ + user_auth_url?: string; + /** + * @description Provide a JSON based array of structured blocks presented as URL-encoded string to send as an + * ephemeral message to the user as invitation to authenticate further and enable full unfurling behavior. + */ + user_auth_blocks?: (KnownBlock | Block)[]; + }; // https://api.slack.com/methods/chat.update export type ChatUpdateArguments = MessageContents & { /** @description Timestamp of the message to be updated. */ ts: string; -} & TokenOverridable & AsUser & LinkNames & Metadata & Parse & { - /** @description Array of new file ids that will be sent with this message. */ - file_ids?: string[]; - /** @description Broadcast an existing thread reply to make it visible to everyone in the channel or conversation. */ - reply_broadcast?: boolean; -}; +} & TokenOverridable & + AsUser & + LinkNames & + Metadata & + Parse & { + /** @description Array of new file ids that will be sent with this message. */ + file_ids?: string[]; + /** @description Broadcast an existing thread reply to make it visible to everyone in the channel or conversation. */ + reply_broadcast?: boolean; + }; diff --git a/packages/web-api/src/types/request/common.ts b/packages/web-api/src/types/request/common.ts index 2a7cf7f6e..74b3d3f4b 100644 --- a/packages/web-api/src/types/request/common.ts +++ b/packages/web-api/src/types/request/common.ts @@ -60,6 +60,11 @@ export interface TeamID { /** @description The encoded team ID. */ team_id: string; } +export interface TeamIDs { + /** @description A list of team IDs (must include at least one ID). */ + team_ids: [string, ...string[]]; +} + export interface OptionalTeamAssignable { /** @description If using an org token, `team_id` is required. */ team_id?: string; @@ -75,6 +80,10 @@ export interface ChannelIDs { /** @description An array of channel IDs (must include at least one ID). */ channel_ids: [string, ...string[]]; } +export interface ChannelID { + /** @description Encoded channel ID. */ + channel_id: string; +} // Same for user IDs diff --git a/packages/web-api/src/types/request/conversations.ts b/packages/web-api/src/types/request/conversations.ts index b7b05bd44..396ab7dca 100644 --- a/packages/web-api/src/types/request/conversations.ts +++ b/packages/web-api/src/types/request/conversations.ts @@ -1,6 +1,7 @@ -import { OptionalArgument } from '../helpers'; +import type { OptionalArgument } from '../helpers'; import type { + ChannelID, CursorPaginationEnabled, LocaleAware, OptionalTeamAssignable, @@ -9,15 +10,11 @@ import type { TokenOverridable, } from './common'; -interface Channel { +export interface Channel { /** @description ID of conversation. */ channel: string; } -interface ChannelID { - /** @description ID of the channel that you'd like to accept. Must provide either `invite_id` or `channel_id`. */ - channel_id: string; -} -interface Emails { +export interface Emails { /** @description List of emails to receive this invite. Either `emails` or `user_ids` must be provided. */ emails: string[]; user_ids?: never; @@ -26,11 +23,11 @@ interface IncludeAllMetadata { /** @description Return all metadata associated with messages. Defaults to `false`. */ include_all_metadata?: boolean; } -interface InviteID { +export interface InviteID { /** @description ID of the invite. */ invite_id: string; } -interface IsPrivate { +export interface IsPrivate { /** @description Whether the channel should be private. */ is_private?: boolean; } @@ -38,26 +35,28 @@ interface Message extends Channel { /** @description Unique identifier of message. */ ts: string; } -interface UserIDs { +export interface UserIDs { /** List of user IDs to receive this invite. Either `emails` or `user_ids` must be provided. */ user_ids: string[]; emails?: never; } -interface Users { +export interface Users { /** @description A comma separated list of user IDs. Up to 1000 users may be listed. */ users: string; } // https://api.slack.com/methods/conversations.acceptSharedInvite -export type ConversationsAcceptSharedInviteArguments = TokenOverridable & OptionalTeamAssignable -& (ChannelID | InviteID) & IsPrivate & { - /** - * @description Name of the channel. If the channel does not exist already in your workspace, - * this name is the one that the channel will take. - */ - channel_name: string; - /** @description Whether you'd like to use your workspace's free trial to begin using Slack Connect. */ - free_trial_accepted?: boolean; -}; +export type ConversationsAcceptSharedInviteArguments = TokenOverridable & + OptionalTeamAssignable & + (ChannelID | InviteID) & + IsPrivate & { + /** + * @description Name of the channel. If the channel does not exist already in your workspace, + * this name is the one that the channel will take. + */ + channel_name: string; + /** @description Whether you'd like to use your workspace's free trial to begin using Slack Connect. */ + free_trial_accepted?: boolean; + }; // https://api.slack.com/methods/conversations.approveSharedInvite export interface ConversationsApproveSharedInviteArguments extends InviteID, TargetTeam, TokenOverridable {} @@ -78,15 +77,21 @@ export interface ConversationsCreateArguments extends IsPrivate, TokenOverridabl export interface ConversationsDeclineSharedInviteArguments extends InviteID, TargetTeam, TokenOverridable {} // https://api.slack.com/methods/conversations.externalInvitePermissions.set -export interface ConversationsExternalInvitePermissionsSetArguments extends Channel, Required, - TokenOverridable { +export interface ConversationsExternalInvitePermissionsSetArguments + extends Channel, + Required, + TokenOverridable { /** @description The type of action be taken: `upgrade` or `downgrade`. */ action: 'downgrade' | 'upgrade'; } // https://api.slack.com/methods/conversations.history -export interface ConversationsHistoryArguments extends Channel, IncludeAllMetadata, TokenOverridable, - CursorPaginationEnabled, TimelinePaginationEnabled {} +export interface ConversationsHistoryArguments + extends Channel, + IncludeAllMetadata, + TokenOverridable, + CursorPaginationEnabled, + TimelinePaginationEnabled {} // https://api.slack.com/methods/conversations.info export interface ConversationsInfoArguments extends Channel, TokenOverridable, LocaleAware { @@ -106,10 +111,12 @@ export interface ConversationsInviteArguments extends Channel, Users, TokenOverr } // https://api.slack.com/methods/conversations.inviteShared -export type ConversationsInviteSharedArguments = Channel & TokenOverridable & (Emails | UserIDs) & { - /** @description Whether invite is to an external limited member. Defaults to `true`. */ - external_limited?: boolean; -}; +export type ConversationsInviteSharedArguments = Channel & + TokenOverridable & + (Emails | UserIDs) & { + /** @description Whether invite is to an external limited member. Defaults to `true`. */ + external_limited?: boolean; + }; // https://api.slack.com/methods/conversations.join export interface ConversationsJoinArguments extends Channel, TokenOverridable {} @@ -123,41 +130,48 @@ export interface ConversationsKickArguments extends Channel, TokenOverridable { export interface ConversationsLeaveArguments extends Channel, TokenOverridable {} // https://api.slack.com/methods/conversations.list -export type ConversationsListArguments = OptionalArgument; +export type ConversationsListArguments = OptionalArgument< + TokenOverridable & + CursorPaginationEnabled & + OptionalTeamAssignable & { + /** @description Set to `true` to exclude archived channels from the list. Defaults to `false`. */ + exclude_archived?: boolean; + /** + * @description Mix and match channel types by providing a comma-separated list of any combination of: + * `public_channel`, `private_channel`, `mpim` or `im`. Defaults to `public_channel`. + */ + types?: string; + } +>; // https://api.slack.com/methods/conversations.listConnectInvites -export type ConversationsListConnectInvitesArguments = OptionalArgument; +export type ConversationsListConnectInvitesArguments = OptionalArgument< + TokenOverridable & + OptionalTeamAssignable & { + /** @description Maximum number of invites to return. Defaults to `100`. */ + count?: number; + /** @description Set to `next_cursor` returned by previous call to list items in subsequent page. */ + cursor?: string; + } +>; // https://api.slack.com/methods/conversations.mark -export interface ConversationsMarkArguments extends Message, TokenOverridable { } +export interface ConversationsMarkArguments extends Message, TokenOverridable {} // https://api.slack.com/methods/conversations.members export interface ConversationsMembersArguments extends Channel, TokenOverridable, CursorPaginationEnabled {} // https://api.slack.com/methods/conversations.open -export type ConversationsOpenArguments = (Channel | Users) & TokenOverridable & { - /** - * @description Do not create a direct message or multi-person direct message. - * This is used to see if there is an existing dm or mpdm. - */ - prevent_creation?: boolean; - /** @description Indicates you want the full IM channel definition in the response. */ - return_im?: boolean; -}; +export type ConversationsOpenArguments = (Channel | Users) & + TokenOverridable & { + /** + * @description Do not create a direct message or multi-person direct message. + * This is used to see if there is an existing dm or mpdm. + */ + prevent_creation?: boolean; + /** @description Indicates you want the full IM channel definition in the response. */ + return_im?: boolean; + }; // https://api.slack.com/methods/conversations.rename export interface ConversationsRenameArguments extends Channel, TokenOverridable { @@ -166,8 +180,12 @@ export interface ConversationsRenameArguments extends Channel, TokenOverridable } // https://api.slack.com/methods/conversations.replies -export interface ConversationsRepliesArguments extends Message, IncludeAllMetadata, TokenOverridable, - CursorPaginationEnabled, TimelinePaginationEnabled {} +export interface ConversationsRepliesArguments + extends Message, + IncludeAllMetadata, + TokenOverridable, + CursorPaginationEnabled, + TimelinePaginationEnabled {} // https://api.slack.com/methods/conversations.setPurpose export interface ConversationsSetPurposeArguments extends Channel, TokenOverridable { diff --git a/packages/web-api/src/types/request/dialog.ts b/packages/web-api/src/types/request/dialog.ts index 1282fca88..ec9e33f26 100644 --- a/packages/web-api/src/types/request/dialog.ts +++ b/packages/web-api/src/types/request/dialog.ts @@ -1,5 +1,5 @@ -import type { TokenOverridable } from './common'; import type { Dialog } from '@slack/types'; +import type { TokenOverridable } from './common'; // https://api.slack.com/methods/dialog.open export interface DialogOpenArguments extends TokenOverridable { diff --git a/packages/web-api/src/types/request/dnd.ts b/packages/web-api/src/types/request/dnd.ts index a530f7167..1d4b0933c 100644 --- a/packages/web-api/src/types/request/dnd.ts +++ b/packages/web-api/src/types/request/dnd.ts @@ -1,15 +1,18 @@ -import { OptionalTeamAssignable, TokenOverridable } from './common'; -import { OptionalArgument } from '../helpers'; +import type { OptionalArgument } from '../helpers'; +import type { OptionalTeamAssignable, TokenOverridable } from './common'; // https://api.slack.com/methods/dnd.endDnd export type DndEndDndArguments = OptionalArgument; // https://api.slack.com/methods/dnd.endSnooze export type DndEndSnoozeArguments = OptionalArgument; // https://api.slack.com/methods/dnd.info -export type DndInfoArguments = OptionalArgument; +export type DndInfoArguments = OptionalArgument< + TokenOverridable & + OptionalTeamAssignable & { + /** @description User to fetch status for (defaults to authed user). */ + user?: string; + } +>; // https://api.slack.com/methods/dnd.setSnooze export interface DndSetSnoozeArguments extends TokenOverridable { /** @description Number of minutes, from now, to snooze until. */ diff --git a/packages/web-api/src/types/request/emoji.ts b/packages/web-api/src/types/request/emoji.ts index f63b0c515..f62e741b8 100644 --- a/packages/web-api/src/types/request/emoji.ts +++ b/packages/web-api/src/types/request/emoji.ts @@ -1,7 +1,9 @@ -import { TokenOverridable } from './common'; -import { OptionalArgument } from '../helpers'; +import type { OptionalArgument } from '../helpers'; +import type { TokenOverridable } from './common'; // https://api.slack.com/methods/emoji.list -export type EmojiListArguments = OptionalArgument; +export type EmojiListArguments = OptionalArgument< + TokenOverridable & { + /** @description Include a list of categories for Unicode emoji and the emoji in each category. */ + include_categories?: boolean; + } +>; diff --git a/packages/web-api/src/types/request/files.ts b/packages/web-api/src/types/request/files.ts index b4e7fa68e..40dc26134 100644 --- a/packages/web-api/src/types/request/files.ts +++ b/packages/web-api/src/types/request/files.ts @@ -1,48 +1,48 @@ +import type { Stream } from 'node:stream'; +import type { ExcludeFromUnion } from '../helpers'; +import type { FilesGetUploadURLExternalResponse } from '../response/index'; import type { CursorPaginationEnabled, OptionalTeamAssignable, TokenOverridable, TraditionalPagingEnabled, } from './common'; -import type { ExcludeFromUnion } from '../helpers'; -import type { FilesGetUploadURLExternalResponse } from '../response/index'; -import type { Stream } from 'node:stream'; -interface FileArgument { +export interface FileArgument { /** @description Encoded file ID. */ file: string; } -interface ExternalIDArgument { +export interface ExternalIDArgument { /** @description Creator defined GUID for the file. */ external_id: string; } -interface ChannelsArgument { +export interface ChannelsArgument { /** * @description Comma-seperated list of channel IDs where the file will be shared. If not specified the file will * be private. */ channels?: string; } -interface FileType { +export interface FileType { /** * @description A file type identifier. * @see {@link https://api.slack.com/types/file#file_types File types} for a complete list of supported file types. */ filetype?: string; } -interface FileUploadComplete { +export interface FileUploadComplete { /** @description Encoded file ID. */ id: string; /** @description File title. */ title?: string; } -interface FileChannelDestinationArgument { +export interface FileChannelDestinationArgument { /** @description Channel ID where the file will be shared. If not specified the file will be private. */ channel_id?: string; thread_ts?: never; } -interface FileThreadDestinationArgument { +export interface FileThreadDestinationArgument { /** @description Channel ID where the file will be shared as a thread reply. */ channel_id: string; /** @description Provide another message's `ts` value to upload this file as a reply. */ @@ -51,10 +51,10 @@ interface FileThreadDestinationArgument { // Some file APIs allow you to upload a file to a channel as its own message, or to a thread as a reply. type FileDestinationArgument = FileChannelDestinationArgument | FileThreadDestinationArgument; // Exact same as the above `FileDestinationArgument`, but with a `channels` property instead of `channel_id`. -interface FileChannelDestinationArgumentChannels extends ChannelsArgument { +export interface FileChannelDestinationArgumentChannels extends ChannelsArgument { thread_ts?: never; } -interface FileThreadDestinationArgumentChannels extends Required { +export interface FileThreadDestinationArgumentChannels extends Required { /** @description Provide another message's `ts` value to upload this file as a reply. */ thread_ts: string; } @@ -62,12 +62,13 @@ interface FileThreadDestinationArgumentChannels extends Required[]; } // https://slack.dev/node-slack-sdk/web-api#upload-a-file -export type FilesUploadV2Arguments = TokenOverridable & ( - | FileUploadV2 - | (Omit & FilesUploadV2ArgumentsMultipleFiles) -); +export type FilesUploadV2Arguments = TokenOverridable & + (FileUploadV2 | (Omit & FilesUploadV2ArgumentsMultipleFiles)); // Helper type intended for internal use in filesUploadV2 client method // Includes additional metadata required to complete a single file upload job -export type FileUploadV2Job = FileUploadV2 & TokenOverridable & -Pick & { - length?: number; - data?: Buffer; -}; +export type FileUploadV2Job = FileUploadV2 & + TokenOverridable & + Pick & { + length?: number; + data?: Buffer; + }; // https://api.slack.com/methods/files.comments.delete export interface FilesCommentsDeleteArguments extends FileArgument, TokenOverridable { /** @description The ID of the comment to delete. */ id: string; } -interface SharedFile { +export interface SharedFile { /** @description Title of the file being shared. */ title: string; /** @description URL of the remote file. */ @@ -190,7 +195,7 @@ interface SharedFile { // https://api.slack.com/methods/files.remote.add export interface FilesRemoteAddArguments extends SharedFile, FileType, ExternalIDArgument, TokenOverridable {} // Either the encoded file ID or the external ID must be used as an argument. -type FileOrExternalID = (FileArgument & { external_id?: never; }) | (ExternalIDArgument & { file?: never; }); +type FileOrExternalID = (FileArgument & { external_id?: never }) | (ExternalIDArgument & { file?: never }); // https://api.slack.com/methods/files.remote.info export type FilesRemoteInfoArguments = FileOrExternalID & TokenOverridable; // https://api.slack.com/methods/files.remote.list diff --git a/packages/web-api/src/types/request/index.ts b/packages/web-api/src/types/request/index.ts index 275877ce4..44fee11e6 100644 --- a/packages/web-api/src/types/request/index.ts +++ b/packages/web-api/src/types/request/index.ts @@ -1,42 +1,282 @@ -export type { WorkflowsStepCompletedArguments, WorkflowsStepFailedArguments, WorkflowsUpdateStepArguments } from './workflows'; +export type { + WorkflowsStepCompletedArguments, + WorkflowsStepFailedArguments, + WorkflowsUpdateStepArguments, +} from './workflows'; export type { ViewsUpdateArguments, ViewsOpenArguments, ViewsPushArguments, ViewsPublishArguments } from './views'; -export type { UsersConversationsArguments, UsersDiscoverableContactsLookupArguments, UsersInfoArguments, UsersListArguments, UsersIdentityArguments, UsersSetPhotoArguments, UsersProfileGetArguments, UsersProfileSetArguments, UsersDeletePhotoArguments, UsersGetPresenceArguments, UsersSetPresenceArguments, UsersLookupByEmailArguments } from './users'; +export type { + UsersConversationsArguments, + UsersDiscoverableContactsLookupArguments, + UsersInfoArguments, + UsersListArguments, + UsersIdentityArguments, + UsersSetPhotoArguments, + UsersProfileGetArguments, + UsersProfileSetArguments, + UsersDeletePhotoArguments, + UsersGetPresenceArguments, + UsersSetPresenceArguments, + UsersLookupByEmailArguments, +} from './users'; export type { ToolingTokensRotateArguments } from './tooling'; export type { SearchAllArguments, SearchFilesArguments, SearchMessagesArguments } from './search'; -export type { UsergroupsCreateArguments, UsergroupsDisableArguments, UsergroupsEnableArguments, UsergroupsListArguments, UsergroupsUpdateArguments, UsergroupsUsersListArguments, UsergroupsUsersUpdateArguments } from './usergroups'; -export type { TeamAccessLogsArguments, TeamBillableInfoArguments, TeamBillingInfoArguments, TeamExternalTeamsDisconnectArguments, TeamExternalTeamsListArguments, TeamInfoArguments, TeamIntegrationLogsArguments, TeamPreferencesListArguments, TeamProfileGetArguments } from './team'; +export type { + UsergroupsCreateArguments, + UsergroupsDisableArguments, + UsergroupsEnableArguments, + UsergroupsListArguments, + UsergroupsUpdateArguments, + UsergroupsUsersListArguments, + UsergroupsUsersUpdateArguments, +} from './usergroups'; +export type { + TeamAccessLogsArguments, + TeamBillableInfoArguments, + TeamBillingInfoArguments, + TeamExternalTeamsDisconnectArguments, + TeamExternalTeamsListArguments, + TeamInfoArguments, + TeamIntegrationLogsArguments, + TeamPreferencesListArguments, + TeamProfileGetArguments, +} from './team'; export type { StarsAddRemoveArguments, StarsListArguments } from './stars'; export type { RTMConnectArguments, RTMStartArguments } from './rtm'; -export type { RemindersAddArguments, RemindersInfoArguments, RemindersListArguments, RemindersDeleteArguments, RemindersCompleteArguments } from './reminders'; -export type { ReactionsAddArguments, ReactionsGetArguments, ReactionsListArguments, ReactionsRemoveArguments } from './reactions'; +export type { + RemindersAddArguments, + RemindersInfoArguments, + RemindersListArguments, + RemindersDeleteArguments, + RemindersCompleteArguments, +} from './reminders'; +export type { + ReactionsAddArguments, + ReactionsGetArguments, + ReactionsListArguments, + ReactionsRemoveArguments, +} from './reactions'; export type { PinsAddArguments, PinsListArguments, PinsRemoveArguments } from './pins'; export type { OpenIDConnectTokenArguments, OpenIDConnectUserInfoArguments } from './openid'; export type { OAuthAccessArguments, OAuthV2AccessArguments, OAuthV2ExchangeArguments } from './oauth'; export type { MigrationExchangeArguments } from './migration'; -export type { FilesDeleteArguments, FilesInfoArguments, FilesListArguments, FilesRevokePublicURLArguments, FilesSharedPublicURLArguments, FilesUploadArguments, FilesUploadV2Arguments, FilesCompleteUploadExternalArguments, FilesGetUploadURLExternalArguments, FilesCommentsDeleteArguments, FilesRemoteUpdateArguments, FilesRemoteRemoveArguments, FilesRemoteShareArguments, FilesRemoteListArguments, FilesRemoteInfoArguments, FilesRemoteAddArguments } from './files'; +export type { + FilesDeleteArguments, + FilesInfoArguments, + FilesListArguments, + FilesRevokePublicURLArguments, + FilesSharedPublicURLArguments, + FilesUploadArguments, + FilesUploadV2Arguments, + FilesCompleteUploadExternalArguments, + FilesGetUploadURLExternalArguments, + FilesCommentsDeleteArguments, + FilesRemoteUpdateArguments, + FilesRemoteRemoveArguments, + FilesRemoteShareArguments, + FilesRemoteListArguments, + FilesRemoteInfoArguments, + FilesRemoteAddArguments, +} from './files'; export type { EmojiListArguments } from './emoji'; -export type { DndEndDndArguments, DndEndSnoozeArguments, DndInfoArguments, DndSetSnoozeArguments, DndTeamInfoArguments } from './dnd'; +export type { + DndEndDndArguments, + DndEndSnoozeArguments, + DndInfoArguments, + DndSetSnoozeArguments, + DndTeamInfoArguments, +} from './dnd'; export type { DialogOpenArguments } from './dialog'; -export type { ConversationsAcceptSharedInviteArguments, ConversationsApproveSharedInviteArguments, ConversationsArchiveArguments, ConversationsCloseArguments, ConversationsCreateArguments, ConversationsDeclineSharedInviteArguments, ConversationsExternalInvitePermissionsSetArguments, ConversationsHistoryArguments, ConversationsInfoArguments, ConversationsInviteArguments, ConversationsInviteSharedArguments, ConversationsJoinArguments, ConversationsKickArguments, ConversationsLeaveArguments, ConversationsListArguments, ConversationsListConnectInvitesArguments, ConversationsMarkArguments, ConversationsMembersArguments, ConversationsOpenArguments, ConversationsRenameArguments, ConversationsRepliesArguments, ConversationsSetPurposeArguments, ConversationsSetTopicArguments, ConversationsUnarchiveArguments } from './conversations'; -export type { ChatDeleteArguments, ChatDeleteScheduledMessageArguments, ChatGetPermalinkArguments, ChatMeMessageArguments, ChatPostEphemeralArguments, ChatPostMessageArguments, ChatScheduleMessageArguments, ChatScheduledMessagesListArguments, ChatUnfurlArguments, ChatUpdateArguments } from './chat'; -export type { CanvasesAccessDeleteArguments, CanvasesAccessSetArguments, CanvasesCreateArguments, CanvasesDeleteArguments, CanvasesEditArguments, CanvasesSectionsLookupArguments, ConversationsCanvasesCreateArguments } from './canvas'; -export type { CallsAddArguments, CallsEndArguments, CallsInfoArguments, CallsUpdateArguments, CallsParticipantsAddArguments, CallsParticipantsRemoveArguments } from './calls'; +export type { + ConversationsAcceptSharedInviteArguments, + ConversationsApproveSharedInviteArguments, + ConversationsArchiveArguments, + ConversationsCloseArguments, + ConversationsCreateArguments, + ConversationsDeclineSharedInviteArguments, + ConversationsExternalInvitePermissionsSetArguments, + ConversationsHistoryArguments, + ConversationsInfoArguments, + ConversationsInviteArguments, + ConversationsInviteSharedArguments, + ConversationsJoinArguments, + ConversationsKickArguments, + ConversationsLeaveArguments, + ConversationsListArguments, + ConversationsListConnectInvitesArguments, + ConversationsMarkArguments, + ConversationsMembersArguments, + ConversationsOpenArguments, + ConversationsRenameArguments, + ConversationsRepliesArguments, + ConversationsSetPurposeArguments, + ConversationsSetTopicArguments, + ConversationsUnarchiveArguments, +} from './conversations'; +export type { + ChatDeleteArguments, + ChatDeleteScheduledMessageArguments, + ChatGetPermalinkArguments, + ChatMeMessageArguments, + ChatPostEphemeralArguments, + ChatPostMessageArguments, + ChatScheduleMessageArguments, + ChatScheduledMessagesListArguments, + ChatUnfurlArguments, + ChatUpdateArguments, +} from './chat'; +export type { + CanvasesAccessDeleteArguments, + CanvasesAccessSetArguments, + CanvasesCreateArguments, + CanvasesDeleteArguments, + CanvasesEditArguments, + CanvasesSectionsLookupArguments, + ConversationsCanvasesCreateArguments, +} from './canvas'; +export type { + CallsAddArguments, + CallsEndArguments, + CallsInfoArguments, + CallsUpdateArguments, + CallsParticipantsAddArguments, + CallsParticipantsRemoveArguments, +} from './calls'; export type { BotsInfoArguments } from './bots'; -export type { BookmarksAddArguments, BookmarksEditArguments, BookmarksListArguments, BookmarksRemoveArguments } from './bookmarks'; +export type { + BookmarksAddArguments, + BookmarksEditArguments, + BookmarksListArguments, + BookmarksRemoveArguments, +} from './bookmarks'; export type { AuthRevokeArguments, AuthTestArguments, AuthTeamsListArguments } from './auth'; -export type { AppsConnectionsOpenArguments, AppsEventAuthorizationsListArguments, AppsManifestCreateArguments, AppsManifestDeleteArguments, AppsManifestExportArguments, AppsManifestUpdateArguments, AppsManifestValidateArguments, AppsUninstallArguments } from './apps'; +export type { + AppsConnectionsOpenArguments, + AppsEventAuthorizationsListArguments, + AppsManifestCreateArguments, + AppsManifestDeleteArguments, + AppsManifestExportArguments, + AppsManifestUpdateArguments, + AppsManifestValidateArguments, + AppsUninstallArguments, +} from './apps'; export type { APITestArguments } from './api'; export type { AdminAnalyticsGetFileArguments } from './admin/analytics'; -export type { AdminAppsActivitiesListArguments, AdminAppsApproveArguments, AdminAppsApprovedListArguments, AdminAppsClearResolutionArguments, AdminAppsConfigLookupArguments, AdminAppsConfigSetArguments, AdminAppsRequestsCancelArguments, AdminAppsRequestsListArguments, AdminAppsRestrictArguments, AdminAppsRestrictedListArguments, AdminAppsUninstallArguments } from './admin/apps'; -export type { AdminAuthPolicyAssignEntitiesArguments, AdminAuthPolicyGetEntitiesArguments, AdminAuthPolicyRemoveEntitiesArguments } from './admin/auth'; -export type { AdminBarriersCreateArguments, AdminBarriersDeleteArguments, AdminBarriersListArguments, AdminBarriersUpdateArguments } from './admin/barriers'; -export type { AdminConversationsArchiveArguments, AdminConversationsBulkArchiveArguments, AdminConversationsBulkDeleteArguments, AdminConversationsBulkMoveArguments, AdminConversationsConvertToPrivateArguments, AdminConversationsConvertToPublicArguments, AdminConversationsCreateArguments, AdminConversationsDeleteArguments, AdminConversationsDisconnectSharedArguments, AdminConversationsEKMListOriginalConnectedChannelInfoArguments, AdminConversationsGetConversationPrefsArguments, AdminConversationsGetCustomRetentionArguments, AdminConversationsGetTeamsArguments, AdminConversationsInviteArguments, AdminConversationsLookupArguments, AdminConversationsRemoveCustomRetentionArguments, AdminConversationsRenameArguments, AdminConversationsRestrictAccessAddGroupArguments, AdminConversationsRestrictAccessListGroupsArguments, AdminConversationsRestrictAccessRemoveGroupArguments, AdminConversationsSearchArguments, AdminConversationsSetConversationPrefsArguments, AdminConversationsSetCustomRetentionArguments, AdminConversationsSetTeamsArguments, AdminConversationsUnarchiveArguments } from './admin/conversations'; -export type { AdminEmojiAddArguments, AdminEmojiAddAliasArguments, AdminEmojiListArguments, AdminEmojiRemoveArguments, AdminEmojiRenameArguments } from './admin/emoji'; -export type { AdminFunctionsListArguments, AdminFunctionsPermissionsLookupArguments, AdminFunctionsPermissionsSetArguments } from './admin/functions'; +export type { + AdminAppsActivitiesListArguments, + AdminAppsApproveArguments, + AdminAppsApprovedListArguments, + AdminAppsClearResolutionArguments, + AdminAppsConfigLookupArguments, + AdminAppsConfigSetArguments, + AdminAppsRequestsCancelArguments, + AdminAppsRequestsListArguments, + AdminAppsRestrictArguments, + AdminAppsRestrictedListArguments, + AdminAppsUninstallArguments, +} from './admin/apps'; +export type { + AdminAuthPolicyAssignEntitiesArguments, + AdminAuthPolicyGetEntitiesArguments, + AdminAuthPolicyRemoveEntitiesArguments, +} from './admin/auth'; +export type { + AdminBarriersCreateArguments, + AdminBarriersDeleteArguments, + AdminBarriersListArguments, + AdminBarriersUpdateArguments, +} from './admin/barriers'; +export type { + AdminConversationsArchiveArguments, + AdminConversationsBulkArchiveArguments, + AdminConversationsBulkDeleteArguments, + AdminConversationsBulkMoveArguments, + AdminConversationsConvertToPrivateArguments, + AdminConversationsConvertToPublicArguments, + AdminConversationsCreateArguments, + AdminConversationsDeleteArguments, + AdminConversationsDisconnectSharedArguments, + AdminConversationsEKMListOriginalConnectedChannelInfoArguments, + AdminConversationsGetConversationPrefsArguments, + AdminConversationsGetCustomRetentionArguments, + AdminConversationsGetTeamsArguments, + AdminConversationsInviteArguments, + AdminConversationsLookupArguments, + AdminConversationsRemoveCustomRetentionArguments, + AdminConversationsRenameArguments, + AdminConversationsRestrictAccessAddGroupArguments, + AdminConversationsRestrictAccessListGroupsArguments, + AdminConversationsRestrictAccessRemoveGroupArguments, + AdminConversationsSearchArguments, + AdminConversationsSetConversationPrefsArguments, + AdminConversationsSetCustomRetentionArguments, + AdminConversationsSetTeamsArguments, + AdminConversationsUnarchiveArguments, +} from './admin/conversations'; +export type { + AdminEmojiAddArguments, + AdminEmojiAddAliasArguments, + AdminEmojiListArguments, + AdminEmojiRemoveArguments, + AdminEmojiRenameArguments, +} from './admin/emoji'; +export type { + AdminFunctionsListArguments, + AdminFunctionsPermissionsLookupArguments, + AdminFunctionsPermissionsSetArguments, +} from './admin/functions'; export type { FunctionsCompleteErrorArguments, FunctionsCompleteSuccessArguments } from './functions'; -export type { AdminInviteRequestsApproveArguments, AdminInviteRequestsApprovedListArguments, AdminInviteRequestsDeniedListArguments, AdminInviteRequestsDenyArguments, AdminInviteRequestsListArguments } from './admin/inviteRequests'; -export type { AdminRolesAddAssignmentsArguments, AdminRolesListAssignmentsArguments, AdminRolesRemoveAssignmentsArguments } from './admin/roles'; -export type { AdminTeamsAdminsListArguments, AdminTeamsCreateArguments, AdminTeamsListArguments, AdminTeamsOwnersListArguments, AdminTeamsSettingsInfoArguments, AdminTeamsSettingsSetDefaultChannelsArguments, AdminTeamsSettingsSetDescriptionArguments, AdminTeamsSettingsSetDiscoverabilityArguments, AdminTeamsSettingsSetIconArguments, AdminTeamsSettingsSetNameArguments } from './admin/teams'; -export type { AdminUsergroupsAddChannelsArguments, AdminUsergroupsAddTeamsArguments, AdminUsergroupsListChannelsArguments, AdminUsergroupsRemoveChannelsArguments } from './admin/usergroups'; -export type { AdminUsersAssignArguments, AdminUsersInviteArguments, AdminUsersListArguments, AdminUsersRemoveArguments, AdminUsersSessionListArguments, AdminUsersSessionClearSettingsArguments, AdminUsersSessionGetSettingsArguments, AdminUsersSessionInvalidateArguments, AdminUsersSessionResetArguments, AdminUsersSessionResetBulkArguments, AdminUsersSessionSetSettingsArguments, AdminUsersSetAdminArguments, AdminUsersSetExpirationArguments, AdminUsersSetOwnerArguments, AdminUsersSetRegularArguments, AdminUsersUnsupportedVersionsExportArguments } from './admin/users'; -export type { AdminWorkflowsCollaboratorsAddArguments, AdminWorkflowsCollaboratorsRemoveArguments, AdminWorkflowsPermissionsLookupArguments, AdminWorkflowsSearchArguments, AdminWorkflowsUnpublishArguments } from './admin/workflows'; +export type { + AdminInviteRequestsApproveArguments, + AdminInviteRequestsApprovedListArguments, + AdminInviteRequestsDeniedListArguments, + AdminInviteRequestsDenyArguments, + AdminInviteRequestsListArguments, +} from './admin/inviteRequests'; +export type { + AdminRolesAddAssignmentsArguments, + AdminRolesListAssignmentsArguments, + AdminRolesRemoveAssignmentsArguments, +} from './admin/roles'; +export type { + AdminTeamsAdminsListArguments, + AdminTeamsCreateArguments, + AdminTeamsListArguments, + AdminTeamsOwnersListArguments, + AdminTeamsSettingsInfoArguments, + AdminTeamsSettingsSetDefaultChannelsArguments, + AdminTeamsSettingsSetDescriptionArguments, + AdminTeamsSettingsSetDiscoverabilityArguments, + AdminTeamsSettingsSetIconArguments, + AdminTeamsSettingsSetNameArguments, +} from './admin/teams'; +export type { + AdminUsergroupsAddChannelsArguments, + AdminUsergroupsAddTeamsArguments, + AdminUsergroupsListChannelsArguments, + AdminUsergroupsRemoveChannelsArguments, +} from './admin/usergroups'; +export type { + AdminUsersAssignArguments, + AdminUsersInviteArguments, + AdminUsersListArguments, + AdminUsersRemoveArguments, + AdminUsersSessionListArguments, + AdminUsersSessionClearSettingsArguments, + AdminUsersSessionGetSettingsArguments, + AdminUsersSessionInvalidateArguments, + AdminUsersSessionResetArguments, + AdminUsersSessionResetBulkArguments, + AdminUsersSessionSetSettingsArguments, + AdminUsersSetAdminArguments, + AdminUsersSetExpirationArguments, + AdminUsersSetOwnerArguments, + AdminUsersSetRegularArguments, + AdminUsersUnsupportedVersionsExportArguments, +} from './admin/users'; +export type { + AdminWorkflowsCollaboratorsAddArguments, + AdminWorkflowsCollaboratorsRemoveArguments, + AdminWorkflowsPermissionsLookupArguments, + AdminWorkflowsSearchArguments, + AdminWorkflowsUnpublishArguments, +} from './admin/workflows'; diff --git a/packages/web-api/src/types/request/manifest.ts b/packages/web-api/src/types/request/manifest.ts index abae3f15e..2c2f143d4 100644 --- a/packages/web-api/src/types/request/manifest.ts +++ b/packages/web-api/src/types/request/manifest.ts @@ -439,13 +439,9 @@ type UserScope = // https://api.slack.com/scopes?query=Configuration // var scopes = [].slice.call(document.getElementsByClassName('apiReferenceFilterableList__listItemLink')) // .map(e => ''' + e.innerText + ''').join(' | '); console.log('export type AnyConfigurationScope = ' + scopes + ';'); -export type AnyManifestConfigurationScope = - | 'app_configurations:read' - | 'app_configurations:write'; +export type AnyManifestConfigurationScope = 'app_configurations:read' | 'app_configurations:write'; -export type AppManifestLevelScopes = - | 'authorizations:read' - | 'connections:write'; +export type AppManifestLevelScopes = 'authorizations:read' | 'connections:write'; // https://api.slack.com/events?filter=Events // var events = [].slice.call(document.getElementsByClassName('apiReferenceFilterableList__listItemLink')) diff --git a/packages/web-api/src/types/request/openid.ts b/packages/web-api/src/types/request/openid.ts index b813a30fc..7b605f81b 100644 --- a/packages/web-api/src/types/request/openid.ts +++ b/packages/web-api/src/types/request/openid.ts @@ -1,4 +1,4 @@ -import { OptionalArgument } from '../helpers'; +import type { OptionalArgument } from '../helpers'; import type { OAuthCredentials, OAuthGrantRefresh } from './common'; diff --git a/packages/web-api/src/types/request/pins.ts b/packages/web-api/src/types/request/pins.ts index 721667141..9027ade03 100644 --- a/packages/web-api/src/types/request/pins.ts +++ b/packages/web-api/src/types/request/pins.ts @@ -1,4 +1,4 @@ -import { MessageArgument, TokenOverridable } from './common'; +import type { MessageArgument, TokenOverridable } from './common'; // https://api.slack.com/methods/pins.add export interface PinsAddArguments extends MessageArgument, TokenOverridable {} diff --git a/packages/web-api/src/types/request/reactions.ts b/packages/web-api/src/types/request/reactions.ts index 10225bf33..bd7555f96 100644 --- a/packages/web-api/src/types/request/reactions.ts +++ b/packages/web-api/src/types/request/reactions.ts @@ -1,4 +1,5 @@ -import { +import type { OptionalArgument } from '../helpers'; +import type { CursorPaginationEnabled, FileArgument, FileCommentArgument, @@ -7,28 +8,34 @@ import { TokenOverridable, TraditionalPagingEnabled, } from './common'; -import { OptionalArgument } from '../helpers'; -interface ReactionsFull { +export interface ReactionsFull { /** @description If `true`, return the complete reaction list. */ full?: boolean; } -interface ReactionName { +export interface ReactionName { /** @description Reaction (emoji) name. */ name: string; } // https://api.slack.com/methods/reactions.add export interface ReactionsAddArguments extends MessageArgument, TokenOverridable, ReactionName {} // https://api.slack.com/methods/reactions.get -export type ReactionsGetArguments = ReactionsFull & TokenOverridable & -(MessageArgument | FileArgument | FileCommentArgument); +export type ReactionsGetArguments = ReactionsFull & + TokenOverridable & + (MessageArgument | FileArgument | FileCommentArgument); // https://api.slack.com/methods/reactions.list -export type ReactionsListArguments = OptionalArgument; +export type ReactionsListArguments = OptionalArgument< + ReactionsFull & + TokenOverridable & + TraditionalPagingEnabled & + CursorPaginationEnabled & + OptionalTeamAssignable & { + /** @description Show reactions made by this user. Defaults to the authed user. */ + user?: string; + } +>; // https://api.slack.com/methods/reactions.remove -export type ReactionsRemoveArguments = TokenOverridable & ReactionName & -(MessageArgument | FileArgument | FileCommentArgument); +export type ReactionsRemoveArguments = TokenOverridable & + ReactionName & + (MessageArgument | FileArgument | FileCommentArgument); diff --git a/packages/web-api/src/types/request/reminders.ts b/packages/web-api/src/types/request/reminders.ts index 1ad0d5868..a2cd87801 100644 --- a/packages/web-api/src/types/request/reminders.ts +++ b/packages/web-api/src/types/request/reminders.ts @@ -1,5 +1,5 @@ -import { OptionalTeamAssignable, TokenOverridable } from './common'; -import { OptionalArgument } from '../helpers'; +import type { OptionalArgument } from '../helpers'; +import type { OptionalTeamAssignable, TokenOverridable } from './common'; interface ReminderRecurrenceDailyMonthlyYearly { /** @description Specifies the repeating behavior of a reminder. */ @@ -10,7 +10,7 @@ interface ReminderRecurrenceWeekly { /** @description Specifies the repeating behavior of a reminder. */ frequency: 'weekly'; /** @description Specifies the day-of-the-week repeating behaviour when `frequency` is set to `weekly`. */ - weekdays: [DaysOfTheWeek, ...DaysOfTheWeek[]] + weekdays: [DaysOfTheWeek, ...DaysOfTheWeek[]]; } type ReminderRecurrence = ReminderRecurrenceWeekly | ReminderRecurrenceDailyMonthlyYearly; // https://api.slack.com/methods/reminders.add diff --git a/packages/web-api/src/types/request/rtm.ts b/packages/web-api/src/types/request/rtm.ts index 26e5ea92a..157e7bf2a 100644 --- a/packages/web-api/src/types/request/rtm.ts +++ b/packages/web-api/src/types/request/rtm.ts @@ -1,30 +1,35 @@ -import { LocaleAware, TokenOverridable } from './common'; -import { OptionalArgument } from '../helpers'; +import type { OptionalArgument } from '../helpers'; +import type { LocaleAware, TokenOverridable } from './common'; // https://api.slack.com/methods/rtm.connect -export type RTMConnectArguments = OptionalArgument; +export type RTMConnectArguments = OptionalArgument< + TokenOverridable & { + /** + * @description Batch presence deliveries via subscription. Enabling changes the shape of `presence_change` events. + * @see {@link https://api.slack.com/docs/presence-and-status#batching batch presence}. + */ + batch_presence_aware?: boolean; + /** + * @description Only deliver presence events when requested by subscription. + * @see {@link Only deliver presence events when requested by subscription. presence subscriptions}. + */ + presence_sub?: boolean; + } +>; // https://api.slack.com/methods/rtm.start -export type RTMStartArguments = OptionalArgument; +export type RTMStartArguments = OptionalArgument< + RTMConnectArguments & + LocaleAware & { + /** @description Returns MPIMs to the client in the API response. */ + mpim_aware?: boolean; + /** + * @description Exclude latest timestamps for channels, groups, mpims, and ims. + * Automatically sets `no_unreads` to `true`. + */ + no_latest?: boolean; + /** @description Skip unread counts for each channel (improves performance). */ + no_unreads?: boolean; + /** @description Return timestamp only for latest message object of each channel (improves performance). */ + simple_latest?: boolean; + } +>; diff --git a/packages/web-api/src/types/request/search.ts b/packages/web-api/src/types/request/search.ts index e7264b845..cdf92063e 100644 --- a/packages/web-api/src/types/request/search.ts +++ b/packages/web-api/src/types/request/search.ts @@ -1,4 +1,4 @@ -import { OptionalTeamAssignable, SortDir, TokenOverridable, TraditionalPagingEnabled } from './common'; +import type { OptionalTeamAssignable, SortDir, TokenOverridable, TraditionalPagingEnabled } from './common'; interface Searchable extends OptionalTeamAssignable, SortDir { /** @description Search query. */ @@ -13,11 +13,8 @@ interface Searchable extends OptionalTeamAssignable, SortDir { } // https://api.slack.com/methods/search.all -export interface SearchAllArguments extends TokenOverridable, TraditionalPagingEnabled, - Searchable { } +export interface SearchAllArguments extends TokenOverridable, TraditionalPagingEnabled, Searchable {} // https://api.slack.com/methods/search.files -export interface SearchFilesArguments extends TokenOverridable, TraditionalPagingEnabled, - Searchable { } +export interface SearchFilesArguments extends TokenOverridable, TraditionalPagingEnabled, Searchable {} // https://api.slack.com/methods/search.messages -export interface SearchMessagesArguments extends TokenOverridable, TraditionalPagingEnabled, - Searchable { } +export interface SearchMessagesArguments extends TokenOverridable, TraditionalPagingEnabled, Searchable {} diff --git a/packages/web-api/src/types/request/stars.ts b/packages/web-api/src/types/request/stars.ts index dc580853c..1c15d9070 100644 --- a/packages/web-api/src/types/request/stars.ts +++ b/packages/web-api/src/types/request/stars.ts @@ -1,4 +1,4 @@ -import { +import type { CursorPaginationEnabled, FileArgument, FileCommentArgument, @@ -9,13 +9,16 @@ import { } from './common'; /** @description When starring something, it can be starred _to_ a channel. */ -interface StarsChannelDestination { +export interface StarsChannelDestination { /** @description Encoded channel ID the star belongs to. */ channel: string; } // https://api.slack.com/methods/stars.add & https://api.slack.com/methods/stars.remove export type StarsAddRemoveArguments = TokenOverridable & -(StarsChannelDestination | MessageArgument | FileArgument | FileCommentArgument); + (StarsChannelDestination | MessageArgument | FileArgument | FileCommentArgument); // https://api.slack.com/methods/stars.list -export interface StarsListArguments extends TokenOverridable, TraditionalPagingEnabled, - CursorPaginationEnabled, OptionalTeamAssignable { } +export interface StarsListArguments + extends TokenOverridable, + TraditionalPagingEnabled, + CursorPaginationEnabled, + OptionalTeamAssignable {} diff --git a/packages/web-api/src/types/request/team.ts b/packages/web-api/src/types/request/team.ts index b6bb5ca53..de80daac3 100644 --- a/packages/web-api/src/types/request/team.ts +++ b/packages/web-api/src/types/request/team.ts @@ -1,4 +1,5 @@ -import { +import type { OptionalArgument } from '../helpers'; +import type { AppID, CursorPaginationEnabled, OptionalTeamAssignable, @@ -7,65 +8,90 @@ import { TokenOverridable, TraditionalPagingEnabled, } from './common'; -import { OptionalArgument } from '../helpers'; // https://api.slack.com/methods/team.accessLogs -export type TeamAccessLogsArguments = OptionalArgument; +export type TeamAccessLogsArguments = OptionalArgument< + TokenOverridable & + CursorPaginationEnabled & + TraditionalPagingEnabled & + OptionalTeamAssignable & { + /** + * @description End of time range of logs to include in results (inclusive) as a UNIX timestamp in seconds. + * Default to now. + */ + before?: number; + } +>; // https://api.slack.com/methods/team.billableInfo -export type TeamBillableInfoArguments = OptionalArgument; +export type TeamBillableInfoArguments = OptionalArgument< + TokenOverridable & + CursorPaginationEnabled & + OptionalTeamAssignable & { + /** @description A user to retrieve the billable information for. Defaults to all users. */ + user?: string; + } +>; // https://api.slack.com/methods/team.billing.info export type TeamBillingInfoArguments = OptionalArgument; // https://api.slack.com/methods/team.externalTeams.disconnect export type TeamExternalTeamsDisconnectArguments = TokenOverridable & Required; // https://api.slack.com/methods/team.externalTeams.list -export type TeamExternalTeamsListArguments = OptionalArgument; +export type TeamExternalTeamsListArguments = OptionalArgument< + TokenOverridable & + CursorPaginationEnabled & { + /** @description Status of the connected team. */ + connection_status_filter?: 'CONNECTED' | 'DISCONNECTED' | 'BLOCKED' | 'IN_REVIEW'; + /** @description Filters connected orgs by Slack Connect pref override(s) */ + slack_connect_pref_filter?: + | 'approved_orgs_only' + | 'allow_sc_file_uploads' + | 'profile_visibility' + | 'away_team_sc_invite_permissions' + | 'accept_sc_invites' + | 'sc_mpdm_to_private' + | 'require_sc_channel_for_sc_dm' + | 'external_awareness_context_bar'; + /** @description Direction to sort in asc or desc. */ + sort_direction?: SortDir['sort_dir']; + /** @description Name of the parameter that we are sorting by. Defaults to `team_name`. */ + sort_field?: 'team_name' | 'last_active_timestamp' | 'connection_status'; + /** @description Shows connected orgs which are connected on a specified encoded workspace ID. */ + workspace_filter?: string[]; + } +>; // https://api.slack.com/methods/team.info -export type TeamInfoArguments = OptionalArgument; +export type TeamInfoArguments = OptionalArgument< + TokenOverridable & { + /** + * @description Query by domain instead of team (only when `team` is null). This only works for domains in the same + * enterprise as the querying team token. + * This also expects the domain to belong to a team and not the enterprise itself. + */ + domain?: string; // available only for Enterprise Grid + /** @description Team to get info about; if omitted, will return information about the current team. */ + team?: string; + } +>; // https://api.slack.com/methods/team.integrationLogs -export type TeamIntegrationLogsArguments = OptionalArgument & TokenOverridable & -OptionalTeamAssignable & TraditionalPagingEnabled & { - /** @description Filter logs with this change type. Defaults to all logs. */ - change_type?: 'added' | 'removed' | 'enabled' | 'disabled' | 'updated'; - /** @description Filter logs to this service. Defaults to all logs. */ - service_id?: string; - /** @description Filter logs generated by this user’s actions. Defaults to all logs. */ - user?: string; -}>; +export type TeamIntegrationLogsArguments = OptionalArgument< + Partial & + TokenOverridable & + OptionalTeamAssignable & + TraditionalPagingEnabled & { + /** @description Filter logs with this change type. Defaults to all logs. */ + change_type?: 'added' | 'removed' | 'enabled' | 'disabled' | 'updated'; + /** @description Filter logs to this service. Defaults to all logs. */ + service_id?: string; + /** @description Filter logs generated by this user’s actions. Defaults to all logs. */ + user?: string; + } +>; // https://api.slack.com/methods/team.profile.get -export type TeamProfileGetArguments = OptionalArgument; +export type TeamProfileGetArguments = OptionalArgument< + TokenOverridable & { + /** @description Filter by visibility. */ + visibility?: 'all' | 'visible' | 'hidden'; + } +>; // https://api.slack.com/methods/team.preferences.list export type TeamPreferencesListArguments = OptionalArgument; diff --git a/packages/web-api/src/types/request/usergroups.ts b/packages/web-api/src/types/request/usergroups.ts index 9b26e4c9e..d7f915d08 100644 --- a/packages/web-api/src/types/request/usergroups.ts +++ b/packages/web-api/src/types/request/usergroups.ts @@ -1,7 +1,7 @@ -import { OptionalTeamAssignable, TokenOverridable } from './common'; -import { OptionalArgument } from '../helpers'; +import type { OptionalArgument } from '../helpers'; +import type { OptionalTeamAssignable, TokenOverridable } from './common'; -interface UsergroupsIncludeCount { +export interface UsergroupsIncludeCount { /** @description Include the number of users in each User Group. */ include_count?: boolean; } @@ -28,17 +28,22 @@ export interface UsergroupsEnableArguments extends TokenOverridable, OptionalTea usergroup: string; } // https://api.slack.com/methods/usergroups.list -export type UsergroupsListArguments = OptionalArgument; +export type UsergroupsListArguments = OptionalArgument< + TokenOverridable & + OptionalTeamAssignable & + UsergroupsIncludeCount & { + /** @description Include disabled User Groups. */ + include_disabled?: boolean; + /** @description Include the list of users for each User Group. */ + include_users?: boolean; + } +>; // https://api.slack.com/methods/usergroups.update -export interface UsergroupsUpdateArguments extends TokenOverridable, OptionalTeamAssignable, - Partial { +export interface UsergroupsUpdateArguments + extends TokenOverridable, + OptionalTeamAssignable, + Partial { /** @description The encoded ID of the User Group to update. */ usergroup: string; } @@ -50,8 +55,10 @@ export interface UsergroupsUsersListArguments extends TokenOverridable, Optional include_disabled?: boolean; } // https://api.slack.com/methods/usergroups.users.update -export interface UsergroupsUsersUpdateArguments extends TokenOverridable, OptionalTeamAssignable, - UsergroupsIncludeCount { +export interface UsergroupsUsersUpdateArguments + extends TokenOverridable, + OptionalTeamAssignable, + UsergroupsIncludeCount { /** @description The encoded ID of the User Group to update users for. */ usergroup: string; /** diff --git a/packages/web-api/src/types/request/users.ts b/packages/web-api/src/types/request/users.ts index 3762e09b2..b591ceec7 100644 --- a/packages/web-api/src/types/request/users.ts +++ b/packages/web-api/src/types/request/users.ts @@ -1,6 +1,6 @@ -import { Stream } from 'node:stream'; +import type { Stream } from 'node:stream'; -import { CursorPaginationEnabled, LocaleAware, OptionalTeamAssignable, TokenOverridable } from './common'; +import type { CursorPaginationEnabled, LocaleAware, OptionalTeamAssignable, TokenOverridable } from './common'; interface Email { /** @description An email address belonging to a user in the workspace */ @@ -23,24 +23,27 @@ export interface UsersConversationsArguments extends TokenOverridable, CursorPag user?: string; } // https://api.slack.com/methods/users.deletePhoto -export interface UsersDeletePhotoArguments extends TokenOverridable { } +export interface UsersDeletePhotoArguments extends TokenOverridable {} // https://api.slack.com/methods/users.discoverableContacts.lookup -export interface UsersDiscoverableContactsLookupArguments extends Email, TokenOverridable { } +export interface UsersDiscoverableContactsLookupArguments extends Email, TokenOverridable {} // https://api.slack.com/methods/users.getPresence export interface UsersGetPresenceArguments extends TokenOverridable { /** @description User to get presence info on. Defaults to the authed user. */ user?: string; } // https://api.slack.com/methods/users.identity -export interface UsersIdentityArguments extends TokenOverridable { } +export interface UsersIdentityArguments extends TokenOverridable {} // https://api.slack.com/methods/users.info export interface UsersInfoArguments extends TokenOverridable, LocaleAware { /** @description User to get info on. */ user: string; } // https://api.slack.com/methods/users.list -export interface UsersListArguments extends TokenOverridable, CursorPaginationEnabled, - LocaleAware, OptionalTeamAssignable { } +export interface UsersListArguments + extends TokenOverridable, + CursorPaginationEnabled, + LocaleAware, + OptionalTeamAssignable {} // https://api.slack.com/methods/users.lookupByEmail export interface UsersLookupByEmailArguments extends Email, TokenOverridable {} // https://api.slack.com/methods/users.setPhoto diff --git a/packages/web-api/src/types/request/views.ts b/packages/web-api/src/types/request/views.ts index dea7d00f5..2039329c7 100644 --- a/packages/web-api/src/types/request/views.ts +++ b/packages/web-api/src/types/request/views.ts @@ -1,20 +1,20 @@ -import { View } from '@slack/types'; +import type { View } from '@slack/types'; -import { TokenOverridable } from './common'; +import type { TokenOverridable } from './common'; -interface BaseViewsArguments { +export interface BaseViewsArguments { /** @description A {@link https://api.slack.com/reference/surfaces/views view payload}. */ view: View; } -interface ViewTriggerId { +export interface ViewTriggerId { /** * @description An access token originating from a user interaction in the Slack client. * One of `trigger_id` or `interactivity_pointer` is required to interact with views. */ trigger_id: string; } -interface ViewInteractivityPointer { +export interface ViewInteractivityPointer { /** * @description An access token originating from a user interaction in the Slack client. * One of `trigger_id` or `interactivity_pointer` is required to interact with views. @@ -28,7 +28,7 @@ export type ViewsOpenArguments = BaseViewsArguments & TokenOverridable & (ViewTr // https://api.slack.com/methods/views.push export type ViewsPushArguments = BaseViewsArguments & TokenOverridable & (ViewTriggerId | ViewInteractivityPointer); -interface ViewHash { +export interface ViewHash { /** * @description A string that represents view state to protect against possible race conditions. * @see {@link https://api.slack.com/surfaces/modals#handling_race_conditions Avoiding race conditions when using views}. @@ -42,14 +42,14 @@ export interface ViewsPublishArguments extends BaseViewsArguments, TokenOverrida user_id: string; } -interface ViewExternalId { +export interface ViewExternalId { /** * @description A unique identifier of the view set by the developer. Must be unique for all views on a team. * Max length of 255 characters. Either `view_id` or `external_id` is required. */ external_id: string; } -interface ViewViewId { +export interface ViewViewId { /** * @description A unique identifier of the view to be updated. Either `view_id` or `external_id` is required. */ diff --git a/packages/web-api/src/types/request/workflows.ts b/packages/web-api/src/types/request/workflows.ts index 6fc387c7c..49f661026 100644 --- a/packages/web-api/src/types/request/workflows.ts +++ b/packages/web-api/src/types/request/workflows.ts @@ -1,4 +1,4 @@ -import { TokenOverridable } from './common'; +import type { TokenOverridable } from './common'; // TODO: breaking change: to be removed after Sep 12 2024 // https://api.slack.com/changelog/2023-08-workflow-steps-from-apps-step-back @@ -22,14 +22,14 @@ export interface WorkflowsUpdateStepArguments extends TokenOverridable { step_name?: string; inputs?: { [name: string]: { - // eslint-disable-next-line @typescript-eslint/no-explicit-any + // biome-ignore lint/suspicious/noExplicitAny: steps from apps inputs are untyped value: any; skip_variable_replacement?: boolean; variables?: { - // eslint-disable-next-line @typescript-eslint/no-explicit-any + // biome-ignore lint/suspicious/noExplicitAny: steps from apps inputs are untyped [key: string]: any; }; - }, + }; }; outputs?: { type: string; diff --git a/packages/web-api/src/types/response/AdminAnalyticsGetFileResponse.ts b/packages/web-api/src/types/response/AdminAnalyticsGetFileResponse.ts index 45bdc77f1..e33b954f9 100644 --- a/packages/web-api/src/types/response/AdminAnalyticsGetFileResponse.ts +++ b/packages/web-api/src/types/response/AdminAnalyticsGetFileResponse.ts @@ -1,12 +1,16 @@ /* eslint-disable no-multi-spaces,max-len */ -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminAnalyticsGetFileResponse = WebAPICallResult & { - file_data?: (AdminAnalyticsMemberDetails | AdminAnalyticsPublicChannelDetails | AdminAnalyticsPublicChannelMetadataDetails)[]; - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + file_data?: ( + | AdminAnalyticsMemberDetails + | AdminAnalyticsPublicChannelDetails + | AdminAnalyticsPublicChannelMetadataDetails + )[]; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; @@ -15,72 +19,72 @@ export interface ResponseMetadata { } export interface AdminAnalyticsMemberDetails { - enterprise_id: string; - team_id: string; - date: string; - user_id: string; - email_address: string; - is_guest: boolean; - is_billable_seat: boolean; - is_active: boolean; - is_active_ios: boolean; - is_active_android: boolean; - is_active_desktop: boolean; - reactions_added_count: number; - messages_posted_count: number; + enterprise_id: string; + team_id: string; + date: string; + user_id: string; + email_address: string; + is_guest: boolean; + is_billable_seat: boolean; + is_active: boolean; + is_active_ios: boolean; + is_active_android: boolean; + is_active_desktop: boolean; + reactions_added_count: number; + messages_posted_count: number; channel_messages_posted_count: number; - files_added_count: number; - is_active_apps: boolean; - is_active_workflows: boolean; - is_active_slack_connect: boolean; - total_calls_count: number; - slack_calls_count: number; - slack_huddles_count: number; - search_count: number; - date_claimed: number; + files_added_count: number; + is_active_apps: boolean; + is_active_workflows: boolean; + is_active_slack_connect: boolean; + total_calls_count: number; + slack_calls_count: number; + slack_huddles_count: number; + search_count: number; + date_claimed: number; } export interface AdminAnalyticsPublicChannelDetails { - enterprise_id: string; - originating_team: AdminAnalyticsOriginatingTeamDetails; - channel_id: string; - date_created: number; - date_last_active: number; - total_members_count: number; - full_members_count: number; - guest_member_count: number; - messages_posted_count: number; - messages_posted_by_members_count: number; - members_who_viewed_count: number; - members_who_posted_count: number; - reactions_added_count: number; - visibility: string; - channel_type: string; - is_shared_externally: boolean; - shared_with: AdminAnalyticsSharedWithDetails[]; + enterprise_id: string; + originating_team: AdminAnalyticsOriginatingTeamDetails; + channel_id: string; + date_created: number; + date_last_active: number; + total_members_count: number; + full_members_count: number; + guest_member_count: number; + messages_posted_count: number; + messages_posted_by_members_count: number; + members_who_viewed_count: number; + members_who_posted_count: number; + reactions_added_count: number; + visibility: string; + channel_type: string; + is_shared_externally: boolean; + shared_with: AdminAnalyticsSharedWithDetails[]; externally_shared_with_organizations: AdminAnalyticsExternallySharedWithOrganizationsDetails[]; - date: string; + date: string; } export interface AdminAnalyticsPublicChannelMetadataDetails { - channel_id: string; - name: string; - topic: string; + channel_id: string; + name: string; + topic: string; description: string; - date: string; + date: string; } export interface AdminAnalyticsOriginatingTeamDetails { team_id: string; - name: string; + name: string; } export interface AdminAnalyticsSharedWithDetails { team_id: string; - name: string; + name: string; } export interface AdminAnalyticsExternallySharedWithOrganizationsDetails { - name: string; - domain: string; + name: string; + domain: string; } diff --git a/packages/web-api/src/types/response/AdminAppsActivitiesListResponse.ts b/packages/web-api/src/types/response/AdminAppsActivitiesListResponse.ts index cb8c0ff25..5e91160e7 100644 --- a/packages/web-api/src/types/response/AdminAppsActivitiesListResponse.ts +++ b/packages/web-api/src/types/response/AdminAppsActivitiesListResponse.ts @@ -8,81 +8,80 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminAppsActivitiesListResponse = WebAPICallResult & { - activities?: Activity[]; - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + activities?: Activity[]; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; export interface Activity { - app_id?: string; - component_id?: string; + app_id?: string; + component_id?: string; component_type?: string; - created?: number; - enterprise_id?: string; - event_type?: string; - level?: string; - payload?: Payload; - source?: string; - team_id?: string; - trace_id?: string; + created?: number; + enterprise_id?: string; + event_type?: string; + level?: string; + payload?: Payload; + source?: string; + team_id?: string; + trace_id?: string; } export interface Payload { - action?: string; - actor?: string; - billing_reason?: string[]; - bot_user_id?: string; - bundle_size_kb?: number; - channel_id?: string; - current_step?: number; - datastore_name?: string; - details?: string; - error?: string; - exec_outcome?: string; + action?: string; + actor?: string; + billing_reason?: string[]; + bot_user_id?: string; + bundle_size_kb?: number; + channel_id?: string; + current_step?: number; + datastore_name?: string; + details?: string; + error?: string; + exec_outcome?: string; function_execution_id?: string; - function_id?: string; - function_name?: string; - function_type?: string; - inputs?: Inputs; - is_billing_excluded?: boolean; - log?: string; - request_type?: string; - team_id?: string; - total_steps?: number; - trigger?: Trigger; - type?: string; - user_id?: string; - workflow_name?: string; + function_id?: string; + function_name?: string; + function_type?: string; + inputs?: Inputs; + is_billing_excluded?: boolean; + log?: string; + request_type?: string; + team_id?: string; + total_steps?: number; + trigger?: Trigger; + type?: string; + user_id?: string; + workflow_name?: string; } -export interface Inputs { -} +export type Inputs = {}; export interface Trigger { - config?: Config; - id?: string; + config?: Config; + id?: string; trip_information?: TripInformation; - type?: string; + type?: string; } export interface Config { description?: string; - event_type?: string; - name?: string; - schema?: Inputs; + event_type?: string; + name?: string; + schema?: Inputs; } export interface TripInformation { channel_id?: string; - list_id?: string; + list_id?: string; message_ts?: string; - reaction?: string; - user_id?: string; + reaction?: string; + user_id?: string; } export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/AdminAppsApproveResponse.ts b/packages/web-api/src/types/response/AdminAppsApproveResponse.ts index 0cf8c7d11..26c8aabb6 100644 --- a/packages/web-api/src/types/response/AdminAppsApproveResponse.ts +++ b/packages/web-api/src/types/response/AdminAppsApproveResponse.ts @@ -8,11 +8,11 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminAppsApproveResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; - warning?: string; + warning?: string; }; diff --git a/packages/web-api/src/types/response/AdminAppsApprovedListResponse.ts b/packages/web-api/src/types/response/AdminAppsApprovedListResponse.ts index a55adddff..65a1ab773 100644 --- a/packages/web-api/src/types/response/AdminAppsApprovedListResponse.ts +++ b/packages/web-api/src/types/response/AdminAppsApprovedListResponse.ts @@ -8,66 +8,66 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminAppsApprovedListResponse = WebAPICallResult & { - approved_apps?: ApprovedApp[]; - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + approved_apps?: ApprovedApp[]; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; - warning?: string; + warning?: string; }; export interface ApprovedApp { - app?: App; - date_updated?: number; + app?: App; + date_updated?: number; last_resolved_by?: LastResolvedBy; - scopes?: Scope[]; + scopes?: Scope[]; } export interface App { - additional_info?: string; - app_directory_url?: string; - app_homepage_url?: string; - description?: string; - help_url?: string; - icons?: Icons; - id?: string; + additional_info?: string; + app_directory_url?: string; + app_homepage_url?: string; + description?: string; + help_url?: string; + icons?: Icons; + id?: string; is_app_directory_approved?: boolean; - is_internal?: boolean; - name?: string; - privacy_policy_url?: string; + is_internal?: boolean; + name?: string; + privacy_policy_url?: string; } export interface Icons { - image_1024?: string; - image_128?: string; - image_192?: string; - image_32?: string; - image_36?: string; - image_48?: string; - image_512?: string; - image_64?: string; - image_72?: string; - image_96?: string; + image_1024?: string; + image_128?: string; + image_192?: string; + image_32?: string; + image_36?: string; + image_48?: string; + image_512?: string; + image_64?: string; + image_72?: string; + image_96?: string; image_original?: string; } export interface LastResolvedBy { - actor_id?: string; + actor_id?: string; actor_type?: string; } export interface Scope { - description?: string; + description?: string; is_sensitive?: boolean; - name?: string; - token_type?: string; + name?: string; + token_type?: string; } export interface ResponseMetadata { - messages?: string[]; + messages?: string[]; next_cursor?: string; - warnings?: string[]; + warnings?: string[]; } diff --git a/packages/web-api/src/types/response/AdminAppsClearResolutionResponse.ts b/packages/web-api/src/types/response/AdminAppsClearResolutionResponse.ts index 8b93a3442..9969d3391 100644 --- a/packages/web-api/src/types/response/AdminAppsClearResolutionResponse.ts +++ b/packages/web-api/src/types/response/AdminAppsClearResolutionResponse.ts @@ -8,11 +8,11 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminAppsClearResolutionResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; - warning?: string; + warning?: string; }; diff --git a/packages/web-api/src/types/response/AdminAppsConfigLookupResponse.ts b/packages/web-api/src/types/response/AdminAppsConfigLookupResponse.ts index 7f7ff871a..7688f0a37 100644 --- a/packages/web-api/src/types/response/AdminAppsConfigLookupResponse.ts +++ b/packages/web-api/src/types/response/AdminAppsConfigLookupResponse.ts @@ -8,25 +8,25 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminAppsConfigLookupResponse = WebAPICallResult & { - configs?: Config[]; - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + configs?: Config[]; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; export interface Config { - app_id?: string; - domain_restrictions?: DomainRestrictions; + app_id?: string; + domain_restrictions?: DomainRestrictions; workflow_auth_strategy?: string; } export interface DomainRestrictions { emails?: string[]; - urls?: string[]; + urls?: string[]; } export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/AdminAppsConfigSetResponse.ts b/packages/web-api/src/types/response/AdminAppsConfigSetResponse.ts index e6644768b..dfbd7ee1f 100644 --- a/packages/web-api/src/types/response/AdminAppsConfigSetResponse.ts +++ b/packages/web-api/src/types/response/AdminAppsConfigSetResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminAppsConfigSetResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/AdminAppsRequestsCancelResponse.ts b/packages/web-api/src/types/response/AdminAppsRequestsCancelResponse.ts index 482f4a7a5..d502b399c 100644 --- a/packages/web-api/src/types/response/AdminAppsRequestsCancelResponse.ts +++ b/packages/web-api/src/types/response/AdminAppsRequestsCancelResponse.ts @@ -8,12 +8,12 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminAppsRequestsCancelResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; diff --git a/packages/web-api/src/types/response/AdminAppsRequestsListResponse.ts b/packages/web-api/src/types/response/AdminAppsRequestsListResponse.ts index a6789f520..842301a5e 100644 --- a/packages/web-api/src/types/response/AdminAppsRequestsListResponse.ts +++ b/packages/web-api/src/types/response/AdminAppsRequestsListResponse.ts @@ -8,54 +8,54 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminAppsRequestsListResponse = WebAPICallResult & { - app_requests?: AppRequest[]; - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + app_requests?: AppRequest[]; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; - warning?: string; + warning?: string; }; export interface AppRequest { - app?: App; - date_created?: number; - id?: string; + app?: App; + date_created?: number; + id?: string; is_user_app_collaborator?: boolean; - message?: string; - previous_resolution?: PreviousResolution; - scopes?: any[]; - team?: Team; - user?: User; + message?: string; + previous_resolution?: PreviousResolution; + scopes?: any[]; + team?: Team; + user?: User; } export interface App { - additional_info?: string; - app_directory_url?: string; - app_homepage_url?: string; - description?: string; - help_url?: string; - icons?: Icons; - id?: string; + additional_info?: string; + app_directory_url?: string; + app_homepage_url?: string; + description?: string; + help_url?: string; + icons?: Icons; + id?: string; is_app_directory_approved?: boolean; - is_internal?: boolean; - name?: string; - privacy_policy_url?: string; + is_internal?: boolean; + name?: string; + privacy_policy_url?: string; } export interface Icons { - image_1024?: string; - image_128?: string; - image_192?: string; - image_32?: string; - image_36?: string; - image_48?: string; - image_512?: string; - image_64?: string; - image_72?: string; - image_96?: string; + image_1024?: string; + image_128?: string; + image_192?: string; + image_32?: string; + image_36?: string; + image_48?: string; + image_512?: string; + image_64?: string; + image_72?: string; + image_96?: string; image_original?: string; } @@ -66,18 +66,18 @@ export interface PreviousResolution { export interface Team { domain?: string; - id?: string; - name?: string; + id?: string; + name?: string; } export interface User { email?: string; - id?: string; - name?: string; + id?: string; + name?: string; } export interface ResponseMetadata { - messages?: string[]; + messages?: string[]; next_cursor?: string; - warnings?: string[]; + warnings?: string[]; } diff --git a/packages/web-api/src/types/response/AdminAppsRestrictResponse.ts b/packages/web-api/src/types/response/AdminAppsRestrictResponse.ts index 421941cd3..7593761b4 100644 --- a/packages/web-api/src/types/response/AdminAppsRestrictResponse.ts +++ b/packages/web-api/src/types/response/AdminAppsRestrictResponse.ts @@ -8,11 +8,11 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminAppsRestrictResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; - warning?: string; + warning?: string; }; diff --git a/packages/web-api/src/types/response/AdminAppsRestrictedListResponse.ts b/packages/web-api/src/types/response/AdminAppsRestrictedListResponse.ts index da9cbe5e3..e98131e47 100644 --- a/packages/web-api/src/types/response/AdminAppsRestrictedListResponse.ts +++ b/packages/web-api/src/types/response/AdminAppsRestrictedListResponse.ts @@ -8,66 +8,66 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminAppsRestrictedListResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; - restricted_apps?: RestrictedApp[]; - warning?: string; + restricted_apps?: RestrictedApp[]; + warning?: string; }; export interface ResponseMetadata { - messages?: string[]; + messages?: string[]; next_cursor?: string; - warnings?: string[]; + warnings?: string[]; } export interface RestrictedApp { - app?: App; - date_updated?: number; + app?: App; + date_updated?: number; last_resolved_by?: LastResolvedBy; - scopes?: Scope[]; + scopes?: Scope[]; } export interface App { - additional_info?: string; - app_directory_url?: string; - app_homepage_url?: string; - description?: string; - help_url?: string; - icons?: Icons; - id?: string; + additional_info?: string; + app_directory_url?: string; + app_homepage_url?: string; + description?: string; + help_url?: string; + icons?: Icons; + id?: string; is_app_directory_approved?: boolean; - is_internal?: boolean; - name?: string; - privacy_policy_url?: string; + is_internal?: boolean; + name?: string; + privacy_policy_url?: string; } export interface Icons { - image_1024?: string; - image_128?: string; - image_192?: string; - image_32?: string; - image_36?: string; - image_48?: string; - image_512?: string; - image_64?: string; - image_72?: string; - image_96?: string; + image_1024?: string; + image_128?: string; + image_192?: string; + image_32?: string; + image_36?: string; + image_48?: string; + image_512?: string; + image_64?: string; + image_72?: string; + image_96?: string; image_original?: string; } export interface LastResolvedBy { - actor_id?: string; + actor_id?: string; actor_type?: string; } export interface Scope { - description?: string; + description?: string; is_sensitive?: boolean; - name?: string; - token_type?: string; + name?: string; + token_type?: string; } diff --git a/packages/web-api/src/types/response/AdminAppsUninstallResponse.ts b/packages/web-api/src/types/response/AdminAppsUninstallResponse.ts index 1d255b306..a770b4500 100644 --- a/packages/web-api/src/types/response/AdminAppsUninstallResponse.ts +++ b/packages/web-api/src/types/response/AdminAppsUninstallResponse.ts @@ -8,11 +8,11 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminAppsUninstallResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; - warning?: string; + warning?: string; }; diff --git a/packages/web-api/src/types/response/AdminAuthPolicyAssignEntitiesResponse.ts b/packages/web-api/src/types/response/AdminAuthPolicyAssignEntitiesResponse.ts index cc060ee19..9ae00b34a 100644 --- a/packages/web-api/src/types/response/AdminAuthPolicyAssignEntitiesResponse.ts +++ b/packages/web-api/src/types/response/AdminAuthPolicyAssignEntitiesResponse.ts @@ -8,11 +8,11 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminAuthPolicyAssignEntitiesResponse = WebAPICallResult & { entity_total_count?: number; - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; }; diff --git a/packages/web-api/src/types/response/AdminAuthPolicyGetEntitiesResponse.ts b/packages/web-api/src/types/response/AdminAuthPolicyGetEntitiesResponse.ts index 38379751b..b578126fb 100644 --- a/packages/web-api/src/types/response/AdminAuthPolicyGetEntitiesResponse.ts +++ b/packages/web-api/src/types/response/AdminAuthPolicyGetEntitiesResponse.ts @@ -8,18 +8,18 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminAuthPolicyGetEntitiesResponse = WebAPICallResult & { - entities?: Entity[]; + entities?: Entity[]; entity_total_count?: number; - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; }; export interface Entity { - date_added?: number; - entity_id?: string; + date_added?: number; + entity_id?: string; entity_type?: string; } diff --git a/packages/web-api/src/types/response/AdminAuthPolicyRemoveEntitiesResponse.ts b/packages/web-api/src/types/response/AdminAuthPolicyRemoveEntitiesResponse.ts index 0ffb418c1..9cf735dde 100644 --- a/packages/web-api/src/types/response/AdminAuthPolicyRemoveEntitiesResponse.ts +++ b/packages/web-api/src/types/response/AdminAuthPolicyRemoveEntitiesResponse.ts @@ -8,11 +8,11 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminAuthPolicyRemoveEntitiesResponse = WebAPICallResult & { entity_total_count?: number; - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; }; diff --git a/packages/web-api/src/types/response/AdminBarriersCreateResponse.ts b/packages/web-api/src/types/response/AdminBarriersCreateResponse.ts index 9d89f1870..5f1b60750 100644 --- a/packages/web-api/src/types/response/AdminBarriersCreateResponse.ts +++ b/packages/web-api/src/types/response/AdminBarriersCreateResponse.ts @@ -8,27 +8,27 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminBarriersCreateResponse = WebAPICallResult & { - barrier?: Barrier; - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + barrier?: Barrier; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; export interface Barrier { barriered_from_usergroups?: Usergroup[]; - date_update?: number; - enterprise_id?: string; - id?: string; - primary_usergroup?: Usergroup; - restricted_subjects?: string[]; + date_update?: number; + enterprise_id?: string; + id?: string; + primary_usergroup?: Usergroup; + restricted_subjects?: string[]; } export interface Usergroup { - id?: string; + id?: string; name?: string; } diff --git a/packages/web-api/src/types/response/AdminBarriersDeleteResponse.ts b/packages/web-api/src/types/response/AdminBarriersDeleteResponse.ts index 43f889e0a..139889ddc 100644 --- a/packages/web-api/src/types/response/AdminBarriersDeleteResponse.ts +++ b/packages/web-api/src/types/response/AdminBarriersDeleteResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminBarriersDeleteResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/AdminBarriersListResponse.ts b/packages/web-api/src/types/response/AdminBarriersListResponse.ts index c6b22ef97..ae1028f71 100644 --- a/packages/web-api/src/types/response/AdminBarriersListResponse.ts +++ b/packages/web-api/src/types/response/AdminBarriersListResponse.ts @@ -8,25 +8,25 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminBarriersListResponse = WebAPICallResult & { barriers?: Barrier[]; - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; export interface Barrier { barriered_from_usergroups?: Usergroup[]; - date_update?: number; - enterprise_id?: string; - id?: string; - primary_usergroup?: Usergroup; - restricted_subjects?: string[]; + date_update?: number; + enterprise_id?: string; + id?: string; + primary_usergroup?: Usergroup; + restricted_subjects?: string[]; } export interface Usergroup { - id?: string; + id?: string; name?: string; } diff --git a/packages/web-api/src/types/response/AdminBarriersUpdateResponse.ts b/packages/web-api/src/types/response/AdminBarriersUpdateResponse.ts index 2a78ebd1a..5dba23010 100644 --- a/packages/web-api/src/types/response/AdminBarriersUpdateResponse.ts +++ b/packages/web-api/src/types/response/AdminBarriersUpdateResponse.ts @@ -8,25 +8,25 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminBarriersUpdateResponse = WebAPICallResult & { - barrier?: Barrier; - error?: string; - needed?: string; - ok?: boolean; + barrier?: Barrier; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; export interface Barrier { barriered_from_usergroups?: Usergroup[]; - date_update?: number; - enterprise_id?: string; - id?: string; - primary_usergroup?: Usergroup; - restricted_subjects?: string[]; + date_update?: number; + enterprise_id?: string; + id?: string; + primary_usergroup?: Usergroup; + restricted_subjects?: string[]; } export interface Usergroup { - id?: string; + id?: string; name?: string; } diff --git a/packages/web-api/src/types/response/AdminConversationsArchiveResponse.ts b/packages/web-api/src/types/response/AdminConversationsArchiveResponse.ts index 28894add2..612c36ea8 100644 --- a/packages/web-api/src/types/response/AdminConversationsArchiveResponse.ts +++ b/packages/web-api/src/types/response/AdminConversationsArchiveResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminConversationsArchiveResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/AdminConversationsBulkArchiveResponse.ts b/packages/web-api/src/types/response/AdminConversationsBulkArchiveResponse.ts index c8e892450..e48bac324 100644 --- a/packages/web-api/src/types/response/AdminConversationsBulkArchiveResponse.ts +++ b/packages/web-api/src/types/response/AdminConversationsBulkArchiveResponse.ts @@ -8,20 +8,20 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminConversationsBulkArchiveResponse = WebAPICallResult & { - bulk_action_id?: string; - error?: string; - needed?: string; - not_added?: NotAdded[]; - ok?: boolean; - provided?: string; + bulk_action_id?: string; + error?: string; + needed?: string; + not_added?: NotAdded[]; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; export interface NotAdded { channel_id?: string; - errors?: string[]; + errors?: string[]; } export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/AdminConversationsBulkDeleteResponse.ts b/packages/web-api/src/types/response/AdminConversationsBulkDeleteResponse.ts index 4adf68ece..269bedfcf 100644 --- a/packages/web-api/src/types/response/AdminConversationsBulkDeleteResponse.ts +++ b/packages/web-api/src/types/response/AdminConversationsBulkDeleteResponse.ts @@ -8,20 +8,20 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminConversationsBulkDeleteResponse = WebAPICallResult & { - bulk_action_id?: string; - error?: string; - needed?: string; - not_added?: NotAdded[]; - ok?: boolean; - provided?: string; + bulk_action_id?: string; + error?: string; + needed?: string; + not_added?: NotAdded[]; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; export interface NotAdded { channel_id?: string; - errors?: string[]; + errors?: string[]; } export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/AdminConversationsBulkMoveResponse.ts b/packages/web-api/src/types/response/AdminConversationsBulkMoveResponse.ts index 2be45b703..2c445ba9f 100644 --- a/packages/web-api/src/types/response/AdminConversationsBulkMoveResponse.ts +++ b/packages/web-api/src/types/response/AdminConversationsBulkMoveResponse.ts @@ -8,20 +8,20 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminConversationsBulkMoveResponse = WebAPICallResult & { - bulk_action_id?: string; - error?: string; - needed?: string; - not_added?: NotAdded[]; - ok?: boolean; - provided?: string; + bulk_action_id?: string; + error?: string; + needed?: string; + not_added?: NotAdded[]; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; export interface NotAdded { channel_id?: string; - errors?: string[]; + errors?: string[]; } export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/AdminConversationsConvertToPrivateResponse.ts b/packages/web-api/src/types/response/AdminConversationsConvertToPrivateResponse.ts index 28085a659..9a48cd1a4 100644 --- a/packages/web-api/src/types/response/AdminConversationsConvertToPrivateResponse.ts +++ b/packages/web-api/src/types/response/AdminConversationsConvertToPrivateResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminConversationsConvertToPrivateResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/AdminConversationsConvertToPublicResponse.ts b/packages/web-api/src/types/response/AdminConversationsConvertToPublicResponse.ts index 9a7b9523f..7ae0e22a5 100644 --- a/packages/web-api/src/types/response/AdminConversationsConvertToPublicResponse.ts +++ b/packages/web-api/src/types/response/AdminConversationsConvertToPublicResponse.ts @@ -8,12 +8,12 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminConversationsConvertToPublicResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; diff --git a/packages/web-api/src/types/response/AdminConversationsCreateResponse.ts b/packages/web-api/src/types/response/AdminConversationsCreateResponse.ts index fdaa5141d..51add775a 100644 --- a/packages/web-api/src/types/response/AdminConversationsCreateResponse.ts +++ b/packages/web-api/src/types/response/AdminConversationsCreateResponse.ts @@ -8,13 +8,13 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminConversationsCreateResponse = WebAPICallResult & { - channel_id?: string; - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + channel_id?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; diff --git a/packages/web-api/src/types/response/AdminConversationsDeleteResponse.ts b/packages/web-api/src/types/response/AdminConversationsDeleteResponse.ts index 0f5d58e67..ad9174537 100644 --- a/packages/web-api/src/types/response/AdminConversationsDeleteResponse.ts +++ b/packages/web-api/src/types/response/AdminConversationsDeleteResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminConversationsDeleteResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/AdminConversationsDisconnectSharedResponse.ts b/packages/web-api/src/types/response/AdminConversationsDisconnectSharedResponse.ts index 9315d6bff..02df35a5b 100644 --- a/packages/web-api/src/types/response/AdminConversationsDisconnectSharedResponse.ts +++ b/packages/web-api/src/types/response/AdminConversationsDisconnectSharedResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminConversationsDisconnectSharedResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/AdminConversationsEkmListOriginalConnectedChannelInfoResponse.ts b/packages/web-api/src/types/response/AdminConversationsEkmListOriginalConnectedChannelInfoResponse.ts index 0155f5cb0..ded6cdf1f 100644 --- a/packages/web-api/src/types/response/AdminConversationsEkmListOriginalConnectedChannelInfoResponse.ts +++ b/packages/web-api/src/types/response/AdminConversationsEkmListOriginalConnectedChannelInfoResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminConversationsEkmListOriginalConnectedChannelInfoResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/AdminConversationsGetConversationPrefsResponse.ts b/packages/web-api/src/types/response/AdminConversationsGetConversationPrefsResponse.ts index 82e944eab..bc9f69cc4 100644 --- a/packages/web-api/src/types/response/AdminConversationsGetConversationPrefsResponse.ts +++ b/packages/web-api/src/types/response/AdminConversationsGetConversationPrefsResponse.ts @@ -8,22 +8,22 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminConversationsGetConversationPrefsResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - prefs?: Prefs; + error?: string; + needed?: string; + ok?: boolean; + prefs?: Prefs; provided?: string; }; export interface Prefs { - can_huddle?: CanHuddle; - can_thread?: CanThread; + can_huddle?: CanHuddle; + can_thread?: CanThread; enable_at_channel?: CanHuddle; - enable_at_here?: CanHuddle; - membership_limit?: MembershipLimit; - who_can_post?: CanThread; + enable_at_here?: CanHuddle; + membership_limit?: MembershipLimit; + who_can_post?: CanThread; } export interface CanHuddle { diff --git a/packages/web-api/src/types/response/AdminConversationsGetCustomRetentionResponse.ts b/packages/web-api/src/types/response/AdminConversationsGetCustomRetentionResponse.ts index 88ca02175..f13113736 100644 --- a/packages/web-api/src/types/response/AdminConversationsGetCustomRetentionResponse.ts +++ b/packages/web-api/src/types/response/AdminConversationsGetCustomRetentionResponse.ts @@ -8,12 +8,12 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminConversationsGetCustomRetentionResponse = WebAPICallResult & { - duration_days?: number; - error?: string; + duration_days?: number; + error?: string; is_policy_enabled?: boolean; - needed?: string; - ok?: boolean; - provided?: string; + needed?: string; + ok?: boolean; + provided?: string; }; diff --git a/packages/web-api/src/types/response/AdminConversationsGetTeamsResponse.ts b/packages/web-api/src/types/response/AdminConversationsGetTeamsResponse.ts index 514a6714f..5a0391143 100644 --- a/packages/web-api/src/types/response/AdminConversationsGetTeamsResponse.ts +++ b/packages/web-api/src/types/response/AdminConversationsGetTeamsResponse.ts @@ -8,11 +8,11 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminConversationsGetTeamsResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; team_ids?: string[]; }; diff --git a/packages/web-api/src/types/response/AdminConversationsInviteResponse.ts b/packages/web-api/src/types/response/AdminConversationsInviteResponse.ts index b9c41cca3..c319d4b38 100644 --- a/packages/web-api/src/types/response/AdminConversationsInviteResponse.ts +++ b/packages/web-api/src/types/response/AdminConversationsInviteResponse.ts @@ -8,13 +8,13 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminConversationsInviteResponse = WebAPICallResult & { - error?: string; + error?: string; failed_user_ids?: FailedUserids; - needed?: string; - ok?: boolean; - provided?: string; + needed?: string; + ok?: boolean; + provided?: string; }; export interface FailedUserids { diff --git a/packages/web-api/src/types/response/AdminConversationsLookupResponse.ts b/packages/web-api/src/types/response/AdminConversationsLookupResponse.ts index b005c8a1c..e6a2619ed 100644 --- a/packages/web-api/src/types/response/AdminConversationsLookupResponse.ts +++ b/packages/web-api/src/types/response/AdminConversationsLookupResponse.ts @@ -8,13 +8,13 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminConversationsLookupResponse = WebAPICallResult & { - channel_ids?: string[]; - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + channel_ids?: string[]; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; diff --git a/packages/web-api/src/types/response/AdminConversationsRemoveCustomRetentionResponse.ts b/packages/web-api/src/types/response/AdminConversationsRemoveCustomRetentionResponse.ts index 061c1982c..251cdadeb 100644 --- a/packages/web-api/src/types/response/AdminConversationsRemoveCustomRetentionResponse.ts +++ b/packages/web-api/src/types/response/AdminConversationsRemoveCustomRetentionResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminConversationsRemoveCustomRetentionResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/AdminConversationsRenameResponse.ts b/packages/web-api/src/types/response/AdminConversationsRenameResponse.ts index 96a112652..416ad3ad8 100644 --- a/packages/web-api/src/types/response/AdminConversationsRenameResponse.ts +++ b/packages/web-api/src/types/response/AdminConversationsRenameResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminConversationsRenameResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/AdminConversationsRestrictAccessAddGroupResponse.ts b/packages/web-api/src/types/response/AdminConversationsRestrictAccessAddGroupResponse.ts index 84ee9d5aa..846c969d7 100644 --- a/packages/web-api/src/types/response/AdminConversationsRestrictAccessAddGroupResponse.ts +++ b/packages/web-api/src/types/response/AdminConversationsRestrictAccessAddGroupResponse.ts @@ -8,12 +8,12 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminConversationsRestrictAccessAddGroupResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; diff --git a/packages/web-api/src/types/response/AdminConversationsRestrictAccessListGroupsResponse.ts b/packages/web-api/src/types/response/AdminConversationsRestrictAccessListGroupsResponse.ts index 3c329d2e6..13c39f8d7 100644 --- a/packages/web-api/src/types/response/AdminConversationsRestrictAccessListGroupsResponse.ts +++ b/packages/web-api/src/types/response/AdminConversationsRestrictAccessListGroupsResponse.ts @@ -8,13 +8,13 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminConversationsRestrictAccessListGroupsResponse = WebAPICallResult & { - error?: string; - group_ids?: string[]; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + group_ids?: string[]; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; diff --git a/packages/web-api/src/types/response/AdminConversationsRestrictAccessRemoveGroupResponse.ts b/packages/web-api/src/types/response/AdminConversationsRestrictAccessRemoveGroupResponse.ts index b4037cd20..d3369691a 100644 --- a/packages/web-api/src/types/response/AdminConversationsRestrictAccessRemoveGroupResponse.ts +++ b/packages/web-api/src/types/response/AdminConversationsRestrictAccessRemoveGroupResponse.ts @@ -8,12 +8,12 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminConversationsRestrictAccessRemoveGroupResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; diff --git a/packages/web-api/src/types/response/AdminConversationsSearchResponse.ts b/packages/web-api/src/types/response/AdminConversationsSearchResponse.ts index 9c32bff2f..5b59cf233 100644 --- a/packages/web-api/src/types/response/AdminConversationsSearchResponse.ts +++ b/packages/web-api/src/types/response/AdminConversationsSearchResponse.ts @@ -8,71 +8,71 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminConversationsSearchResponse = WebAPICallResult & { - conversations?: Conversation[]; - error?: string; - needed?: string; - next_cursor?: string; - ok?: boolean; - provided?: string; + conversations?: Conversation[]; + error?: string; + needed?: string; + next_cursor?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; - total_count?: number; + total_count?: number; }; export interface Conversation { - canvas?: ListsClass; - channel_email_addresses?: ChannelEmailAddress[]; - channel_manager_count?: number; - connected_limited_team_ids?: string[]; - connected_team_ids?: string[]; - context_team_id?: string; - conversation_host_id?: string; - created?: number; - creator_id?: string; - external_user_count?: number; - id?: string; - internal_team_ids?: string[]; - internal_team_ids_count?: number; + canvas?: ListsClass; + channel_email_addresses?: ChannelEmailAddress[]; + channel_manager_count?: number; + connected_limited_team_ids?: string[]; + connected_team_ids?: string[]; + context_team_id?: string; + conversation_host_id?: string; + created?: number; + creator_id?: string; + external_user_count?: number; + id?: string; + internal_team_ids?: string[]; + internal_team_ids_count?: number; internal_team_ids_sample_team?: string; - is_archived?: boolean; - is_disconnect_in_progress?: boolean; - is_ext_shared?: boolean; - is_frozen?: boolean; - is_general?: boolean; - is_global_shared?: boolean; - is_org_default?: boolean; - is_org_mandatory?: boolean; - is_org_shared?: boolean; - is_pending_ext_shared?: boolean; - is_private?: boolean; - last_activity_ts?: number; - lists?: ListsClass; - member_count?: number; - name?: string; - pending_connected_team_ids?: string[]; - properties?: Properties; - purpose?: string; + is_archived?: boolean; + is_disconnect_in_progress?: boolean; + is_ext_shared?: boolean; + is_frozen?: boolean; + is_general?: boolean; + is_global_shared?: boolean; + is_org_default?: boolean; + is_org_mandatory?: boolean; + is_org_shared?: boolean; + is_pending_ext_shared?: boolean; + is_private?: boolean; + last_activity_ts?: number; + lists?: ListsClass; + member_count?: number; + name?: string; + pending_connected_team_ids?: string[]; + properties?: Properties; + purpose?: string; } export interface ListsClass { ownership_details?: OwnershipDetail[]; - total_count?: number; + total_count?: number; } export interface OwnershipDetail { - count?: number; + count?: number; team_id?: string; } export interface ChannelEmailAddress { - address?: string; + address?: string; conversation_id?: string; - date_created?: number; - icons?: Icons; - name?: string; - team_id?: string; - user_id?: string; + date_created?: number; + icons?: Icons; + name?: string; + team_id?: string; + user_id?: string; } export interface Icons { @@ -83,17 +83,17 @@ export interface Icons { export interface Properties { at_channel_restricted?: boolean; - at_here_restricted?: boolean; - canvas?: PropertiesCanvas; - huddles_restricted?: boolean; + at_here_restricted?: boolean; + canvas?: PropertiesCanvas; + huddles_restricted?: boolean; posting_restricted_to?: PostingRestrictedTo; - tabs?: Tab[]; + tabs?: Tab[]; threads_restricted_to?: ThreadsRestrictedTo; } export interface PropertiesCanvas { - file_id?: string; - is_empty?: boolean; + file_id?: string; + is_empty?: boolean; quip_thread_id?: string; } @@ -103,9 +103,9 @@ export interface PostingRestrictedTo { } export interface Tab { - id?: string; + id?: string; label?: string; - type?: string; + type?: string; } export interface ThreadsRestrictedTo { diff --git a/packages/web-api/src/types/response/AdminConversationsSetConversationPrefsResponse.ts b/packages/web-api/src/types/response/AdminConversationsSetConversationPrefsResponse.ts index b766006c3..2500fb022 100644 --- a/packages/web-api/src/types/response/AdminConversationsSetConversationPrefsResponse.ts +++ b/packages/web-api/src/types/response/AdminConversationsSetConversationPrefsResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminConversationsSetConversationPrefsResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/AdminConversationsSetCustomRetentionResponse.ts b/packages/web-api/src/types/response/AdminConversationsSetCustomRetentionResponse.ts index 386770bea..b647b1228 100644 --- a/packages/web-api/src/types/response/AdminConversationsSetCustomRetentionResponse.ts +++ b/packages/web-api/src/types/response/AdminConversationsSetCustomRetentionResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminConversationsSetCustomRetentionResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/AdminConversationsSetTeamsResponse.ts b/packages/web-api/src/types/response/AdminConversationsSetTeamsResponse.ts index 14d142362..19355c55f 100644 --- a/packages/web-api/src/types/response/AdminConversationsSetTeamsResponse.ts +++ b/packages/web-api/src/types/response/AdminConversationsSetTeamsResponse.ts @@ -8,11 +8,11 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminConversationsSetTeamsResponse = WebAPICallResult & { - channel?: string; - error?: string; - needed?: string; - ok?: boolean; + channel?: string; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/AdminConversationsUnarchiveResponse.ts b/packages/web-api/src/types/response/AdminConversationsUnarchiveResponse.ts index ec47e149c..4f35a1c24 100644 --- a/packages/web-api/src/types/response/AdminConversationsUnarchiveResponse.ts +++ b/packages/web-api/src/types/response/AdminConversationsUnarchiveResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminConversationsUnarchiveResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/AdminConversationsWhitelistAddResponse.ts b/packages/web-api/src/types/response/AdminConversationsWhitelistAddResponse.ts index 3dd0d1f9a..8d0c267b7 100644 --- a/packages/web-api/src/types/response/AdminConversationsWhitelistAddResponse.ts +++ b/packages/web-api/src/types/response/AdminConversationsWhitelistAddResponse.ts @@ -8,14 +8,14 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminConversationsWhitelistAddResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; - warning?: string; + warning?: string; }; export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/AdminConversationsWhitelistListGroupsLinkedToChannelResponse.ts b/packages/web-api/src/types/response/AdminConversationsWhitelistListGroupsLinkedToChannelResponse.ts index 6178e38e6..66847eec6 100644 --- a/packages/web-api/src/types/response/AdminConversationsWhitelistListGroupsLinkedToChannelResponse.ts +++ b/packages/web-api/src/types/response/AdminConversationsWhitelistListGroupsLinkedToChannelResponse.ts @@ -8,15 +8,15 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminConversationsWhitelistListGroupsLinkedToChannelResponse = WebAPICallResult & { - error?: string; - group_ids?: string[]; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + group_ids?: string[]; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; - warning?: string; + warning?: string; }; export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/AdminConversationsWhitelistRemoveResponse.ts b/packages/web-api/src/types/response/AdminConversationsWhitelistRemoveResponse.ts index 58d02add2..b0f5bc74c 100644 --- a/packages/web-api/src/types/response/AdminConversationsWhitelistRemoveResponse.ts +++ b/packages/web-api/src/types/response/AdminConversationsWhitelistRemoveResponse.ts @@ -8,14 +8,14 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminConversationsWhitelistRemoveResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; - warning?: string; + warning?: string; }; export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/AdminEmojiAddAliasResponse.ts b/packages/web-api/src/types/response/AdminEmojiAddAliasResponse.ts index c9c4e73d9..8a9bf8a08 100644 --- a/packages/web-api/src/types/response/AdminEmojiAddAliasResponse.ts +++ b/packages/web-api/src/types/response/AdminEmojiAddAliasResponse.ts @@ -8,12 +8,12 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminEmojiAddAliasResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; diff --git a/packages/web-api/src/types/response/AdminEmojiAddResponse.ts b/packages/web-api/src/types/response/AdminEmojiAddResponse.ts index b78e3118b..e6b39beda 100644 --- a/packages/web-api/src/types/response/AdminEmojiAddResponse.ts +++ b/packages/web-api/src/types/response/AdminEmojiAddResponse.ts @@ -8,12 +8,12 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminEmojiAddResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; diff --git a/packages/web-api/src/types/response/AdminEmojiListResponse.ts b/packages/web-api/src/types/response/AdminEmojiListResponse.ts index d6cae5fe1..99841e58b 100644 --- a/packages/web-api/src/types/response/AdminEmojiListResponse.ts +++ b/packages/web-api/src/types/response/AdminEmojiListResponse.ts @@ -8,20 +8,20 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminEmojiListResponse = WebAPICallResult & { - emoji?: { [key: string]: Emoji }; - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + emoji?: { [key: string]: Emoji }; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; export interface Emoji { date_created?: number; - uploaded_by?: string; - url?: string; + uploaded_by?: string; + url?: string; } export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/AdminEmojiRemoveResponse.ts b/packages/web-api/src/types/response/AdminEmojiRemoveResponse.ts index 550948e3f..99518ea39 100644 --- a/packages/web-api/src/types/response/AdminEmojiRemoveResponse.ts +++ b/packages/web-api/src/types/response/AdminEmojiRemoveResponse.ts @@ -8,12 +8,12 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminEmojiRemoveResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; diff --git a/packages/web-api/src/types/response/AdminEmojiRenameResponse.ts b/packages/web-api/src/types/response/AdminEmojiRenameResponse.ts index a296a2577..e01cb8703 100644 --- a/packages/web-api/src/types/response/AdminEmojiRenameResponse.ts +++ b/packages/web-api/src/types/response/AdminEmojiRenameResponse.ts @@ -8,12 +8,12 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminEmojiRenameResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; diff --git a/packages/web-api/src/types/response/AdminFunctionsListResponse.ts b/packages/web-api/src/types/response/AdminFunctionsListResponse.ts index 12312052d..5f05f614d 100644 --- a/packages/web-api/src/types/response/AdminFunctionsListResponse.ts +++ b/packages/web-api/src/types/response/AdminFunctionsListResponse.ts @@ -8,41 +8,41 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminFunctionsListResponse = WebAPICallResult & { - error?: string; - functions?: Function[]; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + functions?: Function[]; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; export interface Function { - app_id?: string; - callback_id?: string; - date_created?: number; - date_deleted?: number; - date_released?: number; - date_updated?: number; - description?: string; - form_enabled?: boolean; - id?: string; - input_parameters?: PutParameter[]; + app_id?: string; + callback_id?: string; + date_created?: number; + date_deleted?: number; + date_released?: number; + date_updated?: number; + description?: string; + form_enabled?: boolean; + id?: string; + input_parameters?: PutParameter[]; output_parameters?: PutParameter[]; - title?: string; - type?: string; + title?: string; + type?: string; } export interface PutParameter { description?: string; is_required?: boolean; - name?: string; - title?: string; - type?: string; + name?: string; + title?: string; + type?: string; } export interface ResponseMetadata { - messages?: string[]; + messages?: string[]; next_cursor?: string; } diff --git a/packages/web-api/src/types/response/AdminFunctionsPermissionsLookupResponse.ts b/packages/web-api/src/types/response/AdminFunctionsPermissionsLookupResponse.ts index fb3eb75fc..ba667606d 100644 --- a/packages/web-api/src/types/response/AdminFunctionsPermissionsLookupResponse.ts +++ b/packages/web-api/src/types/response/AdminFunctionsPermissionsLookupResponse.ts @@ -8,37 +8,36 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminFunctionsPermissionsLookupResponse = WebAPICallResult & { - error?: string; - errors?: Errors; - needed?: string; - ok?: boolean; - permissions?: { [key: string]: Permission }; - provided?: string; + error?: string; + errors?: Errors; + needed?: string; + ok?: boolean; + permissions?: { [key: string]: Permission }; + provided?: string; response_metadata?: ResponseMetadata; }; -export interface Errors { -} +export type Errors = {}; export interface Permission { allowed_by_admin?: AllowedByAdmin; allowed_entities?: AllowedEntities; - distribution?: AllowedByAdmin; + distribution?: AllowedByAdmin; } export interface AllowedByAdmin { - type?: string; + type?: string; user_ids?: string[]; } export interface AllowedEntities { channel_ids?: string[]; - org_ids?: string[]; - team_ids?: string[]; - type?: string; - user_ids?: string[]; + org_ids?: string[]; + team_ids?: string[]; + type?: string; + user_ids?: string[]; } export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/AdminFunctionsPermissionsSetResponse.ts b/packages/web-api/src/types/response/AdminFunctionsPermissionsSetResponse.ts index 0e7ed2c80..0a892b975 100644 --- a/packages/web-api/src/types/response/AdminFunctionsPermissionsSetResponse.ts +++ b/packages/web-api/src/types/response/AdminFunctionsPermissionsSetResponse.ts @@ -8,12 +8,12 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminFunctionsPermissionsSetResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; diff --git a/packages/web-api/src/types/response/AdminInviteRequestsApproveResponse.ts b/packages/web-api/src/types/response/AdminInviteRequestsApproveResponse.ts index 2052e0f0c..be799baac 100644 --- a/packages/web-api/src/types/response/AdminInviteRequestsApproveResponse.ts +++ b/packages/web-api/src/types/response/AdminInviteRequestsApproveResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminInviteRequestsApproveResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/AdminInviteRequestsApprovedListResponse.ts b/packages/web-api/src/types/response/AdminInviteRequestsApprovedListResponse.ts index 67e161dec..9c8245e1a 100644 --- a/packages/web-api/src/types/response/AdminInviteRequestsApprovedListResponse.ts +++ b/packages/web-api/src/types/response/AdminInviteRequestsApprovedListResponse.ts @@ -8,49 +8,49 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminInviteRequestsApprovedListResponse = WebAPICallResult & { approved_requests?: ApprovedRequest[]; - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; export interface ApprovedRequest { - approved_by?: ApprovedBy; - invite?: Invite; + approved_by?: ApprovedBy; + invite?: Invite; invite_request?: InviteRequest; } export interface ApprovedBy { - actor_id?: string; + actor_id?: string; actor_type?: string; } export interface Invite { - date_created?: number; - email?: string; - id?: string; + date_created?: number; + email?: string; + id?: string; invite_preferences?: InvitePreferences; - inviter_id?: string; - is_bouncing?: boolean; + inviter_id?: string; + is_bouncing?: boolean; } export interface InvitePreferences { - channel_ids?: string[]; - is_domain_matched?: boolean; - is_restricted?: boolean; + channel_ids?: string[]; + is_domain_matched?: boolean; + is_restricted?: boolean; is_ultra_restricted?: boolean; } export interface InviteRequest { - channel_ids?: string[]; - date_created?: number; - email?: string; - id?: string; - invite_type?: string; + channel_ids?: string[]; + date_created?: number; + email?: string; + id?: string; + invite_type?: string; requester_ids?: string[]; } diff --git a/packages/web-api/src/types/response/AdminInviteRequestsDeniedListResponse.ts b/packages/web-api/src/types/response/AdminInviteRequestsDeniedListResponse.ts index e9cc93bc9..5639f6a91 100644 --- a/packages/web-api/src/types/response/AdminInviteRequestsDeniedListResponse.ts +++ b/packages/web-api/src/types/response/AdminInviteRequestsDeniedListResponse.ts @@ -8,34 +8,34 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminInviteRequestsDeniedListResponse = WebAPICallResult & { - denied_requests?: DeniedRequest[]; - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + denied_requests?: DeniedRequest[]; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; export interface DeniedRequest { - denied_by?: DeniedBy; + denied_by?: DeniedBy; invite_request?: InviteRequest; } export interface DeniedBy { - actor_id?: string; + actor_id?: string; actor_type?: string; } export interface InviteRequest { - channel_ids?: string[]; - date_created?: number; - email?: string; - id?: string; - invite_type?: string; + channel_ids?: string[]; + date_created?: number; + email?: string; + id?: string; + invite_type?: string; request_reason?: string; - requester_ids?: string[]; + requester_ids?: string[]; } export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/AdminInviteRequestsDenyResponse.ts b/packages/web-api/src/types/response/AdminInviteRequestsDenyResponse.ts index 5a99fdc89..2948970b9 100644 --- a/packages/web-api/src/types/response/AdminInviteRequestsDenyResponse.ts +++ b/packages/web-api/src/types/response/AdminInviteRequestsDenyResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminInviteRequestsDenyResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/AdminInviteRequestsListResponse.ts b/packages/web-api/src/types/response/AdminInviteRequestsListResponse.ts index 1db38b1ca..949a33229 100644 --- a/packages/web-api/src/types/response/AdminInviteRequestsListResponse.ts +++ b/packages/web-api/src/types/response/AdminInviteRequestsListResponse.ts @@ -8,25 +8,25 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminInviteRequestsListResponse = WebAPICallResult & { - error?: string; - invite_requests?: InviteRequest[]; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + invite_requests?: InviteRequest[]; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; export interface InviteRequest { - channel_ids?: string[]; - date_created?: number; - date_expire?: number; - email?: string; - id?: string; - invite_type?: string; + channel_ids?: string[]; + date_created?: number; + date_expire?: number; + email?: string; + id?: string; + invite_type?: string; request_reason?: string; - requester_ids?: string[]; + requester_ids?: string[]; } export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/AdminRolesAddAssignmentsResponse.ts b/packages/web-api/src/types/response/AdminRolesAddAssignmentsResponse.ts index a4ce1d0b2..dfb93cc17 100644 --- a/packages/web-api/src/types/response/AdminRolesAddAssignmentsResponse.ts +++ b/packages/web-api/src/types/response/AdminRolesAddAssignmentsResponse.ts @@ -8,16 +8,16 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminRolesAddAssignmentsResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; rejected_users?: RejectedUser[]; }; export interface RejectedUser { error?: string; - id?: string; + id?: string; } diff --git a/packages/web-api/src/types/response/AdminRolesListAssignmentsResponse.ts b/packages/web-api/src/types/response/AdminRolesListAssignmentsResponse.ts index 995cac37a..36a6f3272 100644 --- a/packages/web-api/src/types/response/AdminRolesListAssignmentsResponse.ts +++ b/packages/web-api/src/types/response/AdminRolesListAssignmentsResponse.ts @@ -8,24 +8,24 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminRolesListAssignmentsResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; - role_assignments?: RoleAssignment[]; + role_assignments?: RoleAssignment[]; }; export interface ResponseMetadata { - messages?: string[]; + messages?: string[]; next_cursor?: string; } export interface RoleAssignment { date_create?: number; - entity_id?: string; - role_id?: string; - user_id?: string; + entity_id?: string; + role_id?: string; + user_id?: string; } diff --git a/packages/web-api/src/types/response/AdminRolesRemoveAssignmentsResponse.ts b/packages/web-api/src/types/response/AdminRolesRemoveAssignmentsResponse.ts index 34fdfe08f..b3064d003 100644 --- a/packages/web-api/src/types/response/AdminRolesRemoveAssignmentsResponse.ts +++ b/packages/web-api/src/types/response/AdminRolesRemoveAssignmentsResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminRolesRemoveAssignmentsResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/AdminTeamsAdminsListResponse.ts b/packages/web-api/src/types/response/AdminTeamsAdminsListResponse.ts index 32eb6e58c..4a45c1a97 100644 --- a/packages/web-api/src/types/response/AdminTeamsAdminsListResponse.ts +++ b/packages/web-api/src/types/response/AdminTeamsAdminsListResponse.ts @@ -8,13 +8,13 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminTeamsAdminsListResponse = WebAPICallResult & { - admin_ids?: string[]; - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + admin_ids?: string[]; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; diff --git a/packages/web-api/src/types/response/AdminTeamsCreateResponse.ts b/packages/web-api/src/types/response/AdminTeamsCreateResponse.ts index e72883553..3875d9028 100644 --- a/packages/web-api/src/types/response/AdminTeamsCreateResponse.ts +++ b/packages/web-api/src/types/response/AdminTeamsCreateResponse.ts @@ -8,14 +8,14 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminTeamsCreateResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; - team?: string; + team?: string; }; export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/AdminTeamsListResponse.ts b/packages/web-api/src/types/response/AdminTeamsListResponse.ts index be065d101..358d62683 100644 --- a/packages/web-api/src/types/response/AdminTeamsListResponse.ts +++ b/packages/web-api/src/types/response/AdminTeamsListResponse.ts @@ -8,14 +8,14 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminTeamsListResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; - teams?: Team[]; + teams?: Team[]; }; export interface ResponseMetadata { @@ -24,13 +24,13 @@ export interface ResponseMetadata { export interface Team { discoverability?: string; - id?: string; - name?: string; - primary_owner?: PrimaryOwner; - team_url?: string; + id?: string; + name?: string; + primary_owner?: PrimaryOwner; + team_url?: string; } export interface PrimaryOwner { - email?: string; + email?: string; user_id?: string; } diff --git a/packages/web-api/src/types/response/AdminTeamsOwnersListResponse.ts b/packages/web-api/src/types/response/AdminTeamsOwnersListResponse.ts index 3290fe2ea..153273dfc 100644 --- a/packages/web-api/src/types/response/AdminTeamsOwnersListResponse.ts +++ b/packages/web-api/src/types/response/AdminTeamsOwnersListResponse.ts @@ -8,13 +8,13 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminTeamsOwnersListResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - owner_ids?: string[]; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + owner_ids?: string[]; + provided?: string; response_metadata?: ResponseMetadata; }; diff --git a/packages/web-api/src/types/response/AdminTeamsSettingsInfoResponse.ts b/packages/web-api/src/types/response/AdminTeamsSettingsInfoResponse.ts index ceca46eba..1c6f7041a 100644 --- a/packages/web-api/src/types/response/AdminTeamsSettingsInfoResponse.ts +++ b/packages/web-api/src/types/response/AdminTeamsSettingsInfoResponse.ts @@ -8,38 +8,38 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminTeamsSettingsInfoResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; - team?: Team; + team?: Team; }; export interface Team { - avatar_base_url?: string; - default_channels?: string[]; - domain?: string; - email_domain?: string; + avatar_base_url?: string; + default_channels?: string[]; + domain?: string; + email_domain?: string; enterprise_domain?: string; - enterprise_id?: string; - enterprise_name?: string; - icon?: Icon; - id?: string; - is_verified?: boolean; - name?: string; - url?: string; + enterprise_id?: string; + enterprise_name?: string; + icon?: Icon; + id?: string; + is_verified?: boolean; + name?: string; + url?: string; } export interface Icon { - image_102?: string; - image_132?: string; - image_230?: string; - image_34?: string; - image_44?: string; - image_68?: string; - image_88?: string; - image_default?: boolean; + image_102?: string; + image_132?: string; + image_230?: string; + image_34?: string; + image_44?: string; + image_68?: string; + image_88?: string; + image_default?: boolean; image_original?: string; } diff --git a/packages/web-api/src/types/response/AdminTeamsSettingsSetDefaultChannelsResponse.ts b/packages/web-api/src/types/response/AdminTeamsSettingsSetDefaultChannelsResponse.ts index 2890c8709..c8973cb99 100644 --- a/packages/web-api/src/types/response/AdminTeamsSettingsSetDefaultChannelsResponse.ts +++ b/packages/web-api/src/types/response/AdminTeamsSettingsSetDefaultChannelsResponse.ts @@ -8,12 +8,12 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminTeamsSettingsSetDefaultChannelsResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; diff --git a/packages/web-api/src/types/response/AdminTeamsSettingsSetDescriptionResponse.ts b/packages/web-api/src/types/response/AdminTeamsSettingsSetDescriptionResponse.ts index 141c2337a..2db89c5cc 100644 --- a/packages/web-api/src/types/response/AdminTeamsSettingsSetDescriptionResponse.ts +++ b/packages/web-api/src/types/response/AdminTeamsSettingsSetDescriptionResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminTeamsSettingsSetDescriptionResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/AdminTeamsSettingsSetDiscoverabilityResponse.ts b/packages/web-api/src/types/response/AdminTeamsSettingsSetDiscoverabilityResponse.ts index fbdb00319..3a5789f0b 100644 --- a/packages/web-api/src/types/response/AdminTeamsSettingsSetDiscoverabilityResponse.ts +++ b/packages/web-api/src/types/response/AdminTeamsSettingsSetDiscoverabilityResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminTeamsSettingsSetDiscoverabilityResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/AdminTeamsSettingsSetIconResponse.ts b/packages/web-api/src/types/response/AdminTeamsSettingsSetIconResponse.ts index c0f258d14..03e4977a6 100644 --- a/packages/web-api/src/types/response/AdminTeamsSettingsSetIconResponse.ts +++ b/packages/web-api/src/types/response/AdminTeamsSettingsSetIconResponse.ts @@ -8,12 +8,12 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminTeamsSettingsSetIconResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; diff --git a/packages/web-api/src/types/response/AdminTeamsSettingsSetNameResponse.ts b/packages/web-api/src/types/response/AdminTeamsSettingsSetNameResponse.ts index 9a11beda4..c9651235f 100644 --- a/packages/web-api/src/types/response/AdminTeamsSettingsSetNameResponse.ts +++ b/packages/web-api/src/types/response/AdminTeamsSettingsSetNameResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminTeamsSettingsSetNameResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/AdminUsergroupsAddChannelsResponse.ts b/packages/web-api/src/types/response/AdminUsergroupsAddChannelsResponse.ts index 02547b181..ba7f9a63a 100644 --- a/packages/web-api/src/types/response/AdminUsergroupsAddChannelsResponse.ts +++ b/packages/web-api/src/types/response/AdminUsergroupsAddChannelsResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminUsergroupsAddChannelsResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/AdminUsergroupsAddTeamsResponse.ts b/packages/web-api/src/types/response/AdminUsergroupsAddTeamsResponse.ts index 8c41a2b08..657954303 100644 --- a/packages/web-api/src/types/response/AdminUsergroupsAddTeamsResponse.ts +++ b/packages/web-api/src/types/response/AdminUsergroupsAddTeamsResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminUsergroupsAddTeamsResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/AdminUsergroupsListChannelsResponse.ts b/packages/web-api/src/types/response/AdminUsergroupsListChannelsResponse.ts index d5999f4ee..3ada32177 100644 --- a/packages/web-api/src/types/response/AdminUsergroupsListChannelsResponse.ts +++ b/packages/web-api/src/types/response/AdminUsergroupsListChannelsResponse.ts @@ -8,48 +8,48 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminUsergroupsListChannelsResponse = WebAPICallResult & { channels?: Channel[]; - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; export interface Channel { - context_team_id?: string; - created?: number; - creator?: string; - date_connected?: number; - enterprise_id?: string; - id?: string; - is_archived?: boolean; - is_channel?: boolean; - is_ext_shared?: boolean; - is_general?: boolean; - is_global_shared?: boolean; - is_group?: boolean; - is_im?: boolean; - is_member?: boolean; - is_moved?: number; - is_mpim?: boolean; - is_org_default?: boolean; - is_org_mandatory?: boolean; - is_org_shared?: boolean; - is_pending_ext_shared?: boolean; - is_private?: boolean; - is_shared?: boolean; - name?: string; - name_normalized?: string; + context_team_id?: string; + created?: number; + creator?: string; + date_connected?: number; + enterprise_id?: string; + id?: string; + is_archived?: boolean; + is_channel?: boolean; + is_ext_shared?: boolean; + is_general?: boolean; + is_global_shared?: boolean; + is_group?: boolean; + is_im?: boolean; + is_member?: boolean; + is_moved?: number; + is_mpim?: boolean; + is_org_default?: boolean; + is_org_mandatory?: boolean; + is_org_shared?: boolean; + is_pending_ext_shared?: boolean; + is_private?: boolean; + is_shared?: boolean; + name?: string; + name_normalized?: string; pending_connected_team_ids?: string[]; - pending_shared?: string[]; - previous_names?: string[]; - properties?: Properties; - purpose?: Purpose; - topic?: Purpose; - unlinked?: number; - updated?: number; + pending_shared?: string[]; + previous_names?: string[]; + properties?: Properties; + purpose?: Purpose; + topic?: Purpose; + unlinked?: number; + updated?: number; } export interface Properties { @@ -62,7 +62,7 @@ export interface RestrictedTo { } export interface Purpose { - creator?: string; + creator?: string; last_set?: number; - value?: string; + value?: string; } diff --git a/packages/web-api/src/types/response/AdminUsergroupsRemoveChannelsResponse.ts b/packages/web-api/src/types/response/AdminUsergroupsRemoveChannelsResponse.ts index b7f30080c..62d4b4b71 100644 --- a/packages/web-api/src/types/response/AdminUsergroupsRemoveChannelsResponse.ts +++ b/packages/web-api/src/types/response/AdminUsergroupsRemoveChannelsResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminUsergroupsRemoveChannelsResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/AdminUsersAssignResponse.ts b/packages/web-api/src/types/response/AdminUsersAssignResponse.ts index 58c1ba8ed..3f7562c42 100644 --- a/packages/web-api/src/types/response/AdminUsersAssignResponse.ts +++ b/packages/web-api/src/types/response/AdminUsersAssignResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminUsersAssignResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/AdminUsersInviteResponse.ts b/packages/web-api/src/types/response/AdminUsersInviteResponse.ts index 12390cd45..fe364686e 100644 --- a/packages/web-api/src/types/response/AdminUsersInviteResponse.ts +++ b/packages/web-api/src/types/response/AdminUsersInviteResponse.ts @@ -8,12 +8,12 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminUsersInviteResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; diff --git a/packages/web-api/src/types/response/AdminUsersListResponse.ts b/packages/web-api/src/types/response/AdminUsersListResponse.ts index ae951592b..7e515812e 100644 --- a/packages/web-api/src/types/response/AdminUsersListResponse.ts +++ b/packages/web-api/src/types/response/AdminUsersListResponse.ts @@ -8,37 +8,37 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminUsersListResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; - users?: User[]; + users?: User[]; }; export interface ResponseMetadata { - messages?: string[]; + messages?: string[]; next_cursor?: string; } export interface User { - date_created?: number; - email?: string; - expiration_ts?: number; - full_name?: string; - has_2fa?: boolean; - has_sso?: boolean; - id?: string; - is_active?: boolean; - is_admin?: boolean; - is_bot?: boolean; - is_owner?: boolean; - is_primary_owner?: boolean; - is_restricted?: boolean; + date_created?: number; + email?: string; + expiration_ts?: number; + full_name?: string; + has_2fa?: boolean; + has_sso?: boolean; + id?: string; + is_active?: boolean; + is_admin?: boolean; + is_bot?: boolean; + is_owner?: boolean; + is_primary_owner?: boolean; + is_restricted?: boolean; is_ultra_restricted?: boolean; - roles?: string[]; - username?: string; - workspaces?: string[]; + roles?: string[]; + username?: string; + workspaces?: string[]; } diff --git a/packages/web-api/src/types/response/AdminUsersRemoveResponse.ts b/packages/web-api/src/types/response/AdminUsersRemoveResponse.ts index b7d10c31b..ce75ed672 100644 --- a/packages/web-api/src/types/response/AdminUsersRemoveResponse.ts +++ b/packages/web-api/src/types/response/AdminUsersRemoveResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminUsersRemoveResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/AdminUsersSessionClearSettingsResponse.ts b/packages/web-api/src/types/response/AdminUsersSessionClearSettingsResponse.ts index 87e20c7d1..fa47de786 100644 --- a/packages/web-api/src/types/response/AdminUsersSessionClearSettingsResponse.ts +++ b/packages/web-api/src/types/response/AdminUsersSessionClearSettingsResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminUsersSessionClearSettingsResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/AdminUsersSessionGetSettingsResponse.ts b/packages/web-api/src/types/response/AdminUsersSessionGetSettingsResponse.ts index 5d45bfd6f..f431b07d3 100644 --- a/packages/web-api/src/types/response/AdminUsersSessionGetSettingsResponse.ts +++ b/packages/web-api/src/types/response/AdminUsersSessionGetSettingsResponse.ts @@ -8,18 +8,18 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminUsersSessionGetSettingsResponse = WebAPICallResult & { - error?: string; - needed?: string; + error?: string; + needed?: string; no_settings_applied?: string[]; - ok?: boolean; - provided?: string; - session_settings?: SessionSetting[]; + ok?: boolean; + provided?: string; + session_settings?: SessionSetting[]; }; export interface SessionSetting { desktop_app_browser_quit?: boolean; - duration?: number; - user_id?: string; + duration?: number; + user_id?: string; } diff --git a/packages/web-api/src/types/response/AdminUsersSessionInvalidateResponse.ts b/packages/web-api/src/types/response/AdminUsersSessionInvalidateResponse.ts index 1f192f9c7..a799f8afe 100644 --- a/packages/web-api/src/types/response/AdminUsersSessionInvalidateResponse.ts +++ b/packages/web-api/src/types/response/AdminUsersSessionInvalidateResponse.ts @@ -8,12 +8,12 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminUsersSessionInvalidateResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; diff --git a/packages/web-api/src/types/response/AdminUsersSessionListResponse.ts b/packages/web-api/src/types/response/AdminUsersSessionListResponse.ts index 22b7c9e52..6fbeb2998 100644 --- a/packages/web-api/src/types/response/AdminUsersSessionListResponse.ts +++ b/packages/web-api/src/types/response/AdminUsersSessionListResponse.ts @@ -8,29 +8,29 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminUsersSessionListResponse = WebAPICallResult & { - active_sessions?: ActiveSession[]; - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + active_sessions?: ActiveSession[]; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; export interface ActiveSession { - created?: Created; - recent?: Created; + created?: Created; + recent?: Created; session_id?: number; - team_id?: string; - user_id?: string; + team_id?: string; + user_id?: string; } export interface Created { - device_hardware?: string; - ip?: string; - os?: string; - os_version?: string; + device_hardware?: string; + ip?: string; + os?: string; + os_version?: string; slack_client_version?: string; } diff --git a/packages/web-api/src/types/response/AdminUsersSessionResetBulkResponse.ts b/packages/web-api/src/types/response/AdminUsersSessionResetBulkResponse.ts index 92fb5b17b..3396d9bd4 100644 --- a/packages/web-api/src/types/response/AdminUsersSessionResetBulkResponse.ts +++ b/packages/web-api/src/types/response/AdminUsersSessionResetBulkResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminUsersSessionResetBulkResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/AdminUsersSessionResetResponse.ts b/packages/web-api/src/types/response/AdminUsersSessionResetResponse.ts index 5226cf9ff..275023cda 100644 --- a/packages/web-api/src/types/response/AdminUsersSessionResetResponse.ts +++ b/packages/web-api/src/types/response/AdminUsersSessionResetResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminUsersSessionResetResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/AdminUsersSessionSetSettingsResponse.ts b/packages/web-api/src/types/response/AdminUsersSessionSetSettingsResponse.ts index b07a8f7f7..843b9a325 100644 --- a/packages/web-api/src/types/response/AdminUsersSessionSetSettingsResponse.ts +++ b/packages/web-api/src/types/response/AdminUsersSessionSetSettingsResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminUsersSessionSetSettingsResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/AdminUsersSetAdminResponse.ts b/packages/web-api/src/types/response/AdminUsersSetAdminResponse.ts index 7ee8f342a..c4241c804 100644 --- a/packages/web-api/src/types/response/AdminUsersSetAdminResponse.ts +++ b/packages/web-api/src/types/response/AdminUsersSetAdminResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminUsersSetAdminResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/AdminUsersSetExpirationResponse.ts b/packages/web-api/src/types/response/AdminUsersSetExpirationResponse.ts index c5ef87cf1..cc49cd5d4 100644 --- a/packages/web-api/src/types/response/AdminUsersSetExpirationResponse.ts +++ b/packages/web-api/src/types/response/AdminUsersSetExpirationResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminUsersSetExpirationResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/AdminUsersSetOwnerResponse.ts b/packages/web-api/src/types/response/AdminUsersSetOwnerResponse.ts index 9654efc70..093a181af 100644 --- a/packages/web-api/src/types/response/AdminUsersSetOwnerResponse.ts +++ b/packages/web-api/src/types/response/AdminUsersSetOwnerResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminUsersSetOwnerResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/AdminUsersSetRegularResponse.ts b/packages/web-api/src/types/response/AdminUsersSetRegularResponse.ts index 27dc5601b..a02e7b39e 100644 --- a/packages/web-api/src/types/response/AdminUsersSetRegularResponse.ts +++ b/packages/web-api/src/types/response/AdminUsersSetRegularResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminUsersSetRegularResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/AdminUsersUnsupportedVersionsExportResponse.ts b/packages/web-api/src/types/response/AdminUsersUnsupportedVersionsExportResponse.ts index ea679d0f1..2ff942ec9 100644 --- a/packages/web-api/src/types/response/AdminUsersUnsupportedVersionsExportResponse.ts +++ b/packages/web-api/src/types/response/AdminUsersUnsupportedVersionsExportResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminUsersUnsupportedVersionsExportResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/AdminWorkflowsCollaboratorsAddResponse.ts b/packages/web-api/src/types/response/AdminWorkflowsCollaboratorsAddResponse.ts index a3359544e..57872f59b 100644 --- a/packages/web-api/src/types/response/AdminWorkflowsCollaboratorsAddResponse.ts +++ b/packages/web-api/src/types/response/AdminWorkflowsCollaboratorsAddResponse.ts @@ -8,19 +8,19 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminWorkflowsCollaboratorsAddResponse = WebAPICallResult & { - error?: string; - errors?: Error[]; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + errors?: Error[]; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; export interface Error { - message?: string; - user?: string; + message?: string; + user?: string; workflow?: string; } diff --git a/packages/web-api/src/types/response/AdminWorkflowsCollaboratorsRemoveResponse.ts b/packages/web-api/src/types/response/AdminWorkflowsCollaboratorsRemoveResponse.ts index 41f9a586f..8624b1556 100644 --- a/packages/web-api/src/types/response/AdminWorkflowsCollaboratorsRemoveResponse.ts +++ b/packages/web-api/src/types/response/AdminWorkflowsCollaboratorsRemoveResponse.ts @@ -8,17 +8,17 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminWorkflowsCollaboratorsRemoveResponse = WebAPICallResult & { - error?: string; - errors?: Error[]; - needed?: string; - ok?: boolean; + error?: string; + errors?: Error[]; + needed?: string; + ok?: boolean; provided?: string; }; export interface Error { - message?: string; - user?: string; + message?: string; + user?: string; workflow?: string; } diff --git a/packages/web-api/src/types/response/AdminWorkflowsPermissionsLookupResponse.ts b/packages/web-api/src/types/response/AdminWorkflowsPermissionsLookupResponse.ts index eea08db2a..826e245eb 100644 --- a/packages/web-api/src/types/response/AdminWorkflowsPermissionsLookupResponse.ts +++ b/packages/web-api/src/types/response/AdminWorkflowsPermissionsLookupResponse.ts @@ -8,24 +8,24 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminWorkflowsPermissionsLookupResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; permissions?: { [key: string]: Permission }; - provided?: string; + provided?: string; }; export interface Permission { - complete?: boolean; + complete?: boolean; who_can_run?: WhoCanRun; } export interface WhoCanRun { - channel_ids?: string[]; - org_ids?: string[]; + channel_ids?: string[]; + org_ids?: string[]; permission_type?: string; - team_ids?: string[]; - user_ids?: string[]; + team_ids?: string[]; + user_ids?: string[]; } diff --git a/packages/web-api/src/types/response/AdminWorkflowsSearchResponse.ts b/packages/web-api/src/types/response/AdminWorkflowsSearchResponse.ts index 6d27875be..8a93a335b 100644 --- a/packages/web-api/src/types/response/AdminWorkflowsSearchResponse.ts +++ b/packages/web-api/src/types/response/AdminWorkflowsSearchResponse.ts @@ -8,65 +8,65 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminWorkflowsSearchResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; - total_found?: number; - workflows?: Workflow[]; + total_found?: number; + workflows?: Workflow[]; }; export interface ResponseMetadata { - messages?: string[]; + messages?: string[]; next_cursor?: string; } export interface Workflow { - app_id?: string; - billing_type?: string; - callback_id?: string; - collaborators?: string[]; - date_updated?: number; - description?: string; - icons?: Icons; - id?: string; - input_parameters?: { [key: string]: InputParameter }; - is_billable?: boolean; - is_published?: boolean; - is_sales_home_workflow?: boolean; - last_published_date?: string; + app_id?: string; + billing_type?: string; + callback_id?: string; + collaborators?: string[]; + date_updated?: number; + description?: string; + icons?: Icons; + id?: string; + input_parameters?: { [key: string]: InputParameter }; + is_billable?: boolean; + is_published?: boolean; + is_sales_home_workflow?: boolean; + last_published_date?: string; last_published_version_id?: string; - last_updated_by?: string; - source?: string; - steps?: Step[]; - team_id?: string; - title?: string; - trigger_ids?: string[]; - unpublished_change_count?: number; - workflow_function_id?: string; + last_updated_by?: string; + source?: string; + steps?: Step[]; + team_id?: string; + title?: string; + trigger_ids?: string[]; + unpublished_change_count?: number; + workflow_function_id?: string; } export interface Icons { image_192?: string; - image_96?: string; + image_96?: string; } export interface InputParameter { description?: string; - is_hidden?: boolean; + is_hidden?: boolean; is_required?: boolean; - name?: string; - title?: string; - type?: string; + name?: string; + title?: string; + type?: string; } export interface Step { function_id?: string; - id?: string; - inputs?: { [key: string]: Input }; + id?: string; + inputs?: { [key: string]: Input }; is_pristine?: boolean; } diff --git a/packages/web-api/src/types/response/AdminWorkflowsUnpublishResponse.ts b/packages/web-api/src/types/response/AdminWorkflowsUnpublishResponse.ts index 2996ff6aa..84d671166 100644 --- a/packages/web-api/src/types/response/AdminWorkflowsUnpublishResponse.ts +++ b/packages/web-api/src/types/response/AdminWorkflowsUnpublishResponse.ts @@ -8,12 +8,12 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AdminWorkflowsUnpublishResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; diff --git a/packages/web-api/src/types/response/ApiTestResponse.ts b/packages/web-api/src/types/response/ApiTestResponse.ts index 5bbd5cc3b..ed1d9c1f8 100644 --- a/packages/web-api/src/types/response/ApiTestResponse.ts +++ b/packages/web-api/src/types/response/ApiTestResponse.ts @@ -8,16 +8,16 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ApiTestResponse = WebAPICallResult & { - args?: Args; - error?: string; - needed?: string; - ok?: boolean; + args?: Args; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; export interface Args { error?: string; - foo?: string; + foo?: string; } diff --git a/packages/web-api/src/types/response/AppsConnectionsOpenResponse.ts b/packages/web-api/src/types/response/AppsConnectionsOpenResponse.ts index e567c94f4..fcfc4064a 100644 --- a/packages/web-api/src/types/response/AppsConnectionsOpenResponse.ts +++ b/packages/web-api/src/types/response/AppsConnectionsOpenResponse.ts @@ -8,11 +8,11 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AppsConnectionsOpenResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; - url?: string; + url?: string; }; diff --git a/packages/web-api/src/types/response/AppsEventAuthorizationsListResponse.ts b/packages/web-api/src/types/response/AppsEventAuthorizationsListResponse.ts index ad4c09b62..72e2b9cb9 100644 --- a/packages/web-api/src/types/response/AppsEventAuthorizationsListResponse.ts +++ b/packages/web-api/src/types/response/AppsEventAuthorizationsListResponse.ts @@ -8,19 +8,19 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AppsEventAuthorizationsListResponse = WebAPICallResult & { authorizations?: Authorization[]; - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; }; export interface Authorization { - enterprise_id?: string; - is_bot?: boolean; + enterprise_id?: string; + is_bot?: boolean; is_enterprise_install?: boolean; - team_id?: string; - user_id?: string; + team_id?: string; + user_id?: string; } diff --git a/packages/web-api/src/types/response/AppsManifestCreateResponse.ts b/packages/web-api/src/types/response/AppsManifestCreateResponse.ts index 6d6c6e9ad..53fe91ee2 100644 --- a/packages/web-api/src/types/response/AppsManifestCreateResponse.ts +++ b/packages/web-api/src/types/response/AppsManifestCreateResponse.ts @@ -8,30 +8,30 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AppsManifestCreateResponse = WebAPICallResult & { - app_id?: string; - credentials?: Credentials; - error?: string; - errors?: Error[]; - needed?: string; + app_id?: string; + credentials?: Credentials; + error?: string; + errors?: Error[]; + needed?: string; oauth_authorize_url?: string; - ok?: boolean; - provided?: string; - response_metadata?: ResponseMetadata; + ok?: boolean; + provided?: string; + response_metadata?: ResponseMetadata; }; export interface Credentials { - client_id?: string; - client_secret?: string; - signing_secret?: string; + client_id?: string; + client_secret?: string; + signing_secret?: string; verification_token?: string; } export interface Error { - code?: string; - message?: string; - pointer?: string; + code?: string; + message?: string; + pointer?: string; related_component?: string; } diff --git a/packages/web-api/src/types/response/AppsManifestDeleteResponse.ts b/packages/web-api/src/types/response/AppsManifestDeleteResponse.ts index d6cd553d2..3e9159f69 100644 --- a/packages/web-api/src/types/response/AppsManifestDeleteResponse.ts +++ b/packages/web-api/src/types/response/AppsManifestDeleteResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AppsManifestDeleteResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/AppsManifestExportResponse.ts b/packages/web-api/src/types/response/AppsManifestExportResponse.ts index 7792c8606..fea8539bf 100644 --- a/packages/web-api/src/types/response/AppsManifestExportResponse.ts +++ b/packages/web-api/src/types/response/AppsManifestExportResponse.ts @@ -8,22 +8,22 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AppsManifestExportResponse = WebAPICallResult & { - error?: string; + error?: string; manifest?: Manifest; - needed?: string; - ok?: boolean; + needed?: string; + ok?: boolean; provided?: string; }; export interface Manifest { - _metadata?: Metadata; + _metadata?: Metadata; display_information?: DisplayInformation; - features?: Features; - functions?: { [key: string]: Function }; - oauth_config?: OauthConfig; - settings?: Settings; + features?: Features; + functions?: { [key: string]: Function }; + oauth_config?: OauthConfig; + settings?: Settings; } export interface Metadata { @@ -33,98 +33,98 @@ export interface Metadata { export interface DisplayInformation { background_color?: string; - description?: string; + description?: string; long_description?: string; - name?: string; + name?: string; } export interface Features { - app_home?: AppHome; - bot_user?: BotUser; - shortcuts?: Shortcut[]; + app_home?: AppHome; + bot_user?: BotUser; + shortcuts?: Shortcut[]; slash_commands?: SlashCommand[]; unfurl_domains?: string[]; } export interface AppHome { - home_tab_enabled?: boolean; - messages_tab_enabled?: boolean; + home_tab_enabled?: boolean; + messages_tab_enabled?: boolean; messages_tab_read_only_enabled?: boolean; } export interface BotUser { always_online?: boolean; - display_name?: string; + display_name?: string; } export interface Shortcut { callback_id?: string; description?: string; - name?: string; - type?: string; + name?: string; + type?: string; } export interface SlashCommand { - command?: string; - description?: string; + command?: string; + description?: string; should_escape?: boolean; - url?: string; - usage_hint?: string; + url?: string; + usage_hint?: string; } export interface Function { - description?: string; - input_parameters?: { [key: string]: PutParameter }; + description?: string; + input_parameters?: { [key: string]: PutParameter }; output_parameters?: { [key: string]: PutParameter }; - title?: string; + title?: string; } export interface PutParameter { description?: string; - hint?: string; + hint?: string; is_required?: boolean; - maxLength?: number; - maximum?: number; - minLength?: number; - minimum?: number; - name?: string; - title?: string; - type?: string; + maxLength?: number; + maximum?: number; + minLength?: number; + minimum?: number; + name?: string; + title?: string; + type?: string; } export interface OauthConfig { - redirect_urls?: string[]; - scopes?: Scopes; + redirect_urls?: string[]; + scopes?: Scopes; token_management_enabled?: boolean; } export interface Scopes { - bot?: string[]; + bot?: string[]; user?: string[]; } export interface Settings { allowed_ip_address_ranges?: string[]; - background_color?: string; - description?: string; - event_subscriptions?: EventSubscriptions; - function_runtime?: string; - hermes_app_type?: string; - interactivity?: Interactivity; - long_description?: string; - org_deploy_enabled?: boolean; - socket_mode_enabled?: boolean; - token_rotation_enabled?: boolean; + background_color?: string; + description?: string; + event_subscriptions?: EventSubscriptions; + function_runtime?: string; + hermes_app_type?: string; + interactivity?: Interactivity; + long_description?: string; + org_deploy_enabled?: boolean; + socket_mode_enabled?: boolean; + token_rotation_enabled?: boolean; } export interface EventSubscriptions { - bot_events?: string[]; + bot_events?: string[]; request_url?: string; user_events?: string[]; } export interface Interactivity { - is_enabled?: boolean; + is_enabled?: boolean; message_menu_options_url?: string; - request_url?: string; + request_url?: string; } diff --git a/packages/web-api/src/types/response/AppsManifestUpdateResponse.ts b/packages/web-api/src/types/response/AppsManifestUpdateResponse.ts index 14134a688..c6e198f3e 100644 --- a/packages/web-api/src/types/response/AppsManifestUpdateResponse.ts +++ b/packages/web-api/src/types/response/AppsManifestUpdateResponse.ts @@ -8,12 +8,12 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AppsManifestUpdateResponse = WebAPICallResult & { - app_id?: string; - error?: string; - needed?: string; - ok?: boolean; + app_id?: string; + error?: string; + needed?: string; + ok?: boolean; permissions_updated?: boolean; - provided?: string; + provided?: string; }; diff --git a/packages/web-api/src/types/response/AppsManifestValidateResponse.ts b/packages/web-api/src/types/response/AppsManifestValidateResponse.ts index 7b8c1ab00..e32053a3d 100644 --- a/packages/web-api/src/types/response/AppsManifestValidateResponse.ts +++ b/packages/web-api/src/types/response/AppsManifestValidateResponse.ts @@ -8,20 +8,20 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AppsManifestValidateResponse = WebAPICallResult & { - error?: string; - errors?: Error[]; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + errors?: Error[]; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; export interface Error { - code?: string; - message?: string; - pointer?: string; + code?: string; + message?: string; + pointer?: string; related_component?: string; } diff --git a/packages/web-api/src/types/response/AppsPermissionsInfoResponse.ts b/packages/web-api/src/types/response/AppsPermissionsInfoResponse.ts index 079f3b018..64c6355e5 100644 --- a/packages/web-api/src/types/response/AppsPermissionsInfoResponse.ts +++ b/packages/web-api/src/types/response/AppsPermissionsInfoResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AppsPermissionsInfoResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/AppsPermissionsRequestResponse.ts b/packages/web-api/src/types/response/AppsPermissionsRequestResponse.ts index d64493413..50d9618af 100644 --- a/packages/web-api/src/types/response/AppsPermissionsRequestResponse.ts +++ b/packages/web-api/src/types/response/AppsPermissionsRequestResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AppsPermissionsRequestResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/AppsPermissionsResourcesListResponse.ts b/packages/web-api/src/types/response/AppsPermissionsResourcesListResponse.ts index 2f4f0e8f4..4794fbe72 100644 --- a/packages/web-api/src/types/response/AppsPermissionsResourcesListResponse.ts +++ b/packages/web-api/src/types/response/AppsPermissionsResourcesListResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AppsPermissionsResourcesListResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/AppsPermissionsScopesListResponse.ts b/packages/web-api/src/types/response/AppsPermissionsScopesListResponse.ts index 11eeffc7f..7a8e0883b 100644 --- a/packages/web-api/src/types/response/AppsPermissionsScopesListResponse.ts +++ b/packages/web-api/src/types/response/AppsPermissionsScopesListResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AppsPermissionsScopesListResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/AppsPermissionsUsersListResponse.ts b/packages/web-api/src/types/response/AppsPermissionsUsersListResponse.ts index d675351a3..241df6d79 100644 --- a/packages/web-api/src/types/response/AppsPermissionsUsersListResponse.ts +++ b/packages/web-api/src/types/response/AppsPermissionsUsersListResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AppsPermissionsUsersListResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/AppsPermissionsUsersRequestResponse.ts b/packages/web-api/src/types/response/AppsPermissionsUsersRequestResponse.ts index f231ad950..dac179505 100644 --- a/packages/web-api/src/types/response/AppsPermissionsUsersRequestResponse.ts +++ b/packages/web-api/src/types/response/AppsPermissionsUsersRequestResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AppsPermissionsUsersRequestResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/AppsUninstallResponse.ts b/packages/web-api/src/types/response/AppsUninstallResponse.ts index 956647391..704b645e8 100644 --- a/packages/web-api/src/types/response/AppsUninstallResponse.ts +++ b/packages/web-api/src/types/response/AppsUninstallResponse.ts @@ -8,12 +8,12 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AppsUninstallResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; diff --git a/packages/web-api/src/types/response/AuthRevokeResponse.ts b/packages/web-api/src/types/response/AuthRevokeResponse.ts index 110808738..d85462076 100644 --- a/packages/web-api/src/types/response/AuthRevokeResponse.ts +++ b/packages/web-api/src/types/response/AuthRevokeResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AuthRevokeResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/AuthTeamsListResponse.ts b/packages/web-api/src/types/response/AuthTeamsListResponse.ts index b6a16aaed..2b4b4b1ba 100644 --- a/packages/web-api/src/types/response/AuthTeamsListResponse.ts +++ b/packages/web-api/src/types/response/AuthTeamsListResponse.ts @@ -8,14 +8,14 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AuthTeamsListResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; - teams?: Team[]; + teams?: Team[]; }; export interface ResponseMetadata { @@ -24,17 +24,17 @@ export interface ResponseMetadata { export interface Team { icon?: Icon; - id?: string; + id?: string; name?: string; } export interface Icon { - image_102?: string; - image_132?: string; - image_230?: string; - image_34?: string; - image_44?: string; - image_68?: string; - image_88?: string; + image_102?: string; + image_132?: string; + image_230?: string; + image_34?: string; + image_44?: string; + image_68?: string; + image_88?: string; image_default?: boolean; } diff --git a/packages/web-api/src/types/response/AuthTestResponse.ts b/packages/web-api/src/types/response/AuthTestResponse.ts index 9b158029e..5d4a92840 100644 --- a/packages/web-api/src/types/response/AuthTestResponse.ts +++ b/packages/web-api/src/types/response/AuthTestResponse.ts @@ -8,21 +8,21 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type AuthTestResponse = WebAPICallResult & { - app_id?: string; - app_name?: string; - bot_id?: string; - enterprise_id?: string; - error?: string; - expires_in?: number; + app_id?: string; + app_name?: string; + bot_id?: string; + enterprise_id?: string; + error?: string; + expires_in?: number; is_enterprise_install?: boolean; - needed?: string; - ok?: boolean; - provided?: string; - team?: string; - team_id?: string; - url?: string; - user?: string; - user_id?: string; + needed?: string; + ok?: boolean; + provided?: string; + team?: string; + team_id?: string; + url?: string; + user?: string; + user_id?: string; }; diff --git a/packages/web-api/src/types/response/BookmarksAddResponse.ts b/packages/web-api/src/types/response/BookmarksAddResponse.ts index d458b051b..771766a3f 100644 --- a/packages/web-api/src/types/response/BookmarksAddResponse.ts +++ b/packages/web-api/src/types/response/BookmarksAddResponse.ts @@ -8,33 +8,33 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type BookmarksAddResponse = WebAPICallResult & { - bookmark?: Bookmark; - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + bookmark?: Bookmark; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; export interface Bookmark { - app_action_id?: string; - app_id?: string; - channel_id?: string; - date_created?: number; - date_updated?: number; - emoji?: string; - entity_id?: string; - icon_url?: string; - id?: string; + app_action_id?: string; + app_id?: string; + channel_id?: string; + date_created?: number; + date_updated?: number; + emoji?: string; + entity_id?: string; + icon_url?: string; + id?: string; last_updated_by_team_id?: string; last_updated_by_user_id?: string; - link?: string; - rank?: string; - shortcut_id?: string; - title?: string; - type?: string; + link?: string; + rank?: string; + shortcut_id?: string; + title?: string; + type?: string; } export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/BookmarksEditResponse.ts b/packages/web-api/src/types/response/BookmarksEditResponse.ts index 1cd98060c..d4849cb0d 100644 --- a/packages/web-api/src/types/response/BookmarksEditResponse.ts +++ b/packages/web-api/src/types/response/BookmarksEditResponse.ts @@ -8,33 +8,33 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type BookmarksEditResponse = WebAPICallResult & { - bookmark?: Bookmark; - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + bookmark?: Bookmark; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; export interface Bookmark { - app_action_id?: string; - app_id?: string; - channel_id?: string; - date_created?: number; - date_updated?: number; - emoji?: string; - entity_id?: string; - icon_url?: string; - id?: string; + app_action_id?: string; + app_id?: string; + channel_id?: string; + date_created?: number; + date_updated?: number; + emoji?: string; + entity_id?: string; + icon_url?: string; + id?: string; last_updated_by_team_id?: string; last_updated_by_user_id?: string; - link?: string; - rank?: string; - shortcut_id?: string; - title?: string; - type?: string; + link?: string; + rank?: string; + shortcut_id?: string; + title?: string; + type?: string; } export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/BookmarksListResponse.ts b/packages/web-api/src/types/response/BookmarksListResponse.ts index 6fb4f5ce4..e840c8bc0 100644 --- a/packages/web-api/src/types/response/BookmarksListResponse.ts +++ b/packages/web-api/src/types/response/BookmarksListResponse.ts @@ -8,33 +8,33 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type BookmarksListResponse = WebAPICallResult & { - bookmarks?: Bookmark[]; - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + bookmarks?: Bookmark[]; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; export interface Bookmark { - app_action_id?: string; - app_id?: string; - channel_id?: string; - date_created?: number; - date_updated?: number; - emoji?: string; - entity_id?: string; - icon_url?: string; - id?: string; + app_action_id?: string; + app_id?: string; + channel_id?: string; + date_created?: number; + date_updated?: number; + emoji?: string; + entity_id?: string; + icon_url?: string; + id?: string; last_updated_by_team_id?: string; last_updated_by_user_id?: string; - link?: string; - rank?: string; - shortcut_id?: string; - title?: string; - type?: string; + link?: string; + rank?: string; + shortcut_id?: string; + title?: string; + type?: string; } export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/BookmarksRemoveResponse.ts b/packages/web-api/src/types/response/BookmarksRemoveResponse.ts index 01236f5cb..8be7594dd 100644 --- a/packages/web-api/src/types/response/BookmarksRemoveResponse.ts +++ b/packages/web-api/src/types/response/BookmarksRemoveResponse.ts @@ -8,12 +8,12 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type BookmarksRemoveResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; diff --git a/packages/web-api/src/types/response/BotsInfoResponse.ts b/packages/web-api/src/types/response/BotsInfoResponse.ts index 10665fc9c..fff20b635 100644 --- a/packages/web-api/src/types/response/BotsInfoResponse.ts +++ b/packages/web-api/src/types/response/BotsInfoResponse.ts @@ -8,21 +8,21 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type BotsInfoResponse = WebAPICallResult & { - bot?: Bot; - error?: string; - needed?: string; - ok?: boolean; + bot?: Bot; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; export interface Bot { - app_id?: string; + app_id?: string; deleted?: boolean; - icons?: Icons; - id?: string; - name?: string; + icons?: Icons; + id?: string; + name?: string; updated?: number; user_id?: string; } diff --git a/packages/web-api/src/types/response/CallsAddResponse.ts b/packages/web-api/src/types/response/CallsAddResponse.ts index f88470755..8635d66ac 100644 --- a/packages/web-api/src/types/response/CallsAddResponse.ts +++ b/packages/web-api/src/types/response/CallsAddResponse.ts @@ -8,32 +8,32 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type CallsAddResponse = WebAPICallResult & { - call?: Call; - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + call?: Call; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; export interface Call { - date_start?: number; + date_start?: number; desktop_app_join_url?: string; - external_display_id?: string; - external_unique_id?: string; - id?: string; - join_url?: string; - title?: string; - users?: User[]; + external_display_id?: string; + external_unique_id?: string; + id?: string; + join_url?: string; + title?: string; + users?: User[]; } export interface User { - avatar_url?: string; + avatar_url?: string; display_name?: string; - external_id?: string; - slack_id?: string; + external_id?: string; + slack_id?: string; } export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/CallsEndResponse.ts b/packages/web-api/src/types/response/CallsEndResponse.ts index a4c946dd6..ce1605c05 100644 --- a/packages/web-api/src/types/response/CallsEndResponse.ts +++ b/packages/web-api/src/types/response/CallsEndResponse.ts @@ -8,31 +8,31 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type CallsEndResponse = WebAPICallResult & { - call?: Call; - error?: string; - needed?: string; - ok?: boolean; + call?: Call; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; export interface Call { - channels?: string[]; - date_end?: number; - date_start?: number; + channels?: string[]; + date_end?: number; + date_start?: number; desktop_app_join_url?: string; - external_display_id?: string; - external_unique_id?: string; - id?: string; - join_url?: string; - title?: string; - users?: User[]; + external_display_id?: string; + external_unique_id?: string; + id?: string; + join_url?: string; + title?: string; + users?: User[]; } export interface User { - avatar_url?: string; + avatar_url?: string; display_name?: string; - external_id?: string; - slack_id?: string; + external_id?: string; + slack_id?: string; } diff --git a/packages/web-api/src/types/response/CallsInfoResponse.ts b/packages/web-api/src/types/response/CallsInfoResponse.ts index 5d816165f..5e224247b 100644 --- a/packages/web-api/src/types/response/CallsInfoResponse.ts +++ b/packages/web-api/src/types/response/CallsInfoResponse.ts @@ -8,30 +8,30 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type CallsInfoResponse = WebAPICallResult & { - call?: Call; - error?: string; - needed?: string; - ok?: boolean; + call?: Call; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; export interface Call { - channels?: string[]; - date_start?: number; + channels?: string[]; + date_start?: number; desktop_app_join_url?: string; - external_display_id?: string; - external_unique_id?: string; - id?: string; - join_url?: string; - title?: string; - users?: User[]; + external_display_id?: string; + external_unique_id?: string; + id?: string; + join_url?: string; + title?: string; + users?: User[]; } export interface User { - avatar_url?: string; + avatar_url?: string; display_name?: string; - external_id?: string; - slack_id?: string; + external_id?: string; + slack_id?: string; } diff --git a/packages/web-api/src/types/response/CallsParticipantsAddResponse.ts b/packages/web-api/src/types/response/CallsParticipantsAddResponse.ts index 8ffda7357..c742b2992 100644 --- a/packages/web-api/src/types/response/CallsParticipantsAddResponse.ts +++ b/packages/web-api/src/types/response/CallsParticipantsAddResponse.ts @@ -8,30 +8,30 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type CallsParticipantsAddResponse = WebAPICallResult & { - call?: Call; - error?: string; - needed?: string; - ok?: boolean; + call?: Call; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; export interface Call { - channels?: string[]; - date_start?: number; + channels?: string[]; + date_start?: number; desktop_app_join_url?: string; - external_display_id?: string; - external_unique_id?: string; - id?: string; - join_url?: string; - title?: string; - users?: User[]; + external_display_id?: string; + external_unique_id?: string; + id?: string; + join_url?: string; + title?: string; + users?: User[]; } export interface User { - avatar_url?: string; + avatar_url?: string; display_name?: string; - external_id?: string; - slack_id?: string; + external_id?: string; + slack_id?: string; } diff --git a/packages/web-api/src/types/response/CallsParticipantsRemoveResponse.ts b/packages/web-api/src/types/response/CallsParticipantsRemoveResponse.ts index 098130763..5e0429b6e 100644 --- a/packages/web-api/src/types/response/CallsParticipantsRemoveResponse.ts +++ b/packages/web-api/src/types/response/CallsParticipantsRemoveResponse.ts @@ -8,30 +8,30 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type CallsParticipantsRemoveResponse = WebAPICallResult & { - call?: Call; - error?: string; - needed?: string; - ok?: boolean; + call?: Call; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; export interface Call { - channels?: string[]; - date_start?: number; + channels?: string[]; + date_start?: number; desktop_app_join_url?: string; - external_display_id?: string; - external_unique_id?: string; - id?: string; - join_url?: string; - title?: string; - users?: User[]; + external_display_id?: string; + external_unique_id?: string; + id?: string; + join_url?: string; + title?: string; + users?: User[]; } export interface User { - avatar_url?: string; + avatar_url?: string; display_name?: string; - external_id?: string; - slack_id?: string; + external_id?: string; + slack_id?: string; } diff --git a/packages/web-api/src/types/response/CallsUpdateResponse.ts b/packages/web-api/src/types/response/CallsUpdateResponse.ts index 3d09eaa61..ab333357e 100644 --- a/packages/web-api/src/types/response/CallsUpdateResponse.ts +++ b/packages/web-api/src/types/response/CallsUpdateResponse.ts @@ -8,30 +8,30 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type CallsUpdateResponse = WebAPICallResult & { - call?: Call; - error?: string; - needed?: string; - ok?: boolean; + call?: Call; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; export interface Call { - channels?: string[]; - date_start?: number; + channels?: string[]; + date_start?: number; desktop_app_join_url?: string; - external_display_id?: string; - external_unique_id?: string; - id?: string; - join_url?: string; - title?: string; - users?: User[]; + external_display_id?: string; + external_unique_id?: string; + id?: string; + join_url?: string; + title?: string; + users?: User[]; } export interface User { - avatar_url?: string; + avatar_url?: string; display_name?: string; - external_id?: string; - slack_id?: string; + external_id?: string; + slack_id?: string; } diff --git a/packages/web-api/src/types/response/CanvasesAccessDeleteResponse.ts b/packages/web-api/src/types/response/CanvasesAccessDeleteResponse.ts index 9acb0d134..e0d6538ff 100644 --- a/packages/web-api/src/types/response/CanvasesAccessDeleteResponse.ts +++ b/packages/web-api/src/types/response/CanvasesAccessDeleteResponse.ts @@ -8,16 +8,15 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type CanvasesAccessDeleteResponse = WebAPICallResult & { - error?: string; + error?: string; failed_to_update_channel_ids?: string[]; - failed_to_update_user_ids?: string[]; - needed?: string; - ok?: boolean; - provided?: string; - response_metadata?: ResponseMetadata; + failed_to_update_user_ids?: string[]; + needed?: string; + ok?: boolean; + provided?: string; + response_metadata?: ResponseMetadata; }; -export interface ResponseMetadata { -} +export type ResponseMetadata = {}; diff --git a/packages/web-api/src/types/response/CanvasesAccessSetResponse.ts b/packages/web-api/src/types/response/CanvasesAccessSetResponse.ts index 0220caf10..9bb5031f8 100644 --- a/packages/web-api/src/types/response/CanvasesAccessSetResponse.ts +++ b/packages/web-api/src/types/response/CanvasesAccessSetResponse.ts @@ -8,16 +8,15 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type CanvasesAccessSetResponse = WebAPICallResult & { - error?: string; + error?: string; failed_to_update_channel_ids?: string[]; - failed_to_update_user_ids?: string[]; - needed?: string; - ok?: boolean; - provided?: string; - response_metadata?: ResponseMetadata; + failed_to_update_user_ids?: string[]; + needed?: string; + ok?: boolean; + provided?: string; + response_metadata?: ResponseMetadata; }; -export interface ResponseMetadata { -} +export type ResponseMetadata = {}; diff --git a/packages/web-api/src/types/response/CanvasesCreateResponse.ts b/packages/web-api/src/types/response/CanvasesCreateResponse.ts index 34db7f10b..9fffa5c58 100644 --- a/packages/web-api/src/types/response/CanvasesCreateResponse.ts +++ b/packages/web-api/src/types/response/CanvasesCreateResponse.ts @@ -8,14 +8,14 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type CanvasesCreateResponse = WebAPICallResult & { - canvas_id?: string; - detail?: string; - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + canvas_id?: string; + detail?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; diff --git a/packages/web-api/src/types/response/CanvasesDeleteResponse.ts b/packages/web-api/src/types/response/CanvasesDeleteResponse.ts index 5c0e1de81..f7ccdff63 100644 --- a/packages/web-api/src/types/response/CanvasesDeleteResponse.ts +++ b/packages/web-api/src/types/response/CanvasesDeleteResponse.ts @@ -8,14 +8,13 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type CanvasesDeleteResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; -export interface ResponseMetadata { -} +export type ResponseMetadata = {}; diff --git a/packages/web-api/src/types/response/CanvasesEditResponse.ts b/packages/web-api/src/types/response/CanvasesEditResponse.ts index 686c38d8f..7e409e303 100644 --- a/packages/web-api/src/types/response/CanvasesEditResponse.ts +++ b/packages/web-api/src/types/response/CanvasesEditResponse.ts @@ -8,13 +8,13 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type CanvasesEditResponse = WebAPICallResult & { - detail?: string; - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + detail?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; diff --git a/packages/web-api/src/types/response/CanvasesSectionsLookupResponse.ts b/packages/web-api/src/types/response/CanvasesSectionsLookupResponse.ts index 3e0d85e04..c70953d44 100644 --- a/packages/web-api/src/types/response/CanvasesSectionsLookupResponse.ts +++ b/packages/web-api/src/types/response/CanvasesSectionsLookupResponse.ts @@ -8,14 +8,14 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type CanvasesSectionsLookupResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; - sections?: Section[]; + sections?: Section[]; }; export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/ChannelsArchiveResponse.ts b/packages/web-api/src/types/response/ChannelsArchiveResponse.ts index e80e0ad1e..2d00c89cb 100644 --- a/packages/web-api/src/types/response/ChannelsArchiveResponse.ts +++ b/packages/web-api/src/types/response/ChannelsArchiveResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ChannelsArchiveResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/ChannelsCreateResponse.ts b/packages/web-api/src/types/response/ChannelsCreateResponse.ts index 6a146cb00..a27f94dae 100644 --- a/packages/web-api/src/types/response/ChannelsCreateResponse.ts +++ b/packages/web-api/src/types/response/ChannelsCreateResponse.ts @@ -8,42 +8,42 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ChannelsCreateResponse = WebAPICallResult & { - channel?: Channel; - error?: string; - needed?: string; - ok?: boolean; + channel?: Channel; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; export interface Channel { - created?: number; - creator?: string; - id?: string; - is_archived?: boolean; - is_channel?: boolean; - is_general?: boolean; - is_member?: boolean; - is_mpim?: boolean; - is_org_shared?: boolean; - is_private?: boolean; - is_shared?: boolean; - last_read?: string; - members?: string[]; - name?: string; - name_normalized?: string; - previous_names?: string[]; - priority?: number; - purpose?: Purpose; - topic?: Purpose; - unlinked?: number; - unread_count?: number; + created?: number; + creator?: string; + id?: string; + is_archived?: boolean; + is_channel?: boolean; + is_general?: boolean; + is_member?: boolean; + is_mpim?: boolean; + is_org_shared?: boolean; + is_private?: boolean; + is_shared?: boolean; + last_read?: string; + members?: string[]; + name?: string; + name_normalized?: string; + previous_names?: string[]; + priority?: number; + purpose?: Purpose; + topic?: Purpose; + unlinked?: number; + unread_count?: number; unread_count_display?: number; } export interface Purpose { - creator?: string; + creator?: string; last_set?: number; - value?: string; + value?: string; } diff --git a/packages/web-api/src/types/response/ChannelsHistoryResponse.ts b/packages/web-api/src/types/response/ChannelsHistoryResponse.ts index 85b73447d..757b13a04 100644 --- a/packages/web-api/src/types/response/ChannelsHistoryResponse.ts +++ b/packages/web-api/src/types/response/ChannelsHistoryResponse.ts @@ -8,125 +8,125 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ChannelsHistoryResponse = WebAPICallResult & { channel_actions_count?: number; - channel_actions_ts?: number; - error?: string; - has_more?: boolean; - latest?: string; - messages?: Message[]; - needed?: string; - ok?: boolean; - provided?: string; - response_metadata?: ResponseMetadata; - warning?: string; + channel_actions_ts?: number; + error?: string; + has_more?: boolean; + latest?: string; + messages?: Message[]; + needed?: string; + ok?: boolean; + provided?: string; + response_metadata?: ResponseMetadata; + warning?: string; }; export interface Message { - attachments?: Attachment[]; - blocks?: Block[]; - bot_id?: string; - bot_profile?: BotProfile; - client_msg_id?: string; - display_as_bot?: boolean; - edited?: Edited; - files?: File[]; - icons?: MessageIcons; - inviter?: string; - latest_reply?: string; - parent_user_id?: string; - reactions?: Reaction[]; - reply_count?: number; - reply_users?: string[]; + attachments?: Attachment[]; + blocks?: Block[]; + bot_id?: string; + bot_profile?: BotProfile; + client_msg_id?: string; + display_as_bot?: boolean; + edited?: Edited; + files?: File[]; + icons?: MessageIcons; + inviter?: string; + latest_reply?: string; + parent_user_id?: string; + reactions?: Reaction[]; + reply_count?: number; + reply_users?: string[]; reply_users_count?: number; - root?: Root; - subscribed?: boolean; - subtype?: string; - team?: string; - text?: string; - thread_ts?: string; - ts?: string; - type?: string; - upload?: boolean; - user?: string; - username?: string; - x_files?: string[]; + root?: Root; + subscribed?: boolean; + subtype?: string; + team?: string; + text?: string; + thread_ts?: string; + ts?: string; + type?: string; + upload?: boolean; + user?: string; + username?: string; + x_files?: string[]; } export interface Attachment { - actions?: Action[]; - app_unfurl_url?: string; - author_icon?: string; - author_id?: string; - author_link?: string; - author_name?: string; - author_subname?: string; - bot_id?: string; - callback_id?: string; - channel_id?: string; - channel_name?: string; - color?: string; - fallback?: string; - fields?: Field[]; - filename?: string; - footer?: string; - footer_icon?: string; - from_url?: string; - id?: number; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - indent?: boolean; - is_app_unfurl?: boolean; - is_msg_unfurl?: boolean; - is_reply_unfurl?: boolean; + actions?: Action[]; + app_unfurl_url?: string; + author_icon?: string; + author_id?: string; + author_link?: string; + author_name?: string; + author_subname?: string; + bot_id?: string; + callback_id?: string; + channel_id?: string; + channel_name?: string; + color?: string; + fallback?: string; + fields?: Field[]; + filename?: string; + footer?: string; + footer_icon?: string; + from_url?: string; + id?: number; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + indent?: boolean; + is_app_unfurl?: boolean; + is_msg_unfurl?: boolean; + is_reply_unfurl?: boolean; is_thread_root_unfurl?: boolean; - metadata?: Metadata; - mimetype?: string; - mrkdwn_in?: string[]; - msg_subtype?: string; - original_url?: string; - pretext?: string; - service_icon?: string; - service_name?: string; - service_url?: string; - size?: number; - text?: string; - thumb_height?: number; - thumb_url?: string; - thumb_width?: number; - title?: string; - title_link?: string; - ts?: string; - url?: string; - video_html?: string; - video_html_height?: number; - video_html_width?: number; + metadata?: Metadata; + mimetype?: string; + mrkdwn_in?: string[]; + msg_subtype?: string; + original_url?: string; + pretext?: string; + service_icon?: string; + service_name?: string; + service_url?: string; + size?: number; + text?: string; + thumb_height?: number; + thumb_url?: string; + thumb_width?: number; + title?: string; + title_link?: string; + ts?: string; + url?: string; + video_html?: string; + video_html_height?: number; + video_html_width?: number; } export interface Action { - confirm?: ActionConfirm; - data_source?: string; - id?: string; + confirm?: ActionConfirm; + data_source?: string; + id?: string; min_query_length?: number; - name?: string; - option_groups?: OptionGroup[]; - options?: Option[]; + name?: string; + option_groups?: OptionGroup[]; + options?: Option[]; selected_options?: Option[]; - style?: string; - text?: string; - type?: string; - url?: string; - value?: string; + style?: string; + text?: string; + type?: string; + url?: string; + value?: string; } export interface ActionConfirm { dismiss_text?: string; - ok_text?: string; - text?: string; - title?: string; + ok_text?: string; + text?: string; + title?: string; } export interface OptionGroup { @@ -134,7 +134,7 @@ export interface OptionGroup { } export interface Option { - text?: string; + text?: string; value?: string; } @@ -145,104 +145,104 @@ export interface Field { } export interface Metadata { - extension?: string; - format?: string; - original_h?: number; - original_w?: number; - rotation?: number; - thumb_160?: boolean; + extension?: string; + format?: string; + original_h?: number; + original_w?: number; + rotation?: number; + thumb_160?: boolean; thumb_360_h?: number; thumb_360_w?: number; - thumb_64?: boolean; - thumb_80?: boolean; - thumb_tiny?: string; + thumb_64?: boolean; + thumb_80?: boolean; + thumb_tiny?: string; } export interface Block { - accessory?: Accessory; - alt_text?: string; - block_id?: string; - elements?: Element[]; - fallback?: string; - fields?: Text[]; - image_bytes?: number; + accessory?: Accessory; + alt_text?: string; + block_id?: string; + elements?: Element[]; + fallback?: string; + fields?: Text[]; + image_bytes?: number; image_height?: number; - image_url?: string; - image_width?: number; - text?: Text; - title?: Text; - type?: string; + image_url?: string; + image_width?: number; + text?: Text; + title?: Text; + type?: string; } export interface Accessory { - alt_text?: string; - fallback?: string; - image_bytes?: number; + alt_text?: string; + fallback?: string; + image_bytes?: number; image_height?: number; - image_url?: string; - image_width?: number; - type?: string; + image_url?: string; + image_width?: number; + type?: string; } export interface Element { - action_id?: string; - alt_text?: string; - confirm?: ElementConfirm; + action_id?: string; + alt_text?: string; + confirm?: ElementConfirm; default_to_current_conversation?: boolean; - fallback?: string; - filter?: Filter; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - initial_channel?: string; - initial_conversation?: string; - initial_date?: string; - initial_option?: InitialOption; - initial_user?: string; - min_query_length?: number; - placeholder?: Text; - response_url_enabled?: boolean; - style?: string; - text?: Text; - type?: string; - url?: string; - value?: string; + fallback?: string; + filter?: Filter; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + initial_channel?: string; + initial_conversation?: string; + initial_date?: string; + initial_option?: InitialOption; + initial_user?: string; + min_query_length?: number; + placeholder?: Text; + response_url_enabled?: boolean; + style?: string; + text?: Text; + type?: string; + url?: string; + value?: string; } export interface ElementConfirm { confirm?: Text; - deny?: Text; - style?: string; - text?: Text; - title?: Text; + deny?: Text; + style?: string; + text?: Text; + title?: Text; } export interface Text { - emoji?: boolean; - text?: string; - type?: string; + emoji?: boolean; + text?: string; + type?: string; verbatim?: boolean; } export interface Filter { - exclude_bot_users?: boolean; + exclude_bot_users?: boolean; exclude_external_shared_channels?: boolean; } export interface InitialOption { description?: Text; - text?: Text; - url?: string; - value?: string; + text?: Text; + url?: string; + value?: string; } export interface BotProfile { - app_id?: string; + app_id?: string; deleted?: boolean; - icons?: BotProfileIcons; - id?: string; - name?: string; + icons?: BotProfileIcons; + id?: string; + name?: string; team_id?: string; updated?: number; } @@ -254,100 +254,100 @@ export interface BotProfileIcons { } export interface Edited { - ts?: string; + ts?: string; user?: string; } export interface File { - created?: number; - display_as_bot?: boolean; - edit_link?: string; - editable?: boolean; - external_id?: string; - external_type?: string; - external_url?: string; - filetype?: string; - has_rich_preview?: boolean; - id?: string; - image_exif_rotation?: number; - is_external?: boolean; - is_public?: boolean; - is_starred?: boolean; - lines?: number; - lines_more?: number; - mimetype?: string; - mode?: string; - name?: string; - original_h?: number; - original_w?: number; - permalink?: string; - permalink_public?: string; - pretty_type?: string; - preview?: string; - preview_highlight?: string; + created?: number; + display_as_bot?: boolean; + edit_link?: string; + editable?: boolean; + external_id?: string; + external_type?: string; + external_url?: string; + filetype?: string; + has_rich_preview?: boolean; + id?: string; + image_exif_rotation?: number; + is_external?: boolean; + is_public?: boolean; + is_starred?: boolean; + lines?: number; + lines_more?: number; + mimetype?: string; + mode?: string; + name?: string; + original_h?: number; + original_w?: number; + permalink?: string; + permalink_public?: string; + pretty_type?: string; + preview?: string; + preview_highlight?: string; preview_is_truncated?: boolean; - public_url_shared?: boolean; - size?: number; - thumb_1024?: string; - thumb_1024_h?: number; - thumb_1024_w?: number; - thumb_160?: string; - thumb_360?: string; - thumb_360_h?: number; - thumb_360_w?: number; - thumb_480?: string; - thumb_480_h?: number; - thumb_480_w?: number; - thumb_64?: string; - thumb_720?: string; - thumb_720_h?: number; - thumb_720_w?: number; - thumb_80?: string; - thumb_800?: string; - thumb_800_h?: number; - thumb_800_w?: number; - thumb_960?: string; - thumb_960_h?: number; - thumb_960_w?: number; - thumb_tiny?: string; - timestamp?: number; - title?: string; - url_private?: string; + public_url_shared?: boolean; + size?: number; + thumb_1024?: string; + thumb_1024_h?: number; + thumb_1024_w?: number; + thumb_160?: string; + thumb_360?: string; + thumb_360_h?: number; + thumb_360_w?: number; + thumb_480?: string; + thumb_480_h?: number; + thumb_480_w?: number; + thumb_64?: string; + thumb_720?: string; + thumb_720_h?: number; + thumb_720_w?: number; + thumb_80?: string; + thumb_800?: string; + thumb_800_h?: number; + thumb_800_w?: number; + thumb_960?: string; + thumb_960_h?: number; + thumb_960_w?: number; + thumb_tiny?: string; + timestamp?: number; + title?: string; + url_private?: string; url_private_download?: string; - user?: string; - username?: string; + user?: string; + username?: string; } export interface MessageIcons { - emoji?: string; + emoji?: string; image_64?: string; } export interface Reaction { count?: number; - name?: string; + name?: string; users?: string[]; } export interface Root { - bot_id?: string; - bot_profile?: BotProfile; - edited?: Edited; - icons?: MessageIcons; - latest_reply?: string; - parent_user_id?: string; - reply_count?: number; - reply_users?: string[]; + bot_id?: string; + bot_profile?: BotProfile; + edited?: Edited; + icons?: MessageIcons; + latest_reply?: string; + parent_user_id?: string; + reply_count?: number; + reply_users?: string[]; reply_users_count?: number; - subscribed?: boolean; - subtype?: string; - team?: string; - text?: string; - thread_ts?: string; - ts?: string; - type?: string; - user?: string; - username?: string; + subscribed?: boolean; + subtype?: string; + team?: string; + text?: string; + thread_ts?: string; + ts?: string; + type?: string; + user?: string; + username?: string; } export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/ChannelsInfoResponse.ts b/packages/web-api/src/types/response/ChannelsInfoResponse.ts index 729e24720..37a788a21 100644 --- a/packages/web-api/src/types/response/ChannelsInfoResponse.ts +++ b/packages/web-api/src/types/response/ChannelsInfoResponse.ts @@ -8,129 +8,129 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ChannelsInfoResponse = WebAPICallResult & { - channel?: Channel; - error?: string; - needed?: string; - ok?: boolean; + channel?: Channel; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; export interface Channel { - created?: number; - creator?: string; - id?: string; - is_archived?: boolean; - is_channel?: boolean; - is_general?: boolean; - is_member?: boolean; - is_mpim?: boolean; - is_org_shared?: boolean; - is_private?: boolean; - is_shared?: boolean; - last_read?: string; - latest?: Latest; - members?: string[]; - name?: string; - name_normalized?: string; - previous_names?: string[]; - purpose?: Purpose; - topic?: Purpose; - unlinked?: number; - unread_count?: number; + created?: number; + creator?: string; + id?: string; + is_archived?: boolean; + is_channel?: boolean; + is_general?: boolean; + is_member?: boolean; + is_mpim?: boolean; + is_org_shared?: boolean; + is_private?: boolean; + is_shared?: boolean; + last_read?: string; + latest?: Latest; + members?: string[]; + name?: string; + name_normalized?: string; + previous_names?: string[]; + purpose?: Purpose; + topic?: Purpose; + unlinked?: number; + unread_count?: number; unread_count_display?: number; } export interface Latest { - attachments?: Attachment[]; - blocks?: Block[]; - bot_id?: string; + attachments?: Attachment[]; + blocks?: Block[]; + bot_id?: string; display_as_bot?: boolean; - edited?: Edited; - files?: File[]; - subtype?: string; - text?: string; - ts?: string; - type?: string; - upload?: boolean; - user?: string; - username?: string; - x_files?: string[]; + edited?: Edited; + files?: File[]; + subtype?: string; + text?: string; + ts?: string; + type?: string; + upload?: boolean; + user?: string; + username?: string; + x_files?: string[]; } export interface Attachment { - actions?: Action[]; - app_unfurl_url?: string; - author_icon?: string; - author_link?: string; - author_name?: string; - author_subname?: string; - bot_id?: string; - callback_id?: string; - channel_id?: string; - channel_name?: string; - color?: string; - fallback?: string; - fields?: Field[]; - filename?: string; - footer?: string; - footer_icon?: string; - from_url?: string; - id?: number; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - indent?: boolean; - is_app_unfurl?: boolean; - is_msg_unfurl?: boolean; - is_reply_unfurl?: boolean; + actions?: Action[]; + app_unfurl_url?: string; + author_icon?: string; + author_link?: string; + author_name?: string; + author_subname?: string; + bot_id?: string; + callback_id?: string; + channel_id?: string; + channel_name?: string; + color?: string; + fallback?: string; + fields?: Field[]; + filename?: string; + footer?: string; + footer_icon?: string; + from_url?: string; + id?: number; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + indent?: boolean; + is_app_unfurl?: boolean; + is_msg_unfurl?: boolean; + is_reply_unfurl?: boolean; is_thread_root_unfurl?: boolean; - metadata?: Metadata; - mimetype?: string; - mrkdwn_in?: string[]; - msg_subtype?: string; - original_url?: string; - pretext?: string; - service_icon?: string; - service_name?: string; - service_url?: string; - size?: number; - text?: string; - thumb_height?: number; - thumb_url?: string; - thumb_width?: number; - title?: string; - title_link?: string; - ts?: string; - url?: string; - video_html?: string; - video_html_height?: number; - video_html_width?: number; + metadata?: Metadata; + mimetype?: string; + mrkdwn_in?: string[]; + msg_subtype?: string; + original_url?: string; + pretext?: string; + service_icon?: string; + service_name?: string; + service_url?: string; + size?: number; + text?: string; + thumb_height?: number; + thumb_url?: string; + thumb_width?: number; + title?: string; + title_link?: string; + ts?: string; + url?: string; + video_html?: string; + video_html_height?: number; + video_html_width?: number; } export interface Action { - confirm?: ActionConfirm; - data_source?: string; - id?: string; + confirm?: ActionConfirm; + data_source?: string; + id?: string; min_query_length?: number; - name?: string; - option_groups?: OptionGroup[]; - options?: Option[]; + name?: string; + option_groups?: OptionGroup[]; + options?: Option[]; selected_options?: Option[]; - style?: string; - text?: string; - type?: string; - url?: string; - value?: string; + style?: string; + text?: string; + type?: string; + url?: string; + value?: string; } export interface ActionConfirm { dismiss_text?: string; - ok_text?: string; - text?: string; - title?: string; + ok_text?: string; + text?: string; + title?: string; } export interface OptionGroup { @@ -138,7 +138,7 @@ export interface OptionGroup { } export interface Option { - text?: string; + text?: string; value?: string; } @@ -149,129 +149,129 @@ export interface Field { } export interface Metadata { - extension?: string; - format?: string; - original_h?: number; - original_w?: number; - rotation?: number; - thumb_160?: boolean; + extension?: string; + format?: string; + original_h?: number; + original_w?: number; + rotation?: number; + thumb_160?: boolean; thumb_360_h?: number; thumb_360_w?: number; - thumb_64?: boolean; - thumb_80?: boolean; - thumb_tiny?: string; + thumb_64?: boolean; + thumb_80?: boolean; + thumb_tiny?: string; } export interface Block { - accessory?: Accessory; - alt_text?: string; - block_id?: string; - elements?: Element[]; - fallback?: string; - fields?: Text[]; - image_bytes?: number; + accessory?: Accessory; + alt_text?: string; + block_id?: string; + elements?: Element[]; + fallback?: string; + fields?: Text[]; + image_bytes?: number; image_height?: number; - image_url?: string; - image_width?: number; - text?: Text; - title?: Text; - type?: string; + image_url?: string; + image_width?: number; + text?: Text; + title?: Text; + type?: string; } export interface Accessory { - alt_text?: string; - fallback?: string; - image_bytes?: number; + alt_text?: string; + fallback?: string; + image_bytes?: number; image_height?: number; - image_url?: string; - image_width?: number; - type?: string; + image_url?: string; + image_width?: number; + type?: string; } export interface Element { - action_id?: string; - alt_text?: string; - confirm?: ElementConfirm; - fallback?: string; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - initial_channel?: string; + action_id?: string; + alt_text?: string; + confirm?: ElementConfirm; + fallback?: string; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + initial_channel?: string; initial_conversation?: string; - initial_date?: string; - initial_option?: InitialOption; - initial_user?: string; - min_query_length?: number; - placeholder?: Text; - style?: string; - text?: Text; - type?: string; - url?: string; - value?: string; + initial_date?: string; + initial_option?: InitialOption; + initial_user?: string; + min_query_length?: number; + placeholder?: Text; + style?: string; + text?: Text; + type?: string; + url?: string; + value?: string; } export interface ElementConfirm { confirm?: Text; - deny?: Text; - text?: Text; - title?: Text; + deny?: Text; + text?: Text; + title?: Text; } export interface Text { - emoji?: boolean; - text?: string; - type?: string; + emoji?: boolean; + text?: string; + type?: string; verbatim?: boolean; } export interface InitialOption { description?: Text; - text?: Text; - url?: string; - value?: string; + text?: Text; + url?: string; + value?: string; } export interface Edited { - ts?: string; + ts?: string; user?: string; } export interface File { - created?: number; - display_as_bot?: boolean; - edit_link?: string; - editable?: boolean; - external_type?: string; - filetype?: string; - has_rich_preview?: boolean; - id?: string; - is_external?: boolean; - is_public?: boolean; - is_starred?: boolean; - lines?: number; - lines_more?: number; - mimetype?: string; - mode?: string; - name?: string; - permalink?: string; - permalink_public?: string; - pretty_type?: string; - preview?: string; - preview_highlight?: string; + created?: number; + display_as_bot?: boolean; + edit_link?: string; + editable?: boolean; + external_type?: string; + filetype?: string; + has_rich_preview?: boolean; + id?: string; + is_external?: boolean; + is_public?: boolean; + is_starred?: boolean; + lines?: number; + lines_more?: number; + mimetype?: string; + mode?: string; + name?: string; + permalink?: string; + permalink_public?: string; + pretty_type?: string; + preview?: string; + preview_highlight?: string; preview_is_truncated?: boolean; - public_url_shared?: boolean; - size?: number; - timestamp?: number; - title?: string; - url_private?: string; + public_url_shared?: boolean; + size?: number; + timestamp?: number; + title?: string; + url_private?: string; url_private_download?: string; - user?: string; - username?: string; + user?: string; + username?: string; } export interface Purpose { - creator?: string; + creator?: string; last_set?: number; - value?: string; + value?: string; } diff --git a/packages/web-api/src/types/response/ChannelsInviteResponse.ts b/packages/web-api/src/types/response/ChannelsInviteResponse.ts index 8068e085b..a6f1549af 100644 --- a/packages/web-api/src/types/response/ChannelsInviteResponse.ts +++ b/packages/web-api/src/types/response/ChannelsInviteResponse.ts @@ -8,51 +8,51 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ChannelsInviteResponse = WebAPICallResult & { - channel?: Channel; - error?: string; - needed?: string; - ok?: boolean; + channel?: Channel; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; export interface Channel { - created?: number; - creator?: string; - id?: string; - is_archived?: boolean; - is_channel?: boolean; - is_general?: boolean; - is_member?: boolean; - is_mpim?: boolean; - is_org_shared?: boolean; - is_private?: boolean; - is_shared?: boolean; - last_read?: string; - latest?: Latest; - members?: string[]; - name?: string; - name_normalized?: string; - previous_names?: string[]; - priority?: number; - purpose?: Purpose; - topic?: Purpose; - unlinked?: number; - unread_count?: number; + created?: number; + creator?: string; + id?: string; + is_archived?: boolean; + is_channel?: boolean; + is_general?: boolean; + is_member?: boolean; + is_mpim?: boolean; + is_org_shared?: boolean; + is_private?: boolean; + is_shared?: boolean; + last_read?: string; + latest?: Latest; + members?: string[]; + name?: string; + name_normalized?: string; + previous_names?: string[]; + priority?: number; + purpose?: Purpose; + topic?: Purpose; + unlinked?: number; + unread_count?: number; unread_count_display?: number; } export interface Latest { subtype?: string; - text?: string; - ts?: string; - type?: string; - user?: string; + text?: string; + ts?: string; + type?: string; + user?: string; } export interface Purpose { - creator?: string; + creator?: string; last_set?: number; - value?: string; + value?: string; } diff --git a/packages/web-api/src/types/response/ChannelsJoinResponse.ts b/packages/web-api/src/types/response/ChannelsJoinResponse.ts index f9aaac9b3..ef3f85021 100644 --- a/packages/web-api/src/types/response/ChannelsJoinResponse.ts +++ b/packages/web-api/src/types/response/ChannelsJoinResponse.ts @@ -8,51 +8,51 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ChannelsJoinResponse = WebAPICallResult & { - channel?: Channel; - error?: string; - needed?: string; - ok?: boolean; + channel?: Channel; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; export interface Channel { - created?: number; - creator?: string; - id?: string; - is_archived?: boolean; - is_channel?: boolean; - is_general?: boolean; - is_member?: boolean; - is_mpim?: boolean; - is_org_shared?: boolean; - is_private?: boolean; - is_shared?: boolean; - last_read?: string; - latest?: Latest; - members?: string[]; - name?: string; - name_normalized?: string; - previous_names?: string[]; - priority?: number; - purpose?: Purpose; - topic?: Purpose; - unlinked?: number; - unread_count?: number; + created?: number; + creator?: string; + id?: string; + is_archived?: boolean; + is_channel?: boolean; + is_general?: boolean; + is_member?: boolean; + is_mpim?: boolean; + is_org_shared?: boolean; + is_private?: boolean; + is_shared?: boolean; + last_read?: string; + latest?: Latest; + members?: string[]; + name?: string; + name_normalized?: string; + previous_names?: string[]; + priority?: number; + purpose?: Purpose; + topic?: Purpose; + unlinked?: number; + unread_count?: number; unread_count_display?: number; } export interface Latest { subtype?: string; - text?: string; - ts?: string; - type?: string; - user?: string; + text?: string; + ts?: string; + type?: string; + user?: string; } export interface Purpose { - creator?: string; + creator?: string; last_set?: number; - value?: string; + value?: string; } diff --git a/packages/web-api/src/types/response/ChannelsKickResponse.ts b/packages/web-api/src/types/response/ChannelsKickResponse.ts index 6acfb07f5..fe1f27bdc 100644 --- a/packages/web-api/src/types/response/ChannelsKickResponse.ts +++ b/packages/web-api/src/types/response/ChannelsKickResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ChannelsKickResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/ChannelsLeaveResponse.ts b/packages/web-api/src/types/response/ChannelsLeaveResponse.ts index 905bacdae..824776970 100644 --- a/packages/web-api/src/types/response/ChannelsLeaveResponse.ts +++ b/packages/web-api/src/types/response/ChannelsLeaveResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ChannelsLeaveResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/ChannelsListResponse.ts b/packages/web-api/src/types/response/ChannelsListResponse.ts index a61766760..83a5e4701 100644 --- a/packages/web-api/src/types/response/ChannelsListResponse.ts +++ b/packages/web-api/src/types/response/ChannelsListResponse.ts @@ -8,47 +8,47 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ChannelsListResponse = WebAPICallResult & { - channels?: Channel[]; - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + channels?: Channel[]; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; - warning?: string; + warning?: string; }; export interface Channel { - created?: number; - creator?: string; - id?: string; - is_archived?: boolean; - is_channel?: boolean; - is_general?: boolean; - is_member?: boolean; - is_mpim?: boolean; - is_org_shared?: boolean; - is_private?: boolean; - is_shared?: boolean; - members?: string[]; - name?: string; + created?: number; + creator?: string; + id?: string; + is_archived?: boolean; + is_channel?: boolean; + is_general?: boolean; + is_member?: boolean; + is_mpim?: boolean; + is_org_shared?: boolean; + is_private?: boolean; + is_shared?: boolean; + members?: string[]; + name?: string; name_normalized?: string; - num_members?: number; - previous_names?: string[]; - purpose?: Purpose; - topic?: Purpose; - unlinked?: number; + num_members?: number; + previous_names?: string[]; + purpose?: Purpose; + topic?: Purpose; + unlinked?: number; } export interface Purpose { - creator?: string; + creator?: string; last_set?: number; - value?: string; + value?: string; } export interface ResponseMetadata { - messages?: string[]; + messages?: string[]; next_cursor?: string; - warnings?: string[]; + warnings?: string[]; } diff --git a/packages/web-api/src/types/response/ChannelsMarkResponse.ts b/packages/web-api/src/types/response/ChannelsMarkResponse.ts index 336d09521..bd40fb10b 100644 --- a/packages/web-api/src/types/response/ChannelsMarkResponse.ts +++ b/packages/web-api/src/types/response/ChannelsMarkResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ChannelsMarkResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/ChannelsRenameResponse.ts b/packages/web-api/src/types/response/ChannelsRenameResponse.ts index dbaed13de..3c94373c0 100644 --- a/packages/web-api/src/types/response/ChannelsRenameResponse.ts +++ b/packages/web-api/src/types/response/ChannelsRenameResponse.ts @@ -8,38 +8,38 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ChannelsRenameResponse = WebAPICallResult & { - channel?: Channel; - error?: string; - needed?: string; - ok?: boolean; + channel?: Channel; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; export interface Channel { - created?: number; - creator?: string; - id?: string; - is_archived?: boolean; - is_channel?: boolean; - is_general?: boolean; - is_member?: boolean; - is_mpim?: boolean; - is_org_shared?: boolean; - is_private?: boolean; - is_shared?: boolean; - members?: string[]; - name?: string; + created?: number; + creator?: string; + id?: string; + is_archived?: boolean; + is_channel?: boolean; + is_general?: boolean; + is_member?: boolean; + is_mpim?: boolean; + is_org_shared?: boolean; + is_private?: boolean; + is_shared?: boolean; + members?: string[]; + name?: string; name_normalized?: string; - previous_names?: string[]; - purpose?: Purpose; - topic?: Purpose; - unlinked?: number; + previous_names?: string[]; + purpose?: Purpose; + topic?: Purpose; + unlinked?: number; } export interface Purpose { - creator?: string; + creator?: string; last_set?: number; - value?: string; + value?: string; } diff --git a/packages/web-api/src/types/response/ChannelsRepliesResponse.ts b/packages/web-api/src/types/response/ChannelsRepliesResponse.ts index 722ef4482..2a988c788 100644 --- a/packages/web-api/src/types/response/ChannelsRepliesResponse.ts +++ b/packages/web-api/src/types/response/ChannelsRepliesResponse.ts @@ -8,41 +8,41 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ChannelsRepliesResponse = WebAPICallResult & { - error?: string; - has_more?: boolean; - messages?: Message[]; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + has_more?: boolean; + messages?: Message[]; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; - warning?: string; + warning?: string; }; export interface Message { - bot_id?: string; - bot_profile?: BotProfile; - latest_reply?: string; - parent_user_id?: string; - reply_count?: number; - reply_users?: string[]; + bot_id?: string; + bot_profile?: BotProfile; + latest_reply?: string; + parent_user_id?: string; + reply_count?: number; + reply_users?: string[]; reply_users_count?: number; - subscribed?: boolean; - team?: string; - text?: string; - thread_ts?: string; - ts?: string; - type?: string; - user?: string; + subscribed?: boolean; + team?: string; + text?: string; + thread_ts?: string; + ts?: string; + type?: string; + user?: string; } export interface BotProfile { - app_id?: string; + app_id?: string; deleted?: boolean; - icons?: Icons; - id?: string; - name?: string; + icons?: Icons; + id?: string; + name?: string; team_id?: string; updated?: number; } diff --git a/packages/web-api/src/types/response/ChannelsSetPurposeResponse.ts b/packages/web-api/src/types/response/ChannelsSetPurposeResponse.ts index 6a37e607e..814736a90 100644 --- a/packages/web-api/src/types/response/ChannelsSetPurposeResponse.ts +++ b/packages/web-api/src/types/response/ChannelsSetPurposeResponse.ts @@ -8,11 +8,11 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ChannelsSetPurposeResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; - purpose?: string; + purpose?: string; }; diff --git a/packages/web-api/src/types/response/ChannelsSetTopicResponse.ts b/packages/web-api/src/types/response/ChannelsSetTopicResponse.ts index 8507ae8ce..0218b1d71 100644 --- a/packages/web-api/src/types/response/ChannelsSetTopicResponse.ts +++ b/packages/web-api/src/types/response/ChannelsSetTopicResponse.ts @@ -8,11 +8,11 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ChannelsSetTopicResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; - topic?: string; + topic?: string; }; diff --git a/packages/web-api/src/types/response/ChannelsUnarchiveResponse.ts b/packages/web-api/src/types/response/ChannelsUnarchiveResponse.ts index 78324f681..5f088382b 100644 --- a/packages/web-api/src/types/response/ChannelsUnarchiveResponse.ts +++ b/packages/web-api/src/types/response/ChannelsUnarchiveResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ChannelsUnarchiveResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/ChatDeleteResponse.ts b/packages/web-api/src/types/response/ChatDeleteResponse.ts index e48ff26bd..4484433f1 100644 --- a/packages/web-api/src/types/response/ChatDeleteResponse.ts +++ b/packages/web-api/src/types/response/ChatDeleteResponse.ts @@ -8,12 +8,12 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ChatDeleteResponse = WebAPICallResult & { - channel?: string; - error?: string; - needed?: string; - ok?: boolean; + channel?: string; + error?: string; + needed?: string; + ok?: boolean; provided?: string; - ts?: string; + ts?: string; }; diff --git a/packages/web-api/src/types/response/ChatDeleteScheduledMessageResponse.ts b/packages/web-api/src/types/response/ChatDeleteScheduledMessageResponse.ts index 17e061de0..a453f8d73 100644 --- a/packages/web-api/src/types/response/ChatDeleteScheduledMessageResponse.ts +++ b/packages/web-api/src/types/response/ChatDeleteScheduledMessageResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ChatDeleteScheduledMessageResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/ChatGetPermalinkResponse.ts b/packages/web-api/src/types/response/ChatGetPermalinkResponse.ts index 0a89af143..2251e7b17 100644 --- a/packages/web-api/src/types/response/ChatGetPermalinkResponse.ts +++ b/packages/web-api/src/types/response/ChatGetPermalinkResponse.ts @@ -8,12 +8,12 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ChatGetPermalinkResponse = WebAPICallResult & { - channel?: string; - error?: string; - needed?: string; - ok?: boolean; + channel?: string; + error?: string; + needed?: string; + ok?: boolean; permalink?: string; - provided?: string; + provided?: string; }; diff --git a/packages/web-api/src/types/response/ChatMeMessageResponse.ts b/packages/web-api/src/types/response/ChatMeMessageResponse.ts index 7e742b5dc..5b074a108 100644 --- a/packages/web-api/src/types/response/ChatMeMessageResponse.ts +++ b/packages/web-api/src/types/response/ChatMeMessageResponse.ts @@ -8,12 +8,12 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ChatMeMessageResponse = WebAPICallResult & { - channel?: string; - error?: string; - needed?: string; - ok?: boolean; + channel?: string; + error?: string; + needed?: string; + ok?: boolean; provided?: string; - ts?: string; + ts?: string; }; diff --git a/packages/web-api/src/types/response/ChatPostEphemeralResponse.ts b/packages/web-api/src/types/response/ChatPostEphemeralResponse.ts index 03d41b14a..e8b5a5154 100644 --- a/packages/web-api/src/types/response/ChatPostEphemeralResponse.ts +++ b/packages/web-api/src/types/response/ChatPostEphemeralResponse.ts @@ -8,11 +8,11 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ChatPostEphemeralResponse = WebAPICallResult & { - error?: string; + error?: string; message_ts?: string; - needed?: string; - ok?: boolean; - provided?: string; + needed?: string; + ok?: boolean; + provided?: string; }; diff --git a/packages/web-api/src/types/response/ChatPostMessageResponse.ts b/packages/web-api/src/types/response/ChatPostMessageResponse.ts index 28de80fbe..2fd73a2b9 100644 --- a/packages/web-api/src/types/response/ChatPostMessageResponse.ts +++ b/packages/web-api/src/types/response/ChatPostMessageResponse.ts @@ -8,239 +8,239 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ChatPostMessageResponse = WebAPICallResult & { - channel?: string; + channel?: string; deprecated_argument?: string; - error?: string; - errors?: string[]; - message?: ChatPostMessageResponseMessage; - needed?: string; - ok?: boolean; - provided?: string; - response_metadata?: ResponseMetadata; - ts?: string; + error?: string; + errors?: string[]; + message?: ChatPostMessageResponseMessage; + needed?: string; + ok?: boolean; + provided?: string; + response_metadata?: ResponseMetadata; + ts?: string; }; export interface ChatPostMessageResponseMessage { - app_id?: string; - attachments?: Attachment[]; - blocks?: PurpleBlock[]; - bot_id?: string; - bot_profile?: BotProfile; - icons?: FluffyIcons; - metadata?: FluffyMetadata; + app_id?: string; + attachments?: Attachment[]; + blocks?: PurpleBlock[]; + bot_id?: string; + bot_profile?: BotProfile; + icons?: FluffyIcons; + metadata?: FluffyMetadata; parent_user_id?: string; - room?: Room; - root?: FluffyRoot; - subtype?: string; - team?: string; - text?: string; - thread_ts?: string; - ts?: string; - type?: string; - user?: string; - username?: string; + room?: Room; + root?: FluffyRoot; + subtype?: string; + team?: string; + text?: string; + thread_ts?: string; + ts?: string; + type?: string; + user?: string; + username?: string; } export interface Attachment { - actions?: Action[]; - app_id?: string; - app_unfurl_url?: string; - author_icon?: string; - author_id?: string; - author_link?: string; - author_name?: string; - author_subname?: string; - blocks?: TitleBlockElement[]; - bot_id?: string; - callback_id?: string; - channel_id?: string; - channel_name?: string; - channel_team?: string; - color?: string; - fallback?: string; - fields?: AttachmentField[]; - file_id?: string; - filename?: string; - files?: FileElement[]; - footer?: string; - footer_icon?: string; - from_url?: string; - hide_border?: boolean; - hide_color?: boolean; - id?: number; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - indent?: boolean; - is_app_unfurl?: boolean; - is_file_attachment?: boolean; - is_msg_unfurl?: boolean; - is_reply_unfurl?: boolean; + actions?: Action[]; + app_id?: string; + app_unfurl_url?: string; + author_icon?: string; + author_id?: string; + author_link?: string; + author_name?: string; + author_subname?: string; + blocks?: TitleBlockElement[]; + bot_id?: string; + callback_id?: string; + channel_id?: string; + channel_name?: string; + channel_team?: string; + color?: string; + fallback?: string; + fields?: AttachmentField[]; + file_id?: string; + filename?: string; + files?: FileElement[]; + footer?: string; + footer_icon?: string; + from_url?: string; + hide_border?: boolean; + hide_color?: boolean; + id?: number; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + indent?: boolean; + is_app_unfurl?: boolean; + is_file_attachment?: boolean; + is_msg_unfurl?: boolean; + is_reply_unfurl?: boolean; is_thread_root_unfurl?: boolean; - list?: List; - list_record?: PurpleListRecord; - list_record_id?: string; - list_records?: ListRecordElement[]; - list_schema?: Schema[]; - list_view?: View; - list_view_id?: string; - message_blocks?: MessageBlock[]; - metadata?: AttachmentMetadata; - mimetype?: string; - mrkdwn_in?: string[]; - msg_subtype?: string; - original_url?: string; - pretext?: string; - preview?: Preview; - service_icon?: string; - service_name?: string; - service_url?: string; - size?: number; - text?: string; - thumb_height?: number; - thumb_url?: string; - thumb_width?: number; - title?: string; - title_link?: string; - ts?: string; - url?: string; - video_html?: string; - video_html_height?: number; - video_html_width?: number; - video_url?: string; + list?: List; + list_record?: PurpleListRecord; + list_record_id?: string; + list_records?: ListRecordElement[]; + list_schema?: Schema[]; + list_view?: View; + list_view_id?: string; + message_blocks?: MessageBlock[]; + metadata?: AttachmentMetadata; + mimetype?: string; + mrkdwn_in?: string[]; + msg_subtype?: string; + original_url?: string; + pretext?: string; + preview?: Preview; + service_icon?: string; + service_name?: string; + service_url?: string; + size?: number; + text?: string; + thumb_height?: number; + thumb_url?: string; + thumb_width?: number; + title?: string; + title_link?: string; + ts?: string; + url?: string; + video_html?: string; + video_html_height?: number; + video_html_width?: number; + video_url?: string; } export interface Action { - confirm?: ActionConfirm; - data_source?: string; - id?: string; + confirm?: ActionConfirm; + data_source?: string; + id?: string; min_query_length?: number; - name?: string; - option_groups?: ActionOptionGroup[]; - options?: SelectedOptionElement[]; + name?: string; + option_groups?: ActionOptionGroup[]; + options?: SelectedOptionElement[]; selected_options?: SelectedOptionElement[]; - style?: string; - text?: string; - type?: string; - url?: string; - value?: string; + style?: string; + text?: string; + type?: string; + url?: string; + value?: string; } export interface ActionConfirm { dismiss_text?: string; - ok_text?: string; - text?: string; - title?: string; + ok_text?: string; + text?: string; + title?: string; } export interface ActionOptionGroup { options?: SelectedOptionElement[]; - text?: string; + text?: string; } export interface SelectedOptionElement { - text?: string; + text?: string; value?: string; } export interface TitleBlockElement { - accessory?: Accessory; - alt_text?: string; - app_collaborators?: string[]; - app_id?: string; - author_name?: string; - block_id?: string; - bot_user_id?: string; - button_label?: string; - description?: DescriptionElement | string; - developer_trace_id?: string; - elements?: Accessory[]; - fallback?: string; - fields?: DescriptionElement[]; - function_trigger_id?: string; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - is_animated?: boolean; - is_workflow_app?: boolean; - owning_team_id?: string; - provider_icon_url?: string; - provider_name?: string; + accessory?: Accessory; + alt_text?: string; + app_collaborators?: string[]; + app_id?: string; + author_name?: string; + block_id?: string; + bot_user_id?: string; + button_label?: string; + description?: DescriptionElement | string; + developer_trace_id?: string; + elements?: Accessory[]; + fallback?: string; + fields?: DescriptionElement[]; + function_trigger_id?: string; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + is_animated?: boolean; + is_workflow_app?: boolean; + owning_team_id?: string; + provider_icon_url?: string; + provider_name?: string; sales_home_workflow_app_type?: number; - share_url?: string; - slack_file?: SlackFile; - text?: DescriptionElement; - thumbnail_url?: string; - title?: DescriptionElement | string; - title_url?: string; - trigger_subtype?: string; - trigger_type?: string; - type?: BlockType; - url?: string; - video_url?: string; - workflow_id?: string; + share_url?: string; + slack_file?: SlackFile; + text?: DescriptionElement; + thumbnail_url?: string; + title?: DescriptionElement | string; + title_url?: string; + trigger_subtype?: string; + trigger_type?: string; + type?: BlockType; + url?: string; + video_url?: string; + workflow_id?: string; } export interface Accessory { - accessibility_label?: string; - action_id?: string; - alt_text?: string; - border?: number; - confirm?: AccessoryConfirm; + accessibility_label?: string; + action_id?: string; + alt_text?: string; + border?: number; + confirm?: AccessoryConfirm; default_to_current_conversation?: boolean; - elements?: AccessoryElement[]; - fallback?: string; - filter?: Filter; - focus_on_load?: boolean; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - indent?: number; - initial_channel?: string; - initial_channels?: string[]; - initial_conversation?: string; - initial_conversations?: string[]; - initial_date?: string; - initial_date_time?: number; - initial_option?: InitialOptionElement; - initial_options?: InitialOptionElement[]; - initial_time?: string; - initial_user?: string; - initial_users?: string[]; - max_selected_items?: number; - min_query_length?: number; - offset?: number; - option_groups?: AccessoryOptionGroup[]; - options?: InitialOptionElement[]; - placeholder?: DescriptionElement; - response_url_enabled?: boolean; - slack_file?: SlackFile; - style?: string; - text?: DescriptionElement; - timezone?: string; - type?: string; - url?: string; - value?: string; - workflow?: Workflow; + elements?: AccessoryElement[]; + fallback?: string; + filter?: Filter; + focus_on_load?: boolean; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + indent?: number; + initial_channel?: string; + initial_channels?: string[]; + initial_conversation?: string; + initial_conversations?: string[]; + initial_date?: string; + initial_date_time?: number; + initial_option?: InitialOptionElement; + initial_options?: InitialOptionElement[]; + initial_time?: string; + initial_user?: string; + initial_users?: string[]; + max_selected_items?: number; + min_query_length?: number; + offset?: number; + option_groups?: AccessoryOptionGroup[]; + options?: InitialOptionElement[]; + placeholder?: DescriptionElement; + response_url_enabled?: boolean; + slack_file?: SlackFile; + style?: string; + text?: DescriptionElement; + timezone?: string; + type?: string; + url?: string; + value?: string; + workflow?: Workflow; } export interface AccessoryConfirm { confirm?: DescriptionElement; - deny?: DescriptionElement; - style?: string; - text?: DescriptionElement; - title?: DescriptionElement; + deny?: DescriptionElement; + style?: string; + text?: DescriptionElement; + title?: DescriptionElement; } export interface DescriptionElement { - emoji?: boolean; - text?: string; - type?: DescriptionType; + emoji?: boolean; + text?: string; + type?: DescriptionType; verbatim?: boolean; } @@ -250,42 +250,42 @@ export enum DescriptionType { } export interface AccessoryElement { - border?: number; + border?: number; elements?: PurpleElement[]; - indent?: number; - offset?: number; - style?: string; - type?: FluffyType; + indent?: number; + offset?: number; + style?: string; + type?: FluffyType; } export interface PurpleElement { - channel_id?: string; - fallback?: string; - format?: string; - name?: string; - range?: string; - skin_tone?: number; - style?: Style; - team_id?: string; - text?: string; - timestamp?: string; - type?: PurpleType; - unicode?: string; - unsafe?: boolean; - url?: string; - user_id?: string; + channel_id?: string; + fallback?: string; + format?: string; + name?: string; + range?: string; + skin_tone?: number; + style?: Style; + team_id?: string; + text?: string; + timestamp?: string; + type?: PurpleType; + unicode?: string; + unsafe?: boolean; + url?: string; + user_id?: string; usergroup_id?: string; - value?: string; + value?: string; } export interface Style { - bold?: boolean; + bold?: boolean; client_highlight?: boolean; - code?: boolean; - highlight?: boolean; - italic?: boolean; - strike?: boolean; - unlink?: boolean; + code?: boolean; + highlight?: boolean; + italic?: boolean; + strike?: boolean; + unlink?: boolean; } export enum PurpleType { @@ -309,25 +309,25 @@ export enum FluffyType { } export interface Filter { - exclude_bot_users?: boolean; + exclude_bot_users?: boolean; exclude_external_shared_channels?: boolean; - include?: any[]; + include?: any[]; } export interface InitialOptionElement { description?: DescriptionElement; - text?: DescriptionElement; - url?: string; - value?: string; + text?: DescriptionElement; + url?: string; + value?: string; } export interface AccessoryOptionGroup { - label?: DescriptionElement; + label?: DescriptionElement; options?: InitialOptionElement[]; } export interface SlackFile { - id?: string; + id?: string; url?: string; } @@ -337,11 +337,11 @@ export interface Workflow { export interface Trigger { customizable_input_parameters?: CustomizableInputParameter[]; - url?: string; + url?: string; } export interface CustomizableInputParameter { - name?: string; + name?: string; value?: string; } @@ -363,263 +363,263 @@ export interface AttachmentField { } export interface FileElement { - access?: string; - alt_txt?: string; - app_id?: string; - app_name?: string; - attachments?: any[]; - blocks?: TitleBlockElement[]; - bot_id?: string; - can_toggle_canvas_lock?: boolean; - canvas_template_mode?: string; - cc?: Cc[]; - channel_actions_count?: number; - channel_actions_ts?: string; - channels?: string[]; - comments_count?: number; - converted_pdf?: string; - created?: number; - deanimate?: string; - deanimate_gif?: string; - display_as_bot?: boolean; - dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; - duration_ms?: number; - edit_link?: string; - edit_timestamp?: number; - editable?: boolean; - editor?: string; - editors?: string[]; - external_id?: string; - external_type?: string; - external_url?: string; - favorites?: Favorite[]; - file_access?: string; - filetype?: string; - from?: Cc[]; - groups?: string[]; - has_more?: boolean; - has_more_shares?: boolean; - has_rich_preview?: boolean; - headers?: Headers; - hls?: string; - hls_embed?: string; - id?: string; - image_exif_rotation?: number; - ims?: string[]; - initial_comment?: InitialComment; - is_channel_space?: boolean; - is_external?: boolean; - is_public?: boolean; - is_starred?: boolean; - last_editor?: string; - last_read?: number; - lines?: number; - lines_more?: number; - linked_channel_id?: string; - list_limits?: ListLimits; - list_metadata?: ListMetadata; - media_display_type?: string; - media_progress?: MediaProgress; - mimetype?: string; - mode?: string; - mp4?: string; - mp4_low?: string; - name?: string; - non_owner_editable?: boolean; - num_stars?: number; - org_or_workspace_access?: string; - original_attachment_count?: number; - original_h?: string; - original_w?: string; - permalink?: string; - permalink_public?: string; - pinned_to?: string[]; - pjpeg?: string; - plain_text?: string; - pretty_type?: string; - preview?: string; - preview_highlight?: string; - preview_is_truncated?: boolean; - preview_plain_text?: string; + access?: string; + alt_txt?: string; + app_id?: string; + app_name?: string; + attachments?: any[]; + blocks?: TitleBlockElement[]; + bot_id?: string; + can_toggle_canvas_lock?: boolean; + canvas_template_mode?: string; + cc?: Cc[]; + channel_actions_count?: number; + channel_actions_ts?: string; + channels?: string[]; + comments_count?: number; + converted_pdf?: string; + created?: number; + deanimate?: string; + deanimate_gif?: string; + display_as_bot?: boolean; + dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; + duration_ms?: number; + edit_link?: string; + edit_timestamp?: number; + editable?: boolean; + editor?: string; + editors?: string[]; + external_id?: string; + external_type?: string; + external_url?: string; + favorites?: Favorite[]; + file_access?: string; + filetype?: string; + from?: Cc[]; + groups?: string[]; + has_more?: boolean; + has_more_shares?: boolean; + has_rich_preview?: boolean; + headers?: Headers; + hls?: string; + hls_embed?: string; + id?: string; + image_exif_rotation?: number; + ims?: string[]; + initial_comment?: InitialComment; + is_channel_space?: boolean; + is_external?: boolean; + is_public?: boolean; + is_starred?: boolean; + last_editor?: string; + last_read?: number; + lines?: number; + lines_more?: number; + linked_channel_id?: string; + list_limits?: ListLimits; + list_metadata?: ListMetadata; + media_display_type?: string; + media_progress?: MediaProgress; + mimetype?: string; + mode?: string; + mp4?: string; + mp4_low?: string; + name?: string; + non_owner_editable?: boolean; + num_stars?: number; + org_or_workspace_access?: string; + original_attachment_count?: number; + original_h?: string; + original_w?: string; + permalink?: string; + permalink_public?: string; + pinned_to?: string[]; + pjpeg?: string; + plain_text?: string; + pretty_type?: string; + preview?: string; + preview_highlight?: string; + preview_is_truncated?: boolean; + preview_plain_text?: string; private_channels_with_file_access_count?: number; - private_file_with_access_count?: number; - public_url_shared?: boolean; - quip_thread_id?: string; - reactions?: Reaction[]; - saved?: Saved; - sent_to_self?: boolean; - shares?: Shares; - show_badge?: boolean; - simplified_html?: string; - size?: number; - source_team?: string; - subject?: string; - subtype?: string; - team_pref_version_history_enabled?: boolean; - teams_shared_with?: any[]; - template_conversion_ts?: number; - template_description?: string; - template_icon?: string; - template_name?: string; - template_title?: string; - thumb_1024?: string; - thumb_1024_gif?: string; - thumb_1024_h?: string; - thumb_1024_w?: string; - thumb_160?: string; - thumb_160_gif?: string; - thumb_160_h?: string; - thumb_160_w?: string; - thumb_360?: string; - thumb_360_gif?: string; - thumb_360_h?: string; - thumb_360_w?: string; - thumb_480?: string; - thumb_480_gif?: string; - thumb_480_h?: string; - thumb_480_w?: string; - thumb_64?: string; - thumb_64_gif?: string; - thumb_64_h?: string; - thumb_64_w?: string; - thumb_720?: string; - thumb_720_gif?: string; - thumb_720_h?: string; - thumb_720_w?: string; - thumb_80?: string; - thumb_800?: string; - thumb_800_gif?: string; - thumb_800_h?: string; - thumb_800_w?: string; - thumb_80_gif?: string; - thumb_80_h?: string; - thumb_80_w?: string; - thumb_960?: string; - thumb_960_gif?: string; - thumb_960_h?: string; - thumb_960_w?: string; - thumb_gif?: string; - thumb_pdf?: string; - thumb_pdf_h?: string; - thumb_pdf_w?: string; - thumb_tiny?: string; - thumb_video?: string; - thumb_video_h?: number; - thumb_video_w?: number; - timestamp?: number; - title?: string; - title_blocks?: TitleBlockElement[]; - to?: Cc[]; - transcription?: Transcription; - update_notification?: number; - updated?: number; - url_private?: string; - url_private_download?: string; - url_static_preview?: string; - user?: string; - user_team?: string; - username?: string; - vtt?: string; + private_file_with_access_count?: number; + public_url_shared?: boolean; + quip_thread_id?: string; + reactions?: Reaction[]; + saved?: Saved; + sent_to_self?: boolean; + shares?: Shares; + show_badge?: boolean; + simplified_html?: string; + size?: number; + source_team?: string; + subject?: string; + subtype?: string; + team_pref_version_history_enabled?: boolean; + teams_shared_with?: any[]; + template_conversion_ts?: number; + template_description?: string; + template_icon?: string; + template_name?: string; + template_title?: string; + thumb_1024?: string; + thumb_1024_gif?: string; + thumb_1024_h?: string; + thumb_1024_w?: string; + thumb_160?: string; + thumb_160_gif?: string; + thumb_160_h?: string; + thumb_160_w?: string; + thumb_360?: string; + thumb_360_gif?: string; + thumb_360_h?: string; + thumb_360_w?: string; + thumb_480?: string; + thumb_480_gif?: string; + thumb_480_h?: string; + thumb_480_w?: string; + thumb_64?: string; + thumb_64_gif?: string; + thumb_64_h?: string; + thumb_64_w?: string; + thumb_720?: string; + thumb_720_gif?: string; + thumb_720_h?: string; + thumb_720_w?: string; + thumb_80?: string; + thumb_800?: string; + thumb_800_gif?: string; + thumb_800_h?: string; + thumb_800_w?: string; + thumb_80_gif?: string; + thumb_80_h?: string; + thumb_80_w?: string; + thumb_960?: string; + thumb_960_gif?: string; + thumb_960_h?: string; + thumb_960_w?: string; + thumb_gif?: string; + thumb_pdf?: string; + thumb_pdf_h?: string; + thumb_pdf_w?: string; + thumb_tiny?: string; + thumb_video?: string; + thumb_video_h?: number; + thumb_video_w?: number; + timestamp?: number; + title?: string; + title_blocks?: TitleBlockElement[]; + to?: Cc[]; + transcription?: Transcription; + update_notification?: number; + updated?: number; + url_private?: string; + url_private_download?: string; + url_static_preview?: string; + user?: string; + user_team?: string; + username?: string; + vtt?: string; } export interface Cc { - address?: string; - name?: string; + address?: string; + name?: string; original?: string; } export interface DmMpdmUsersWithFileAccess { - access?: string; + access?: string; user_id?: string; } export interface Favorite { - collection_id?: string; + collection_id?: string; collection_name?: string; - position?: string; + position?: string; } export interface Headers { - date?: string; + date?: string; in_reply_to?: string; - message_id?: string; - reply_to?: string; + message_id?: string; + reply_to?: string; } export interface InitialComment { - channel?: string; - comment?: string; - created?: number; - id?: string; - is_intro?: boolean; + channel?: string; + comment?: string; + created?: number; + id?: string; + is_intro?: boolean; timestamp?: number; - user?: string; + user?: string; } export interface ListLimits { - column_count?: number; - column_count_limit?: number; + column_count?: number; + column_count_limit?: number; over_column_maximum?: boolean; - over_row_maximum?: boolean; - over_view_maximum?: boolean; - row_count?: number; - row_count_limit?: number; - view_count?: number; - view_count_limit?: number; + over_row_maximum?: boolean; + over_view_maximum?: boolean; + row_count?: number; + row_count_limit?: number; + view_count?: number; + view_count_limit?: number; } export interface ListMetadata { creation_source?: CreationSource; - description?: string; - icon?: string; - icon_team_id?: string; - icon_url?: string; - integrations?: string[]; - is_trial?: boolean; - schema?: Schema[]; - views?: View[]; + description?: string; + icon?: string; + icon_team_id?: string; + icon_url?: string; + integrations?: string[]; + is_trial?: boolean; + schema?: Schema[]; + views?: View[]; } export interface CreationSource { - reference_id?: string; - type?: string; + reference_id?: string; + type?: string; workflow_function_id?: string; } export interface Schema { - id?: string; + id?: string; is_primary_column?: boolean; - key?: string; - name?: string; - options?: Options; - type?: string; + key?: string; + name?: string; + options?: Options; + type?: string; } export interface Options { - canvas_id?: string; + canvas_id?: string; canvas_placeholder_mapping?: CanvasPlaceholderMapping[]; - choices?: Choice[]; - currency?: string; - currency_format?: string; - date_format?: string; - default_value?: string; - default_value_typed?: DefaultValueTyped; - emoji?: string; - emoji_team_id?: string; - for_assignment?: boolean; - format?: string; - linked_to?: string[]; - mark_as_done_when_checked?: boolean; - max?: number; - notify_users?: boolean; - precision?: number; - rounding?: string; - show_member_name?: boolean; - time_format?: string; + choices?: Choice[]; + currency?: string; + currency_format?: string; + date_format?: string; + default_value?: string; + default_value_typed?: DefaultValueTyped; + emoji?: string; + emoji_team_id?: string; + for_assignment?: boolean; + format?: string; + linked_to?: string[]; + mark_as_done_when_checked?: boolean; + max?: number; + notify_users?: boolean; + precision?: number; + rounding?: string; + show_member_name?: boolean; + time_format?: string; } export interface CanvasPlaceholderMapping { - column?: string; + column?: string; variable?: string; } @@ -634,64 +634,64 @@ export interface DefaultValueTyped { } export interface View { - columns?: Column[]; - created_by?: string; - date_created?: number; - id?: string; + columns?: Column[]; + created_by?: string; + date_created?: number; + id?: string; is_all_items_view?: boolean; - is_locked?: boolean; - name?: string; - position?: string; + is_locked?: boolean; + name?: string; + position?: string; stick_column_left?: boolean; - type?: string; + type?: string; } export interface Column { - id?: string; - key?: string; + id?: string; + key?: string; position?: string; - visible?: boolean; - width?: number; + visible?: boolean; + width?: number; } export interface MediaProgress { - duration_ms?: number; + duration_ms?: number; max_offset_ms?: number; - offset_ms?: number; + offset_ms?: number; } export interface Reaction { count?: number; - name?: string; - url?: string; + name?: string; + url?: string; users?: string[]; } export interface Saved { date_completed?: number; - date_due?: number; - is_archived?: boolean; - state?: string; + date_due?: number; + is_archived?: boolean; + state?: string; } export interface Shares { private?: { [key: string]: Private[] }; - public?: { [key: string]: Private[] }; + public?: { [key: string]: Private[] }; } export interface Private { - access?: string; - channel_name?: string; - date_last_shared?: number; - latest_reply?: string; - reply_count?: number; - reply_users?: string[]; + access?: string; + channel_name?: string; + date_last_shared?: number; + latest_reply?: string; + reply_count?: number; + reply_users?: string[]; reply_users_count?: number; - share_user_id?: string; - source?: string; - team_id?: string; - thread_ts?: string; - ts?: string; + share_user_id?: string; + source?: string; + team_id?: string; + thread_ts?: string; + ts?: string; } export interface Transcription { @@ -700,48 +700,47 @@ export interface Transcription { } export interface List { - channels?: string[]; - comments_count?: number; - created?: number; - display_as_bot?: boolean; - dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; - editable?: boolean; - external_type?: string; - file_access?: string; - filetype?: string; - groups?: string[]; - has_more_shares?: boolean; - has_rich_preview?: boolean; - id?: string; - ims?: string[]; - is_external?: boolean; - is_public?: boolean; - last_editor?: string; - list_limits?: ListLimits; - list_metadata?: ListMetadata; - mimetype?: string; - mode?: string; - name?: string; - permalink?: string; - permalink_public?: string; - pretty_type?: string; + channels?: string[]; + comments_count?: number; + created?: number; + display_as_bot?: boolean; + dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; + editable?: boolean; + external_type?: string; + file_access?: string; + filetype?: string; + groups?: string[]; + has_more_shares?: boolean; + has_rich_preview?: boolean; + id?: string; + ims?: string[]; + is_external?: boolean; + is_public?: boolean; + last_editor?: string; + list_limits?: ListLimits; + list_metadata?: ListMetadata; + mimetype?: string; + mode?: string; + name?: string; + permalink?: string; + permalink_public?: string; + pretty_type?: string; private_channels_with_file_access_count?: number; - private_file_with_access_count?: number; - public_url_shared?: boolean; - shares?: EventPayload; - size?: number; - timestamp?: number; - title?: string; - updated?: number; - url_private?: string; - url_private_download?: string; - user?: string; - user_team?: string; - username?: string; + private_file_with_access_count?: number; + public_url_shared?: boolean; + shares?: EventPayload; + size?: number; + timestamp?: number; + title?: string; + updated?: number; + url_private?: string; + url_private_download?: string; + user?: string; + user_team?: string; + username?: string; } -export interface EventPayload { -} +export type EventPayload = {}; export interface PurpleListRecord { record?: Record; @@ -749,90 +748,90 @@ export interface PurpleListRecord { } export interface Record { - fields?: RecordField[]; + fields?: RecordField[]; record_id?: string; } export interface RecordField { attachment?: any[]; - channel?: any[]; - checkbox?: boolean; - column_id?: string; - date?: any[]; - email?: any[]; - key?: string; - message?: FieldMessage; - number?: any[]; - phone?: any[]; - rating?: any[]; - rich_text?: any[]; - select?: any[]; - text?: string; - timestamp?: any[]; - user?: any[]; - value?: string; + channel?: any[]; + checkbox?: boolean; + column_id?: string; + date?: any[]; + email?: any[]; + key?: string; + message?: FieldMessage; + number?: any[]; + phone?: any[]; + rating?: any[]; + rich_text?: any[]; + select?: any[]; + text?: string; + timestamp?: any[]; + user?: any[]; + value?: string; } export interface FieldMessage { - app_id?: string; - attachments?: any[]; - blocks?: TitleBlockElement[]; - bot_id?: string; - bot_link?: string; - bot_profile?: BotProfile; - channel?: string; - client_msg_id?: string; - comment?: Comment; - display_as_bot?: boolean; - edited?: Edited; - file?: MessageFile; - files?: any[]; - hidden?: boolean; - icons?: PurpleIcons; - inviter?: string; - is_intro?: boolean; - is_locked?: boolean; - is_starred?: boolean; + app_id?: string; + attachments?: any[]; + blocks?: TitleBlockElement[]; + bot_id?: string; + bot_link?: string; + bot_profile?: BotProfile; + channel?: string; + client_msg_id?: string; + comment?: Comment; + display_as_bot?: boolean; + edited?: Edited; + file?: MessageFile; + files?: any[]; + hidden?: boolean; + icons?: PurpleIcons; + inviter?: string; + is_intro?: boolean; + is_locked?: boolean; + is_starred?: boolean; is_thread_broadcast?: boolean; - item?: Comment; - item_type?: string; - last_read?: string; - latest_reply?: string; - metadata?: PurpleMetadata; - no_notifications?: boolean; - parent_user_id?: string; - pinned_to?: any[]; - purpose?: string; - reactions?: any[]; - replies?: any[]; - reply_count?: number; - reply_users?: any[]; - reply_users_count?: number; - room?: Room; - root?: PurpleRoot; - subscribed?: boolean; - subtype?: string; - team?: string; - text?: string; - thread_ts?: string; - topic?: string; - ts?: string; - type?: string; - unfurl_links?: boolean; - unfurl_media?: boolean; - upload?: boolean; - user?: string; - username?: string; - wibblr?: boolean; - x_files?: any[]; + item?: Comment; + item_type?: string; + last_read?: string; + latest_reply?: string; + metadata?: PurpleMetadata; + no_notifications?: boolean; + parent_user_id?: string; + pinned_to?: any[]; + purpose?: string; + reactions?: any[]; + replies?: any[]; + reply_count?: number; + reply_users?: any[]; + reply_users_count?: number; + room?: Room; + root?: PurpleRoot; + subscribed?: boolean; + subtype?: string; + team?: string; + text?: string; + thread_ts?: string; + topic?: string; + ts?: string; + type?: string; + unfurl_links?: boolean; + unfurl_media?: boolean; + upload?: boolean; + user?: string; + username?: string; + wibblr?: boolean; + x_files?: any[]; } export interface BotProfile { - app_id?: string; + app_id?: string; deleted?: boolean; - icons?: BotProfileIcons; - id?: string; - name?: string; + icons?: BotProfileIcons; + id?: string; + name?: string; team_id?: string; updated?: number; } @@ -844,208 +843,208 @@ export interface BotProfileIcons { } export interface Comment { - comment?: string; - created?: string; - display_as_bot?: boolean; - edit_link?: string; - editable?: boolean; - external_type?: string; - filetype?: string; - has_rich_preview?: boolean; - id?: string; - is_external?: boolean; - is_intro?: boolean; - is_public?: boolean; - is_starred?: boolean; - lines?: number; - lines_more?: number; - media_display_type?: string; - mimetype?: string; - mode?: string; - name?: string; - permalink?: string; - permalink_public?: boolean; - pretty_type?: string; - preview?: string; - preview_highlight?: string; + comment?: string; + created?: string; + display_as_bot?: boolean; + edit_link?: string; + editable?: boolean; + external_type?: string; + filetype?: string; + has_rich_preview?: boolean; + id?: string; + is_external?: boolean; + is_intro?: boolean; + is_public?: boolean; + is_starred?: boolean; + lines?: number; + lines_more?: number; + media_display_type?: string; + mimetype?: string; + mode?: string; + name?: string; + permalink?: string; + permalink_public?: boolean; + pretty_type?: string; + preview?: string; + preview_highlight?: string; preview_is_truncated?: boolean; - public_url_shared?: boolean; - size?: number; - timestamp?: string; - title?: string; - url_private?: string; + public_url_shared?: boolean; + size?: number; + timestamp?: string; + title?: string; + url_private?: string; url_private_download?: boolean; - user?: string; - username?: string; + user?: string; + username?: string; } export interface Edited { - ts?: string; + ts?: string; user?: string; } export interface MessageFile { - access?: string; - alt_txt?: string; - app_id?: string; - app_name?: string; - attachments?: any[]; - blocks?: any[]; - bot_id?: string; - can_toggle_canvas_lock?: boolean; - canvas_template_mode?: string; - cc?: any[]; - channel_actions_count?: number; - channel_actions_ts?: string; - channels?: any[]; - comments_count?: number; - converted_pdf?: string; - created?: number; - deanimate?: string; - deanimate_gif?: string; - display_as_bot?: boolean; - dm_mpdm_users_with_file_access?: any[]; - duration_ms?: number; - edit_link?: string; - edit_timestamp?: number; - editable?: boolean; - editor?: string; - editors?: any[]; - external_id?: string; - external_type?: string; - external_url?: string; - favorites?: any[]; - file_access?: string; - filetype?: string; - from?: any[]; - groups?: any[]; - has_more?: boolean; - has_more_shares?: boolean; - has_rich_preview?: boolean; - headers?: Headers; - hls?: string; - hls_embed?: string; - id?: string; - image_exif_rotation?: number; - ims?: any[]; - initial_comment?: InitialComment; - is_channel_space?: boolean; - is_external?: boolean; - is_public?: boolean; - is_starred?: boolean; - last_editor?: string; - last_read?: number; - lines?: number; - lines_more?: number; - linked_channel_id?: string; - list_limits?: ListLimits; - list_metadata?: ListMetadata; - media_display_type?: string; - media_progress?: MediaProgress; - mimetype?: string; - mode?: string; - mp4?: string; - mp4_low?: string; - name?: string; - non_owner_editable?: boolean; - num_stars?: number; - org_or_workspace_access?: string; - original_attachment_count?: number; - original_h?: string; - original_w?: string; - permalink?: string; - permalink_public?: string; - pinned_to?: any[]; - pjpeg?: string; - plain_text?: string; - pretty_type?: string; - preview?: string; - preview_highlight?: string; - preview_is_truncated?: boolean; - preview_plain_text?: string; + access?: string; + alt_txt?: string; + app_id?: string; + app_name?: string; + attachments?: any[]; + blocks?: any[]; + bot_id?: string; + can_toggle_canvas_lock?: boolean; + canvas_template_mode?: string; + cc?: any[]; + channel_actions_count?: number; + channel_actions_ts?: string; + channels?: any[]; + comments_count?: number; + converted_pdf?: string; + created?: number; + deanimate?: string; + deanimate_gif?: string; + display_as_bot?: boolean; + dm_mpdm_users_with_file_access?: any[]; + duration_ms?: number; + edit_link?: string; + edit_timestamp?: number; + editable?: boolean; + editor?: string; + editors?: any[]; + external_id?: string; + external_type?: string; + external_url?: string; + favorites?: any[]; + file_access?: string; + filetype?: string; + from?: any[]; + groups?: any[]; + has_more?: boolean; + has_more_shares?: boolean; + has_rich_preview?: boolean; + headers?: Headers; + hls?: string; + hls_embed?: string; + id?: string; + image_exif_rotation?: number; + ims?: any[]; + initial_comment?: InitialComment; + is_channel_space?: boolean; + is_external?: boolean; + is_public?: boolean; + is_starred?: boolean; + last_editor?: string; + last_read?: number; + lines?: number; + lines_more?: number; + linked_channel_id?: string; + list_limits?: ListLimits; + list_metadata?: ListMetadata; + media_display_type?: string; + media_progress?: MediaProgress; + mimetype?: string; + mode?: string; + mp4?: string; + mp4_low?: string; + name?: string; + non_owner_editable?: boolean; + num_stars?: number; + org_or_workspace_access?: string; + original_attachment_count?: number; + original_h?: string; + original_w?: string; + permalink?: string; + permalink_public?: string; + pinned_to?: any[]; + pjpeg?: string; + plain_text?: string; + pretty_type?: string; + preview?: string; + preview_highlight?: string; + preview_is_truncated?: boolean; + preview_plain_text?: string; private_channels_with_file_access_count?: number; - private_file_with_access_count?: number; - public_url_shared?: boolean; - quip_thread_id?: string; - reactions?: any[]; - saved?: Saved; - sent_to_self?: boolean; - shares?: EventPayload; - show_badge?: boolean; - simplified_html?: string; - size?: number; - source_team?: string; - subject?: string; - subtype?: string; - team_pref_version_history_enabled?: boolean; - teams_shared_with?: any[]; - template_conversion_ts?: number; - template_description?: string; - template_icon?: string; - template_name?: string; - template_title?: string; - thumb_1024?: string; - thumb_1024_gif?: string; - thumb_1024_h?: string; - thumb_1024_w?: string; - thumb_160?: string; - thumb_160_gif?: string; - thumb_160_h?: string; - thumb_160_w?: string; - thumb_360?: string; - thumb_360_gif?: string; - thumb_360_h?: string; - thumb_360_w?: string; - thumb_480?: string; - thumb_480_gif?: string; - thumb_480_h?: string; - thumb_480_w?: string; - thumb_64?: string; - thumb_64_gif?: string; - thumb_64_h?: string; - thumb_64_w?: string; - thumb_720?: string; - thumb_720_gif?: string; - thumb_720_h?: string; - thumb_720_w?: string; - thumb_80?: string; - thumb_800?: string; - thumb_800_gif?: string; - thumb_800_h?: string; - thumb_800_w?: string; - thumb_80_gif?: string; - thumb_80_h?: string; - thumb_80_w?: string; - thumb_960?: string; - thumb_960_gif?: string; - thumb_960_h?: string; - thumb_960_w?: string; - thumb_gif?: string; - thumb_pdf?: string; - thumb_pdf_h?: string; - thumb_pdf_w?: string; - thumb_tiny?: string; - thumb_video?: string; - thumb_video_h?: number; - thumb_video_w?: number; - timestamp?: number; - title?: string; - title_blocks?: any[]; - to?: any[]; - transcription?: Transcription; - update_notification?: number; - updated?: number; - url_private?: string; - url_private_download?: string; - url_static_preview?: string; - user?: string; - user_team?: string; - username?: string; - vtt?: string; + private_file_with_access_count?: number; + public_url_shared?: boolean; + quip_thread_id?: string; + reactions?: any[]; + saved?: Saved; + sent_to_self?: boolean; + shares?: EventPayload; + show_badge?: boolean; + simplified_html?: string; + size?: number; + source_team?: string; + subject?: string; + subtype?: string; + team_pref_version_history_enabled?: boolean; + teams_shared_with?: any[]; + template_conversion_ts?: number; + template_description?: string; + template_icon?: string; + template_name?: string; + template_title?: string; + thumb_1024?: string; + thumb_1024_gif?: string; + thumb_1024_h?: string; + thumb_1024_w?: string; + thumb_160?: string; + thumb_160_gif?: string; + thumb_160_h?: string; + thumb_160_w?: string; + thumb_360?: string; + thumb_360_gif?: string; + thumb_360_h?: string; + thumb_360_w?: string; + thumb_480?: string; + thumb_480_gif?: string; + thumb_480_h?: string; + thumb_480_w?: string; + thumb_64?: string; + thumb_64_gif?: string; + thumb_64_h?: string; + thumb_64_w?: string; + thumb_720?: string; + thumb_720_gif?: string; + thumb_720_h?: string; + thumb_720_w?: string; + thumb_80?: string; + thumb_800?: string; + thumb_800_gif?: string; + thumb_800_h?: string; + thumb_800_w?: string; + thumb_80_gif?: string; + thumb_80_h?: string; + thumb_80_w?: string; + thumb_960?: string; + thumb_960_gif?: string; + thumb_960_h?: string; + thumb_960_w?: string; + thumb_gif?: string; + thumb_pdf?: string; + thumb_pdf_h?: string; + thumb_pdf_w?: string; + thumb_tiny?: string; + thumb_video?: string; + thumb_video_h?: number; + thumb_video_w?: number; + timestamp?: number; + title?: string; + title_blocks?: any[]; + to?: any[]; + transcription?: Transcription; + update_notification?: number; + updated?: number; + url_private?: string; + url_private_download?: string; + url_static_preview?: string; + user?: string; + user_team?: string; + username?: string; + vtt?: string; } export interface PurpleIcons { - emoji?: string; + emoji?: string; image_36?: string; image_48?: string; image_64?: string; @@ -1057,80 +1056,80 @@ export interface PurpleMetadata { } export interface Room { - app_id?: string; - attached_file_ids?: string[]; - background_id?: string; - call_family?: string; - canvas_background?: string; - canvas_thread_ts?: string; - channels?: string[]; - created_by?: string; - date_end?: number; - date_start?: number; - display_id?: string; - external_unique_id?: string; - has_ended?: boolean; - id?: string; - is_dm_call?: boolean; - is_prewarmed?: boolean; - is_scheduled?: boolean; - knocks?: EventPayload; - last_invite_status_by_user?: EventPayload; - media_backend_type?: string; - media_server?: string; - name?: string; - participant_history?: string[]; - participants?: string[]; - participants_camera_off?: string[]; - participants_camera_on?: string[]; + app_id?: string; + attached_file_ids?: string[]; + background_id?: string; + call_family?: string; + canvas_background?: string; + canvas_thread_ts?: string; + channels?: string[]; + created_by?: string; + date_end?: number; + date_start?: number; + display_id?: string; + external_unique_id?: string; + has_ended?: boolean; + id?: string; + is_dm_call?: boolean; + is_prewarmed?: boolean; + is_scheduled?: boolean; + knocks?: EventPayload; + last_invite_status_by_user?: EventPayload; + media_backend_type?: string; + media_server?: string; + name?: string; + participant_history?: string[]; + participants?: string[]; + participants_camera_off?: string[]; + participants_camera_on?: string[]; participants_screenshare_off?: string[]; - participants_screenshare_on?: string[]; - pending_invitees?: EventPayload; - thread_root_ts?: string; - was_accepted?: boolean; - was_missed?: boolean; - was_rejected?: boolean; + participants_screenshare_on?: string[]; + pending_invitees?: EventPayload; + thread_root_ts?: string; + was_accepted?: boolean; + was_missed?: boolean; + was_rejected?: boolean; } export interface PurpleRoot { - bot_id?: string; - bot_profile?: BotProfile; - edited?: Edited; - icons?: PurpleIcons; - last_read?: string; - latest_reply?: string; - mrkdwn?: boolean; - no_notifications?: boolean; - parent_user_id?: string; - replies?: any[]; - reply_count?: number; - reply_users?: any[]; + bot_id?: string; + bot_profile?: BotProfile; + edited?: Edited; + icons?: PurpleIcons; + last_read?: string; + latest_reply?: string; + mrkdwn?: boolean; + no_notifications?: boolean; + parent_user_id?: string; + replies?: any[]; + reply_count?: number; + reply_users?: any[]; reply_users_count?: number; - room?: Room; - subscribed?: boolean; - subtype?: string; - team?: string; - text?: string; - thread_ts?: string; - ts?: string; - type?: string; - unread_count?: number; - user?: string; - username?: string; + room?: Room; + subscribed?: boolean; + subtype?: string; + team?: string; + text?: string; + thread_ts?: string; + ts?: string; + type?: string; + unread_count?: number; + user?: string; + username?: string; } export interface ListRecordElement { - created_by?: string; - date_created?: number; - fields?: RecordField[]; - id?: string; - is_subscribed?: boolean; - list_id?: string; - platform_refs?: PlatformRefs; - position?: string; - saved?: Saved; - thread_ts?: string; - updated_by?: string; + created_by?: string; + date_created?: number; + fields?: RecordField[]; + id?: string; + is_subscribed?: boolean; + list_id?: string; + platform_refs?: PlatformRefs; + position?: string; + saved?: Saved; + thread_ts?: string; + updated_by?: string; updated_timestamp?: string; } @@ -1143,155 +1142,155 @@ export interface PlatformRefs { export interface MessageBlock { channel?: string; message?: FieldMessage; - team?: string; - ts?: string; + team?: string; + ts?: string; } export interface AttachmentMetadata { - extension?: string; - format?: string; - original_h?: number; - original_w?: number; - rotation?: number; - thumb_160?: boolean; + extension?: string; + format?: string; + original_h?: number; + original_w?: number; + rotation?: number; + thumb_160?: boolean; thumb_360_h?: number; thumb_360_w?: number; - thumb_64?: boolean; - thumb_80?: boolean; - thumb_tiny?: string; + thumb_64?: boolean; + thumb_80?: boolean; + thumb_tiny?: string; } export interface Preview { can_remove?: boolean; - icon_url?: string; - subtitle?: DescriptionElement; - title?: DescriptionElement; - type?: string; + icon_url?: string; + subtitle?: DescriptionElement; + title?: DescriptionElement; + type?: string; } export interface PurpleBlock { - accessory?: Accessory; - alt_text?: string; - api_decoration_available?: boolean; - app_collaborators?: string[]; - app_id?: string; - author_name?: string; - block_id?: string; - bot_user_id?: string; - button_label?: string; - call?: Call; - call_id?: string; - description?: DescriptionElement; - developer_trace_id?: string; - dispatch_action?: boolean; - element?: Accessory; - elements?: Accessory[]; - external_id?: string; - fallback?: string; - fields?: DescriptionElement[]; - file?: FileElement; - file_id?: string; - function_trigger_id?: string; - hint?: DescriptionElement; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - is_animated?: boolean; - is_workflow_app?: boolean; - label?: DescriptionElement; - optional?: boolean; - owning_team_id?: string; - provider_icon_url?: string; - provider_name?: string; + accessory?: Accessory; + alt_text?: string; + api_decoration_available?: boolean; + app_collaborators?: string[]; + app_id?: string; + author_name?: string; + block_id?: string; + bot_user_id?: string; + button_label?: string; + call?: Call; + call_id?: string; + description?: DescriptionElement; + developer_trace_id?: string; + dispatch_action?: boolean; + element?: Accessory; + elements?: Accessory[]; + external_id?: string; + fallback?: string; + fields?: DescriptionElement[]; + file?: FileElement; + file_id?: string; + function_trigger_id?: string; + hint?: DescriptionElement; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + is_animated?: boolean; + is_workflow_app?: boolean; + label?: DescriptionElement; + optional?: boolean; + owning_team_id?: string; + provider_icon_url?: string; + provider_name?: string; sales_home_workflow_app_type?: number; - share_url?: string; - slack_file?: SlackFile; - source?: string; - text?: DescriptionElement; - thumbnail_url?: string; - title?: DescriptionElement; - title_url?: string; - trigger_subtype?: string; - trigger_type?: string; - type?: BlockType; - url?: string; - video_url?: string; - workflow_id?: string; + share_url?: string; + slack_file?: SlackFile; + source?: string; + text?: DescriptionElement; + thumbnail_url?: string; + title?: DescriptionElement; + title_url?: string; + trigger_subtype?: string; + trigger_type?: string; + type?: BlockType; + url?: string; + video_url?: string; + workflow_id?: string; } export interface Call { media_backend_type?: string; - v1?: V1; + v1?: V1; } export interface V1 { - active_participants?: Participant[]; - all_participants?: Participant[]; - app_icon_urls?: AppIconUrls; - app_id?: string; - channels?: string[]; - created_by?: string; - date_end?: number; - date_start?: number; + active_participants?: Participant[]; + all_participants?: Participant[]; + app_icon_urls?: AppIconUrls; + app_id?: string; + channels?: string[]; + created_by?: string; + date_end?: number; + date_start?: number; desktop_app_join_url?: string; - display_id?: string; - has_ended?: boolean; - id?: string; - is_dm_call?: boolean; - join_url?: string; - name?: string; - was_accepted?: boolean; - was_missed?: boolean; - was_rejected?: boolean; + display_id?: string; + has_ended?: boolean; + id?: string; + is_dm_call?: boolean; + join_url?: string; + name?: string; + was_accepted?: boolean; + was_missed?: boolean; + was_rejected?: boolean; } export interface Participant { - avatar_url?: string; + avatar_url?: string; display_name?: string; - external_id?: string; - slack_id?: string; + external_id?: string; + slack_id?: string; } export interface AppIconUrls { - image_1024?: string; - image_128?: string; - image_192?: string; - image_32?: string; - image_36?: string; - image_48?: string; - image_512?: string; - image_64?: string; - image_72?: string; - image_96?: string; + image_1024?: string; + image_128?: string; + image_192?: string; + image_32?: string; + image_36?: string; + image_48?: string; + image_512?: string; + image_64?: string; + image_72?: string; + image_96?: string; image_original?: string; } export interface FluffyIcons { - emoji?: string; + emoji?: string; image_64?: string; } export interface FluffyMetadata { event_payload?: EventPayload; - event_type?: string; + event_type?: string; } export interface FluffyRoot { - bot_id?: string; - icons?: FluffyIcons; - latest_reply?: string; - parent_user_id?: string; - reply_count?: number; - reply_users?: string[]; + bot_id?: string; + icons?: FluffyIcons; + latest_reply?: string; + parent_user_id?: string; + reply_count?: number; + reply_users?: string[]; reply_users_count?: number; - subscribed?: boolean; - subtype?: string; - text?: string; - thread_ts?: string; - ts?: string; - type?: string; - username?: string; + subscribed?: boolean; + subtype?: string; + text?: string; + thread_ts?: string; + ts?: string; + type?: string; + username?: string; } export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/ChatScheduleMessageResponse.ts b/packages/web-api/src/types/response/ChatScheduleMessageResponse.ts index 33e7d2e8e..ca906d779 100644 --- a/packages/web-api/src/types/response/ChatScheduleMessageResponse.ts +++ b/packages/web-api/src/types/response/ChatScheduleMessageResponse.ts @@ -8,139 +8,139 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ChatScheduleMessageResponse = WebAPICallResult & { - channel?: string; - error?: string; - message?: Message; - needed?: string; - ok?: boolean; - post_at?: number; - provided?: string; - response_metadata?: ResponseMetadata; + channel?: string; + error?: string; + message?: Message; + needed?: string; + ok?: boolean; + post_at?: number; + provided?: string; + response_metadata?: ResponseMetadata; scheduled_message_id?: string; }; export interface Message { - app_id?: string; - blocks?: MessageBlock[]; - bot_id?: string; + app_id?: string; + blocks?: MessageBlock[]; + bot_id?: string; bot_profile?: BotProfile; - metadata?: Metadata; - room?: Room; - team?: string; - text?: string; - type?: string; - user?: string; + metadata?: Metadata; + room?: Room; + team?: string; + text?: string; + type?: string; + user?: string; } export interface MessageBlock { - accessory?: Accessory; - alt_text?: string; - api_decoration_available?: boolean; - app_collaborators?: string[]; - app_id?: string; - author_name?: string; - block_id?: string; - bot_user_id?: string; - button_label?: string; - call?: Call; - call_id?: string; - description?: DescriptionElement; - developer_trace_id?: string; - dispatch_action?: boolean; - element?: Accessory; - elements?: Accessory[]; - external_id?: string; - fallback?: string; - fields?: DescriptionElement[]; - file?: File; - file_id?: string; - function_trigger_id?: string; - hint?: DescriptionElement; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - is_animated?: boolean; - is_workflow_app?: boolean; - label?: DescriptionElement; - optional?: boolean; - owning_team_id?: string; - provider_icon_url?: string; - provider_name?: string; + accessory?: Accessory; + alt_text?: string; + api_decoration_available?: boolean; + app_collaborators?: string[]; + app_id?: string; + author_name?: string; + block_id?: string; + bot_user_id?: string; + button_label?: string; + call?: Call; + call_id?: string; + description?: DescriptionElement; + developer_trace_id?: string; + dispatch_action?: boolean; + element?: Accessory; + elements?: Accessory[]; + external_id?: string; + fallback?: string; + fields?: DescriptionElement[]; + file?: File; + file_id?: string; + function_trigger_id?: string; + hint?: DescriptionElement; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + is_animated?: boolean; + is_workflow_app?: boolean; + label?: DescriptionElement; + optional?: boolean; + owning_team_id?: string; + provider_icon_url?: string; + provider_name?: string; sales_home_workflow_app_type?: number; - share_url?: string; - slack_file?: SlackFile; - source?: string; - text?: DescriptionElement; - thumbnail_url?: string; - title?: DescriptionElement; - title_url?: string; - trigger_subtype?: string; - trigger_type?: string; - type?: string; - url?: string; - video_url?: string; - workflow_id?: string; + share_url?: string; + slack_file?: SlackFile; + source?: string; + text?: DescriptionElement; + thumbnail_url?: string; + title?: DescriptionElement; + title_url?: string; + trigger_subtype?: string; + trigger_type?: string; + type?: string; + url?: string; + video_url?: string; + workflow_id?: string; } export interface Accessory { - accessibility_label?: string; - action_id?: string; - alt_text?: string; - border?: number; - confirm?: Confirm; + accessibility_label?: string; + action_id?: string; + alt_text?: string; + border?: number; + confirm?: Confirm; default_to_current_conversation?: boolean; - elements?: AccessoryElement[]; - fallback?: string; - filter?: Filter; - focus_on_load?: boolean; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - indent?: number; - initial_channel?: string; - initial_channels?: string[]; - initial_conversation?: string; - initial_conversations?: string[]; - initial_date?: string; - initial_date_time?: number; - initial_option?: Option; - initial_options?: Option[]; - initial_time?: string; - initial_user?: string; - initial_users?: string[]; - max_selected_items?: number; - min_query_length?: number; - offset?: number; - option_groups?: OptionGroup[]; - options?: Option[]; - placeholder?: DescriptionElement; - response_url_enabled?: boolean; - slack_file?: SlackFile; - style?: string; - text?: DescriptionElement; - timezone?: string; - type?: string; - url?: string; - value?: string; - workflow?: Workflow; + elements?: AccessoryElement[]; + fallback?: string; + filter?: Filter; + focus_on_load?: boolean; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + indent?: number; + initial_channel?: string; + initial_channels?: string[]; + initial_conversation?: string; + initial_conversations?: string[]; + initial_date?: string; + initial_date_time?: number; + initial_option?: Option; + initial_options?: Option[]; + initial_time?: string; + initial_user?: string; + initial_users?: string[]; + max_selected_items?: number; + min_query_length?: number; + offset?: number; + option_groups?: OptionGroup[]; + options?: Option[]; + placeholder?: DescriptionElement; + response_url_enabled?: boolean; + slack_file?: SlackFile; + style?: string; + text?: DescriptionElement; + timezone?: string; + type?: string; + url?: string; + value?: string; + workflow?: Workflow; } export interface Confirm { confirm?: DescriptionElement; - deny?: DescriptionElement; - style?: string; - text?: DescriptionElement; - title?: DescriptionElement; + deny?: DescriptionElement; + style?: string; + text?: DescriptionElement; + title?: DescriptionElement; } export interface DescriptionElement { - emoji?: boolean; - text?: string; - type?: DescriptionType; + emoji?: boolean; + text?: string; + type?: DescriptionType; verbatim?: boolean; } @@ -150,42 +150,42 @@ export enum DescriptionType { } export interface AccessoryElement { - border?: number; + border?: number; elements?: PurpleElement[]; - indent?: number; - offset?: number; - style?: string; - type?: FluffyType; + indent?: number; + offset?: number; + style?: string; + type?: FluffyType; } export interface PurpleElement { - channel_id?: string; - fallback?: string; - format?: string; - name?: string; - range?: string; - skin_tone?: number; - style?: Style; - team_id?: string; - text?: string; - timestamp?: string; - type?: PurpleType; - unicode?: string; - unsafe?: boolean; - url?: string; - user_id?: string; + channel_id?: string; + fallback?: string; + format?: string; + name?: string; + range?: string; + skin_tone?: number; + style?: Style; + team_id?: string; + text?: string; + timestamp?: string; + type?: PurpleType; + unicode?: string; + unsafe?: boolean; + url?: string; + user_id?: string; usergroup_id?: string; - value?: string; + value?: string; } export interface Style { - bold?: boolean; + bold?: boolean; client_highlight?: boolean; - code?: boolean; - highlight?: boolean; - italic?: boolean; - strike?: boolean; - unlink?: boolean; + code?: boolean; + highlight?: boolean; + italic?: boolean; + strike?: boolean; + unlink?: boolean; } export enum PurpleType { @@ -209,25 +209,25 @@ export enum FluffyType { } export interface Filter { - exclude_bot_users?: boolean; + exclude_bot_users?: boolean; exclude_external_shared_channels?: boolean; - include?: any[]; + include?: any[]; } export interface Option { description?: DescriptionElement; - text?: DescriptionElement; - url?: string; - value?: string; + text?: DescriptionElement; + url?: string; + value?: string; } export interface OptionGroup { - label?: DescriptionElement; + label?: DescriptionElement; options?: Option[]; } export interface SlackFile { - id?: string; + id?: string; url?: string; } @@ -237,358 +237,358 @@ export interface Workflow { export interface Trigger { customizable_input_parameters?: CustomizableInputParameter[]; - url?: string; + url?: string; } export interface CustomizableInputParameter { - name?: string; + name?: string; value?: string; } export interface Call { media_backend_type?: string; - v1?: V1; + v1?: V1; } export interface V1 { - active_participants?: Participant[]; - all_participants?: Participant[]; - app_icon_urls?: AppIconUrls; - app_id?: string; - channels?: string[]; - created_by?: string; - date_end?: number; - date_start?: number; + active_participants?: Participant[]; + all_participants?: Participant[]; + app_icon_urls?: AppIconUrls; + app_id?: string; + channels?: string[]; + created_by?: string; + date_end?: number; + date_start?: number; desktop_app_join_url?: string; - display_id?: string; - has_ended?: boolean; - id?: string; - is_dm_call?: boolean; - join_url?: string; - name?: string; - was_accepted?: boolean; - was_missed?: boolean; - was_rejected?: boolean; + display_id?: string; + has_ended?: boolean; + id?: string; + is_dm_call?: boolean; + join_url?: string; + name?: string; + was_accepted?: boolean; + was_missed?: boolean; + was_rejected?: boolean; } export interface Participant { - avatar_url?: string; + avatar_url?: string; display_name?: string; - external_id?: string; - slack_id?: string; + external_id?: string; + slack_id?: string; } export interface AppIconUrls { - image_1024?: string; - image_128?: string; - image_192?: string; - image_32?: string; - image_36?: string; - image_48?: string; - image_512?: string; - image_64?: string; - image_72?: string; - image_96?: string; + image_1024?: string; + image_128?: string; + image_192?: string; + image_32?: string; + image_36?: string; + image_48?: string; + image_512?: string; + image_64?: string; + image_72?: string; + image_96?: string; image_original?: string; } export interface File { - access?: string; - alt_txt?: string; - app_id?: string; - app_name?: string; - attachments?: any[]; - blocks?: TitleBlockElement[]; - bot_id?: string; - can_toggle_canvas_lock?: boolean; - canvas_template_mode?: string; - cc?: Cc[]; - channel_actions_count?: number; - channel_actions_ts?: string; - channels?: string[]; - comments_count?: number; - converted_pdf?: string; - created?: number; - deanimate?: string; - deanimate_gif?: string; - display_as_bot?: boolean; - dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; - duration_ms?: number; - edit_link?: string; - edit_timestamp?: number; - editable?: boolean; - editor?: string; - editors?: string[]; - external_id?: string; - external_type?: string; - external_url?: string; - favorites?: Favorite[]; - file_access?: string; - filetype?: string; - from?: Cc[]; - groups?: string[]; - has_more?: boolean; - has_more_shares?: boolean; - has_rich_preview?: boolean; - headers?: Headers; - hls?: string; - hls_embed?: string; - id?: string; - image_exif_rotation?: number; - ims?: string[]; - initial_comment?: InitialComment; - is_channel_space?: boolean; - is_external?: boolean; - is_public?: boolean; - is_starred?: boolean; - last_editor?: string; - last_read?: number; - lines?: number; - lines_more?: number; - linked_channel_id?: string; - list_limits?: ListLimits; - list_metadata?: ListMetadata; - media_display_type?: string; - media_progress?: MediaProgress; - mimetype?: string; - mode?: string; - mp4?: string; - mp4_low?: string; - name?: string; - non_owner_editable?: boolean; - num_stars?: number; - org_or_workspace_access?: string; - original_attachment_count?: number; - original_h?: string; - original_w?: string; - permalink?: string; - permalink_public?: string; - pinned_to?: string[]; - pjpeg?: string; - plain_text?: string; - pretty_type?: string; - preview?: string; - preview_highlight?: string; - preview_is_truncated?: boolean; - preview_plain_text?: string; + access?: string; + alt_txt?: string; + app_id?: string; + app_name?: string; + attachments?: any[]; + blocks?: TitleBlockElement[]; + bot_id?: string; + can_toggle_canvas_lock?: boolean; + canvas_template_mode?: string; + cc?: Cc[]; + channel_actions_count?: number; + channel_actions_ts?: string; + channels?: string[]; + comments_count?: number; + converted_pdf?: string; + created?: number; + deanimate?: string; + deanimate_gif?: string; + display_as_bot?: boolean; + dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; + duration_ms?: number; + edit_link?: string; + edit_timestamp?: number; + editable?: boolean; + editor?: string; + editors?: string[]; + external_id?: string; + external_type?: string; + external_url?: string; + favorites?: Favorite[]; + file_access?: string; + filetype?: string; + from?: Cc[]; + groups?: string[]; + has_more?: boolean; + has_more_shares?: boolean; + has_rich_preview?: boolean; + headers?: Headers; + hls?: string; + hls_embed?: string; + id?: string; + image_exif_rotation?: number; + ims?: string[]; + initial_comment?: InitialComment; + is_channel_space?: boolean; + is_external?: boolean; + is_public?: boolean; + is_starred?: boolean; + last_editor?: string; + last_read?: number; + lines?: number; + lines_more?: number; + linked_channel_id?: string; + list_limits?: ListLimits; + list_metadata?: ListMetadata; + media_display_type?: string; + media_progress?: MediaProgress; + mimetype?: string; + mode?: string; + mp4?: string; + mp4_low?: string; + name?: string; + non_owner_editable?: boolean; + num_stars?: number; + org_or_workspace_access?: string; + original_attachment_count?: number; + original_h?: string; + original_w?: string; + permalink?: string; + permalink_public?: string; + pinned_to?: string[]; + pjpeg?: string; + plain_text?: string; + pretty_type?: string; + preview?: string; + preview_highlight?: string; + preview_is_truncated?: boolean; + preview_plain_text?: string; private_channels_with_file_access_count?: number; - private_file_with_access_count?: number; - public_url_shared?: boolean; - quip_thread_id?: string; - reactions?: Reaction[]; - saved?: Saved; - sent_to_self?: boolean; - shares?: Shares; - show_badge?: boolean; - simplified_html?: string; - size?: number; - source_team?: string; - subject?: string; - subtype?: string; - team_pref_version_history_enabled?: boolean; - teams_shared_with?: any[]; - template_conversion_ts?: number; - template_description?: string; - template_icon?: string; - template_name?: string; - template_title?: string; - thumb_1024?: string; - thumb_1024_gif?: string; - thumb_1024_h?: string; - thumb_1024_w?: string; - thumb_160?: string; - thumb_160_gif?: string; - thumb_160_h?: string; - thumb_160_w?: string; - thumb_360?: string; - thumb_360_gif?: string; - thumb_360_h?: string; - thumb_360_w?: string; - thumb_480?: string; - thumb_480_gif?: string; - thumb_480_h?: string; - thumb_480_w?: string; - thumb_64?: string; - thumb_64_gif?: string; - thumb_64_h?: string; - thumb_64_w?: string; - thumb_720?: string; - thumb_720_gif?: string; - thumb_720_h?: string; - thumb_720_w?: string; - thumb_80?: string; - thumb_800?: string; - thumb_800_gif?: string; - thumb_800_h?: string; - thumb_800_w?: string; - thumb_80_gif?: string; - thumb_80_h?: string; - thumb_80_w?: string; - thumb_960?: string; - thumb_960_gif?: string; - thumb_960_h?: string; - thumb_960_w?: string; - thumb_gif?: string; - thumb_pdf?: string; - thumb_pdf_h?: string; - thumb_pdf_w?: string; - thumb_tiny?: string; - thumb_video?: string; - thumb_video_h?: number; - thumb_video_w?: number; - timestamp?: number; - title?: string; - title_blocks?: TitleBlockElement[]; - to?: Cc[]; - transcription?: Transcription; - update_notification?: number; - updated?: number; - url_private?: string; - url_private_download?: string; - url_static_preview?: string; - user?: string; - user_team?: string; - username?: string; - vtt?: string; + private_file_with_access_count?: number; + public_url_shared?: boolean; + quip_thread_id?: string; + reactions?: Reaction[]; + saved?: Saved; + sent_to_self?: boolean; + shares?: Shares; + show_badge?: boolean; + simplified_html?: string; + size?: number; + source_team?: string; + subject?: string; + subtype?: string; + team_pref_version_history_enabled?: boolean; + teams_shared_with?: any[]; + template_conversion_ts?: number; + template_description?: string; + template_icon?: string; + template_name?: string; + template_title?: string; + thumb_1024?: string; + thumb_1024_gif?: string; + thumb_1024_h?: string; + thumb_1024_w?: string; + thumb_160?: string; + thumb_160_gif?: string; + thumb_160_h?: string; + thumb_160_w?: string; + thumb_360?: string; + thumb_360_gif?: string; + thumb_360_h?: string; + thumb_360_w?: string; + thumb_480?: string; + thumb_480_gif?: string; + thumb_480_h?: string; + thumb_480_w?: string; + thumb_64?: string; + thumb_64_gif?: string; + thumb_64_h?: string; + thumb_64_w?: string; + thumb_720?: string; + thumb_720_gif?: string; + thumb_720_h?: string; + thumb_720_w?: string; + thumb_80?: string; + thumb_800?: string; + thumb_800_gif?: string; + thumb_800_h?: string; + thumb_800_w?: string; + thumb_80_gif?: string; + thumb_80_h?: string; + thumb_80_w?: string; + thumb_960?: string; + thumb_960_gif?: string; + thumb_960_h?: string; + thumb_960_w?: string; + thumb_gif?: string; + thumb_pdf?: string; + thumb_pdf_h?: string; + thumb_pdf_w?: string; + thumb_tiny?: string; + thumb_video?: string; + thumb_video_h?: number; + thumb_video_w?: number; + timestamp?: number; + title?: string; + title_blocks?: TitleBlockElement[]; + to?: Cc[]; + transcription?: Transcription; + update_notification?: number; + updated?: number; + url_private?: string; + url_private_download?: string; + url_static_preview?: string; + user?: string; + user_team?: string; + username?: string; + vtt?: string; } export interface TitleBlockElement { - accessory?: Accessory; - alt_text?: string; - app_collaborators?: string[]; - app_id?: string; - author_name?: string; - block_id?: string; - bot_user_id?: string; - button_label?: string; - description?: DescriptionElement | string; - developer_trace_id?: string; - elements?: Accessory[]; - fallback?: string; - fields?: DescriptionElement[]; - function_trigger_id?: string; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - is_animated?: boolean; - is_workflow_app?: boolean; - owning_team_id?: string; - provider_icon_url?: string; - provider_name?: string; + accessory?: Accessory; + alt_text?: string; + app_collaborators?: string[]; + app_id?: string; + author_name?: string; + block_id?: string; + bot_user_id?: string; + button_label?: string; + description?: DescriptionElement | string; + developer_trace_id?: string; + elements?: Accessory[]; + fallback?: string; + fields?: DescriptionElement[]; + function_trigger_id?: string; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + is_animated?: boolean; + is_workflow_app?: boolean; + owning_team_id?: string; + provider_icon_url?: string; + provider_name?: string; sales_home_workflow_app_type?: number; - share_url?: string; - slack_file?: SlackFile; - text?: DescriptionElement; - thumbnail_url?: string; - title?: DescriptionElement | string; - title_url?: string; - trigger_subtype?: string; - trigger_type?: string; - type?: string; - url?: string; - video_url?: string; - workflow_id?: string; + share_url?: string; + slack_file?: SlackFile; + text?: DescriptionElement; + thumbnail_url?: string; + title?: DescriptionElement | string; + title_url?: string; + trigger_subtype?: string; + trigger_type?: string; + type?: string; + url?: string; + video_url?: string; + workflow_id?: string; } export interface Cc { - address?: string; - name?: string; + address?: string; + name?: string; original?: string; } export interface DmMpdmUsersWithFileAccess { - access?: string; + access?: string; user_id?: string; } export interface Favorite { - collection_id?: string; + collection_id?: string; collection_name?: string; - position?: string; + position?: string; } export interface Headers { - date?: string; + date?: string; in_reply_to?: string; - message_id?: string; - reply_to?: string; + message_id?: string; + reply_to?: string; } export interface InitialComment { - channel?: string; - comment?: string; - created?: number; - id?: string; - is_intro?: boolean; + channel?: string; + comment?: string; + created?: number; + id?: string; + is_intro?: boolean; timestamp?: number; - user?: string; + user?: string; } export interface ListLimits { - column_count?: number; - column_count_limit?: number; + column_count?: number; + column_count_limit?: number; over_column_maximum?: boolean; - over_row_maximum?: boolean; - over_view_maximum?: boolean; - row_count?: number; - row_count_limit?: number; - view_count?: number; - view_count_limit?: number; + over_row_maximum?: boolean; + over_view_maximum?: boolean; + row_count?: number; + row_count_limit?: number; + view_count?: number; + view_count_limit?: number; } export interface ListMetadata { creation_source?: CreationSource; - description?: string; - icon?: string; - icon_team_id?: string; - icon_url?: string; - integrations?: string[]; - is_trial?: boolean; - schema?: Schema[]; - views?: View[]; + description?: string; + icon?: string; + icon_team_id?: string; + icon_url?: string; + integrations?: string[]; + is_trial?: boolean; + schema?: Schema[]; + views?: View[]; } export interface CreationSource { - reference_id?: string; - type?: string; + reference_id?: string; + type?: string; workflow_function_id?: string; } export interface Schema { - id?: string; + id?: string; is_primary_column?: boolean; - key?: string; - name?: string; - options?: Options; - type?: string; + key?: string; + name?: string; + options?: Options; + type?: string; } export interface Options { - canvas_id?: string; + canvas_id?: string; canvas_placeholder_mapping?: CanvasPlaceholderMapping[]; - choices?: Choice[]; - currency?: string; - currency_format?: string; - date_format?: string; - default_value?: string; - default_value_typed?: DefaultValueTyped; - emoji?: string; - emoji_team_id?: string; - for_assignment?: boolean; - format?: string; - linked_to?: string[]; - mark_as_done_when_checked?: boolean; - max?: number; - notify_users?: boolean; - precision?: number; - rounding?: string; - show_member_name?: boolean; - time_format?: string; + choices?: Choice[]; + currency?: string; + currency_format?: string; + date_format?: string; + default_value?: string; + default_value_typed?: DefaultValueTyped; + emoji?: string; + emoji_team_id?: string; + for_assignment?: boolean; + format?: string; + linked_to?: string[]; + mark_as_done_when_checked?: boolean; + max?: number; + notify_users?: boolean; + precision?: number; + rounding?: string; + show_member_name?: boolean; + time_format?: string; } export interface CanvasPlaceholderMapping { - column?: string; + column?: string; variable?: string; } @@ -603,64 +603,64 @@ export interface DefaultValueTyped { } export interface View { - columns?: Column[]; - created_by?: string; - date_created?: number; - id?: string; + columns?: Column[]; + created_by?: string; + date_created?: number; + id?: string; is_all_items_view?: boolean; - is_locked?: boolean; - name?: string; - position?: string; + is_locked?: boolean; + name?: string; + position?: string; stick_column_left?: boolean; - type?: string; + type?: string; } export interface Column { - id?: string; - key?: string; + id?: string; + key?: string; position?: string; - visible?: boolean; - width?: number; + visible?: boolean; + width?: number; } export interface MediaProgress { - duration_ms?: number; + duration_ms?: number; max_offset_ms?: number; - offset_ms?: number; + offset_ms?: number; } export interface Reaction { count?: number; - name?: string; - url?: string; + name?: string; + url?: string; users?: string[]; } export interface Saved { date_completed?: number; - date_due?: number; - is_archived?: boolean; - state?: string; + date_due?: number; + is_archived?: boolean; + state?: string; } export interface Shares { private?: { [key: string]: Private[] }; - public?: { [key: string]: Private[] }; + public?: { [key: string]: Private[] }; } export interface Private { - access?: string; - channel_name?: string; - date_last_shared?: number; - latest_reply?: string; - reply_count?: number; - reply_users?: string[]; + access?: string; + channel_name?: string; + date_last_shared?: number; + latest_reply?: string; + reply_count?: number; + reply_users?: string[]; reply_users_count?: number; - share_user_id?: string; - source?: string; - team_id?: string; - thread_ts?: string; - ts?: string; + share_user_id?: string; + source?: string; + team_id?: string; + thread_ts?: string; + ts?: string; } export interface Transcription { @@ -669,11 +669,11 @@ export interface Transcription { } export interface BotProfile { - app_id?: string; + app_id?: string; deleted?: boolean; - icons?: Icons; - id?: string; - name?: string; + icons?: Icons; + id?: string; + name?: string; team_id?: string; updated?: number; } @@ -686,46 +686,45 @@ export interface Icons { export interface Metadata { event_payload?: EventPayload; - event_type?: string; + event_type?: string; } -export interface EventPayload { -} +export type EventPayload = {}; export interface Room { - app_id?: string; - attached_file_ids?: string[]; - background_id?: string; - call_family?: string; - canvas_background?: string; - canvas_thread_ts?: string; - channels?: string[]; - created_by?: string; - date_end?: number; - date_start?: number; - display_id?: string; - external_unique_id?: string; - has_ended?: boolean; - id?: string; - is_dm_call?: boolean; - is_prewarmed?: boolean; - is_scheduled?: boolean; - knocks?: EventPayload; - last_invite_status_by_user?: EventPayload; - media_backend_type?: string; - media_server?: string; - name?: string; - participant_history?: string[]; - participants?: string[]; - participants_camera_off?: string[]; - participants_camera_on?: string[]; + app_id?: string; + attached_file_ids?: string[]; + background_id?: string; + call_family?: string; + canvas_background?: string; + canvas_thread_ts?: string; + channels?: string[]; + created_by?: string; + date_end?: number; + date_start?: number; + display_id?: string; + external_unique_id?: string; + has_ended?: boolean; + id?: string; + is_dm_call?: boolean; + is_prewarmed?: boolean; + is_scheduled?: boolean; + knocks?: EventPayload; + last_invite_status_by_user?: EventPayload; + media_backend_type?: string; + media_server?: string; + name?: string; + participant_history?: string[]; + participants?: string[]; + participants_camera_off?: string[]; + participants_camera_on?: string[]; participants_screenshare_off?: string[]; - participants_screenshare_on?: string[]; - pending_invitees?: EventPayload; - thread_root_ts?: string; - was_accepted?: boolean; - was_missed?: boolean; - was_rejected?: boolean; + participants_screenshare_on?: string[]; + pending_invitees?: EventPayload; + thread_root_ts?: string; + was_accepted?: boolean; + was_missed?: boolean; + was_rejected?: boolean; } export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/ChatScheduledMessagesListResponse.ts b/packages/web-api/src/types/response/ChatScheduledMessagesListResponse.ts index 6fe95f0a5..9d4591c26 100644 --- a/packages/web-api/src/types/response/ChatScheduledMessagesListResponse.ts +++ b/packages/web-api/src/types/response/ChatScheduledMessagesListResponse.ts @@ -8,13 +8,13 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ChatScheduledMessagesListResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; - response_metadata?: ResponseMetadata; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; + response_metadata?: ResponseMetadata; scheduled_messages?: ScheduledMessage[]; }; @@ -23,9 +23,9 @@ export interface ResponseMetadata { } export interface ScheduledMessage { - channel_id?: string; + channel_id?: string; date_created?: number; - id?: string; - post_at?: number; - text?: string; + id?: string; + post_at?: number; + text?: string; } diff --git a/packages/web-api/src/types/response/ChatUnfurlResponse.ts b/packages/web-api/src/types/response/ChatUnfurlResponse.ts index d2d21f9ed..98d7eaf5a 100644 --- a/packages/web-api/src/types/response/ChatUnfurlResponse.ts +++ b/packages/web-api/src/types/response/ChatUnfurlResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ChatUnfurlResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/ChatUpdateResponse.ts b/packages/web-api/src/types/response/ChatUpdateResponse.ts index a3421605c..fff0b2227 100644 --- a/packages/web-api/src/types/response/ChatUpdateResponse.ts +++ b/packages/web-api/src/types/response/ChatUpdateResponse.ts @@ -8,144 +8,144 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ChatUpdateResponse = WebAPICallResult & { - channel?: string; - error?: string; - message?: Message; - needed?: string; - ok?: boolean; - provided?: string; + channel?: string; + error?: string; + message?: Message; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; - text?: string; - ts?: string; + text?: string; + ts?: string; }; export interface Message { - app_id?: string; - blocks?: MessageBlock[]; - bot_id?: string; - bot_profile?: BotProfile; + app_id?: string; + blocks?: MessageBlock[]; + bot_id?: string; + bot_profile?: BotProfile; display_as_bot?: boolean; - edited?: Edited; - files?: File[]; - metadata?: Metadata; - room?: Room; - team?: string; - text?: string; - type?: string; - upload?: boolean; - user?: string; - x_files?: string[]; + edited?: Edited; + files?: File[]; + metadata?: Metadata; + room?: Room; + team?: string; + text?: string; + type?: string; + upload?: boolean; + user?: string; + x_files?: string[]; } export interface MessageBlock { - accessory?: Accessory; - alt_text?: string; - api_decoration_available?: boolean; - app_collaborators?: string[]; - app_id?: string; - author_name?: string; - block_id?: string; - bot_user_id?: string; - button_label?: string; - call?: Call; - call_id?: string; - description?: DescriptionElement; - developer_trace_id?: string; - dispatch_action?: boolean; - element?: Accessory; - elements?: Accessory[]; - external_id?: string; - fallback?: string; - fields?: DescriptionElement[]; - file?: File; - file_id?: string; - function_trigger_id?: string; - hint?: DescriptionElement; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - is_animated?: boolean; - is_workflow_app?: boolean; - label?: DescriptionElement; - optional?: boolean; - owning_team_id?: string; - provider_icon_url?: string; - provider_name?: string; + accessory?: Accessory; + alt_text?: string; + api_decoration_available?: boolean; + app_collaborators?: string[]; + app_id?: string; + author_name?: string; + block_id?: string; + bot_user_id?: string; + button_label?: string; + call?: Call; + call_id?: string; + description?: DescriptionElement; + developer_trace_id?: string; + dispatch_action?: boolean; + element?: Accessory; + elements?: Accessory[]; + external_id?: string; + fallback?: string; + fields?: DescriptionElement[]; + file?: File; + file_id?: string; + function_trigger_id?: string; + hint?: DescriptionElement; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + is_animated?: boolean; + is_workflow_app?: boolean; + label?: DescriptionElement; + optional?: boolean; + owning_team_id?: string; + provider_icon_url?: string; + provider_name?: string; sales_home_workflow_app_type?: number; - share_url?: string; - slack_file?: SlackFile; - source?: string; - text?: DescriptionElement; - thumbnail_url?: string; - title?: DescriptionElement; - title_url?: string; - trigger_subtype?: string; - trigger_type?: string; - type?: BlockType; - url?: string; - video_url?: string; - workflow_id?: string; + share_url?: string; + slack_file?: SlackFile; + source?: string; + text?: DescriptionElement; + thumbnail_url?: string; + title?: DescriptionElement; + title_url?: string; + trigger_subtype?: string; + trigger_type?: string; + type?: BlockType; + url?: string; + video_url?: string; + workflow_id?: string; } export interface Accessory { - accessibility_label?: string; - action_id?: string; - alt_text?: string; - border?: number; - confirm?: Confirm; + accessibility_label?: string; + action_id?: string; + alt_text?: string; + border?: number; + confirm?: Confirm; default_to_current_conversation?: boolean; - elements?: AccessoryElement[]; - fallback?: string; - filter?: Filter; - focus_on_load?: boolean; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - indent?: number; - initial_channel?: string; - initial_channels?: string[]; - initial_conversation?: string; - initial_conversations?: string[]; - initial_date?: string; - initial_date_time?: number; - initial_option?: Option; - initial_options?: Option[]; - initial_time?: string; - initial_user?: string; - initial_users?: string[]; - max_selected_items?: number; - min_query_length?: number; - offset?: number; - option_groups?: OptionGroup[]; - options?: Option[]; - placeholder?: DescriptionElement; - response_url_enabled?: boolean; - slack_file?: SlackFile; - style?: string; - text?: DescriptionElement; - timezone?: string; - type?: string; - url?: string; - value?: string; - workflow?: Workflow; + elements?: AccessoryElement[]; + fallback?: string; + filter?: Filter; + focus_on_load?: boolean; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + indent?: number; + initial_channel?: string; + initial_channels?: string[]; + initial_conversation?: string; + initial_conversations?: string[]; + initial_date?: string; + initial_date_time?: number; + initial_option?: Option; + initial_options?: Option[]; + initial_time?: string; + initial_user?: string; + initial_users?: string[]; + max_selected_items?: number; + min_query_length?: number; + offset?: number; + option_groups?: OptionGroup[]; + options?: Option[]; + placeholder?: DescriptionElement; + response_url_enabled?: boolean; + slack_file?: SlackFile; + style?: string; + text?: DescriptionElement; + timezone?: string; + type?: string; + url?: string; + value?: string; + workflow?: Workflow; } export interface Confirm { confirm?: DescriptionElement; - deny?: DescriptionElement; - style?: string; - text?: DescriptionElement; - title?: DescriptionElement; + deny?: DescriptionElement; + style?: string; + text?: DescriptionElement; + title?: DescriptionElement; } export interface DescriptionElement { - emoji?: boolean; - text?: string; - type?: DescriptionType; + emoji?: boolean; + text?: string; + type?: DescriptionType; verbatim?: boolean; } @@ -155,42 +155,42 @@ export enum DescriptionType { } export interface AccessoryElement { - border?: number; + border?: number; elements?: PurpleElement[]; - indent?: number; - offset?: number; - style?: string; - type?: FluffyType; + indent?: number; + offset?: number; + style?: string; + type?: FluffyType; } export interface PurpleElement { - channel_id?: string; - fallback?: string; - format?: string; - name?: string; - range?: string; - skin_tone?: number; - style?: Style; - team_id?: string; - text?: string; - timestamp?: string; - type?: PurpleType; - unicode?: string; - unsafe?: boolean; - url?: string; - user_id?: string; + channel_id?: string; + fallback?: string; + format?: string; + name?: string; + range?: string; + skin_tone?: number; + style?: Style; + team_id?: string; + text?: string; + timestamp?: string; + type?: PurpleType; + unicode?: string; + unsafe?: boolean; + url?: string; + user_id?: string; usergroup_id?: string; - value?: string; + value?: string; } export interface Style { - bold?: boolean; + bold?: boolean; client_highlight?: boolean; - code?: boolean; - highlight?: boolean; - italic?: boolean; - strike?: boolean; - unlink?: boolean; + code?: boolean; + highlight?: boolean; + italic?: boolean; + strike?: boolean; + unlink?: boolean; } export enum PurpleType { @@ -214,25 +214,25 @@ export enum FluffyType { } export interface Filter { - exclude_bot_users?: boolean; + exclude_bot_users?: boolean; exclude_external_shared_channels?: boolean; - include?: any[]; + include?: any[]; } export interface Option { description?: DescriptionElement; - text?: DescriptionElement; - url?: string; - value?: string; + text?: DescriptionElement; + url?: string; + value?: string; } export interface OptionGroup { - label?: DescriptionElement; + label?: DescriptionElement; options?: Option[]; } export interface SlackFile { - id?: string; + id?: string; url?: string; } @@ -242,258 +242,258 @@ export interface Workflow { export interface Trigger { customizable_input_parameters?: CustomizableInputParameter[]; - url?: string; + url?: string; } export interface CustomizableInputParameter { - name?: string; + name?: string; value?: string; } export interface Call { media_backend_type?: string; - v1?: V1; + v1?: V1; } export interface V1 { - active_participants?: Participant[]; - all_participants?: Participant[]; - app_icon_urls?: AppIconUrls; - app_id?: string; - channels?: string[]; - created_by?: string; - date_end?: number; - date_start?: number; + active_participants?: Participant[]; + all_participants?: Participant[]; + app_icon_urls?: AppIconUrls; + app_id?: string; + channels?: string[]; + created_by?: string; + date_end?: number; + date_start?: number; desktop_app_join_url?: string; - display_id?: string; - has_ended?: boolean; - id?: string; - is_dm_call?: boolean; - join_url?: string; - name?: string; - was_accepted?: boolean; - was_missed?: boolean; - was_rejected?: boolean; + display_id?: string; + has_ended?: boolean; + id?: string; + is_dm_call?: boolean; + join_url?: string; + name?: string; + was_accepted?: boolean; + was_missed?: boolean; + was_rejected?: boolean; } export interface Participant { - avatar_url?: string; + avatar_url?: string; display_name?: string; - external_id?: string; - slack_id?: string; + external_id?: string; + slack_id?: string; } export interface AppIconUrls { - image_1024?: string; - image_128?: string; - image_192?: string; - image_32?: string; - image_36?: string; - image_48?: string; - image_512?: string; - image_64?: string; - image_72?: string; - image_96?: string; + image_1024?: string; + image_128?: string; + image_192?: string; + image_32?: string; + image_36?: string; + image_48?: string; + image_512?: string; + image_64?: string; + image_72?: string; + image_96?: string; image_original?: string; } export interface File { - access?: string; - alt_txt?: string; - app_id?: string; - app_name?: string; - attachments?: any[]; - blocks?: TitleBlockElement[]; - bot_id?: string; - can_toggle_canvas_lock?: boolean; - canvas_template_mode?: string; - cc?: Cc[]; - channel_actions_count?: number; - channel_actions_ts?: string; - channels?: string[]; - comments_count?: number; - converted_pdf?: string; - created?: number; - deanimate?: string; - deanimate_gif?: string; - display_as_bot?: boolean; - dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; - duration_ms?: number; - edit_link?: string; - edit_timestamp?: number; - editable?: boolean; - editor?: string; - editors?: string[]; - external_id?: string; - external_type?: string; - external_url?: string; - favorites?: Favorite[]; - file_access?: string; - filetype?: string; - from?: Cc[]; - groups?: string[]; - has_more?: boolean; - has_more_shares?: boolean; - has_rich_preview?: boolean; - headers?: Headers; - hls?: string; - hls_embed?: string; - id?: string; - image_exif_rotation?: number; - ims?: string[]; - initial_comment?: InitialComment; - is_channel_space?: boolean; - is_external?: boolean; - is_public?: boolean; - is_starred?: boolean; - last_editor?: string; - last_read?: number; - lines?: number; - lines_more?: number; - linked_channel_id?: string; - list_limits?: ListLimits; - list_metadata?: ListMetadata; - media_display_type?: string; - media_progress?: MediaProgress; - mimetype?: string; - mode?: string; - mp4?: string; - mp4_low?: string; - name?: string; - non_owner_editable?: boolean; - num_stars?: number; - org_or_workspace_access?: string; - original_attachment_count?: number; - original_h?: string; - original_w?: string; - permalink?: string; - permalink_public?: string; - pinned_to?: string[]; - pjpeg?: string; - plain_text?: string; - pretty_type?: string; - preview?: string; - preview_highlight?: string; - preview_is_truncated?: boolean; - preview_plain_text?: string; + access?: string; + alt_txt?: string; + app_id?: string; + app_name?: string; + attachments?: any[]; + blocks?: TitleBlockElement[]; + bot_id?: string; + can_toggle_canvas_lock?: boolean; + canvas_template_mode?: string; + cc?: Cc[]; + channel_actions_count?: number; + channel_actions_ts?: string; + channels?: string[]; + comments_count?: number; + converted_pdf?: string; + created?: number; + deanimate?: string; + deanimate_gif?: string; + display_as_bot?: boolean; + dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; + duration_ms?: number; + edit_link?: string; + edit_timestamp?: number; + editable?: boolean; + editor?: string; + editors?: string[]; + external_id?: string; + external_type?: string; + external_url?: string; + favorites?: Favorite[]; + file_access?: string; + filetype?: string; + from?: Cc[]; + groups?: string[]; + has_more?: boolean; + has_more_shares?: boolean; + has_rich_preview?: boolean; + headers?: Headers; + hls?: string; + hls_embed?: string; + id?: string; + image_exif_rotation?: number; + ims?: string[]; + initial_comment?: InitialComment; + is_channel_space?: boolean; + is_external?: boolean; + is_public?: boolean; + is_starred?: boolean; + last_editor?: string; + last_read?: number; + lines?: number; + lines_more?: number; + linked_channel_id?: string; + list_limits?: ListLimits; + list_metadata?: ListMetadata; + media_display_type?: string; + media_progress?: MediaProgress; + mimetype?: string; + mode?: string; + mp4?: string; + mp4_low?: string; + name?: string; + non_owner_editable?: boolean; + num_stars?: number; + org_or_workspace_access?: string; + original_attachment_count?: number; + original_h?: string; + original_w?: string; + permalink?: string; + permalink_public?: string; + pinned_to?: string[]; + pjpeg?: string; + plain_text?: string; + pretty_type?: string; + preview?: string; + preview_highlight?: string; + preview_is_truncated?: boolean; + preview_plain_text?: string; private_channels_with_file_access_count?: number; - private_file_with_access_count?: number; - public_url_shared?: boolean; - quip_thread_id?: string; - reactions?: Reaction[]; - saved?: Saved; - sent_to_self?: boolean; - shares?: Shares; - show_badge?: boolean; - simplified_html?: string; - size?: number; - source_team?: string; - subject?: string; - subtype?: string; - team_pref_version_history_enabled?: boolean; - teams_shared_with?: any[]; - template_conversion_ts?: number; - template_description?: string; - template_icon?: string; - template_name?: string; - template_title?: string; - thumb_1024?: string; - thumb_1024_gif?: string; - thumb_1024_h?: string; - thumb_1024_w?: string; - thumb_160?: string; - thumb_160_gif?: string; - thumb_160_h?: string; - thumb_160_w?: string; - thumb_360?: string; - thumb_360_gif?: string; - thumb_360_h?: string; - thumb_360_w?: string; - thumb_480?: string; - thumb_480_gif?: string; - thumb_480_h?: string; - thumb_480_w?: string; - thumb_64?: string; - thumb_64_gif?: string; - thumb_64_h?: string; - thumb_64_w?: string; - thumb_720?: string; - thumb_720_gif?: string; - thumb_720_h?: string; - thumb_720_w?: string; - thumb_80?: string; - thumb_800?: string; - thumb_800_gif?: string; - thumb_800_h?: string; - thumb_800_w?: string; - thumb_80_gif?: string; - thumb_80_h?: string; - thumb_80_w?: string; - thumb_960?: string; - thumb_960_gif?: string; - thumb_960_h?: string; - thumb_960_w?: string; - thumb_gif?: string; - thumb_pdf?: string; - thumb_pdf_h?: string; - thumb_pdf_w?: string; - thumb_tiny?: string; - thumb_video?: string; - thumb_video_h?: number; - thumb_video_w?: number; - timestamp?: number; - title?: string; - title_blocks?: TitleBlockElement[]; - to?: Cc[]; - transcription?: Transcription; - update_notification?: number; - updated?: number; - url_private?: string; - url_private_download?: string; - url_static_preview?: string; - user?: string; - user_team?: string; - username?: string; - vtt?: string; + private_file_with_access_count?: number; + public_url_shared?: boolean; + quip_thread_id?: string; + reactions?: Reaction[]; + saved?: Saved; + sent_to_self?: boolean; + shares?: Shares; + show_badge?: boolean; + simplified_html?: string; + size?: number; + source_team?: string; + subject?: string; + subtype?: string; + team_pref_version_history_enabled?: boolean; + teams_shared_with?: any[]; + template_conversion_ts?: number; + template_description?: string; + template_icon?: string; + template_name?: string; + template_title?: string; + thumb_1024?: string; + thumb_1024_gif?: string; + thumb_1024_h?: string; + thumb_1024_w?: string; + thumb_160?: string; + thumb_160_gif?: string; + thumb_160_h?: string; + thumb_160_w?: string; + thumb_360?: string; + thumb_360_gif?: string; + thumb_360_h?: string; + thumb_360_w?: string; + thumb_480?: string; + thumb_480_gif?: string; + thumb_480_h?: string; + thumb_480_w?: string; + thumb_64?: string; + thumb_64_gif?: string; + thumb_64_h?: string; + thumb_64_w?: string; + thumb_720?: string; + thumb_720_gif?: string; + thumb_720_h?: string; + thumb_720_w?: string; + thumb_80?: string; + thumb_800?: string; + thumb_800_gif?: string; + thumb_800_h?: string; + thumb_800_w?: string; + thumb_80_gif?: string; + thumb_80_h?: string; + thumb_80_w?: string; + thumb_960?: string; + thumb_960_gif?: string; + thumb_960_h?: string; + thumb_960_w?: string; + thumb_gif?: string; + thumb_pdf?: string; + thumb_pdf_h?: string; + thumb_pdf_w?: string; + thumb_tiny?: string; + thumb_video?: string; + thumb_video_h?: number; + thumb_video_w?: number; + timestamp?: number; + title?: string; + title_blocks?: TitleBlockElement[]; + to?: Cc[]; + transcription?: Transcription; + update_notification?: number; + updated?: number; + url_private?: string; + url_private_download?: string; + url_static_preview?: string; + user?: string; + user_team?: string; + username?: string; + vtt?: string; } export interface TitleBlockElement { - accessory?: Accessory; - alt_text?: string; - app_collaborators?: string[]; - app_id?: string; - author_name?: string; - block_id?: string; - bot_user_id?: string; - button_label?: string; - description?: DescriptionElement | string; - developer_trace_id?: string; - elements?: Accessory[]; - fallback?: string; - fields?: DescriptionElement[]; - function_trigger_id?: string; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - is_animated?: boolean; - is_workflow_app?: boolean; - owning_team_id?: string; - provider_icon_url?: string; - provider_name?: string; + accessory?: Accessory; + alt_text?: string; + app_collaborators?: string[]; + app_id?: string; + author_name?: string; + block_id?: string; + bot_user_id?: string; + button_label?: string; + description?: DescriptionElement | string; + developer_trace_id?: string; + elements?: Accessory[]; + fallback?: string; + fields?: DescriptionElement[]; + function_trigger_id?: string; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + is_animated?: boolean; + is_workflow_app?: boolean; + owning_team_id?: string; + provider_icon_url?: string; + provider_name?: string; sales_home_workflow_app_type?: number; - share_url?: string; - slack_file?: SlackFile; - text?: DescriptionElement; - thumbnail_url?: string; - title?: DescriptionElement | string; - title_url?: string; - trigger_subtype?: string; - trigger_type?: string; - type?: BlockType; - url?: string; - video_url?: string; - workflow_id?: string; + share_url?: string; + slack_file?: SlackFile; + text?: DescriptionElement; + thumbnail_url?: string; + title?: DescriptionElement | string; + title_url?: string; + trigger_subtype?: string; + trigger_type?: string; + type?: BlockType; + url?: string; + video_url?: string; + workflow_id?: string; } export enum BlockType { @@ -508,103 +508,103 @@ export enum BlockType { } export interface Cc { - address?: string; - name?: string; + address?: string; + name?: string; original?: string; } export interface DmMpdmUsersWithFileAccess { - access?: string; + access?: string; user_id?: string; } export interface Favorite { - collection_id?: string; + collection_id?: string; collection_name?: string; - position?: string; + position?: string; } export interface Headers { - date?: string; + date?: string; in_reply_to?: string; - message_id?: string; - reply_to?: string; + message_id?: string; + reply_to?: string; } export interface InitialComment { - channel?: string; - comment?: string; - created?: number; - id?: string; - is_intro?: boolean; + channel?: string; + comment?: string; + created?: number; + id?: string; + is_intro?: boolean; timestamp?: number; - user?: string; + user?: string; } export interface ListLimits { - column_count?: number; - column_count_limit?: number; + column_count?: number; + column_count_limit?: number; over_column_maximum?: boolean; - over_row_maximum?: boolean; - over_view_maximum?: boolean; - row_count?: number; - row_count_limit?: number; - view_count?: number; - view_count_limit?: number; + over_row_maximum?: boolean; + over_view_maximum?: boolean; + row_count?: number; + row_count_limit?: number; + view_count?: number; + view_count_limit?: number; } export interface ListMetadata { creation_source?: CreationSource; - description?: string; - icon?: string; - icon_team_id?: string; - icon_url?: string; - integrations?: string[]; - is_trial?: boolean; - schema?: Schema[]; - views?: View[]; + description?: string; + icon?: string; + icon_team_id?: string; + icon_url?: string; + integrations?: string[]; + is_trial?: boolean; + schema?: Schema[]; + views?: View[]; } export interface CreationSource { - reference_id?: string; - type?: string; + reference_id?: string; + type?: string; workflow_function_id?: string; } export interface Schema { - id?: string; + id?: string; is_primary_column?: boolean; - key?: string; - name?: string; - options?: Options; - type?: string; + key?: string; + name?: string; + options?: Options; + type?: string; } export interface Options { - canvas_id?: string; + canvas_id?: string; canvas_placeholder_mapping?: CanvasPlaceholderMapping[]; - choices?: Choice[]; - currency?: string; - currency_format?: string; - date_format?: string; - default_value?: string; - default_value_typed?: DefaultValueTyped; - emoji?: string; - emoji_team_id?: string; - for_assignment?: boolean; - format?: string; - linked_to?: string[]; - mark_as_done_when_checked?: boolean; - max?: number; - notify_users?: boolean; - precision?: number; - rounding?: string; - show_member_name?: boolean; - time_format?: string; + choices?: Choice[]; + currency?: string; + currency_format?: string; + date_format?: string; + default_value?: string; + default_value_typed?: DefaultValueTyped; + emoji?: string; + emoji_team_id?: string; + for_assignment?: boolean; + format?: string; + linked_to?: string[]; + mark_as_done_when_checked?: boolean; + max?: number; + notify_users?: boolean; + precision?: number; + rounding?: string; + show_member_name?: boolean; + time_format?: string; } export interface CanvasPlaceholderMapping { - column?: string; + column?: string; variable?: string; } @@ -619,64 +619,64 @@ export interface DefaultValueTyped { } export interface View { - columns?: Column[]; - created_by?: string; - date_created?: number; - id?: string; + columns?: Column[]; + created_by?: string; + date_created?: number; + id?: string; is_all_items_view?: boolean; - is_locked?: boolean; - name?: string; - position?: string; + is_locked?: boolean; + name?: string; + position?: string; stick_column_left?: boolean; - type?: string; + type?: string; } export interface Column { - id?: string; - key?: string; + id?: string; + key?: string; position?: string; - visible?: boolean; - width?: number; + visible?: boolean; + width?: number; } export interface MediaProgress { - duration_ms?: number; + duration_ms?: number; max_offset_ms?: number; - offset_ms?: number; + offset_ms?: number; } export interface Reaction { count?: number; - name?: string; - url?: string; + name?: string; + url?: string; users?: string[]; } export interface Saved { date_completed?: number; - date_due?: number; - is_archived?: boolean; - state?: string; + date_due?: number; + is_archived?: boolean; + state?: string; } export interface Shares { private?: { [key: string]: Private[] }; - public?: { [key: string]: Private[] }; + public?: { [key: string]: Private[] }; } export interface Private { - access?: string; - channel_name?: string; - date_last_shared?: number; - latest_reply?: string; - reply_count?: number; - reply_users?: string[]; + access?: string; + channel_name?: string; + date_last_shared?: number; + latest_reply?: string; + reply_count?: number; + reply_users?: string[]; reply_users_count?: number; - share_user_id?: string; - source?: string; - team_id?: string; - thread_ts?: string; - ts?: string; + share_user_id?: string; + source?: string; + team_id?: string; + thread_ts?: string; + ts?: string; } export interface Transcription { @@ -685,11 +685,11 @@ export interface Transcription { } export interface BotProfile { - app_id?: string; + app_id?: string; deleted?: boolean; - icons?: Icons; - id?: string; - name?: string; + icons?: Icons; + id?: string; + name?: string; team_id?: string; updated?: number; } @@ -701,52 +701,51 @@ export interface Icons { } export interface Edited { - ts?: string; + ts?: string; user?: string; } export interface Metadata { event_payload?: EventPayload; - event_type?: string; + event_type?: string; } -export interface EventPayload { -} +export type EventPayload = {}; export interface Room { - app_id?: string; - attached_file_ids?: string[]; - background_id?: string; - call_family?: string; - canvas_background?: string; - canvas_thread_ts?: string; - channels?: string[]; - created_by?: string; - date_end?: number; - date_start?: number; - display_id?: string; - external_unique_id?: string; - has_ended?: boolean; - id?: string; - is_dm_call?: boolean; - is_prewarmed?: boolean; - is_scheduled?: boolean; - knocks?: EventPayload; - last_invite_status_by_user?: EventPayload; - media_backend_type?: string; - media_server?: string; - name?: string; - participant_history?: string[]; - participants?: string[]; - participants_camera_off?: string[]; - participants_camera_on?: string[]; + app_id?: string; + attached_file_ids?: string[]; + background_id?: string; + call_family?: string; + canvas_background?: string; + canvas_thread_ts?: string; + channels?: string[]; + created_by?: string; + date_end?: number; + date_start?: number; + display_id?: string; + external_unique_id?: string; + has_ended?: boolean; + id?: string; + is_dm_call?: boolean; + is_prewarmed?: boolean; + is_scheduled?: boolean; + knocks?: EventPayload; + last_invite_status_by_user?: EventPayload; + media_backend_type?: string; + media_server?: string; + name?: string; + participant_history?: string[]; + participants?: string[]; + participants_camera_off?: string[]; + participants_camera_on?: string[]; participants_screenshare_off?: string[]; - participants_screenshare_on?: string[]; - pending_invitees?: EventPayload; - thread_root_ts?: string; - was_accepted?: boolean; - was_missed?: boolean; - was_rejected?: boolean; + participants_screenshare_on?: string[]; + pending_invitees?: EventPayload; + thread_root_ts?: string; + was_accepted?: boolean; + was_missed?: boolean; + was_rejected?: boolean; } export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/ConversationsAcceptSharedInviteResponse.ts b/packages/web-api/src/types/response/ConversationsAcceptSharedInviteResponse.ts index 64436cb53..af8194284 100644 --- a/packages/web-api/src/types/response/ConversationsAcceptSharedInviteResponse.ts +++ b/packages/web-api/src/types/response/ConversationsAcceptSharedInviteResponse.ts @@ -8,14 +8,14 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ConversationsAcceptSharedInviteResponse = WebAPICallResult & { - can_open_scdm?: boolean; - channel_id?: string; - error?: string; + can_open_scdm?: boolean; + channel_id?: string; + error?: string; implicit_approval?: boolean; - invite_id?: string; - needed?: string; - ok?: boolean; - provided?: string; + invite_id?: string; + needed?: string; + ok?: boolean; + provided?: string; }; diff --git a/packages/web-api/src/types/response/ConversationsApproveSharedInviteResponse.ts b/packages/web-api/src/types/response/ConversationsApproveSharedInviteResponse.ts index ad52f553f..a23d00463 100644 --- a/packages/web-api/src/types/response/ConversationsApproveSharedInviteResponse.ts +++ b/packages/web-api/src/types/response/ConversationsApproveSharedInviteResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ConversationsApproveSharedInviteResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/ConversationsArchiveResponse.ts b/packages/web-api/src/types/response/ConversationsArchiveResponse.ts index c2ff760c5..0785835b9 100644 --- a/packages/web-api/src/types/response/ConversationsArchiveResponse.ts +++ b/packages/web-api/src/types/response/ConversationsArchiveResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ConversationsArchiveResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/ConversationsCanvasesCreateResponse.ts b/packages/web-api/src/types/response/ConversationsCanvasesCreateResponse.ts index 3455dc652..3e3e6c249 100644 --- a/packages/web-api/src/types/response/ConversationsCanvasesCreateResponse.ts +++ b/packages/web-api/src/types/response/ConversationsCanvasesCreateResponse.ts @@ -8,14 +8,14 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ConversationsCanvasesCreateResponse = WebAPICallResult & { - canvas_id?: string; - detail?: string; - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + canvas_id?: string; + detail?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; diff --git a/packages/web-api/src/types/response/ConversationsCloseResponse.ts b/packages/web-api/src/types/response/ConversationsCloseResponse.ts index 12da711b3..cd335b2f0 100644 --- a/packages/web-api/src/types/response/ConversationsCloseResponse.ts +++ b/packages/web-api/src/types/response/ConversationsCloseResponse.ts @@ -8,12 +8,12 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ConversationsCloseResponse = WebAPICallResult & { already_closed?: boolean; - error?: string; - needed?: string; - no_op?: boolean; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + no_op?: boolean; + ok?: boolean; + provided?: string; }; diff --git a/packages/web-api/src/types/response/ConversationsCreateResponse.ts b/packages/web-api/src/types/response/ConversationsCreateResponse.ts index 0141f32a6..13fa83102 100644 --- a/packages/web-api/src/types/response/ConversationsCreateResponse.ts +++ b/packages/web-api/src/types/response/ConversationsCreateResponse.ts @@ -8,52 +8,52 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ConversationsCreateResponse = WebAPICallResult & { - channel?: Channel; - detail?: string; - error?: string; - needed?: string; - ok?: boolean; + channel?: Channel; + detail?: string; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; export interface Channel { - context_team_id?: string; - created?: number; - creator?: string; - id?: string; - internal_team_ids?: string[]; - is_archived?: boolean; - is_channel?: boolean; - is_ext_shared?: boolean; - is_general?: boolean; - is_group?: boolean; - is_im?: boolean; - is_member?: boolean; - is_moved?: number; - is_mpim?: boolean; - is_open?: boolean; - is_org_shared?: boolean; - is_pending_ext_shared?: boolean; - is_private?: boolean; - is_shared?: boolean; - last_read?: string; - name?: string; - name_normalized?: string; + context_team_id?: string; + created?: number; + creator?: string; + id?: string; + internal_team_ids?: string[]; + is_archived?: boolean; + is_channel?: boolean; + is_ext_shared?: boolean; + is_general?: boolean; + is_group?: boolean; + is_im?: boolean; + is_member?: boolean; + is_moved?: number; + is_mpim?: boolean; + is_open?: boolean; + is_org_shared?: boolean; + is_pending_ext_shared?: boolean; + is_private?: boolean; + is_shared?: boolean; + last_read?: string; + name?: string; + name_normalized?: string; pending_connected_team_ids?: string[]; - pending_shared?: string[]; - previous_names?: string[]; - priority?: number; - purpose?: Purpose; - shared_team_ids?: string[]; - topic?: Purpose; - unlinked?: number; - updated?: number; + pending_shared?: string[]; + previous_names?: string[]; + priority?: number; + purpose?: Purpose; + shared_team_ids?: string[]; + topic?: Purpose; + unlinked?: number; + updated?: number; } export interface Purpose { - creator?: string; + creator?: string; last_set?: number; - value?: string; + value?: string; } diff --git a/packages/web-api/src/types/response/ConversationsDeclineSharedInviteResponse.ts b/packages/web-api/src/types/response/ConversationsDeclineSharedInviteResponse.ts index 424f9ce71..7b713a9b8 100644 --- a/packages/web-api/src/types/response/ConversationsDeclineSharedInviteResponse.ts +++ b/packages/web-api/src/types/response/ConversationsDeclineSharedInviteResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ConversationsDeclineSharedInviteResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/ConversationsExternalInvitePermissionsSetResponse.ts b/packages/web-api/src/types/response/ConversationsExternalInvitePermissionsSetResponse.ts index a233089de..355938abf 100644 --- a/packages/web-api/src/types/response/ConversationsExternalInvitePermissionsSetResponse.ts +++ b/packages/web-api/src/types/response/ConversationsExternalInvitePermissionsSetResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ConversationsExternalInvitePermissionsSetResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/ConversationsHistoryResponse.ts b/packages/web-api/src/types/response/ConversationsHistoryResponse.ts index bd43b4695..81f499520 100644 --- a/packages/web-api/src/types/response/ConversationsHistoryResponse.ts +++ b/packages/web-api/src/types/response/ConversationsHistoryResponse.ts @@ -8,255 +8,255 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ConversationsHistoryResponse = WebAPICallResult & { channel_actions_count?: number; - channel_actions_ts?: number; - error?: string; - has_more?: boolean; - messages?: MessageElement[]; - needed?: string; - ok?: boolean; - oldest?: string; - pin_count?: number; - provided?: string; - response_metadata?: ResponseMetadata; + channel_actions_ts?: number; + error?: string; + has_more?: boolean; + messages?: MessageElement[]; + needed?: string; + ok?: boolean; + oldest?: string; + pin_count?: number; + provided?: string; + response_metadata?: ResponseMetadata; }; export interface MessageElement { - app_id?: string; - attachments?: Attachment[]; - blocks?: PurpleBlock[]; - bot_id?: string; - bot_profile?: BotProfile; - client_msg_id?: string; - display_as_bot?: boolean; - edited?: Edited; - files?: FileElement[]; - icons?: MessageIcons; - inviter?: string; - is_locked?: boolean; - latest_reply?: string; - metadata?: FluffyMetadata; - parent_user_id?: string; - purpose?: string; - reactions?: Reaction[]; - reply_count?: number; - reply_users?: string[]; + app_id?: string; + attachments?: Attachment[]; + blocks?: PurpleBlock[]; + bot_id?: string; + bot_profile?: BotProfile; + client_msg_id?: string; + display_as_bot?: boolean; + edited?: Edited; + files?: FileElement[]; + icons?: MessageIcons; + inviter?: string; + is_locked?: boolean; + latest_reply?: string; + metadata?: FluffyMetadata; + parent_user_id?: string; + purpose?: string; + reactions?: Reaction[]; + reply_count?: number; + reply_users?: string[]; reply_users_count?: number; - root?: FluffyRoot; - subscribed?: boolean; - subtype?: string; - team?: string; - text?: string; - thread_ts?: string; - topic?: string; - ts?: string; - type?: string; - upload?: boolean; - user?: string; - username?: string; - x_files?: string[]; + root?: FluffyRoot; + subscribed?: boolean; + subtype?: string; + team?: string; + text?: string; + thread_ts?: string; + topic?: string; + ts?: string; + type?: string; + upload?: boolean; + user?: string; + username?: string; + x_files?: string[]; } export interface Attachment { - actions?: Action[]; - app_id?: string; - app_unfurl_url?: string; - author_icon?: string; - author_id?: string; - author_link?: string; - author_name?: string; - author_subname?: string; - blocks?: TitleBlockElement[]; - bot_id?: string; - callback_id?: string; - channel_id?: string; - channel_name?: string; - channel_team?: string; - color?: string; - fallback?: string; - fields?: AttachmentField[]; - file_id?: string; - filename?: string; - files?: FileElement[]; - footer?: string; - footer_icon?: string; - from_url?: string; - hide_border?: boolean; - hide_color?: boolean; - id?: number; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - indent?: boolean; - is_app_unfurl?: boolean; - is_file_attachment?: boolean; - is_msg_unfurl?: boolean; - is_reply_unfurl?: boolean; + actions?: Action[]; + app_id?: string; + app_unfurl_url?: string; + author_icon?: string; + author_id?: string; + author_link?: string; + author_name?: string; + author_subname?: string; + blocks?: TitleBlockElement[]; + bot_id?: string; + callback_id?: string; + channel_id?: string; + channel_name?: string; + channel_team?: string; + color?: string; + fallback?: string; + fields?: AttachmentField[]; + file_id?: string; + filename?: string; + files?: FileElement[]; + footer?: string; + footer_icon?: string; + from_url?: string; + hide_border?: boolean; + hide_color?: boolean; + id?: number; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + indent?: boolean; + is_app_unfurl?: boolean; + is_file_attachment?: boolean; + is_msg_unfurl?: boolean; + is_reply_unfurl?: boolean; is_thread_root_unfurl?: boolean; - list?: List; - list_record?: PurpleListRecord; - list_record_id?: string; - list_records?: ListRecordElement[]; - list_schema?: Schema[]; - list_view?: View; - list_view_id?: string; - message_blocks?: MessageBlock[]; - metadata?: AttachmentMetadata; - mimetype?: string; - mrkdwn_in?: string[]; - msg_subtype?: string; - original_url?: string; - pretext?: string; - preview?: Preview; - service_icon?: string; - service_name?: string; - service_url?: string; - size?: number; - text?: string; - thumb_height?: number; - thumb_url?: string; - thumb_width?: number; - title?: string; - title_link?: string; - ts?: string; - url?: string; - video_html?: string; - video_html_height?: number; - video_html_width?: number; - video_url?: string; + list?: List; + list_record?: PurpleListRecord; + list_record_id?: string; + list_records?: ListRecordElement[]; + list_schema?: Schema[]; + list_view?: View; + list_view_id?: string; + message_blocks?: MessageBlock[]; + metadata?: AttachmentMetadata; + mimetype?: string; + mrkdwn_in?: string[]; + msg_subtype?: string; + original_url?: string; + pretext?: string; + preview?: Preview; + service_icon?: string; + service_name?: string; + service_url?: string; + size?: number; + text?: string; + thumb_height?: number; + thumb_url?: string; + thumb_width?: number; + title?: string; + title_link?: string; + ts?: string; + url?: string; + video_html?: string; + video_html_height?: number; + video_html_width?: number; + video_url?: string; } export interface Action { - confirm?: ActionConfirm; - data_source?: string; - id?: string; + confirm?: ActionConfirm; + data_source?: string; + id?: string; min_query_length?: number; - name?: string; - option_groups?: ActionOptionGroup[]; - options?: SelectedOptionElement[]; + name?: string; + option_groups?: ActionOptionGroup[]; + options?: SelectedOptionElement[]; selected_options?: SelectedOptionElement[]; - style?: string; - text?: string; - type?: string; - url?: string; - value?: string; + style?: string; + text?: string; + type?: string; + url?: string; + value?: string; } export interface ActionConfirm { dismiss_text?: string; - ok_text?: string; - text?: string; - title?: string; + ok_text?: string; + text?: string; + title?: string; } export interface ActionOptionGroup { options?: SelectedOptionElement[]; - text?: string; + text?: string; } export interface SelectedOptionElement { - text?: string; + text?: string; value?: string; } export interface TitleBlockElement { - accessory?: Accessory; - alt_text?: string; - app_collaborators?: string[]; - app_id?: string; - author_name?: string; - block_id?: string; - bot_user_id?: string; - button_label?: string; - description?: DescriptionElement | string; - developer_trace_id?: string; - elements?: Accessory[]; - fallback?: string; - fields?: DescriptionElement[]; - function_trigger_id?: string; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - is_animated?: boolean; - is_workflow_app?: boolean; - owning_team_id?: string; - provider_icon_url?: string; - provider_name?: string; + accessory?: Accessory; + alt_text?: string; + app_collaborators?: string[]; + app_id?: string; + author_name?: string; + block_id?: string; + bot_user_id?: string; + button_label?: string; + description?: DescriptionElement | string; + developer_trace_id?: string; + elements?: Accessory[]; + fallback?: string; + fields?: DescriptionElement[]; + function_trigger_id?: string; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + is_animated?: boolean; + is_workflow_app?: boolean; + owning_team_id?: string; + provider_icon_url?: string; + provider_name?: string; sales_home_workflow_app_type?: number; - share_url?: string; - slack_file?: SlackFile; - text?: DescriptionElement; - thumbnail_url?: string; - title?: DescriptionElement | string; - title_url?: string; - trigger_subtype?: string; - trigger_type?: string; - type?: BlockType; - url?: string; - video_url?: string; - workflow_id?: string; + share_url?: string; + slack_file?: SlackFile; + text?: DescriptionElement; + thumbnail_url?: string; + title?: DescriptionElement | string; + title_url?: string; + trigger_subtype?: string; + trigger_type?: string; + type?: BlockType; + url?: string; + video_url?: string; + workflow_id?: string; } export interface Accessory { - accessibility_label?: string; - action_id?: string; - alt_text?: string; - border?: number; - confirm?: AccessoryConfirm; + accessibility_label?: string; + action_id?: string; + alt_text?: string; + border?: number; + confirm?: AccessoryConfirm; default_to_current_conversation?: boolean; - elements?: AccessoryElement[]; - fallback?: string; - filter?: Filter; - focus_on_load?: boolean; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - indent?: number; - initial_channel?: string; - initial_channels?: string[]; - initial_conversation?: string; - initial_conversations?: string[]; - initial_date?: string; - initial_date_time?: number; - initial_option?: InitialOptionElement; - initial_options?: InitialOptionElement[]; - initial_time?: string; - initial_user?: string; - initial_users?: string[]; - max_selected_items?: number; - min_query_length?: number; - offset?: number; - option_groups?: AccessoryOptionGroup[]; - options?: InitialOptionElement[]; - placeholder?: DescriptionElement; - response_url_enabled?: boolean; - slack_file?: SlackFile; - style?: string; - text?: DescriptionElement; - timezone?: string; - type?: string; - url?: string; - value?: string; - workflow?: Workflow; + elements?: AccessoryElement[]; + fallback?: string; + filter?: Filter; + focus_on_load?: boolean; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + indent?: number; + initial_channel?: string; + initial_channels?: string[]; + initial_conversation?: string; + initial_conversations?: string[]; + initial_date?: string; + initial_date_time?: number; + initial_option?: InitialOptionElement; + initial_options?: InitialOptionElement[]; + initial_time?: string; + initial_user?: string; + initial_users?: string[]; + max_selected_items?: number; + min_query_length?: number; + offset?: number; + option_groups?: AccessoryOptionGroup[]; + options?: InitialOptionElement[]; + placeholder?: DescriptionElement; + response_url_enabled?: boolean; + slack_file?: SlackFile; + style?: string; + text?: DescriptionElement; + timezone?: string; + type?: string; + url?: string; + value?: string; + workflow?: Workflow; } export interface AccessoryConfirm { confirm?: DescriptionElement; - deny?: DescriptionElement; - style?: string; - text?: DescriptionElement; - title?: DescriptionElement; + deny?: DescriptionElement; + style?: string; + text?: DescriptionElement; + title?: DescriptionElement; } export interface DescriptionElement { - emoji?: boolean; - text?: string; - type?: DescriptionType; + emoji?: boolean; + text?: string; + type?: DescriptionType; verbatim?: boolean; } @@ -266,42 +266,42 @@ export enum DescriptionType { } export interface AccessoryElement { - border?: number; + border?: number; elements?: PurpleElement[]; - indent?: number; - offset?: number; - style?: string; - type?: FluffyType; + indent?: number; + offset?: number; + style?: string; + type?: FluffyType; } export interface PurpleElement { - channel_id?: string; - fallback?: string; - format?: string; - name?: string; - range?: string; - skin_tone?: number; - style?: Style; - team_id?: string; - text?: string; - timestamp?: string; - type?: PurpleType; - unicode?: string; - unsafe?: boolean; - url?: string; - user_id?: string; + channel_id?: string; + fallback?: string; + format?: string; + name?: string; + range?: string; + skin_tone?: number; + style?: Style; + team_id?: string; + text?: string; + timestamp?: string; + type?: PurpleType; + unicode?: string; + unsafe?: boolean; + url?: string; + user_id?: string; usergroup_id?: string; - value?: string; + value?: string; } export interface Style { - bold?: boolean; + bold?: boolean; client_highlight?: boolean; - code?: boolean; - highlight?: boolean; - italic?: boolean; - strike?: boolean; - unlink?: boolean; + code?: boolean; + highlight?: boolean; + italic?: boolean; + strike?: boolean; + unlink?: boolean; } export enum PurpleType { @@ -325,25 +325,25 @@ export enum FluffyType { } export interface Filter { - exclude_bot_users?: boolean; + exclude_bot_users?: boolean; exclude_external_shared_channels?: boolean; - include?: any[]; + include?: any[]; } export interface InitialOptionElement { description?: DescriptionElement; - text?: DescriptionElement; - url?: string; - value?: string; + text?: DescriptionElement; + url?: string; + value?: string; } export interface AccessoryOptionGroup { - label?: DescriptionElement; + label?: DescriptionElement; options?: InitialOptionElement[]; } export interface SlackFile { - id?: string; + id?: string; url?: string; } @@ -353,11 +353,11 @@ export interface Workflow { export interface Trigger { customizable_input_parameters?: CustomizableInputParameter[]; - url?: string; + url?: string; } export interface CustomizableInputParameter { - name?: string; + name?: string; value?: string; } @@ -379,263 +379,263 @@ export interface AttachmentField { } export interface FileElement { - access?: string; - alt_txt?: string; - app_id?: string; - app_name?: string; - attachments?: any[]; - blocks?: TitleBlockElement[]; - bot_id?: string; - can_toggle_canvas_lock?: boolean; - canvas_template_mode?: string; - cc?: Cc[]; - channel_actions_count?: number; - channel_actions_ts?: string; - channels?: string[]; - comments_count?: number; - converted_pdf?: string; - created?: number; - deanimate?: string; - deanimate_gif?: string; - display_as_bot?: boolean; - dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; - duration_ms?: number; - edit_link?: string; - edit_timestamp?: number; - editable?: boolean; - editor?: string; - editors?: string[]; - external_id?: string; - external_type?: string; - external_url?: string; - favorites?: Favorite[]; - file_access?: string; - filetype?: string; - from?: Cc[]; - groups?: string[]; - has_more?: boolean; - has_more_shares?: boolean; - has_rich_preview?: boolean; - headers?: Headers; - hls?: string; - hls_embed?: string; - id?: string; - image_exif_rotation?: number; - ims?: string[]; - initial_comment?: InitialComment; - is_channel_space?: boolean; - is_external?: boolean; - is_public?: boolean; - is_starred?: boolean; - last_editor?: string; - last_read?: number; - lines?: number; - lines_more?: number; - linked_channel_id?: string; - list_limits?: ListLimits; - list_metadata?: ListMetadata; - media_display_type?: string; - media_progress?: MediaProgress; - mimetype?: string; - mode?: string; - mp4?: string; - mp4_low?: string; - name?: string; - non_owner_editable?: boolean; - num_stars?: number; - org_or_workspace_access?: string; - original_attachment_count?: number; - original_h?: string; - original_w?: string; - permalink?: string; - permalink_public?: string; - pinned_to?: string[]; - pjpeg?: string; - plain_text?: string; - pretty_type?: string; - preview?: string; - preview_highlight?: string; - preview_is_truncated?: boolean; - preview_plain_text?: string; + access?: string; + alt_txt?: string; + app_id?: string; + app_name?: string; + attachments?: any[]; + blocks?: TitleBlockElement[]; + bot_id?: string; + can_toggle_canvas_lock?: boolean; + canvas_template_mode?: string; + cc?: Cc[]; + channel_actions_count?: number; + channel_actions_ts?: string; + channels?: string[]; + comments_count?: number; + converted_pdf?: string; + created?: number; + deanimate?: string; + deanimate_gif?: string; + display_as_bot?: boolean; + dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; + duration_ms?: number; + edit_link?: string; + edit_timestamp?: number; + editable?: boolean; + editor?: string; + editors?: string[]; + external_id?: string; + external_type?: string; + external_url?: string; + favorites?: Favorite[]; + file_access?: string; + filetype?: string; + from?: Cc[]; + groups?: string[]; + has_more?: boolean; + has_more_shares?: boolean; + has_rich_preview?: boolean; + headers?: Headers; + hls?: string; + hls_embed?: string; + id?: string; + image_exif_rotation?: number; + ims?: string[]; + initial_comment?: InitialComment; + is_channel_space?: boolean; + is_external?: boolean; + is_public?: boolean; + is_starred?: boolean; + last_editor?: string; + last_read?: number; + lines?: number; + lines_more?: number; + linked_channel_id?: string; + list_limits?: ListLimits; + list_metadata?: ListMetadata; + media_display_type?: string; + media_progress?: MediaProgress; + mimetype?: string; + mode?: string; + mp4?: string; + mp4_low?: string; + name?: string; + non_owner_editable?: boolean; + num_stars?: number; + org_or_workspace_access?: string; + original_attachment_count?: number; + original_h?: string; + original_w?: string; + permalink?: string; + permalink_public?: string; + pinned_to?: string[]; + pjpeg?: string; + plain_text?: string; + pretty_type?: string; + preview?: string; + preview_highlight?: string; + preview_is_truncated?: boolean; + preview_plain_text?: string; private_channels_with_file_access_count?: number; - private_file_with_access_count?: number; - public_url_shared?: boolean; - quip_thread_id?: string; - reactions?: Reaction[]; - saved?: Saved; - sent_to_self?: boolean; - shares?: Shares; - show_badge?: boolean; - simplified_html?: string; - size?: number; - source_team?: string; - subject?: string; - subtype?: string; - team_pref_version_history_enabled?: boolean; - teams_shared_with?: any[]; - template_conversion_ts?: number; - template_description?: string; - template_icon?: string; - template_name?: string; - template_title?: string; - thumb_1024?: string; - thumb_1024_gif?: string; - thumb_1024_h?: string; - thumb_1024_w?: string; - thumb_160?: string; - thumb_160_gif?: string; - thumb_160_h?: string; - thumb_160_w?: string; - thumb_360?: string; - thumb_360_gif?: string; - thumb_360_h?: string; - thumb_360_w?: string; - thumb_480?: string; - thumb_480_gif?: string; - thumb_480_h?: string; - thumb_480_w?: string; - thumb_64?: string; - thumb_64_gif?: string; - thumb_64_h?: string; - thumb_64_w?: string; - thumb_720?: string; - thumb_720_gif?: string; - thumb_720_h?: string; - thumb_720_w?: string; - thumb_80?: string; - thumb_800?: string; - thumb_800_gif?: string; - thumb_800_h?: string; - thumb_800_w?: string; - thumb_80_gif?: string; - thumb_80_h?: string; - thumb_80_w?: string; - thumb_960?: string; - thumb_960_gif?: string; - thumb_960_h?: string; - thumb_960_w?: string; - thumb_gif?: string; - thumb_pdf?: string; - thumb_pdf_h?: string; - thumb_pdf_w?: string; - thumb_tiny?: string; - thumb_video?: string; - thumb_video_h?: number; - thumb_video_w?: number; - timestamp?: number; - title?: string; - title_blocks?: TitleBlockElement[]; - to?: Cc[]; - transcription?: Transcription; - update_notification?: number; - updated?: number; - url_private?: string; - url_private_download?: string; - url_static_preview?: string; - user?: string; - user_team?: string; - username?: string; - vtt?: string; + private_file_with_access_count?: number; + public_url_shared?: boolean; + quip_thread_id?: string; + reactions?: Reaction[]; + saved?: Saved; + sent_to_self?: boolean; + shares?: Shares; + show_badge?: boolean; + simplified_html?: string; + size?: number; + source_team?: string; + subject?: string; + subtype?: string; + team_pref_version_history_enabled?: boolean; + teams_shared_with?: any[]; + template_conversion_ts?: number; + template_description?: string; + template_icon?: string; + template_name?: string; + template_title?: string; + thumb_1024?: string; + thumb_1024_gif?: string; + thumb_1024_h?: string; + thumb_1024_w?: string; + thumb_160?: string; + thumb_160_gif?: string; + thumb_160_h?: string; + thumb_160_w?: string; + thumb_360?: string; + thumb_360_gif?: string; + thumb_360_h?: string; + thumb_360_w?: string; + thumb_480?: string; + thumb_480_gif?: string; + thumb_480_h?: string; + thumb_480_w?: string; + thumb_64?: string; + thumb_64_gif?: string; + thumb_64_h?: string; + thumb_64_w?: string; + thumb_720?: string; + thumb_720_gif?: string; + thumb_720_h?: string; + thumb_720_w?: string; + thumb_80?: string; + thumb_800?: string; + thumb_800_gif?: string; + thumb_800_h?: string; + thumb_800_w?: string; + thumb_80_gif?: string; + thumb_80_h?: string; + thumb_80_w?: string; + thumb_960?: string; + thumb_960_gif?: string; + thumb_960_h?: string; + thumb_960_w?: string; + thumb_gif?: string; + thumb_pdf?: string; + thumb_pdf_h?: string; + thumb_pdf_w?: string; + thumb_tiny?: string; + thumb_video?: string; + thumb_video_h?: number; + thumb_video_w?: number; + timestamp?: number; + title?: string; + title_blocks?: TitleBlockElement[]; + to?: Cc[]; + transcription?: Transcription; + update_notification?: number; + updated?: number; + url_private?: string; + url_private_download?: string; + url_static_preview?: string; + user?: string; + user_team?: string; + username?: string; + vtt?: string; } export interface Cc { - address?: string; - name?: string; + address?: string; + name?: string; original?: string; } export interface DmMpdmUsersWithFileAccess { - access?: string; + access?: string; user_id?: string; } export interface Favorite { - collection_id?: string; + collection_id?: string; collection_name?: string; - position?: string; + position?: string; } export interface Headers { - date?: string; + date?: string; in_reply_to?: string; - message_id?: string; - reply_to?: string; + message_id?: string; + reply_to?: string; } export interface InitialComment { - channel?: string; - comment?: string; - created?: number; - id?: string; - is_intro?: boolean; + channel?: string; + comment?: string; + created?: number; + id?: string; + is_intro?: boolean; timestamp?: number; - user?: string; + user?: string; } export interface ListLimits { - column_count?: number; - column_count_limit?: number; + column_count?: number; + column_count_limit?: number; over_column_maximum?: boolean; - over_row_maximum?: boolean; - over_view_maximum?: boolean; - row_count?: number; - row_count_limit?: number; - view_count?: number; - view_count_limit?: number; + over_row_maximum?: boolean; + over_view_maximum?: boolean; + row_count?: number; + row_count_limit?: number; + view_count?: number; + view_count_limit?: number; } export interface ListMetadata { creation_source?: CreationSource; - description?: string; - icon?: string; - icon_team_id?: string; - icon_url?: string; - integrations?: string[]; - is_trial?: boolean; - schema?: Schema[]; - views?: View[]; + description?: string; + icon?: string; + icon_team_id?: string; + icon_url?: string; + integrations?: string[]; + is_trial?: boolean; + schema?: Schema[]; + views?: View[]; } export interface CreationSource { - reference_id?: string; - type?: string; + reference_id?: string; + type?: string; workflow_function_id?: string; } export interface Schema { - id?: string; + id?: string; is_primary_column?: boolean; - key?: string; - name?: string; - options?: Options; - type?: string; + key?: string; + name?: string; + options?: Options; + type?: string; } export interface Options { - canvas_id?: string; + canvas_id?: string; canvas_placeholder_mapping?: CanvasPlaceholderMapping[]; - choices?: Choice[]; - currency?: string; - currency_format?: string; - date_format?: string; - default_value?: string; - default_value_typed?: DefaultValueTyped; - emoji?: string; - emoji_team_id?: string; - for_assignment?: boolean; - format?: string; - linked_to?: string[]; - mark_as_done_when_checked?: boolean; - max?: number; - notify_users?: boolean; - precision?: number; - rounding?: string; - show_member_name?: boolean; - time_format?: string; + choices?: Choice[]; + currency?: string; + currency_format?: string; + date_format?: string; + default_value?: string; + default_value_typed?: DefaultValueTyped; + emoji?: string; + emoji_team_id?: string; + for_assignment?: boolean; + format?: string; + linked_to?: string[]; + mark_as_done_when_checked?: boolean; + max?: number; + notify_users?: boolean; + precision?: number; + rounding?: string; + show_member_name?: boolean; + time_format?: string; } export interface CanvasPlaceholderMapping { - column?: string; + column?: string; variable?: string; } @@ -650,64 +650,64 @@ export interface DefaultValueTyped { } export interface View { - columns?: Column[]; - created_by?: string; - date_created?: number; - id?: string; + columns?: Column[]; + created_by?: string; + date_created?: number; + id?: string; is_all_items_view?: boolean; - is_locked?: boolean; - name?: string; - position?: string; + is_locked?: boolean; + name?: string; + position?: string; stick_column_left?: boolean; - type?: string; + type?: string; } export interface Column { - id?: string; - key?: string; + id?: string; + key?: string; position?: string; - visible?: boolean; - width?: number; + visible?: boolean; + width?: number; } export interface MediaProgress { - duration_ms?: number; + duration_ms?: number; max_offset_ms?: number; - offset_ms?: number; + offset_ms?: number; } export interface Reaction { count?: number; - name?: string; - url?: string; + name?: string; + url?: string; users?: string[]; } export interface Saved { date_completed?: number; - date_due?: number; - is_archived?: boolean; - state?: string; + date_due?: number; + is_archived?: boolean; + state?: string; } export interface Shares { private?: { [key: string]: Private[] }; - public?: { [key: string]: Private[] }; + public?: { [key: string]: Private[] }; } export interface Private { - access?: string; - channel_name?: string; - date_last_shared?: number; - latest_reply?: string; - reply_count?: number; - reply_users?: string[]; + access?: string; + channel_name?: string; + date_last_shared?: number; + latest_reply?: string; + reply_count?: number; + reply_users?: string[]; reply_users_count?: number; - share_user_id?: string; - source?: string; - team_id?: string; - thread_ts?: string; - ts?: string; + share_user_id?: string; + source?: string; + team_id?: string; + thread_ts?: string; + ts?: string; } export interface Transcription { @@ -716,48 +716,47 @@ export interface Transcription { } export interface List { - channels?: string[]; - comments_count?: number; - created?: number; - display_as_bot?: boolean; - dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; - editable?: boolean; - external_type?: string; - file_access?: string; - filetype?: string; - groups?: string[]; - has_more_shares?: boolean; - has_rich_preview?: boolean; - id?: string; - ims?: string[]; - is_external?: boolean; - is_public?: boolean; - last_editor?: string; - list_limits?: ListLimits; - list_metadata?: ListMetadata; - mimetype?: string; - mode?: string; - name?: string; - permalink?: string; - permalink_public?: string; - pretty_type?: string; + channels?: string[]; + comments_count?: number; + created?: number; + display_as_bot?: boolean; + dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; + editable?: boolean; + external_type?: string; + file_access?: string; + filetype?: string; + groups?: string[]; + has_more_shares?: boolean; + has_rich_preview?: boolean; + id?: string; + ims?: string[]; + is_external?: boolean; + is_public?: boolean; + last_editor?: string; + list_limits?: ListLimits; + list_metadata?: ListMetadata; + mimetype?: string; + mode?: string; + name?: string; + permalink?: string; + permalink_public?: string; + pretty_type?: string; private_channels_with_file_access_count?: number; - private_file_with_access_count?: number; - public_url_shared?: boolean; - shares?: EventPayload; - size?: number; - timestamp?: number; - title?: string; - updated?: number; - url_private?: string; - url_private_download?: string; - user?: string; - user_team?: string; - username?: string; + private_file_with_access_count?: number; + public_url_shared?: boolean; + shares?: EventPayload; + size?: number; + timestamp?: number; + title?: string; + updated?: number; + url_private?: string; + url_private_download?: string; + user?: string; + user_team?: string; + username?: string; } -export interface EventPayload { -} +export type EventPayload = {}; export interface PurpleListRecord { record?: Record; @@ -765,90 +764,90 @@ export interface PurpleListRecord { } export interface Record { - fields?: RecordField[]; + fields?: RecordField[]; record_id?: string; } export interface RecordField { attachment?: any[]; - channel?: any[]; - checkbox?: boolean; - column_id?: string; - date?: any[]; - email?: any[]; - key?: string; - message?: FieldMessage; - number?: any[]; - phone?: any[]; - rating?: any[]; - rich_text?: any[]; - select?: any[]; - text?: string; - timestamp?: any[]; - user?: any[]; - value?: string; + channel?: any[]; + checkbox?: boolean; + column_id?: string; + date?: any[]; + email?: any[]; + key?: string; + message?: FieldMessage; + number?: any[]; + phone?: any[]; + rating?: any[]; + rich_text?: any[]; + select?: any[]; + text?: string; + timestamp?: any[]; + user?: any[]; + value?: string; } export interface FieldMessage { - app_id?: string; - attachments?: any[]; - blocks?: TitleBlockElement[]; - bot_id?: string; - bot_link?: string; - bot_profile?: BotProfile; - channel?: string; - client_msg_id?: string; - comment?: Comment; - display_as_bot?: boolean; - edited?: Edited; - file?: PurpleFile; - files?: any[]; - hidden?: boolean; - icons?: MessageIcons; - inviter?: string; - is_intro?: boolean; - is_locked?: boolean; - is_starred?: boolean; + app_id?: string; + attachments?: any[]; + blocks?: TitleBlockElement[]; + bot_id?: string; + bot_link?: string; + bot_profile?: BotProfile; + channel?: string; + client_msg_id?: string; + comment?: Comment; + display_as_bot?: boolean; + edited?: Edited; + file?: PurpleFile; + files?: any[]; + hidden?: boolean; + icons?: MessageIcons; + inviter?: string; + is_intro?: boolean; + is_locked?: boolean; + is_starred?: boolean; is_thread_broadcast?: boolean; - item?: Comment; - item_type?: string; - last_read?: string; - latest_reply?: string; - metadata?: PurpleMetadata; - no_notifications?: boolean; - parent_user_id?: string; - pinned_to?: any[]; - purpose?: string; - reactions?: any[]; - replies?: any[]; - reply_count?: number; - reply_users?: any[]; - reply_users_count?: number; - room?: Room; - root?: PurpleRoot; - subscribed?: boolean; - subtype?: string; - team?: string; - text?: string; - thread_ts?: string; - topic?: string; - ts?: string; - type?: string; - unfurl_links?: boolean; - unfurl_media?: boolean; - upload?: boolean; - user?: string; - username?: string; - wibblr?: boolean; - x_files?: any[]; + item?: Comment; + item_type?: string; + last_read?: string; + latest_reply?: string; + metadata?: PurpleMetadata; + no_notifications?: boolean; + parent_user_id?: string; + pinned_to?: any[]; + purpose?: string; + reactions?: any[]; + replies?: any[]; + reply_count?: number; + reply_users?: any[]; + reply_users_count?: number; + room?: Room; + root?: PurpleRoot; + subscribed?: boolean; + subtype?: string; + team?: string; + text?: string; + thread_ts?: string; + topic?: string; + ts?: string; + type?: string; + unfurl_links?: boolean; + unfurl_media?: boolean; + upload?: boolean; + user?: string; + username?: string; + wibblr?: boolean; + x_files?: any[]; } export interface BotProfile { - app_id?: string; + app_id?: string; deleted?: boolean; - icons?: BotProfileIcons; - id?: string; - name?: string; + icons?: BotProfileIcons; + id?: string; + name?: string; team_id?: string; updated?: number; } @@ -860,208 +859,208 @@ export interface BotProfileIcons { } export interface Comment { - comment?: string; - created?: string; - display_as_bot?: boolean; - edit_link?: string; - editable?: boolean; - external_type?: string; - filetype?: string; - has_rich_preview?: boolean; - id?: string; - is_external?: boolean; - is_intro?: boolean; - is_public?: boolean; - is_starred?: boolean; - lines?: number; - lines_more?: number; - media_display_type?: string; - mimetype?: string; - mode?: string; - name?: string; - permalink?: string; - permalink_public?: boolean; - pretty_type?: string; - preview?: string; - preview_highlight?: string; + comment?: string; + created?: string; + display_as_bot?: boolean; + edit_link?: string; + editable?: boolean; + external_type?: string; + filetype?: string; + has_rich_preview?: boolean; + id?: string; + is_external?: boolean; + is_intro?: boolean; + is_public?: boolean; + is_starred?: boolean; + lines?: number; + lines_more?: number; + media_display_type?: string; + mimetype?: string; + mode?: string; + name?: string; + permalink?: string; + permalink_public?: boolean; + pretty_type?: string; + preview?: string; + preview_highlight?: string; preview_is_truncated?: boolean; - public_url_shared?: boolean; - size?: number; - timestamp?: string; - title?: string; - url_private?: string; + public_url_shared?: boolean; + size?: number; + timestamp?: string; + title?: string; + url_private?: string; url_private_download?: boolean; - user?: string; - username?: string; + user?: string; + username?: string; } export interface Edited { - ts?: string; + ts?: string; user?: string; } export interface PurpleFile { - access?: string; - alt_txt?: string; - app_id?: string; - app_name?: string; - attachments?: any[]; - blocks?: any[]; - bot_id?: string; - can_toggle_canvas_lock?: boolean; - canvas_template_mode?: string; - cc?: any[]; - channel_actions_count?: number; - channel_actions_ts?: string; - channels?: any[]; - comments_count?: number; - converted_pdf?: string; - created?: number; - deanimate?: string; - deanimate_gif?: string; - display_as_bot?: boolean; - dm_mpdm_users_with_file_access?: any[]; - duration_ms?: number; - edit_link?: string; - edit_timestamp?: number; - editable?: boolean; - editor?: string; - editors?: any[]; - external_id?: string; - external_type?: string; - external_url?: string; - favorites?: any[]; - file_access?: string; - filetype?: string; - from?: any[]; - groups?: any[]; - has_more?: boolean; - has_more_shares?: boolean; - has_rich_preview?: boolean; - headers?: Headers; - hls?: string; - hls_embed?: string; - id?: string; - image_exif_rotation?: number; - ims?: any[]; - initial_comment?: InitialComment; - is_channel_space?: boolean; - is_external?: boolean; - is_public?: boolean; - is_starred?: boolean; - last_editor?: string; - last_read?: number; - lines?: number; - lines_more?: number; - linked_channel_id?: string; - list_limits?: ListLimits; - list_metadata?: ListMetadata; - media_display_type?: string; - media_progress?: MediaProgress; - mimetype?: string; - mode?: string; - mp4?: string; - mp4_low?: string; - name?: string; - non_owner_editable?: boolean; - num_stars?: number; - org_or_workspace_access?: string; - original_attachment_count?: number; - original_h?: string; - original_w?: string; - permalink?: string; - permalink_public?: string; - pinned_to?: any[]; - pjpeg?: string; - plain_text?: string; - pretty_type?: string; - preview?: string; - preview_highlight?: string; - preview_is_truncated?: boolean; - preview_plain_text?: string; + access?: string; + alt_txt?: string; + app_id?: string; + app_name?: string; + attachments?: any[]; + blocks?: any[]; + bot_id?: string; + can_toggle_canvas_lock?: boolean; + canvas_template_mode?: string; + cc?: any[]; + channel_actions_count?: number; + channel_actions_ts?: string; + channels?: any[]; + comments_count?: number; + converted_pdf?: string; + created?: number; + deanimate?: string; + deanimate_gif?: string; + display_as_bot?: boolean; + dm_mpdm_users_with_file_access?: any[]; + duration_ms?: number; + edit_link?: string; + edit_timestamp?: number; + editable?: boolean; + editor?: string; + editors?: any[]; + external_id?: string; + external_type?: string; + external_url?: string; + favorites?: any[]; + file_access?: string; + filetype?: string; + from?: any[]; + groups?: any[]; + has_more?: boolean; + has_more_shares?: boolean; + has_rich_preview?: boolean; + headers?: Headers; + hls?: string; + hls_embed?: string; + id?: string; + image_exif_rotation?: number; + ims?: any[]; + initial_comment?: InitialComment; + is_channel_space?: boolean; + is_external?: boolean; + is_public?: boolean; + is_starred?: boolean; + last_editor?: string; + last_read?: number; + lines?: number; + lines_more?: number; + linked_channel_id?: string; + list_limits?: ListLimits; + list_metadata?: ListMetadata; + media_display_type?: string; + media_progress?: MediaProgress; + mimetype?: string; + mode?: string; + mp4?: string; + mp4_low?: string; + name?: string; + non_owner_editable?: boolean; + num_stars?: number; + org_or_workspace_access?: string; + original_attachment_count?: number; + original_h?: string; + original_w?: string; + permalink?: string; + permalink_public?: string; + pinned_to?: any[]; + pjpeg?: string; + plain_text?: string; + pretty_type?: string; + preview?: string; + preview_highlight?: string; + preview_is_truncated?: boolean; + preview_plain_text?: string; private_channels_with_file_access_count?: number; - private_file_with_access_count?: number; - public_url_shared?: boolean; - quip_thread_id?: string; - reactions?: any[]; - saved?: Saved; - sent_to_self?: boolean; - shares?: EventPayload; - show_badge?: boolean; - simplified_html?: string; - size?: number; - source_team?: string; - subject?: string; - subtype?: string; - team_pref_version_history_enabled?: boolean; - teams_shared_with?: any[]; - template_conversion_ts?: number; - template_description?: string; - template_icon?: string; - template_name?: string; - template_title?: string; - thumb_1024?: string; - thumb_1024_gif?: string; - thumb_1024_h?: string; - thumb_1024_w?: string; - thumb_160?: string; - thumb_160_gif?: string; - thumb_160_h?: string; - thumb_160_w?: string; - thumb_360?: string; - thumb_360_gif?: string; - thumb_360_h?: string; - thumb_360_w?: string; - thumb_480?: string; - thumb_480_gif?: string; - thumb_480_h?: string; - thumb_480_w?: string; - thumb_64?: string; - thumb_64_gif?: string; - thumb_64_h?: string; - thumb_64_w?: string; - thumb_720?: string; - thumb_720_gif?: string; - thumb_720_h?: string; - thumb_720_w?: string; - thumb_80?: string; - thumb_800?: string; - thumb_800_gif?: string; - thumb_800_h?: string; - thumb_800_w?: string; - thumb_80_gif?: string; - thumb_80_h?: string; - thumb_80_w?: string; - thumb_960?: string; - thumb_960_gif?: string; - thumb_960_h?: string; - thumb_960_w?: string; - thumb_gif?: string; - thumb_pdf?: string; - thumb_pdf_h?: string; - thumb_pdf_w?: string; - thumb_tiny?: string; - thumb_video?: string; - thumb_video_h?: number; - thumb_video_w?: number; - timestamp?: number; - title?: string; - title_blocks?: any[]; - to?: any[]; - transcription?: Transcription; - update_notification?: number; - updated?: number; - url_private?: string; - url_private_download?: string; - url_static_preview?: string; - user?: string; - user_team?: string; - username?: string; - vtt?: string; + private_file_with_access_count?: number; + public_url_shared?: boolean; + quip_thread_id?: string; + reactions?: any[]; + saved?: Saved; + sent_to_self?: boolean; + shares?: EventPayload; + show_badge?: boolean; + simplified_html?: string; + size?: number; + source_team?: string; + subject?: string; + subtype?: string; + team_pref_version_history_enabled?: boolean; + teams_shared_with?: any[]; + template_conversion_ts?: number; + template_description?: string; + template_icon?: string; + template_name?: string; + template_title?: string; + thumb_1024?: string; + thumb_1024_gif?: string; + thumb_1024_h?: string; + thumb_1024_w?: string; + thumb_160?: string; + thumb_160_gif?: string; + thumb_160_h?: string; + thumb_160_w?: string; + thumb_360?: string; + thumb_360_gif?: string; + thumb_360_h?: string; + thumb_360_w?: string; + thumb_480?: string; + thumb_480_gif?: string; + thumb_480_h?: string; + thumb_480_w?: string; + thumb_64?: string; + thumb_64_gif?: string; + thumb_64_h?: string; + thumb_64_w?: string; + thumb_720?: string; + thumb_720_gif?: string; + thumb_720_h?: string; + thumb_720_w?: string; + thumb_80?: string; + thumb_800?: string; + thumb_800_gif?: string; + thumb_800_h?: string; + thumb_800_w?: string; + thumb_80_gif?: string; + thumb_80_h?: string; + thumb_80_w?: string; + thumb_960?: string; + thumb_960_gif?: string; + thumb_960_h?: string; + thumb_960_w?: string; + thumb_gif?: string; + thumb_pdf?: string; + thumb_pdf_h?: string; + thumb_pdf_w?: string; + thumb_tiny?: string; + thumb_video?: string; + thumb_video_h?: number; + thumb_video_w?: number; + timestamp?: number; + title?: string; + title_blocks?: any[]; + to?: any[]; + transcription?: Transcription; + update_notification?: number; + updated?: number; + url_private?: string; + url_private_download?: string; + url_static_preview?: string; + user?: string; + user_team?: string; + username?: string; + vtt?: string; } export interface MessageIcons { - emoji?: string; + emoji?: string; image_36?: string; image_48?: string; image_64?: string; @@ -1073,77 +1072,77 @@ export interface PurpleMetadata { } export interface Room { - app_id?: string; - attached_file_ids?: any[]; - background_id?: string; - call_family?: string; - canvas_background?: string; - canvas_thread_ts?: string; - channels?: any[]; - created_by?: string; - date_end?: number; - date_start?: number; - display_id?: string; - external_unique_id?: string; - has_ended?: boolean; - id?: string; - is_dm_call?: boolean; - is_prewarmed?: boolean; - is_scheduled?: boolean; - media_backend_type?: string; - media_server?: string; - name?: string; - participant_history?: any[]; - participants?: any[]; - participants_camera_off?: any[]; - participants_camera_on?: any[]; + app_id?: string; + attached_file_ids?: any[]; + background_id?: string; + call_family?: string; + canvas_background?: string; + canvas_thread_ts?: string; + channels?: any[]; + created_by?: string; + date_end?: number; + date_start?: number; + display_id?: string; + external_unique_id?: string; + has_ended?: boolean; + id?: string; + is_dm_call?: boolean; + is_prewarmed?: boolean; + is_scheduled?: boolean; + media_backend_type?: string; + media_server?: string; + name?: string; + participant_history?: any[]; + participants?: any[]; + participants_camera_off?: any[]; + participants_camera_on?: any[]; participants_screenshare_off?: any[]; - participants_screenshare_on?: any[]; - thread_root_ts?: string; - was_accepted?: boolean; - was_missed?: boolean; - was_rejected?: boolean; + participants_screenshare_on?: any[]; + thread_root_ts?: string; + was_accepted?: boolean; + was_missed?: boolean; + was_rejected?: boolean; } export interface PurpleRoot { - bot_id?: string; - bot_profile?: BotProfile; - edited?: Edited; - icons?: MessageIcons; - last_read?: string; - latest_reply?: string; - mrkdwn?: boolean; - no_notifications?: boolean; - parent_user_id?: string; - replies?: any[]; - reply_count?: number; - reply_users?: any[]; + bot_id?: string; + bot_profile?: BotProfile; + edited?: Edited; + icons?: MessageIcons; + last_read?: string; + latest_reply?: string; + mrkdwn?: boolean; + no_notifications?: boolean; + parent_user_id?: string; + replies?: any[]; + reply_count?: number; + reply_users?: any[]; reply_users_count?: number; - room?: Room; - subscribed?: boolean; - subtype?: string; - team?: string; - text?: string; - thread_ts?: string; - ts?: string; - type?: string; - unread_count?: number; - user?: string; - username?: string; + room?: Room; + subscribed?: boolean; + subtype?: string; + team?: string; + text?: string; + thread_ts?: string; + ts?: string; + type?: string; + unread_count?: number; + user?: string; + username?: string; } export interface ListRecordElement { - created_by?: string; - date_created?: number; - fields?: RecordField[]; - id?: string; - is_subscribed?: boolean; - list_id?: string; - platform_refs?: PlatformRefs; - position?: string; - saved?: Saved; - thread_ts?: string; - updated_by?: string; + created_by?: string; + date_created?: number; + fields?: RecordField[]; + id?: string; + is_subscribed?: boolean; + list_id?: string; + platform_refs?: PlatformRefs; + position?: string; + saved?: Saved; + thread_ts?: string; + updated_by?: string; updated_timestamp?: string; } @@ -1156,154 +1155,154 @@ export interface PlatformRefs { export interface MessageBlock { channel?: string; message?: FieldMessage; - team?: string; - ts?: string; + team?: string; + ts?: string; } export interface AttachmentMetadata { - extension?: string; - format?: string; - original_h?: number; - original_w?: number; - rotation?: number; - thumb_160?: boolean; + extension?: string; + format?: string; + original_h?: number; + original_w?: number; + rotation?: number; + thumb_160?: boolean; thumb_360_h?: number; thumb_360_w?: number; - thumb_64?: boolean; - thumb_80?: boolean; - thumb_tiny?: string; + thumb_64?: boolean; + thumb_80?: boolean; + thumb_tiny?: string; } export interface Preview { can_remove?: boolean; - icon_url?: string; - subtitle?: DescriptionElement; - title?: DescriptionElement; - type?: string; + icon_url?: string; + subtitle?: DescriptionElement; + title?: DescriptionElement; + type?: string; } export interface PurpleBlock { - accessory?: Accessory; - alt_text?: string; - api_decoration_available?: boolean; - app_collaborators?: string[]; - app_id?: string; - author_name?: string; - block_id?: string; - bot_user_id?: string; - button_label?: string; - call?: Call; - call_id?: string; - description?: DescriptionElement; - developer_trace_id?: string; - dispatch_action?: boolean; - element?: Accessory; - elements?: Accessory[]; - external_id?: string; - fallback?: string; - fields?: DescriptionElement[]; - file?: FileElement; - file_id?: string; - function_trigger_id?: string; - hint?: DescriptionElement; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - is_animated?: boolean; - is_workflow_app?: boolean; - label?: DescriptionElement; - optional?: boolean; - owning_team_id?: string; - provider_icon_url?: string; - provider_name?: string; + accessory?: Accessory; + alt_text?: string; + api_decoration_available?: boolean; + app_collaborators?: string[]; + app_id?: string; + author_name?: string; + block_id?: string; + bot_user_id?: string; + button_label?: string; + call?: Call; + call_id?: string; + description?: DescriptionElement; + developer_trace_id?: string; + dispatch_action?: boolean; + element?: Accessory; + elements?: Accessory[]; + external_id?: string; + fallback?: string; + fields?: DescriptionElement[]; + file?: FileElement; + file_id?: string; + function_trigger_id?: string; + hint?: DescriptionElement; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + is_animated?: boolean; + is_workflow_app?: boolean; + label?: DescriptionElement; + optional?: boolean; + owning_team_id?: string; + provider_icon_url?: string; + provider_name?: string; sales_home_workflow_app_type?: number; - share_url?: string; - slack_file?: SlackFile; - source?: string; - text?: DescriptionElement; - thumbnail_url?: string; - title?: DescriptionElement; - title_url?: string; - trigger_subtype?: string; - trigger_type?: string; - type?: BlockType; - url?: string; - video_url?: string; - workflow_id?: string; + share_url?: string; + slack_file?: SlackFile; + source?: string; + text?: DescriptionElement; + thumbnail_url?: string; + title?: DescriptionElement; + title_url?: string; + trigger_subtype?: string; + trigger_type?: string; + type?: BlockType; + url?: string; + video_url?: string; + workflow_id?: string; } export interface Call { media_backend_type?: string; - v1?: V1; + v1?: V1; } export interface V1 { - active_participants?: Participant[]; - all_participants?: Participant[]; - app_icon_urls?: AppIconUrls; - app_id?: string; - channels?: string[]; - created_by?: string; - date_end?: number; - date_start?: number; + active_participants?: Participant[]; + all_participants?: Participant[]; + app_icon_urls?: AppIconUrls; + app_id?: string; + channels?: string[]; + created_by?: string; + date_end?: number; + date_start?: number; desktop_app_join_url?: string; - display_id?: string; - has_ended?: boolean; - id?: string; - is_dm_call?: boolean; - join_url?: string; - name?: string; - was_accepted?: boolean; - was_missed?: boolean; - was_rejected?: boolean; + display_id?: string; + has_ended?: boolean; + id?: string; + is_dm_call?: boolean; + join_url?: string; + name?: string; + was_accepted?: boolean; + was_missed?: boolean; + was_rejected?: boolean; } export interface Participant { - avatar_url?: string; + avatar_url?: string; display_name?: string; - external_id?: string; - slack_id?: string; + external_id?: string; + slack_id?: string; } export interface AppIconUrls { - image_1024?: string; - image_128?: string; - image_192?: string; - image_32?: string; - image_36?: string; - image_48?: string; - image_512?: string; - image_64?: string; - image_72?: string; - image_96?: string; + image_1024?: string; + image_128?: string; + image_192?: string; + image_32?: string; + image_36?: string; + image_48?: string; + image_512?: string; + image_64?: string; + image_72?: string; + image_96?: string; image_original?: string; } export interface FluffyMetadata { event_payload?: EventPayload; - event_type?: string; + event_type?: string; } export interface FluffyRoot { - bot_id?: string; - icons?: PurpleIcons; - latest_reply?: string; - parent_user_id?: string; - reply_count?: number; - reply_users?: string[]; + bot_id?: string; + icons?: PurpleIcons; + latest_reply?: string; + parent_user_id?: string; + reply_count?: number; + reply_users?: string[]; reply_users_count?: number; - subscribed?: boolean; - subtype?: string; - text?: string; - thread_ts?: string; - ts?: string; - type?: string; - username?: string; + subscribed?: boolean; + subtype?: string; + text?: string; + thread_ts?: string; + ts?: string; + type?: string; + username?: string; } export interface PurpleIcons { - emoji?: string; + emoji?: string; image_64?: string; } diff --git a/packages/web-api/src/types/response/ConversationsInfoResponse.ts b/packages/web-api/src/types/response/ConversationsInfoResponse.ts index 3b8950cfa..ccaa461a2 100644 --- a/packages/web-api/src/types/response/ConversationsInfoResponse.ts +++ b/packages/web-api/src/types/response/ConversationsInfoResponse.ts @@ -8,60 +8,60 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ConversationsInfoResponse = WebAPICallResult & { - channel?: Channel; - error?: string; - needed?: string; - ok?: boolean; + channel?: Channel; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; export interface Channel { connected_limited_team_ids?: string[]; - connected_team_ids?: string[]; - context_team_id?: string; - conversation_host_id?: string; - created?: number; - creator?: string; - id?: string; - internal_team_ids?: string[]; - is_archived?: boolean; - is_channel?: boolean; - is_ext_shared?: boolean; - is_general?: boolean; - is_global_shared?: boolean; - is_group?: boolean; - is_im?: boolean; - is_member?: boolean; - is_moved?: number; - is_mpim?: boolean; - is_non_threadable?: boolean; - is_org_default?: boolean; - is_org_mandatory?: boolean; - is_org_shared?: boolean; - is_pending_ext_shared?: boolean; - is_private?: boolean; - is_read_only?: boolean; - is_shared?: boolean; - is_thread_only?: boolean; - last_read?: string; - locale?: string; - name?: string; - name_normalized?: string; - num_members?: number; + connected_team_ids?: string[]; + context_team_id?: string; + conversation_host_id?: string; + created?: number; + creator?: string; + id?: string; + internal_team_ids?: string[]; + is_archived?: boolean; + is_channel?: boolean; + is_ext_shared?: boolean; + is_general?: boolean; + is_global_shared?: boolean; + is_group?: boolean; + is_im?: boolean; + is_member?: boolean; + is_moved?: number; + is_mpim?: boolean; + is_non_threadable?: boolean; + is_org_default?: boolean; + is_org_mandatory?: boolean; + is_org_shared?: boolean; + is_pending_ext_shared?: boolean; + is_private?: boolean; + is_read_only?: boolean; + is_shared?: boolean; + is_thread_only?: boolean; + last_read?: string; + locale?: string; + name?: string; + name_normalized?: string; + num_members?: number; pending_connected_team_ids?: string[]; - pending_shared?: string[]; - previous_names?: string[]; - purpose?: Purpose; - shared_team_ids?: string[]; - topic?: Purpose; - unlinked?: number; - updated?: number; + pending_shared?: string[]; + previous_names?: string[]; + purpose?: Purpose; + shared_team_ids?: string[]; + topic?: Purpose; + unlinked?: number; + updated?: number; } export interface Purpose { - creator?: string; + creator?: string; last_set?: number; - value?: string; + value?: string; } diff --git a/packages/web-api/src/types/response/ConversationsInviteResponse.ts b/packages/web-api/src/types/response/ConversationsInviteResponse.ts index 15a9c2384..632455e12 100644 --- a/packages/web-api/src/types/response/ConversationsInviteResponse.ts +++ b/packages/web-api/src/types/response/ConversationsInviteResponse.ts @@ -8,57 +8,57 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ConversationsInviteResponse = WebAPICallResult & { - channel?: Channel; - error?: string; - errors?: Error[]; - needed?: string; - ok?: boolean; + channel?: Channel; + error?: string; + errors?: Error[]; + needed?: string; + ok?: boolean; provided?: string; }; export interface Channel { - context_team_id?: string; - created?: number; - creator?: string; - id?: string; - internal_team_ids?: string[]; - is_archived?: boolean; - is_channel?: boolean; - is_ext_shared?: boolean; - is_general?: boolean; - is_group?: boolean; - is_im?: boolean; - is_member?: boolean; - is_moved?: number; - is_mpim?: boolean; - is_open?: boolean; - is_org_shared?: boolean; - is_pending_ext_shared?: boolean; - is_private?: boolean; - is_shared?: boolean; - last_read?: string; - name?: string; - name_normalized?: string; + context_team_id?: string; + created?: number; + creator?: string; + id?: string; + internal_team_ids?: string[]; + is_archived?: boolean; + is_channel?: boolean; + is_ext_shared?: boolean; + is_general?: boolean; + is_group?: boolean; + is_im?: boolean; + is_member?: boolean; + is_moved?: number; + is_mpim?: boolean; + is_open?: boolean; + is_org_shared?: boolean; + is_pending_ext_shared?: boolean; + is_private?: boolean; + is_shared?: boolean; + last_read?: string; + name?: string; + name_normalized?: string; pending_connected_team_ids?: string[]; - pending_shared?: string[]; - previous_names?: string[]; - purpose?: Purpose; - shared_team_ids?: string[]; - topic?: Purpose; - unlinked?: number; - updated?: number; + pending_shared?: string[]; + previous_names?: string[]; + purpose?: Purpose; + shared_team_ids?: string[]; + topic?: Purpose; + unlinked?: number; + updated?: number; } export interface Purpose { - creator?: string; + creator?: string; last_set?: number; - value?: string; + value?: string; } export interface Error { error?: string; - ok?: boolean; - user?: string; + ok?: boolean; + user?: string; } diff --git a/packages/web-api/src/types/response/ConversationsInviteSharedResponse.ts b/packages/web-api/src/types/response/ConversationsInviteSharedResponse.ts index 1e089be05..ef5c9523b 100644 --- a/packages/web-api/src/types/response/ConversationsInviteSharedResponse.ts +++ b/packages/web-api/src/types/response/ConversationsInviteSharedResponse.ts @@ -8,14 +8,14 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ConversationsInviteSharedResponse = WebAPICallResult & { - conf_code?: string; - error?: string; - invite_id?: string; + conf_code?: string; + error?: string; + invite_id?: string; is_legacy_shared_channel?: boolean; - needed?: string; - ok?: boolean; - provided?: string; - url?: string; + needed?: string; + ok?: boolean; + provided?: string; + url?: string; }; diff --git a/packages/web-api/src/types/response/ConversationsJoinResponse.ts b/packages/web-api/src/types/response/ConversationsJoinResponse.ts index 9c6165627..76f856c01 100644 --- a/packages/web-api/src/types/response/ConversationsJoinResponse.ts +++ b/packages/web-api/src/types/response/ConversationsJoinResponse.ts @@ -8,73 +8,73 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ConversationsJoinResponse = WebAPICallResult & { - channel?: Channel; - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + channel?: Channel; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; - warning?: string; + warning?: string; }; export interface Channel { - context_team_id?: string; - created?: number; - creator?: string; - id?: string; - internal_team_ids?: string[]; - is_archived?: boolean; - is_channel?: boolean; - is_ext_shared?: boolean; - is_general?: boolean; - is_group?: boolean; - is_im?: boolean; - is_member?: boolean; - is_moved?: number; - is_mpim?: boolean; - is_org_shared?: boolean; - is_pending_ext_shared?: boolean; - is_private?: boolean; - is_shared?: boolean; - is_starred?: boolean; - last_read?: string; - name?: string; - name_normalized?: string; + context_team_id?: string; + created?: number; + creator?: string; + id?: string; + internal_team_ids?: string[]; + is_archived?: boolean; + is_channel?: boolean; + is_ext_shared?: boolean; + is_general?: boolean; + is_group?: boolean; + is_im?: boolean; + is_member?: boolean; + is_moved?: number; + is_mpim?: boolean; + is_org_shared?: boolean; + is_pending_ext_shared?: boolean; + is_private?: boolean; + is_shared?: boolean; + is_starred?: boolean; + last_read?: string; + name?: string; + name_normalized?: string; pending_connected_team_ids?: string[]; - pending_shared?: string[]; - previous_names?: string[]; - priority?: number; - properties?: Properties; - purpose?: Purpose; - shared_team_ids?: string[]; - topic?: Purpose; - unlinked?: number; - updated?: number; + pending_shared?: string[]; + previous_names?: string[]; + priority?: number; + properties?: Properties; + purpose?: Purpose; + shared_team_ids?: string[]; + topic?: Purpose; + unlinked?: number; + updated?: number; } export interface Properties { canvas?: Canvas; - tabs?: Tab[]; + tabs?: Tab[]; } export interface Canvas { - file_id?: string; - is_empty?: boolean; + file_id?: string; + is_empty?: boolean; quip_thread_id?: string; } export interface Tab { - id?: string; + id?: string; label?: string; - type?: string; + type?: string; } export interface Purpose { - creator?: string; + creator?: string; last_set?: number; - value?: string; + value?: string; } export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/ConversationsKickResponse.ts b/packages/web-api/src/types/response/ConversationsKickResponse.ts index 4986d8916..18510ca0a 100644 --- a/packages/web-api/src/types/response/ConversationsKickResponse.ts +++ b/packages/web-api/src/types/response/ConversationsKickResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ConversationsKickResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/ConversationsLeaveResponse.ts b/packages/web-api/src/types/response/ConversationsLeaveResponse.ts index 5d97618b1..db6acb1f0 100644 --- a/packages/web-api/src/types/response/ConversationsLeaveResponse.ts +++ b/packages/web-api/src/types/response/ConversationsLeaveResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ConversationsLeaveResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/ConversationsListConnectInvitesResponse.ts b/packages/web-api/src/types/response/ConversationsListConnectInvitesResponse.ts index f4590ae07..77f252277 100644 --- a/packages/web-api/src/types/response/ConversationsListConnectInvitesResponse.ts +++ b/packages/web-api/src/types/response/ConversationsListConnectInvitesResponse.ts @@ -8,112 +8,112 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ConversationsListConnectInvitesResponse = WebAPICallResult & { - arg?: string; - error?: string; - invites?: InviteElement[]; - needed?: string; - ok?: boolean; - provided?: string; + arg?: string; + error?: string; + invites?: InviteElement[]; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; export interface InviteElement { - acceptances?: Acceptance[]; - channel?: Channel; + acceptances?: Acceptance[]; + channel?: Channel; date_last_updated?: number; - direction?: string; - invite?: InviteInvite; - invite_type?: string; - status?: string; + direction?: string; + invite?: InviteInvite; + invite_type?: string; + status?: string; } export interface Acceptance { - accepting_team?: IngTeam; - accepting_user?: TingUser; - approval_status?: string; - date_accepted?: number; - date_invalid?: number; + accepting_team?: IngTeam; + accepting_user?: TingUser; + approval_status?: string; + date_accepted?: number; + date_invalid?: number; date_last_updated?: number; - reviews?: Review[]; + reviews?: Review[]; } export interface IngTeam { avatar_base_url?: string; - date_created?: number; - domain?: string; - icon?: Icon; - id?: string; - is_verified?: boolean; - name?: string; + date_created?: number; + domain?: string; + icon?: Icon; + id?: string; + is_verified?: boolean; + name?: string; } export interface Icon { - image_102?: string; - image_132?: string; - image_230?: string; - image_34?: string; - image_44?: string; - image_68?: string; - image_88?: string; - image_default?: boolean; + image_102?: string; + image_132?: string; + image_230?: string; + image_34?: string; + image_44?: string; + image_68?: string; + image_88?: string; + image_default?: boolean; image_original?: string; } export interface TingUser { - id?: string; - name?: string; - profile?: Profile; - team_id?: string; - updated?: number; + id?: string; + name?: string; + profile?: Profile; + team_id?: string; + updated?: number; who_can_share_contact_card?: string; } export interface Profile { - avatar_hash?: string; - display_name?: string; + avatar_hash?: string; + display_name?: string; display_name_normalized?: string; - email?: string; - image_1024?: string; - image_192?: string; - image_24?: string; - image_32?: string; - image_48?: string; - image_512?: string; - image_72?: string; - image_original?: string; - is_custom_image?: boolean; - real_name?: string; - real_name_normalized?: string; - team?: string; + email?: string; + image_1024?: string; + image_192?: string; + image_24?: string; + image_32?: string; + image_48?: string; + image_512?: string; + image_72?: string; + image_original?: string; + is_custom_image?: boolean; + real_name?: string; + real_name_normalized?: string; + team?: string; } export interface Review { - date_review?: number; + date_review?: number; reviewing_team?: IngTeam; - type?: string; + type?: string; } export interface Channel { - id?: string; - is_im?: boolean; + id?: string; + is_im?: boolean; is_private?: boolean; - name?: string; + name?: string; } export interface InviteInvite { - date_created?: number; - date_invalid?: number; - id?: string; - inviting_team?: IngTeam; - inviting_user?: TingUser; - link?: string; - recipient_email?: string; + date_created?: number; + date_invalid?: number; + id?: string; + inviting_team?: IngTeam; + inviting_user?: TingUser; + link?: string; + recipient_email?: string; recipient_user_id?: string; } export interface ResponseMetadata { - messages?: string[]; + messages?: string[]; next_cursor?: string; } diff --git a/packages/web-api/src/types/response/ConversationsListResponse.ts b/packages/web-api/src/types/response/ConversationsListResponse.ts index 61ac4534e..135967fdb 100644 --- a/packages/web-api/src/types/response/ConversationsListResponse.ts +++ b/packages/web-api/src/types/response/ConversationsListResponse.ts @@ -8,66 +8,66 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ConversationsListResponse = WebAPICallResult & { - channels?: Channel[]; - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + channels?: Channel[]; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; export interface Channel { - context_team_id?: string; - conversation_host_id?: string; - created?: number; - creator?: string; - id?: string; - internal_team_ids?: string[]; - is_archived?: boolean; - is_channel?: boolean; - is_ext_shared?: boolean; - is_general?: boolean; - is_global_shared?: boolean; - is_group?: boolean; - is_im?: boolean; - is_member?: boolean; - is_moved?: number; - is_mpim?: boolean; - is_org_default?: boolean; - is_org_mandatory?: boolean; - is_org_shared?: boolean; - is_pending_ext_shared?: boolean; - is_private?: boolean; - is_shared?: boolean; - is_user_deleted?: boolean; - name?: string; - name_normalized?: string; - num_members?: number; + context_team_id?: string; + conversation_host_id?: string; + created?: number; + creator?: string; + id?: string; + internal_team_ids?: string[]; + is_archived?: boolean; + is_channel?: boolean; + is_ext_shared?: boolean; + is_general?: boolean; + is_global_shared?: boolean; + is_group?: boolean; + is_im?: boolean; + is_member?: boolean; + is_moved?: number; + is_mpim?: boolean; + is_org_default?: boolean; + is_org_mandatory?: boolean; + is_org_shared?: boolean; + is_pending_ext_shared?: boolean; + is_private?: boolean; + is_shared?: boolean; + is_user_deleted?: boolean; + name?: string; + name_normalized?: string; + num_members?: number; pending_connected_team_ids?: string[]; - pending_shared?: string[]; - previous_names?: string[]; - priority?: number; - properties?: Properties; - purpose?: Purpose; - shared_team_ids?: string[]; - topic?: Purpose; - unlinked?: number; - updated?: number; - user?: string; + pending_shared?: string[]; + previous_names?: string[]; + priority?: number; + properties?: Properties; + purpose?: Purpose; + shared_team_ids?: string[]; + topic?: Purpose; + unlinked?: number; + updated?: number; + user?: string; } export interface Properties { - canvas?: Canvas; + canvas?: Canvas; posting_restricted_to?: RestrictedTo; - tabs?: Tab[]; + tabs?: Tab[]; threads_restricted_to?: RestrictedTo; } export interface Canvas { - file_id?: string; - is_empty?: boolean; + file_id?: string; + is_empty?: boolean; quip_thread_id?: string; } @@ -77,15 +77,15 @@ export interface RestrictedTo { } export interface Tab { - id?: string; + id?: string; label?: string; - type?: string; + type?: string; } export interface Purpose { - creator?: string; + creator?: string; last_set?: number; - value?: string; + value?: string; } export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/ConversationsMarkResponse.ts b/packages/web-api/src/types/response/ConversationsMarkResponse.ts index 9fbffa74d..160d5dde2 100644 --- a/packages/web-api/src/types/response/ConversationsMarkResponse.ts +++ b/packages/web-api/src/types/response/ConversationsMarkResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ConversationsMarkResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/ConversationsMembersResponse.ts b/packages/web-api/src/types/response/ConversationsMembersResponse.ts index b39ebfdc3..1681230c7 100644 --- a/packages/web-api/src/types/response/ConversationsMembersResponse.ts +++ b/packages/web-api/src/types/response/ConversationsMembersResponse.ts @@ -8,13 +8,13 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ConversationsMembersResponse = WebAPICallResult & { - error?: string; - members?: string[]; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + members?: string[]; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; diff --git a/packages/web-api/src/types/response/ConversationsOpenResponse.ts b/packages/web-api/src/types/response/ConversationsOpenResponse.ts index 69622f3e0..660e3debf 100644 --- a/packages/web-api/src/types/response/ConversationsOpenResponse.ts +++ b/packages/web-api/src/types/response/ConversationsOpenResponse.ts @@ -8,155 +8,155 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ConversationsOpenResponse = WebAPICallResult & { already_open?: boolean; - channel?: Channel; - error?: string; - needed?: string; - no_op?: boolean; - ok?: boolean; - provided?: string; + channel?: Channel; + error?: string; + needed?: string; + no_op?: boolean; + ok?: boolean; + provided?: string; }; export interface Channel { - context_team_id?: string; - created?: number; - id?: string; - is_archived?: boolean; - is_im?: boolean; - is_open?: boolean; - is_org_shared?: boolean; - last_read?: string; - latest?: Latest; - priority?: number; - unread_count?: number; + context_team_id?: string; + created?: number; + id?: string; + is_archived?: boolean; + is_im?: boolean; + is_open?: boolean; + is_org_shared?: boolean; + last_read?: string; + latest?: Latest; + priority?: number; + unread_count?: number; unread_count_display?: number; - updated?: number; - user?: string; + updated?: number; + user?: string; } export interface Latest { - app_id?: string; - blocks?: LatestBlock[]; - bot_id?: string; - bot_profile?: BotProfile; + app_id?: string; + blocks?: LatestBlock[]; + bot_id?: string; + bot_profile?: BotProfile; client_msg_id?: string; - subtype?: string; - team?: string; - text?: string; - ts?: string; - type?: string; - user?: string; + subtype?: string; + team?: string; + text?: string; + ts?: string; + type?: string; + user?: string; } export interface LatestBlock { - accessory?: Accessory; - alt_text?: string; - api_decoration_available?: boolean; - app_collaborators?: string[]; - app_id?: string; - author_name?: string; - block_id?: string; - bot_user_id?: string; - button_label?: string; - call?: Call; - call_id?: string; - description?: DescriptionElement; - developer_trace_id?: string; - dispatch_action?: boolean; - element?: Accessory; - elements?: Accessory[]; - external_id?: string; - fallback?: string; - fields?: DescriptionElement[]; - file?: File; - file_id?: string; - function_trigger_id?: string; - hint?: DescriptionElement; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - is_animated?: boolean; - is_workflow_app?: boolean; - label?: DescriptionElement; - optional?: boolean; - owning_team_id?: string; - provider_icon_url?: string; - provider_name?: string; + accessory?: Accessory; + alt_text?: string; + api_decoration_available?: boolean; + app_collaborators?: string[]; + app_id?: string; + author_name?: string; + block_id?: string; + bot_user_id?: string; + button_label?: string; + call?: Call; + call_id?: string; + description?: DescriptionElement; + developer_trace_id?: string; + dispatch_action?: boolean; + element?: Accessory; + elements?: Accessory[]; + external_id?: string; + fallback?: string; + fields?: DescriptionElement[]; + file?: File; + file_id?: string; + function_trigger_id?: string; + hint?: DescriptionElement; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + is_animated?: boolean; + is_workflow_app?: boolean; + label?: DescriptionElement; + optional?: boolean; + owning_team_id?: string; + provider_icon_url?: string; + provider_name?: string; sales_home_workflow_app_type?: number; - share_url?: string; - slack_file?: SlackFile; - source?: string; - text?: DescriptionElement; - thumbnail_url?: string; - title?: DescriptionElement; - title_url?: string; - trigger_subtype?: string; - trigger_type?: string; - type?: string; - url?: string; - video_url?: string; - workflow_id?: string; + share_url?: string; + slack_file?: SlackFile; + source?: string; + text?: DescriptionElement; + thumbnail_url?: string; + title?: DescriptionElement; + title_url?: string; + trigger_subtype?: string; + trigger_type?: string; + type?: string; + url?: string; + video_url?: string; + workflow_id?: string; } export interface Accessory { - accessibility_label?: string; - action_id?: string; - alt_text?: string; - border?: number; - confirm?: Confirm; + accessibility_label?: string; + action_id?: string; + alt_text?: string; + border?: number; + confirm?: Confirm; default_to_current_conversation?: boolean; - elements?: AccessoryElement[]; - fallback?: string; - filter?: Filter; - focus_on_load?: boolean; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - indent?: number; - initial_channel?: string; - initial_channels?: string[]; - initial_conversation?: string; - initial_conversations?: string[]; - initial_date?: string; - initial_date_time?: number; - initial_option?: Option; - initial_options?: Option[]; - initial_time?: string; - initial_user?: string; - initial_users?: string[]; - max_selected_items?: number; - min_query_length?: number; - offset?: number; - option_groups?: OptionGroup[]; - options?: Option[]; - placeholder?: DescriptionElement; - response_url_enabled?: boolean; - slack_file?: SlackFile; - style?: string; - text?: DescriptionElement; - timezone?: string; - type?: string; - url?: string; - value?: string; - workflow?: Workflow; + elements?: AccessoryElement[]; + fallback?: string; + filter?: Filter; + focus_on_load?: boolean; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + indent?: number; + initial_channel?: string; + initial_channels?: string[]; + initial_conversation?: string; + initial_conversations?: string[]; + initial_date?: string; + initial_date_time?: number; + initial_option?: Option; + initial_options?: Option[]; + initial_time?: string; + initial_user?: string; + initial_users?: string[]; + max_selected_items?: number; + min_query_length?: number; + offset?: number; + option_groups?: OptionGroup[]; + options?: Option[]; + placeholder?: DescriptionElement; + response_url_enabled?: boolean; + slack_file?: SlackFile; + style?: string; + text?: DescriptionElement; + timezone?: string; + type?: string; + url?: string; + value?: string; + workflow?: Workflow; } export interface Confirm { confirm?: DescriptionElement; - deny?: DescriptionElement; - style?: string; - text?: DescriptionElement; - title?: DescriptionElement; + deny?: DescriptionElement; + style?: string; + text?: DescriptionElement; + title?: DescriptionElement; } export interface DescriptionElement { - emoji?: boolean; - text?: string; - type?: DescriptionType; + emoji?: boolean; + text?: string; + type?: DescriptionType; verbatim?: boolean; } @@ -166,42 +166,42 @@ export enum DescriptionType { } export interface AccessoryElement { - border?: number; + border?: number; elements?: PurpleElement[]; - indent?: number; - offset?: number; - style?: string; - type?: FluffyType; + indent?: number; + offset?: number; + style?: string; + type?: FluffyType; } export interface PurpleElement { - channel_id?: string; - fallback?: string; - format?: string; - name?: string; - range?: string; - skin_tone?: number; - style?: Style; - team_id?: string; - text?: string; - timestamp?: string; - type?: PurpleType; - unicode?: string; - unsafe?: boolean; - url?: string; - user_id?: string; + channel_id?: string; + fallback?: string; + format?: string; + name?: string; + range?: string; + skin_tone?: number; + style?: Style; + team_id?: string; + text?: string; + timestamp?: string; + type?: PurpleType; + unicode?: string; + unsafe?: boolean; + url?: string; + user_id?: string; usergroup_id?: string; - value?: string; + value?: string; } export interface Style { - bold?: boolean; + bold?: boolean; client_highlight?: boolean; - code?: boolean; - highlight?: boolean; - italic?: boolean; - strike?: boolean; - unlink?: boolean; + code?: boolean; + highlight?: boolean; + italic?: boolean; + strike?: boolean; + unlink?: boolean; } export enum PurpleType { @@ -225,25 +225,25 @@ export enum FluffyType { } export interface Filter { - exclude_bot_users?: boolean; + exclude_bot_users?: boolean; exclude_external_shared_channels?: boolean; - include?: any[]; + include?: any[]; } export interface Option { description?: DescriptionElement; - text?: DescriptionElement; - url?: string; - value?: string; + text?: DescriptionElement; + url?: string; + value?: string; } export interface OptionGroup { - label?: DescriptionElement; + label?: DescriptionElement; options?: Option[]; } export interface SlackFile { - id?: string; + id?: string; url?: string; } @@ -253,358 +253,358 @@ export interface Workflow { export interface Trigger { customizable_input_parameters?: CustomizableInputParameter[]; - url?: string; + url?: string; } export interface CustomizableInputParameter { - name?: string; + name?: string; value?: string; } export interface Call { media_backend_type?: string; - v1?: V1; + v1?: V1; } export interface V1 { - active_participants?: Participant[]; - all_participants?: Participant[]; - app_icon_urls?: AppIconUrls; - app_id?: string; - channels?: string[]; - created_by?: string; - date_end?: number; - date_start?: number; + active_participants?: Participant[]; + all_participants?: Participant[]; + app_icon_urls?: AppIconUrls; + app_id?: string; + channels?: string[]; + created_by?: string; + date_end?: number; + date_start?: number; desktop_app_join_url?: string; - display_id?: string; - has_ended?: boolean; - id?: string; - is_dm_call?: boolean; - join_url?: string; - name?: string; - was_accepted?: boolean; - was_missed?: boolean; - was_rejected?: boolean; + display_id?: string; + has_ended?: boolean; + id?: string; + is_dm_call?: boolean; + join_url?: string; + name?: string; + was_accepted?: boolean; + was_missed?: boolean; + was_rejected?: boolean; } export interface Participant { - avatar_url?: string; + avatar_url?: string; display_name?: string; - external_id?: string; - slack_id?: string; + external_id?: string; + slack_id?: string; } export interface AppIconUrls { - image_1024?: string; - image_128?: string; - image_192?: string; - image_32?: string; - image_36?: string; - image_48?: string; - image_512?: string; - image_64?: string; - image_72?: string; - image_96?: string; + image_1024?: string; + image_128?: string; + image_192?: string; + image_32?: string; + image_36?: string; + image_48?: string; + image_512?: string; + image_64?: string; + image_72?: string; + image_96?: string; image_original?: string; } export interface File { - access?: string; - alt_txt?: string; - app_id?: string; - app_name?: string; - attachments?: any[]; - blocks?: TitleBlockElement[]; - bot_id?: string; - can_toggle_canvas_lock?: boolean; - canvas_template_mode?: string; - cc?: Cc[]; - channel_actions_count?: number; - channel_actions_ts?: string; - channels?: string[]; - comments_count?: number; - converted_pdf?: string; - created?: number; - deanimate?: string; - deanimate_gif?: string; - display_as_bot?: boolean; - dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; - duration_ms?: number; - edit_link?: string; - edit_timestamp?: number; - editable?: boolean; - editor?: string; - editors?: string[]; - external_id?: string; - external_type?: string; - external_url?: string; - favorites?: Favorite[]; - file_access?: string; - filetype?: string; - from?: Cc[]; - groups?: string[]; - has_more?: boolean; - has_more_shares?: boolean; - has_rich_preview?: boolean; - headers?: Headers; - hls?: string; - hls_embed?: string; - id?: string; - image_exif_rotation?: number; - ims?: string[]; - initial_comment?: InitialComment; - is_channel_space?: boolean; - is_external?: boolean; - is_public?: boolean; - is_starred?: boolean; - last_editor?: string; - last_read?: number; - lines?: number; - lines_more?: number; - linked_channel_id?: string; - list_limits?: ListLimits; - list_metadata?: ListMetadata; - media_display_type?: string; - media_progress?: MediaProgress; - mimetype?: string; - mode?: string; - mp4?: string; - mp4_low?: string; - name?: string; - non_owner_editable?: boolean; - num_stars?: number; - org_or_workspace_access?: string; - original_attachment_count?: number; - original_h?: string; - original_w?: string; - permalink?: string; - permalink_public?: string; - pinned_to?: string[]; - pjpeg?: string; - plain_text?: string; - pretty_type?: string; - preview?: string; - preview_highlight?: string; - preview_is_truncated?: boolean; - preview_plain_text?: string; + access?: string; + alt_txt?: string; + app_id?: string; + app_name?: string; + attachments?: any[]; + blocks?: TitleBlockElement[]; + bot_id?: string; + can_toggle_canvas_lock?: boolean; + canvas_template_mode?: string; + cc?: Cc[]; + channel_actions_count?: number; + channel_actions_ts?: string; + channels?: string[]; + comments_count?: number; + converted_pdf?: string; + created?: number; + deanimate?: string; + deanimate_gif?: string; + display_as_bot?: boolean; + dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; + duration_ms?: number; + edit_link?: string; + edit_timestamp?: number; + editable?: boolean; + editor?: string; + editors?: string[]; + external_id?: string; + external_type?: string; + external_url?: string; + favorites?: Favorite[]; + file_access?: string; + filetype?: string; + from?: Cc[]; + groups?: string[]; + has_more?: boolean; + has_more_shares?: boolean; + has_rich_preview?: boolean; + headers?: Headers; + hls?: string; + hls_embed?: string; + id?: string; + image_exif_rotation?: number; + ims?: string[]; + initial_comment?: InitialComment; + is_channel_space?: boolean; + is_external?: boolean; + is_public?: boolean; + is_starred?: boolean; + last_editor?: string; + last_read?: number; + lines?: number; + lines_more?: number; + linked_channel_id?: string; + list_limits?: ListLimits; + list_metadata?: ListMetadata; + media_display_type?: string; + media_progress?: MediaProgress; + mimetype?: string; + mode?: string; + mp4?: string; + mp4_low?: string; + name?: string; + non_owner_editable?: boolean; + num_stars?: number; + org_or_workspace_access?: string; + original_attachment_count?: number; + original_h?: string; + original_w?: string; + permalink?: string; + permalink_public?: string; + pinned_to?: string[]; + pjpeg?: string; + plain_text?: string; + pretty_type?: string; + preview?: string; + preview_highlight?: string; + preview_is_truncated?: boolean; + preview_plain_text?: string; private_channels_with_file_access_count?: number; - private_file_with_access_count?: number; - public_url_shared?: boolean; - quip_thread_id?: string; - reactions?: Reaction[]; - saved?: Saved; - sent_to_self?: boolean; - shares?: Shares; - show_badge?: boolean; - simplified_html?: string; - size?: number; - source_team?: string; - subject?: string; - subtype?: string; - team_pref_version_history_enabled?: boolean; - teams_shared_with?: any[]; - template_conversion_ts?: number; - template_description?: string; - template_icon?: string; - template_name?: string; - template_title?: string; - thumb_1024?: string; - thumb_1024_gif?: string; - thumb_1024_h?: string; - thumb_1024_w?: string; - thumb_160?: string; - thumb_160_gif?: string; - thumb_160_h?: string; - thumb_160_w?: string; - thumb_360?: string; - thumb_360_gif?: string; - thumb_360_h?: string; - thumb_360_w?: string; - thumb_480?: string; - thumb_480_gif?: string; - thumb_480_h?: string; - thumb_480_w?: string; - thumb_64?: string; - thumb_64_gif?: string; - thumb_64_h?: string; - thumb_64_w?: string; - thumb_720?: string; - thumb_720_gif?: string; - thumb_720_h?: string; - thumb_720_w?: string; - thumb_80?: string; - thumb_800?: string; - thumb_800_gif?: string; - thumb_800_h?: string; - thumb_800_w?: string; - thumb_80_gif?: string; - thumb_80_h?: string; - thumb_80_w?: string; - thumb_960?: string; - thumb_960_gif?: string; - thumb_960_h?: string; - thumb_960_w?: string; - thumb_gif?: string; - thumb_pdf?: string; - thumb_pdf_h?: string; - thumb_pdf_w?: string; - thumb_tiny?: string; - thumb_video?: string; - thumb_video_h?: number; - thumb_video_w?: number; - timestamp?: number; - title?: string; - title_blocks?: TitleBlockElement[]; - to?: Cc[]; - transcription?: Transcription; - update_notification?: number; - updated?: number; - url_private?: string; - url_private_download?: string; - url_static_preview?: string; - user?: string; - user_team?: string; - username?: string; - vtt?: string; + private_file_with_access_count?: number; + public_url_shared?: boolean; + quip_thread_id?: string; + reactions?: Reaction[]; + saved?: Saved; + sent_to_self?: boolean; + shares?: Shares; + show_badge?: boolean; + simplified_html?: string; + size?: number; + source_team?: string; + subject?: string; + subtype?: string; + team_pref_version_history_enabled?: boolean; + teams_shared_with?: any[]; + template_conversion_ts?: number; + template_description?: string; + template_icon?: string; + template_name?: string; + template_title?: string; + thumb_1024?: string; + thumb_1024_gif?: string; + thumb_1024_h?: string; + thumb_1024_w?: string; + thumb_160?: string; + thumb_160_gif?: string; + thumb_160_h?: string; + thumb_160_w?: string; + thumb_360?: string; + thumb_360_gif?: string; + thumb_360_h?: string; + thumb_360_w?: string; + thumb_480?: string; + thumb_480_gif?: string; + thumb_480_h?: string; + thumb_480_w?: string; + thumb_64?: string; + thumb_64_gif?: string; + thumb_64_h?: string; + thumb_64_w?: string; + thumb_720?: string; + thumb_720_gif?: string; + thumb_720_h?: string; + thumb_720_w?: string; + thumb_80?: string; + thumb_800?: string; + thumb_800_gif?: string; + thumb_800_h?: string; + thumb_800_w?: string; + thumb_80_gif?: string; + thumb_80_h?: string; + thumb_80_w?: string; + thumb_960?: string; + thumb_960_gif?: string; + thumb_960_h?: string; + thumb_960_w?: string; + thumb_gif?: string; + thumb_pdf?: string; + thumb_pdf_h?: string; + thumb_pdf_w?: string; + thumb_tiny?: string; + thumb_video?: string; + thumb_video_h?: number; + thumb_video_w?: number; + timestamp?: number; + title?: string; + title_blocks?: TitleBlockElement[]; + to?: Cc[]; + transcription?: Transcription; + update_notification?: number; + updated?: number; + url_private?: string; + url_private_download?: string; + url_static_preview?: string; + user?: string; + user_team?: string; + username?: string; + vtt?: string; } export interface TitleBlockElement { - accessory?: Accessory; - alt_text?: string; - app_collaborators?: string[]; - app_id?: string; - author_name?: string; - block_id?: string; - bot_user_id?: string; - button_label?: string; - description?: DescriptionElement | string; - developer_trace_id?: string; - elements?: Accessory[]; - fallback?: string; - fields?: DescriptionElement[]; - function_trigger_id?: string; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - is_animated?: boolean; - is_workflow_app?: boolean; - owning_team_id?: string; - provider_icon_url?: string; - provider_name?: string; + accessory?: Accessory; + alt_text?: string; + app_collaborators?: string[]; + app_id?: string; + author_name?: string; + block_id?: string; + bot_user_id?: string; + button_label?: string; + description?: DescriptionElement | string; + developer_trace_id?: string; + elements?: Accessory[]; + fallback?: string; + fields?: DescriptionElement[]; + function_trigger_id?: string; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + is_animated?: boolean; + is_workflow_app?: boolean; + owning_team_id?: string; + provider_icon_url?: string; + provider_name?: string; sales_home_workflow_app_type?: number; - share_url?: string; - slack_file?: SlackFile; - text?: DescriptionElement; - thumbnail_url?: string; - title?: DescriptionElement | string; - title_url?: string; - trigger_subtype?: string; - trigger_type?: string; - type?: string; - url?: string; - video_url?: string; - workflow_id?: string; + share_url?: string; + slack_file?: SlackFile; + text?: DescriptionElement; + thumbnail_url?: string; + title?: DescriptionElement | string; + title_url?: string; + trigger_subtype?: string; + trigger_type?: string; + type?: string; + url?: string; + video_url?: string; + workflow_id?: string; } export interface Cc { - address?: string; - name?: string; + address?: string; + name?: string; original?: string; } export interface DmMpdmUsersWithFileAccess { - access?: string; + access?: string; user_id?: string; } export interface Favorite { - collection_id?: string; + collection_id?: string; collection_name?: string; - position?: string; + position?: string; } export interface Headers { - date?: string; + date?: string; in_reply_to?: string; - message_id?: string; - reply_to?: string; + message_id?: string; + reply_to?: string; } export interface InitialComment { - channel?: string; - comment?: string; - created?: number; - id?: string; - is_intro?: boolean; + channel?: string; + comment?: string; + created?: number; + id?: string; + is_intro?: boolean; timestamp?: number; - user?: string; + user?: string; } export interface ListLimits { - column_count?: number; - column_count_limit?: number; + column_count?: number; + column_count_limit?: number; over_column_maximum?: boolean; - over_row_maximum?: boolean; - over_view_maximum?: boolean; - row_count?: number; - row_count_limit?: number; - view_count?: number; - view_count_limit?: number; + over_row_maximum?: boolean; + over_view_maximum?: boolean; + row_count?: number; + row_count_limit?: number; + view_count?: number; + view_count_limit?: number; } export interface ListMetadata { creation_source?: CreationSource; - description?: string; - icon?: string; - icon_team_id?: string; - icon_url?: string; - integrations?: string[]; - is_trial?: boolean; - schema?: Schema[]; - views?: View[]; + description?: string; + icon?: string; + icon_team_id?: string; + icon_url?: string; + integrations?: string[]; + is_trial?: boolean; + schema?: Schema[]; + views?: View[]; } export interface CreationSource { - reference_id?: string; - type?: string; + reference_id?: string; + type?: string; workflow_function_id?: string; } export interface Schema { - id?: string; + id?: string; is_primary_column?: boolean; - key?: string; - name?: string; - options?: Options; - type?: string; + key?: string; + name?: string; + options?: Options; + type?: string; } export interface Options { - canvas_id?: string; + canvas_id?: string; canvas_placeholder_mapping?: CanvasPlaceholderMapping[]; - choices?: Choice[]; - currency?: string; - currency_format?: string; - date_format?: string; - default_value?: string; - default_value_typed?: DefaultValueTyped; - emoji?: string; - emoji_team_id?: string; - for_assignment?: boolean; - format?: string; - linked_to?: string[]; - mark_as_done_when_checked?: boolean; - max?: number; - notify_users?: boolean; - precision?: number; - rounding?: string; - show_member_name?: boolean; - time_format?: string; + choices?: Choice[]; + currency?: string; + currency_format?: string; + date_format?: string; + default_value?: string; + default_value_typed?: DefaultValueTyped; + emoji?: string; + emoji_team_id?: string; + for_assignment?: boolean; + format?: string; + linked_to?: string[]; + mark_as_done_when_checked?: boolean; + max?: number; + notify_users?: boolean; + precision?: number; + rounding?: string; + show_member_name?: boolean; + time_format?: string; } export interface CanvasPlaceholderMapping { - column?: string; + column?: string; variable?: string; } @@ -619,64 +619,64 @@ export interface DefaultValueTyped { } export interface View { - columns?: Column[]; - created_by?: string; - date_created?: number; - id?: string; + columns?: Column[]; + created_by?: string; + date_created?: number; + id?: string; is_all_items_view?: boolean; - is_locked?: boolean; - name?: string; - position?: string; + is_locked?: boolean; + name?: string; + position?: string; stick_column_left?: boolean; - type?: string; + type?: string; } export interface Column { - id?: string; - key?: string; + id?: string; + key?: string; position?: string; - visible?: boolean; - width?: number; + visible?: boolean; + width?: number; } export interface MediaProgress { - duration_ms?: number; + duration_ms?: number; max_offset_ms?: number; - offset_ms?: number; + offset_ms?: number; } export interface Reaction { count?: number; - name?: string; - url?: string; + name?: string; + url?: string; users?: string[]; } export interface Saved { date_completed?: number; - date_due?: number; - is_archived?: boolean; - state?: string; + date_due?: number; + is_archived?: boolean; + state?: string; } export interface Shares { private?: { [key: string]: Private[] }; - public?: { [key: string]: Private[] }; + public?: { [key: string]: Private[] }; } export interface Private { - access?: string; - channel_name?: string; - date_last_shared?: number; - latest_reply?: string; - reply_count?: number; - reply_users?: string[]; + access?: string; + channel_name?: string; + date_last_shared?: number; + latest_reply?: string; + reply_count?: number; + reply_users?: string[]; reply_users_count?: number; - share_user_id?: string; - source?: string; - team_id?: string; - thread_ts?: string; - ts?: string; + share_user_id?: string; + source?: string; + team_id?: string; + thread_ts?: string; + ts?: string; } export interface Transcription { @@ -685,11 +685,11 @@ export interface Transcription { } export interface BotProfile { - app_id?: string; + app_id?: string; deleted?: boolean; - icons?: Icons; - id?: string; - name?: string; + icons?: Icons; + id?: string; + name?: string; team_id?: string; updated?: number; } diff --git a/packages/web-api/src/types/response/ConversationsRenameResponse.ts b/packages/web-api/src/types/response/ConversationsRenameResponse.ts index 246146bce..3ff4d9eee 100644 --- a/packages/web-api/src/types/response/ConversationsRenameResponse.ts +++ b/packages/web-api/src/types/response/ConversationsRenameResponse.ts @@ -8,50 +8,50 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ConversationsRenameResponse = WebAPICallResult & { - channel?: Channel; - error?: string; - needed?: string; - ok?: boolean; + channel?: Channel; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; export interface Channel { - context_team_id?: string; - created?: number; - creator?: string; - id?: string; - internal_team_ids?: string[]; - is_archived?: boolean; - is_channel?: boolean; - is_ext_shared?: boolean; - is_general?: boolean; - is_group?: boolean; - is_im?: boolean; - is_member?: boolean; - is_moved?: number; - is_mpim?: boolean; - is_open?: boolean; - is_org_shared?: boolean; - is_pending_ext_shared?: boolean; - is_private?: boolean; - is_shared?: boolean; - last_read?: string; - name?: string; - name_normalized?: string; + context_team_id?: string; + created?: number; + creator?: string; + id?: string; + internal_team_ids?: string[]; + is_archived?: boolean; + is_channel?: boolean; + is_ext_shared?: boolean; + is_general?: boolean; + is_group?: boolean; + is_im?: boolean; + is_member?: boolean; + is_moved?: number; + is_mpim?: boolean; + is_open?: boolean; + is_org_shared?: boolean; + is_pending_ext_shared?: boolean; + is_private?: boolean; + is_shared?: boolean; + last_read?: string; + name?: string; + name_normalized?: string; pending_connected_team_ids?: string[]; - pending_shared?: string[]; - previous_names?: string[]; - purpose?: Purpose; - shared_team_ids?: string[]; - topic?: Purpose; - unlinked?: number; - updated?: number; + pending_shared?: string[]; + previous_names?: string[]; + purpose?: Purpose; + shared_team_ids?: string[]; + topic?: Purpose; + unlinked?: number; + updated?: number; } export interface Purpose { - creator?: string; + creator?: string; last_set?: number; - value?: string; + value?: string; } diff --git a/packages/web-api/src/types/response/ConversationsRepliesResponse.ts b/packages/web-api/src/types/response/ConversationsRepliesResponse.ts index 735be9788..cc7c7ff92 100644 --- a/packages/web-api/src/types/response/ConversationsRepliesResponse.ts +++ b/packages/web-api/src/types/response/ConversationsRepliesResponse.ts @@ -8,244 +8,244 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ConversationsRepliesResponse = WebAPICallResult & { - error?: string; - has_more?: boolean; - messages?: MessageElement[]; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + has_more?: boolean; + messages?: MessageElement[]; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; export interface MessageElement { - app_id?: string; - attachments?: Attachment[]; - blocks?: PurpleBlock[]; - bot_id?: string; - bot_profile?: BotProfile; - display_as_bot?: boolean; - edited?: Edited; - files?: FileElement[]; - is_locked?: boolean; - last_read?: string; - latest_reply?: string; - metadata?: FluffyMetadata; - parent_user_id?: string; - reactions?: Reaction[]; - reply_count?: number; - reply_users?: string[]; + app_id?: string; + attachments?: Attachment[]; + blocks?: PurpleBlock[]; + bot_id?: string; + bot_profile?: BotProfile; + display_as_bot?: boolean; + edited?: Edited; + files?: FileElement[]; + is_locked?: boolean; + last_read?: string; + latest_reply?: string; + metadata?: FluffyMetadata; + parent_user_id?: string; + reactions?: Reaction[]; + reply_count?: number; + reply_users?: string[]; reply_users_count?: number; - subscribed?: boolean; - team?: string; - text?: string; - thread_ts?: string; - ts?: string; - type?: string; - upload?: boolean; - user?: string; - x_files?: string[]; + subscribed?: boolean; + team?: string; + text?: string; + thread_ts?: string; + ts?: string; + type?: string; + upload?: boolean; + user?: string; + x_files?: string[]; } export interface Attachment { - actions?: Action[]; - app_id?: string; - app_unfurl_url?: string; - author_icon?: string; - author_id?: string; - author_link?: string; - author_name?: string; - author_subname?: string; - blocks?: TitleBlockElement[]; - bot_id?: string; - callback_id?: string; - channel_id?: string; - channel_name?: string; - channel_team?: string; - color?: string; - fallback?: string; - fields?: AttachmentField[]; - file_id?: string; - filename?: string; - files?: FileElement[]; - footer?: string; - footer_icon?: string; - from_url?: string; - hide_border?: boolean; - hide_color?: boolean; - id?: number; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - indent?: boolean; - is_app_unfurl?: boolean; - is_file_attachment?: boolean; - is_msg_unfurl?: boolean; - is_reply_unfurl?: boolean; + actions?: Action[]; + app_id?: string; + app_unfurl_url?: string; + author_icon?: string; + author_id?: string; + author_link?: string; + author_name?: string; + author_subname?: string; + blocks?: TitleBlockElement[]; + bot_id?: string; + callback_id?: string; + channel_id?: string; + channel_name?: string; + channel_team?: string; + color?: string; + fallback?: string; + fields?: AttachmentField[]; + file_id?: string; + filename?: string; + files?: FileElement[]; + footer?: string; + footer_icon?: string; + from_url?: string; + hide_border?: boolean; + hide_color?: boolean; + id?: number; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + indent?: boolean; + is_app_unfurl?: boolean; + is_file_attachment?: boolean; + is_msg_unfurl?: boolean; + is_reply_unfurl?: boolean; is_thread_root_unfurl?: boolean; - list?: List; - list_record?: PurpleListRecord; - list_record_id?: string; - list_records?: ListRecordElement[]; - list_schema?: Schema[]; - list_view?: View; - list_view_id?: string; - message_blocks?: MessageBlock[]; - metadata?: AttachmentMetadata; - mimetype?: string; - mrkdwn_in?: string[]; - msg_subtype?: string; - original_url?: string; - pretext?: string; - preview?: Preview; - service_icon?: string; - service_name?: string; - service_url?: string; - size?: number; - text?: string; - thumb_height?: number; - thumb_url?: string; - thumb_width?: number; - title?: string; - title_link?: string; - ts?: string; - url?: string; - video_html?: string; - video_html_height?: number; - video_html_width?: number; - video_url?: string; + list?: List; + list_record?: PurpleListRecord; + list_record_id?: string; + list_records?: ListRecordElement[]; + list_schema?: Schema[]; + list_view?: View; + list_view_id?: string; + message_blocks?: MessageBlock[]; + metadata?: AttachmentMetadata; + mimetype?: string; + mrkdwn_in?: string[]; + msg_subtype?: string; + original_url?: string; + pretext?: string; + preview?: Preview; + service_icon?: string; + service_name?: string; + service_url?: string; + size?: number; + text?: string; + thumb_height?: number; + thumb_url?: string; + thumb_width?: number; + title?: string; + title_link?: string; + ts?: string; + url?: string; + video_html?: string; + video_html_height?: number; + video_html_width?: number; + video_url?: string; } export interface Action { - confirm?: ActionConfirm; - data_source?: string; - id?: string; + confirm?: ActionConfirm; + data_source?: string; + id?: string; min_query_length?: number; - name?: string; - option_groups?: ActionOptionGroup[]; - options?: SelectedOptionElement[]; + name?: string; + option_groups?: ActionOptionGroup[]; + options?: SelectedOptionElement[]; selected_options?: SelectedOptionElement[]; - style?: string; - text?: string; - type?: string; - url?: string; - value?: string; + style?: string; + text?: string; + type?: string; + url?: string; + value?: string; } export interface ActionConfirm { dismiss_text?: string; - ok_text?: string; - text?: string; - title?: string; + ok_text?: string; + text?: string; + title?: string; } export interface ActionOptionGroup { options?: SelectedOptionElement[]; - text?: string; + text?: string; } export interface SelectedOptionElement { - text?: string; + text?: string; value?: string; } export interface TitleBlockElement { - accessory?: Accessory; - alt_text?: string; - app_collaborators?: string[]; - app_id?: string; - author_name?: string; - block_id?: string; - bot_user_id?: string; - button_label?: string; - description?: DescriptionElement | string; - developer_trace_id?: string; - elements?: Accessory[]; - fallback?: string; - fields?: DescriptionElement[]; - function_trigger_id?: string; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - is_animated?: boolean; - is_workflow_app?: boolean; - owning_team_id?: string; - provider_icon_url?: string; - provider_name?: string; + accessory?: Accessory; + alt_text?: string; + app_collaborators?: string[]; + app_id?: string; + author_name?: string; + block_id?: string; + bot_user_id?: string; + button_label?: string; + description?: DescriptionElement | string; + developer_trace_id?: string; + elements?: Accessory[]; + fallback?: string; + fields?: DescriptionElement[]; + function_trigger_id?: string; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + is_animated?: boolean; + is_workflow_app?: boolean; + owning_team_id?: string; + provider_icon_url?: string; + provider_name?: string; sales_home_workflow_app_type?: number; - share_url?: string; - slack_file?: SlackFile; - text?: DescriptionElement; - thumbnail_url?: string; - title?: DescriptionElement | string; - title_url?: string; - trigger_subtype?: string; - trigger_type?: string; - type?: BlockType; - url?: string; - video_url?: string; - workflow_id?: string; + share_url?: string; + slack_file?: SlackFile; + text?: DescriptionElement; + thumbnail_url?: string; + title?: DescriptionElement | string; + title_url?: string; + trigger_subtype?: string; + trigger_type?: string; + type?: BlockType; + url?: string; + video_url?: string; + workflow_id?: string; } export interface Accessory { - accessibility_label?: string; - action_id?: string; - alt_text?: string; - border?: number; - confirm?: AccessoryConfirm; + accessibility_label?: string; + action_id?: string; + alt_text?: string; + border?: number; + confirm?: AccessoryConfirm; default_to_current_conversation?: boolean; - elements?: AccessoryElement[]; - fallback?: string; - filter?: Filter; - focus_on_load?: boolean; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - indent?: number; - initial_channel?: string; - initial_channels?: string[]; - initial_conversation?: string; - initial_conversations?: string[]; - initial_date?: string; - initial_date_time?: number; - initial_option?: InitialOptionElement; - initial_options?: InitialOptionElement[]; - initial_time?: string; - initial_user?: string; - initial_users?: string[]; - max_selected_items?: number; - min_query_length?: number; - offset?: number; - option_groups?: AccessoryOptionGroup[]; - options?: InitialOptionElement[]; - placeholder?: DescriptionElement; - response_url_enabled?: boolean; - slack_file?: SlackFile; - style?: string; - text?: DescriptionElement; - timezone?: string; - type?: string; - url?: string; - value?: string; - workflow?: Workflow; + elements?: AccessoryElement[]; + fallback?: string; + filter?: Filter; + focus_on_load?: boolean; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + indent?: number; + initial_channel?: string; + initial_channels?: string[]; + initial_conversation?: string; + initial_conversations?: string[]; + initial_date?: string; + initial_date_time?: number; + initial_option?: InitialOptionElement; + initial_options?: InitialOptionElement[]; + initial_time?: string; + initial_user?: string; + initial_users?: string[]; + max_selected_items?: number; + min_query_length?: number; + offset?: number; + option_groups?: AccessoryOptionGroup[]; + options?: InitialOptionElement[]; + placeholder?: DescriptionElement; + response_url_enabled?: boolean; + slack_file?: SlackFile; + style?: string; + text?: DescriptionElement; + timezone?: string; + type?: string; + url?: string; + value?: string; + workflow?: Workflow; } export interface AccessoryConfirm { confirm?: DescriptionElement; - deny?: DescriptionElement; - style?: string; - text?: DescriptionElement; - title?: DescriptionElement; + deny?: DescriptionElement; + style?: string; + text?: DescriptionElement; + title?: DescriptionElement; } export interface DescriptionElement { - emoji?: boolean; - text?: string; - type?: DescriptionType; + emoji?: boolean; + text?: string; + type?: DescriptionType; verbatim?: boolean; } @@ -255,42 +255,42 @@ export enum DescriptionType { } export interface AccessoryElement { - border?: number; + border?: number; elements?: PurpleElement[]; - indent?: number; - offset?: number; - style?: string; - type?: FluffyType; + indent?: number; + offset?: number; + style?: string; + type?: FluffyType; } export interface PurpleElement { - channel_id?: string; - fallback?: string; - format?: string; - name?: string; - range?: string; - skin_tone?: number; - style?: Style; - team_id?: string; - text?: string; - timestamp?: string; - type?: PurpleType; - unicode?: string; - unsafe?: boolean; - url?: string; - user_id?: string; + channel_id?: string; + fallback?: string; + format?: string; + name?: string; + range?: string; + skin_tone?: number; + style?: Style; + team_id?: string; + text?: string; + timestamp?: string; + type?: PurpleType; + unicode?: string; + unsafe?: boolean; + url?: string; + user_id?: string; usergroup_id?: string; - value?: string; + value?: string; } export interface Style { - bold?: boolean; + bold?: boolean; client_highlight?: boolean; - code?: boolean; - highlight?: boolean; - italic?: boolean; - strike?: boolean; - unlink?: boolean; + code?: boolean; + highlight?: boolean; + italic?: boolean; + strike?: boolean; + unlink?: boolean; } export enum PurpleType { @@ -314,25 +314,25 @@ export enum FluffyType { } export interface Filter { - exclude_bot_users?: boolean; + exclude_bot_users?: boolean; exclude_external_shared_channels?: boolean; - include?: any[]; + include?: any[]; } export interface InitialOptionElement { description?: DescriptionElement; - text?: DescriptionElement; - url?: string; - value?: string; + text?: DescriptionElement; + url?: string; + value?: string; } export interface AccessoryOptionGroup { - label?: DescriptionElement; + label?: DescriptionElement; options?: InitialOptionElement[]; } export interface SlackFile { - id?: string; + id?: string; url?: string; } @@ -342,11 +342,11 @@ export interface Workflow { export interface Trigger { customizable_input_parameters?: CustomizableInputParameter[]; - url?: string; + url?: string; } export interface CustomizableInputParameter { - name?: string; + name?: string; value?: string; } @@ -368,263 +368,263 @@ export interface AttachmentField { } export interface FileElement { - access?: string; - alt_txt?: string; - app_id?: string; - app_name?: string; - attachments?: any[]; - blocks?: TitleBlockElement[]; - bot_id?: string; - can_toggle_canvas_lock?: boolean; - canvas_template_mode?: string; - cc?: Cc[]; - channel_actions_count?: number; - channel_actions_ts?: string; - channels?: string[]; - comments_count?: number; - converted_pdf?: string; - created?: number; - deanimate?: string; - deanimate_gif?: string; - display_as_bot?: boolean; - dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; - duration_ms?: number; - edit_link?: string; - edit_timestamp?: number; - editable?: boolean; - editor?: string; - editors?: string[]; - external_id?: string; - external_type?: string; - external_url?: string; - favorites?: Favorite[]; - file_access?: string; - filetype?: string; - from?: Cc[]; - groups?: string[]; - has_more?: boolean; - has_more_shares?: boolean; - has_rich_preview?: boolean; - headers?: Headers; - hls?: string; - hls_embed?: string; - id?: string; - image_exif_rotation?: number; - ims?: string[]; - initial_comment?: InitialComment; - is_channel_space?: boolean; - is_external?: boolean; - is_public?: boolean; - is_starred?: boolean; - last_editor?: string; - last_read?: number; - lines?: number; - lines_more?: number; - linked_channel_id?: string; - list_limits?: ListLimits; - list_metadata?: ListMetadata; - media_display_type?: string; - media_progress?: MediaProgress; - mimetype?: string; - mode?: string; - mp4?: string; - mp4_low?: string; - name?: string; - non_owner_editable?: boolean; - num_stars?: number; - org_or_workspace_access?: string; - original_attachment_count?: number; - original_h?: string; - original_w?: string; - permalink?: string; - permalink_public?: string; - pinned_to?: string[]; - pjpeg?: string; - plain_text?: string; - pretty_type?: string; - preview?: string; - preview_highlight?: string; - preview_is_truncated?: boolean; - preview_plain_text?: string; + access?: string; + alt_txt?: string; + app_id?: string; + app_name?: string; + attachments?: any[]; + blocks?: TitleBlockElement[]; + bot_id?: string; + can_toggle_canvas_lock?: boolean; + canvas_template_mode?: string; + cc?: Cc[]; + channel_actions_count?: number; + channel_actions_ts?: string; + channels?: string[]; + comments_count?: number; + converted_pdf?: string; + created?: number; + deanimate?: string; + deanimate_gif?: string; + display_as_bot?: boolean; + dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; + duration_ms?: number; + edit_link?: string; + edit_timestamp?: number; + editable?: boolean; + editor?: string; + editors?: string[]; + external_id?: string; + external_type?: string; + external_url?: string; + favorites?: Favorite[]; + file_access?: string; + filetype?: string; + from?: Cc[]; + groups?: string[]; + has_more?: boolean; + has_more_shares?: boolean; + has_rich_preview?: boolean; + headers?: Headers; + hls?: string; + hls_embed?: string; + id?: string; + image_exif_rotation?: number; + ims?: string[]; + initial_comment?: InitialComment; + is_channel_space?: boolean; + is_external?: boolean; + is_public?: boolean; + is_starred?: boolean; + last_editor?: string; + last_read?: number; + lines?: number; + lines_more?: number; + linked_channel_id?: string; + list_limits?: ListLimits; + list_metadata?: ListMetadata; + media_display_type?: string; + media_progress?: MediaProgress; + mimetype?: string; + mode?: string; + mp4?: string; + mp4_low?: string; + name?: string; + non_owner_editable?: boolean; + num_stars?: number; + org_or_workspace_access?: string; + original_attachment_count?: number; + original_h?: string; + original_w?: string; + permalink?: string; + permalink_public?: string; + pinned_to?: string[]; + pjpeg?: string; + plain_text?: string; + pretty_type?: string; + preview?: string; + preview_highlight?: string; + preview_is_truncated?: boolean; + preview_plain_text?: string; private_channels_with_file_access_count?: number; - private_file_with_access_count?: number; - public_url_shared?: boolean; - quip_thread_id?: string; - reactions?: Reaction[]; - saved?: Saved; - sent_to_self?: boolean; - shares?: Shares; - show_badge?: boolean; - simplified_html?: string; - size?: number; - source_team?: string; - subject?: string; - subtype?: string; - team_pref_version_history_enabled?: boolean; - teams_shared_with?: any[]; - template_conversion_ts?: number; - template_description?: string; - template_icon?: string; - template_name?: string; - template_title?: string; - thumb_1024?: string; - thumb_1024_gif?: string; - thumb_1024_h?: string; - thumb_1024_w?: string; - thumb_160?: string; - thumb_160_gif?: string; - thumb_160_h?: string; - thumb_160_w?: string; - thumb_360?: string; - thumb_360_gif?: string; - thumb_360_h?: string; - thumb_360_w?: string; - thumb_480?: string; - thumb_480_gif?: string; - thumb_480_h?: string; - thumb_480_w?: string; - thumb_64?: string; - thumb_64_gif?: string; - thumb_64_h?: string; - thumb_64_w?: string; - thumb_720?: string; - thumb_720_gif?: string; - thumb_720_h?: string; - thumb_720_w?: string; - thumb_80?: string; - thumb_800?: string; - thumb_800_gif?: string; - thumb_800_h?: string; - thumb_800_w?: string; - thumb_80_gif?: string; - thumb_80_h?: string; - thumb_80_w?: string; - thumb_960?: string; - thumb_960_gif?: string; - thumb_960_h?: string; - thumb_960_w?: string; - thumb_gif?: string; - thumb_pdf?: string; - thumb_pdf_h?: string; - thumb_pdf_w?: string; - thumb_tiny?: string; - thumb_video?: string; - thumb_video_h?: number; - thumb_video_w?: number; - timestamp?: number; - title?: string; - title_blocks?: TitleBlockElement[]; - to?: Cc[]; - transcription?: Transcription; - update_notification?: number; - updated?: number; - url_private?: string; - url_private_download?: string; - url_static_preview?: string; - user?: string; - user_team?: string; - username?: string; - vtt?: string; + private_file_with_access_count?: number; + public_url_shared?: boolean; + quip_thread_id?: string; + reactions?: Reaction[]; + saved?: Saved; + sent_to_self?: boolean; + shares?: Shares; + show_badge?: boolean; + simplified_html?: string; + size?: number; + source_team?: string; + subject?: string; + subtype?: string; + team_pref_version_history_enabled?: boolean; + teams_shared_with?: any[]; + template_conversion_ts?: number; + template_description?: string; + template_icon?: string; + template_name?: string; + template_title?: string; + thumb_1024?: string; + thumb_1024_gif?: string; + thumb_1024_h?: string; + thumb_1024_w?: string; + thumb_160?: string; + thumb_160_gif?: string; + thumb_160_h?: string; + thumb_160_w?: string; + thumb_360?: string; + thumb_360_gif?: string; + thumb_360_h?: string; + thumb_360_w?: string; + thumb_480?: string; + thumb_480_gif?: string; + thumb_480_h?: string; + thumb_480_w?: string; + thumb_64?: string; + thumb_64_gif?: string; + thumb_64_h?: string; + thumb_64_w?: string; + thumb_720?: string; + thumb_720_gif?: string; + thumb_720_h?: string; + thumb_720_w?: string; + thumb_80?: string; + thumb_800?: string; + thumb_800_gif?: string; + thumb_800_h?: string; + thumb_800_w?: string; + thumb_80_gif?: string; + thumb_80_h?: string; + thumb_80_w?: string; + thumb_960?: string; + thumb_960_gif?: string; + thumb_960_h?: string; + thumb_960_w?: string; + thumb_gif?: string; + thumb_pdf?: string; + thumb_pdf_h?: string; + thumb_pdf_w?: string; + thumb_tiny?: string; + thumb_video?: string; + thumb_video_h?: number; + thumb_video_w?: number; + timestamp?: number; + title?: string; + title_blocks?: TitleBlockElement[]; + to?: Cc[]; + transcription?: Transcription; + update_notification?: number; + updated?: number; + url_private?: string; + url_private_download?: string; + url_static_preview?: string; + user?: string; + user_team?: string; + username?: string; + vtt?: string; } export interface Cc { - address?: string; - name?: string; + address?: string; + name?: string; original?: string; } export interface DmMpdmUsersWithFileAccess { - access?: string; + access?: string; user_id?: string; } export interface Favorite { - collection_id?: string; + collection_id?: string; collection_name?: string; - position?: string; + position?: string; } export interface Headers { - date?: string; + date?: string; in_reply_to?: string; - message_id?: string; - reply_to?: string; + message_id?: string; + reply_to?: string; } export interface InitialComment { - channel?: string; - comment?: string; - created?: number; - id?: string; - is_intro?: boolean; + channel?: string; + comment?: string; + created?: number; + id?: string; + is_intro?: boolean; timestamp?: number; - user?: string; + user?: string; } export interface ListLimits { - column_count?: number; - column_count_limit?: number; + column_count?: number; + column_count_limit?: number; over_column_maximum?: boolean; - over_row_maximum?: boolean; - over_view_maximum?: boolean; - row_count?: number; - row_count_limit?: number; - view_count?: number; - view_count_limit?: number; + over_row_maximum?: boolean; + over_view_maximum?: boolean; + row_count?: number; + row_count_limit?: number; + view_count?: number; + view_count_limit?: number; } export interface ListMetadata { creation_source?: CreationSource; - description?: string; - icon?: string; - icon_team_id?: string; - icon_url?: string; - integrations?: string[]; - is_trial?: boolean; - schema?: Schema[]; - views?: View[]; + description?: string; + icon?: string; + icon_team_id?: string; + icon_url?: string; + integrations?: string[]; + is_trial?: boolean; + schema?: Schema[]; + views?: View[]; } export interface CreationSource { - reference_id?: string; - type?: string; + reference_id?: string; + type?: string; workflow_function_id?: string; } export interface Schema { - id?: string; + id?: string; is_primary_column?: boolean; - key?: string; - name?: string; - options?: Options; - type?: string; + key?: string; + name?: string; + options?: Options; + type?: string; } export interface Options { - canvas_id?: string; + canvas_id?: string; canvas_placeholder_mapping?: CanvasPlaceholderMapping[]; - choices?: Choice[]; - currency?: string; - currency_format?: string; - date_format?: string; - default_value?: string; - default_value_typed?: DefaultValueTyped; - emoji?: string; - emoji_team_id?: string; - for_assignment?: boolean; - format?: string; - linked_to?: string[]; - mark_as_done_when_checked?: boolean; - max?: number; - notify_users?: boolean; - precision?: number; - rounding?: string; - show_member_name?: boolean; - time_format?: string; + choices?: Choice[]; + currency?: string; + currency_format?: string; + date_format?: string; + default_value?: string; + default_value_typed?: DefaultValueTyped; + emoji?: string; + emoji_team_id?: string; + for_assignment?: boolean; + format?: string; + linked_to?: string[]; + mark_as_done_when_checked?: boolean; + max?: number; + notify_users?: boolean; + precision?: number; + rounding?: string; + show_member_name?: boolean; + time_format?: string; } export interface CanvasPlaceholderMapping { - column?: string; + column?: string; variable?: string; } @@ -639,64 +639,64 @@ export interface DefaultValueTyped { } export interface View { - columns?: Column[]; - created_by?: string; - date_created?: number; - id?: string; + columns?: Column[]; + created_by?: string; + date_created?: number; + id?: string; is_all_items_view?: boolean; - is_locked?: boolean; - name?: string; - position?: string; + is_locked?: boolean; + name?: string; + position?: string; stick_column_left?: boolean; - type?: string; + type?: string; } export interface Column { - id?: string; - key?: string; + id?: string; + key?: string; position?: string; - visible?: boolean; - width?: number; + visible?: boolean; + width?: number; } export interface MediaProgress { - duration_ms?: number; + duration_ms?: number; max_offset_ms?: number; - offset_ms?: number; + offset_ms?: number; } export interface Reaction { count?: number; - name?: string; - url?: string; + name?: string; + url?: string; users?: string[]; } export interface Saved { date_completed?: number; - date_due?: number; - is_archived?: boolean; - state?: string; + date_due?: number; + is_archived?: boolean; + state?: string; } export interface Shares { private?: { [key: string]: Private[] }; - public?: { [key: string]: Private[] }; + public?: { [key: string]: Private[] }; } export interface Private { - access?: string; - channel_name?: string; - date_last_shared?: number; - latest_reply?: string; - reply_count?: number; - reply_users?: string[]; + access?: string; + channel_name?: string; + date_last_shared?: number; + latest_reply?: string; + reply_count?: number; + reply_users?: string[]; reply_users_count?: number; - share_user_id?: string; - source?: string; - team_id?: string; - thread_ts?: string; - ts?: string; + share_user_id?: string; + source?: string; + team_id?: string; + thread_ts?: string; + ts?: string; } export interface Transcription { @@ -705,48 +705,47 @@ export interface Transcription { } export interface List { - channels?: string[]; - comments_count?: number; - created?: number; - display_as_bot?: boolean; - dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; - editable?: boolean; - external_type?: string; - file_access?: string; - filetype?: string; - groups?: string[]; - has_more_shares?: boolean; - has_rich_preview?: boolean; - id?: string; - ims?: string[]; - is_external?: boolean; - is_public?: boolean; - last_editor?: string; - list_limits?: ListLimits; - list_metadata?: ListMetadata; - mimetype?: string; - mode?: string; - name?: string; - permalink?: string; - permalink_public?: string; - pretty_type?: string; + channels?: string[]; + comments_count?: number; + created?: number; + display_as_bot?: boolean; + dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; + editable?: boolean; + external_type?: string; + file_access?: string; + filetype?: string; + groups?: string[]; + has_more_shares?: boolean; + has_rich_preview?: boolean; + id?: string; + ims?: string[]; + is_external?: boolean; + is_public?: boolean; + last_editor?: string; + list_limits?: ListLimits; + list_metadata?: ListMetadata; + mimetype?: string; + mode?: string; + name?: string; + permalink?: string; + permalink_public?: string; + pretty_type?: string; private_channels_with_file_access_count?: number; - private_file_with_access_count?: number; - public_url_shared?: boolean; - shares?: EventPayload; - size?: number; - timestamp?: number; - title?: string; - updated?: number; - url_private?: string; - url_private_download?: string; - user?: string; - user_team?: string; - username?: string; + private_file_with_access_count?: number; + public_url_shared?: boolean; + shares?: EventPayload; + size?: number; + timestamp?: number; + title?: string; + updated?: number; + url_private?: string; + url_private_download?: string; + user?: string; + user_team?: string; + username?: string; } -export interface EventPayload { -} +export type EventPayload = {}; export interface PurpleListRecord { record?: Record; @@ -754,90 +753,90 @@ export interface PurpleListRecord { } export interface Record { - fields?: RecordField[]; + fields?: RecordField[]; record_id?: string; } export interface RecordField { attachment?: any[]; - channel?: any[]; - checkbox?: boolean; - column_id?: string; - date?: any[]; - email?: any[]; - key?: string; - message?: FieldMessage; - number?: any[]; - phone?: any[]; - rating?: any[]; - rich_text?: any[]; - select?: any[]; - text?: string; - timestamp?: any[]; - user?: any[]; - value?: string; + channel?: any[]; + checkbox?: boolean; + column_id?: string; + date?: any[]; + email?: any[]; + key?: string; + message?: FieldMessage; + number?: any[]; + phone?: any[]; + rating?: any[]; + rich_text?: any[]; + select?: any[]; + text?: string; + timestamp?: any[]; + user?: any[]; + value?: string; } export interface FieldMessage { - app_id?: string; - attachments?: any[]; - blocks?: TitleBlockElement[]; - bot_id?: string; - bot_link?: string; - bot_profile?: BotProfile; - channel?: string; - client_msg_id?: string; - comment?: Comment; - display_as_bot?: boolean; - edited?: Edited; - file?: PurpleFile; - files?: any[]; - hidden?: boolean; - icons?: MessageIcons; - inviter?: string; - is_intro?: boolean; - is_locked?: boolean; - is_starred?: boolean; + app_id?: string; + attachments?: any[]; + blocks?: TitleBlockElement[]; + bot_id?: string; + bot_link?: string; + bot_profile?: BotProfile; + channel?: string; + client_msg_id?: string; + comment?: Comment; + display_as_bot?: boolean; + edited?: Edited; + file?: PurpleFile; + files?: any[]; + hidden?: boolean; + icons?: MessageIcons; + inviter?: string; + is_intro?: boolean; + is_locked?: boolean; + is_starred?: boolean; is_thread_broadcast?: boolean; - item?: Comment; - item_type?: string; - last_read?: string; - latest_reply?: string; - metadata?: PurpleMetadata; - no_notifications?: boolean; - parent_user_id?: string; - pinned_to?: any[]; - purpose?: string; - reactions?: any[]; - replies?: any[]; - reply_count?: number; - reply_users?: any[]; - reply_users_count?: number; - room?: Room; - root?: Root; - subscribed?: boolean; - subtype?: string; - team?: string; - text?: string; - thread_ts?: string; - topic?: string; - ts?: string; - type?: string; - unfurl_links?: boolean; - unfurl_media?: boolean; - upload?: boolean; - user?: string; - username?: string; - wibblr?: boolean; - x_files?: any[]; + item?: Comment; + item_type?: string; + last_read?: string; + latest_reply?: string; + metadata?: PurpleMetadata; + no_notifications?: boolean; + parent_user_id?: string; + pinned_to?: any[]; + purpose?: string; + reactions?: any[]; + replies?: any[]; + reply_count?: number; + reply_users?: any[]; + reply_users_count?: number; + room?: Room; + root?: Root; + subscribed?: boolean; + subtype?: string; + team?: string; + text?: string; + thread_ts?: string; + topic?: string; + ts?: string; + type?: string; + unfurl_links?: boolean; + unfurl_media?: boolean; + upload?: boolean; + user?: string; + username?: string; + wibblr?: boolean; + x_files?: any[]; } export interface BotProfile { - app_id?: string; + app_id?: string; deleted?: boolean; - icons?: BotProfileIcons; - id?: string; - name?: string; + icons?: BotProfileIcons; + id?: string; + name?: string; team_id?: string; updated?: number; } @@ -849,208 +848,208 @@ export interface BotProfileIcons { } export interface Comment { - comment?: string; - created?: string; - display_as_bot?: boolean; - edit_link?: string; - editable?: boolean; - external_type?: string; - filetype?: string; - has_rich_preview?: boolean; - id?: string; - is_external?: boolean; - is_intro?: boolean; - is_public?: boolean; - is_starred?: boolean; - lines?: number; - lines_more?: number; - media_display_type?: string; - mimetype?: string; - mode?: string; - name?: string; - permalink?: string; - permalink_public?: boolean; - pretty_type?: string; - preview?: string; - preview_highlight?: string; + comment?: string; + created?: string; + display_as_bot?: boolean; + edit_link?: string; + editable?: boolean; + external_type?: string; + filetype?: string; + has_rich_preview?: boolean; + id?: string; + is_external?: boolean; + is_intro?: boolean; + is_public?: boolean; + is_starred?: boolean; + lines?: number; + lines_more?: number; + media_display_type?: string; + mimetype?: string; + mode?: string; + name?: string; + permalink?: string; + permalink_public?: boolean; + pretty_type?: string; + preview?: string; + preview_highlight?: string; preview_is_truncated?: boolean; - public_url_shared?: boolean; - size?: number; - timestamp?: string; - title?: string; - url_private?: string; + public_url_shared?: boolean; + size?: number; + timestamp?: string; + title?: string; + url_private?: string; url_private_download?: boolean; - user?: string; - username?: string; + user?: string; + username?: string; } export interface Edited { - ts?: string; + ts?: string; user?: string; } export interface PurpleFile { - access?: string; - alt_txt?: string; - app_id?: string; - app_name?: string; - attachments?: any[]; - blocks?: any[]; - bot_id?: string; - can_toggle_canvas_lock?: boolean; - canvas_template_mode?: string; - cc?: any[]; - channel_actions_count?: number; - channel_actions_ts?: string; - channels?: any[]; - comments_count?: number; - converted_pdf?: string; - created?: number; - deanimate?: string; - deanimate_gif?: string; - display_as_bot?: boolean; - dm_mpdm_users_with_file_access?: any[]; - duration_ms?: number; - edit_link?: string; - edit_timestamp?: number; - editable?: boolean; - editor?: string; - editors?: any[]; - external_id?: string; - external_type?: string; - external_url?: string; - favorites?: any[]; - file_access?: string; - filetype?: string; - from?: any[]; - groups?: any[]; - has_more?: boolean; - has_more_shares?: boolean; - has_rich_preview?: boolean; - headers?: Headers; - hls?: string; - hls_embed?: string; - id?: string; - image_exif_rotation?: number; - ims?: any[]; - initial_comment?: InitialComment; - is_channel_space?: boolean; - is_external?: boolean; - is_public?: boolean; - is_starred?: boolean; - last_editor?: string; - last_read?: number; - lines?: number; - lines_more?: number; - linked_channel_id?: string; - list_limits?: ListLimits; - list_metadata?: ListMetadata; - media_display_type?: string; - media_progress?: MediaProgress; - mimetype?: string; - mode?: string; - mp4?: string; - mp4_low?: string; - name?: string; - non_owner_editable?: boolean; - num_stars?: number; - org_or_workspace_access?: string; - original_attachment_count?: number; - original_h?: string; - original_w?: string; - permalink?: string; - permalink_public?: string; - pinned_to?: any[]; - pjpeg?: string; - plain_text?: string; - pretty_type?: string; - preview?: string; - preview_highlight?: string; - preview_is_truncated?: boolean; - preview_plain_text?: string; + access?: string; + alt_txt?: string; + app_id?: string; + app_name?: string; + attachments?: any[]; + blocks?: any[]; + bot_id?: string; + can_toggle_canvas_lock?: boolean; + canvas_template_mode?: string; + cc?: any[]; + channel_actions_count?: number; + channel_actions_ts?: string; + channels?: any[]; + comments_count?: number; + converted_pdf?: string; + created?: number; + deanimate?: string; + deanimate_gif?: string; + display_as_bot?: boolean; + dm_mpdm_users_with_file_access?: any[]; + duration_ms?: number; + edit_link?: string; + edit_timestamp?: number; + editable?: boolean; + editor?: string; + editors?: any[]; + external_id?: string; + external_type?: string; + external_url?: string; + favorites?: any[]; + file_access?: string; + filetype?: string; + from?: any[]; + groups?: any[]; + has_more?: boolean; + has_more_shares?: boolean; + has_rich_preview?: boolean; + headers?: Headers; + hls?: string; + hls_embed?: string; + id?: string; + image_exif_rotation?: number; + ims?: any[]; + initial_comment?: InitialComment; + is_channel_space?: boolean; + is_external?: boolean; + is_public?: boolean; + is_starred?: boolean; + last_editor?: string; + last_read?: number; + lines?: number; + lines_more?: number; + linked_channel_id?: string; + list_limits?: ListLimits; + list_metadata?: ListMetadata; + media_display_type?: string; + media_progress?: MediaProgress; + mimetype?: string; + mode?: string; + mp4?: string; + mp4_low?: string; + name?: string; + non_owner_editable?: boolean; + num_stars?: number; + org_or_workspace_access?: string; + original_attachment_count?: number; + original_h?: string; + original_w?: string; + permalink?: string; + permalink_public?: string; + pinned_to?: any[]; + pjpeg?: string; + plain_text?: string; + pretty_type?: string; + preview?: string; + preview_highlight?: string; + preview_is_truncated?: boolean; + preview_plain_text?: string; private_channels_with_file_access_count?: number; - private_file_with_access_count?: number; - public_url_shared?: boolean; - quip_thread_id?: string; - reactions?: any[]; - saved?: Saved; - sent_to_self?: boolean; - shares?: EventPayload; - show_badge?: boolean; - simplified_html?: string; - size?: number; - source_team?: string; - subject?: string; - subtype?: string; - team_pref_version_history_enabled?: boolean; - teams_shared_with?: any[]; - template_conversion_ts?: number; - template_description?: string; - template_icon?: string; - template_name?: string; - template_title?: string; - thumb_1024?: string; - thumb_1024_gif?: string; - thumb_1024_h?: string; - thumb_1024_w?: string; - thumb_160?: string; - thumb_160_gif?: string; - thumb_160_h?: string; - thumb_160_w?: string; - thumb_360?: string; - thumb_360_gif?: string; - thumb_360_h?: string; - thumb_360_w?: string; - thumb_480?: string; - thumb_480_gif?: string; - thumb_480_h?: string; - thumb_480_w?: string; - thumb_64?: string; - thumb_64_gif?: string; - thumb_64_h?: string; - thumb_64_w?: string; - thumb_720?: string; - thumb_720_gif?: string; - thumb_720_h?: string; - thumb_720_w?: string; - thumb_80?: string; - thumb_800?: string; - thumb_800_gif?: string; - thumb_800_h?: string; - thumb_800_w?: string; - thumb_80_gif?: string; - thumb_80_h?: string; - thumb_80_w?: string; - thumb_960?: string; - thumb_960_gif?: string; - thumb_960_h?: string; - thumb_960_w?: string; - thumb_gif?: string; - thumb_pdf?: string; - thumb_pdf_h?: string; - thumb_pdf_w?: string; - thumb_tiny?: string; - thumb_video?: string; - thumb_video_h?: number; - thumb_video_w?: number; - timestamp?: number; - title?: string; - title_blocks?: any[]; - to?: any[]; - transcription?: Transcription; - update_notification?: number; - updated?: number; - url_private?: string; - url_private_download?: string; - url_static_preview?: string; - user?: string; - user_team?: string; - username?: string; - vtt?: string; + private_file_with_access_count?: number; + public_url_shared?: boolean; + quip_thread_id?: string; + reactions?: any[]; + saved?: Saved; + sent_to_self?: boolean; + shares?: EventPayload; + show_badge?: boolean; + simplified_html?: string; + size?: number; + source_team?: string; + subject?: string; + subtype?: string; + team_pref_version_history_enabled?: boolean; + teams_shared_with?: any[]; + template_conversion_ts?: number; + template_description?: string; + template_icon?: string; + template_name?: string; + template_title?: string; + thumb_1024?: string; + thumb_1024_gif?: string; + thumb_1024_h?: string; + thumb_1024_w?: string; + thumb_160?: string; + thumb_160_gif?: string; + thumb_160_h?: string; + thumb_160_w?: string; + thumb_360?: string; + thumb_360_gif?: string; + thumb_360_h?: string; + thumb_360_w?: string; + thumb_480?: string; + thumb_480_gif?: string; + thumb_480_h?: string; + thumb_480_w?: string; + thumb_64?: string; + thumb_64_gif?: string; + thumb_64_h?: string; + thumb_64_w?: string; + thumb_720?: string; + thumb_720_gif?: string; + thumb_720_h?: string; + thumb_720_w?: string; + thumb_80?: string; + thumb_800?: string; + thumb_800_gif?: string; + thumb_800_h?: string; + thumb_800_w?: string; + thumb_80_gif?: string; + thumb_80_h?: string; + thumb_80_w?: string; + thumb_960?: string; + thumb_960_gif?: string; + thumb_960_h?: string; + thumb_960_w?: string; + thumb_gif?: string; + thumb_pdf?: string; + thumb_pdf_h?: string; + thumb_pdf_w?: string; + thumb_tiny?: string; + thumb_video?: string; + thumb_video_h?: number; + thumb_video_w?: number; + timestamp?: number; + title?: string; + title_blocks?: any[]; + to?: any[]; + transcription?: Transcription; + update_notification?: number; + updated?: number; + url_private?: string; + url_private_download?: string; + url_static_preview?: string; + user?: string; + user_team?: string; + username?: string; + vtt?: string; } export interface MessageIcons { - emoji?: string; + emoji?: string; image_36?: string; image_48?: string; image_64?: string; @@ -1062,77 +1061,77 @@ export interface PurpleMetadata { } export interface Room { - app_id?: string; - attached_file_ids?: any[]; - background_id?: string; - call_family?: string; - canvas_background?: string; - canvas_thread_ts?: string; - channels?: any[]; - created_by?: string; - date_end?: number; - date_start?: number; - display_id?: string; - external_unique_id?: string; - has_ended?: boolean; - id?: string; - is_dm_call?: boolean; - is_prewarmed?: boolean; - is_scheduled?: boolean; - media_backend_type?: string; - media_server?: string; - name?: string; - participant_history?: any[]; - participants?: any[]; - participants_camera_off?: any[]; - participants_camera_on?: any[]; + app_id?: string; + attached_file_ids?: any[]; + background_id?: string; + call_family?: string; + canvas_background?: string; + canvas_thread_ts?: string; + channels?: any[]; + created_by?: string; + date_end?: number; + date_start?: number; + display_id?: string; + external_unique_id?: string; + has_ended?: boolean; + id?: string; + is_dm_call?: boolean; + is_prewarmed?: boolean; + is_scheduled?: boolean; + media_backend_type?: string; + media_server?: string; + name?: string; + participant_history?: any[]; + participants?: any[]; + participants_camera_off?: any[]; + participants_camera_on?: any[]; participants_screenshare_off?: any[]; - participants_screenshare_on?: any[]; - thread_root_ts?: string; - was_accepted?: boolean; - was_missed?: boolean; - was_rejected?: boolean; + participants_screenshare_on?: any[]; + thread_root_ts?: string; + was_accepted?: boolean; + was_missed?: boolean; + was_rejected?: boolean; } export interface Root { - bot_id?: string; - bot_profile?: BotProfile; - edited?: Edited; - icons?: MessageIcons; - last_read?: string; - latest_reply?: string; - mrkdwn?: boolean; - no_notifications?: boolean; - parent_user_id?: string; - replies?: any[]; - reply_count?: number; - reply_users?: any[]; + bot_id?: string; + bot_profile?: BotProfile; + edited?: Edited; + icons?: MessageIcons; + last_read?: string; + latest_reply?: string; + mrkdwn?: boolean; + no_notifications?: boolean; + parent_user_id?: string; + replies?: any[]; + reply_count?: number; + reply_users?: any[]; reply_users_count?: number; - room?: Room; - subscribed?: boolean; - subtype?: string; - team?: string; - text?: string; - thread_ts?: string; - ts?: string; - type?: string; - unread_count?: number; - user?: string; - username?: string; + room?: Room; + subscribed?: boolean; + subtype?: string; + team?: string; + text?: string; + thread_ts?: string; + ts?: string; + type?: string; + unread_count?: number; + user?: string; + username?: string; } export interface ListRecordElement { - created_by?: string; - date_created?: number; - fields?: RecordField[]; - id?: string; - is_subscribed?: boolean; - list_id?: string; - platform_refs?: PlatformRefs; - position?: string; - saved?: Saved; - thread_ts?: string; - updated_by?: string; + created_by?: string; + date_created?: number; + fields?: RecordField[]; + id?: string; + is_subscribed?: boolean; + list_id?: string; + platform_refs?: PlatformRefs; + position?: string; + saved?: Saved; + thread_ts?: string; + updated_by?: string; updated_timestamp?: string; } @@ -1145,133 +1144,133 @@ export interface PlatformRefs { export interface MessageBlock { channel?: string; message?: FieldMessage; - team?: string; - ts?: string; + team?: string; + ts?: string; } export interface AttachmentMetadata { - extension?: string; - format?: string; - original_h?: number; - original_w?: number; - rotation?: number; - thumb_160?: boolean; + extension?: string; + format?: string; + original_h?: number; + original_w?: number; + rotation?: number; + thumb_160?: boolean; thumb_360_h?: number; thumb_360_w?: number; - thumb_64?: boolean; - thumb_80?: boolean; - thumb_tiny?: string; + thumb_64?: boolean; + thumb_80?: boolean; + thumb_tiny?: string; } export interface Preview { can_remove?: boolean; - icon_url?: string; - subtitle?: DescriptionElement; - title?: DescriptionElement; - type?: string; + icon_url?: string; + subtitle?: DescriptionElement; + title?: DescriptionElement; + type?: string; } export interface PurpleBlock { - accessory?: Accessory; - alt_text?: string; - api_decoration_available?: boolean; - app_collaborators?: string[]; - app_id?: string; - author_name?: string; - block_id?: string; - bot_user_id?: string; - button_label?: string; - call?: Call; - call_id?: string; - description?: DescriptionElement; - developer_trace_id?: string; - dispatch_action?: boolean; - element?: Accessory; - elements?: Accessory[]; - external_id?: string; - fallback?: string; - fields?: DescriptionElement[]; - file?: FileElement; - file_id?: string; - function_trigger_id?: string; - hint?: DescriptionElement; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - is_animated?: boolean; - is_workflow_app?: boolean; - label?: DescriptionElement; - optional?: boolean; - owning_team_id?: string; - provider_icon_url?: string; - provider_name?: string; + accessory?: Accessory; + alt_text?: string; + api_decoration_available?: boolean; + app_collaborators?: string[]; + app_id?: string; + author_name?: string; + block_id?: string; + bot_user_id?: string; + button_label?: string; + call?: Call; + call_id?: string; + description?: DescriptionElement; + developer_trace_id?: string; + dispatch_action?: boolean; + element?: Accessory; + elements?: Accessory[]; + external_id?: string; + fallback?: string; + fields?: DescriptionElement[]; + file?: FileElement; + file_id?: string; + function_trigger_id?: string; + hint?: DescriptionElement; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + is_animated?: boolean; + is_workflow_app?: boolean; + label?: DescriptionElement; + optional?: boolean; + owning_team_id?: string; + provider_icon_url?: string; + provider_name?: string; sales_home_workflow_app_type?: number; - share_url?: string; - slack_file?: SlackFile; - source?: string; - text?: DescriptionElement; - thumbnail_url?: string; - title?: DescriptionElement; - title_url?: string; - trigger_subtype?: string; - trigger_type?: string; - type?: BlockType; - url?: string; - video_url?: string; - workflow_id?: string; + share_url?: string; + slack_file?: SlackFile; + source?: string; + text?: DescriptionElement; + thumbnail_url?: string; + title?: DescriptionElement; + title_url?: string; + trigger_subtype?: string; + trigger_type?: string; + type?: BlockType; + url?: string; + video_url?: string; + workflow_id?: string; } export interface Call { media_backend_type?: string; - v1?: V1; + v1?: V1; } export interface V1 { - active_participants?: Participant[]; - all_participants?: Participant[]; - app_icon_urls?: AppIconUrls; - app_id?: string; - channels?: string[]; - created_by?: string; - date_end?: number; - date_start?: number; + active_participants?: Participant[]; + all_participants?: Participant[]; + app_icon_urls?: AppIconUrls; + app_id?: string; + channels?: string[]; + created_by?: string; + date_end?: number; + date_start?: number; desktop_app_join_url?: string; - display_id?: string; - has_ended?: boolean; - id?: string; - is_dm_call?: boolean; - join_url?: string; - name?: string; - was_accepted?: boolean; - was_missed?: boolean; - was_rejected?: boolean; + display_id?: string; + has_ended?: boolean; + id?: string; + is_dm_call?: boolean; + join_url?: string; + name?: string; + was_accepted?: boolean; + was_missed?: boolean; + was_rejected?: boolean; } export interface Participant { - avatar_url?: string; + avatar_url?: string; display_name?: string; - external_id?: string; - slack_id?: string; + external_id?: string; + slack_id?: string; } export interface AppIconUrls { - image_1024?: string; - image_128?: string; - image_192?: string; - image_32?: string; - image_36?: string; - image_48?: string; - image_512?: string; - image_64?: string; - image_72?: string; - image_96?: string; + image_1024?: string; + image_128?: string; + image_192?: string; + image_32?: string; + image_36?: string; + image_48?: string; + image_512?: string; + image_64?: string; + image_72?: string; + image_96?: string; image_original?: string; } export interface FluffyMetadata { event_payload?: EventPayload; - event_type?: string; + event_type?: string; } export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/ConversationsSetPurposeResponse.ts b/packages/web-api/src/types/response/ConversationsSetPurposeResponse.ts index 2ea93449e..e81281ad6 100644 --- a/packages/web-api/src/types/response/ConversationsSetPurposeResponse.ts +++ b/packages/web-api/src/types/response/ConversationsSetPurposeResponse.ts @@ -8,47 +8,47 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ConversationsSetPurposeResponse = WebAPICallResult & { - channel?: Channel; - error?: string; - needed?: string; - ok?: boolean; + channel?: Channel; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; export interface Channel { - context_team_id?: string; - created?: number; - creator?: string; - id?: string; - is_archived?: boolean; - is_channel?: boolean; - is_ext_shared?: boolean; - is_general?: boolean; - is_group?: boolean; - is_im?: boolean; - is_member?: boolean; - is_mpim?: boolean; - is_org_shared?: boolean; - is_pending_ext_shared?: boolean; - is_private?: boolean; - is_shared?: boolean; - last_read?: string; - name?: string; - name_normalized?: string; + context_team_id?: string; + created?: number; + creator?: string; + id?: string; + is_archived?: boolean; + is_channel?: boolean; + is_ext_shared?: boolean; + is_general?: boolean; + is_group?: boolean; + is_im?: boolean; + is_member?: boolean; + is_mpim?: boolean; + is_org_shared?: boolean; + is_pending_ext_shared?: boolean; + is_private?: boolean; + is_shared?: boolean; + last_read?: string; + name?: string; + name_normalized?: string; pending_connected_team_ids?: string[]; - pending_shared?: string[]; - previous_names?: string[]; - purpose?: Purpose; - shared_team_ids?: string[]; - topic?: Purpose; - unlinked?: number; - updated?: number; + pending_shared?: string[]; + previous_names?: string[]; + purpose?: Purpose; + shared_team_ids?: string[]; + topic?: Purpose; + unlinked?: number; + updated?: number; } export interface Purpose { - creator?: string; + creator?: string; last_set?: number; - value?: string; + value?: string; } diff --git a/packages/web-api/src/types/response/ConversationsSetTopicResponse.ts b/packages/web-api/src/types/response/ConversationsSetTopicResponse.ts index e663b00bf..dcfb28ead 100644 --- a/packages/web-api/src/types/response/ConversationsSetTopicResponse.ts +++ b/packages/web-api/src/types/response/ConversationsSetTopicResponse.ts @@ -8,47 +8,47 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ConversationsSetTopicResponse = WebAPICallResult & { - channel?: Channel; - error?: string; - needed?: string; - ok?: boolean; + channel?: Channel; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; export interface Channel { - context_team_id?: string; - created?: number; - creator?: string; - id?: string; - is_archived?: boolean; - is_channel?: boolean; - is_ext_shared?: boolean; - is_general?: boolean; - is_group?: boolean; - is_im?: boolean; - is_member?: boolean; - is_mpim?: boolean; - is_org_shared?: boolean; - is_pending_ext_shared?: boolean; - is_private?: boolean; - is_shared?: boolean; - last_read?: string; - name?: string; - name_normalized?: string; + context_team_id?: string; + created?: number; + creator?: string; + id?: string; + is_archived?: boolean; + is_channel?: boolean; + is_ext_shared?: boolean; + is_general?: boolean; + is_group?: boolean; + is_im?: boolean; + is_member?: boolean; + is_mpim?: boolean; + is_org_shared?: boolean; + is_pending_ext_shared?: boolean; + is_private?: boolean; + is_shared?: boolean; + last_read?: string; + name?: string; + name_normalized?: string; pending_connected_team_ids?: string[]; - pending_shared?: string[]; - previous_names?: string[]; - purpose?: Purpose; - shared_team_ids?: string[]; - topic?: Purpose; - unlinked?: number; - updated?: number; + pending_shared?: string[]; + previous_names?: string[]; + purpose?: Purpose; + shared_team_ids?: string[]; + topic?: Purpose; + unlinked?: number; + updated?: number; } export interface Purpose { - creator?: string; + creator?: string; last_set?: number; - value?: string; + value?: string; } diff --git a/packages/web-api/src/types/response/ConversationsUnarchiveResponse.ts b/packages/web-api/src/types/response/ConversationsUnarchiveResponse.ts index 5b5365f29..8651cbac2 100644 --- a/packages/web-api/src/types/response/ConversationsUnarchiveResponse.ts +++ b/packages/web-api/src/types/response/ConversationsUnarchiveResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ConversationsUnarchiveResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/DialogOpenResponse.ts b/packages/web-api/src/types/response/DialogOpenResponse.ts index 9be2b79e7..14b2a79aa 100644 --- a/packages/web-api/src/types/response/DialogOpenResponse.ts +++ b/packages/web-api/src/types/response/DialogOpenResponse.ts @@ -8,14 +8,14 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type DialogOpenResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; - warning?: string; + warning?: string; }; export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/DndEndDndResponse.ts b/packages/web-api/src/types/response/DndEndDndResponse.ts index 756d5b758..0ba686df9 100644 --- a/packages/web-api/src/types/response/DndEndDndResponse.ts +++ b/packages/web-api/src/types/response/DndEndDndResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type DndEndDndResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/DndEndSnoozeResponse.ts b/packages/web-api/src/types/response/DndEndSnoozeResponse.ts index 83e21ba98..5c8fe4545 100644 --- a/packages/web-api/src/types/response/DndEndSnoozeResponse.ts +++ b/packages/web-api/src/types/response/DndEndSnoozeResponse.ts @@ -8,14 +8,14 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type DndEndSnoozeResponse = WebAPICallResult & { - dnd_enabled?: boolean; - error?: string; - needed?: string; - next_dnd_end_ts?: number; + dnd_enabled?: boolean; + error?: string; + needed?: string; + next_dnd_end_ts?: number; next_dnd_start_ts?: number; - ok?: boolean; - provided?: string; - snooze_enabled?: boolean; + ok?: boolean; + provided?: string; + snooze_enabled?: boolean; }; diff --git a/packages/web-api/src/types/response/DndInfoResponse.ts b/packages/web-api/src/types/response/DndInfoResponse.ts index b2887439b..161d3f267 100644 --- a/packages/web-api/src/types/response/DndInfoResponse.ts +++ b/packages/web-api/src/types/response/DndInfoResponse.ts @@ -8,13 +8,13 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type DndInfoResponse = WebAPICallResult & { - dnd_enabled?: boolean; - error?: string; - needed?: string; - next_dnd_end_ts?: number; + dnd_enabled?: boolean; + error?: string; + needed?: string; + next_dnd_end_ts?: number; next_dnd_start_ts?: number; - ok?: boolean; - provided?: string; + ok?: boolean; + provided?: string; }; diff --git a/packages/web-api/src/types/response/DndSetSnoozeResponse.ts b/packages/web-api/src/types/response/DndSetSnoozeResponse.ts index 9a443a16b..f41688d79 100644 --- a/packages/web-api/src/types/response/DndSetSnoozeResponse.ts +++ b/packages/web-api/src/types/response/DndSetSnoozeResponse.ts @@ -8,14 +8,14 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type DndSetSnoozeResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; - snooze_enabled?: boolean; - snooze_endtime?: number; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; + snooze_enabled?: boolean; + snooze_endtime?: number; snooze_is_indefinite?: boolean; - snooze_remaining?: number; + snooze_remaining?: number; }; diff --git a/packages/web-api/src/types/response/DndTeamInfoResponse.ts b/packages/web-api/src/types/response/DndTeamInfoResponse.ts index 371e77c28..e9578937d 100644 --- a/packages/web-api/src/types/response/DndTeamInfoResponse.ts +++ b/packages/web-api/src/types/response/DndTeamInfoResponse.ts @@ -8,17 +8,17 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type DndTeamInfoResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; - users?: { [key: string]: User }; + users?: { [key: string]: User }; }; export interface User { - dnd_enabled?: boolean; - next_dnd_end_ts?: number; + dnd_enabled?: boolean; + next_dnd_end_ts?: number; next_dnd_start_ts?: number; } diff --git a/packages/web-api/src/types/response/EmojiListResponse.ts b/packages/web-api/src/types/response/EmojiListResponse.ts index ce29e4cd7..009729324 100644 --- a/packages/web-api/src/types/response/EmojiListResponse.ts +++ b/packages/web-api/src/types/response/EmojiListResponse.ts @@ -8,19 +8,19 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type EmojiListResponse = WebAPICallResult & { - cache_ts?: string; - categories?: Category[]; + cache_ts?: string; + categories?: Category[]; categories_version?: string; - emoji?: { [key: string]: string }; - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + emoji?: { [key: string]: string }; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; }; export interface Category { emoji_names?: string[]; - name?: string; + name?: string; } diff --git a/packages/web-api/src/types/response/FilesCommentsAddResponse.ts b/packages/web-api/src/types/response/FilesCommentsAddResponse.ts index 90e5f36e2..83abd022d 100644 --- a/packages/web-api/src/types/response/FilesCommentsAddResponse.ts +++ b/packages/web-api/src/types/response/FilesCommentsAddResponse.ts @@ -8,11 +8,11 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type FilesCommentsAddResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; req_method?: string; }; diff --git a/packages/web-api/src/types/response/FilesCommentsDeleteResponse.ts b/packages/web-api/src/types/response/FilesCommentsDeleteResponse.ts index 55ae084f4..93da8faa3 100644 --- a/packages/web-api/src/types/response/FilesCommentsDeleteResponse.ts +++ b/packages/web-api/src/types/response/FilesCommentsDeleteResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type FilesCommentsDeleteResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/FilesCommentsEditResponse.ts b/packages/web-api/src/types/response/FilesCommentsEditResponse.ts index 3ae49de2d..e403da128 100644 --- a/packages/web-api/src/types/response/FilesCommentsEditResponse.ts +++ b/packages/web-api/src/types/response/FilesCommentsEditResponse.ts @@ -8,20 +8,20 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type FilesCommentsEditResponse = WebAPICallResult & { - comment?: Comment; - error?: string; - needed?: string; - ok?: boolean; + comment?: Comment; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; export interface Comment { - comment?: string; - created?: number; - id?: string; - is_intro?: boolean; + comment?: string; + created?: number; + id?: string; + is_intro?: boolean; timestamp?: number; - user?: string; + user?: string; } diff --git a/packages/web-api/src/types/response/FilesCompleteUploadExternalResponse.ts b/packages/web-api/src/types/response/FilesCompleteUploadExternalResponse.ts index 0a3023bde..0920b68c4 100644 --- a/packages/web-api/src/types/response/FilesCompleteUploadExternalResponse.ts +++ b/packages/web-api/src/types/response/FilesCompleteUploadExternalResponse.ts @@ -8,73 +8,73 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type FilesCompleteUploadExternalResponse = WebAPICallResult & { - error?: string; - files?: File[]; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + files?: File[]; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; export interface File { - alt_txt?: string; - channels?: string[]; - comments_count?: number; - created?: number; - deanimate?: string; - deanimate_gif?: string; - display_as_bot?: boolean; - edit_link?: string; - editable?: boolean; - external_type?: string; - file_access?: string; - filetype?: string; - groups?: string[]; - has_more_shares?: boolean; - has_rich_preview?: boolean; - id?: string; - ims?: string[]; - is_external?: boolean; - is_public?: boolean; - is_starred?: boolean; - lines?: number; - lines_more?: number; - media_display_type?: string; - mimetype?: string; - mode?: string; - name?: string; - original_h?: number; - original_w?: number; - permalink?: string; - permalink_public?: string; - pretty_type?: string; - preview?: string; - preview_highlight?: string; + alt_txt?: string; + channels?: string[]; + comments_count?: number; + created?: number; + deanimate?: string; + deanimate_gif?: string; + display_as_bot?: boolean; + edit_link?: string; + editable?: boolean; + external_type?: string; + file_access?: string; + filetype?: string; + groups?: string[]; + has_more_shares?: boolean; + has_rich_preview?: boolean; + id?: string; + ims?: string[]; + is_external?: boolean; + is_public?: boolean; + is_starred?: boolean; + lines?: number; + lines_more?: number; + media_display_type?: string; + mimetype?: string; + mode?: string; + name?: string; + original_h?: number; + original_w?: number; + permalink?: string; + permalink_public?: string; + pretty_type?: string; + preview?: string; + preview_highlight?: string; preview_is_truncated?: boolean; - public_url_shared?: boolean; - shares?: Shares; - size?: number; - thumb_160?: string; - thumb_360?: string; - thumb_360_gif?: string; - thumb_360_h?: number; - thumb_360_w?: number; - thumb_480?: string; - thumb_480_gif?: string; - thumb_480_h?: number; - thumb_480_w?: number; - thumb_64?: string; - thumb_80?: string; - thumb_tiny?: string; - timestamp?: number; - title?: string; - url_private?: string; + public_url_shared?: boolean; + shares?: Shares; + size?: number; + thumb_160?: string; + thumb_360?: string; + thumb_360_gif?: string; + thumb_360_h?: number; + thumb_360_w?: number; + thumb_480?: string; + thumb_480_gif?: string; + thumb_480_h?: number; + thumb_480_w?: number; + thumb_64?: string; + thumb_80?: string; + thumb_tiny?: string; + timestamp?: number; + title?: string; + url_private?: string; url_private_download?: string; - user?: string; - user_team?: string; - username?: string; + user?: string; + user_team?: string; + username?: string; } export interface Shares { @@ -82,16 +82,16 @@ export interface Shares { } export interface Public { - channel_name?: string; - latest_reply?: string; - reply_count?: number; - reply_users?: string[]; + channel_name?: string; + latest_reply?: string; + reply_count?: number; + reply_users?: string[]; reply_users_count?: number; - share_user_id?: string; - source?: string; - team_id?: string; - thread_ts?: string; - ts?: string; + share_user_id?: string; + source?: string; + team_id?: string; + thread_ts?: string; + ts?: string; } export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/FilesDeleteResponse.ts b/packages/web-api/src/types/response/FilesDeleteResponse.ts index ba164803c..a6c45de67 100644 --- a/packages/web-api/src/types/response/FilesDeleteResponse.ts +++ b/packages/web-api/src/types/response/FilesDeleteResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type FilesDeleteResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/FilesGetUploadURLExternalResponse.ts b/packages/web-api/src/types/response/FilesGetUploadURLExternalResponse.ts index 3fbed9a36..6fcaea5cd 100644 --- a/packages/web-api/src/types/response/FilesGetUploadURLExternalResponse.ts +++ b/packages/web-api/src/types/response/FilesGetUploadURLExternalResponse.ts @@ -8,15 +8,15 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type FilesGetUploadURLExternalResponse = WebAPICallResult & { - error?: string; - file_id?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + file_id?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; - upload_url?: string; + upload_url?: string; }; export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/FilesInfoResponse.ts b/packages/web-api/src/types/response/FilesInfoResponse.ts index 62608a93c..862351957 100644 --- a/packages/web-api/src/types/response/FilesInfoResponse.ts +++ b/packages/web-api/src/types/response/FilesInfoResponse.ts @@ -8,278 +8,278 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type FilesInfoResponse = WebAPICallResult & { - comments?: Comment[]; - content?: string; - content_highlight_css?: string; - content_highlight_html?: string; + comments?: Comment[]; + content?: string; + content_highlight_css?: string; + content_highlight_html?: string; content_highlight_html_truncated?: boolean; - error?: string; - file?: File; - is_truncated?: boolean; - needed?: string; - ok?: boolean; - paging?: Paging; - provided?: string; + error?: string; + file?: File; + is_truncated?: boolean; + needed?: string; + ok?: boolean; + paging?: Paging; + provided?: string; }; export interface Comment { - channel?: string; - comment?: string; - created?: number; - id?: string; - is_intro?: boolean; + channel?: string; + comment?: string; + created?: number; + id?: string; + is_intro?: boolean; timestamp?: number; - user?: string; + user?: string; } export interface File { - access?: string; - alt_txt?: string; - app_id?: string; - app_name?: string; - bot_id?: string; - can_toggle_canvas_lock?: boolean; - canvas_template_mode?: string; - cc?: Cc[]; - channel_actions_count?: number; - channel_actions_ts?: string; - channels?: string[]; - comments_count?: number; - converted_pdf?: string; - created?: number; - deanimate?: string; - deanimate_gif?: string; - display_as_bot?: boolean; - dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; - duration_ms?: number; - edit_link?: string; - edit_timestamp?: number; - editable?: boolean; - editor?: string; - editors?: string[]; - external_id?: string; - external_type?: string; - external_url?: string; - favorites?: Favorite[]; - file_access?: string; - filetype?: string; - from?: Cc[]; - groups?: string[]; - has_more?: boolean; - has_more_shares?: boolean; - has_rich_preview?: boolean; - headers?: Headers; - hls?: string; - hls_embed?: string; - id?: string; - image_exif_rotation?: number; - ims?: string[]; - initial_comment?: Comment; - is_channel_space?: boolean; - is_external?: boolean; - is_public?: boolean; - is_starred?: boolean; - last_editor?: string; - last_read?: number; - lines?: number; - lines_more?: number; - linked_channel_id?: string; - list_limits?: ListLimits; - list_metadata?: ListMetadata; - media_display_type?: string; - media_progress?: MediaProgress; - mimetype?: string; - mode?: string; - mp4?: string; - mp4_low?: string; - name?: string; - non_owner_editable?: boolean; - num_stars?: number; - org_or_workspace_access?: string; - original_attachment_count?: number; - original_h?: string; - original_w?: string; - permalink?: string; - permalink_public?: string; - pinned_to?: string[]; - pjpeg?: string; - plain_text?: string; - pretty_type?: string; - preview?: string; - preview_highlight?: string; - preview_is_truncated?: boolean; - preview_plain_text?: string; + access?: string; + alt_txt?: string; + app_id?: string; + app_name?: string; + bot_id?: string; + can_toggle_canvas_lock?: boolean; + canvas_template_mode?: string; + cc?: Cc[]; + channel_actions_count?: number; + channel_actions_ts?: string; + channels?: string[]; + comments_count?: number; + converted_pdf?: string; + created?: number; + deanimate?: string; + deanimate_gif?: string; + display_as_bot?: boolean; + dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; + duration_ms?: number; + edit_link?: string; + edit_timestamp?: number; + editable?: boolean; + editor?: string; + editors?: string[]; + external_id?: string; + external_type?: string; + external_url?: string; + favorites?: Favorite[]; + file_access?: string; + filetype?: string; + from?: Cc[]; + groups?: string[]; + has_more?: boolean; + has_more_shares?: boolean; + has_rich_preview?: boolean; + headers?: Headers; + hls?: string; + hls_embed?: string; + id?: string; + image_exif_rotation?: number; + ims?: string[]; + initial_comment?: Comment; + is_channel_space?: boolean; + is_external?: boolean; + is_public?: boolean; + is_starred?: boolean; + last_editor?: string; + last_read?: number; + lines?: number; + lines_more?: number; + linked_channel_id?: string; + list_limits?: ListLimits; + list_metadata?: ListMetadata; + media_display_type?: string; + media_progress?: MediaProgress; + mimetype?: string; + mode?: string; + mp4?: string; + mp4_low?: string; + name?: string; + non_owner_editable?: boolean; + num_stars?: number; + org_or_workspace_access?: string; + original_attachment_count?: number; + original_h?: string; + original_w?: string; + permalink?: string; + permalink_public?: string; + pinned_to?: string[]; + pjpeg?: string; + plain_text?: string; + pretty_type?: string; + preview?: string; + preview_highlight?: string; + preview_is_truncated?: boolean; + preview_plain_text?: string; private_channels_with_file_access_count?: number; - private_file_with_access_count?: number; - public_url_shared?: boolean; - quip_thread_id?: string; - reactions?: Reaction[]; - saved?: Saved; - sent_to_self?: boolean; - shares?: Shares; - show_badge?: boolean; - simplified_html?: string; - size?: number; - source_team?: string; - subject?: string; - subtype?: string; - team_pref_version_history_enabled?: boolean; - teams_shared_with?: any[]; - template_conversion_ts?: number; - template_description?: string; - template_icon?: string; - template_name?: string; - template_title?: string; - thumb_1024?: string; - thumb_1024_gif?: string; - thumb_1024_h?: string; - thumb_1024_w?: string; - thumb_160?: string; - thumb_160_gif?: string; - thumb_160_h?: string; - thumb_160_w?: string; - thumb_360?: string; - thumb_360_gif?: string; - thumb_360_h?: string; - thumb_360_w?: string; - thumb_480?: string; - thumb_480_gif?: string; - thumb_480_h?: string; - thumb_480_w?: string; - thumb_64?: string; - thumb_64_gif?: string; - thumb_64_h?: string; - thumb_64_w?: string; - thumb_720?: string; - thumb_720_gif?: string; - thumb_720_h?: string; - thumb_720_w?: string; - thumb_80?: string; - thumb_800?: string; - thumb_800_gif?: string; - thumb_800_h?: string; - thumb_800_w?: string; - thumb_80_gif?: string; - thumb_80_h?: string; - thumb_80_w?: string; - thumb_960?: string; - thumb_960_gif?: string; - thumb_960_h?: string; - thumb_960_w?: string; - thumb_gif?: string; - thumb_pdf?: string; - thumb_pdf_h?: string; - thumb_pdf_w?: string; - thumb_tiny?: string; - thumb_video?: string; - thumb_video_h?: number; - thumb_video_w?: number; - timestamp?: number; - title?: string; - title_blocks?: TitleBlock[]; - to?: Cc[]; - transcription?: Transcription; - update_notification?: number; - updated?: number; - url_private?: string; - url_private_download?: string; - url_static_preview?: string; - user?: string; - user_team?: string; - username?: string; - vtt?: string; + private_file_with_access_count?: number; + public_url_shared?: boolean; + quip_thread_id?: string; + reactions?: Reaction[]; + saved?: Saved; + sent_to_self?: boolean; + shares?: Shares; + show_badge?: boolean; + simplified_html?: string; + size?: number; + source_team?: string; + subject?: string; + subtype?: string; + team_pref_version_history_enabled?: boolean; + teams_shared_with?: any[]; + template_conversion_ts?: number; + template_description?: string; + template_icon?: string; + template_name?: string; + template_title?: string; + thumb_1024?: string; + thumb_1024_gif?: string; + thumb_1024_h?: string; + thumb_1024_w?: string; + thumb_160?: string; + thumb_160_gif?: string; + thumb_160_h?: string; + thumb_160_w?: string; + thumb_360?: string; + thumb_360_gif?: string; + thumb_360_h?: string; + thumb_360_w?: string; + thumb_480?: string; + thumb_480_gif?: string; + thumb_480_h?: string; + thumb_480_w?: string; + thumb_64?: string; + thumb_64_gif?: string; + thumb_64_h?: string; + thumb_64_w?: string; + thumb_720?: string; + thumb_720_gif?: string; + thumb_720_h?: string; + thumb_720_w?: string; + thumb_80?: string; + thumb_800?: string; + thumb_800_gif?: string; + thumb_800_h?: string; + thumb_800_w?: string; + thumb_80_gif?: string; + thumb_80_h?: string; + thumb_80_w?: string; + thumb_960?: string; + thumb_960_gif?: string; + thumb_960_h?: string; + thumb_960_w?: string; + thumb_gif?: string; + thumb_pdf?: string; + thumb_pdf_h?: string; + thumb_pdf_w?: string; + thumb_tiny?: string; + thumb_video?: string; + thumb_video_h?: number; + thumb_video_w?: number; + timestamp?: number; + title?: string; + title_blocks?: TitleBlock[]; + to?: Cc[]; + transcription?: Transcription; + update_notification?: number; + updated?: number; + url_private?: string; + url_private_download?: string; + url_static_preview?: string; + user?: string; + user_team?: string; + username?: string; + vtt?: string; } export interface Cc { - address?: string; - name?: string; + address?: string; + name?: string; original?: string; } export interface DmMpdmUsersWithFileAccess { - access?: string; + access?: string; user_id?: string; } export interface Favorite { - collection_id?: string; + collection_id?: string; collection_name?: string; - position?: string; + position?: string; } export interface Headers { - date?: string; + date?: string; in_reply_to?: string; - message_id?: string; - reply_to?: string; + message_id?: string; + reply_to?: string; } export interface ListLimits { - column_count?: number; - column_count_limit?: number; + column_count?: number; + column_count_limit?: number; over_column_maximum?: boolean; - over_row_maximum?: boolean; - over_view_maximum?: boolean; - row_count?: number; - row_count_limit?: number; - view_count?: number; - view_count_limit?: number; + over_row_maximum?: boolean; + over_view_maximum?: boolean; + row_count?: number; + row_count_limit?: number; + view_count?: number; + view_count_limit?: number; } export interface ListMetadata { creation_source?: CreationSource; - description?: string; - icon?: string; - icon_team_id?: string; - icon_url?: string; - integrations?: string[]; - is_trial?: boolean; - schema?: Schema[]; - views?: View[]; + description?: string; + icon?: string; + icon_team_id?: string; + icon_url?: string; + integrations?: string[]; + is_trial?: boolean; + schema?: Schema[]; + views?: View[]; } export interface CreationSource { - reference_id?: string; - type?: string; + reference_id?: string; + type?: string; workflow_function_id?: string; } export interface Schema { - id?: string; + id?: string; is_primary_column?: boolean; - key?: string; - name?: string; - options?: Options; - type?: string; + key?: string; + name?: string; + options?: Options; + type?: string; } export interface Options { - canvas_id?: string; + canvas_id?: string; canvas_placeholder_mapping?: CanvasPlaceholderMapping[]; - choices?: Choice[]; - currency?: string; - currency_format?: string; - date_format?: string; - default_value?: string; - default_value_typed?: DefaultValueTyped; - emoji?: string; - emoji_team_id?: string; - for_assignment?: boolean; - format?: string; - linked_to?: string[]; - mark_as_done_when_checked?: boolean; - max?: number; - notify_users?: boolean; - precision?: number; - rounding?: string; - show_member_name?: boolean; - time_format?: string; + choices?: Choice[]; + currency?: string; + currency_format?: string; + date_format?: string; + default_value?: string; + default_value_typed?: DefaultValueTyped; + emoji?: string; + emoji_team_id?: string; + for_assignment?: boolean; + format?: string; + linked_to?: string[]; + mark_as_done_when_checked?: boolean; + max?: number; + notify_users?: boolean; + precision?: number; + rounding?: string; + show_member_name?: boolean; + time_format?: string; } export interface CanvasPlaceholderMapping { - column?: string; + column?: string; variable?: string; } @@ -294,161 +294,161 @@ export interface DefaultValueTyped { } export interface View { - columns?: Column[]; - created_by?: string; - date_created?: number; - id?: string; + columns?: Column[]; + created_by?: string; + date_created?: number; + id?: string; is_all_items_view?: boolean; - is_locked?: boolean; - name?: string; - position?: string; + is_locked?: boolean; + name?: string; + position?: string; stick_column_left?: boolean; - type?: string; + type?: string; } export interface Column { - id?: string; - key?: string; + id?: string; + key?: string; position?: string; - visible?: boolean; - width?: number; + visible?: boolean; + width?: number; } export interface MediaProgress { - duration_ms?: number; + duration_ms?: number; max_offset_ms?: number; - offset_ms?: number; + offset_ms?: number; } export interface Reaction { count?: number; - name?: string; - url?: string; + name?: string; + url?: string; users?: string[]; } export interface Saved { date_completed?: number; - date_due?: number; - is_archived?: boolean; - state?: string; + date_due?: number; + is_archived?: boolean; + state?: string; } export interface Shares { private?: { [key: string]: Private[] }; - public?: { [key: string]: Private[] }; + public?: { [key: string]: Private[] }; } export interface Private { - access?: string; - channel_name?: string; - date_last_shared?: number; - latest_reply?: string; - reply_count?: number; - reply_users?: string[]; + access?: string; + channel_name?: string; + date_last_shared?: number; + latest_reply?: string; + reply_count?: number; + reply_users?: string[]; reply_users_count?: number; - share_user_id?: string; - source?: string; - team_id?: string; - thread_ts?: string; - ts?: string; + share_user_id?: string; + source?: string; + team_id?: string; + thread_ts?: string; + ts?: string; } export interface TitleBlock { - accessory?: Accessory; - alt_text?: string; - app_collaborators?: string[]; - app_id?: string; - author_name?: string; - block_id?: string; - bot_user_id?: string; - button_label?: string; - description?: Text | string; - developer_trace_id?: string; - elements?: Accessory[]; - fallback?: string; - fields?: Text[]; - function_trigger_id?: string; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - is_animated?: boolean; - is_workflow_app?: boolean; - owning_team_id?: string; - provider_icon_url?: string; - provider_name?: string; + accessory?: Accessory; + alt_text?: string; + app_collaborators?: string[]; + app_id?: string; + author_name?: string; + block_id?: string; + bot_user_id?: string; + button_label?: string; + description?: Text | string; + developer_trace_id?: string; + elements?: Accessory[]; + fallback?: string; + fields?: Text[]; + function_trigger_id?: string; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + is_animated?: boolean; + is_workflow_app?: boolean; + owning_team_id?: string; + provider_icon_url?: string; + provider_name?: string; sales_home_workflow_app_type?: number; - share_url?: string; - slack_file?: SlackFile; - text?: Text; - thumbnail_url?: string; - title?: Text | string; - title_url?: string; - trigger_subtype?: string; - trigger_type?: string; - type?: string; - url?: string; - video_url?: string; - workflow_id?: string; + share_url?: string; + slack_file?: SlackFile; + text?: Text; + thumbnail_url?: string; + title?: Text | string; + title_url?: string; + trigger_subtype?: string; + trigger_type?: string; + type?: string; + url?: string; + video_url?: string; + workflow_id?: string; } export interface Accessory { - accessibility_label?: string; - action_id?: string; - alt_text?: string; - border?: number; - confirm?: Confirm; + accessibility_label?: string; + action_id?: string; + alt_text?: string; + border?: number; + confirm?: Confirm; default_to_current_conversation?: boolean; - elements?: AccessoryElement[]; - fallback?: string; - filter?: Filter; - focus_on_load?: boolean; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - indent?: number; - initial_channel?: string; - initial_channels?: string[]; - initial_conversation?: string; - initial_conversations?: string[]; - initial_date?: string; - initial_date_time?: number; - initial_option?: Option; - initial_options?: Option[]; - initial_time?: string; - initial_user?: string; - initial_users?: string[]; - max_selected_items?: number; - min_query_length?: number; - offset?: number; - option_groups?: OptionGroup[]; - options?: Option[]; - placeholder?: Text; - response_url_enabled?: boolean; - slack_file?: SlackFile; - style?: string; - text?: Text; - timezone?: string; - type?: string; - url?: string; - value?: string; - workflow?: Workflow; + elements?: AccessoryElement[]; + fallback?: string; + filter?: Filter; + focus_on_load?: boolean; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + indent?: number; + initial_channel?: string; + initial_channels?: string[]; + initial_conversation?: string; + initial_conversations?: string[]; + initial_date?: string; + initial_date_time?: number; + initial_option?: Option; + initial_options?: Option[]; + initial_time?: string; + initial_user?: string; + initial_users?: string[]; + max_selected_items?: number; + min_query_length?: number; + offset?: number; + option_groups?: OptionGroup[]; + options?: Option[]; + placeholder?: Text; + response_url_enabled?: boolean; + slack_file?: SlackFile; + style?: string; + text?: Text; + timezone?: string; + type?: string; + url?: string; + value?: string; + workflow?: Workflow; } export interface Confirm { confirm?: Text; - deny?: Text; - style?: string; - text?: Text; - title?: Text; + deny?: Text; + style?: string; + text?: Text; + title?: Text; } export interface Text { - emoji?: boolean; - text?: string; - type?: TextType; + emoji?: boolean; + text?: string; + type?: TextType; verbatim?: boolean; } @@ -458,42 +458,42 @@ export enum TextType { } export interface AccessoryElement { - border?: number; + border?: number; elements?: PurpleElement[]; - indent?: number; - offset?: number; - style?: string; - type?: string; + indent?: number; + offset?: number; + style?: string; + type?: string; } export interface PurpleElement { - channel_id?: string; - fallback?: string; - format?: string; - name?: string; - range?: string; - skin_tone?: number; - style?: Style; - team_id?: string; - text?: string; - timestamp?: string; - type?: ElementType; - unicode?: string; - unsafe?: boolean; - url?: string; - user_id?: string; + channel_id?: string; + fallback?: string; + format?: string; + name?: string; + range?: string; + skin_tone?: number; + style?: Style; + team_id?: string; + text?: string; + timestamp?: string; + type?: ElementType; + unicode?: string; + unsafe?: boolean; + url?: string; + user_id?: string; usergroup_id?: string; - value?: string; + value?: string; } export interface Style { - bold?: boolean; + bold?: boolean; client_highlight?: boolean; - code?: boolean; - highlight?: boolean; - italic?: boolean; - strike?: boolean; - unlink?: boolean; + code?: boolean; + highlight?: boolean; + italic?: boolean; + strike?: boolean; + unlink?: boolean; } export enum ElementType { @@ -510,25 +510,25 @@ export enum ElementType { } export interface Filter { - exclude_bot_users?: boolean; + exclude_bot_users?: boolean; exclude_external_shared_channels?: boolean; - include?: any[]; + include?: any[]; } export interface Option { description?: Text; - text?: Text; - url?: string; - value?: string; + text?: Text; + url?: string; + value?: string; } export interface OptionGroup { - label?: Text; + label?: Text; options?: Option[]; } export interface SlackFile { - id?: string; + id?: string; url?: string; } @@ -538,11 +538,11 @@ export interface Workflow { export interface Trigger { customizable_input_parameters?: CustomizableInputParameter[]; - url?: string; + url?: string; } export interface CustomizableInputParameter { - name?: string; + name?: string; value?: string; } @@ -553,7 +553,7 @@ export interface Transcription { export interface Paging { count?: number; - page?: number; + page?: number; pages?: number; total?: number; } diff --git a/packages/web-api/src/types/response/FilesListResponse.ts b/packages/web-api/src/types/response/FilesListResponse.ts index 8a600f811..286bbacf5 100644 --- a/packages/web-api/src/types/response/FilesListResponse.ts +++ b/packages/web-api/src/types/response/FilesListResponse.ts @@ -8,272 +8,272 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type FilesListResponse = WebAPICallResult & { - error?: string; - files?: File[]; - needed?: string; - ok?: boolean; - paging?: Paging; + error?: string; + files?: File[]; + needed?: string; + ok?: boolean; + paging?: Paging; provided?: string; }; export interface File { - access?: string; - alt_txt?: string; - app_id?: string; - app_name?: string; - bot_id?: string; - can_toggle_canvas_lock?: boolean; - canvas_template_mode?: string; - cc?: Cc[]; - channel_actions_count?: number; - channel_actions_ts?: string; - channels?: string[]; - comments_count?: number; - converted_pdf?: string; - created?: number; - deanimate?: string; - deanimate_gif?: string; - display_as_bot?: boolean; - dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; - duration_ms?: number; - edit_link?: string; - edit_timestamp?: number; - editable?: boolean; - editor?: string; - editors?: string[]; - external_id?: string; - external_type?: string; - external_url?: string; - favorites?: Favorite[]; - file_access?: string; - filetype?: string; - from?: Cc[]; - groups?: string[]; - has_more?: boolean; - has_more_shares?: boolean; - has_rich_preview?: boolean; - headers?: Headers; - hls?: string; - hls_embed?: string; - id?: string; - image_exif_rotation?: number; - ims?: string[]; - initial_comment?: InitialComment; - is_channel_space?: boolean; - is_external?: boolean; - is_public?: boolean; - is_starred?: boolean; - last_editor?: string; - last_read?: number; - lines?: number; - lines_more?: number; - linked_channel_id?: string; - list_limits?: ListLimits; - list_metadata?: ListMetadata; - media_display_type?: string; - media_progress?: MediaProgress; - mimetype?: string; - mode?: string; - mp4?: string; - mp4_low?: string; - name?: string; - non_owner_editable?: boolean; - num_stars?: number; - org_or_workspace_access?: string; - original_attachment_count?: number; - original_h?: string; - original_w?: string; - permalink?: string; - permalink_public?: string; - pinned_to?: string[]; - pjpeg?: string; - plain_text?: string; - pretty_type?: string; - preview?: string; - preview_highlight?: string; - preview_is_truncated?: boolean; - preview_plain_text?: string; + access?: string; + alt_txt?: string; + app_id?: string; + app_name?: string; + bot_id?: string; + can_toggle_canvas_lock?: boolean; + canvas_template_mode?: string; + cc?: Cc[]; + channel_actions_count?: number; + channel_actions_ts?: string; + channels?: string[]; + comments_count?: number; + converted_pdf?: string; + created?: number; + deanimate?: string; + deanimate_gif?: string; + display_as_bot?: boolean; + dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; + duration_ms?: number; + edit_link?: string; + edit_timestamp?: number; + editable?: boolean; + editor?: string; + editors?: string[]; + external_id?: string; + external_type?: string; + external_url?: string; + favorites?: Favorite[]; + file_access?: string; + filetype?: string; + from?: Cc[]; + groups?: string[]; + has_more?: boolean; + has_more_shares?: boolean; + has_rich_preview?: boolean; + headers?: Headers; + hls?: string; + hls_embed?: string; + id?: string; + image_exif_rotation?: number; + ims?: string[]; + initial_comment?: InitialComment; + is_channel_space?: boolean; + is_external?: boolean; + is_public?: boolean; + is_starred?: boolean; + last_editor?: string; + last_read?: number; + lines?: number; + lines_more?: number; + linked_channel_id?: string; + list_limits?: ListLimits; + list_metadata?: ListMetadata; + media_display_type?: string; + media_progress?: MediaProgress; + mimetype?: string; + mode?: string; + mp4?: string; + mp4_low?: string; + name?: string; + non_owner_editable?: boolean; + num_stars?: number; + org_or_workspace_access?: string; + original_attachment_count?: number; + original_h?: string; + original_w?: string; + permalink?: string; + permalink_public?: string; + pinned_to?: string[]; + pjpeg?: string; + plain_text?: string; + pretty_type?: string; + preview?: string; + preview_highlight?: string; + preview_is_truncated?: boolean; + preview_plain_text?: string; private_channels_with_file_access_count?: number; - private_file_with_access_count?: number; - public_url_shared?: boolean; - quip_thread_id?: string; - reactions?: Reaction[]; - saved?: Saved; - sent_to_self?: boolean; - shares?: Shares; - show_badge?: boolean; - simplified_html?: string; - size?: number; - source_team?: string; - subject?: string; - subtype?: string; - team_pref_version_history_enabled?: boolean; - teams_shared_with?: any[]; - template_conversion_ts?: number; - template_description?: string; - template_icon?: string; - template_name?: string; - template_title?: string; - thumb_1024?: string; - thumb_1024_gif?: string; - thumb_1024_h?: string; - thumb_1024_w?: string; - thumb_160?: string; - thumb_160_gif?: string; - thumb_160_h?: string; - thumb_160_w?: string; - thumb_360?: string; - thumb_360_gif?: string; - thumb_360_h?: string; - thumb_360_w?: string; - thumb_480?: string; - thumb_480_gif?: string; - thumb_480_h?: string; - thumb_480_w?: string; - thumb_64?: string; - thumb_64_gif?: string; - thumb_64_h?: string; - thumb_64_w?: string; - thumb_720?: string; - thumb_720_gif?: string; - thumb_720_h?: string; - thumb_720_w?: string; - thumb_80?: string; - thumb_800?: string; - thumb_800_gif?: string; - thumb_800_h?: string; - thumb_800_w?: string; - thumb_80_gif?: string; - thumb_80_h?: string; - thumb_80_w?: string; - thumb_960?: string; - thumb_960_gif?: string; - thumb_960_h?: string; - thumb_960_w?: string; - thumb_gif?: string; - thumb_pdf?: string; - thumb_pdf_h?: string; - thumb_pdf_w?: string; - thumb_tiny?: string; - thumb_video?: string; - thumb_video_h?: number; - thumb_video_w?: number; - timestamp?: number; - title?: string; - title_blocks?: TitleBlock[]; - to?: Cc[]; - transcription?: Transcription; - update_notification?: number; - updated?: number; - url_private?: string; - url_private_download?: string; - url_static_preview?: string; - user?: string; - user_team?: string; - username?: string; - vtt?: string; + private_file_with_access_count?: number; + public_url_shared?: boolean; + quip_thread_id?: string; + reactions?: Reaction[]; + saved?: Saved; + sent_to_self?: boolean; + shares?: Shares; + show_badge?: boolean; + simplified_html?: string; + size?: number; + source_team?: string; + subject?: string; + subtype?: string; + team_pref_version_history_enabled?: boolean; + teams_shared_with?: any[]; + template_conversion_ts?: number; + template_description?: string; + template_icon?: string; + template_name?: string; + template_title?: string; + thumb_1024?: string; + thumb_1024_gif?: string; + thumb_1024_h?: string; + thumb_1024_w?: string; + thumb_160?: string; + thumb_160_gif?: string; + thumb_160_h?: string; + thumb_160_w?: string; + thumb_360?: string; + thumb_360_gif?: string; + thumb_360_h?: string; + thumb_360_w?: string; + thumb_480?: string; + thumb_480_gif?: string; + thumb_480_h?: string; + thumb_480_w?: string; + thumb_64?: string; + thumb_64_gif?: string; + thumb_64_h?: string; + thumb_64_w?: string; + thumb_720?: string; + thumb_720_gif?: string; + thumb_720_h?: string; + thumb_720_w?: string; + thumb_80?: string; + thumb_800?: string; + thumb_800_gif?: string; + thumb_800_h?: string; + thumb_800_w?: string; + thumb_80_gif?: string; + thumb_80_h?: string; + thumb_80_w?: string; + thumb_960?: string; + thumb_960_gif?: string; + thumb_960_h?: string; + thumb_960_w?: string; + thumb_gif?: string; + thumb_pdf?: string; + thumb_pdf_h?: string; + thumb_pdf_w?: string; + thumb_tiny?: string; + thumb_video?: string; + thumb_video_h?: number; + thumb_video_w?: number; + timestamp?: number; + title?: string; + title_blocks?: TitleBlock[]; + to?: Cc[]; + transcription?: Transcription; + update_notification?: number; + updated?: number; + url_private?: string; + url_private_download?: string; + url_static_preview?: string; + user?: string; + user_team?: string; + username?: string; + vtt?: string; } export interface Cc { - address?: string; - name?: string; + address?: string; + name?: string; original?: string; } export interface DmMpdmUsersWithFileAccess { - access?: string; + access?: string; user_id?: string; } export interface Favorite { - collection_id?: string; + collection_id?: string; collection_name?: string; - position?: string; + position?: string; } export interface Headers { - date?: string; + date?: string; in_reply_to?: string; - message_id?: string; - reply_to?: string; + message_id?: string; + reply_to?: string; } export interface InitialComment { - channel?: string; - comment?: string; - created?: number; - id?: string; - is_intro?: boolean; + channel?: string; + comment?: string; + created?: number; + id?: string; + is_intro?: boolean; timestamp?: number; - user?: string; + user?: string; } export interface ListLimits { - column_count?: number; - column_count_limit?: number; + column_count?: number; + column_count_limit?: number; over_column_maximum?: boolean; - over_row_maximum?: boolean; - over_view_maximum?: boolean; - row_count?: number; - row_count_limit?: number; - view_count?: number; - view_count_limit?: number; + over_row_maximum?: boolean; + over_view_maximum?: boolean; + row_count?: number; + row_count_limit?: number; + view_count?: number; + view_count_limit?: number; } export interface ListMetadata { creation_source?: CreationSource; - description?: string; - icon?: string; - icon_team_id?: string; - icon_url?: string; - integrations?: string[]; - is_trial?: boolean; - schema?: Schema[]; - views?: View[]; + description?: string; + icon?: string; + icon_team_id?: string; + icon_url?: string; + integrations?: string[]; + is_trial?: boolean; + schema?: Schema[]; + views?: View[]; } export interface CreationSource { - reference_id?: string; - type?: string; + reference_id?: string; + type?: string; workflow_function_id?: string; } export interface Schema { - id?: string; + id?: string; is_primary_column?: boolean; - key?: string; - name?: string; - options?: Options; - type?: string; + key?: string; + name?: string; + options?: Options; + type?: string; } export interface Options { - canvas_id?: string; + canvas_id?: string; canvas_placeholder_mapping?: CanvasPlaceholderMapping[]; - choices?: Choice[]; - currency?: string; - currency_format?: string; - date_format?: string; - default_value?: string; - default_value_typed?: DefaultValueTyped; - emoji?: string; - emoji_team_id?: string; - for_assignment?: boolean; - format?: string; - linked_to?: string[]; - mark_as_done_when_checked?: boolean; - max?: number; - notify_users?: boolean; - precision?: number; - rounding?: string; - show_member_name?: boolean; - time_format?: string; + choices?: Choice[]; + currency?: string; + currency_format?: string; + date_format?: string; + default_value?: string; + default_value_typed?: DefaultValueTyped; + emoji?: string; + emoji_team_id?: string; + for_assignment?: boolean; + format?: string; + linked_to?: string[]; + mark_as_done_when_checked?: boolean; + max?: number; + notify_users?: boolean; + precision?: number; + rounding?: string; + show_member_name?: boolean; + time_format?: string; } export interface CanvasPlaceholderMapping { - column?: string; + column?: string; variable?: string; } @@ -288,161 +288,161 @@ export interface DefaultValueTyped { } export interface View { - columns?: Column[]; - created_by?: string; - date_created?: number; - id?: string; + columns?: Column[]; + created_by?: string; + date_created?: number; + id?: string; is_all_items_view?: boolean; - is_locked?: boolean; - name?: string; - position?: string; + is_locked?: boolean; + name?: string; + position?: string; stick_column_left?: boolean; - type?: string; + type?: string; } export interface Column { - id?: string; - key?: string; + id?: string; + key?: string; position?: string; - visible?: boolean; - width?: number; + visible?: boolean; + width?: number; } export interface MediaProgress { - duration_ms?: number; + duration_ms?: number; max_offset_ms?: number; - offset_ms?: number; + offset_ms?: number; } export interface Reaction { count?: number; - name?: string; - url?: string; + name?: string; + url?: string; users?: string[]; } export interface Saved { date_completed?: number; - date_due?: number; - is_archived?: boolean; - state?: string; + date_due?: number; + is_archived?: boolean; + state?: string; } export interface Shares { private?: { [key: string]: Private[] }; - public?: { [key: string]: Private[] }; + public?: { [key: string]: Private[] }; } export interface Private { - access?: string; - channel_name?: string; - date_last_shared?: number; - latest_reply?: string; - reply_count?: number; - reply_users?: string[]; + access?: string; + channel_name?: string; + date_last_shared?: number; + latest_reply?: string; + reply_count?: number; + reply_users?: string[]; reply_users_count?: number; - share_user_id?: string; - source?: string; - team_id?: string; - thread_ts?: string; - ts?: string; + share_user_id?: string; + source?: string; + team_id?: string; + thread_ts?: string; + ts?: string; } export interface TitleBlock { - accessory?: Accessory; - alt_text?: string; - app_collaborators?: string[]; - app_id?: string; - author_name?: string; - block_id?: string; - bot_user_id?: string; - button_label?: string; - description?: Text | string; - developer_trace_id?: string; - elements?: Accessory[]; - fallback?: string; - fields?: Text[]; - function_trigger_id?: string; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - is_animated?: boolean; - is_workflow_app?: boolean; - owning_team_id?: string; - provider_icon_url?: string; - provider_name?: string; + accessory?: Accessory; + alt_text?: string; + app_collaborators?: string[]; + app_id?: string; + author_name?: string; + block_id?: string; + bot_user_id?: string; + button_label?: string; + description?: Text | string; + developer_trace_id?: string; + elements?: Accessory[]; + fallback?: string; + fields?: Text[]; + function_trigger_id?: string; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + is_animated?: boolean; + is_workflow_app?: boolean; + owning_team_id?: string; + provider_icon_url?: string; + provider_name?: string; sales_home_workflow_app_type?: number; - share_url?: string; - slack_file?: SlackFile; - text?: Text; - thumbnail_url?: string; - title?: Text | string; - title_url?: string; - trigger_subtype?: string; - trigger_type?: string; - type?: string; - url?: string; - video_url?: string; - workflow_id?: string; + share_url?: string; + slack_file?: SlackFile; + text?: Text; + thumbnail_url?: string; + title?: Text | string; + title_url?: string; + trigger_subtype?: string; + trigger_type?: string; + type?: string; + url?: string; + video_url?: string; + workflow_id?: string; } export interface Accessory { - accessibility_label?: string; - action_id?: string; - alt_text?: string; - border?: number; - confirm?: Confirm; + accessibility_label?: string; + action_id?: string; + alt_text?: string; + border?: number; + confirm?: Confirm; default_to_current_conversation?: boolean; - elements?: AccessoryElement[]; - fallback?: string; - filter?: Filter; - focus_on_load?: boolean; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - indent?: number; - initial_channel?: string; - initial_channels?: string[]; - initial_conversation?: string; - initial_conversations?: string[]; - initial_date?: string; - initial_date_time?: number; - initial_option?: Option; - initial_options?: Option[]; - initial_time?: string; - initial_user?: string; - initial_users?: string[]; - max_selected_items?: number; - min_query_length?: number; - offset?: number; - option_groups?: OptionGroup[]; - options?: Option[]; - placeholder?: Text; - response_url_enabled?: boolean; - slack_file?: SlackFile; - style?: string; - text?: Text; - timezone?: string; - type?: string; - url?: string; - value?: string; - workflow?: Workflow; + elements?: AccessoryElement[]; + fallback?: string; + filter?: Filter; + focus_on_load?: boolean; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + indent?: number; + initial_channel?: string; + initial_channels?: string[]; + initial_conversation?: string; + initial_conversations?: string[]; + initial_date?: string; + initial_date_time?: number; + initial_option?: Option; + initial_options?: Option[]; + initial_time?: string; + initial_user?: string; + initial_users?: string[]; + max_selected_items?: number; + min_query_length?: number; + offset?: number; + option_groups?: OptionGroup[]; + options?: Option[]; + placeholder?: Text; + response_url_enabled?: boolean; + slack_file?: SlackFile; + style?: string; + text?: Text; + timezone?: string; + type?: string; + url?: string; + value?: string; + workflow?: Workflow; } export interface Confirm { confirm?: Text; - deny?: Text; - style?: string; - text?: Text; - title?: Text; + deny?: Text; + style?: string; + text?: Text; + title?: Text; } export interface Text { - emoji?: boolean; - text?: string; - type?: TextType; + emoji?: boolean; + text?: string; + type?: TextType; verbatim?: boolean; } @@ -452,42 +452,42 @@ export enum TextType { } export interface AccessoryElement { - border?: number; + border?: number; elements?: PurpleElement[]; - indent?: number; - offset?: number; - style?: string; - type?: string; + indent?: number; + offset?: number; + style?: string; + type?: string; } export interface PurpleElement { - channel_id?: string; - fallback?: string; - format?: string; - name?: string; - range?: string; - skin_tone?: number; - style?: Style; - team_id?: string; - text?: string; - timestamp?: string; - type?: ElementType; - unicode?: string; - unsafe?: boolean; - url?: string; - user_id?: string; + channel_id?: string; + fallback?: string; + format?: string; + name?: string; + range?: string; + skin_tone?: number; + style?: Style; + team_id?: string; + text?: string; + timestamp?: string; + type?: ElementType; + unicode?: string; + unsafe?: boolean; + url?: string; + user_id?: string; usergroup_id?: string; - value?: string; + value?: string; } export interface Style { - bold?: boolean; + bold?: boolean; client_highlight?: boolean; - code?: boolean; - highlight?: boolean; - italic?: boolean; - strike?: boolean; - unlink?: boolean; + code?: boolean; + highlight?: boolean; + italic?: boolean; + strike?: boolean; + unlink?: boolean; } export enum ElementType { @@ -504,25 +504,25 @@ export enum ElementType { } export interface Filter { - exclude_bot_users?: boolean; + exclude_bot_users?: boolean; exclude_external_shared_channels?: boolean; - include?: any[]; + include?: any[]; } export interface Option { description?: Text; - text?: Text; - url?: string; - value?: string; + text?: Text; + url?: string; + value?: string; } export interface OptionGroup { - label?: Text; + label?: Text; options?: Option[]; } export interface SlackFile { - id?: string; + id?: string; url?: string; } @@ -532,11 +532,11 @@ export interface Workflow { export interface Trigger { customizable_input_parameters?: CustomizableInputParameter[]; - url?: string; + url?: string; } export interface CustomizableInputParameter { - name?: string; + name?: string; value?: string; } @@ -547,7 +547,7 @@ export interface Transcription { export interface Paging { count?: number; - page?: number; + page?: number; pages?: number; total?: number; } diff --git a/packages/web-api/src/types/response/FilesRemoteAddResponse.ts b/packages/web-api/src/types/response/FilesRemoteAddResponse.ts index 71f466a18..a277c165f 100644 --- a/packages/web-api/src/types/response/FilesRemoteAddResponse.ts +++ b/packages/web-api/src/types/response/FilesRemoteAddResponse.ts @@ -8,271 +8,271 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type FilesRemoteAddResponse = WebAPICallResult & { - error?: string; - file?: File; - needed?: string; - ok?: boolean; + error?: string; + file?: File; + needed?: string; + ok?: boolean; provided?: string; }; export interface File { - access?: string; - alt_txt?: string; - app_id?: string; - app_name?: string; - bot_id?: string; - can_toggle_canvas_lock?: boolean; - canvas_template_mode?: string; - cc?: Cc[]; - channel_actions_count?: number; - channel_actions_ts?: string; - channels?: string[]; - comments_count?: number; - converted_pdf?: string; - created?: number; - deanimate?: string; - deanimate_gif?: string; - display_as_bot?: boolean; - dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; - duration_ms?: number; - edit_link?: string; - edit_timestamp?: number; - editable?: boolean; - editor?: string; - editors?: string[]; - external_id?: string; - external_type?: string; - external_url?: string; - favorites?: Favorite[]; - file_access?: string; - filetype?: string; - from?: Cc[]; - groups?: string[]; - has_more?: boolean; - has_more_shares?: boolean; - has_rich_preview?: boolean; - headers?: Headers; - hls?: string; - hls_embed?: string; - id?: string; - image_exif_rotation?: number; - ims?: string[]; - initial_comment?: InitialComment; - is_channel_space?: boolean; - is_external?: boolean; - is_public?: boolean; - is_starred?: boolean; - last_editor?: string; - last_read?: number; - lines?: number; - lines_more?: number; - linked_channel_id?: string; - list_limits?: ListLimits; - list_metadata?: ListMetadata; - media_display_type?: string; - media_progress?: MediaProgress; - mimetype?: string; - mode?: string; - mp4?: string; - mp4_low?: string; - name?: string; - non_owner_editable?: boolean; - num_stars?: number; - org_or_workspace_access?: string; - original_attachment_count?: number; - original_h?: string; - original_w?: string; - permalink?: string; - permalink_public?: string; - pinned_to?: string[]; - pjpeg?: string; - plain_text?: string; - pretty_type?: string; - preview?: string; - preview_highlight?: string; - preview_is_truncated?: boolean; - preview_plain_text?: string; + access?: string; + alt_txt?: string; + app_id?: string; + app_name?: string; + bot_id?: string; + can_toggle_canvas_lock?: boolean; + canvas_template_mode?: string; + cc?: Cc[]; + channel_actions_count?: number; + channel_actions_ts?: string; + channels?: string[]; + comments_count?: number; + converted_pdf?: string; + created?: number; + deanimate?: string; + deanimate_gif?: string; + display_as_bot?: boolean; + dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; + duration_ms?: number; + edit_link?: string; + edit_timestamp?: number; + editable?: boolean; + editor?: string; + editors?: string[]; + external_id?: string; + external_type?: string; + external_url?: string; + favorites?: Favorite[]; + file_access?: string; + filetype?: string; + from?: Cc[]; + groups?: string[]; + has_more?: boolean; + has_more_shares?: boolean; + has_rich_preview?: boolean; + headers?: Headers; + hls?: string; + hls_embed?: string; + id?: string; + image_exif_rotation?: number; + ims?: string[]; + initial_comment?: InitialComment; + is_channel_space?: boolean; + is_external?: boolean; + is_public?: boolean; + is_starred?: boolean; + last_editor?: string; + last_read?: number; + lines?: number; + lines_more?: number; + linked_channel_id?: string; + list_limits?: ListLimits; + list_metadata?: ListMetadata; + media_display_type?: string; + media_progress?: MediaProgress; + mimetype?: string; + mode?: string; + mp4?: string; + mp4_low?: string; + name?: string; + non_owner_editable?: boolean; + num_stars?: number; + org_or_workspace_access?: string; + original_attachment_count?: number; + original_h?: string; + original_w?: string; + permalink?: string; + permalink_public?: string; + pinned_to?: string[]; + pjpeg?: string; + plain_text?: string; + pretty_type?: string; + preview?: string; + preview_highlight?: string; + preview_is_truncated?: boolean; + preview_plain_text?: string; private_channels_with_file_access_count?: number; - private_file_with_access_count?: number; - public_url_shared?: boolean; - quip_thread_id?: string; - reactions?: Reaction[]; - saved?: Saved; - sent_to_self?: boolean; - shares?: Shares; - show_badge?: boolean; - simplified_html?: string; - size?: number; - source_team?: string; - subject?: string; - subtype?: string; - team_pref_version_history_enabled?: boolean; - teams_shared_with?: any[]; - template_conversion_ts?: number; - template_description?: string; - template_icon?: string; - template_name?: string; - template_title?: string; - thumb_1024?: string; - thumb_1024_gif?: string; - thumb_1024_h?: string; - thumb_1024_w?: string; - thumb_160?: string; - thumb_160_gif?: string; - thumb_160_h?: string; - thumb_160_w?: string; - thumb_360?: string; - thumb_360_gif?: string; - thumb_360_h?: string; - thumb_360_w?: string; - thumb_480?: string; - thumb_480_gif?: string; - thumb_480_h?: string; - thumb_480_w?: string; - thumb_64?: string; - thumb_64_gif?: string; - thumb_64_h?: string; - thumb_64_w?: string; - thumb_720?: string; - thumb_720_gif?: string; - thumb_720_h?: string; - thumb_720_w?: string; - thumb_80?: string; - thumb_800?: string; - thumb_800_gif?: string; - thumb_800_h?: string; - thumb_800_w?: string; - thumb_80_gif?: string; - thumb_80_h?: string; - thumb_80_w?: string; - thumb_960?: string; - thumb_960_gif?: string; - thumb_960_h?: string; - thumb_960_w?: string; - thumb_gif?: string; - thumb_pdf?: string; - thumb_pdf_h?: string; - thumb_pdf_w?: string; - thumb_tiny?: string; - thumb_video?: string; - thumb_video_h?: number; - thumb_video_w?: number; - timestamp?: number; - title?: string; - title_blocks?: TitleBlock[]; - to?: Cc[]; - transcription?: Transcription; - update_notification?: number; - updated?: number; - url_private?: string; - url_private_download?: string; - url_static_preview?: string; - user?: string; - user_team?: string; - username?: string; - vtt?: string; + private_file_with_access_count?: number; + public_url_shared?: boolean; + quip_thread_id?: string; + reactions?: Reaction[]; + saved?: Saved; + sent_to_self?: boolean; + shares?: Shares; + show_badge?: boolean; + simplified_html?: string; + size?: number; + source_team?: string; + subject?: string; + subtype?: string; + team_pref_version_history_enabled?: boolean; + teams_shared_with?: any[]; + template_conversion_ts?: number; + template_description?: string; + template_icon?: string; + template_name?: string; + template_title?: string; + thumb_1024?: string; + thumb_1024_gif?: string; + thumb_1024_h?: string; + thumb_1024_w?: string; + thumb_160?: string; + thumb_160_gif?: string; + thumb_160_h?: string; + thumb_160_w?: string; + thumb_360?: string; + thumb_360_gif?: string; + thumb_360_h?: string; + thumb_360_w?: string; + thumb_480?: string; + thumb_480_gif?: string; + thumb_480_h?: string; + thumb_480_w?: string; + thumb_64?: string; + thumb_64_gif?: string; + thumb_64_h?: string; + thumb_64_w?: string; + thumb_720?: string; + thumb_720_gif?: string; + thumb_720_h?: string; + thumb_720_w?: string; + thumb_80?: string; + thumb_800?: string; + thumb_800_gif?: string; + thumb_800_h?: string; + thumb_800_w?: string; + thumb_80_gif?: string; + thumb_80_h?: string; + thumb_80_w?: string; + thumb_960?: string; + thumb_960_gif?: string; + thumb_960_h?: string; + thumb_960_w?: string; + thumb_gif?: string; + thumb_pdf?: string; + thumb_pdf_h?: string; + thumb_pdf_w?: string; + thumb_tiny?: string; + thumb_video?: string; + thumb_video_h?: number; + thumb_video_w?: number; + timestamp?: number; + title?: string; + title_blocks?: TitleBlock[]; + to?: Cc[]; + transcription?: Transcription; + update_notification?: number; + updated?: number; + url_private?: string; + url_private_download?: string; + url_static_preview?: string; + user?: string; + user_team?: string; + username?: string; + vtt?: string; } export interface Cc { - address?: string; - name?: string; + address?: string; + name?: string; original?: string; } export interface DmMpdmUsersWithFileAccess { - access?: string; + access?: string; user_id?: string; } export interface Favorite { - collection_id?: string; + collection_id?: string; collection_name?: string; - position?: string; + position?: string; } export interface Headers { - date?: string; + date?: string; in_reply_to?: string; - message_id?: string; - reply_to?: string; + message_id?: string; + reply_to?: string; } export interface InitialComment { - channel?: string; - comment?: string; - created?: number; - id?: string; - is_intro?: boolean; + channel?: string; + comment?: string; + created?: number; + id?: string; + is_intro?: boolean; timestamp?: number; - user?: string; + user?: string; } export interface ListLimits { - column_count?: number; - column_count_limit?: number; + column_count?: number; + column_count_limit?: number; over_column_maximum?: boolean; - over_row_maximum?: boolean; - over_view_maximum?: boolean; - row_count?: number; - row_count_limit?: number; - view_count?: number; - view_count_limit?: number; + over_row_maximum?: boolean; + over_view_maximum?: boolean; + row_count?: number; + row_count_limit?: number; + view_count?: number; + view_count_limit?: number; } export interface ListMetadata { creation_source?: CreationSource; - description?: string; - icon?: string; - icon_team_id?: string; - icon_url?: string; - integrations?: string[]; - is_trial?: boolean; - schema?: Schema[]; - views?: View[]; + description?: string; + icon?: string; + icon_team_id?: string; + icon_url?: string; + integrations?: string[]; + is_trial?: boolean; + schema?: Schema[]; + views?: View[]; } export interface CreationSource { - reference_id?: string; - type?: string; + reference_id?: string; + type?: string; workflow_function_id?: string; } export interface Schema { - id?: string; + id?: string; is_primary_column?: boolean; - key?: string; - name?: string; - options?: Options; - type?: string; + key?: string; + name?: string; + options?: Options; + type?: string; } export interface Options { - canvas_id?: string; + canvas_id?: string; canvas_placeholder_mapping?: CanvasPlaceholderMapping[]; - choices?: Choice[]; - currency?: string; - currency_format?: string; - date_format?: string; - default_value?: string; - default_value_typed?: DefaultValueTyped; - emoji?: string; - emoji_team_id?: string; - for_assignment?: boolean; - format?: string; - linked_to?: string[]; - mark_as_done_when_checked?: boolean; - max?: number; - notify_users?: boolean; - precision?: number; - rounding?: string; - show_member_name?: boolean; - time_format?: string; + choices?: Choice[]; + currency?: string; + currency_format?: string; + date_format?: string; + default_value?: string; + default_value_typed?: DefaultValueTyped; + emoji?: string; + emoji_team_id?: string; + for_assignment?: boolean; + format?: string; + linked_to?: string[]; + mark_as_done_when_checked?: boolean; + max?: number; + notify_users?: boolean; + precision?: number; + rounding?: string; + show_member_name?: boolean; + time_format?: string; } export interface CanvasPlaceholderMapping { - column?: string; + column?: string; variable?: string; } @@ -287,161 +287,161 @@ export interface DefaultValueTyped { } export interface View { - columns?: Column[]; - created_by?: string; - date_created?: number; - id?: string; + columns?: Column[]; + created_by?: string; + date_created?: number; + id?: string; is_all_items_view?: boolean; - is_locked?: boolean; - name?: string; - position?: string; + is_locked?: boolean; + name?: string; + position?: string; stick_column_left?: boolean; - type?: string; + type?: string; } export interface Column { - id?: string; - key?: string; + id?: string; + key?: string; position?: string; - visible?: boolean; - width?: number; + visible?: boolean; + width?: number; } export interface MediaProgress { - duration_ms?: number; + duration_ms?: number; max_offset_ms?: number; - offset_ms?: number; + offset_ms?: number; } export interface Reaction { count?: number; - name?: string; - url?: string; + name?: string; + url?: string; users?: string[]; } export interface Saved { date_completed?: number; - date_due?: number; - is_archived?: boolean; - state?: string; + date_due?: number; + is_archived?: boolean; + state?: string; } export interface Shares { private?: { [key: string]: Private[] }; - public?: { [key: string]: Private[] }; + public?: { [key: string]: Private[] }; } export interface Private { - access?: string; - channel_name?: string; - date_last_shared?: number; - latest_reply?: string; - reply_count?: number; - reply_users?: string[]; + access?: string; + channel_name?: string; + date_last_shared?: number; + latest_reply?: string; + reply_count?: number; + reply_users?: string[]; reply_users_count?: number; - share_user_id?: string; - source?: string; - team_id?: string; - thread_ts?: string; - ts?: string; + share_user_id?: string; + source?: string; + team_id?: string; + thread_ts?: string; + ts?: string; } export interface TitleBlock { - accessory?: Accessory; - alt_text?: string; - app_collaborators?: string[]; - app_id?: string; - author_name?: string; - block_id?: string; - bot_user_id?: string; - button_label?: string; - description?: Text | string; - developer_trace_id?: string; - elements?: Accessory[]; - fallback?: string; - fields?: Text[]; - function_trigger_id?: string; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - is_animated?: boolean; - is_workflow_app?: boolean; - owning_team_id?: string; - provider_icon_url?: string; - provider_name?: string; + accessory?: Accessory; + alt_text?: string; + app_collaborators?: string[]; + app_id?: string; + author_name?: string; + block_id?: string; + bot_user_id?: string; + button_label?: string; + description?: Text | string; + developer_trace_id?: string; + elements?: Accessory[]; + fallback?: string; + fields?: Text[]; + function_trigger_id?: string; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + is_animated?: boolean; + is_workflow_app?: boolean; + owning_team_id?: string; + provider_icon_url?: string; + provider_name?: string; sales_home_workflow_app_type?: number; - share_url?: string; - slack_file?: SlackFile; - text?: Text; - thumbnail_url?: string; - title?: Text | string; - title_url?: string; - trigger_subtype?: string; - trigger_type?: string; - type?: string; - url?: string; - video_url?: string; - workflow_id?: string; + share_url?: string; + slack_file?: SlackFile; + text?: Text; + thumbnail_url?: string; + title?: Text | string; + title_url?: string; + trigger_subtype?: string; + trigger_type?: string; + type?: string; + url?: string; + video_url?: string; + workflow_id?: string; } export interface Accessory { - accessibility_label?: string; - action_id?: string; - alt_text?: string; - border?: number; - confirm?: Confirm; + accessibility_label?: string; + action_id?: string; + alt_text?: string; + border?: number; + confirm?: Confirm; default_to_current_conversation?: boolean; - elements?: AccessoryElement[]; - fallback?: string; - filter?: Filter; - focus_on_load?: boolean; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - indent?: number; - initial_channel?: string; - initial_channels?: string[]; - initial_conversation?: string; - initial_conversations?: string[]; - initial_date?: string; - initial_date_time?: number; - initial_option?: Option; - initial_options?: Option[]; - initial_time?: string; - initial_user?: string; - initial_users?: string[]; - max_selected_items?: number; - min_query_length?: number; - offset?: number; - option_groups?: OptionGroup[]; - options?: Option[]; - placeholder?: Text; - response_url_enabled?: boolean; - slack_file?: SlackFile; - style?: string; - text?: Text; - timezone?: string; - type?: string; - url?: string; - value?: string; - workflow?: Workflow; + elements?: AccessoryElement[]; + fallback?: string; + filter?: Filter; + focus_on_load?: boolean; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + indent?: number; + initial_channel?: string; + initial_channels?: string[]; + initial_conversation?: string; + initial_conversations?: string[]; + initial_date?: string; + initial_date_time?: number; + initial_option?: Option; + initial_options?: Option[]; + initial_time?: string; + initial_user?: string; + initial_users?: string[]; + max_selected_items?: number; + min_query_length?: number; + offset?: number; + option_groups?: OptionGroup[]; + options?: Option[]; + placeholder?: Text; + response_url_enabled?: boolean; + slack_file?: SlackFile; + style?: string; + text?: Text; + timezone?: string; + type?: string; + url?: string; + value?: string; + workflow?: Workflow; } export interface Confirm { confirm?: Text; - deny?: Text; - style?: string; - text?: Text; - title?: Text; + deny?: Text; + style?: string; + text?: Text; + title?: Text; } export interface Text { - emoji?: boolean; - text?: string; - type?: TextType; + emoji?: boolean; + text?: string; + type?: TextType; verbatim?: boolean; } @@ -451,42 +451,42 @@ export enum TextType { } export interface AccessoryElement { - border?: number; + border?: number; elements?: PurpleElement[]; - indent?: number; - offset?: number; - style?: string; - type?: string; + indent?: number; + offset?: number; + style?: string; + type?: string; } export interface PurpleElement { - channel_id?: string; - fallback?: string; - format?: string; - name?: string; - range?: string; - skin_tone?: number; - style?: Style; - team_id?: string; - text?: string; - timestamp?: string; - type?: ElementType; - unicode?: string; - unsafe?: boolean; - url?: string; - user_id?: string; + channel_id?: string; + fallback?: string; + format?: string; + name?: string; + range?: string; + skin_tone?: number; + style?: Style; + team_id?: string; + text?: string; + timestamp?: string; + type?: ElementType; + unicode?: string; + unsafe?: boolean; + url?: string; + user_id?: string; usergroup_id?: string; - value?: string; + value?: string; } export interface Style { - bold?: boolean; + bold?: boolean; client_highlight?: boolean; - code?: boolean; - highlight?: boolean; - italic?: boolean; - strike?: boolean; - unlink?: boolean; + code?: boolean; + highlight?: boolean; + italic?: boolean; + strike?: boolean; + unlink?: boolean; } export enum ElementType { @@ -503,25 +503,25 @@ export enum ElementType { } export interface Filter { - exclude_bot_users?: boolean; + exclude_bot_users?: boolean; exclude_external_shared_channels?: boolean; - include?: any[]; + include?: any[]; } export interface Option { description?: Text; - text?: Text; - url?: string; - value?: string; + text?: Text; + url?: string; + value?: string; } export interface OptionGroup { - label?: Text; + label?: Text; options?: Option[]; } export interface SlackFile { - id?: string; + id?: string; url?: string; } @@ -531,11 +531,11 @@ export interface Workflow { export interface Trigger { customizable_input_parameters?: CustomizableInputParameter[]; - url?: string; + url?: string; } export interface CustomizableInputParameter { - name?: string; + name?: string; value?: string; } diff --git a/packages/web-api/src/types/response/FilesRemoteInfoResponse.ts b/packages/web-api/src/types/response/FilesRemoteInfoResponse.ts index 495a33f4b..a2ec38c93 100644 --- a/packages/web-api/src/types/response/FilesRemoteInfoResponse.ts +++ b/packages/web-api/src/types/response/FilesRemoteInfoResponse.ts @@ -8,271 +8,271 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type FilesRemoteInfoResponse = WebAPICallResult & { - error?: string; - file?: File; - needed?: string; - ok?: boolean; + error?: string; + file?: File; + needed?: string; + ok?: boolean; provided?: string; }; export interface File { - access?: string; - alt_txt?: string; - app_id?: string; - app_name?: string; - bot_id?: string; - can_toggle_canvas_lock?: boolean; - canvas_template_mode?: string; - cc?: Cc[]; - channel_actions_count?: number; - channel_actions_ts?: string; - channels?: string[]; - comments_count?: number; - converted_pdf?: string; - created?: number; - deanimate?: string; - deanimate_gif?: string; - display_as_bot?: boolean; - dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; - duration_ms?: number; - edit_link?: string; - edit_timestamp?: number; - editable?: boolean; - editor?: string; - editors?: string[]; - external_id?: string; - external_type?: string; - external_url?: string; - favorites?: Favorite[]; - file_access?: string; - filetype?: string; - from?: Cc[]; - groups?: string[]; - has_more?: boolean; - has_more_shares?: boolean; - has_rich_preview?: boolean; - headers?: Headers; - hls?: string; - hls_embed?: string; - id?: string; - image_exif_rotation?: number; - ims?: string[]; - initial_comment?: InitialComment; - is_channel_space?: boolean; - is_external?: boolean; - is_public?: boolean; - is_starred?: boolean; - last_editor?: string; - last_read?: number; - lines?: number; - lines_more?: number; - linked_channel_id?: string; - list_limits?: ListLimits; - list_metadata?: ListMetadata; - media_display_type?: string; - media_progress?: MediaProgress; - mimetype?: string; - mode?: string; - mp4?: string; - mp4_low?: string; - name?: string; - non_owner_editable?: boolean; - num_stars?: number; - org_or_workspace_access?: string; - original_attachment_count?: number; - original_h?: string; - original_w?: string; - permalink?: string; - permalink_public?: string; - pinned_to?: string[]; - pjpeg?: string; - plain_text?: string; - pretty_type?: string; - preview?: string; - preview_highlight?: string; - preview_is_truncated?: boolean; - preview_plain_text?: string; + access?: string; + alt_txt?: string; + app_id?: string; + app_name?: string; + bot_id?: string; + can_toggle_canvas_lock?: boolean; + canvas_template_mode?: string; + cc?: Cc[]; + channel_actions_count?: number; + channel_actions_ts?: string; + channels?: string[]; + comments_count?: number; + converted_pdf?: string; + created?: number; + deanimate?: string; + deanimate_gif?: string; + display_as_bot?: boolean; + dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; + duration_ms?: number; + edit_link?: string; + edit_timestamp?: number; + editable?: boolean; + editor?: string; + editors?: string[]; + external_id?: string; + external_type?: string; + external_url?: string; + favorites?: Favorite[]; + file_access?: string; + filetype?: string; + from?: Cc[]; + groups?: string[]; + has_more?: boolean; + has_more_shares?: boolean; + has_rich_preview?: boolean; + headers?: Headers; + hls?: string; + hls_embed?: string; + id?: string; + image_exif_rotation?: number; + ims?: string[]; + initial_comment?: InitialComment; + is_channel_space?: boolean; + is_external?: boolean; + is_public?: boolean; + is_starred?: boolean; + last_editor?: string; + last_read?: number; + lines?: number; + lines_more?: number; + linked_channel_id?: string; + list_limits?: ListLimits; + list_metadata?: ListMetadata; + media_display_type?: string; + media_progress?: MediaProgress; + mimetype?: string; + mode?: string; + mp4?: string; + mp4_low?: string; + name?: string; + non_owner_editable?: boolean; + num_stars?: number; + org_or_workspace_access?: string; + original_attachment_count?: number; + original_h?: string; + original_w?: string; + permalink?: string; + permalink_public?: string; + pinned_to?: string[]; + pjpeg?: string; + plain_text?: string; + pretty_type?: string; + preview?: string; + preview_highlight?: string; + preview_is_truncated?: boolean; + preview_plain_text?: string; private_channels_with_file_access_count?: number; - private_file_with_access_count?: number; - public_url_shared?: boolean; - quip_thread_id?: string; - reactions?: Reaction[]; - saved?: Saved; - sent_to_self?: boolean; - shares?: Shares; - show_badge?: boolean; - simplified_html?: string; - size?: number; - source_team?: string; - subject?: string; - subtype?: string; - team_pref_version_history_enabled?: boolean; - teams_shared_with?: any[]; - template_conversion_ts?: number; - template_description?: string; - template_icon?: string; - template_name?: string; - template_title?: string; - thumb_1024?: string; - thumb_1024_gif?: string; - thumb_1024_h?: string; - thumb_1024_w?: string; - thumb_160?: string; - thumb_160_gif?: string; - thumb_160_h?: string; - thumb_160_w?: string; - thumb_360?: string; - thumb_360_gif?: string; - thumb_360_h?: string; - thumb_360_w?: string; - thumb_480?: string; - thumb_480_gif?: string; - thumb_480_h?: string; - thumb_480_w?: string; - thumb_64?: string; - thumb_64_gif?: string; - thumb_64_h?: string; - thumb_64_w?: string; - thumb_720?: string; - thumb_720_gif?: string; - thumb_720_h?: string; - thumb_720_w?: string; - thumb_80?: string; - thumb_800?: string; - thumb_800_gif?: string; - thumb_800_h?: string; - thumb_800_w?: string; - thumb_80_gif?: string; - thumb_80_h?: string; - thumb_80_w?: string; - thumb_960?: string; - thumb_960_gif?: string; - thumb_960_h?: string; - thumb_960_w?: string; - thumb_gif?: string; - thumb_pdf?: string; - thumb_pdf_h?: string; - thumb_pdf_w?: string; - thumb_tiny?: string; - thumb_video?: string; - thumb_video_h?: number; - thumb_video_w?: number; - timestamp?: number; - title?: string; - title_blocks?: TitleBlock[]; - to?: Cc[]; - transcription?: Transcription; - update_notification?: number; - updated?: number; - url_private?: string; - url_private_download?: string; - url_static_preview?: string; - user?: string; - user_team?: string; - username?: string; - vtt?: string; + private_file_with_access_count?: number; + public_url_shared?: boolean; + quip_thread_id?: string; + reactions?: Reaction[]; + saved?: Saved; + sent_to_self?: boolean; + shares?: Shares; + show_badge?: boolean; + simplified_html?: string; + size?: number; + source_team?: string; + subject?: string; + subtype?: string; + team_pref_version_history_enabled?: boolean; + teams_shared_with?: any[]; + template_conversion_ts?: number; + template_description?: string; + template_icon?: string; + template_name?: string; + template_title?: string; + thumb_1024?: string; + thumb_1024_gif?: string; + thumb_1024_h?: string; + thumb_1024_w?: string; + thumb_160?: string; + thumb_160_gif?: string; + thumb_160_h?: string; + thumb_160_w?: string; + thumb_360?: string; + thumb_360_gif?: string; + thumb_360_h?: string; + thumb_360_w?: string; + thumb_480?: string; + thumb_480_gif?: string; + thumb_480_h?: string; + thumb_480_w?: string; + thumb_64?: string; + thumb_64_gif?: string; + thumb_64_h?: string; + thumb_64_w?: string; + thumb_720?: string; + thumb_720_gif?: string; + thumb_720_h?: string; + thumb_720_w?: string; + thumb_80?: string; + thumb_800?: string; + thumb_800_gif?: string; + thumb_800_h?: string; + thumb_800_w?: string; + thumb_80_gif?: string; + thumb_80_h?: string; + thumb_80_w?: string; + thumb_960?: string; + thumb_960_gif?: string; + thumb_960_h?: string; + thumb_960_w?: string; + thumb_gif?: string; + thumb_pdf?: string; + thumb_pdf_h?: string; + thumb_pdf_w?: string; + thumb_tiny?: string; + thumb_video?: string; + thumb_video_h?: number; + thumb_video_w?: number; + timestamp?: number; + title?: string; + title_blocks?: TitleBlock[]; + to?: Cc[]; + transcription?: Transcription; + update_notification?: number; + updated?: number; + url_private?: string; + url_private_download?: string; + url_static_preview?: string; + user?: string; + user_team?: string; + username?: string; + vtt?: string; } export interface Cc { - address?: string; - name?: string; + address?: string; + name?: string; original?: string; } export interface DmMpdmUsersWithFileAccess { - access?: string; + access?: string; user_id?: string; } export interface Favorite { - collection_id?: string; + collection_id?: string; collection_name?: string; - position?: string; + position?: string; } export interface Headers { - date?: string; + date?: string; in_reply_to?: string; - message_id?: string; - reply_to?: string; + message_id?: string; + reply_to?: string; } export interface InitialComment { - channel?: string; - comment?: string; - created?: number; - id?: string; - is_intro?: boolean; + channel?: string; + comment?: string; + created?: number; + id?: string; + is_intro?: boolean; timestamp?: number; - user?: string; + user?: string; } export interface ListLimits { - column_count?: number; - column_count_limit?: number; + column_count?: number; + column_count_limit?: number; over_column_maximum?: boolean; - over_row_maximum?: boolean; - over_view_maximum?: boolean; - row_count?: number; - row_count_limit?: number; - view_count?: number; - view_count_limit?: number; + over_row_maximum?: boolean; + over_view_maximum?: boolean; + row_count?: number; + row_count_limit?: number; + view_count?: number; + view_count_limit?: number; } export interface ListMetadata { creation_source?: CreationSource; - description?: string; - icon?: string; - icon_team_id?: string; - icon_url?: string; - integrations?: string[]; - is_trial?: boolean; - schema?: Schema[]; - views?: View[]; + description?: string; + icon?: string; + icon_team_id?: string; + icon_url?: string; + integrations?: string[]; + is_trial?: boolean; + schema?: Schema[]; + views?: View[]; } export interface CreationSource { - reference_id?: string; - type?: string; + reference_id?: string; + type?: string; workflow_function_id?: string; } export interface Schema { - id?: string; + id?: string; is_primary_column?: boolean; - key?: string; - name?: string; - options?: Options; - type?: string; + key?: string; + name?: string; + options?: Options; + type?: string; } export interface Options { - canvas_id?: string; + canvas_id?: string; canvas_placeholder_mapping?: CanvasPlaceholderMapping[]; - choices?: Choice[]; - currency?: string; - currency_format?: string; - date_format?: string; - default_value?: string; - default_value_typed?: DefaultValueTyped; - emoji?: string; - emoji_team_id?: string; - for_assignment?: boolean; - format?: string; - linked_to?: string[]; - mark_as_done_when_checked?: boolean; - max?: number; - notify_users?: boolean; - precision?: number; - rounding?: string; - show_member_name?: boolean; - time_format?: string; + choices?: Choice[]; + currency?: string; + currency_format?: string; + date_format?: string; + default_value?: string; + default_value_typed?: DefaultValueTyped; + emoji?: string; + emoji_team_id?: string; + for_assignment?: boolean; + format?: string; + linked_to?: string[]; + mark_as_done_when_checked?: boolean; + max?: number; + notify_users?: boolean; + precision?: number; + rounding?: string; + show_member_name?: boolean; + time_format?: string; } export interface CanvasPlaceholderMapping { - column?: string; + column?: string; variable?: string; } @@ -287,161 +287,161 @@ export interface DefaultValueTyped { } export interface View { - columns?: Column[]; - created_by?: string; - date_created?: number; - id?: string; + columns?: Column[]; + created_by?: string; + date_created?: number; + id?: string; is_all_items_view?: boolean; - is_locked?: boolean; - name?: string; - position?: string; + is_locked?: boolean; + name?: string; + position?: string; stick_column_left?: boolean; - type?: string; + type?: string; } export interface Column { - id?: string; - key?: string; + id?: string; + key?: string; position?: string; - visible?: boolean; - width?: number; + visible?: boolean; + width?: number; } export interface MediaProgress { - duration_ms?: number; + duration_ms?: number; max_offset_ms?: number; - offset_ms?: number; + offset_ms?: number; } export interface Reaction { count?: number; - name?: string; - url?: string; + name?: string; + url?: string; users?: string[]; } export interface Saved { date_completed?: number; - date_due?: number; - is_archived?: boolean; - state?: string; + date_due?: number; + is_archived?: boolean; + state?: string; } export interface Shares { private?: { [key: string]: Private[] }; - public?: { [key: string]: Private[] }; + public?: { [key: string]: Private[] }; } export interface Private { - access?: string; - channel_name?: string; - date_last_shared?: number; - latest_reply?: string; - reply_count?: number; - reply_users?: string[]; + access?: string; + channel_name?: string; + date_last_shared?: number; + latest_reply?: string; + reply_count?: number; + reply_users?: string[]; reply_users_count?: number; - share_user_id?: string; - source?: string; - team_id?: string; - thread_ts?: string; - ts?: string; + share_user_id?: string; + source?: string; + team_id?: string; + thread_ts?: string; + ts?: string; } export interface TitleBlock { - accessory?: Accessory; - alt_text?: string; - app_collaborators?: string[]; - app_id?: string; - author_name?: string; - block_id?: string; - bot_user_id?: string; - button_label?: string; - description?: Text | string; - developer_trace_id?: string; - elements?: Accessory[]; - fallback?: string; - fields?: Text[]; - function_trigger_id?: string; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - is_animated?: boolean; - is_workflow_app?: boolean; - owning_team_id?: string; - provider_icon_url?: string; - provider_name?: string; + accessory?: Accessory; + alt_text?: string; + app_collaborators?: string[]; + app_id?: string; + author_name?: string; + block_id?: string; + bot_user_id?: string; + button_label?: string; + description?: Text | string; + developer_trace_id?: string; + elements?: Accessory[]; + fallback?: string; + fields?: Text[]; + function_trigger_id?: string; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + is_animated?: boolean; + is_workflow_app?: boolean; + owning_team_id?: string; + provider_icon_url?: string; + provider_name?: string; sales_home_workflow_app_type?: number; - share_url?: string; - slack_file?: SlackFile; - text?: Text; - thumbnail_url?: string; - title?: Text | string; - title_url?: string; - trigger_subtype?: string; - trigger_type?: string; - type?: string; - url?: string; - video_url?: string; - workflow_id?: string; + share_url?: string; + slack_file?: SlackFile; + text?: Text; + thumbnail_url?: string; + title?: Text | string; + title_url?: string; + trigger_subtype?: string; + trigger_type?: string; + type?: string; + url?: string; + video_url?: string; + workflow_id?: string; } export interface Accessory { - accessibility_label?: string; - action_id?: string; - alt_text?: string; - border?: number; - confirm?: Confirm; + accessibility_label?: string; + action_id?: string; + alt_text?: string; + border?: number; + confirm?: Confirm; default_to_current_conversation?: boolean; - elements?: AccessoryElement[]; - fallback?: string; - filter?: Filter; - focus_on_load?: boolean; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - indent?: number; - initial_channel?: string; - initial_channels?: string[]; - initial_conversation?: string; - initial_conversations?: string[]; - initial_date?: string; - initial_date_time?: number; - initial_option?: Option; - initial_options?: Option[]; - initial_time?: string; - initial_user?: string; - initial_users?: string[]; - max_selected_items?: number; - min_query_length?: number; - offset?: number; - option_groups?: OptionGroup[]; - options?: Option[]; - placeholder?: Text; - response_url_enabled?: boolean; - slack_file?: SlackFile; - style?: string; - text?: Text; - timezone?: string; - type?: string; - url?: string; - value?: string; - workflow?: Workflow; + elements?: AccessoryElement[]; + fallback?: string; + filter?: Filter; + focus_on_load?: boolean; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + indent?: number; + initial_channel?: string; + initial_channels?: string[]; + initial_conversation?: string; + initial_conversations?: string[]; + initial_date?: string; + initial_date_time?: number; + initial_option?: Option; + initial_options?: Option[]; + initial_time?: string; + initial_user?: string; + initial_users?: string[]; + max_selected_items?: number; + min_query_length?: number; + offset?: number; + option_groups?: OptionGroup[]; + options?: Option[]; + placeholder?: Text; + response_url_enabled?: boolean; + slack_file?: SlackFile; + style?: string; + text?: Text; + timezone?: string; + type?: string; + url?: string; + value?: string; + workflow?: Workflow; } export interface Confirm { confirm?: Text; - deny?: Text; - style?: string; - text?: Text; - title?: Text; + deny?: Text; + style?: string; + text?: Text; + title?: Text; } export interface Text { - emoji?: boolean; - text?: string; - type?: TextType; + emoji?: boolean; + text?: string; + type?: TextType; verbatim?: boolean; } @@ -451,42 +451,42 @@ export enum TextType { } export interface AccessoryElement { - border?: number; + border?: number; elements?: PurpleElement[]; - indent?: number; - offset?: number; - style?: string; - type?: string; + indent?: number; + offset?: number; + style?: string; + type?: string; } export interface PurpleElement { - channel_id?: string; - fallback?: string; - format?: string; - name?: string; - range?: string; - skin_tone?: number; - style?: Style; - team_id?: string; - text?: string; - timestamp?: string; - type?: ElementType; - unicode?: string; - unsafe?: boolean; - url?: string; - user_id?: string; + channel_id?: string; + fallback?: string; + format?: string; + name?: string; + range?: string; + skin_tone?: number; + style?: Style; + team_id?: string; + text?: string; + timestamp?: string; + type?: ElementType; + unicode?: string; + unsafe?: boolean; + url?: string; + user_id?: string; usergroup_id?: string; - value?: string; + value?: string; } export interface Style { - bold?: boolean; + bold?: boolean; client_highlight?: boolean; - code?: boolean; - highlight?: boolean; - italic?: boolean; - strike?: boolean; - unlink?: boolean; + code?: boolean; + highlight?: boolean; + italic?: boolean; + strike?: boolean; + unlink?: boolean; } export enum ElementType { @@ -503,25 +503,25 @@ export enum ElementType { } export interface Filter { - exclude_bot_users?: boolean; + exclude_bot_users?: boolean; exclude_external_shared_channels?: boolean; - include?: any[]; + include?: any[]; } export interface Option { description?: Text; - text?: Text; - url?: string; - value?: string; + text?: Text; + url?: string; + value?: string; } export interface OptionGroup { - label?: Text; + label?: Text; options?: Option[]; } export interface SlackFile { - id?: string; + id?: string; url?: string; } @@ -531,11 +531,11 @@ export interface Workflow { export interface Trigger { customizable_input_parameters?: CustomizableInputParameter[]; - url?: string; + url?: string; } export interface CustomizableInputParameter { - name?: string; + name?: string; value?: string; } diff --git a/packages/web-api/src/types/response/FilesRemoteListResponse.ts b/packages/web-api/src/types/response/FilesRemoteListResponse.ts index efee31e87..700c4f591 100644 --- a/packages/web-api/src/types/response/FilesRemoteListResponse.ts +++ b/packages/web-api/src/types/response/FilesRemoteListResponse.ts @@ -8,272 +8,272 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type FilesRemoteListResponse = WebAPICallResult & { - error?: string; - files?: File[]; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + files?: File[]; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; export interface File { - access?: string; - alt_txt?: string; - app_id?: string; - app_name?: string; - bot_id?: string; - can_toggle_canvas_lock?: boolean; - canvas_template_mode?: string; - cc?: Cc[]; - channel_actions_count?: number; - channel_actions_ts?: string; - channels?: string[]; - comments_count?: number; - converted_pdf?: string; - created?: number; - deanimate?: string; - deanimate_gif?: string; - display_as_bot?: boolean; - dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; - duration_ms?: number; - edit_link?: string; - edit_timestamp?: number; - editable?: boolean; - editor?: string; - editors?: string[]; - external_id?: string; - external_type?: string; - external_url?: string; - favorites?: Favorite[]; - file_access?: string; - filetype?: string; - from?: Cc[]; - groups?: string[]; - has_more?: boolean; - has_more_shares?: boolean; - has_rich_preview?: boolean; - headers?: Headers; - hls?: string; - hls_embed?: string; - id?: string; - image_exif_rotation?: number; - ims?: string[]; - initial_comment?: InitialComment; - is_channel_space?: boolean; - is_external?: boolean; - is_public?: boolean; - is_starred?: boolean; - last_editor?: string; - last_read?: number; - lines?: number; - lines_more?: number; - linked_channel_id?: string; - list_limits?: ListLimits; - list_metadata?: ListMetadata; - media_display_type?: string; - media_progress?: MediaProgress; - mimetype?: string; - mode?: string; - mp4?: string; - mp4_low?: string; - name?: string; - non_owner_editable?: boolean; - num_stars?: number; - org_or_workspace_access?: string; - original_attachment_count?: number; - original_h?: string; - original_w?: string; - permalink?: string; - permalink_public?: string; - pinned_to?: string[]; - pjpeg?: string; - plain_text?: string; - pretty_type?: string; - preview?: string; - preview_highlight?: string; - preview_is_truncated?: boolean; - preview_plain_text?: string; + access?: string; + alt_txt?: string; + app_id?: string; + app_name?: string; + bot_id?: string; + can_toggle_canvas_lock?: boolean; + canvas_template_mode?: string; + cc?: Cc[]; + channel_actions_count?: number; + channel_actions_ts?: string; + channels?: string[]; + comments_count?: number; + converted_pdf?: string; + created?: number; + deanimate?: string; + deanimate_gif?: string; + display_as_bot?: boolean; + dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; + duration_ms?: number; + edit_link?: string; + edit_timestamp?: number; + editable?: boolean; + editor?: string; + editors?: string[]; + external_id?: string; + external_type?: string; + external_url?: string; + favorites?: Favorite[]; + file_access?: string; + filetype?: string; + from?: Cc[]; + groups?: string[]; + has_more?: boolean; + has_more_shares?: boolean; + has_rich_preview?: boolean; + headers?: Headers; + hls?: string; + hls_embed?: string; + id?: string; + image_exif_rotation?: number; + ims?: string[]; + initial_comment?: InitialComment; + is_channel_space?: boolean; + is_external?: boolean; + is_public?: boolean; + is_starred?: boolean; + last_editor?: string; + last_read?: number; + lines?: number; + lines_more?: number; + linked_channel_id?: string; + list_limits?: ListLimits; + list_metadata?: ListMetadata; + media_display_type?: string; + media_progress?: MediaProgress; + mimetype?: string; + mode?: string; + mp4?: string; + mp4_low?: string; + name?: string; + non_owner_editable?: boolean; + num_stars?: number; + org_or_workspace_access?: string; + original_attachment_count?: number; + original_h?: string; + original_w?: string; + permalink?: string; + permalink_public?: string; + pinned_to?: string[]; + pjpeg?: string; + plain_text?: string; + pretty_type?: string; + preview?: string; + preview_highlight?: string; + preview_is_truncated?: boolean; + preview_plain_text?: string; private_channels_with_file_access_count?: number; - private_file_with_access_count?: number; - public_url_shared?: boolean; - quip_thread_id?: string; - reactions?: Reaction[]; - saved?: Saved; - sent_to_self?: boolean; - shares?: Shares; - show_badge?: boolean; - simplified_html?: string; - size?: number; - source_team?: string; - subject?: string; - subtype?: string; - team_pref_version_history_enabled?: boolean; - teams_shared_with?: any[]; - template_conversion_ts?: number; - template_description?: string; - template_icon?: string; - template_name?: string; - template_title?: string; - thumb_1024?: string; - thumb_1024_gif?: string; - thumb_1024_h?: string; - thumb_1024_w?: string; - thumb_160?: string; - thumb_160_gif?: string; - thumb_160_h?: string; - thumb_160_w?: string; - thumb_360?: string; - thumb_360_gif?: string; - thumb_360_h?: string; - thumb_360_w?: string; - thumb_480?: string; - thumb_480_gif?: string; - thumb_480_h?: string; - thumb_480_w?: string; - thumb_64?: string; - thumb_64_gif?: string; - thumb_64_h?: string; - thumb_64_w?: string; - thumb_720?: string; - thumb_720_gif?: string; - thumb_720_h?: string; - thumb_720_w?: string; - thumb_80?: string; - thumb_800?: string; - thumb_800_gif?: string; - thumb_800_h?: string; - thumb_800_w?: string; - thumb_80_gif?: string; - thumb_80_h?: string; - thumb_80_w?: string; - thumb_960?: string; - thumb_960_gif?: string; - thumb_960_h?: string; - thumb_960_w?: string; - thumb_gif?: string; - thumb_pdf?: string; - thumb_pdf_h?: string; - thumb_pdf_w?: string; - thumb_tiny?: string; - thumb_video?: string; - thumb_video_h?: number; - thumb_video_w?: number; - timestamp?: number; - title?: string; - title_blocks?: TitleBlock[]; - to?: Cc[]; - transcription?: Transcription; - update_notification?: number; - updated?: number; - url_private?: string; - url_private_download?: string; - url_static_preview?: string; - user?: string; - user_team?: string; - username?: string; - vtt?: string; + private_file_with_access_count?: number; + public_url_shared?: boolean; + quip_thread_id?: string; + reactions?: Reaction[]; + saved?: Saved; + sent_to_self?: boolean; + shares?: Shares; + show_badge?: boolean; + simplified_html?: string; + size?: number; + source_team?: string; + subject?: string; + subtype?: string; + team_pref_version_history_enabled?: boolean; + teams_shared_with?: any[]; + template_conversion_ts?: number; + template_description?: string; + template_icon?: string; + template_name?: string; + template_title?: string; + thumb_1024?: string; + thumb_1024_gif?: string; + thumb_1024_h?: string; + thumb_1024_w?: string; + thumb_160?: string; + thumb_160_gif?: string; + thumb_160_h?: string; + thumb_160_w?: string; + thumb_360?: string; + thumb_360_gif?: string; + thumb_360_h?: string; + thumb_360_w?: string; + thumb_480?: string; + thumb_480_gif?: string; + thumb_480_h?: string; + thumb_480_w?: string; + thumb_64?: string; + thumb_64_gif?: string; + thumb_64_h?: string; + thumb_64_w?: string; + thumb_720?: string; + thumb_720_gif?: string; + thumb_720_h?: string; + thumb_720_w?: string; + thumb_80?: string; + thumb_800?: string; + thumb_800_gif?: string; + thumb_800_h?: string; + thumb_800_w?: string; + thumb_80_gif?: string; + thumb_80_h?: string; + thumb_80_w?: string; + thumb_960?: string; + thumb_960_gif?: string; + thumb_960_h?: string; + thumb_960_w?: string; + thumb_gif?: string; + thumb_pdf?: string; + thumb_pdf_h?: string; + thumb_pdf_w?: string; + thumb_tiny?: string; + thumb_video?: string; + thumb_video_h?: number; + thumb_video_w?: number; + timestamp?: number; + title?: string; + title_blocks?: TitleBlock[]; + to?: Cc[]; + transcription?: Transcription; + update_notification?: number; + updated?: number; + url_private?: string; + url_private_download?: string; + url_static_preview?: string; + user?: string; + user_team?: string; + username?: string; + vtt?: string; } export interface Cc { - address?: string; - name?: string; + address?: string; + name?: string; original?: string; } export interface DmMpdmUsersWithFileAccess { - access?: string; + access?: string; user_id?: string; } export interface Favorite { - collection_id?: string; + collection_id?: string; collection_name?: string; - position?: string; + position?: string; } export interface Headers { - date?: string; + date?: string; in_reply_to?: string; - message_id?: string; - reply_to?: string; + message_id?: string; + reply_to?: string; } export interface InitialComment { - channel?: string; - comment?: string; - created?: number; - id?: string; - is_intro?: boolean; + channel?: string; + comment?: string; + created?: number; + id?: string; + is_intro?: boolean; timestamp?: number; - user?: string; + user?: string; } export interface ListLimits { - column_count?: number; - column_count_limit?: number; + column_count?: number; + column_count_limit?: number; over_column_maximum?: boolean; - over_row_maximum?: boolean; - over_view_maximum?: boolean; - row_count?: number; - row_count_limit?: number; - view_count?: number; - view_count_limit?: number; + over_row_maximum?: boolean; + over_view_maximum?: boolean; + row_count?: number; + row_count_limit?: number; + view_count?: number; + view_count_limit?: number; } export interface ListMetadata { creation_source?: CreationSource; - description?: string; - icon?: string; - icon_team_id?: string; - icon_url?: string; - integrations?: string[]; - is_trial?: boolean; - schema?: Schema[]; - views?: View[]; + description?: string; + icon?: string; + icon_team_id?: string; + icon_url?: string; + integrations?: string[]; + is_trial?: boolean; + schema?: Schema[]; + views?: View[]; } export interface CreationSource { - reference_id?: string; - type?: string; + reference_id?: string; + type?: string; workflow_function_id?: string; } export interface Schema { - id?: string; + id?: string; is_primary_column?: boolean; - key?: string; - name?: string; - options?: Options; - type?: string; + key?: string; + name?: string; + options?: Options; + type?: string; } export interface Options { - canvas_id?: string; + canvas_id?: string; canvas_placeholder_mapping?: CanvasPlaceholderMapping[]; - choices?: Choice[]; - currency?: string; - currency_format?: string; - date_format?: string; - default_value?: string; - default_value_typed?: DefaultValueTyped; - emoji?: string; - emoji_team_id?: string; - for_assignment?: boolean; - format?: string; - linked_to?: string[]; - mark_as_done_when_checked?: boolean; - max?: number; - notify_users?: boolean; - precision?: number; - rounding?: string; - show_member_name?: boolean; - time_format?: string; + choices?: Choice[]; + currency?: string; + currency_format?: string; + date_format?: string; + default_value?: string; + default_value_typed?: DefaultValueTyped; + emoji?: string; + emoji_team_id?: string; + for_assignment?: boolean; + format?: string; + linked_to?: string[]; + mark_as_done_when_checked?: boolean; + max?: number; + notify_users?: boolean; + precision?: number; + rounding?: string; + show_member_name?: boolean; + time_format?: string; } export interface CanvasPlaceholderMapping { - column?: string; + column?: string; variable?: string; } @@ -288,161 +288,161 @@ export interface DefaultValueTyped { } export interface View { - columns?: Column[]; - created_by?: string; - date_created?: number; - id?: string; + columns?: Column[]; + created_by?: string; + date_created?: number; + id?: string; is_all_items_view?: boolean; - is_locked?: boolean; - name?: string; - position?: string; + is_locked?: boolean; + name?: string; + position?: string; stick_column_left?: boolean; - type?: string; + type?: string; } export interface Column { - id?: string; - key?: string; + id?: string; + key?: string; position?: string; - visible?: boolean; - width?: number; + visible?: boolean; + width?: number; } export interface MediaProgress { - duration_ms?: number; + duration_ms?: number; max_offset_ms?: number; - offset_ms?: number; + offset_ms?: number; } export interface Reaction { count?: number; - name?: string; - url?: string; + name?: string; + url?: string; users?: string[]; } export interface Saved { date_completed?: number; - date_due?: number; - is_archived?: boolean; - state?: string; + date_due?: number; + is_archived?: boolean; + state?: string; } export interface Shares { private?: { [key: string]: Private[] }; - public?: { [key: string]: Private[] }; + public?: { [key: string]: Private[] }; } export interface Private { - access?: string; - channel_name?: string; - date_last_shared?: number; - latest_reply?: string; - reply_count?: number; - reply_users?: string[]; + access?: string; + channel_name?: string; + date_last_shared?: number; + latest_reply?: string; + reply_count?: number; + reply_users?: string[]; reply_users_count?: number; - share_user_id?: string; - source?: string; - team_id?: string; - thread_ts?: string; - ts?: string; + share_user_id?: string; + source?: string; + team_id?: string; + thread_ts?: string; + ts?: string; } export interface TitleBlock { - accessory?: Accessory; - alt_text?: string; - app_collaborators?: string[]; - app_id?: string; - author_name?: string; - block_id?: string; - bot_user_id?: string; - button_label?: string; - description?: Text | string; - developer_trace_id?: string; - elements?: Accessory[]; - fallback?: string; - fields?: Text[]; - function_trigger_id?: string; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - is_animated?: boolean; - is_workflow_app?: boolean; - owning_team_id?: string; - provider_icon_url?: string; - provider_name?: string; + accessory?: Accessory; + alt_text?: string; + app_collaborators?: string[]; + app_id?: string; + author_name?: string; + block_id?: string; + bot_user_id?: string; + button_label?: string; + description?: Text | string; + developer_trace_id?: string; + elements?: Accessory[]; + fallback?: string; + fields?: Text[]; + function_trigger_id?: string; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + is_animated?: boolean; + is_workflow_app?: boolean; + owning_team_id?: string; + provider_icon_url?: string; + provider_name?: string; sales_home_workflow_app_type?: number; - share_url?: string; - slack_file?: SlackFile; - text?: Text; - thumbnail_url?: string; - title?: Text | string; - title_url?: string; - trigger_subtype?: string; - trigger_type?: string; - type?: string; - url?: string; - video_url?: string; - workflow_id?: string; + share_url?: string; + slack_file?: SlackFile; + text?: Text; + thumbnail_url?: string; + title?: Text | string; + title_url?: string; + trigger_subtype?: string; + trigger_type?: string; + type?: string; + url?: string; + video_url?: string; + workflow_id?: string; } export interface Accessory { - accessibility_label?: string; - action_id?: string; - alt_text?: string; - border?: number; - confirm?: Confirm; + accessibility_label?: string; + action_id?: string; + alt_text?: string; + border?: number; + confirm?: Confirm; default_to_current_conversation?: boolean; - elements?: AccessoryElement[]; - fallback?: string; - filter?: Filter; - focus_on_load?: boolean; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - indent?: number; - initial_channel?: string; - initial_channels?: string[]; - initial_conversation?: string; - initial_conversations?: string[]; - initial_date?: string; - initial_date_time?: number; - initial_option?: Option; - initial_options?: Option[]; - initial_time?: string; - initial_user?: string; - initial_users?: string[]; - max_selected_items?: number; - min_query_length?: number; - offset?: number; - option_groups?: OptionGroup[]; - options?: Option[]; - placeholder?: Text; - response_url_enabled?: boolean; - slack_file?: SlackFile; - style?: string; - text?: Text; - timezone?: string; - type?: string; - url?: string; - value?: string; - workflow?: Workflow; + elements?: AccessoryElement[]; + fallback?: string; + filter?: Filter; + focus_on_load?: boolean; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + indent?: number; + initial_channel?: string; + initial_channels?: string[]; + initial_conversation?: string; + initial_conversations?: string[]; + initial_date?: string; + initial_date_time?: number; + initial_option?: Option; + initial_options?: Option[]; + initial_time?: string; + initial_user?: string; + initial_users?: string[]; + max_selected_items?: number; + min_query_length?: number; + offset?: number; + option_groups?: OptionGroup[]; + options?: Option[]; + placeholder?: Text; + response_url_enabled?: boolean; + slack_file?: SlackFile; + style?: string; + text?: Text; + timezone?: string; + type?: string; + url?: string; + value?: string; + workflow?: Workflow; } export interface Confirm { confirm?: Text; - deny?: Text; - style?: string; - text?: Text; - title?: Text; + deny?: Text; + style?: string; + text?: Text; + title?: Text; } export interface Text { - emoji?: boolean; - text?: string; - type?: TextType; + emoji?: boolean; + text?: string; + type?: TextType; verbatim?: boolean; } @@ -452,42 +452,42 @@ export enum TextType { } export interface AccessoryElement { - border?: number; + border?: number; elements?: PurpleElement[]; - indent?: number; - offset?: number; - style?: string; - type?: string; + indent?: number; + offset?: number; + style?: string; + type?: string; } export interface PurpleElement { - channel_id?: string; - fallback?: string; - format?: string; - name?: string; - range?: string; - skin_tone?: number; - style?: Style; - team_id?: string; - text?: string; - timestamp?: string; - type?: ElementType; - unicode?: string; - unsafe?: boolean; - url?: string; - user_id?: string; + channel_id?: string; + fallback?: string; + format?: string; + name?: string; + range?: string; + skin_tone?: number; + style?: Style; + team_id?: string; + text?: string; + timestamp?: string; + type?: ElementType; + unicode?: string; + unsafe?: boolean; + url?: string; + user_id?: string; usergroup_id?: string; - value?: string; + value?: string; } export interface Style { - bold?: boolean; + bold?: boolean; client_highlight?: boolean; - code?: boolean; - highlight?: boolean; - italic?: boolean; - strike?: boolean; - unlink?: boolean; + code?: boolean; + highlight?: boolean; + italic?: boolean; + strike?: boolean; + unlink?: boolean; } export enum ElementType { @@ -504,25 +504,25 @@ export enum ElementType { } export interface Filter { - exclude_bot_users?: boolean; + exclude_bot_users?: boolean; exclude_external_shared_channels?: boolean; - include?: any[]; + include?: any[]; } export interface Option { description?: Text; - text?: Text; - url?: string; - value?: string; + text?: Text; + url?: string; + value?: string; } export interface OptionGroup { - label?: Text; + label?: Text; options?: Option[]; } export interface SlackFile { - id?: string; + id?: string; url?: string; } @@ -532,11 +532,11 @@ export interface Workflow { export interface Trigger { customizable_input_parameters?: CustomizableInputParameter[]; - url?: string; + url?: string; } export interface CustomizableInputParameter { - name?: string; + name?: string; value?: string; } diff --git a/packages/web-api/src/types/response/FilesRemoteRemoveResponse.ts b/packages/web-api/src/types/response/FilesRemoteRemoveResponse.ts index aeb98392a..b86e44f11 100644 --- a/packages/web-api/src/types/response/FilesRemoteRemoveResponse.ts +++ b/packages/web-api/src/types/response/FilesRemoteRemoveResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type FilesRemoteRemoveResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/FilesRemoteShareResponse.ts b/packages/web-api/src/types/response/FilesRemoteShareResponse.ts index 889ccbdc4..01b9e3b2a 100644 --- a/packages/web-api/src/types/response/FilesRemoteShareResponse.ts +++ b/packages/web-api/src/types/response/FilesRemoteShareResponse.ts @@ -8,271 +8,271 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type FilesRemoteShareResponse = WebAPICallResult & { - error?: string; - file?: File; - needed?: string; - ok?: boolean; + error?: string; + file?: File; + needed?: string; + ok?: boolean; provided?: string; }; export interface File { - access?: string; - alt_txt?: string; - app_id?: string; - app_name?: string; - bot_id?: string; - can_toggle_canvas_lock?: boolean; - canvas_template_mode?: string; - cc?: Cc[]; - channel_actions_count?: number; - channel_actions_ts?: string; - channels?: string[]; - comments_count?: number; - converted_pdf?: string; - created?: number; - deanimate?: string; - deanimate_gif?: string; - display_as_bot?: boolean; - dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; - duration_ms?: number; - edit_link?: string; - edit_timestamp?: number; - editable?: boolean; - editor?: string; - editors?: string[]; - external_id?: string; - external_type?: string; - external_url?: string; - favorites?: Favorite[]; - file_access?: string; - filetype?: string; - from?: Cc[]; - groups?: string[]; - has_more?: boolean; - has_more_shares?: boolean; - has_rich_preview?: boolean; - headers?: Headers; - hls?: string; - hls_embed?: string; - id?: string; - image_exif_rotation?: number; - ims?: string[]; - initial_comment?: InitialComment; - is_channel_space?: boolean; - is_external?: boolean; - is_public?: boolean; - is_starred?: boolean; - last_editor?: string; - last_read?: number; - lines?: number; - lines_more?: number; - linked_channel_id?: string; - list_limits?: ListLimits; - list_metadata?: ListMetadata; - media_display_type?: string; - media_progress?: MediaProgress; - mimetype?: string; - mode?: string; - mp4?: string; - mp4_low?: string; - name?: string; - non_owner_editable?: boolean; - num_stars?: number; - org_or_workspace_access?: string; - original_attachment_count?: number; - original_h?: string; - original_w?: string; - permalink?: string; - permalink_public?: string; - pinned_to?: string[]; - pjpeg?: string; - plain_text?: string; - pretty_type?: string; - preview?: string; - preview_highlight?: string; - preview_is_truncated?: boolean; - preview_plain_text?: string; + access?: string; + alt_txt?: string; + app_id?: string; + app_name?: string; + bot_id?: string; + can_toggle_canvas_lock?: boolean; + canvas_template_mode?: string; + cc?: Cc[]; + channel_actions_count?: number; + channel_actions_ts?: string; + channels?: string[]; + comments_count?: number; + converted_pdf?: string; + created?: number; + deanimate?: string; + deanimate_gif?: string; + display_as_bot?: boolean; + dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; + duration_ms?: number; + edit_link?: string; + edit_timestamp?: number; + editable?: boolean; + editor?: string; + editors?: string[]; + external_id?: string; + external_type?: string; + external_url?: string; + favorites?: Favorite[]; + file_access?: string; + filetype?: string; + from?: Cc[]; + groups?: string[]; + has_more?: boolean; + has_more_shares?: boolean; + has_rich_preview?: boolean; + headers?: Headers; + hls?: string; + hls_embed?: string; + id?: string; + image_exif_rotation?: number; + ims?: string[]; + initial_comment?: InitialComment; + is_channel_space?: boolean; + is_external?: boolean; + is_public?: boolean; + is_starred?: boolean; + last_editor?: string; + last_read?: number; + lines?: number; + lines_more?: number; + linked_channel_id?: string; + list_limits?: ListLimits; + list_metadata?: ListMetadata; + media_display_type?: string; + media_progress?: MediaProgress; + mimetype?: string; + mode?: string; + mp4?: string; + mp4_low?: string; + name?: string; + non_owner_editable?: boolean; + num_stars?: number; + org_or_workspace_access?: string; + original_attachment_count?: number; + original_h?: string; + original_w?: string; + permalink?: string; + permalink_public?: string; + pinned_to?: string[]; + pjpeg?: string; + plain_text?: string; + pretty_type?: string; + preview?: string; + preview_highlight?: string; + preview_is_truncated?: boolean; + preview_plain_text?: string; private_channels_with_file_access_count?: number; - private_file_with_access_count?: number; - public_url_shared?: boolean; - quip_thread_id?: string; - reactions?: Reaction[]; - saved?: Saved; - sent_to_self?: boolean; - shares?: Shares; - show_badge?: boolean; - simplified_html?: string; - size?: number; - source_team?: string; - subject?: string; - subtype?: string; - team_pref_version_history_enabled?: boolean; - teams_shared_with?: any[]; - template_conversion_ts?: number; - template_description?: string; - template_icon?: string; - template_name?: string; - template_title?: string; - thumb_1024?: string; - thumb_1024_gif?: string; - thumb_1024_h?: string; - thumb_1024_w?: string; - thumb_160?: string; - thumb_160_gif?: string; - thumb_160_h?: string; - thumb_160_w?: string; - thumb_360?: string; - thumb_360_gif?: string; - thumb_360_h?: string; - thumb_360_w?: string; - thumb_480?: string; - thumb_480_gif?: string; - thumb_480_h?: string; - thumb_480_w?: string; - thumb_64?: string; - thumb_64_gif?: string; - thumb_64_h?: string; - thumb_64_w?: string; - thumb_720?: string; - thumb_720_gif?: string; - thumb_720_h?: string; - thumb_720_w?: string; - thumb_80?: string; - thumb_800?: string; - thumb_800_gif?: string; - thumb_800_h?: string; - thumb_800_w?: string; - thumb_80_gif?: string; - thumb_80_h?: string; - thumb_80_w?: string; - thumb_960?: string; - thumb_960_gif?: string; - thumb_960_h?: string; - thumb_960_w?: string; - thumb_gif?: string; - thumb_pdf?: string; - thumb_pdf_h?: string; - thumb_pdf_w?: string; - thumb_tiny?: string; - thumb_video?: string; - thumb_video_h?: number; - thumb_video_w?: number; - timestamp?: number; - title?: string; - title_blocks?: TitleBlock[]; - to?: Cc[]; - transcription?: Transcription; - update_notification?: number; - updated?: number; - url_private?: string; - url_private_download?: string; - url_static_preview?: string; - user?: string; - user_team?: string; - username?: string; - vtt?: string; + private_file_with_access_count?: number; + public_url_shared?: boolean; + quip_thread_id?: string; + reactions?: Reaction[]; + saved?: Saved; + sent_to_self?: boolean; + shares?: Shares; + show_badge?: boolean; + simplified_html?: string; + size?: number; + source_team?: string; + subject?: string; + subtype?: string; + team_pref_version_history_enabled?: boolean; + teams_shared_with?: any[]; + template_conversion_ts?: number; + template_description?: string; + template_icon?: string; + template_name?: string; + template_title?: string; + thumb_1024?: string; + thumb_1024_gif?: string; + thumb_1024_h?: string; + thumb_1024_w?: string; + thumb_160?: string; + thumb_160_gif?: string; + thumb_160_h?: string; + thumb_160_w?: string; + thumb_360?: string; + thumb_360_gif?: string; + thumb_360_h?: string; + thumb_360_w?: string; + thumb_480?: string; + thumb_480_gif?: string; + thumb_480_h?: string; + thumb_480_w?: string; + thumb_64?: string; + thumb_64_gif?: string; + thumb_64_h?: string; + thumb_64_w?: string; + thumb_720?: string; + thumb_720_gif?: string; + thumb_720_h?: string; + thumb_720_w?: string; + thumb_80?: string; + thumb_800?: string; + thumb_800_gif?: string; + thumb_800_h?: string; + thumb_800_w?: string; + thumb_80_gif?: string; + thumb_80_h?: string; + thumb_80_w?: string; + thumb_960?: string; + thumb_960_gif?: string; + thumb_960_h?: string; + thumb_960_w?: string; + thumb_gif?: string; + thumb_pdf?: string; + thumb_pdf_h?: string; + thumb_pdf_w?: string; + thumb_tiny?: string; + thumb_video?: string; + thumb_video_h?: number; + thumb_video_w?: number; + timestamp?: number; + title?: string; + title_blocks?: TitleBlock[]; + to?: Cc[]; + transcription?: Transcription; + update_notification?: number; + updated?: number; + url_private?: string; + url_private_download?: string; + url_static_preview?: string; + user?: string; + user_team?: string; + username?: string; + vtt?: string; } export interface Cc { - address?: string; - name?: string; + address?: string; + name?: string; original?: string; } export interface DmMpdmUsersWithFileAccess { - access?: string; + access?: string; user_id?: string; } export interface Favorite { - collection_id?: string; + collection_id?: string; collection_name?: string; - position?: string; + position?: string; } export interface Headers { - date?: string; + date?: string; in_reply_to?: string; - message_id?: string; - reply_to?: string; + message_id?: string; + reply_to?: string; } export interface InitialComment { - channel?: string; - comment?: string; - created?: number; - id?: string; - is_intro?: boolean; + channel?: string; + comment?: string; + created?: number; + id?: string; + is_intro?: boolean; timestamp?: number; - user?: string; + user?: string; } export interface ListLimits { - column_count?: number; - column_count_limit?: number; + column_count?: number; + column_count_limit?: number; over_column_maximum?: boolean; - over_row_maximum?: boolean; - over_view_maximum?: boolean; - row_count?: number; - row_count_limit?: number; - view_count?: number; - view_count_limit?: number; + over_row_maximum?: boolean; + over_view_maximum?: boolean; + row_count?: number; + row_count_limit?: number; + view_count?: number; + view_count_limit?: number; } export interface ListMetadata { creation_source?: CreationSource; - description?: string; - icon?: string; - icon_team_id?: string; - icon_url?: string; - integrations?: string[]; - is_trial?: boolean; - schema?: Schema[]; - views?: View[]; + description?: string; + icon?: string; + icon_team_id?: string; + icon_url?: string; + integrations?: string[]; + is_trial?: boolean; + schema?: Schema[]; + views?: View[]; } export interface CreationSource { - reference_id?: string; - type?: string; + reference_id?: string; + type?: string; workflow_function_id?: string; } export interface Schema { - id?: string; + id?: string; is_primary_column?: boolean; - key?: string; - name?: string; - options?: Options; - type?: string; + key?: string; + name?: string; + options?: Options; + type?: string; } export interface Options { - canvas_id?: string; + canvas_id?: string; canvas_placeholder_mapping?: CanvasPlaceholderMapping[]; - choices?: Choice[]; - currency?: string; - currency_format?: string; - date_format?: string; - default_value?: string; - default_value_typed?: DefaultValueTyped; - emoji?: string; - emoji_team_id?: string; - for_assignment?: boolean; - format?: string; - linked_to?: string[]; - mark_as_done_when_checked?: boolean; - max?: number; - notify_users?: boolean; - precision?: number; - rounding?: string; - show_member_name?: boolean; - time_format?: string; + choices?: Choice[]; + currency?: string; + currency_format?: string; + date_format?: string; + default_value?: string; + default_value_typed?: DefaultValueTyped; + emoji?: string; + emoji_team_id?: string; + for_assignment?: boolean; + format?: string; + linked_to?: string[]; + mark_as_done_when_checked?: boolean; + max?: number; + notify_users?: boolean; + precision?: number; + rounding?: string; + show_member_name?: boolean; + time_format?: string; } export interface CanvasPlaceholderMapping { - column?: string; + column?: string; variable?: string; } @@ -287,161 +287,161 @@ export interface DefaultValueTyped { } export interface View { - columns?: Column[]; - created_by?: string; - date_created?: number; - id?: string; + columns?: Column[]; + created_by?: string; + date_created?: number; + id?: string; is_all_items_view?: boolean; - is_locked?: boolean; - name?: string; - position?: string; + is_locked?: boolean; + name?: string; + position?: string; stick_column_left?: boolean; - type?: string; + type?: string; } export interface Column { - id?: string; - key?: string; + id?: string; + key?: string; position?: string; - visible?: boolean; - width?: number; + visible?: boolean; + width?: number; } export interface MediaProgress { - duration_ms?: number; + duration_ms?: number; max_offset_ms?: number; - offset_ms?: number; + offset_ms?: number; } export interface Reaction { count?: number; - name?: string; - url?: string; + name?: string; + url?: string; users?: string[]; } export interface Saved { date_completed?: number; - date_due?: number; - is_archived?: boolean; - state?: string; + date_due?: number; + is_archived?: boolean; + state?: string; } export interface Shares { private?: { [key: string]: Private[] }; - public?: { [key: string]: Private[] }; + public?: { [key: string]: Private[] }; } export interface Private { - access?: string; - channel_name?: string; - date_last_shared?: number; - latest_reply?: string; - reply_count?: number; - reply_users?: string[]; + access?: string; + channel_name?: string; + date_last_shared?: number; + latest_reply?: string; + reply_count?: number; + reply_users?: string[]; reply_users_count?: number; - share_user_id?: string; - source?: string; - team_id?: string; - thread_ts?: string; - ts?: string; + share_user_id?: string; + source?: string; + team_id?: string; + thread_ts?: string; + ts?: string; } export interface TitleBlock { - accessory?: Accessory; - alt_text?: string; - app_collaborators?: string[]; - app_id?: string; - author_name?: string; - block_id?: string; - bot_user_id?: string; - button_label?: string; - description?: Text | string; - developer_trace_id?: string; - elements?: Accessory[]; - fallback?: string; - fields?: Text[]; - function_trigger_id?: string; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - is_animated?: boolean; - is_workflow_app?: boolean; - owning_team_id?: string; - provider_icon_url?: string; - provider_name?: string; + accessory?: Accessory; + alt_text?: string; + app_collaborators?: string[]; + app_id?: string; + author_name?: string; + block_id?: string; + bot_user_id?: string; + button_label?: string; + description?: Text | string; + developer_trace_id?: string; + elements?: Accessory[]; + fallback?: string; + fields?: Text[]; + function_trigger_id?: string; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + is_animated?: boolean; + is_workflow_app?: boolean; + owning_team_id?: string; + provider_icon_url?: string; + provider_name?: string; sales_home_workflow_app_type?: number; - share_url?: string; - slack_file?: SlackFile; - text?: Text; - thumbnail_url?: string; - title?: Text | string; - title_url?: string; - trigger_subtype?: string; - trigger_type?: string; - type?: string; - url?: string; - video_url?: string; - workflow_id?: string; + share_url?: string; + slack_file?: SlackFile; + text?: Text; + thumbnail_url?: string; + title?: Text | string; + title_url?: string; + trigger_subtype?: string; + trigger_type?: string; + type?: string; + url?: string; + video_url?: string; + workflow_id?: string; } export interface Accessory { - accessibility_label?: string; - action_id?: string; - alt_text?: string; - border?: number; - confirm?: Confirm; + accessibility_label?: string; + action_id?: string; + alt_text?: string; + border?: number; + confirm?: Confirm; default_to_current_conversation?: boolean; - elements?: AccessoryElement[]; - fallback?: string; - filter?: Filter; - focus_on_load?: boolean; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - indent?: number; - initial_channel?: string; - initial_channels?: string[]; - initial_conversation?: string; - initial_conversations?: string[]; - initial_date?: string; - initial_date_time?: number; - initial_option?: Option; - initial_options?: Option[]; - initial_time?: string; - initial_user?: string; - initial_users?: string[]; - max_selected_items?: number; - min_query_length?: number; - offset?: number; - option_groups?: OptionGroup[]; - options?: Option[]; - placeholder?: Text; - response_url_enabled?: boolean; - slack_file?: SlackFile; - style?: string; - text?: Text; - timezone?: string; - type?: string; - url?: string; - value?: string; - workflow?: Workflow; + elements?: AccessoryElement[]; + fallback?: string; + filter?: Filter; + focus_on_load?: boolean; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + indent?: number; + initial_channel?: string; + initial_channels?: string[]; + initial_conversation?: string; + initial_conversations?: string[]; + initial_date?: string; + initial_date_time?: number; + initial_option?: Option; + initial_options?: Option[]; + initial_time?: string; + initial_user?: string; + initial_users?: string[]; + max_selected_items?: number; + min_query_length?: number; + offset?: number; + option_groups?: OptionGroup[]; + options?: Option[]; + placeholder?: Text; + response_url_enabled?: boolean; + slack_file?: SlackFile; + style?: string; + text?: Text; + timezone?: string; + type?: string; + url?: string; + value?: string; + workflow?: Workflow; } export interface Confirm { confirm?: Text; - deny?: Text; - style?: string; - text?: Text; - title?: Text; + deny?: Text; + style?: string; + text?: Text; + title?: Text; } export interface Text { - emoji?: boolean; - text?: string; - type?: TextType; + emoji?: boolean; + text?: string; + type?: TextType; verbatim?: boolean; } @@ -451,42 +451,42 @@ export enum TextType { } export interface AccessoryElement { - border?: number; + border?: number; elements?: PurpleElement[]; - indent?: number; - offset?: number; - style?: string; - type?: string; + indent?: number; + offset?: number; + style?: string; + type?: string; } export interface PurpleElement { - channel_id?: string; - fallback?: string; - format?: string; - name?: string; - range?: string; - skin_tone?: number; - style?: Style; - team_id?: string; - text?: string; - timestamp?: string; - type?: ElementType; - unicode?: string; - unsafe?: boolean; - url?: string; - user_id?: string; + channel_id?: string; + fallback?: string; + format?: string; + name?: string; + range?: string; + skin_tone?: number; + style?: Style; + team_id?: string; + text?: string; + timestamp?: string; + type?: ElementType; + unicode?: string; + unsafe?: boolean; + url?: string; + user_id?: string; usergroup_id?: string; - value?: string; + value?: string; } export interface Style { - bold?: boolean; + bold?: boolean; client_highlight?: boolean; - code?: boolean; - highlight?: boolean; - italic?: boolean; - strike?: boolean; - unlink?: boolean; + code?: boolean; + highlight?: boolean; + italic?: boolean; + strike?: boolean; + unlink?: boolean; } export enum ElementType { @@ -503,25 +503,25 @@ export enum ElementType { } export interface Filter { - exclude_bot_users?: boolean; + exclude_bot_users?: boolean; exclude_external_shared_channels?: boolean; - include?: any[]; + include?: any[]; } export interface Option { description?: Text; - text?: Text; - url?: string; - value?: string; + text?: Text; + url?: string; + value?: string; } export interface OptionGroup { - label?: Text; + label?: Text; options?: Option[]; } export interface SlackFile { - id?: string; + id?: string; url?: string; } @@ -531,11 +531,11 @@ export interface Workflow { export interface Trigger { customizable_input_parameters?: CustomizableInputParameter[]; - url?: string; + url?: string; } export interface CustomizableInputParameter { - name?: string; + name?: string; value?: string; } diff --git a/packages/web-api/src/types/response/FilesRemoteUpdateResponse.ts b/packages/web-api/src/types/response/FilesRemoteUpdateResponse.ts index ab4b3a120..c8012873a 100644 --- a/packages/web-api/src/types/response/FilesRemoteUpdateResponse.ts +++ b/packages/web-api/src/types/response/FilesRemoteUpdateResponse.ts @@ -8,271 +8,271 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type FilesRemoteUpdateResponse = WebAPICallResult & { - error?: string; - file?: File; - needed?: string; - ok?: boolean; + error?: string; + file?: File; + needed?: string; + ok?: boolean; provided?: string; }; export interface File { - access?: string; - alt_txt?: string; - app_id?: string; - app_name?: string; - bot_id?: string; - can_toggle_canvas_lock?: boolean; - canvas_template_mode?: string; - cc?: Cc[]; - channel_actions_count?: number; - channel_actions_ts?: string; - channels?: string[]; - comments_count?: number; - converted_pdf?: string; - created?: number; - deanimate?: string; - deanimate_gif?: string; - display_as_bot?: boolean; - dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; - duration_ms?: number; - edit_link?: string; - edit_timestamp?: number; - editable?: boolean; - editor?: string; - editors?: string[]; - external_id?: string; - external_type?: string; - external_url?: string; - favorites?: Favorite[]; - file_access?: string; - filetype?: string; - from?: Cc[]; - groups?: string[]; - has_more?: boolean; - has_more_shares?: boolean; - has_rich_preview?: boolean; - headers?: Headers; - hls?: string; - hls_embed?: string; - id?: string; - image_exif_rotation?: number; - ims?: string[]; - initial_comment?: InitialComment; - is_channel_space?: boolean; - is_external?: boolean; - is_public?: boolean; - is_starred?: boolean; - last_editor?: string; - last_read?: number; - lines?: number; - lines_more?: number; - linked_channel_id?: string; - list_limits?: ListLimits; - list_metadata?: ListMetadata; - media_display_type?: string; - media_progress?: MediaProgress; - mimetype?: string; - mode?: string; - mp4?: string; - mp4_low?: string; - name?: string; - non_owner_editable?: boolean; - num_stars?: number; - org_or_workspace_access?: string; - original_attachment_count?: number; - original_h?: string; - original_w?: string; - permalink?: string; - permalink_public?: string; - pinned_to?: string[]; - pjpeg?: string; - plain_text?: string; - pretty_type?: string; - preview?: string; - preview_highlight?: string; - preview_is_truncated?: boolean; - preview_plain_text?: string; + access?: string; + alt_txt?: string; + app_id?: string; + app_name?: string; + bot_id?: string; + can_toggle_canvas_lock?: boolean; + canvas_template_mode?: string; + cc?: Cc[]; + channel_actions_count?: number; + channel_actions_ts?: string; + channels?: string[]; + comments_count?: number; + converted_pdf?: string; + created?: number; + deanimate?: string; + deanimate_gif?: string; + display_as_bot?: boolean; + dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; + duration_ms?: number; + edit_link?: string; + edit_timestamp?: number; + editable?: boolean; + editor?: string; + editors?: string[]; + external_id?: string; + external_type?: string; + external_url?: string; + favorites?: Favorite[]; + file_access?: string; + filetype?: string; + from?: Cc[]; + groups?: string[]; + has_more?: boolean; + has_more_shares?: boolean; + has_rich_preview?: boolean; + headers?: Headers; + hls?: string; + hls_embed?: string; + id?: string; + image_exif_rotation?: number; + ims?: string[]; + initial_comment?: InitialComment; + is_channel_space?: boolean; + is_external?: boolean; + is_public?: boolean; + is_starred?: boolean; + last_editor?: string; + last_read?: number; + lines?: number; + lines_more?: number; + linked_channel_id?: string; + list_limits?: ListLimits; + list_metadata?: ListMetadata; + media_display_type?: string; + media_progress?: MediaProgress; + mimetype?: string; + mode?: string; + mp4?: string; + mp4_low?: string; + name?: string; + non_owner_editable?: boolean; + num_stars?: number; + org_or_workspace_access?: string; + original_attachment_count?: number; + original_h?: string; + original_w?: string; + permalink?: string; + permalink_public?: string; + pinned_to?: string[]; + pjpeg?: string; + plain_text?: string; + pretty_type?: string; + preview?: string; + preview_highlight?: string; + preview_is_truncated?: boolean; + preview_plain_text?: string; private_channels_with_file_access_count?: number; - private_file_with_access_count?: number; - public_url_shared?: boolean; - quip_thread_id?: string; - reactions?: Reaction[]; - saved?: Saved; - sent_to_self?: boolean; - shares?: Shares; - show_badge?: boolean; - simplified_html?: string; - size?: number; - source_team?: string; - subject?: string; - subtype?: string; - team_pref_version_history_enabled?: boolean; - teams_shared_with?: any[]; - template_conversion_ts?: number; - template_description?: string; - template_icon?: string; - template_name?: string; - template_title?: string; - thumb_1024?: string; - thumb_1024_gif?: string; - thumb_1024_h?: string; - thumb_1024_w?: string; - thumb_160?: string; - thumb_160_gif?: string; - thumb_160_h?: string; - thumb_160_w?: string; - thumb_360?: string; - thumb_360_gif?: string; - thumb_360_h?: string; - thumb_360_w?: string; - thumb_480?: string; - thumb_480_gif?: string; - thumb_480_h?: string; - thumb_480_w?: string; - thumb_64?: string; - thumb_64_gif?: string; - thumb_64_h?: string; - thumb_64_w?: string; - thumb_720?: string; - thumb_720_gif?: string; - thumb_720_h?: string; - thumb_720_w?: string; - thumb_80?: string; - thumb_800?: string; - thumb_800_gif?: string; - thumb_800_h?: string; - thumb_800_w?: string; - thumb_80_gif?: string; - thumb_80_h?: string; - thumb_80_w?: string; - thumb_960?: string; - thumb_960_gif?: string; - thumb_960_h?: string; - thumb_960_w?: string; - thumb_gif?: string; - thumb_pdf?: string; - thumb_pdf_h?: string; - thumb_pdf_w?: string; - thumb_tiny?: string; - thumb_video?: string; - thumb_video_h?: number; - thumb_video_w?: number; - timestamp?: number; - title?: string; - title_blocks?: TitleBlock[]; - to?: Cc[]; - transcription?: Transcription; - update_notification?: number; - updated?: number; - url_private?: string; - url_private_download?: string; - url_static_preview?: string; - user?: string; - user_team?: string; - username?: string; - vtt?: string; + private_file_with_access_count?: number; + public_url_shared?: boolean; + quip_thread_id?: string; + reactions?: Reaction[]; + saved?: Saved; + sent_to_self?: boolean; + shares?: Shares; + show_badge?: boolean; + simplified_html?: string; + size?: number; + source_team?: string; + subject?: string; + subtype?: string; + team_pref_version_history_enabled?: boolean; + teams_shared_with?: any[]; + template_conversion_ts?: number; + template_description?: string; + template_icon?: string; + template_name?: string; + template_title?: string; + thumb_1024?: string; + thumb_1024_gif?: string; + thumb_1024_h?: string; + thumb_1024_w?: string; + thumb_160?: string; + thumb_160_gif?: string; + thumb_160_h?: string; + thumb_160_w?: string; + thumb_360?: string; + thumb_360_gif?: string; + thumb_360_h?: string; + thumb_360_w?: string; + thumb_480?: string; + thumb_480_gif?: string; + thumb_480_h?: string; + thumb_480_w?: string; + thumb_64?: string; + thumb_64_gif?: string; + thumb_64_h?: string; + thumb_64_w?: string; + thumb_720?: string; + thumb_720_gif?: string; + thumb_720_h?: string; + thumb_720_w?: string; + thumb_80?: string; + thumb_800?: string; + thumb_800_gif?: string; + thumb_800_h?: string; + thumb_800_w?: string; + thumb_80_gif?: string; + thumb_80_h?: string; + thumb_80_w?: string; + thumb_960?: string; + thumb_960_gif?: string; + thumb_960_h?: string; + thumb_960_w?: string; + thumb_gif?: string; + thumb_pdf?: string; + thumb_pdf_h?: string; + thumb_pdf_w?: string; + thumb_tiny?: string; + thumb_video?: string; + thumb_video_h?: number; + thumb_video_w?: number; + timestamp?: number; + title?: string; + title_blocks?: TitleBlock[]; + to?: Cc[]; + transcription?: Transcription; + update_notification?: number; + updated?: number; + url_private?: string; + url_private_download?: string; + url_static_preview?: string; + user?: string; + user_team?: string; + username?: string; + vtt?: string; } export interface Cc { - address?: string; - name?: string; + address?: string; + name?: string; original?: string; } export interface DmMpdmUsersWithFileAccess { - access?: string; + access?: string; user_id?: string; } export interface Favorite { - collection_id?: string; + collection_id?: string; collection_name?: string; - position?: string; + position?: string; } export interface Headers { - date?: string; + date?: string; in_reply_to?: string; - message_id?: string; - reply_to?: string; + message_id?: string; + reply_to?: string; } export interface InitialComment { - channel?: string; - comment?: string; - created?: number; - id?: string; - is_intro?: boolean; + channel?: string; + comment?: string; + created?: number; + id?: string; + is_intro?: boolean; timestamp?: number; - user?: string; + user?: string; } export interface ListLimits { - column_count?: number; - column_count_limit?: number; + column_count?: number; + column_count_limit?: number; over_column_maximum?: boolean; - over_row_maximum?: boolean; - over_view_maximum?: boolean; - row_count?: number; - row_count_limit?: number; - view_count?: number; - view_count_limit?: number; + over_row_maximum?: boolean; + over_view_maximum?: boolean; + row_count?: number; + row_count_limit?: number; + view_count?: number; + view_count_limit?: number; } export interface ListMetadata { creation_source?: CreationSource; - description?: string; - icon?: string; - icon_team_id?: string; - icon_url?: string; - integrations?: string[]; - is_trial?: boolean; - schema?: Schema[]; - views?: View[]; + description?: string; + icon?: string; + icon_team_id?: string; + icon_url?: string; + integrations?: string[]; + is_trial?: boolean; + schema?: Schema[]; + views?: View[]; } export interface CreationSource { - reference_id?: string; - type?: string; + reference_id?: string; + type?: string; workflow_function_id?: string; } export interface Schema { - id?: string; + id?: string; is_primary_column?: boolean; - key?: string; - name?: string; - options?: Options; - type?: string; + key?: string; + name?: string; + options?: Options; + type?: string; } export interface Options { - canvas_id?: string; + canvas_id?: string; canvas_placeholder_mapping?: CanvasPlaceholderMapping[]; - choices?: Choice[]; - currency?: string; - currency_format?: string; - date_format?: string; - default_value?: string; - default_value_typed?: DefaultValueTyped; - emoji?: string; - emoji_team_id?: string; - for_assignment?: boolean; - format?: string; - linked_to?: string[]; - mark_as_done_when_checked?: boolean; - max?: number; - notify_users?: boolean; - precision?: number; - rounding?: string; - show_member_name?: boolean; - time_format?: string; + choices?: Choice[]; + currency?: string; + currency_format?: string; + date_format?: string; + default_value?: string; + default_value_typed?: DefaultValueTyped; + emoji?: string; + emoji_team_id?: string; + for_assignment?: boolean; + format?: string; + linked_to?: string[]; + mark_as_done_when_checked?: boolean; + max?: number; + notify_users?: boolean; + precision?: number; + rounding?: string; + show_member_name?: boolean; + time_format?: string; } export interface CanvasPlaceholderMapping { - column?: string; + column?: string; variable?: string; } @@ -287,161 +287,161 @@ export interface DefaultValueTyped { } export interface View { - columns?: Column[]; - created_by?: string; - date_created?: number; - id?: string; + columns?: Column[]; + created_by?: string; + date_created?: number; + id?: string; is_all_items_view?: boolean; - is_locked?: boolean; - name?: string; - position?: string; + is_locked?: boolean; + name?: string; + position?: string; stick_column_left?: boolean; - type?: string; + type?: string; } export interface Column { - id?: string; - key?: string; + id?: string; + key?: string; position?: string; - visible?: boolean; - width?: number; + visible?: boolean; + width?: number; } export interface MediaProgress { - duration_ms?: number; + duration_ms?: number; max_offset_ms?: number; - offset_ms?: number; + offset_ms?: number; } export interface Reaction { count?: number; - name?: string; - url?: string; + name?: string; + url?: string; users?: string[]; } export interface Saved { date_completed?: number; - date_due?: number; - is_archived?: boolean; - state?: string; + date_due?: number; + is_archived?: boolean; + state?: string; } export interface Shares { private?: { [key: string]: Private[] }; - public?: { [key: string]: Private[] }; + public?: { [key: string]: Private[] }; } export interface Private { - access?: string; - channel_name?: string; - date_last_shared?: number; - latest_reply?: string; - reply_count?: number; - reply_users?: string[]; + access?: string; + channel_name?: string; + date_last_shared?: number; + latest_reply?: string; + reply_count?: number; + reply_users?: string[]; reply_users_count?: number; - share_user_id?: string; - source?: string; - team_id?: string; - thread_ts?: string; - ts?: string; + share_user_id?: string; + source?: string; + team_id?: string; + thread_ts?: string; + ts?: string; } export interface TitleBlock { - accessory?: Accessory; - alt_text?: string; - app_collaborators?: string[]; - app_id?: string; - author_name?: string; - block_id?: string; - bot_user_id?: string; - button_label?: string; - description?: Text | string; - developer_trace_id?: string; - elements?: Accessory[]; - fallback?: string; - fields?: Text[]; - function_trigger_id?: string; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - is_animated?: boolean; - is_workflow_app?: boolean; - owning_team_id?: string; - provider_icon_url?: string; - provider_name?: string; + accessory?: Accessory; + alt_text?: string; + app_collaborators?: string[]; + app_id?: string; + author_name?: string; + block_id?: string; + bot_user_id?: string; + button_label?: string; + description?: Text | string; + developer_trace_id?: string; + elements?: Accessory[]; + fallback?: string; + fields?: Text[]; + function_trigger_id?: string; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + is_animated?: boolean; + is_workflow_app?: boolean; + owning_team_id?: string; + provider_icon_url?: string; + provider_name?: string; sales_home_workflow_app_type?: number; - share_url?: string; - slack_file?: SlackFile; - text?: Text; - thumbnail_url?: string; - title?: Text | string; - title_url?: string; - trigger_subtype?: string; - trigger_type?: string; - type?: string; - url?: string; - video_url?: string; - workflow_id?: string; + share_url?: string; + slack_file?: SlackFile; + text?: Text; + thumbnail_url?: string; + title?: Text | string; + title_url?: string; + trigger_subtype?: string; + trigger_type?: string; + type?: string; + url?: string; + video_url?: string; + workflow_id?: string; } export interface Accessory { - accessibility_label?: string; - action_id?: string; - alt_text?: string; - border?: number; - confirm?: Confirm; + accessibility_label?: string; + action_id?: string; + alt_text?: string; + border?: number; + confirm?: Confirm; default_to_current_conversation?: boolean; - elements?: AccessoryElement[]; - fallback?: string; - filter?: Filter; - focus_on_load?: boolean; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - indent?: number; - initial_channel?: string; - initial_channels?: string[]; - initial_conversation?: string; - initial_conversations?: string[]; - initial_date?: string; - initial_date_time?: number; - initial_option?: Option; - initial_options?: Option[]; - initial_time?: string; - initial_user?: string; - initial_users?: string[]; - max_selected_items?: number; - min_query_length?: number; - offset?: number; - option_groups?: OptionGroup[]; - options?: Option[]; - placeholder?: Text; - response_url_enabled?: boolean; - slack_file?: SlackFile; - style?: string; - text?: Text; - timezone?: string; - type?: string; - url?: string; - value?: string; - workflow?: Workflow; + elements?: AccessoryElement[]; + fallback?: string; + filter?: Filter; + focus_on_load?: boolean; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + indent?: number; + initial_channel?: string; + initial_channels?: string[]; + initial_conversation?: string; + initial_conversations?: string[]; + initial_date?: string; + initial_date_time?: number; + initial_option?: Option; + initial_options?: Option[]; + initial_time?: string; + initial_user?: string; + initial_users?: string[]; + max_selected_items?: number; + min_query_length?: number; + offset?: number; + option_groups?: OptionGroup[]; + options?: Option[]; + placeholder?: Text; + response_url_enabled?: boolean; + slack_file?: SlackFile; + style?: string; + text?: Text; + timezone?: string; + type?: string; + url?: string; + value?: string; + workflow?: Workflow; } export interface Confirm { confirm?: Text; - deny?: Text; - style?: string; - text?: Text; - title?: Text; + deny?: Text; + style?: string; + text?: Text; + title?: Text; } export interface Text { - emoji?: boolean; - text?: string; - type?: TextType; + emoji?: boolean; + text?: string; + type?: TextType; verbatim?: boolean; } @@ -451,42 +451,42 @@ export enum TextType { } export interface AccessoryElement { - border?: number; + border?: number; elements?: PurpleElement[]; - indent?: number; - offset?: number; - style?: string; - type?: string; + indent?: number; + offset?: number; + style?: string; + type?: string; } export interface PurpleElement { - channel_id?: string; - fallback?: string; - format?: string; - name?: string; - range?: string; - skin_tone?: number; - style?: Style; - team_id?: string; - text?: string; - timestamp?: string; - type?: ElementType; - unicode?: string; - unsafe?: boolean; - url?: string; - user_id?: string; + channel_id?: string; + fallback?: string; + format?: string; + name?: string; + range?: string; + skin_tone?: number; + style?: Style; + team_id?: string; + text?: string; + timestamp?: string; + type?: ElementType; + unicode?: string; + unsafe?: boolean; + url?: string; + user_id?: string; usergroup_id?: string; - value?: string; + value?: string; } export interface Style { - bold?: boolean; + bold?: boolean; client_highlight?: boolean; - code?: boolean; - highlight?: boolean; - italic?: boolean; - strike?: boolean; - unlink?: boolean; + code?: boolean; + highlight?: boolean; + italic?: boolean; + strike?: boolean; + unlink?: boolean; } export enum ElementType { @@ -503,25 +503,25 @@ export enum ElementType { } export interface Filter { - exclude_bot_users?: boolean; + exclude_bot_users?: boolean; exclude_external_shared_channels?: boolean; - include?: any[]; + include?: any[]; } export interface Option { description?: Text; - text?: Text; - url?: string; - value?: string; + text?: Text; + url?: string; + value?: string; } export interface OptionGroup { - label?: Text; + label?: Text; options?: Option[]; } export interface SlackFile { - id?: string; + id?: string; url?: string; } @@ -531,11 +531,11 @@ export interface Workflow { export interface Trigger { customizable_input_parameters?: CustomizableInputParameter[]; - url?: string; + url?: string; } export interface CustomizableInputParameter { - name?: string; + name?: string; value?: string; } diff --git a/packages/web-api/src/types/response/FilesRevokePublicURLResponse.ts b/packages/web-api/src/types/response/FilesRevokePublicURLResponse.ts index 7e515a63e..e9215cc89 100644 --- a/packages/web-api/src/types/response/FilesRevokePublicURLResponse.ts +++ b/packages/web-api/src/types/response/FilesRevokePublicURLResponse.ts @@ -8,271 +8,271 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type FilesRevokePublicURLResponse = WebAPICallResult & { - error?: string; - file?: File; - needed?: string; - ok?: boolean; + error?: string; + file?: File; + needed?: string; + ok?: boolean; provided?: string; }; export interface File { - access?: string; - alt_txt?: string; - app_id?: string; - app_name?: string; - bot_id?: string; - can_toggle_canvas_lock?: boolean; - canvas_template_mode?: string; - cc?: Cc[]; - channel_actions_count?: number; - channel_actions_ts?: string; - channels?: string[]; - comments_count?: number; - converted_pdf?: string; - created?: number; - deanimate?: string; - deanimate_gif?: string; - display_as_bot?: boolean; - dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; - duration_ms?: number; - edit_link?: string; - edit_timestamp?: number; - editable?: boolean; - editor?: string; - editors?: string[]; - external_id?: string; - external_type?: string; - external_url?: string; - favorites?: Favorite[]; - file_access?: string; - filetype?: string; - from?: Cc[]; - groups?: string[]; - has_more?: boolean; - has_more_shares?: boolean; - has_rich_preview?: boolean; - headers?: Headers; - hls?: string; - hls_embed?: string; - id?: string; - image_exif_rotation?: number; - ims?: string[]; - initial_comment?: InitialComment; - is_channel_space?: boolean; - is_external?: boolean; - is_public?: boolean; - is_starred?: boolean; - last_editor?: string; - last_read?: number; - lines?: number; - lines_more?: number; - linked_channel_id?: string; - list_limits?: ListLimits; - list_metadata?: ListMetadata; - media_display_type?: string; - media_progress?: MediaProgress; - mimetype?: string; - mode?: string; - mp4?: string; - mp4_low?: string; - name?: string; - non_owner_editable?: boolean; - num_stars?: number; - org_or_workspace_access?: string; - original_attachment_count?: number; - original_h?: string; - original_w?: string; - permalink?: string; - permalink_public?: string; - pinned_to?: string[]; - pjpeg?: string; - plain_text?: string; - pretty_type?: string; - preview?: string; - preview_highlight?: string; - preview_is_truncated?: boolean; - preview_plain_text?: string; + access?: string; + alt_txt?: string; + app_id?: string; + app_name?: string; + bot_id?: string; + can_toggle_canvas_lock?: boolean; + canvas_template_mode?: string; + cc?: Cc[]; + channel_actions_count?: number; + channel_actions_ts?: string; + channels?: string[]; + comments_count?: number; + converted_pdf?: string; + created?: number; + deanimate?: string; + deanimate_gif?: string; + display_as_bot?: boolean; + dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; + duration_ms?: number; + edit_link?: string; + edit_timestamp?: number; + editable?: boolean; + editor?: string; + editors?: string[]; + external_id?: string; + external_type?: string; + external_url?: string; + favorites?: Favorite[]; + file_access?: string; + filetype?: string; + from?: Cc[]; + groups?: string[]; + has_more?: boolean; + has_more_shares?: boolean; + has_rich_preview?: boolean; + headers?: Headers; + hls?: string; + hls_embed?: string; + id?: string; + image_exif_rotation?: number; + ims?: string[]; + initial_comment?: InitialComment; + is_channel_space?: boolean; + is_external?: boolean; + is_public?: boolean; + is_starred?: boolean; + last_editor?: string; + last_read?: number; + lines?: number; + lines_more?: number; + linked_channel_id?: string; + list_limits?: ListLimits; + list_metadata?: ListMetadata; + media_display_type?: string; + media_progress?: MediaProgress; + mimetype?: string; + mode?: string; + mp4?: string; + mp4_low?: string; + name?: string; + non_owner_editable?: boolean; + num_stars?: number; + org_or_workspace_access?: string; + original_attachment_count?: number; + original_h?: string; + original_w?: string; + permalink?: string; + permalink_public?: string; + pinned_to?: string[]; + pjpeg?: string; + plain_text?: string; + pretty_type?: string; + preview?: string; + preview_highlight?: string; + preview_is_truncated?: boolean; + preview_plain_text?: string; private_channels_with_file_access_count?: number; - private_file_with_access_count?: number; - public_url_shared?: boolean; - quip_thread_id?: string; - reactions?: Reaction[]; - saved?: Saved; - sent_to_self?: boolean; - shares?: Shares; - show_badge?: boolean; - simplified_html?: string; - size?: number; - source_team?: string; - subject?: string; - subtype?: string; - team_pref_version_history_enabled?: boolean; - teams_shared_with?: any[]; - template_conversion_ts?: number; - template_description?: string; - template_icon?: string; - template_name?: string; - template_title?: string; - thumb_1024?: string; - thumb_1024_gif?: string; - thumb_1024_h?: string; - thumb_1024_w?: string; - thumb_160?: string; - thumb_160_gif?: string; - thumb_160_h?: string; - thumb_160_w?: string; - thumb_360?: string; - thumb_360_gif?: string; - thumb_360_h?: string; - thumb_360_w?: string; - thumb_480?: string; - thumb_480_gif?: string; - thumb_480_h?: string; - thumb_480_w?: string; - thumb_64?: string; - thumb_64_gif?: string; - thumb_64_h?: string; - thumb_64_w?: string; - thumb_720?: string; - thumb_720_gif?: string; - thumb_720_h?: string; - thumb_720_w?: string; - thumb_80?: string; - thumb_800?: string; - thumb_800_gif?: string; - thumb_800_h?: string; - thumb_800_w?: string; - thumb_80_gif?: string; - thumb_80_h?: string; - thumb_80_w?: string; - thumb_960?: string; - thumb_960_gif?: string; - thumb_960_h?: string; - thumb_960_w?: string; - thumb_gif?: string; - thumb_pdf?: string; - thumb_pdf_h?: string; - thumb_pdf_w?: string; - thumb_tiny?: string; - thumb_video?: string; - thumb_video_h?: number; - thumb_video_w?: number; - timestamp?: number; - title?: string; - title_blocks?: TitleBlock[]; - to?: Cc[]; - transcription?: Transcription; - update_notification?: number; - updated?: number; - url_private?: string; - url_private_download?: string; - url_static_preview?: string; - user?: string; - user_team?: string; - username?: string; - vtt?: string; + private_file_with_access_count?: number; + public_url_shared?: boolean; + quip_thread_id?: string; + reactions?: Reaction[]; + saved?: Saved; + sent_to_self?: boolean; + shares?: Shares; + show_badge?: boolean; + simplified_html?: string; + size?: number; + source_team?: string; + subject?: string; + subtype?: string; + team_pref_version_history_enabled?: boolean; + teams_shared_with?: any[]; + template_conversion_ts?: number; + template_description?: string; + template_icon?: string; + template_name?: string; + template_title?: string; + thumb_1024?: string; + thumb_1024_gif?: string; + thumb_1024_h?: string; + thumb_1024_w?: string; + thumb_160?: string; + thumb_160_gif?: string; + thumb_160_h?: string; + thumb_160_w?: string; + thumb_360?: string; + thumb_360_gif?: string; + thumb_360_h?: string; + thumb_360_w?: string; + thumb_480?: string; + thumb_480_gif?: string; + thumb_480_h?: string; + thumb_480_w?: string; + thumb_64?: string; + thumb_64_gif?: string; + thumb_64_h?: string; + thumb_64_w?: string; + thumb_720?: string; + thumb_720_gif?: string; + thumb_720_h?: string; + thumb_720_w?: string; + thumb_80?: string; + thumb_800?: string; + thumb_800_gif?: string; + thumb_800_h?: string; + thumb_800_w?: string; + thumb_80_gif?: string; + thumb_80_h?: string; + thumb_80_w?: string; + thumb_960?: string; + thumb_960_gif?: string; + thumb_960_h?: string; + thumb_960_w?: string; + thumb_gif?: string; + thumb_pdf?: string; + thumb_pdf_h?: string; + thumb_pdf_w?: string; + thumb_tiny?: string; + thumb_video?: string; + thumb_video_h?: number; + thumb_video_w?: number; + timestamp?: number; + title?: string; + title_blocks?: TitleBlock[]; + to?: Cc[]; + transcription?: Transcription; + update_notification?: number; + updated?: number; + url_private?: string; + url_private_download?: string; + url_static_preview?: string; + user?: string; + user_team?: string; + username?: string; + vtt?: string; } export interface Cc { - address?: string; - name?: string; + address?: string; + name?: string; original?: string; } export interface DmMpdmUsersWithFileAccess { - access?: string; + access?: string; user_id?: string; } export interface Favorite { - collection_id?: string; + collection_id?: string; collection_name?: string; - position?: string; + position?: string; } export interface Headers { - date?: string; + date?: string; in_reply_to?: string; - message_id?: string; - reply_to?: string; + message_id?: string; + reply_to?: string; } export interface InitialComment { - channel?: string; - comment?: string; - created?: number; - id?: string; - is_intro?: boolean; + channel?: string; + comment?: string; + created?: number; + id?: string; + is_intro?: boolean; timestamp?: number; - user?: string; + user?: string; } export interface ListLimits { - column_count?: number; - column_count_limit?: number; + column_count?: number; + column_count_limit?: number; over_column_maximum?: boolean; - over_row_maximum?: boolean; - over_view_maximum?: boolean; - row_count?: number; - row_count_limit?: number; - view_count?: number; - view_count_limit?: number; + over_row_maximum?: boolean; + over_view_maximum?: boolean; + row_count?: number; + row_count_limit?: number; + view_count?: number; + view_count_limit?: number; } export interface ListMetadata { creation_source?: CreationSource; - description?: string; - icon?: string; - icon_team_id?: string; - icon_url?: string; - integrations?: string[]; - is_trial?: boolean; - schema?: Schema[]; - views?: View[]; + description?: string; + icon?: string; + icon_team_id?: string; + icon_url?: string; + integrations?: string[]; + is_trial?: boolean; + schema?: Schema[]; + views?: View[]; } export interface CreationSource { - reference_id?: string; - type?: string; + reference_id?: string; + type?: string; workflow_function_id?: string; } export interface Schema { - id?: string; + id?: string; is_primary_column?: boolean; - key?: string; - name?: string; - options?: Options; - type?: string; + key?: string; + name?: string; + options?: Options; + type?: string; } export interface Options { - canvas_id?: string; + canvas_id?: string; canvas_placeholder_mapping?: CanvasPlaceholderMapping[]; - choices?: Choice[]; - currency?: string; - currency_format?: string; - date_format?: string; - default_value?: string; - default_value_typed?: DefaultValueTyped; - emoji?: string; - emoji_team_id?: string; - for_assignment?: boolean; - format?: string; - linked_to?: string[]; - mark_as_done_when_checked?: boolean; - max?: number; - notify_users?: boolean; - precision?: number; - rounding?: string; - show_member_name?: boolean; - time_format?: string; + choices?: Choice[]; + currency?: string; + currency_format?: string; + date_format?: string; + default_value?: string; + default_value_typed?: DefaultValueTyped; + emoji?: string; + emoji_team_id?: string; + for_assignment?: boolean; + format?: string; + linked_to?: string[]; + mark_as_done_when_checked?: boolean; + max?: number; + notify_users?: boolean; + precision?: number; + rounding?: string; + show_member_name?: boolean; + time_format?: string; } export interface CanvasPlaceholderMapping { - column?: string; + column?: string; variable?: string; } @@ -287,161 +287,161 @@ export interface DefaultValueTyped { } export interface View { - columns?: Column[]; - created_by?: string; - date_created?: number; - id?: string; + columns?: Column[]; + created_by?: string; + date_created?: number; + id?: string; is_all_items_view?: boolean; - is_locked?: boolean; - name?: string; - position?: string; + is_locked?: boolean; + name?: string; + position?: string; stick_column_left?: boolean; - type?: string; + type?: string; } export interface Column { - id?: string; - key?: string; + id?: string; + key?: string; position?: string; - visible?: boolean; - width?: number; + visible?: boolean; + width?: number; } export interface MediaProgress { - duration_ms?: number; + duration_ms?: number; max_offset_ms?: number; - offset_ms?: number; + offset_ms?: number; } export interface Reaction { count?: number; - name?: string; - url?: string; + name?: string; + url?: string; users?: string[]; } export interface Saved { date_completed?: number; - date_due?: number; - is_archived?: boolean; - state?: string; + date_due?: number; + is_archived?: boolean; + state?: string; } export interface Shares { private?: { [key: string]: Private[] }; - public?: { [key: string]: Private[] }; + public?: { [key: string]: Private[] }; } export interface Private { - access?: string; - channel_name?: string; - date_last_shared?: number; - latest_reply?: string; - reply_count?: number; - reply_users?: string[]; + access?: string; + channel_name?: string; + date_last_shared?: number; + latest_reply?: string; + reply_count?: number; + reply_users?: string[]; reply_users_count?: number; - share_user_id?: string; - source?: string; - team_id?: string; - thread_ts?: string; - ts?: string; + share_user_id?: string; + source?: string; + team_id?: string; + thread_ts?: string; + ts?: string; } export interface TitleBlock { - accessory?: Accessory; - alt_text?: string; - app_collaborators?: string[]; - app_id?: string; - author_name?: string; - block_id?: string; - bot_user_id?: string; - button_label?: string; - description?: Text | string; - developer_trace_id?: string; - elements?: Accessory[]; - fallback?: string; - fields?: Text[]; - function_trigger_id?: string; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - is_animated?: boolean; - is_workflow_app?: boolean; - owning_team_id?: string; - provider_icon_url?: string; - provider_name?: string; + accessory?: Accessory; + alt_text?: string; + app_collaborators?: string[]; + app_id?: string; + author_name?: string; + block_id?: string; + bot_user_id?: string; + button_label?: string; + description?: Text | string; + developer_trace_id?: string; + elements?: Accessory[]; + fallback?: string; + fields?: Text[]; + function_trigger_id?: string; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + is_animated?: boolean; + is_workflow_app?: boolean; + owning_team_id?: string; + provider_icon_url?: string; + provider_name?: string; sales_home_workflow_app_type?: number; - share_url?: string; - slack_file?: SlackFile; - text?: Text; - thumbnail_url?: string; - title?: Text | string; - title_url?: string; - trigger_subtype?: string; - trigger_type?: string; - type?: string; - url?: string; - video_url?: string; - workflow_id?: string; + share_url?: string; + slack_file?: SlackFile; + text?: Text; + thumbnail_url?: string; + title?: Text | string; + title_url?: string; + trigger_subtype?: string; + trigger_type?: string; + type?: string; + url?: string; + video_url?: string; + workflow_id?: string; } export interface Accessory { - accessibility_label?: string; - action_id?: string; - alt_text?: string; - border?: number; - confirm?: Confirm; + accessibility_label?: string; + action_id?: string; + alt_text?: string; + border?: number; + confirm?: Confirm; default_to_current_conversation?: boolean; - elements?: AccessoryElement[]; - fallback?: string; - filter?: Filter; - focus_on_load?: boolean; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - indent?: number; - initial_channel?: string; - initial_channels?: string[]; - initial_conversation?: string; - initial_conversations?: string[]; - initial_date?: string; - initial_date_time?: number; - initial_option?: Option; - initial_options?: Option[]; - initial_time?: string; - initial_user?: string; - initial_users?: string[]; - max_selected_items?: number; - min_query_length?: number; - offset?: number; - option_groups?: OptionGroup[]; - options?: Option[]; - placeholder?: Text; - response_url_enabled?: boolean; - slack_file?: SlackFile; - style?: string; - text?: Text; - timezone?: string; - type?: string; - url?: string; - value?: string; - workflow?: Workflow; + elements?: AccessoryElement[]; + fallback?: string; + filter?: Filter; + focus_on_load?: boolean; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + indent?: number; + initial_channel?: string; + initial_channels?: string[]; + initial_conversation?: string; + initial_conversations?: string[]; + initial_date?: string; + initial_date_time?: number; + initial_option?: Option; + initial_options?: Option[]; + initial_time?: string; + initial_user?: string; + initial_users?: string[]; + max_selected_items?: number; + min_query_length?: number; + offset?: number; + option_groups?: OptionGroup[]; + options?: Option[]; + placeholder?: Text; + response_url_enabled?: boolean; + slack_file?: SlackFile; + style?: string; + text?: Text; + timezone?: string; + type?: string; + url?: string; + value?: string; + workflow?: Workflow; } export interface Confirm { confirm?: Text; - deny?: Text; - style?: string; - text?: Text; - title?: Text; + deny?: Text; + style?: string; + text?: Text; + title?: Text; } export interface Text { - emoji?: boolean; - text?: string; - type?: TextType; + emoji?: boolean; + text?: string; + type?: TextType; verbatim?: boolean; } @@ -451,42 +451,42 @@ export enum TextType { } export interface AccessoryElement { - border?: number; + border?: number; elements?: PurpleElement[]; - indent?: number; - offset?: number; - style?: string; - type?: string; + indent?: number; + offset?: number; + style?: string; + type?: string; } export interface PurpleElement { - channel_id?: string; - fallback?: string; - format?: string; - name?: string; - range?: string; - skin_tone?: number; - style?: Style; - team_id?: string; - text?: string; - timestamp?: string; - type?: ElementType; - unicode?: string; - unsafe?: boolean; - url?: string; - user_id?: string; + channel_id?: string; + fallback?: string; + format?: string; + name?: string; + range?: string; + skin_tone?: number; + style?: Style; + team_id?: string; + text?: string; + timestamp?: string; + type?: ElementType; + unicode?: string; + unsafe?: boolean; + url?: string; + user_id?: string; usergroup_id?: string; - value?: string; + value?: string; } export interface Style { - bold?: boolean; + bold?: boolean; client_highlight?: boolean; - code?: boolean; - highlight?: boolean; - italic?: boolean; - strike?: boolean; - unlink?: boolean; + code?: boolean; + highlight?: boolean; + italic?: boolean; + strike?: boolean; + unlink?: boolean; } export enum ElementType { @@ -503,25 +503,25 @@ export enum ElementType { } export interface Filter { - exclude_bot_users?: boolean; + exclude_bot_users?: boolean; exclude_external_shared_channels?: boolean; - include?: any[]; + include?: any[]; } export interface Option { description?: Text; - text?: Text; - url?: string; - value?: string; + text?: Text; + url?: string; + value?: string; } export interface OptionGroup { - label?: Text; + label?: Text; options?: Option[]; } export interface SlackFile { - id?: string; + id?: string; url?: string; } @@ -531,11 +531,11 @@ export interface Workflow { export interface Trigger { customizable_input_parameters?: CustomizableInputParameter[]; - url?: string; + url?: string; } export interface CustomizableInputParameter { - name?: string; + name?: string; value?: string; } diff --git a/packages/web-api/src/types/response/FilesSharedPublicURLResponse.ts b/packages/web-api/src/types/response/FilesSharedPublicURLResponse.ts index 17da3ae0d..8310c4b2f 100644 --- a/packages/web-api/src/types/response/FilesSharedPublicURLResponse.ts +++ b/packages/web-api/src/types/response/FilesSharedPublicURLResponse.ts @@ -8,271 +8,271 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type FilesSharedPublicURLResponse = WebAPICallResult & { - error?: string; - file?: File; - needed?: string; - ok?: boolean; + error?: string; + file?: File; + needed?: string; + ok?: boolean; provided?: string; }; export interface File { - access?: string; - alt_txt?: string; - app_id?: string; - app_name?: string; - bot_id?: string; - can_toggle_canvas_lock?: boolean; - canvas_template_mode?: string; - cc?: Cc[]; - channel_actions_count?: number; - channel_actions_ts?: string; - channels?: string[]; - comments_count?: number; - converted_pdf?: string; - created?: number; - deanimate?: string; - deanimate_gif?: string; - display_as_bot?: boolean; - dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; - duration_ms?: number; - edit_link?: string; - edit_timestamp?: number; - editable?: boolean; - editor?: string; - editors?: string[]; - external_id?: string; - external_type?: string; - external_url?: string; - favorites?: Favorite[]; - file_access?: string; - filetype?: string; - from?: Cc[]; - groups?: string[]; - has_more?: boolean; - has_more_shares?: boolean; - has_rich_preview?: boolean; - headers?: Headers; - hls?: string; - hls_embed?: string; - id?: string; - image_exif_rotation?: number; - ims?: string[]; - initial_comment?: InitialComment; - is_channel_space?: boolean; - is_external?: boolean; - is_public?: boolean; - is_starred?: boolean; - last_editor?: string; - last_read?: number; - lines?: number; - lines_more?: number; - linked_channel_id?: string; - list_limits?: ListLimits; - list_metadata?: ListMetadata; - media_display_type?: string; - media_progress?: MediaProgress; - mimetype?: string; - mode?: string; - mp4?: string; - mp4_low?: string; - name?: string; - non_owner_editable?: boolean; - num_stars?: number; - org_or_workspace_access?: string; - original_attachment_count?: number; - original_h?: string; - original_w?: string; - permalink?: string; - permalink_public?: string; - pinned_to?: string[]; - pjpeg?: string; - plain_text?: string; - pretty_type?: string; - preview?: string; - preview_highlight?: string; - preview_is_truncated?: boolean; - preview_plain_text?: string; + access?: string; + alt_txt?: string; + app_id?: string; + app_name?: string; + bot_id?: string; + can_toggle_canvas_lock?: boolean; + canvas_template_mode?: string; + cc?: Cc[]; + channel_actions_count?: number; + channel_actions_ts?: string; + channels?: string[]; + comments_count?: number; + converted_pdf?: string; + created?: number; + deanimate?: string; + deanimate_gif?: string; + display_as_bot?: boolean; + dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; + duration_ms?: number; + edit_link?: string; + edit_timestamp?: number; + editable?: boolean; + editor?: string; + editors?: string[]; + external_id?: string; + external_type?: string; + external_url?: string; + favorites?: Favorite[]; + file_access?: string; + filetype?: string; + from?: Cc[]; + groups?: string[]; + has_more?: boolean; + has_more_shares?: boolean; + has_rich_preview?: boolean; + headers?: Headers; + hls?: string; + hls_embed?: string; + id?: string; + image_exif_rotation?: number; + ims?: string[]; + initial_comment?: InitialComment; + is_channel_space?: boolean; + is_external?: boolean; + is_public?: boolean; + is_starred?: boolean; + last_editor?: string; + last_read?: number; + lines?: number; + lines_more?: number; + linked_channel_id?: string; + list_limits?: ListLimits; + list_metadata?: ListMetadata; + media_display_type?: string; + media_progress?: MediaProgress; + mimetype?: string; + mode?: string; + mp4?: string; + mp4_low?: string; + name?: string; + non_owner_editable?: boolean; + num_stars?: number; + org_or_workspace_access?: string; + original_attachment_count?: number; + original_h?: string; + original_w?: string; + permalink?: string; + permalink_public?: string; + pinned_to?: string[]; + pjpeg?: string; + plain_text?: string; + pretty_type?: string; + preview?: string; + preview_highlight?: string; + preview_is_truncated?: boolean; + preview_plain_text?: string; private_channels_with_file_access_count?: number; - private_file_with_access_count?: number; - public_url_shared?: boolean; - quip_thread_id?: string; - reactions?: Reaction[]; - saved?: Saved; - sent_to_self?: boolean; - shares?: Shares; - show_badge?: boolean; - simplified_html?: string; - size?: number; - source_team?: string; - subject?: string; - subtype?: string; - team_pref_version_history_enabled?: boolean; - teams_shared_with?: any[]; - template_conversion_ts?: number; - template_description?: string; - template_icon?: string; - template_name?: string; - template_title?: string; - thumb_1024?: string; - thumb_1024_gif?: string; - thumb_1024_h?: string; - thumb_1024_w?: string; - thumb_160?: string; - thumb_160_gif?: string; - thumb_160_h?: string; - thumb_160_w?: string; - thumb_360?: string; - thumb_360_gif?: string; - thumb_360_h?: string; - thumb_360_w?: string; - thumb_480?: string; - thumb_480_gif?: string; - thumb_480_h?: string; - thumb_480_w?: string; - thumb_64?: string; - thumb_64_gif?: string; - thumb_64_h?: string; - thumb_64_w?: string; - thumb_720?: string; - thumb_720_gif?: string; - thumb_720_h?: string; - thumb_720_w?: string; - thumb_80?: string; - thumb_800?: string; - thumb_800_gif?: string; - thumb_800_h?: string; - thumb_800_w?: string; - thumb_80_gif?: string; - thumb_80_h?: string; - thumb_80_w?: string; - thumb_960?: string; - thumb_960_gif?: string; - thumb_960_h?: string; - thumb_960_w?: string; - thumb_gif?: string; - thumb_pdf?: string; - thumb_pdf_h?: string; - thumb_pdf_w?: string; - thumb_tiny?: string; - thumb_video?: string; - thumb_video_h?: number; - thumb_video_w?: number; - timestamp?: number; - title?: string; - title_blocks?: TitleBlock[]; - to?: Cc[]; - transcription?: Transcription; - update_notification?: number; - updated?: number; - url_private?: string; - url_private_download?: string; - url_static_preview?: string; - user?: string; - user_team?: string; - username?: string; - vtt?: string; + private_file_with_access_count?: number; + public_url_shared?: boolean; + quip_thread_id?: string; + reactions?: Reaction[]; + saved?: Saved; + sent_to_self?: boolean; + shares?: Shares; + show_badge?: boolean; + simplified_html?: string; + size?: number; + source_team?: string; + subject?: string; + subtype?: string; + team_pref_version_history_enabled?: boolean; + teams_shared_with?: any[]; + template_conversion_ts?: number; + template_description?: string; + template_icon?: string; + template_name?: string; + template_title?: string; + thumb_1024?: string; + thumb_1024_gif?: string; + thumb_1024_h?: string; + thumb_1024_w?: string; + thumb_160?: string; + thumb_160_gif?: string; + thumb_160_h?: string; + thumb_160_w?: string; + thumb_360?: string; + thumb_360_gif?: string; + thumb_360_h?: string; + thumb_360_w?: string; + thumb_480?: string; + thumb_480_gif?: string; + thumb_480_h?: string; + thumb_480_w?: string; + thumb_64?: string; + thumb_64_gif?: string; + thumb_64_h?: string; + thumb_64_w?: string; + thumb_720?: string; + thumb_720_gif?: string; + thumb_720_h?: string; + thumb_720_w?: string; + thumb_80?: string; + thumb_800?: string; + thumb_800_gif?: string; + thumb_800_h?: string; + thumb_800_w?: string; + thumb_80_gif?: string; + thumb_80_h?: string; + thumb_80_w?: string; + thumb_960?: string; + thumb_960_gif?: string; + thumb_960_h?: string; + thumb_960_w?: string; + thumb_gif?: string; + thumb_pdf?: string; + thumb_pdf_h?: string; + thumb_pdf_w?: string; + thumb_tiny?: string; + thumb_video?: string; + thumb_video_h?: number; + thumb_video_w?: number; + timestamp?: number; + title?: string; + title_blocks?: TitleBlock[]; + to?: Cc[]; + transcription?: Transcription; + update_notification?: number; + updated?: number; + url_private?: string; + url_private_download?: string; + url_static_preview?: string; + user?: string; + user_team?: string; + username?: string; + vtt?: string; } export interface Cc { - address?: string; - name?: string; + address?: string; + name?: string; original?: string; } export interface DmMpdmUsersWithFileAccess { - access?: string; + access?: string; user_id?: string; } export interface Favorite { - collection_id?: string; + collection_id?: string; collection_name?: string; - position?: string; + position?: string; } export interface Headers { - date?: string; + date?: string; in_reply_to?: string; - message_id?: string; - reply_to?: string; + message_id?: string; + reply_to?: string; } export interface InitialComment { - channel?: string; - comment?: string; - created?: number; - id?: string; - is_intro?: boolean; + channel?: string; + comment?: string; + created?: number; + id?: string; + is_intro?: boolean; timestamp?: number; - user?: string; + user?: string; } export interface ListLimits { - column_count?: number; - column_count_limit?: number; + column_count?: number; + column_count_limit?: number; over_column_maximum?: boolean; - over_row_maximum?: boolean; - over_view_maximum?: boolean; - row_count?: number; - row_count_limit?: number; - view_count?: number; - view_count_limit?: number; + over_row_maximum?: boolean; + over_view_maximum?: boolean; + row_count?: number; + row_count_limit?: number; + view_count?: number; + view_count_limit?: number; } export interface ListMetadata { creation_source?: CreationSource; - description?: string; - icon?: string; - icon_team_id?: string; - icon_url?: string; - integrations?: string[]; - is_trial?: boolean; - schema?: Schema[]; - views?: View[]; + description?: string; + icon?: string; + icon_team_id?: string; + icon_url?: string; + integrations?: string[]; + is_trial?: boolean; + schema?: Schema[]; + views?: View[]; } export interface CreationSource { - reference_id?: string; - type?: string; + reference_id?: string; + type?: string; workflow_function_id?: string; } export interface Schema { - id?: string; + id?: string; is_primary_column?: boolean; - key?: string; - name?: string; - options?: Options; - type?: string; + key?: string; + name?: string; + options?: Options; + type?: string; } export interface Options { - canvas_id?: string; + canvas_id?: string; canvas_placeholder_mapping?: CanvasPlaceholderMapping[]; - choices?: Choice[]; - currency?: string; - currency_format?: string; - date_format?: string; - default_value?: string; - default_value_typed?: DefaultValueTyped; - emoji?: string; - emoji_team_id?: string; - for_assignment?: boolean; - format?: string; - linked_to?: string[]; - mark_as_done_when_checked?: boolean; - max?: number; - notify_users?: boolean; - precision?: number; - rounding?: string; - show_member_name?: boolean; - time_format?: string; + choices?: Choice[]; + currency?: string; + currency_format?: string; + date_format?: string; + default_value?: string; + default_value_typed?: DefaultValueTyped; + emoji?: string; + emoji_team_id?: string; + for_assignment?: boolean; + format?: string; + linked_to?: string[]; + mark_as_done_when_checked?: boolean; + max?: number; + notify_users?: boolean; + precision?: number; + rounding?: string; + show_member_name?: boolean; + time_format?: string; } export interface CanvasPlaceholderMapping { - column?: string; + column?: string; variable?: string; } @@ -287,161 +287,161 @@ export interface DefaultValueTyped { } export interface View { - columns?: Column[]; - created_by?: string; - date_created?: number; - id?: string; + columns?: Column[]; + created_by?: string; + date_created?: number; + id?: string; is_all_items_view?: boolean; - is_locked?: boolean; - name?: string; - position?: string; + is_locked?: boolean; + name?: string; + position?: string; stick_column_left?: boolean; - type?: string; + type?: string; } export interface Column { - id?: string; - key?: string; + id?: string; + key?: string; position?: string; - visible?: boolean; - width?: number; + visible?: boolean; + width?: number; } export interface MediaProgress { - duration_ms?: number; + duration_ms?: number; max_offset_ms?: number; - offset_ms?: number; + offset_ms?: number; } export interface Reaction { count?: number; - name?: string; - url?: string; + name?: string; + url?: string; users?: string[]; } export interface Saved { date_completed?: number; - date_due?: number; - is_archived?: boolean; - state?: string; + date_due?: number; + is_archived?: boolean; + state?: string; } export interface Shares { private?: { [key: string]: Private[] }; - public?: { [key: string]: Private[] }; + public?: { [key: string]: Private[] }; } export interface Private { - access?: string; - channel_name?: string; - date_last_shared?: number; - latest_reply?: string; - reply_count?: number; - reply_users?: string[]; + access?: string; + channel_name?: string; + date_last_shared?: number; + latest_reply?: string; + reply_count?: number; + reply_users?: string[]; reply_users_count?: number; - share_user_id?: string; - source?: string; - team_id?: string; - thread_ts?: string; - ts?: string; + share_user_id?: string; + source?: string; + team_id?: string; + thread_ts?: string; + ts?: string; } export interface TitleBlock { - accessory?: Accessory; - alt_text?: string; - app_collaborators?: string[]; - app_id?: string; - author_name?: string; - block_id?: string; - bot_user_id?: string; - button_label?: string; - description?: Text | string; - developer_trace_id?: string; - elements?: Accessory[]; - fallback?: string; - fields?: Text[]; - function_trigger_id?: string; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - is_animated?: boolean; - is_workflow_app?: boolean; - owning_team_id?: string; - provider_icon_url?: string; - provider_name?: string; + accessory?: Accessory; + alt_text?: string; + app_collaborators?: string[]; + app_id?: string; + author_name?: string; + block_id?: string; + bot_user_id?: string; + button_label?: string; + description?: Text | string; + developer_trace_id?: string; + elements?: Accessory[]; + fallback?: string; + fields?: Text[]; + function_trigger_id?: string; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + is_animated?: boolean; + is_workflow_app?: boolean; + owning_team_id?: string; + provider_icon_url?: string; + provider_name?: string; sales_home_workflow_app_type?: number; - share_url?: string; - slack_file?: SlackFile; - text?: Text; - thumbnail_url?: string; - title?: Text | string; - title_url?: string; - trigger_subtype?: string; - trigger_type?: string; - type?: string; - url?: string; - video_url?: string; - workflow_id?: string; + share_url?: string; + slack_file?: SlackFile; + text?: Text; + thumbnail_url?: string; + title?: Text | string; + title_url?: string; + trigger_subtype?: string; + trigger_type?: string; + type?: string; + url?: string; + video_url?: string; + workflow_id?: string; } export interface Accessory { - accessibility_label?: string; - action_id?: string; - alt_text?: string; - border?: number; - confirm?: Confirm; + accessibility_label?: string; + action_id?: string; + alt_text?: string; + border?: number; + confirm?: Confirm; default_to_current_conversation?: boolean; - elements?: AccessoryElement[]; - fallback?: string; - filter?: Filter; - focus_on_load?: boolean; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - indent?: number; - initial_channel?: string; - initial_channels?: string[]; - initial_conversation?: string; - initial_conversations?: string[]; - initial_date?: string; - initial_date_time?: number; - initial_option?: Option; - initial_options?: Option[]; - initial_time?: string; - initial_user?: string; - initial_users?: string[]; - max_selected_items?: number; - min_query_length?: number; - offset?: number; - option_groups?: OptionGroup[]; - options?: Option[]; - placeholder?: Text; - response_url_enabled?: boolean; - slack_file?: SlackFile; - style?: string; - text?: Text; - timezone?: string; - type?: string; - url?: string; - value?: string; - workflow?: Workflow; + elements?: AccessoryElement[]; + fallback?: string; + filter?: Filter; + focus_on_load?: boolean; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + indent?: number; + initial_channel?: string; + initial_channels?: string[]; + initial_conversation?: string; + initial_conversations?: string[]; + initial_date?: string; + initial_date_time?: number; + initial_option?: Option; + initial_options?: Option[]; + initial_time?: string; + initial_user?: string; + initial_users?: string[]; + max_selected_items?: number; + min_query_length?: number; + offset?: number; + option_groups?: OptionGroup[]; + options?: Option[]; + placeholder?: Text; + response_url_enabled?: boolean; + slack_file?: SlackFile; + style?: string; + text?: Text; + timezone?: string; + type?: string; + url?: string; + value?: string; + workflow?: Workflow; } export interface Confirm { confirm?: Text; - deny?: Text; - style?: string; - text?: Text; - title?: Text; + deny?: Text; + style?: string; + text?: Text; + title?: Text; } export interface Text { - emoji?: boolean; - text?: string; - type?: TextType; + emoji?: boolean; + text?: string; + type?: TextType; verbatim?: boolean; } @@ -451,42 +451,42 @@ export enum TextType { } export interface AccessoryElement { - border?: number; + border?: number; elements?: PurpleElement[]; - indent?: number; - offset?: number; - style?: string; - type?: string; + indent?: number; + offset?: number; + style?: string; + type?: string; } export interface PurpleElement { - channel_id?: string; - fallback?: string; - format?: string; - name?: string; - range?: string; - skin_tone?: number; - style?: Style; - team_id?: string; - text?: string; - timestamp?: string; - type?: ElementType; - unicode?: string; - unsafe?: boolean; - url?: string; - user_id?: string; + channel_id?: string; + fallback?: string; + format?: string; + name?: string; + range?: string; + skin_tone?: number; + style?: Style; + team_id?: string; + text?: string; + timestamp?: string; + type?: ElementType; + unicode?: string; + unsafe?: boolean; + url?: string; + user_id?: string; usergroup_id?: string; - value?: string; + value?: string; } export interface Style { - bold?: boolean; + bold?: boolean; client_highlight?: boolean; - code?: boolean; - highlight?: boolean; - italic?: boolean; - strike?: boolean; - unlink?: boolean; + code?: boolean; + highlight?: boolean; + italic?: boolean; + strike?: boolean; + unlink?: boolean; } export enum ElementType { @@ -503,25 +503,25 @@ export enum ElementType { } export interface Filter { - exclude_bot_users?: boolean; + exclude_bot_users?: boolean; exclude_external_shared_channels?: boolean; - include?: any[]; + include?: any[]; } export interface Option { description?: Text; - text?: Text; - url?: string; - value?: string; + text?: Text; + url?: string; + value?: string; } export interface OptionGroup { - label?: Text; + label?: Text; options?: Option[]; } export interface SlackFile { - id?: string; + id?: string; url?: string; } @@ -531,11 +531,11 @@ export interface Workflow { export interface Trigger { customizable_input_parameters?: CustomizableInputParameter[]; - url?: string; + url?: string; } export interface CustomizableInputParameter { - name?: string; + name?: string; value?: string; } diff --git a/packages/web-api/src/types/response/FilesUploadResponse.ts b/packages/web-api/src/types/response/FilesUploadResponse.ts index 7b1fefb78..fd3d5a6af 100644 --- a/packages/web-api/src/types/response/FilesUploadResponse.ts +++ b/packages/web-api/src/types/response/FilesUploadResponse.ts @@ -8,271 +8,271 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type FilesUploadResponse = WebAPICallResult & { - error?: string; - file?: File; - needed?: string; - ok?: boolean; + error?: string; + file?: File; + needed?: string; + ok?: boolean; provided?: string; }; export interface File { - access?: string; - alt_txt?: string; - app_id?: string; - app_name?: string; - bot_id?: string; - can_toggle_canvas_lock?: boolean; - canvas_template_mode?: string; - cc?: Cc[]; - channel_actions_count?: number; - channel_actions_ts?: string; - channels?: string[]; - comments_count?: number; - converted_pdf?: string; - created?: number; - deanimate?: string; - deanimate_gif?: string; - display_as_bot?: boolean; - dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; - duration_ms?: number; - edit_link?: string; - edit_timestamp?: number; - editable?: boolean; - editor?: string; - editors?: string[]; - external_id?: string; - external_type?: string; - external_url?: string; - favorites?: Favorite[]; - file_access?: string; - filetype?: string; - from?: Cc[]; - groups?: string[]; - has_more?: boolean; - has_more_shares?: boolean; - has_rich_preview?: boolean; - headers?: Headers; - hls?: string; - hls_embed?: string; - id?: string; - image_exif_rotation?: number; - ims?: string[]; - initial_comment?: InitialComment; - is_channel_space?: boolean; - is_external?: boolean; - is_public?: boolean; - is_starred?: boolean; - last_editor?: string; - last_read?: number; - lines?: number; - lines_more?: number; - linked_channel_id?: string; - list_limits?: ListLimits; - list_metadata?: ListMetadata; - media_display_type?: string; - media_progress?: MediaProgress; - mimetype?: string; - mode?: string; - mp4?: string; - mp4_low?: string; - name?: string; - non_owner_editable?: boolean; - num_stars?: number; - org_or_workspace_access?: string; - original_attachment_count?: number; - original_h?: string; - original_w?: string; - permalink?: string; - permalink_public?: string; - pinned_to?: string[]; - pjpeg?: string; - plain_text?: string; - pretty_type?: string; - preview?: string; - preview_highlight?: string; - preview_is_truncated?: boolean; - preview_plain_text?: string; + access?: string; + alt_txt?: string; + app_id?: string; + app_name?: string; + bot_id?: string; + can_toggle_canvas_lock?: boolean; + canvas_template_mode?: string; + cc?: Cc[]; + channel_actions_count?: number; + channel_actions_ts?: string; + channels?: string[]; + comments_count?: number; + converted_pdf?: string; + created?: number; + deanimate?: string; + deanimate_gif?: string; + display_as_bot?: boolean; + dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; + duration_ms?: number; + edit_link?: string; + edit_timestamp?: number; + editable?: boolean; + editor?: string; + editors?: string[]; + external_id?: string; + external_type?: string; + external_url?: string; + favorites?: Favorite[]; + file_access?: string; + filetype?: string; + from?: Cc[]; + groups?: string[]; + has_more?: boolean; + has_more_shares?: boolean; + has_rich_preview?: boolean; + headers?: Headers; + hls?: string; + hls_embed?: string; + id?: string; + image_exif_rotation?: number; + ims?: string[]; + initial_comment?: InitialComment; + is_channel_space?: boolean; + is_external?: boolean; + is_public?: boolean; + is_starred?: boolean; + last_editor?: string; + last_read?: number; + lines?: number; + lines_more?: number; + linked_channel_id?: string; + list_limits?: ListLimits; + list_metadata?: ListMetadata; + media_display_type?: string; + media_progress?: MediaProgress; + mimetype?: string; + mode?: string; + mp4?: string; + mp4_low?: string; + name?: string; + non_owner_editable?: boolean; + num_stars?: number; + org_or_workspace_access?: string; + original_attachment_count?: number; + original_h?: string; + original_w?: string; + permalink?: string; + permalink_public?: string; + pinned_to?: string[]; + pjpeg?: string; + plain_text?: string; + pretty_type?: string; + preview?: string; + preview_highlight?: string; + preview_is_truncated?: boolean; + preview_plain_text?: string; private_channels_with_file_access_count?: number; - private_file_with_access_count?: number; - public_url_shared?: boolean; - quip_thread_id?: string; - reactions?: Reaction[]; - saved?: Saved; - sent_to_self?: boolean; - shares?: Shares; - show_badge?: boolean; - simplified_html?: string; - size?: number; - source_team?: string; - subject?: string; - subtype?: string; - team_pref_version_history_enabled?: boolean; - teams_shared_with?: any[]; - template_conversion_ts?: number; - template_description?: string; - template_icon?: string; - template_name?: string; - template_title?: string; - thumb_1024?: string; - thumb_1024_gif?: string; - thumb_1024_h?: string; - thumb_1024_w?: string; - thumb_160?: string; - thumb_160_gif?: string; - thumb_160_h?: string; - thumb_160_w?: string; - thumb_360?: string; - thumb_360_gif?: string; - thumb_360_h?: string; - thumb_360_w?: string; - thumb_480?: string; - thumb_480_gif?: string; - thumb_480_h?: string; - thumb_480_w?: string; - thumb_64?: string; - thumb_64_gif?: string; - thumb_64_h?: string; - thumb_64_w?: string; - thumb_720?: string; - thumb_720_gif?: string; - thumb_720_h?: string; - thumb_720_w?: string; - thumb_80?: string; - thumb_800?: string; - thumb_800_gif?: string; - thumb_800_h?: string; - thumb_800_w?: string; - thumb_80_gif?: string; - thumb_80_h?: string; - thumb_80_w?: string; - thumb_960?: string; - thumb_960_gif?: string; - thumb_960_h?: string; - thumb_960_w?: string; - thumb_gif?: string; - thumb_pdf?: string; - thumb_pdf_h?: string; - thumb_pdf_w?: string; - thumb_tiny?: string; - thumb_video?: string; - thumb_video_h?: number; - thumb_video_w?: number; - timestamp?: number; - title?: string; - title_blocks?: TitleBlock[]; - to?: Cc[]; - transcription?: Transcription; - update_notification?: number; - updated?: number; - url_private?: string; - url_private_download?: string; - url_static_preview?: string; - user?: string; - user_team?: string; - username?: string; - vtt?: string; + private_file_with_access_count?: number; + public_url_shared?: boolean; + quip_thread_id?: string; + reactions?: Reaction[]; + saved?: Saved; + sent_to_self?: boolean; + shares?: Shares; + show_badge?: boolean; + simplified_html?: string; + size?: number; + source_team?: string; + subject?: string; + subtype?: string; + team_pref_version_history_enabled?: boolean; + teams_shared_with?: any[]; + template_conversion_ts?: number; + template_description?: string; + template_icon?: string; + template_name?: string; + template_title?: string; + thumb_1024?: string; + thumb_1024_gif?: string; + thumb_1024_h?: string; + thumb_1024_w?: string; + thumb_160?: string; + thumb_160_gif?: string; + thumb_160_h?: string; + thumb_160_w?: string; + thumb_360?: string; + thumb_360_gif?: string; + thumb_360_h?: string; + thumb_360_w?: string; + thumb_480?: string; + thumb_480_gif?: string; + thumb_480_h?: string; + thumb_480_w?: string; + thumb_64?: string; + thumb_64_gif?: string; + thumb_64_h?: string; + thumb_64_w?: string; + thumb_720?: string; + thumb_720_gif?: string; + thumb_720_h?: string; + thumb_720_w?: string; + thumb_80?: string; + thumb_800?: string; + thumb_800_gif?: string; + thumb_800_h?: string; + thumb_800_w?: string; + thumb_80_gif?: string; + thumb_80_h?: string; + thumb_80_w?: string; + thumb_960?: string; + thumb_960_gif?: string; + thumb_960_h?: string; + thumb_960_w?: string; + thumb_gif?: string; + thumb_pdf?: string; + thumb_pdf_h?: string; + thumb_pdf_w?: string; + thumb_tiny?: string; + thumb_video?: string; + thumb_video_h?: number; + thumb_video_w?: number; + timestamp?: number; + title?: string; + title_blocks?: TitleBlock[]; + to?: Cc[]; + transcription?: Transcription; + update_notification?: number; + updated?: number; + url_private?: string; + url_private_download?: string; + url_static_preview?: string; + user?: string; + user_team?: string; + username?: string; + vtt?: string; } export interface Cc { - address?: string; - name?: string; + address?: string; + name?: string; original?: string; } export interface DmMpdmUsersWithFileAccess { - access?: string; + access?: string; user_id?: string; } export interface Favorite { - collection_id?: string; + collection_id?: string; collection_name?: string; - position?: string; + position?: string; } export interface Headers { - date?: string; + date?: string; in_reply_to?: string; - message_id?: string; - reply_to?: string; + message_id?: string; + reply_to?: string; } export interface InitialComment { - channel?: string; - comment?: string; - created?: number; - id?: string; - is_intro?: boolean; + channel?: string; + comment?: string; + created?: number; + id?: string; + is_intro?: boolean; timestamp?: number; - user?: string; + user?: string; } export interface ListLimits { - column_count?: number; - column_count_limit?: number; + column_count?: number; + column_count_limit?: number; over_column_maximum?: boolean; - over_row_maximum?: boolean; - over_view_maximum?: boolean; - row_count?: number; - row_count_limit?: number; - view_count?: number; - view_count_limit?: number; + over_row_maximum?: boolean; + over_view_maximum?: boolean; + row_count?: number; + row_count_limit?: number; + view_count?: number; + view_count_limit?: number; } export interface ListMetadata { creation_source?: CreationSource; - description?: string; - icon?: string; - icon_team_id?: string; - icon_url?: string; - integrations?: string[]; - is_trial?: boolean; - schema?: Schema[]; - views?: View[]; + description?: string; + icon?: string; + icon_team_id?: string; + icon_url?: string; + integrations?: string[]; + is_trial?: boolean; + schema?: Schema[]; + views?: View[]; } export interface CreationSource { - reference_id?: string; - type?: string; + reference_id?: string; + type?: string; workflow_function_id?: string; } export interface Schema { - id?: string; + id?: string; is_primary_column?: boolean; - key?: string; - name?: string; - options?: Options; - type?: string; + key?: string; + name?: string; + options?: Options; + type?: string; } export interface Options { - canvas_id?: string; + canvas_id?: string; canvas_placeholder_mapping?: CanvasPlaceholderMapping[]; - choices?: Choice[]; - currency?: string; - currency_format?: string; - date_format?: string; - default_value?: string; - default_value_typed?: DefaultValueTyped; - emoji?: string; - emoji_team_id?: string; - for_assignment?: boolean; - format?: string; - linked_to?: string[]; - mark_as_done_when_checked?: boolean; - max?: number; - notify_users?: boolean; - precision?: number; - rounding?: string; - show_member_name?: boolean; - time_format?: string; + choices?: Choice[]; + currency?: string; + currency_format?: string; + date_format?: string; + default_value?: string; + default_value_typed?: DefaultValueTyped; + emoji?: string; + emoji_team_id?: string; + for_assignment?: boolean; + format?: string; + linked_to?: string[]; + mark_as_done_when_checked?: boolean; + max?: number; + notify_users?: boolean; + precision?: number; + rounding?: string; + show_member_name?: boolean; + time_format?: string; } export interface CanvasPlaceholderMapping { - column?: string; + column?: string; variable?: string; } @@ -287,161 +287,161 @@ export interface DefaultValueTyped { } export interface View { - columns?: Column[]; - created_by?: string; - date_created?: number; - id?: string; + columns?: Column[]; + created_by?: string; + date_created?: number; + id?: string; is_all_items_view?: boolean; - is_locked?: boolean; - name?: string; - position?: string; + is_locked?: boolean; + name?: string; + position?: string; stick_column_left?: boolean; - type?: string; + type?: string; } export interface Column { - id?: string; - key?: string; + id?: string; + key?: string; position?: string; - visible?: boolean; - width?: number; + visible?: boolean; + width?: number; } export interface MediaProgress { - duration_ms?: number; + duration_ms?: number; max_offset_ms?: number; - offset_ms?: number; + offset_ms?: number; } export interface Reaction { count?: number; - name?: string; - url?: string; + name?: string; + url?: string; users?: string[]; } export interface Saved { date_completed?: number; - date_due?: number; - is_archived?: boolean; - state?: string; + date_due?: number; + is_archived?: boolean; + state?: string; } export interface Shares { private?: { [key: string]: Private[] }; - public?: { [key: string]: Private[] }; + public?: { [key: string]: Private[] }; } export interface Private { - access?: string; - channel_name?: string; - date_last_shared?: number; - latest_reply?: string; - reply_count?: number; - reply_users?: string[]; + access?: string; + channel_name?: string; + date_last_shared?: number; + latest_reply?: string; + reply_count?: number; + reply_users?: string[]; reply_users_count?: number; - share_user_id?: string; - source?: string; - team_id?: string; - thread_ts?: string; - ts?: string; + share_user_id?: string; + source?: string; + team_id?: string; + thread_ts?: string; + ts?: string; } export interface TitleBlock { - accessory?: Accessory; - alt_text?: string; - app_collaborators?: string[]; - app_id?: string; - author_name?: string; - block_id?: string; - bot_user_id?: string; - button_label?: string; - description?: Text | string; - developer_trace_id?: string; - elements?: Accessory[]; - fallback?: string; - fields?: Text[]; - function_trigger_id?: string; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - is_animated?: boolean; - is_workflow_app?: boolean; - owning_team_id?: string; - provider_icon_url?: string; - provider_name?: string; + accessory?: Accessory; + alt_text?: string; + app_collaborators?: string[]; + app_id?: string; + author_name?: string; + block_id?: string; + bot_user_id?: string; + button_label?: string; + description?: Text | string; + developer_trace_id?: string; + elements?: Accessory[]; + fallback?: string; + fields?: Text[]; + function_trigger_id?: string; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + is_animated?: boolean; + is_workflow_app?: boolean; + owning_team_id?: string; + provider_icon_url?: string; + provider_name?: string; sales_home_workflow_app_type?: number; - share_url?: string; - slack_file?: SlackFile; - text?: Text; - thumbnail_url?: string; - title?: Text | string; - title_url?: string; - trigger_subtype?: string; - trigger_type?: string; - type?: string; - url?: string; - video_url?: string; - workflow_id?: string; + share_url?: string; + slack_file?: SlackFile; + text?: Text; + thumbnail_url?: string; + title?: Text | string; + title_url?: string; + trigger_subtype?: string; + trigger_type?: string; + type?: string; + url?: string; + video_url?: string; + workflow_id?: string; } export interface Accessory { - accessibility_label?: string; - action_id?: string; - alt_text?: string; - border?: number; - confirm?: Confirm; + accessibility_label?: string; + action_id?: string; + alt_text?: string; + border?: number; + confirm?: Confirm; default_to_current_conversation?: boolean; - elements?: AccessoryElement[]; - fallback?: string; - filter?: Filter; - focus_on_load?: boolean; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - indent?: number; - initial_channel?: string; - initial_channels?: string[]; - initial_conversation?: string; - initial_conversations?: string[]; - initial_date?: string; - initial_date_time?: number; - initial_option?: Option; - initial_options?: Option[]; - initial_time?: string; - initial_user?: string; - initial_users?: string[]; - max_selected_items?: number; - min_query_length?: number; - offset?: number; - option_groups?: OptionGroup[]; - options?: Option[]; - placeholder?: Text; - response_url_enabled?: boolean; - slack_file?: SlackFile; - style?: string; - text?: Text; - timezone?: string; - type?: string; - url?: string; - value?: string; - workflow?: Workflow; + elements?: AccessoryElement[]; + fallback?: string; + filter?: Filter; + focus_on_load?: boolean; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + indent?: number; + initial_channel?: string; + initial_channels?: string[]; + initial_conversation?: string; + initial_conversations?: string[]; + initial_date?: string; + initial_date_time?: number; + initial_option?: Option; + initial_options?: Option[]; + initial_time?: string; + initial_user?: string; + initial_users?: string[]; + max_selected_items?: number; + min_query_length?: number; + offset?: number; + option_groups?: OptionGroup[]; + options?: Option[]; + placeholder?: Text; + response_url_enabled?: boolean; + slack_file?: SlackFile; + style?: string; + text?: Text; + timezone?: string; + type?: string; + url?: string; + value?: string; + workflow?: Workflow; } export interface Confirm { confirm?: Text; - deny?: Text; - style?: string; - text?: Text; - title?: Text; + deny?: Text; + style?: string; + text?: Text; + title?: Text; } export interface Text { - emoji?: boolean; - text?: string; - type?: TextType; + emoji?: boolean; + text?: string; + type?: TextType; verbatim?: boolean; } @@ -451,42 +451,42 @@ export enum TextType { } export interface AccessoryElement { - border?: number; + border?: number; elements?: PurpleElement[]; - indent?: number; - offset?: number; - style?: string; - type?: string; + indent?: number; + offset?: number; + style?: string; + type?: string; } export interface PurpleElement { - channel_id?: string; - fallback?: string; - format?: string; - name?: string; - range?: string; - skin_tone?: number; - style?: Style; - team_id?: string; - text?: string; - timestamp?: string; - type?: ElementType; - unicode?: string; - unsafe?: boolean; - url?: string; - user_id?: string; + channel_id?: string; + fallback?: string; + format?: string; + name?: string; + range?: string; + skin_tone?: number; + style?: Style; + team_id?: string; + text?: string; + timestamp?: string; + type?: ElementType; + unicode?: string; + unsafe?: boolean; + url?: string; + user_id?: string; usergroup_id?: string; - value?: string; + value?: string; } export interface Style { - bold?: boolean; + bold?: boolean; client_highlight?: boolean; - code?: boolean; - highlight?: boolean; - italic?: boolean; - strike?: boolean; - unlink?: boolean; + code?: boolean; + highlight?: boolean; + italic?: boolean; + strike?: boolean; + unlink?: boolean; } export enum ElementType { @@ -503,25 +503,25 @@ export enum ElementType { } export interface Filter { - exclude_bot_users?: boolean; + exclude_bot_users?: boolean; exclude_external_shared_channels?: boolean; - include?: any[]; + include?: any[]; } export interface Option { description?: Text; - text?: Text; - url?: string; - value?: string; + text?: Text; + url?: string; + value?: string; } export interface OptionGroup { - label?: Text; + label?: Text; options?: Option[]; } export interface SlackFile { - id?: string; + id?: string; url?: string; } @@ -531,11 +531,11 @@ export interface Workflow { export interface Trigger { customizable_input_parameters?: CustomizableInputParameter[]; - url?: string; + url?: string; } export interface CustomizableInputParameter { - name?: string; + name?: string; value?: string; } diff --git a/packages/web-api/src/types/response/FunctionsCompleteErrorResponse.ts b/packages/web-api/src/types/response/FunctionsCompleteErrorResponse.ts index 0450f7591..d8cb63748 100644 --- a/packages/web-api/src/types/response/FunctionsCompleteErrorResponse.ts +++ b/packages/web-api/src/types/response/FunctionsCompleteErrorResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type FunctionsCompleteErrorResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/FunctionsCompleteSuccessResponse.ts b/packages/web-api/src/types/response/FunctionsCompleteSuccessResponse.ts index d40df2d79..260322ef7 100644 --- a/packages/web-api/src/types/response/FunctionsCompleteSuccessResponse.ts +++ b/packages/web-api/src/types/response/FunctionsCompleteSuccessResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type FunctionsCompleteSuccessResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/GroupsArchiveResponse.ts b/packages/web-api/src/types/response/GroupsArchiveResponse.ts index 2f9ac2523..083942caf 100644 --- a/packages/web-api/src/types/response/GroupsArchiveResponse.ts +++ b/packages/web-api/src/types/response/GroupsArchiveResponse.ts @@ -8,14 +8,14 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type GroupsArchiveResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; - warning?: string; + warning?: string; }; export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/GroupsCloseResponse.ts b/packages/web-api/src/types/response/GroupsCloseResponse.ts index fd2a67783..3003ff938 100644 --- a/packages/web-api/src/types/response/GroupsCloseResponse.ts +++ b/packages/web-api/src/types/response/GroupsCloseResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type GroupsCloseResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/GroupsCreateChildResponse.ts b/packages/web-api/src/types/response/GroupsCreateChildResponse.ts index 1a5419b87..639bf8095 100644 --- a/packages/web-api/src/types/response/GroupsCreateChildResponse.ts +++ b/packages/web-api/src/types/response/GroupsCreateChildResponse.ts @@ -8,49 +8,49 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type GroupsCreateChildResponse = WebAPICallResult & { - error?: string; - group?: Group; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + group?: Group; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; - warning?: string; + warning?: string; }; export interface Group { - created?: number; - creator?: string; - id?: string; - is_archived?: boolean; - is_group?: boolean; - is_mpim?: boolean; - is_open?: boolean; - last_read?: string; - latest?: Latest; - members?: string[]; - name?: string; - name_normalized?: string; - parent_group?: string; - purpose?: Purpose; - topic?: Purpose; - unread_count?: number; + created?: number; + creator?: string; + id?: string; + is_archived?: boolean; + is_group?: boolean; + is_mpim?: boolean; + is_open?: boolean; + last_read?: string; + latest?: Latest; + members?: string[]; + name?: string; + name_normalized?: string; + parent_group?: string; + purpose?: Purpose; + topic?: Purpose; + unread_count?: number; unread_count_display?: number; } export interface Latest { subtype?: string; - text?: string; - ts?: string; - type?: string; - user?: string; + text?: string; + ts?: string; + type?: string; + user?: string; } export interface Purpose { - creator?: string; + creator?: string; last_set?: number; - value?: string; + value?: string; } export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/GroupsCreateResponse.ts b/packages/web-api/src/types/response/GroupsCreateResponse.ts index 951d4e090..7fc3703cb 100644 --- a/packages/web-api/src/types/response/GroupsCreateResponse.ts +++ b/packages/web-api/src/types/response/GroupsCreateResponse.ts @@ -8,40 +8,40 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type GroupsCreateResponse = WebAPICallResult & { - error?: string; - group?: Group; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + group?: Group; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; - warning?: string; + warning?: string; }; export interface Group { - created?: number; - creator?: string; - id?: string; - is_archived?: boolean; - is_group?: boolean; - is_mpim?: boolean; - is_open?: boolean; - last_read?: string; - members?: string[]; - name?: string; - name_normalized?: string; - priority?: number; - purpose?: Purpose; - topic?: Purpose; - unread_count?: number; + created?: number; + creator?: string; + id?: string; + is_archived?: boolean; + is_group?: boolean; + is_mpim?: boolean; + is_open?: boolean; + last_read?: string; + members?: string[]; + name?: string; + name_normalized?: string; + priority?: number; + purpose?: Purpose; + topic?: Purpose; + unread_count?: number; unread_count_display?: number; } export interface Purpose { - creator?: string; + creator?: string; last_set?: number; - value?: string; + value?: string; } export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/GroupsHistoryResponse.ts b/packages/web-api/src/types/response/GroupsHistoryResponse.ts index b5da7cded..0020147b1 100644 --- a/packages/web-api/src/types/response/GroupsHistoryResponse.ts +++ b/packages/web-api/src/types/response/GroupsHistoryResponse.ts @@ -8,25 +8,25 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type GroupsHistoryResponse = WebAPICallResult & { channel_actions_count?: number; - error?: string; - has_more?: boolean; - messages?: Message[]; - needed?: string; - ok?: boolean; - provided?: string; - response_metadata?: ResponseMetadata; - warning?: string; + error?: string; + has_more?: boolean; + messages?: Message[]; + needed?: string; + ok?: boolean; + provided?: string; + response_metadata?: ResponseMetadata; + warning?: string; }; export interface Message { subtype?: string; - text?: string; - ts?: string; - type?: string; - user?: string; + text?: string; + ts?: string; + type?: string; + user?: string; } export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/GroupsInfoResponse.ts b/packages/web-api/src/types/response/GroupsInfoResponse.ts index d42003b94..babc4263d 100644 --- a/packages/web-api/src/types/response/GroupsInfoResponse.ts +++ b/packages/web-api/src/types/response/GroupsInfoResponse.ts @@ -8,48 +8,48 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type GroupsInfoResponse = WebAPICallResult & { - error?: string; - group?: Group; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + group?: Group; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; - warning?: string; + warning?: string; }; export interface Group { - created?: number; - creator?: string; - id?: string; - is_archived?: boolean; - is_group?: boolean; - is_mpim?: boolean; - is_open?: boolean; - last_read?: string; - latest?: Latest; - members?: string[]; - name?: string; - name_normalized?: string; - purpose?: Purpose; - topic?: Purpose; - unread_count?: number; + created?: number; + creator?: string; + id?: string; + is_archived?: boolean; + is_group?: boolean; + is_mpim?: boolean; + is_open?: boolean; + last_read?: string; + latest?: Latest; + members?: string[]; + name?: string; + name_normalized?: string; + purpose?: Purpose; + topic?: Purpose; + unread_count?: number; unread_count_display?: number; } export interface Latest { subtype?: string; - text?: string; - ts?: string; - type?: string; - user?: string; + text?: string; + ts?: string; + type?: string; + user?: string; } export interface Purpose { - creator?: string; + creator?: string; last_set?: number; - value?: string; + value?: string; } export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/GroupsInviteResponse.ts b/packages/web-api/src/types/response/GroupsInviteResponse.ts index e6a478ce3..c842eb1b4 100644 --- a/packages/web-api/src/types/response/GroupsInviteResponse.ts +++ b/packages/web-api/src/types/response/GroupsInviteResponse.ts @@ -8,49 +8,49 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type GroupsInviteResponse = WebAPICallResult & { - error?: string; - group?: Group; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + group?: Group; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; - warning?: string; + warning?: string; }; export interface Group { - created?: number; - creator?: string; - id?: string; - is_archived?: boolean; - is_group?: boolean; - is_mpim?: boolean; - is_open?: boolean; - last_read?: string; - latest?: Latest; - name?: string; - name_normalized?: string; - priority?: number; - purpose?: Purpose; - topic?: Purpose; - unread_count?: number; + created?: number; + creator?: string; + id?: string; + is_archived?: boolean; + is_group?: boolean; + is_mpim?: boolean; + is_open?: boolean; + last_read?: string; + latest?: Latest; + name?: string; + name_normalized?: string; + priority?: number; + purpose?: Purpose; + topic?: Purpose; + unread_count?: number; unread_count_display?: number; } export interface Latest { subtype?: string; - text?: string; - topic?: string; - ts?: string; - type?: string; - user?: string; + text?: string; + topic?: string; + ts?: string; + type?: string; + user?: string; } export interface Purpose { - creator?: string; + creator?: string; last_set?: number; - value?: string; + value?: string; } export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/GroupsKickResponse.ts b/packages/web-api/src/types/response/GroupsKickResponse.ts index 59a0cfed9..27271a0a0 100644 --- a/packages/web-api/src/types/response/GroupsKickResponse.ts +++ b/packages/web-api/src/types/response/GroupsKickResponse.ts @@ -8,14 +8,14 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type GroupsKickResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; - warning?: string; + warning?: string; }; export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/GroupsLeaveResponse.ts b/packages/web-api/src/types/response/GroupsLeaveResponse.ts index f1998fbb0..a11c43fa3 100644 --- a/packages/web-api/src/types/response/GroupsLeaveResponse.ts +++ b/packages/web-api/src/types/response/GroupsLeaveResponse.ts @@ -8,14 +8,14 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type GroupsLeaveResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; - warning?: string; + warning?: string; }; export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/GroupsListResponse.ts b/packages/web-api/src/types/response/GroupsListResponse.ts index d3d214859..7c34d49c1 100644 --- a/packages/web-api/src/types/response/GroupsListResponse.ts +++ b/packages/web-api/src/types/response/GroupsListResponse.ts @@ -8,39 +8,39 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type GroupsListResponse = WebAPICallResult & { - error?: string; - groups?: Group[]; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + groups?: Group[]; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; - warning?: string; + warning?: string; }; export interface Group { - created?: number; - creator?: string; - id?: string; - is_archived?: boolean; - is_group?: boolean; - is_mpim?: boolean; - is_open?: boolean; - last_read?: string; - members?: string[]; - name?: string; + created?: number; + creator?: string; + id?: string; + is_archived?: boolean; + is_group?: boolean; + is_mpim?: boolean; + is_open?: boolean; + last_read?: string; + members?: string[]; + name?: string; name_normalized?: string; - parent_group?: string; - priority?: number; - purpose?: Purpose; - topic?: Purpose; + parent_group?: string; + priority?: number; + purpose?: Purpose; + topic?: Purpose; } export interface Purpose { - creator?: string; + creator?: string; last_set?: number; - value?: string; + value?: string; } export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/GroupsMarkResponse.ts b/packages/web-api/src/types/response/GroupsMarkResponse.ts index 19f007a29..3f2f12721 100644 --- a/packages/web-api/src/types/response/GroupsMarkResponse.ts +++ b/packages/web-api/src/types/response/GroupsMarkResponse.ts @@ -8,14 +8,14 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type GroupsMarkResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; - warning?: string; + warning?: string; }; export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/GroupsOpenResponse.ts b/packages/web-api/src/types/response/GroupsOpenResponse.ts index 54b4da2e2..0201d23b8 100644 --- a/packages/web-api/src/types/response/GroupsOpenResponse.ts +++ b/packages/web-api/src/types/response/GroupsOpenResponse.ts @@ -8,16 +8,16 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type GroupsOpenResponse = WebAPICallResult & { - already_open?: boolean; - error?: string; - needed?: string; - no_op?: boolean; - ok?: boolean; - provided?: string; + already_open?: boolean; + error?: string; + needed?: string; + no_op?: boolean; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; - warning?: string; + warning?: string; }; export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/GroupsRenameResponse.ts b/packages/web-api/src/types/response/GroupsRenameResponse.ts index d67f3caac..c0ded3f75 100644 --- a/packages/web-api/src/types/response/GroupsRenameResponse.ts +++ b/packages/web-api/src/types/response/GroupsRenameResponse.ts @@ -8,35 +8,35 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type GroupsRenameResponse = WebAPICallResult & { - channel?: Channel; - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + channel?: Channel; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; - warning?: string; + warning?: string; }; export interface Channel { - created?: number; - creator?: string; - id?: string; - is_archived?: boolean; - is_group?: boolean; - is_mpim?: boolean; - members?: string[]; - name?: string; + created?: number; + creator?: string; + id?: string; + is_archived?: boolean; + is_group?: boolean; + is_mpim?: boolean; + members?: string[]; + name?: string; name_normalized?: string; - purpose?: Purpose; - topic?: Purpose; + purpose?: Purpose; + topic?: Purpose; } export interface Purpose { - creator?: string; + creator?: string; last_set?: number; - value?: string; + value?: string; } export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/GroupsRepliesResponse.ts b/packages/web-api/src/types/response/GroupsRepliesResponse.ts index 0fac5fe26..d514681f5 100644 --- a/packages/web-api/src/types/response/GroupsRepliesResponse.ts +++ b/packages/web-api/src/types/response/GroupsRepliesResponse.ts @@ -8,42 +8,42 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type GroupsRepliesResponse = WebAPICallResult & { - error?: string; - has_more?: boolean; - messages?: Message[]; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + has_more?: boolean; + messages?: Message[]; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; - warning?: string; + warning?: string; }; export interface Message { - bot_id?: string; - bot_profile?: BotProfile; - last_read?: string; - latest_reply?: string; - parent_user_id?: string; - reply_count?: number; - reply_users?: string[]; + bot_id?: string; + bot_profile?: BotProfile; + last_read?: string; + latest_reply?: string; + parent_user_id?: string; + reply_count?: number; + reply_users?: string[]; reply_users_count?: number; - subscribed?: boolean; - team?: string; - text?: string; - thread_ts?: string; - ts?: string; - type?: string; - user?: string; + subscribed?: boolean; + team?: string; + text?: string; + thread_ts?: string; + ts?: string; + type?: string; + user?: string; } export interface BotProfile { - app_id?: string; + app_id?: string; deleted?: boolean; - icons?: Icons; - id?: string; - name?: string; + icons?: Icons; + id?: string; + name?: string; team_id?: string; updated?: number; } diff --git a/packages/web-api/src/types/response/GroupsSetPurposeResponse.ts b/packages/web-api/src/types/response/GroupsSetPurposeResponse.ts index 38bcf314b..518eb1ac1 100644 --- a/packages/web-api/src/types/response/GroupsSetPurposeResponse.ts +++ b/packages/web-api/src/types/response/GroupsSetPurposeResponse.ts @@ -8,15 +8,15 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type GroupsSetPurposeResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; - purpose?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; + purpose?: string; response_metadata?: ResponseMetadata; - warning?: string; + warning?: string; }; export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/GroupsSetTopicResponse.ts b/packages/web-api/src/types/response/GroupsSetTopicResponse.ts index 140813303..38f284567 100644 --- a/packages/web-api/src/types/response/GroupsSetTopicResponse.ts +++ b/packages/web-api/src/types/response/GroupsSetTopicResponse.ts @@ -8,15 +8,15 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type GroupsSetTopicResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; - topic?: string; - warning?: string; + topic?: string; + warning?: string; }; export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/GroupsUnarchiveResponse.ts b/packages/web-api/src/types/response/GroupsUnarchiveResponse.ts index 54e8a37bb..adf80c2fd 100644 --- a/packages/web-api/src/types/response/GroupsUnarchiveResponse.ts +++ b/packages/web-api/src/types/response/GroupsUnarchiveResponse.ts @@ -8,14 +8,14 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type GroupsUnarchiveResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; - warning?: string; + warning?: string; }; export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/ImCloseResponse.ts b/packages/web-api/src/types/response/ImCloseResponse.ts index 0bfaa6c31..53f3ed5a9 100644 --- a/packages/web-api/src/types/response/ImCloseResponse.ts +++ b/packages/web-api/src/types/response/ImCloseResponse.ts @@ -8,14 +8,14 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ImCloseResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; - warning?: string; + warning?: string; }; export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/ImHistoryResponse.ts b/packages/web-api/src/types/response/ImHistoryResponse.ts index d73f3e1e9..351eb60b6 100644 --- a/packages/web-api/src/types/response/ImHistoryResponse.ts +++ b/packages/web-api/src/types/response/ImHistoryResponse.ts @@ -8,124 +8,124 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ImHistoryResponse = WebAPICallResult & { channel_actions_count?: number; - error?: string; - has_more?: boolean; - messages?: Message[]; - needed?: string; - ok?: boolean; - provided?: string; - response_metadata?: ResponseMetadata; - warning?: string; + error?: string; + has_more?: boolean; + messages?: Message[]; + needed?: string; + ok?: boolean; + provided?: string; + response_metadata?: ResponseMetadata; + warning?: string; }; export interface Message { - blocks?: Block[]; - bot_id?: string; - bot_profile?: BotProfile; - client_msg_id?: string; - last_read?: string; - latest_reply?: string; - parent_user_id?: string; - reply_count?: number; - reply_users?: string[]; + blocks?: Block[]; + bot_id?: string; + bot_profile?: BotProfile; + client_msg_id?: string; + last_read?: string; + latest_reply?: string; + parent_user_id?: string; + reply_count?: number; + reply_users?: string[]; reply_users_count?: number; - subscribed?: boolean; - team?: string; - text?: string; - thread_ts?: string; - ts?: string; - type?: string; - user?: string; + subscribed?: boolean; + team?: string; + text?: string; + thread_ts?: string; + ts?: string; + type?: string; + user?: string; } export interface Block { - accessory?: Accessory; - alt_text?: string; - block_id?: string; - elements?: Element[]; - fallback?: string; - fields?: Text[]; - image_bytes?: number; + accessory?: Accessory; + alt_text?: string; + block_id?: string; + elements?: Element[]; + fallback?: string; + fields?: Text[]; + image_bytes?: number; image_height?: number; - image_url?: string; - image_width?: number; - text?: Text; - title?: Text; - type?: string; + image_url?: string; + image_width?: number; + text?: Text; + title?: Text; + type?: string; } export interface Accessory { - alt_text?: string; - fallback?: string; - image_bytes?: number; + alt_text?: string; + fallback?: string; + image_bytes?: number; image_height?: number; - image_url?: string; - image_width?: number; - type?: string; + image_url?: string; + image_width?: number; + type?: string; } export interface Element { - action_id?: string; - alt_text?: string; - confirm?: Confirm; + action_id?: string; + alt_text?: string; + confirm?: Confirm; default_to_current_conversation?: boolean; - fallback?: string; - filter?: Filter; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - initial_channel?: string; - initial_conversation?: string; - initial_date?: string; - initial_option?: InitialOption; - initial_user?: string; - min_query_length?: number; - placeholder?: Text; - response_url_enabled?: boolean; - style?: string; - text?: Text; - type?: string; - url?: string; - value?: string; + fallback?: string; + filter?: Filter; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + initial_channel?: string; + initial_conversation?: string; + initial_date?: string; + initial_option?: InitialOption; + initial_user?: string; + min_query_length?: number; + placeholder?: Text; + response_url_enabled?: boolean; + style?: string; + text?: Text; + type?: string; + url?: string; + value?: string; } export interface Confirm { confirm?: Text; - deny?: Text; - style?: string; - text?: Text; - title?: Text; + deny?: Text; + style?: string; + text?: Text; + title?: Text; } export interface Text { - emoji?: boolean; - text?: string; - type?: string; + emoji?: boolean; + text?: string; + type?: string; verbatim?: boolean; } export interface Filter { - exclude_bot_users?: boolean; + exclude_bot_users?: boolean; exclude_external_shared_channels?: boolean; } export interface InitialOption { description?: Text; - text?: Text; - url?: string; - value?: string; + text?: Text; + url?: string; + value?: string; } export interface BotProfile { - app_id?: string; + app_id?: string; deleted?: boolean; - icons?: Icons; - id?: string; - name?: string; + icons?: Icons; + id?: string; + name?: string; team_id?: string; updated?: number; } diff --git a/packages/web-api/src/types/response/ImListResponse.ts b/packages/web-api/src/types/response/ImListResponse.ts index c6912478c..a50fd3946 100644 --- a/packages/web-api/src/types/response/ImListResponse.ts +++ b/packages/web-api/src/types/response/ImListResponse.ts @@ -8,30 +8,30 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ImListResponse = WebAPICallResult & { - error?: string; - ims?: Im[]; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + ims?: Im[]; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; - warning?: string; + warning?: string; }; export interface Im { - created?: number; - id?: string; - is_archived?: boolean; - is_im?: boolean; - is_org_shared?: boolean; + created?: number; + id?: string; + is_archived?: boolean; + is_im?: boolean; + is_org_shared?: boolean; is_user_deleted?: boolean; - priority?: number; - user?: string; + priority?: number; + user?: string; } export interface ResponseMetadata { - messages?: string[]; + messages?: string[]; next_cursor?: string; - warnings?: string[]; + warnings?: string[]; } diff --git a/packages/web-api/src/types/response/ImMarkResponse.ts b/packages/web-api/src/types/response/ImMarkResponse.ts index b15449395..2c2681eed 100644 --- a/packages/web-api/src/types/response/ImMarkResponse.ts +++ b/packages/web-api/src/types/response/ImMarkResponse.ts @@ -8,14 +8,14 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ImMarkResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; - warning?: string; + warning?: string; }; export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/ImOpenResponse.ts b/packages/web-api/src/types/response/ImOpenResponse.ts index 44e81db63..0815b5932 100644 --- a/packages/web-api/src/types/response/ImOpenResponse.ts +++ b/packages/web-api/src/types/response/ImOpenResponse.ts @@ -8,17 +8,17 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ImOpenResponse = WebAPICallResult & { - already_open?: boolean; - channel?: Channel; - error?: string; - needed?: string; - no_op?: boolean; - ok?: boolean; - provided?: string; + already_open?: boolean; + channel?: Channel; + error?: string; + needed?: string; + no_op?: boolean; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; - warning?: string; + warning?: string; }; export interface Channel { diff --git a/packages/web-api/src/types/response/ImRepliesResponse.ts b/packages/web-api/src/types/response/ImRepliesResponse.ts index 6f2b6b452..4f7836e8a 100644 --- a/packages/web-api/src/types/response/ImRepliesResponse.ts +++ b/packages/web-api/src/types/response/ImRepliesResponse.ts @@ -8,42 +8,42 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ImRepliesResponse = WebAPICallResult & { - error?: string; - has_more?: boolean; - messages?: Message[]; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + has_more?: boolean; + messages?: Message[]; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; - warning?: string; + warning?: string; }; export interface Message { - bot_id?: string; - bot_profile?: BotProfile; - last_read?: string; - latest_reply?: string; - parent_user_id?: string; - reply_count?: number; - reply_users?: string[]; + bot_id?: string; + bot_profile?: BotProfile; + last_read?: string; + latest_reply?: string; + parent_user_id?: string; + reply_count?: number; + reply_users?: string[]; reply_users_count?: number; - subscribed?: boolean; - team?: string; - text?: string; - thread_ts?: string; - ts?: string; - type?: string; - user?: string; + subscribed?: boolean; + team?: string; + text?: string; + thread_ts?: string; + ts?: string; + type?: string; + user?: string; } export interface BotProfile { - app_id?: string; + app_id?: string; deleted?: boolean; - icons?: Icons; - id?: string; - name?: string; + icons?: Icons; + id?: string; + name?: string; team_id?: string; updated?: number; } diff --git a/packages/web-api/src/types/response/MigrationExchangeResponse.ts b/packages/web-api/src/types/response/MigrationExchangeResponse.ts index 0add511be..d9cbd18a9 100644 --- a/packages/web-api/src/types/response/MigrationExchangeResponse.ts +++ b/packages/web-api/src/types/response/MigrationExchangeResponse.ts @@ -8,15 +8,15 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type MigrationExchangeResponse = WebAPICallResult & { - enterprise_id?: string; - error?: string; + enterprise_id?: string; + error?: string; invalid_user_ids?: string[]; - needed?: string; - ok?: boolean; - provided?: string; - team_id?: string; - user_id_map?: { [key: string]: string }; - warning?: string; + needed?: string; + ok?: boolean; + provided?: string; + team_id?: string; + user_id_map?: { [key: string]: string }; + warning?: string; }; diff --git a/packages/web-api/src/types/response/MpimCloseResponse.ts b/packages/web-api/src/types/response/MpimCloseResponse.ts index 13f3fe6f7..39d6c5004 100644 --- a/packages/web-api/src/types/response/MpimCloseResponse.ts +++ b/packages/web-api/src/types/response/MpimCloseResponse.ts @@ -8,14 +8,14 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type MpimCloseResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; - warning?: string; + warning?: string; }; export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/MpimHistoryResponse.ts b/packages/web-api/src/types/response/MpimHistoryResponse.ts index fdd2939c1..4dd70bfe3 100644 --- a/packages/web-api/src/types/response/MpimHistoryResponse.ts +++ b/packages/web-api/src/types/response/MpimHistoryResponse.ts @@ -8,44 +8,44 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type MpimHistoryResponse = WebAPICallResult & { channel_actions_count?: number; - error?: string; - has_more?: boolean; - messages?: Message[]; - needed?: string; - ok?: boolean; - provided?: string; - response_metadata?: ResponseMetadata; - warning?: string; + error?: string; + has_more?: boolean; + messages?: Message[]; + needed?: string; + ok?: boolean; + provided?: string; + response_metadata?: ResponseMetadata; + warning?: string; }; export interface Message { - bot_id?: string; - bot_profile?: BotProfile; - is_starred?: boolean; - last_read?: string; - latest_reply?: string; - parent_user_id?: string; - reply_count?: number; - reply_users?: string[]; + bot_id?: string; + bot_profile?: BotProfile; + is_starred?: boolean; + last_read?: string; + latest_reply?: string; + parent_user_id?: string; + reply_count?: number; + reply_users?: string[]; reply_users_count?: number; - subscribed?: boolean; - team?: string; - text?: string; - thread_ts?: string; - ts?: string; - type?: string; - user?: string; + subscribed?: boolean; + team?: string; + text?: string; + thread_ts?: string; + ts?: string; + type?: string; + user?: string; } export interface BotProfile { - app_id?: string; + app_id?: string; deleted?: boolean; - icons?: Icons; - id?: string; - name?: string; + icons?: Icons; + id?: string; + name?: string; team_id?: string; updated?: number; } diff --git a/packages/web-api/src/types/response/MpimListResponse.ts b/packages/web-api/src/types/response/MpimListResponse.ts index f06658cf4..ee8f1dcc8 100644 --- a/packages/web-api/src/types/response/MpimListResponse.ts +++ b/packages/web-api/src/types/response/MpimListResponse.ts @@ -8,38 +8,38 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type MpimListResponse = WebAPICallResult & { - error?: string; - groups?: Group[]; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + groups?: Group[]; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; - warning?: string; + warning?: string; }; export interface Group { - created?: number; - creator?: string; - id?: string; - is_archived?: boolean; - is_group?: boolean; - is_mpim?: boolean; - is_open?: boolean; - last_read?: string; - members?: string[]; - name?: string; + created?: number; + creator?: string; + id?: string; + is_archived?: boolean; + is_group?: boolean; + is_mpim?: boolean; + is_open?: boolean; + last_read?: string; + members?: string[]; + name?: string; name_normalized?: string; - priority?: number; - purpose?: Purpose; - topic?: Purpose; + priority?: number; + purpose?: Purpose; + topic?: Purpose; } export interface Purpose { - creator?: string; + creator?: string; last_set?: number; - value?: string; + value?: string; } export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/MpimMarkResponse.ts b/packages/web-api/src/types/response/MpimMarkResponse.ts index ecf8be00d..c3481a31d 100644 --- a/packages/web-api/src/types/response/MpimMarkResponse.ts +++ b/packages/web-api/src/types/response/MpimMarkResponse.ts @@ -8,14 +8,14 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type MpimMarkResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; - warning?: string; + warning?: string; }; export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/MpimOpenResponse.ts b/packages/web-api/src/types/response/MpimOpenResponse.ts index 656a4e2e4..a0915df20 100644 --- a/packages/web-api/src/types/response/MpimOpenResponse.ts +++ b/packages/web-api/src/types/response/MpimOpenResponse.ts @@ -8,55 +8,55 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type MpimOpenResponse = WebAPICallResult & { - error?: string; - group?: Group; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + group?: Group; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; - warning?: string; + warning?: string; }; export interface Group { - created?: number; - creator?: string; - id?: string; - is_archived?: boolean; - is_group?: boolean; - is_mpim?: boolean; - is_open?: boolean; - last_read?: string; - latest?: Latest; - members?: string[]; - name?: string; - name_normalized?: string; - priority?: number; - purpose?: Purpose; - topic?: Purpose; - unread_count?: number; + created?: number; + creator?: string; + id?: string; + is_archived?: boolean; + is_group?: boolean; + is_mpim?: boolean; + is_open?: boolean; + last_read?: string; + latest?: Latest; + members?: string[]; + name?: string; + name_normalized?: string; + priority?: number; + purpose?: Purpose; + topic?: Purpose; + unread_count?: number; unread_count_display?: number; } export interface Latest { - bot_id?: string; - bot_profile?: BotProfile; + bot_id?: string; + bot_profile?: BotProfile; parent_user_id?: string; - team?: string; - text?: string; - thread_ts?: string; - ts?: string; - type?: string; - user?: string; + team?: string; + text?: string; + thread_ts?: string; + ts?: string; + type?: string; + user?: string; } export interface BotProfile { - app_id?: string; + app_id?: string; deleted?: boolean; - icons?: Icons; - id?: string; - name?: string; + icons?: Icons; + id?: string; + name?: string; team_id?: string; updated?: number; } @@ -68,9 +68,9 @@ export interface Icons { } export interface Purpose { - creator?: string; + creator?: string; last_set?: number; - value?: string; + value?: string; } export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/MpimRepliesResponse.ts b/packages/web-api/src/types/response/MpimRepliesResponse.ts index b559652ad..14d6c14af 100644 --- a/packages/web-api/src/types/response/MpimRepliesResponse.ts +++ b/packages/web-api/src/types/response/MpimRepliesResponse.ts @@ -8,42 +8,42 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type MpimRepliesResponse = WebAPICallResult & { - error?: string; - has_more?: boolean; - messages?: Message[]; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + has_more?: boolean; + messages?: Message[]; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; - warning?: string; + warning?: string; }; export interface Message { - bot_id?: string; - bot_profile?: BotProfile; - last_read?: string; - latest_reply?: string; - parent_user_id?: string; - reply_count?: number; - reply_users?: string[]; + bot_id?: string; + bot_profile?: BotProfile; + last_read?: string; + latest_reply?: string; + parent_user_id?: string; + reply_count?: number; + reply_users?: string[]; reply_users_count?: number; - subscribed?: boolean; - team?: string; - text?: string; - thread_ts?: string; - ts?: string; - type?: string; - user?: string; + subscribed?: boolean; + team?: string; + text?: string; + thread_ts?: string; + ts?: string; + type?: string; + user?: string; } export interface BotProfile { - app_id?: string; + app_id?: string; deleted?: boolean; - icons?: Icons; - id?: string; - name?: string; + icons?: Icons; + id?: string; + name?: string; team_id?: string; updated?: number; } diff --git a/packages/web-api/src/types/response/OauthAccessResponse.ts b/packages/web-api/src/types/response/OauthAccessResponse.ts index 6b3c99ef9..572b5bc60 100644 --- a/packages/web-api/src/types/response/OauthAccessResponse.ts +++ b/packages/web-api/src/types/response/OauthAccessResponse.ts @@ -8,50 +8,50 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type OauthAccessResponse = WebAPICallResult & { - access_token?: string; + access_token?: string; authorizing_user?: User; - bot?: Bot; - enterprise_id?: string; - error?: string; + bot?: Bot; + enterprise_id?: string; + error?: string; incoming_webhook?: IncomingWebhook; - installer_user?: User; - needed?: string; - ok?: boolean; - provided?: string; - scope?: string; - scopes?: Scopes; - team_id?: string; - team_name?: string; - token_type?: string; - user_id?: string; - warning?: string; + installer_user?: User; + needed?: string; + ok?: boolean; + provided?: string; + scope?: string; + scopes?: Scopes; + team_id?: string; + team_name?: string; + token_type?: string; + user_id?: string; + warning?: string; }; export interface User { app_home?: string; - user_id?: string; + user_id?: string; } export interface Bot { bot_access_token?: string; - bot_user_id?: string; + bot_user_id?: string; } export interface IncomingWebhook { - channel?: string; - channel_id?: string; + channel?: string; + channel_id?: string; configuration_url?: string; - url?: string; + url?: string; } export interface Scopes { app_home?: string[]; - channel?: string[]; - group?: string[]; - im?: string[]; - mpim?: string[]; - team?: string[]; - user?: string[]; + channel?: string[]; + group?: string[]; + im?: string[]; + mpim?: string[]; + team?: string[]; + user?: string[]; } diff --git a/packages/web-api/src/types/response/OauthTokenResponse.ts b/packages/web-api/src/types/response/OauthTokenResponse.ts index a3a5008f2..14c45762d 100644 --- a/packages/web-api/src/types/response/OauthTokenResponse.ts +++ b/packages/web-api/src/types/response/OauthTokenResponse.ts @@ -8,11 +8,11 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type OauthTokenResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; req_method?: string; }; diff --git a/packages/web-api/src/types/response/OauthV2AccessResponse.ts b/packages/web-api/src/types/response/OauthV2AccessResponse.ts index de5aa2def..13e973883 100644 --- a/packages/web-api/src/types/response/OauthV2AccessResponse.ts +++ b/packages/web-api/src/types/response/OauthV2AccessResponse.ts @@ -8,44 +8,44 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type OauthV2AccessResponse = WebAPICallResult & { - access_token?: string; - app_id?: string; - authed_user?: AuthedUser; - bot_user_id?: string; - enterprise?: Enterprise; - error?: string; - expires_in?: number; - incoming_webhook?: IncomingWebhook; + access_token?: string; + app_id?: string; + authed_user?: AuthedUser; + bot_user_id?: string; + enterprise?: Enterprise; + error?: string; + expires_in?: number; + incoming_webhook?: IncomingWebhook; is_enterprise_install?: boolean; - needed?: string; - ok?: boolean; - provided?: string; - refresh_token?: string; - scope?: string; - team?: Enterprise; - token_type?: string; - warning?: string; + needed?: string; + ok?: boolean; + provided?: string; + refresh_token?: string; + scope?: string; + team?: Enterprise; + token_type?: string; + warning?: string; }; export interface AuthedUser { - access_token?: string; - expires_in?: number; - id?: string; + access_token?: string; + expires_in?: number; + id?: string; refresh_token?: string; - scope?: string; - token_type?: string; + scope?: string; + token_type?: string; } export interface Enterprise { - id?: string; + id?: string; name?: string; } export interface IncomingWebhook { - channel?: string; - channel_id?: string; + channel?: string; + channel_id?: string; configuration_url?: string; - url?: string; + url?: string; } diff --git a/packages/web-api/src/types/response/OauthV2ExchangeResponse.ts b/packages/web-api/src/types/response/OauthV2ExchangeResponse.ts index 96427a037..cdd3398c4 100644 --- a/packages/web-api/src/types/response/OauthV2ExchangeResponse.ts +++ b/packages/web-api/src/types/response/OauthV2ExchangeResponse.ts @@ -8,47 +8,47 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type OauthV2ExchangeResponse = WebAPICallResult & { - access_token?: string; - app_id?: string; - authed_user?: AuthedUser; - bot_user_id?: string; - enterprise?: Enterprise; - error?: string; - expires_in?: number; - incoming_webhook?: IncomingWebhook; + access_token?: string; + app_id?: string; + authed_user?: AuthedUser; + bot_user_id?: string; + enterprise?: Enterprise; + error?: string; + expires_in?: number; + incoming_webhook?: IncomingWebhook; is_enterprise_install?: boolean; - needed?: string; - ok?: boolean; - provided?: string; - refresh_token?: string; - response_metadata?: ResponseMetadata; - scope?: string; - team?: Enterprise; - token_type?: string; - warning?: string; + needed?: string; + ok?: boolean; + provided?: string; + refresh_token?: string; + response_metadata?: ResponseMetadata; + scope?: string; + team?: Enterprise; + token_type?: string; + warning?: string; }; export interface AuthedUser { - access_token?: string; - expires_in?: number; - id?: string; + access_token?: string; + expires_in?: number; + id?: string; refresh_token?: string; - scope?: string; - token_type?: string; + scope?: string; + token_type?: string; } export interface Enterprise { - id?: string; + id?: string; name?: string; } export interface IncomingWebhook { - channel?: string; - channel_id?: string; + channel?: string; + channel_id?: string; configuration_url?: string; - url?: string; + url?: string; } export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/OpenIDConnectTokenResponse.ts b/packages/web-api/src/types/response/OpenIDConnectTokenResponse.ts index b97e54e63..3010c5dfb 100644 --- a/packages/web-api/src/types/response/OpenIDConnectTokenResponse.ts +++ b/packages/web-api/src/types/response/OpenIDConnectTokenResponse.ts @@ -8,16 +8,16 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type OpenIDConnectTokenResponse = WebAPICallResult & { - access_token?: string; - error?: string; - expires_in?: number; - id_token?: string; - needed?: string; - ok?: boolean; - provided?: string; + access_token?: string; + error?: string; + expires_in?: number; + id_token?: string; + needed?: string; + ok?: boolean; + provided?: string; refresh_token?: string; - token_type?: string; - warning?: string; + token_type?: string; + warning?: string; }; diff --git a/packages/web-api/src/types/response/OpenIDConnectUserInfoResponse.ts b/packages/web-api/src/types/response/OpenIDConnectUserInfoResponse.ts index 414e785dc..4932c740d 100644 --- a/packages/web-api/src/types/response/OpenIDConnectUserInfoResponse.ts +++ b/packages/web-api/src/types/response/OpenIDConnectUserInfoResponse.ts @@ -8,41 +8,41 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type OpenIDConnectUserInfoResponse = WebAPICallResult & { - date_email_verified?: number; - email?: string; - email_verified?: boolean; - error?: string; - family_name?: string; - given_name?: string; + date_email_verified?: number; + email?: string; + email_verified?: boolean; + error?: string; + family_name?: string; + given_name?: string; 'https://slack.com/enterprise_domain'?: string; - 'https://slack.com/enterprise_id'?: string; - 'https://slack.com/enterprise_name'?: string; - 'https://slack.com/team_domain'?: string; - 'https://slack.com/team_id'?: string; - 'https://slack.com/team_image_102'?: string; - 'https://slack.com/team_image_132'?: string; - 'https://slack.com/team_image_230'?: string; - 'https://slack.com/team_image_34'?: string; - 'https://slack.com/team_image_44'?: string; - 'https://slack.com/team_image_68'?: string; - 'https://slack.com/team_image_88'?: string; - 'https://slack.com/team_name'?: string; - 'https://slack.com/user_id'?: string; - 'https://slack.com/user_image_1024'?: string; - 'https://slack.com/user_image_192'?: string; - 'https://slack.com/user_image_24'?: string; - 'https://slack.com/user_image_32'?: string; - 'https://slack.com/user_image_48'?: string; - 'https://slack.com/user_image_512'?: string; - 'https://slack.com/user_image_72'?: string; - locale?: string; - name?: string; - needed?: string; - ok?: boolean; - picture?: string; - provided?: string; - sub?: string; - warning?: string; + 'https://slack.com/enterprise_id'?: string; + 'https://slack.com/enterprise_name'?: string; + 'https://slack.com/team_domain'?: string; + 'https://slack.com/team_id'?: string; + 'https://slack.com/team_image_102'?: string; + 'https://slack.com/team_image_132'?: string; + 'https://slack.com/team_image_230'?: string; + 'https://slack.com/team_image_34'?: string; + 'https://slack.com/team_image_44'?: string; + 'https://slack.com/team_image_68'?: string; + 'https://slack.com/team_image_88'?: string; + 'https://slack.com/team_name'?: string; + 'https://slack.com/user_id'?: string; + 'https://slack.com/user_image_1024'?: string; + 'https://slack.com/user_image_192'?: string; + 'https://slack.com/user_image_24'?: string; + 'https://slack.com/user_image_32'?: string; + 'https://slack.com/user_image_48'?: string; + 'https://slack.com/user_image_512'?: string; + 'https://slack.com/user_image_72'?: string; + locale?: string; + name?: string; + needed?: string; + ok?: boolean; + picture?: string; + provided?: string; + sub?: string; + warning?: string; }; diff --git a/packages/web-api/src/types/response/PinsAddResponse.ts b/packages/web-api/src/types/response/PinsAddResponse.ts index 6fe280939..ff681dd1a 100644 --- a/packages/web-api/src/types/response/PinsAddResponse.ts +++ b/packages/web-api/src/types/response/PinsAddResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type PinsAddResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/PinsListResponse.ts b/packages/web-api/src/types/response/PinsListResponse.ts index f1ca84350..37e47d4be 100644 --- a/packages/web-api/src/types/response/PinsListResponse.ts +++ b/packages/web-api/src/types/response/PinsListResponse.ts @@ -8,279 +8,279 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type PinsListResponse = WebAPICallResult & { - error?: string; - items?: Item[]; - needed?: string; - ok?: boolean; + error?: string; + items?: Item[]; + needed?: string; + ok?: boolean; provided?: string; }; export interface Item { - comment?: string; - created?: number; + comment?: string; + created?: number; created_by?: string; - file?: File; - type?: string; + file?: File; + type?: string; } export interface File { - access?: string; - alt_txt?: string; - app_id?: string; - app_name?: string; - bot_id?: string; - can_toggle_canvas_lock?: boolean; - canvas_template_mode?: string; - cc?: Cc[]; - channel_actions_count?: number; - channel_actions_ts?: string; - channels?: string[]; - comments_count?: number; - converted_pdf?: string; - created?: number; - deanimate?: string; - deanimate_gif?: string; - display_as_bot?: boolean; - dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; - duration_ms?: number; - edit_link?: string; - edit_timestamp?: number; - editable?: boolean; - editor?: string; - editors?: string[]; - external_id?: string; - external_type?: string; - external_url?: string; - favorites?: Favorite[]; - file_access?: string; - filetype?: string; - from?: Cc[]; - groups?: string[]; - has_more?: boolean; - has_more_shares?: boolean; - has_rich_preview?: boolean; - headers?: Headers; - hls?: string; - hls_embed?: string; - id?: string; - image_exif_rotation?: number; - ims?: string[]; - initial_comment?: InitialComment; - is_channel_space?: boolean; - is_external?: boolean; - is_public?: boolean; - is_starred?: boolean; - last_editor?: string; - last_read?: number; - lines?: number; - lines_more?: number; - linked_channel_id?: string; - list_limits?: ListLimits; - list_metadata?: ListMetadata; - media_display_type?: string; - media_progress?: MediaProgress; - mimetype?: string; - mode?: string; - mp4?: string; - mp4_low?: string; - name?: string; - non_owner_editable?: boolean; - num_stars?: number; - org_or_workspace_access?: string; - original_attachment_count?: number; - original_h?: string; - original_w?: string; - permalink?: string; - permalink_public?: string; - pinned_to?: string[]; - pjpeg?: string; - plain_text?: string; - pretty_type?: string; - preview?: string; - preview_highlight?: string; - preview_is_truncated?: boolean; - preview_plain_text?: string; + access?: string; + alt_txt?: string; + app_id?: string; + app_name?: string; + bot_id?: string; + can_toggle_canvas_lock?: boolean; + canvas_template_mode?: string; + cc?: Cc[]; + channel_actions_count?: number; + channel_actions_ts?: string; + channels?: string[]; + comments_count?: number; + converted_pdf?: string; + created?: number; + deanimate?: string; + deanimate_gif?: string; + display_as_bot?: boolean; + dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; + duration_ms?: number; + edit_link?: string; + edit_timestamp?: number; + editable?: boolean; + editor?: string; + editors?: string[]; + external_id?: string; + external_type?: string; + external_url?: string; + favorites?: Favorite[]; + file_access?: string; + filetype?: string; + from?: Cc[]; + groups?: string[]; + has_more?: boolean; + has_more_shares?: boolean; + has_rich_preview?: boolean; + headers?: Headers; + hls?: string; + hls_embed?: string; + id?: string; + image_exif_rotation?: number; + ims?: string[]; + initial_comment?: InitialComment; + is_channel_space?: boolean; + is_external?: boolean; + is_public?: boolean; + is_starred?: boolean; + last_editor?: string; + last_read?: number; + lines?: number; + lines_more?: number; + linked_channel_id?: string; + list_limits?: ListLimits; + list_metadata?: ListMetadata; + media_display_type?: string; + media_progress?: MediaProgress; + mimetype?: string; + mode?: string; + mp4?: string; + mp4_low?: string; + name?: string; + non_owner_editable?: boolean; + num_stars?: number; + org_or_workspace_access?: string; + original_attachment_count?: number; + original_h?: string; + original_w?: string; + permalink?: string; + permalink_public?: string; + pinned_to?: string[]; + pjpeg?: string; + plain_text?: string; + pretty_type?: string; + preview?: string; + preview_highlight?: string; + preview_is_truncated?: boolean; + preview_plain_text?: string; private_channels_with_file_access_count?: number; - private_file_with_access_count?: number; - public_url_shared?: boolean; - quip_thread_id?: string; - reactions?: Reaction[]; - saved?: Saved; - sent_to_self?: boolean; - shares?: Shares; - show_badge?: boolean; - simplified_html?: string; - size?: number; - source_team?: string; - subject?: string; - subtype?: string; - team_pref_version_history_enabled?: boolean; - teams_shared_with?: any[]; - template_conversion_ts?: number; - template_description?: string; - template_icon?: string; - template_name?: string; - template_title?: string; - thumb_1024?: string; - thumb_1024_gif?: string; - thumb_1024_h?: string; - thumb_1024_w?: string; - thumb_160?: string; - thumb_160_gif?: string; - thumb_160_h?: string; - thumb_160_w?: string; - thumb_360?: string; - thumb_360_gif?: string; - thumb_360_h?: string; - thumb_360_w?: string; - thumb_480?: string; - thumb_480_gif?: string; - thumb_480_h?: string; - thumb_480_w?: string; - thumb_64?: string; - thumb_64_gif?: string; - thumb_64_h?: string; - thumb_64_w?: string; - thumb_720?: string; - thumb_720_gif?: string; - thumb_720_h?: string; - thumb_720_w?: string; - thumb_80?: string; - thumb_800?: string; - thumb_800_gif?: string; - thumb_800_h?: string; - thumb_800_w?: string; - thumb_80_gif?: string; - thumb_80_h?: string; - thumb_80_w?: string; - thumb_960?: string; - thumb_960_gif?: string; - thumb_960_h?: string; - thumb_960_w?: string; - thumb_gif?: string; - thumb_pdf?: string; - thumb_pdf_h?: string; - thumb_pdf_w?: string; - thumb_tiny?: string; - thumb_video?: string; - thumb_video_h?: number; - thumb_video_w?: number; - timestamp?: number; - title?: string; - title_blocks?: TitleBlock[]; - to?: Cc[]; - transcription?: Transcription; - update_notification?: number; - updated?: number; - url_private?: string; - url_private_download?: string; - url_static_preview?: string; - user?: string; - user_team?: string; - username?: string; - vtt?: string; + private_file_with_access_count?: number; + public_url_shared?: boolean; + quip_thread_id?: string; + reactions?: Reaction[]; + saved?: Saved; + sent_to_self?: boolean; + shares?: Shares; + show_badge?: boolean; + simplified_html?: string; + size?: number; + source_team?: string; + subject?: string; + subtype?: string; + team_pref_version_history_enabled?: boolean; + teams_shared_with?: any[]; + template_conversion_ts?: number; + template_description?: string; + template_icon?: string; + template_name?: string; + template_title?: string; + thumb_1024?: string; + thumb_1024_gif?: string; + thumb_1024_h?: string; + thumb_1024_w?: string; + thumb_160?: string; + thumb_160_gif?: string; + thumb_160_h?: string; + thumb_160_w?: string; + thumb_360?: string; + thumb_360_gif?: string; + thumb_360_h?: string; + thumb_360_w?: string; + thumb_480?: string; + thumb_480_gif?: string; + thumb_480_h?: string; + thumb_480_w?: string; + thumb_64?: string; + thumb_64_gif?: string; + thumb_64_h?: string; + thumb_64_w?: string; + thumb_720?: string; + thumb_720_gif?: string; + thumb_720_h?: string; + thumb_720_w?: string; + thumb_80?: string; + thumb_800?: string; + thumb_800_gif?: string; + thumb_800_h?: string; + thumb_800_w?: string; + thumb_80_gif?: string; + thumb_80_h?: string; + thumb_80_w?: string; + thumb_960?: string; + thumb_960_gif?: string; + thumb_960_h?: string; + thumb_960_w?: string; + thumb_gif?: string; + thumb_pdf?: string; + thumb_pdf_h?: string; + thumb_pdf_w?: string; + thumb_tiny?: string; + thumb_video?: string; + thumb_video_h?: number; + thumb_video_w?: number; + timestamp?: number; + title?: string; + title_blocks?: TitleBlock[]; + to?: Cc[]; + transcription?: Transcription; + update_notification?: number; + updated?: number; + url_private?: string; + url_private_download?: string; + url_static_preview?: string; + user?: string; + user_team?: string; + username?: string; + vtt?: string; } export interface Cc { - address?: string; - name?: string; + address?: string; + name?: string; original?: string; } export interface DmMpdmUsersWithFileAccess { - access?: string; + access?: string; user_id?: string; } export interface Favorite { - collection_id?: string; + collection_id?: string; collection_name?: string; - position?: string; + position?: string; } export interface Headers { - date?: string; + date?: string; in_reply_to?: string; - message_id?: string; - reply_to?: string; + message_id?: string; + reply_to?: string; } export interface InitialComment { - channel?: string; - comment?: string; - created?: number; - id?: string; - is_intro?: boolean; + channel?: string; + comment?: string; + created?: number; + id?: string; + is_intro?: boolean; timestamp?: number; - user?: string; + user?: string; } export interface ListLimits { - column_count?: number; - column_count_limit?: number; + column_count?: number; + column_count_limit?: number; over_column_maximum?: boolean; - over_row_maximum?: boolean; - over_view_maximum?: boolean; - row_count?: number; - row_count_limit?: number; - view_count?: number; - view_count_limit?: number; + over_row_maximum?: boolean; + over_view_maximum?: boolean; + row_count?: number; + row_count_limit?: number; + view_count?: number; + view_count_limit?: number; } export interface ListMetadata { creation_source?: CreationSource; - description?: string; - icon?: string; - icon_team_id?: string; - icon_url?: string; - integrations?: string[]; - is_trial?: boolean; - schema?: Schema[]; - views?: View[]; + description?: string; + icon?: string; + icon_team_id?: string; + icon_url?: string; + integrations?: string[]; + is_trial?: boolean; + schema?: Schema[]; + views?: View[]; } export interface CreationSource { - reference_id?: string; - type?: string; + reference_id?: string; + type?: string; workflow_function_id?: string; } export interface Schema { - id?: string; + id?: string; is_primary_column?: boolean; - key?: string; - name?: string; - options?: Options; - type?: string; + key?: string; + name?: string; + options?: Options; + type?: string; } export interface Options { - canvas_id?: string; + canvas_id?: string; canvas_placeholder_mapping?: CanvasPlaceholderMapping[]; - choices?: Choice[]; - currency?: string; - currency_format?: string; - date_format?: string; - default_value?: string; - default_value_typed?: DefaultValueTyped; - emoji?: string; - emoji_team_id?: string; - for_assignment?: boolean; - format?: string; - linked_to?: string[]; - mark_as_done_when_checked?: boolean; - max?: number; - notify_users?: boolean; - precision?: number; - rounding?: string; - show_member_name?: boolean; - time_format?: string; + choices?: Choice[]; + currency?: string; + currency_format?: string; + date_format?: string; + default_value?: string; + default_value_typed?: DefaultValueTyped; + emoji?: string; + emoji_team_id?: string; + for_assignment?: boolean; + format?: string; + linked_to?: string[]; + mark_as_done_when_checked?: boolean; + max?: number; + notify_users?: boolean; + precision?: number; + rounding?: string; + show_member_name?: boolean; + time_format?: string; } export interface CanvasPlaceholderMapping { - column?: string; + column?: string; variable?: string; } @@ -295,161 +295,161 @@ export interface DefaultValueTyped { } export interface View { - columns?: Column[]; - created_by?: string; - date_created?: number; - id?: string; + columns?: Column[]; + created_by?: string; + date_created?: number; + id?: string; is_all_items_view?: boolean; - is_locked?: boolean; - name?: string; - position?: string; + is_locked?: boolean; + name?: string; + position?: string; stick_column_left?: boolean; - type?: string; + type?: string; } export interface Column { - id?: string; - key?: string; + id?: string; + key?: string; position?: string; - visible?: boolean; - width?: number; + visible?: boolean; + width?: number; } export interface MediaProgress { - duration_ms?: number; + duration_ms?: number; max_offset_ms?: number; - offset_ms?: number; + offset_ms?: number; } export interface Reaction { count?: number; - name?: string; - url?: string; + name?: string; + url?: string; users?: string[]; } export interface Saved { date_completed?: number; - date_due?: number; - is_archived?: boolean; - state?: string; + date_due?: number; + is_archived?: boolean; + state?: string; } export interface Shares { private?: { [key: string]: Private[] }; - public?: { [key: string]: Private[] }; + public?: { [key: string]: Private[] }; } export interface Private { - access?: string; - channel_name?: string; - date_last_shared?: number; - latest_reply?: string; - reply_count?: number; - reply_users?: string[]; + access?: string; + channel_name?: string; + date_last_shared?: number; + latest_reply?: string; + reply_count?: number; + reply_users?: string[]; reply_users_count?: number; - share_user_id?: string; - source?: string; - team_id?: string; - thread_ts?: string; - ts?: string; + share_user_id?: string; + source?: string; + team_id?: string; + thread_ts?: string; + ts?: string; } export interface TitleBlock { - accessory?: Accessory; - alt_text?: string; - app_collaborators?: string[]; - app_id?: string; - author_name?: string; - block_id?: string; - bot_user_id?: string; - button_label?: string; - description?: Text | string; - developer_trace_id?: string; - elements?: Accessory[]; - fallback?: string; - fields?: Text[]; - function_trigger_id?: string; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - is_animated?: boolean; - is_workflow_app?: boolean; - owning_team_id?: string; - provider_icon_url?: string; - provider_name?: string; + accessory?: Accessory; + alt_text?: string; + app_collaborators?: string[]; + app_id?: string; + author_name?: string; + block_id?: string; + bot_user_id?: string; + button_label?: string; + description?: Text | string; + developer_trace_id?: string; + elements?: Accessory[]; + fallback?: string; + fields?: Text[]; + function_trigger_id?: string; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + is_animated?: boolean; + is_workflow_app?: boolean; + owning_team_id?: string; + provider_icon_url?: string; + provider_name?: string; sales_home_workflow_app_type?: number; - share_url?: string; - slack_file?: SlackFile; - text?: Text; - thumbnail_url?: string; - title?: Text | string; - title_url?: string; - trigger_subtype?: string; - trigger_type?: string; - type?: string; - url?: string; - video_url?: string; - workflow_id?: string; + share_url?: string; + slack_file?: SlackFile; + text?: Text; + thumbnail_url?: string; + title?: Text | string; + title_url?: string; + trigger_subtype?: string; + trigger_type?: string; + type?: string; + url?: string; + video_url?: string; + workflow_id?: string; } export interface Accessory { - accessibility_label?: string; - action_id?: string; - alt_text?: string; - border?: number; - confirm?: Confirm; + accessibility_label?: string; + action_id?: string; + alt_text?: string; + border?: number; + confirm?: Confirm; default_to_current_conversation?: boolean; - elements?: AccessoryElement[]; - fallback?: string; - filter?: Filter; - focus_on_load?: boolean; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - indent?: number; - initial_channel?: string; - initial_channels?: string[]; - initial_conversation?: string; - initial_conversations?: string[]; - initial_date?: string; - initial_date_time?: number; - initial_option?: Option; - initial_options?: Option[]; - initial_time?: string; - initial_user?: string; - initial_users?: string[]; - max_selected_items?: number; - min_query_length?: number; - offset?: number; - option_groups?: OptionGroup[]; - options?: Option[]; - placeholder?: Text; - response_url_enabled?: boolean; - slack_file?: SlackFile; - style?: string; - text?: Text; - timezone?: string; - type?: string; - url?: string; - value?: string; - workflow?: Workflow; + elements?: AccessoryElement[]; + fallback?: string; + filter?: Filter; + focus_on_load?: boolean; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + indent?: number; + initial_channel?: string; + initial_channels?: string[]; + initial_conversation?: string; + initial_conversations?: string[]; + initial_date?: string; + initial_date_time?: number; + initial_option?: Option; + initial_options?: Option[]; + initial_time?: string; + initial_user?: string; + initial_users?: string[]; + max_selected_items?: number; + min_query_length?: number; + offset?: number; + option_groups?: OptionGroup[]; + options?: Option[]; + placeholder?: Text; + response_url_enabled?: boolean; + slack_file?: SlackFile; + style?: string; + text?: Text; + timezone?: string; + type?: string; + url?: string; + value?: string; + workflow?: Workflow; } export interface Confirm { confirm?: Text; - deny?: Text; - style?: string; - text?: Text; - title?: Text; + deny?: Text; + style?: string; + text?: Text; + title?: Text; } export interface Text { - emoji?: boolean; - text?: string; - type?: TextType; + emoji?: boolean; + text?: string; + type?: TextType; verbatim?: boolean; } @@ -459,42 +459,42 @@ export enum TextType { } export interface AccessoryElement { - border?: number; + border?: number; elements?: PurpleElement[]; - indent?: number; - offset?: number; - style?: string; - type?: string; + indent?: number; + offset?: number; + style?: string; + type?: string; } export interface PurpleElement { - channel_id?: string; - fallback?: string; - format?: string; - name?: string; - range?: string; - skin_tone?: number; - style?: Style; - team_id?: string; - text?: string; - timestamp?: string; - type?: ElementType; - unicode?: string; - unsafe?: boolean; - url?: string; - user_id?: string; + channel_id?: string; + fallback?: string; + format?: string; + name?: string; + range?: string; + skin_tone?: number; + style?: Style; + team_id?: string; + text?: string; + timestamp?: string; + type?: ElementType; + unicode?: string; + unsafe?: boolean; + url?: string; + user_id?: string; usergroup_id?: string; - value?: string; + value?: string; } export interface Style { - bold?: boolean; + bold?: boolean; client_highlight?: boolean; - code?: boolean; - highlight?: boolean; - italic?: boolean; - strike?: boolean; - unlink?: boolean; + code?: boolean; + highlight?: boolean; + italic?: boolean; + strike?: boolean; + unlink?: boolean; } export enum ElementType { @@ -511,25 +511,25 @@ export enum ElementType { } export interface Filter { - exclude_bot_users?: boolean; + exclude_bot_users?: boolean; exclude_external_shared_channels?: boolean; - include?: any[]; + include?: any[]; } export interface Option { description?: Text; - text?: Text; - url?: string; - value?: string; + text?: Text; + url?: string; + value?: string; } export interface OptionGroup { - label?: Text; + label?: Text; options?: Option[]; } export interface SlackFile { - id?: string; + id?: string; url?: string; } @@ -539,11 +539,11 @@ export interface Workflow { export interface Trigger { customizable_input_parameters?: CustomizableInputParameter[]; - url?: string; + url?: string; } export interface CustomizableInputParameter { - name?: string; + name?: string; value?: string; } diff --git a/packages/web-api/src/types/response/PinsRemoveResponse.ts b/packages/web-api/src/types/response/PinsRemoveResponse.ts index c589322ba..19841744e 100644 --- a/packages/web-api/src/types/response/PinsRemoveResponse.ts +++ b/packages/web-api/src/types/response/PinsRemoveResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type PinsRemoveResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/ReactionsAddResponse.ts b/packages/web-api/src/types/response/ReactionsAddResponse.ts index a7411a9a5..12dd75b20 100644 --- a/packages/web-api/src/types/response/ReactionsAddResponse.ts +++ b/packages/web-api/src/types/response/ReactionsAddResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ReactionsAddResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/ReactionsGetResponse.ts b/packages/web-api/src/types/response/ReactionsGetResponse.ts index 90ed4884c..7dd19593a 100644 --- a/packages/web-api/src/types/response/ReactionsGetResponse.ts +++ b/packages/web-api/src/types/response/ReactionsGetResponse.ts @@ -8,139 +8,139 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ReactionsGetResponse = WebAPICallResult & { - channel?: string; - error?: string; - message?: Message; - needed?: string; - ok?: boolean; + channel?: string; + error?: string; + message?: Message; + needed?: string; + ok?: boolean; provided?: string; - type?: string; + type?: string; }; export interface Message { - app_id?: string; - blocks?: MessageBlock[]; - bot_id?: string; + app_id?: string; + blocks?: MessageBlock[]; + bot_id?: string; bot_profile?: BotProfile; - permalink?: string; - reactions?: Reaction[]; - room?: Room; - team?: string; - text?: string; - ts?: string; - type?: string; - user?: string; + permalink?: string; + reactions?: Reaction[]; + room?: Room; + team?: string; + text?: string; + ts?: string; + type?: string; + user?: string; } export interface MessageBlock { - accessory?: Accessory; - alt_text?: string; - api_decoration_available?: boolean; - app_collaborators?: string[]; - app_id?: string; - author_name?: string; - block_id?: string; - bot_user_id?: string; - button_label?: string; - call?: Call; - call_id?: string; - description?: DescriptionElement; - developer_trace_id?: string; - dispatch_action?: boolean; - element?: Accessory; - elements?: Accessory[]; - external_id?: string; - fallback?: string; - fields?: DescriptionElement[]; - file?: File; - file_id?: string; - function_trigger_id?: string; - hint?: DescriptionElement; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - is_animated?: boolean; - is_workflow_app?: boolean; - label?: DescriptionElement; - optional?: boolean; - owning_team_id?: string; - provider_icon_url?: string; - provider_name?: string; + accessory?: Accessory; + alt_text?: string; + api_decoration_available?: boolean; + app_collaborators?: string[]; + app_id?: string; + author_name?: string; + block_id?: string; + bot_user_id?: string; + button_label?: string; + call?: Call; + call_id?: string; + description?: DescriptionElement; + developer_trace_id?: string; + dispatch_action?: boolean; + element?: Accessory; + elements?: Accessory[]; + external_id?: string; + fallback?: string; + fields?: DescriptionElement[]; + file?: File; + file_id?: string; + function_trigger_id?: string; + hint?: DescriptionElement; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + is_animated?: boolean; + is_workflow_app?: boolean; + label?: DescriptionElement; + optional?: boolean; + owning_team_id?: string; + provider_icon_url?: string; + provider_name?: string; sales_home_workflow_app_type?: number; - share_url?: string; - slack_file?: SlackFile; - source?: string; - text?: DescriptionElement; - thumbnail_url?: string; - title?: DescriptionElement; - title_url?: string; - trigger_subtype?: string; - trigger_type?: string; - type?: string; - url?: string; - video_url?: string; - workflow_id?: string; + share_url?: string; + slack_file?: SlackFile; + source?: string; + text?: DescriptionElement; + thumbnail_url?: string; + title?: DescriptionElement; + title_url?: string; + trigger_subtype?: string; + trigger_type?: string; + type?: string; + url?: string; + video_url?: string; + workflow_id?: string; } export interface Accessory { - accessibility_label?: string; - action_id?: string; - alt_text?: string; - border?: number; - confirm?: Confirm; + accessibility_label?: string; + action_id?: string; + alt_text?: string; + border?: number; + confirm?: Confirm; default_to_current_conversation?: boolean; - elements?: AccessoryElement[]; - fallback?: string; - filter?: Filter; - focus_on_load?: boolean; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - indent?: number; - initial_channel?: string; - initial_channels?: string[]; - initial_conversation?: string; - initial_conversations?: string[]; - initial_date?: string; - initial_date_time?: number; - initial_option?: Option; - initial_options?: Option[]; - initial_time?: string; - initial_user?: string; - initial_users?: string[]; - max_selected_items?: number; - min_query_length?: number; - offset?: number; - option_groups?: OptionGroup[]; - options?: Option[]; - placeholder?: DescriptionElement; - response_url_enabled?: boolean; - slack_file?: SlackFile; - style?: string; - text?: DescriptionElement; - timezone?: string; - type?: string; - url?: string; - value?: string; - workflow?: Workflow; + elements?: AccessoryElement[]; + fallback?: string; + filter?: Filter; + focus_on_load?: boolean; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + indent?: number; + initial_channel?: string; + initial_channels?: string[]; + initial_conversation?: string; + initial_conversations?: string[]; + initial_date?: string; + initial_date_time?: number; + initial_option?: Option; + initial_options?: Option[]; + initial_time?: string; + initial_user?: string; + initial_users?: string[]; + max_selected_items?: number; + min_query_length?: number; + offset?: number; + option_groups?: OptionGroup[]; + options?: Option[]; + placeholder?: DescriptionElement; + response_url_enabled?: boolean; + slack_file?: SlackFile; + style?: string; + text?: DescriptionElement; + timezone?: string; + type?: string; + url?: string; + value?: string; + workflow?: Workflow; } export interface Confirm { confirm?: DescriptionElement; - deny?: DescriptionElement; - style?: string; - text?: DescriptionElement; - title?: DescriptionElement; + deny?: DescriptionElement; + style?: string; + text?: DescriptionElement; + title?: DescriptionElement; } export interface DescriptionElement { - emoji?: boolean; - text?: string; - type?: DescriptionType; + emoji?: boolean; + text?: string; + type?: DescriptionType; verbatim?: boolean; } @@ -150,42 +150,42 @@ export enum DescriptionType { } export interface AccessoryElement { - border?: number; + border?: number; elements?: PurpleElement[]; - indent?: number; - offset?: number; - style?: string; - type?: FluffyType; + indent?: number; + offset?: number; + style?: string; + type?: FluffyType; } export interface PurpleElement { - channel_id?: string; - fallback?: string; - format?: string; - name?: string; - range?: string; - skin_tone?: number; - style?: Style; - team_id?: string; - text?: string; - timestamp?: string; - type?: PurpleType; - unicode?: string; - unsafe?: boolean; - url?: string; - user_id?: string; + channel_id?: string; + fallback?: string; + format?: string; + name?: string; + range?: string; + skin_tone?: number; + style?: Style; + team_id?: string; + text?: string; + timestamp?: string; + type?: PurpleType; + unicode?: string; + unsafe?: boolean; + url?: string; + user_id?: string; usergroup_id?: string; - value?: string; + value?: string; } export interface Style { - bold?: boolean; + bold?: boolean; client_highlight?: boolean; - code?: boolean; - highlight?: boolean; - italic?: boolean; - strike?: boolean; - unlink?: boolean; + code?: boolean; + highlight?: boolean; + italic?: boolean; + strike?: boolean; + unlink?: boolean; } export enum PurpleType { @@ -209,25 +209,25 @@ export enum FluffyType { } export interface Filter { - exclude_bot_users?: boolean; + exclude_bot_users?: boolean; exclude_external_shared_channels?: boolean; - include?: any[]; + include?: any[]; } export interface Option { description?: DescriptionElement; - text?: DescriptionElement; - url?: string; - value?: string; + text?: DescriptionElement; + url?: string; + value?: string; } export interface OptionGroup { - label?: DescriptionElement; + label?: DescriptionElement; options?: Option[]; } export interface SlackFile { - id?: string; + id?: string; url?: string; } @@ -237,358 +237,358 @@ export interface Workflow { export interface Trigger { customizable_input_parameters?: CustomizableInputParameter[]; - url?: string; + url?: string; } export interface CustomizableInputParameter { - name?: string; + name?: string; value?: string; } export interface Call { media_backend_type?: string; - v1?: V1; + v1?: V1; } export interface V1 { - active_participants?: Participant[]; - all_participants?: Participant[]; - app_icon_urls?: AppIconUrls; - app_id?: string; - channels?: string[]; - created_by?: string; - date_end?: number; - date_start?: number; + active_participants?: Participant[]; + all_participants?: Participant[]; + app_icon_urls?: AppIconUrls; + app_id?: string; + channels?: string[]; + created_by?: string; + date_end?: number; + date_start?: number; desktop_app_join_url?: string; - display_id?: string; - has_ended?: boolean; - id?: string; - is_dm_call?: boolean; - join_url?: string; - name?: string; - was_accepted?: boolean; - was_missed?: boolean; - was_rejected?: boolean; + display_id?: string; + has_ended?: boolean; + id?: string; + is_dm_call?: boolean; + join_url?: string; + name?: string; + was_accepted?: boolean; + was_missed?: boolean; + was_rejected?: boolean; } export interface Participant { - avatar_url?: string; + avatar_url?: string; display_name?: string; - external_id?: string; - slack_id?: string; + external_id?: string; + slack_id?: string; } export interface AppIconUrls { - image_1024?: string; - image_128?: string; - image_192?: string; - image_32?: string; - image_36?: string; - image_48?: string; - image_512?: string; - image_64?: string; - image_72?: string; - image_96?: string; + image_1024?: string; + image_128?: string; + image_192?: string; + image_32?: string; + image_36?: string; + image_48?: string; + image_512?: string; + image_64?: string; + image_72?: string; + image_96?: string; image_original?: string; } export interface File { - access?: string; - alt_txt?: string; - app_id?: string; - app_name?: string; - attachments?: any[]; - blocks?: TitleBlockElement[]; - bot_id?: string; - can_toggle_canvas_lock?: boolean; - canvas_template_mode?: string; - cc?: Cc[]; - channel_actions_count?: number; - channel_actions_ts?: string; - channels?: string[]; - comments_count?: number; - converted_pdf?: string; - created?: number; - deanimate?: string; - deanimate_gif?: string; - display_as_bot?: boolean; - dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; - duration_ms?: number; - edit_link?: string; - edit_timestamp?: number; - editable?: boolean; - editor?: string; - editors?: string[]; - external_id?: string; - external_type?: string; - external_url?: string; - favorites?: Favorite[]; - file_access?: string; - filetype?: string; - from?: Cc[]; - groups?: string[]; - has_more?: boolean; - has_more_shares?: boolean; - has_rich_preview?: boolean; - headers?: Headers; - hls?: string; - hls_embed?: string; - id?: string; - image_exif_rotation?: number; - ims?: string[]; - initial_comment?: InitialComment; - is_channel_space?: boolean; - is_external?: boolean; - is_public?: boolean; - is_starred?: boolean; - last_editor?: string; - last_read?: number; - lines?: number; - lines_more?: number; - linked_channel_id?: string; - list_limits?: ListLimits; - list_metadata?: ListMetadata; - media_display_type?: string; - media_progress?: MediaProgress; - mimetype?: string; - mode?: string; - mp4?: string; - mp4_low?: string; - name?: string; - non_owner_editable?: boolean; - num_stars?: number; - org_or_workspace_access?: string; - original_attachment_count?: number; - original_h?: string; - original_w?: string; - permalink?: string; - permalink_public?: string; - pinned_to?: string[]; - pjpeg?: string; - plain_text?: string; - pretty_type?: string; - preview?: string; - preview_highlight?: string; - preview_is_truncated?: boolean; - preview_plain_text?: string; + access?: string; + alt_txt?: string; + app_id?: string; + app_name?: string; + attachments?: any[]; + blocks?: TitleBlockElement[]; + bot_id?: string; + can_toggle_canvas_lock?: boolean; + canvas_template_mode?: string; + cc?: Cc[]; + channel_actions_count?: number; + channel_actions_ts?: string; + channels?: string[]; + comments_count?: number; + converted_pdf?: string; + created?: number; + deanimate?: string; + deanimate_gif?: string; + display_as_bot?: boolean; + dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; + duration_ms?: number; + edit_link?: string; + edit_timestamp?: number; + editable?: boolean; + editor?: string; + editors?: string[]; + external_id?: string; + external_type?: string; + external_url?: string; + favorites?: Favorite[]; + file_access?: string; + filetype?: string; + from?: Cc[]; + groups?: string[]; + has_more?: boolean; + has_more_shares?: boolean; + has_rich_preview?: boolean; + headers?: Headers; + hls?: string; + hls_embed?: string; + id?: string; + image_exif_rotation?: number; + ims?: string[]; + initial_comment?: InitialComment; + is_channel_space?: boolean; + is_external?: boolean; + is_public?: boolean; + is_starred?: boolean; + last_editor?: string; + last_read?: number; + lines?: number; + lines_more?: number; + linked_channel_id?: string; + list_limits?: ListLimits; + list_metadata?: ListMetadata; + media_display_type?: string; + media_progress?: MediaProgress; + mimetype?: string; + mode?: string; + mp4?: string; + mp4_low?: string; + name?: string; + non_owner_editable?: boolean; + num_stars?: number; + org_or_workspace_access?: string; + original_attachment_count?: number; + original_h?: string; + original_w?: string; + permalink?: string; + permalink_public?: string; + pinned_to?: string[]; + pjpeg?: string; + plain_text?: string; + pretty_type?: string; + preview?: string; + preview_highlight?: string; + preview_is_truncated?: boolean; + preview_plain_text?: string; private_channels_with_file_access_count?: number; - private_file_with_access_count?: number; - public_url_shared?: boolean; - quip_thread_id?: string; - reactions?: Reaction[]; - saved?: Saved; - sent_to_self?: boolean; - shares?: Shares; - show_badge?: boolean; - simplified_html?: string; - size?: number; - source_team?: string; - subject?: string; - subtype?: string; - team_pref_version_history_enabled?: boolean; - teams_shared_with?: any[]; - template_conversion_ts?: number; - template_description?: string; - template_icon?: string; - template_name?: string; - template_title?: string; - thumb_1024?: string; - thumb_1024_gif?: string; - thumb_1024_h?: string; - thumb_1024_w?: string; - thumb_160?: string; - thumb_160_gif?: string; - thumb_160_h?: string; - thumb_160_w?: string; - thumb_360?: string; - thumb_360_gif?: string; - thumb_360_h?: string; - thumb_360_w?: string; - thumb_480?: string; - thumb_480_gif?: string; - thumb_480_h?: string; - thumb_480_w?: string; - thumb_64?: string; - thumb_64_gif?: string; - thumb_64_h?: string; - thumb_64_w?: string; - thumb_720?: string; - thumb_720_gif?: string; - thumb_720_h?: string; - thumb_720_w?: string; - thumb_80?: string; - thumb_800?: string; - thumb_800_gif?: string; - thumb_800_h?: string; - thumb_800_w?: string; - thumb_80_gif?: string; - thumb_80_h?: string; - thumb_80_w?: string; - thumb_960?: string; - thumb_960_gif?: string; - thumb_960_h?: string; - thumb_960_w?: string; - thumb_gif?: string; - thumb_pdf?: string; - thumb_pdf_h?: string; - thumb_pdf_w?: string; - thumb_tiny?: string; - thumb_video?: string; - thumb_video_h?: number; - thumb_video_w?: number; - timestamp?: number; - title?: string; - title_blocks?: TitleBlockElement[]; - to?: Cc[]; - transcription?: Transcription; - update_notification?: number; - updated?: number; - url_private?: string; - url_private_download?: string; - url_static_preview?: string; - user?: string; - user_team?: string; - username?: string; - vtt?: string; + private_file_with_access_count?: number; + public_url_shared?: boolean; + quip_thread_id?: string; + reactions?: Reaction[]; + saved?: Saved; + sent_to_self?: boolean; + shares?: Shares; + show_badge?: boolean; + simplified_html?: string; + size?: number; + source_team?: string; + subject?: string; + subtype?: string; + team_pref_version_history_enabled?: boolean; + teams_shared_with?: any[]; + template_conversion_ts?: number; + template_description?: string; + template_icon?: string; + template_name?: string; + template_title?: string; + thumb_1024?: string; + thumb_1024_gif?: string; + thumb_1024_h?: string; + thumb_1024_w?: string; + thumb_160?: string; + thumb_160_gif?: string; + thumb_160_h?: string; + thumb_160_w?: string; + thumb_360?: string; + thumb_360_gif?: string; + thumb_360_h?: string; + thumb_360_w?: string; + thumb_480?: string; + thumb_480_gif?: string; + thumb_480_h?: string; + thumb_480_w?: string; + thumb_64?: string; + thumb_64_gif?: string; + thumb_64_h?: string; + thumb_64_w?: string; + thumb_720?: string; + thumb_720_gif?: string; + thumb_720_h?: string; + thumb_720_w?: string; + thumb_80?: string; + thumb_800?: string; + thumb_800_gif?: string; + thumb_800_h?: string; + thumb_800_w?: string; + thumb_80_gif?: string; + thumb_80_h?: string; + thumb_80_w?: string; + thumb_960?: string; + thumb_960_gif?: string; + thumb_960_h?: string; + thumb_960_w?: string; + thumb_gif?: string; + thumb_pdf?: string; + thumb_pdf_h?: string; + thumb_pdf_w?: string; + thumb_tiny?: string; + thumb_video?: string; + thumb_video_h?: number; + thumb_video_w?: number; + timestamp?: number; + title?: string; + title_blocks?: TitleBlockElement[]; + to?: Cc[]; + transcription?: Transcription; + update_notification?: number; + updated?: number; + url_private?: string; + url_private_download?: string; + url_static_preview?: string; + user?: string; + user_team?: string; + username?: string; + vtt?: string; } export interface TitleBlockElement { - accessory?: Accessory; - alt_text?: string; - app_collaborators?: string[]; - app_id?: string; - author_name?: string; - block_id?: string; - bot_user_id?: string; - button_label?: string; - description?: DescriptionElement | string; - developer_trace_id?: string; - elements?: Accessory[]; - fallback?: string; - fields?: DescriptionElement[]; - function_trigger_id?: string; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - is_animated?: boolean; - is_workflow_app?: boolean; - owning_team_id?: string; - provider_icon_url?: string; - provider_name?: string; + accessory?: Accessory; + alt_text?: string; + app_collaborators?: string[]; + app_id?: string; + author_name?: string; + block_id?: string; + bot_user_id?: string; + button_label?: string; + description?: DescriptionElement | string; + developer_trace_id?: string; + elements?: Accessory[]; + fallback?: string; + fields?: DescriptionElement[]; + function_trigger_id?: string; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + is_animated?: boolean; + is_workflow_app?: boolean; + owning_team_id?: string; + provider_icon_url?: string; + provider_name?: string; sales_home_workflow_app_type?: number; - share_url?: string; - slack_file?: SlackFile; - text?: DescriptionElement; - thumbnail_url?: string; - title?: DescriptionElement | string; - title_url?: string; - trigger_subtype?: string; - trigger_type?: string; - type?: string; - url?: string; - video_url?: string; - workflow_id?: string; + share_url?: string; + slack_file?: SlackFile; + text?: DescriptionElement; + thumbnail_url?: string; + title?: DescriptionElement | string; + title_url?: string; + trigger_subtype?: string; + trigger_type?: string; + type?: string; + url?: string; + video_url?: string; + workflow_id?: string; } export interface Cc { - address?: string; - name?: string; + address?: string; + name?: string; original?: string; } export interface DmMpdmUsersWithFileAccess { - access?: string; + access?: string; user_id?: string; } export interface Favorite { - collection_id?: string; + collection_id?: string; collection_name?: string; - position?: string; + position?: string; } export interface Headers { - date?: string; + date?: string; in_reply_to?: string; - message_id?: string; - reply_to?: string; + message_id?: string; + reply_to?: string; } export interface InitialComment { - channel?: string; - comment?: string; - created?: number; - id?: string; - is_intro?: boolean; + channel?: string; + comment?: string; + created?: number; + id?: string; + is_intro?: boolean; timestamp?: number; - user?: string; + user?: string; } export interface ListLimits { - column_count?: number; - column_count_limit?: number; + column_count?: number; + column_count_limit?: number; over_column_maximum?: boolean; - over_row_maximum?: boolean; - over_view_maximum?: boolean; - row_count?: number; - row_count_limit?: number; - view_count?: number; - view_count_limit?: number; + over_row_maximum?: boolean; + over_view_maximum?: boolean; + row_count?: number; + row_count_limit?: number; + view_count?: number; + view_count_limit?: number; } export interface ListMetadata { creation_source?: CreationSource; - description?: string; - icon?: string; - icon_team_id?: string; - icon_url?: string; - integrations?: string[]; - is_trial?: boolean; - schema?: Schema[]; - views?: View[]; + description?: string; + icon?: string; + icon_team_id?: string; + icon_url?: string; + integrations?: string[]; + is_trial?: boolean; + schema?: Schema[]; + views?: View[]; } export interface CreationSource { - reference_id?: string; - type?: string; + reference_id?: string; + type?: string; workflow_function_id?: string; } export interface Schema { - id?: string; + id?: string; is_primary_column?: boolean; - key?: string; - name?: string; - options?: Options; - type?: string; + key?: string; + name?: string; + options?: Options; + type?: string; } export interface Options { - canvas_id?: string; + canvas_id?: string; canvas_placeholder_mapping?: CanvasPlaceholderMapping[]; - choices?: Choice[]; - currency?: string; - currency_format?: string; - date_format?: string; - default_value?: string; - default_value_typed?: DefaultValueTyped; - emoji?: string; - emoji_team_id?: string; - for_assignment?: boolean; - format?: string; - linked_to?: string[]; - mark_as_done_when_checked?: boolean; - max?: number; - notify_users?: boolean; - precision?: number; - rounding?: string; - show_member_name?: boolean; - time_format?: string; + choices?: Choice[]; + currency?: string; + currency_format?: string; + date_format?: string; + default_value?: string; + default_value_typed?: DefaultValueTyped; + emoji?: string; + emoji_team_id?: string; + for_assignment?: boolean; + format?: string; + linked_to?: string[]; + mark_as_done_when_checked?: boolean; + max?: number; + notify_users?: boolean; + precision?: number; + rounding?: string; + show_member_name?: boolean; + time_format?: string; } export interface CanvasPlaceholderMapping { - column?: string; + column?: string; variable?: string; } @@ -603,64 +603,64 @@ export interface DefaultValueTyped { } export interface View { - columns?: Column[]; - created_by?: string; - date_created?: number; - id?: string; + columns?: Column[]; + created_by?: string; + date_created?: number; + id?: string; is_all_items_view?: boolean; - is_locked?: boolean; - name?: string; - position?: string; + is_locked?: boolean; + name?: string; + position?: string; stick_column_left?: boolean; - type?: string; + type?: string; } export interface Column { - id?: string; - key?: string; + id?: string; + key?: string; position?: string; - visible?: boolean; - width?: number; + visible?: boolean; + width?: number; } export interface MediaProgress { - duration_ms?: number; + duration_ms?: number; max_offset_ms?: number; - offset_ms?: number; + offset_ms?: number; } export interface Reaction { count?: number; - name?: string; - url?: string; + name?: string; + url?: string; users?: string[]; } export interface Saved { date_completed?: number; - date_due?: number; - is_archived?: boolean; - state?: string; + date_due?: number; + is_archived?: boolean; + state?: string; } export interface Shares { private?: { [key: string]: Private[] }; - public?: { [key: string]: Private[] }; + public?: { [key: string]: Private[] }; } export interface Private { - access?: string; - channel_name?: string; - date_last_shared?: number; - latest_reply?: string; - reply_count?: number; - reply_users?: string[]; + access?: string; + channel_name?: string; + date_last_shared?: number; + latest_reply?: string; + reply_count?: number; + reply_users?: string[]; reply_users_count?: number; - share_user_id?: string; - source?: string; - team_id?: string; - thread_ts?: string; - ts?: string; + share_user_id?: string; + source?: string; + team_id?: string; + thread_ts?: string; + ts?: string; } export interface Transcription { @@ -669,11 +669,11 @@ export interface Transcription { } export interface BotProfile { - app_id?: string; + app_id?: string; deleted?: boolean; - icons?: Icons; - id?: string; - name?: string; + icons?: Icons; + id?: string; + name?: string; team_id?: string; updated?: number; } @@ -685,40 +685,39 @@ export interface Icons { } export interface Room { - app_id?: string; - attached_file_ids?: string[]; - background_id?: string; - call_family?: string; - canvas_background?: string; - canvas_thread_ts?: string; - channels?: string[]; - created_by?: string; - date_end?: number; - date_start?: number; - display_id?: string; - external_unique_id?: string; - has_ended?: boolean; - id?: string; - is_dm_call?: boolean; - is_prewarmed?: boolean; - is_scheduled?: boolean; - knocks?: Knocks; - last_invite_status_by_user?: Knocks; - media_backend_type?: string; - media_server?: string; - name?: string; - participant_history?: string[]; - participants?: string[]; - participants_camera_off?: string[]; - participants_camera_on?: string[]; + app_id?: string; + attached_file_ids?: string[]; + background_id?: string; + call_family?: string; + canvas_background?: string; + canvas_thread_ts?: string; + channels?: string[]; + created_by?: string; + date_end?: number; + date_start?: number; + display_id?: string; + external_unique_id?: string; + has_ended?: boolean; + id?: string; + is_dm_call?: boolean; + is_prewarmed?: boolean; + is_scheduled?: boolean; + knocks?: Knocks; + last_invite_status_by_user?: Knocks; + media_backend_type?: string; + media_server?: string; + name?: string; + participant_history?: string[]; + participants?: string[]; + participants_camera_off?: string[]; + participants_camera_on?: string[]; participants_screenshare_off?: string[]; - participants_screenshare_on?: string[]; - pending_invitees?: Knocks; - thread_root_ts?: string; - was_accepted?: boolean; - was_missed?: boolean; - was_rejected?: boolean; + participants_screenshare_on?: string[]; + pending_invitees?: Knocks; + thread_root_ts?: string; + was_accepted?: boolean; + was_missed?: boolean; + was_rejected?: boolean; } -export interface Knocks { -} +export type Knocks = {}; diff --git a/packages/web-api/src/types/response/ReactionsListResponse.ts b/packages/web-api/src/types/response/ReactionsListResponse.ts index bb775928e..d0f5566a1 100644 --- a/packages/web-api/src/types/response/ReactionsListResponse.ts +++ b/packages/web-api/src/types/response/ReactionsListResponse.ts @@ -8,256 +8,256 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ReactionsListResponse = WebAPICallResult & { - error?: string; - items?: Item[]; - needed?: string; - ok?: boolean; - paging?: Paging; - provided?: string; + error?: string; + items?: Item[]; + needed?: string; + ok?: boolean; + paging?: Paging; + provided?: string; response_metadata?: ResponseMetadata; }; export interface Item { channel?: string; message?: ItemMessage; - type?: string; + type?: string; } export interface ItemMessage { - app_id?: string; - attachments?: Attachment[]; - blocks?: PurpleBlock[]; - bot_id?: string; - bot_profile?: BotProfile; - channel?: string; - client_msg_id?: string; - display_as_bot?: boolean; - edited?: Edited; - files?: FileElement[]; - icons?: BotProfileIcons; - inviter?: string; - is_locked?: boolean; - latest_reply?: string; - no_notifications?: boolean; - parent_user_id?: string; - permalink?: string; - reactions?: Reaction[]; - reply_count?: number; - reply_users?: string[]; + app_id?: string; + attachments?: Attachment[]; + blocks?: PurpleBlock[]; + bot_id?: string; + bot_profile?: BotProfile; + channel?: string; + client_msg_id?: string; + display_as_bot?: boolean; + edited?: Edited; + files?: FileElement[]; + icons?: BotProfileIcons; + inviter?: string; + is_locked?: boolean; + latest_reply?: string; + no_notifications?: boolean; + parent_user_id?: string; + permalink?: string; + reactions?: Reaction[]; + reply_count?: number; + reply_users?: string[]; reply_users_count?: number; - room?: Room; - subscribed?: boolean; - subtype?: string; - team?: string; - text?: string; - thread_ts?: string; - ts?: string; - type?: string; - upload?: boolean; - user?: string; - username?: string; + room?: Room; + subscribed?: boolean; + subtype?: string; + team?: string; + text?: string; + thread_ts?: string; + ts?: string; + type?: string; + upload?: boolean; + user?: string; + username?: string; } export interface Attachment { - actions?: Action[]; - app_id?: string; - app_unfurl_url?: string; - author_icon?: string; - author_id?: string; - author_link?: string; - author_name?: string; - author_subname?: string; - blocks?: TitleBlockElement[]; - bot_id?: string; - callback_id?: string; - channel_id?: string; - channel_name?: string; - channel_team?: string; - color?: string; - fallback?: string; - fields?: AttachmentField[]; - file_id?: string; - filename?: string; - files?: FileElement[]; - footer?: string; - footer_icon?: string; - from_url?: string; - hide_border?: boolean; - hide_color?: boolean; - id?: number; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - indent?: boolean; - is_app_unfurl?: boolean; - is_file_attachment?: boolean; - is_msg_unfurl?: boolean; - is_reply_unfurl?: boolean; + actions?: Action[]; + app_id?: string; + app_unfurl_url?: string; + author_icon?: string; + author_id?: string; + author_link?: string; + author_name?: string; + author_subname?: string; + blocks?: TitleBlockElement[]; + bot_id?: string; + callback_id?: string; + channel_id?: string; + channel_name?: string; + channel_team?: string; + color?: string; + fallback?: string; + fields?: AttachmentField[]; + file_id?: string; + filename?: string; + files?: FileElement[]; + footer?: string; + footer_icon?: string; + from_url?: string; + hide_border?: boolean; + hide_color?: boolean; + id?: number; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + indent?: boolean; + is_app_unfurl?: boolean; + is_file_attachment?: boolean; + is_msg_unfurl?: boolean; + is_reply_unfurl?: boolean; is_thread_root_unfurl?: boolean; - list?: List; - list_record?: PurpleListRecord; - list_record_id?: string; - list_records?: ListRecordElement[]; - list_schema?: Schema[]; - list_view?: View; - list_view_id?: string; - message_blocks?: MessageBlock[]; - metadata?: AttachmentMetadata; - mimetype?: string; - mrkdwn_in?: string[]; - msg_subtype?: string; - original_url?: string; - pretext?: string; - preview?: Preview; - service_icon?: string; - service_name?: string; - service_url?: string; - size?: number; - text?: string; - thumb_height?: number; - thumb_url?: string; - thumb_width?: number; - title?: string; - title_link?: string; - ts?: string; - url?: string; - video_html?: string; - video_html_height?: number; - video_html_width?: number; - video_url?: string; + list?: List; + list_record?: PurpleListRecord; + list_record_id?: string; + list_records?: ListRecordElement[]; + list_schema?: Schema[]; + list_view?: View; + list_view_id?: string; + message_blocks?: MessageBlock[]; + metadata?: AttachmentMetadata; + mimetype?: string; + mrkdwn_in?: string[]; + msg_subtype?: string; + original_url?: string; + pretext?: string; + preview?: Preview; + service_icon?: string; + service_name?: string; + service_url?: string; + size?: number; + text?: string; + thumb_height?: number; + thumb_url?: string; + thumb_width?: number; + title?: string; + title_link?: string; + ts?: string; + url?: string; + video_html?: string; + video_html_height?: number; + video_html_width?: number; + video_url?: string; } export interface Action { - confirm?: ActionConfirm; - data_source?: string; - id?: string; + confirm?: ActionConfirm; + data_source?: string; + id?: string; min_query_length?: number; - name?: string; - option_groups?: ActionOptionGroup[]; - options?: SelectedOptionElement[]; + name?: string; + option_groups?: ActionOptionGroup[]; + options?: SelectedOptionElement[]; selected_options?: SelectedOptionElement[]; - style?: string; - text?: string; - type?: string; - url?: string; - value?: string; + style?: string; + text?: string; + type?: string; + url?: string; + value?: string; } export interface ActionConfirm { dismiss_text?: string; - ok_text?: string; - text?: string; - title?: string; + ok_text?: string; + text?: string; + title?: string; } export interface ActionOptionGroup { options?: SelectedOptionElement[]; - text?: string; + text?: string; } export interface SelectedOptionElement { - text?: string; + text?: string; value?: string; } export interface TitleBlockElement { - accessory?: Accessory; - alt_text?: string; - app_collaborators?: string[]; - app_id?: string; - author_name?: string; - block_id?: string; - bot_user_id?: string; - button_label?: string; - description?: DescriptionElement | string; - developer_trace_id?: string; - elements?: Accessory[]; - fallback?: string; - fields?: DescriptionElement[]; - function_trigger_id?: string; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - is_animated?: boolean; - is_workflow_app?: boolean; - owning_team_id?: string; - provider_icon_url?: string; - provider_name?: string; + accessory?: Accessory; + alt_text?: string; + app_collaborators?: string[]; + app_id?: string; + author_name?: string; + block_id?: string; + bot_user_id?: string; + button_label?: string; + description?: DescriptionElement | string; + developer_trace_id?: string; + elements?: Accessory[]; + fallback?: string; + fields?: DescriptionElement[]; + function_trigger_id?: string; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + is_animated?: boolean; + is_workflow_app?: boolean; + owning_team_id?: string; + provider_icon_url?: string; + provider_name?: string; sales_home_workflow_app_type?: number; - share_url?: string; - slack_file?: SlackFile; - text?: DescriptionElement; - thumbnail_url?: string; - title?: DescriptionElement | string; - title_url?: string; - trigger_subtype?: string; - trigger_type?: string; - type?: BlockType; - url?: string; - video_url?: string; - workflow_id?: string; + share_url?: string; + slack_file?: SlackFile; + text?: DescriptionElement; + thumbnail_url?: string; + title?: DescriptionElement | string; + title_url?: string; + trigger_subtype?: string; + trigger_type?: string; + type?: BlockType; + url?: string; + video_url?: string; + workflow_id?: string; } export interface Accessory { - accessibility_label?: string; - action_id?: string; - alt_text?: string; - border?: number; - confirm?: AccessoryConfirm; + accessibility_label?: string; + action_id?: string; + alt_text?: string; + border?: number; + confirm?: AccessoryConfirm; default_to_current_conversation?: boolean; - elements?: AccessoryElement[]; - fallback?: string; - filter?: Filter; - focus_on_load?: boolean; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - indent?: number; - initial_channel?: string; - initial_channels?: string[]; - initial_conversation?: string; - initial_conversations?: string[]; - initial_date?: string; - initial_date_time?: number; - initial_option?: InitialOptionElement; - initial_options?: InitialOptionElement[]; - initial_time?: string; - initial_user?: string; - initial_users?: string[]; - max_selected_items?: number; - min_query_length?: number; - offset?: number; - option_groups?: AccessoryOptionGroup[]; - options?: InitialOptionElement[]; - placeholder?: DescriptionElement; - response_url_enabled?: boolean; - slack_file?: SlackFile; - style?: string; - text?: DescriptionElement; - timezone?: string; - type?: string; - url?: string; - value?: string; - workflow?: Workflow; + elements?: AccessoryElement[]; + fallback?: string; + filter?: Filter; + focus_on_load?: boolean; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + indent?: number; + initial_channel?: string; + initial_channels?: string[]; + initial_conversation?: string; + initial_conversations?: string[]; + initial_date?: string; + initial_date_time?: number; + initial_option?: InitialOptionElement; + initial_options?: InitialOptionElement[]; + initial_time?: string; + initial_user?: string; + initial_users?: string[]; + max_selected_items?: number; + min_query_length?: number; + offset?: number; + option_groups?: AccessoryOptionGroup[]; + options?: InitialOptionElement[]; + placeholder?: DescriptionElement; + response_url_enabled?: boolean; + slack_file?: SlackFile; + style?: string; + text?: DescriptionElement; + timezone?: string; + type?: string; + url?: string; + value?: string; + workflow?: Workflow; } export interface AccessoryConfirm { confirm?: DescriptionElement; - deny?: DescriptionElement; - style?: string; - text?: DescriptionElement; - title?: DescriptionElement; + deny?: DescriptionElement; + style?: string; + text?: DescriptionElement; + title?: DescriptionElement; } export interface DescriptionElement { - emoji?: boolean; - text?: string; - type?: DescriptionType; + emoji?: boolean; + text?: string; + type?: DescriptionType; verbatim?: boolean; } @@ -267,42 +267,42 @@ export enum DescriptionType { } export interface AccessoryElement { - border?: number; + border?: number; elements?: PurpleElement[]; - indent?: number; - offset?: number; - style?: string; - type?: FluffyType; + indent?: number; + offset?: number; + style?: string; + type?: FluffyType; } export interface PurpleElement { - channel_id?: string; - fallback?: string; - format?: string; - name?: string; - range?: string; - skin_tone?: number; - style?: Style; - team_id?: string; - text?: string; - timestamp?: string; - type?: PurpleType; - unicode?: string; - unsafe?: boolean; - url?: string; - user_id?: string; + channel_id?: string; + fallback?: string; + format?: string; + name?: string; + range?: string; + skin_tone?: number; + style?: Style; + team_id?: string; + text?: string; + timestamp?: string; + type?: PurpleType; + unicode?: string; + unsafe?: boolean; + url?: string; + user_id?: string; usergroup_id?: string; - value?: string; + value?: string; } export interface Style { - bold?: boolean; + bold?: boolean; client_highlight?: boolean; - code?: boolean; - highlight?: boolean; - italic?: boolean; - strike?: boolean; - unlink?: boolean; + code?: boolean; + highlight?: boolean; + italic?: boolean; + strike?: boolean; + unlink?: boolean; } export enum PurpleType { @@ -326,25 +326,25 @@ export enum FluffyType { } export interface Filter { - exclude_bot_users?: boolean; + exclude_bot_users?: boolean; exclude_external_shared_channels?: boolean; - include?: any[]; + include?: any[]; } export interface InitialOptionElement { description?: DescriptionElement; - text?: DescriptionElement; - url?: string; - value?: string; + text?: DescriptionElement; + url?: string; + value?: string; } export interface AccessoryOptionGroup { - label?: DescriptionElement; + label?: DescriptionElement; options?: InitialOptionElement[]; } export interface SlackFile { - id?: string; + id?: string; url?: string; } @@ -354,11 +354,11 @@ export interface Workflow { export interface Trigger { customizable_input_parameters?: CustomizableInputParameter[]; - url?: string; + url?: string; } export interface CustomizableInputParameter { - name?: string; + name?: string; value?: string; } @@ -380,263 +380,263 @@ export interface AttachmentField { } export interface FileElement { - access?: string; - alt_txt?: string; - app_id?: string; - app_name?: string; - attachments?: any[]; - blocks?: TitleBlockElement[]; - bot_id?: string; - can_toggle_canvas_lock?: boolean; - canvas_template_mode?: string; - cc?: Cc[]; - channel_actions_count?: number; - channel_actions_ts?: string; - channels?: string[]; - comments_count?: number; - converted_pdf?: string; - created?: number; - deanimate?: string; - deanimate_gif?: string; - display_as_bot?: boolean; - dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; - duration_ms?: number; - edit_link?: string; - edit_timestamp?: number; - editable?: boolean; - editor?: string; - editors?: string[]; - external_id?: string; - external_type?: string; - external_url?: string; - favorites?: Favorite[]; - file_access?: string; - filetype?: string; - from?: Cc[]; - groups?: string[]; - has_more?: boolean; - has_more_shares?: boolean; - has_rich_preview?: boolean; - headers?: Headers; - hls?: string; - hls_embed?: string; - id?: string; - image_exif_rotation?: number; - ims?: string[]; - initial_comment?: InitialComment; - is_channel_space?: boolean; - is_external?: boolean; - is_public?: boolean; - is_starred?: boolean; - last_editor?: string; - last_read?: number; - lines?: number; - lines_more?: number; - linked_channel_id?: string; - list_limits?: ListLimits; - list_metadata?: ListMetadata; - media_display_type?: string; - media_progress?: MediaProgress; - mimetype?: string; - mode?: string; - mp4?: string; - mp4_low?: string; - name?: string; - non_owner_editable?: boolean; - num_stars?: number; - org_or_workspace_access?: string; - original_attachment_count?: number; - original_h?: string; - original_w?: string; - permalink?: string; - permalink_public?: string; - pinned_to?: string[]; - pjpeg?: string; - plain_text?: string; - pretty_type?: string; - preview?: string; - preview_highlight?: string; - preview_is_truncated?: boolean; - preview_plain_text?: string; + access?: string; + alt_txt?: string; + app_id?: string; + app_name?: string; + attachments?: any[]; + blocks?: TitleBlockElement[]; + bot_id?: string; + can_toggle_canvas_lock?: boolean; + canvas_template_mode?: string; + cc?: Cc[]; + channel_actions_count?: number; + channel_actions_ts?: string; + channels?: string[]; + comments_count?: number; + converted_pdf?: string; + created?: number; + deanimate?: string; + deanimate_gif?: string; + display_as_bot?: boolean; + dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; + duration_ms?: number; + edit_link?: string; + edit_timestamp?: number; + editable?: boolean; + editor?: string; + editors?: string[]; + external_id?: string; + external_type?: string; + external_url?: string; + favorites?: Favorite[]; + file_access?: string; + filetype?: string; + from?: Cc[]; + groups?: string[]; + has_more?: boolean; + has_more_shares?: boolean; + has_rich_preview?: boolean; + headers?: Headers; + hls?: string; + hls_embed?: string; + id?: string; + image_exif_rotation?: number; + ims?: string[]; + initial_comment?: InitialComment; + is_channel_space?: boolean; + is_external?: boolean; + is_public?: boolean; + is_starred?: boolean; + last_editor?: string; + last_read?: number; + lines?: number; + lines_more?: number; + linked_channel_id?: string; + list_limits?: ListLimits; + list_metadata?: ListMetadata; + media_display_type?: string; + media_progress?: MediaProgress; + mimetype?: string; + mode?: string; + mp4?: string; + mp4_low?: string; + name?: string; + non_owner_editable?: boolean; + num_stars?: number; + org_or_workspace_access?: string; + original_attachment_count?: number; + original_h?: string; + original_w?: string; + permalink?: string; + permalink_public?: string; + pinned_to?: string[]; + pjpeg?: string; + plain_text?: string; + pretty_type?: string; + preview?: string; + preview_highlight?: string; + preview_is_truncated?: boolean; + preview_plain_text?: string; private_channels_with_file_access_count?: number; - private_file_with_access_count?: number; - public_url_shared?: boolean; - quip_thread_id?: string; - reactions?: Reaction[]; - saved?: Saved; - sent_to_self?: boolean; - shares?: Shares; - show_badge?: boolean; - simplified_html?: string; - size?: number; - source_team?: string; - subject?: string; - subtype?: string; - team_pref_version_history_enabled?: boolean; - teams_shared_with?: any[]; - template_conversion_ts?: number; - template_description?: string; - template_icon?: string; - template_name?: string; - template_title?: string; - thumb_1024?: string; - thumb_1024_gif?: string; - thumb_1024_h?: string; - thumb_1024_w?: string; - thumb_160?: string; - thumb_160_gif?: string; - thumb_160_h?: string; - thumb_160_w?: string; - thumb_360?: string; - thumb_360_gif?: string; - thumb_360_h?: string; - thumb_360_w?: string; - thumb_480?: string; - thumb_480_gif?: string; - thumb_480_h?: string; - thumb_480_w?: string; - thumb_64?: string; - thumb_64_gif?: string; - thumb_64_h?: string; - thumb_64_w?: string; - thumb_720?: string; - thumb_720_gif?: string; - thumb_720_h?: string; - thumb_720_w?: string; - thumb_80?: string; - thumb_800?: string; - thumb_800_gif?: string; - thumb_800_h?: string; - thumb_800_w?: string; - thumb_80_gif?: string; - thumb_80_h?: string; - thumb_80_w?: string; - thumb_960?: string; - thumb_960_gif?: string; - thumb_960_h?: string; - thumb_960_w?: string; - thumb_gif?: string; - thumb_pdf?: string; - thumb_pdf_h?: string; - thumb_pdf_w?: string; - thumb_tiny?: string; - thumb_video?: string; - thumb_video_h?: number; - thumb_video_w?: number; - timestamp?: number; - title?: string; - title_blocks?: TitleBlockElement[]; - to?: Cc[]; - transcription?: Transcription; - update_notification?: number; - updated?: number; - url_private?: string; - url_private_download?: string; - url_static_preview?: string; - user?: string; - user_team?: string; - username?: string; - vtt?: string; + private_file_with_access_count?: number; + public_url_shared?: boolean; + quip_thread_id?: string; + reactions?: Reaction[]; + saved?: Saved; + sent_to_self?: boolean; + shares?: Shares; + show_badge?: boolean; + simplified_html?: string; + size?: number; + source_team?: string; + subject?: string; + subtype?: string; + team_pref_version_history_enabled?: boolean; + teams_shared_with?: any[]; + template_conversion_ts?: number; + template_description?: string; + template_icon?: string; + template_name?: string; + template_title?: string; + thumb_1024?: string; + thumb_1024_gif?: string; + thumb_1024_h?: string; + thumb_1024_w?: string; + thumb_160?: string; + thumb_160_gif?: string; + thumb_160_h?: string; + thumb_160_w?: string; + thumb_360?: string; + thumb_360_gif?: string; + thumb_360_h?: string; + thumb_360_w?: string; + thumb_480?: string; + thumb_480_gif?: string; + thumb_480_h?: string; + thumb_480_w?: string; + thumb_64?: string; + thumb_64_gif?: string; + thumb_64_h?: string; + thumb_64_w?: string; + thumb_720?: string; + thumb_720_gif?: string; + thumb_720_h?: string; + thumb_720_w?: string; + thumb_80?: string; + thumb_800?: string; + thumb_800_gif?: string; + thumb_800_h?: string; + thumb_800_w?: string; + thumb_80_gif?: string; + thumb_80_h?: string; + thumb_80_w?: string; + thumb_960?: string; + thumb_960_gif?: string; + thumb_960_h?: string; + thumb_960_w?: string; + thumb_gif?: string; + thumb_pdf?: string; + thumb_pdf_h?: string; + thumb_pdf_w?: string; + thumb_tiny?: string; + thumb_video?: string; + thumb_video_h?: number; + thumb_video_w?: number; + timestamp?: number; + title?: string; + title_blocks?: TitleBlockElement[]; + to?: Cc[]; + transcription?: Transcription; + update_notification?: number; + updated?: number; + url_private?: string; + url_private_download?: string; + url_static_preview?: string; + user?: string; + user_team?: string; + username?: string; + vtt?: string; } export interface Cc { - address?: string; - name?: string; + address?: string; + name?: string; original?: string; } export interface DmMpdmUsersWithFileAccess { - access?: string; + access?: string; user_id?: string; } export interface Favorite { - collection_id?: string; + collection_id?: string; collection_name?: string; - position?: string; + position?: string; } export interface Headers { - date?: string; + date?: string; in_reply_to?: string; - message_id?: string; - reply_to?: string; + message_id?: string; + reply_to?: string; } export interface InitialComment { - channel?: string; - comment?: string; - created?: number; - id?: string; - is_intro?: boolean; + channel?: string; + comment?: string; + created?: number; + id?: string; + is_intro?: boolean; timestamp?: number; - user?: string; + user?: string; } export interface ListLimits { - column_count?: number; - column_count_limit?: number; + column_count?: number; + column_count_limit?: number; over_column_maximum?: boolean; - over_row_maximum?: boolean; - over_view_maximum?: boolean; - row_count?: number; - row_count_limit?: number; - view_count?: number; - view_count_limit?: number; + over_row_maximum?: boolean; + over_view_maximum?: boolean; + row_count?: number; + row_count_limit?: number; + view_count?: number; + view_count_limit?: number; } export interface ListMetadata { creation_source?: CreationSource; - description?: string; - icon?: string; - icon_team_id?: string; - icon_url?: string; - integrations?: string[]; - is_trial?: boolean; - schema?: Schema[]; - views?: View[]; + description?: string; + icon?: string; + icon_team_id?: string; + icon_url?: string; + integrations?: string[]; + is_trial?: boolean; + schema?: Schema[]; + views?: View[]; } export interface CreationSource { - reference_id?: string; - type?: string; + reference_id?: string; + type?: string; workflow_function_id?: string; } export interface Schema { - id?: string; + id?: string; is_primary_column?: boolean; - key?: string; - name?: string; - options?: Options; - type?: string; + key?: string; + name?: string; + options?: Options; + type?: string; } export interface Options { - canvas_id?: string; + canvas_id?: string; canvas_placeholder_mapping?: CanvasPlaceholderMapping[]; - choices?: Choice[]; - currency?: string; - currency_format?: string; - date_format?: string; - default_value?: string; - default_value_typed?: DefaultValueTyped; - emoji?: string; - emoji_team_id?: string; - for_assignment?: boolean; - format?: string; - linked_to?: string[]; - mark_as_done_when_checked?: boolean; - max?: number; - notify_users?: boolean; - precision?: number; - rounding?: string; - show_member_name?: boolean; - time_format?: string; + choices?: Choice[]; + currency?: string; + currency_format?: string; + date_format?: string; + default_value?: string; + default_value_typed?: DefaultValueTyped; + emoji?: string; + emoji_team_id?: string; + for_assignment?: boolean; + format?: string; + linked_to?: string[]; + mark_as_done_when_checked?: boolean; + max?: number; + notify_users?: boolean; + precision?: number; + rounding?: string; + show_member_name?: boolean; + time_format?: string; } export interface CanvasPlaceholderMapping { - column?: string; + column?: string; variable?: string; } @@ -651,64 +651,64 @@ export interface DefaultValueTyped { } export interface View { - columns?: Column[]; - created_by?: string; - date_created?: number; - id?: string; + columns?: Column[]; + created_by?: string; + date_created?: number; + id?: string; is_all_items_view?: boolean; - is_locked?: boolean; - name?: string; - position?: string; + is_locked?: boolean; + name?: string; + position?: string; stick_column_left?: boolean; - type?: string; + type?: string; } export interface Column { - id?: string; - key?: string; + id?: string; + key?: string; position?: string; - visible?: boolean; - width?: number; + visible?: boolean; + width?: number; } export interface MediaProgress { - duration_ms?: number; + duration_ms?: number; max_offset_ms?: number; - offset_ms?: number; + offset_ms?: number; } export interface Reaction { count?: number; - name?: string; - url?: string; + name?: string; + url?: string; users?: string[]; } export interface Saved { date_completed?: number; - date_due?: number; - is_archived?: boolean; - state?: string; + date_due?: number; + is_archived?: boolean; + state?: string; } export interface Shares { private?: { [key: string]: Private[] }; - public?: { [key: string]: Private[] }; + public?: { [key: string]: Private[] }; } export interface Private { - access?: string; - channel_name?: string; - date_last_shared?: number; - latest_reply?: string; - reply_count?: number; - reply_users?: string[]; + access?: string; + channel_name?: string; + date_last_shared?: number; + latest_reply?: string; + reply_count?: number; + reply_users?: string[]; reply_users_count?: number; - share_user_id?: string; - source?: string; - team_id?: string; - thread_ts?: string; - ts?: string; + share_user_id?: string; + source?: string; + team_id?: string; + thread_ts?: string; + ts?: string; } export interface Transcription { @@ -717,48 +717,47 @@ export interface Transcription { } export interface List { - channels?: string[]; - comments_count?: number; - created?: number; - display_as_bot?: boolean; - dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; - editable?: boolean; - external_type?: string; - file_access?: string; - filetype?: string; - groups?: string[]; - has_more_shares?: boolean; - has_rich_preview?: boolean; - id?: string; - ims?: string[]; - is_external?: boolean; - is_public?: boolean; - last_editor?: string; - list_limits?: ListLimits; - list_metadata?: ListMetadata; - mimetype?: string; - mode?: string; - name?: string; - permalink?: string; - permalink_public?: string; - pretty_type?: string; + channels?: string[]; + comments_count?: number; + created?: number; + display_as_bot?: boolean; + dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; + editable?: boolean; + external_type?: string; + file_access?: string; + filetype?: string; + groups?: string[]; + has_more_shares?: boolean; + has_rich_preview?: boolean; + id?: string; + ims?: string[]; + is_external?: boolean; + is_public?: boolean; + last_editor?: string; + list_limits?: ListLimits; + list_metadata?: ListMetadata; + mimetype?: string; + mode?: string; + name?: string; + permalink?: string; + permalink_public?: string; + pretty_type?: string; private_channels_with_file_access_count?: number; - private_file_with_access_count?: number; - public_url_shared?: boolean; - shares?: Knocks; - size?: number; - timestamp?: number; - title?: string; - updated?: number; - url_private?: string; - url_private_download?: string; - user?: string; - user_team?: string; - username?: string; + private_file_with_access_count?: number; + public_url_shared?: boolean; + shares?: Knocks; + size?: number; + timestamp?: number; + title?: string; + updated?: number; + url_private?: string; + url_private_download?: string; + user?: string; + user_team?: string; + username?: string; } -export interface Knocks { -} +export type Knocks = {}; export interface PurpleListRecord { record?: Record; @@ -766,90 +765,90 @@ export interface PurpleListRecord { } export interface Record { - fields?: RecordField[]; + fields?: RecordField[]; record_id?: string; } export interface RecordField { attachment?: any[]; - channel?: any[]; - checkbox?: boolean; - column_id?: string; - date?: any[]; - email?: any[]; - key?: string; - message?: FieldMessage; - number?: any[]; - phone?: any[]; - rating?: any[]; - rich_text?: any[]; - select?: any[]; - text?: string; - timestamp?: any[]; - user?: any[]; - value?: string; + channel?: any[]; + checkbox?: boolean; + column_id?: string; + date?: any[]; + email?: any[]; + key?: string; + message?: FieldMessage; + number?: any[]; + phone?: any[]; + rating?: any[]; + rich_text?: any[]; + select?: any[]; + text?: string; + timestamp?: any[]; + user?: any[]; + value?: string; } export interface FieldMessage { - app_id?: string; - attachments?: any[]; - blocks?: TitleBlockElement[]; - bot_id?: string; - bot_link?: string; - bot_profile?: BotProfile; - channel?: string; - client_msg_id?: string; - comment?: Comment; - display_as_bot?: boolean; - edited?: Edited; - file?: PurpleFile; - files?: any[]; - hidden?: boolean; - icons?: RootIcons; - inviter?: string; - is_intro?: boolean; - is_locked?: boolean; - is_starred?: boolean; + app_id?: string; + attachments?: any[]; + blocks?: TitleBlockElement[]; + bot_id?: string; + bot_link?: string; + bot_profile?: BotProfile; + channel?: string; + client_msg_id?: string; + comment?: Comment; + display_as_bot?: boolean; + edited?: Edited; + file?: PurpleFile; + files?: any[]; + hidden?: boolean; + icons?: RootIcons; + inviter?: string; + is_intro?: boolean; + is_locked?: boolean; + is_starred?: boolean; is_thread_broadcast?: boolean; - item?: Comment; - item_type?: string; - last_read?: string; - latest_reply?: string; - metadata?: MessageMetadata; - no_notifications?: boolean; - parent_user_id?: string; - pinned_to?: any[]; - purpose?: string; - reactions?: any[]; - replies?: any[]; - reply_count?: number; - reply_users?: any[]; - reply_users_count?: number; - room?: Room; - root?: Root; - subscribed?: boolean; - subtype?: string; - team?: string; - text?: string; - thread_ts?: string; - topic?: string; - ts?: string; - type?: string; - unfurl_links?: boolean; - unfurl_media?: boolean; - upload?: boolean; - user?: string; - username?: string; - wibblr?: boolean; - x_files?: any[]; + item?: Comment; + item_type?: string; + last_read?: string; + latest_reply?: string; + metadata?: MessageMetadata; + no_notifications?: boolean; + parent_user_id?: string; + pinned_to?: any[]; + purpose?: string; + reactions?: any[]; + replies?: any[]; + reply_count?: number; + reply_users?: any[]; + reply_users_count?: number; + room?: Room; + root?: Root; + subscribed?: boolean; + subtype?: string; + team?: string; + text?: string; + thread_ts?: string; + topic?: string; + ts?: string; + type?: string; + unfurl_links?: boolean; + unfurl_media?: boolean; + upload?: boolean; + user?: string; + username?: string; + wibblr?: boolean; + x_files?: any[]; } export interface BotProfile { - app_id?: string; + app_id?: string; deleted?: boolean; - icons?: BotProfileIcons; - id?: string; - name?: string; + icons?: BotProfileIcons; + id?: string; + name?: string; team_id?: string; updated?: number; } @@ -861,208 +860,208 @@ export interface BotProfileIcons { } export interface Comment { - comment?: string; - created?: string; - display_as_bot?: boolean; - edit_link?: string; - editable?: boolean; - external_type?: string; - filetype?: string; - has_rich_preview?: boolean; - id?: string; - is_external?: boolean; - is_intro?: boolean; - is_public?: boolean; - is_starred?: boolean; - lines?: number; - lines_more?: number; - media_display_type?: string; - mimetype?: string; - mode?: string; - name?: string; - permalink?: string; - permalink_public?: boolean; - pretty_type?: string; - preview?: string; - preview_highlight?: string; + comment?: string; + created?: string; + display_as_bot?: boolean; + edit_link?: string; + editable?: boolean; + external_type?: string; + filetype?: string; + has_rich_preview?: boolean; + id?: string; + is_external?: boolean; + is_intro?: boolean; + is_public?: boolean; + is_starred?: boolean; + lines?: number; + lines_more?: number; + media_display_type?: string; + mimetype?: string; + mode?: string; + name?: string; + permalink?: string; + permalink_public?: boolean; + pretty_type?: string; + preview?: string; + preview_highlight?: string; preview_is_truncated?: boolean; - public_url_shared?: boolean; - size?: number; - timestamp?: string; - title?: string; - url_private?: string; + public_url_shared?: boolean; + size?: number; + timestamp?: string; + title?: string; + url_private?: string; url_private_download?: boolean; - user?: string; - username?: string; + user?: string; + username?: string; } export interface Edited { - ts?: string; + ts?: string; user?: string; } export interface PurpleFile { - access?: string; - alt_txt?: string; - app_id?: string; - app_name?: string; - attachments?: any[]; - blocks?: any[]; - bot_id?: string; - can_toggle_canvas_lock?: boolean; - canvas_template_mode?: string; - cc?: any[]; - channel_actions_count?: number; - channel_actions_ts?: string; - channels?: any[]; - comments_count?: number; - converted_pdf?: string; - created?: number; - deanimate?: string; - deanimate_gif?: string; - display_as_bot?: boolean; - dm_mpdm_users_with_file_access?: any[]; - duration_ms?: number; - edit_link?: string; - edit_timestamp?: number; - editable?: boolean; - editor?: string; - editors?: any[]; - external_id?: string; - external_type?: string; - external_url?: string; - favorites?: any[]; - file_access?: string; - filetype?: string; - from?: any[]; - groups?: any[]; - has_more?: boolean; - has_more_shares?: boolean; - has_rich_preview?: boolean; - headers?: Headers; - hls?: string; - hls_embed?: string; - id?: string; - image_exif_rotation?: number; - ims?: any[]; - initial_comment?: InitialComment; - is_channel_space?: boolean; - is_external?: boolean; - is_public?: boolean; - is_starred?: boolean; - last_editor?: string; - last_read?: number; - lines?: number; - lines_more?: number; - linked_channel_id?: string; - list_limits?: ListLimits; - list_metadata?: ListMetadata; - media_display_type?: string; - media_progress?: MediaProgress; - mimetype?: string; - mode?: string; - mp4?: string; - mp4_low?: string; - name?: string; - non_owner_editable?: boolean; - num_stars?: number; - org_or_workspace_access?: string; - original_attachment_count?: number; - original_h?: string; - original_w?: string; - permalink?: string; - permalink_public?: string; - pinned_to?: any[]; - pjpeg?: string; - plain_text?: string; - pretty_type?: string; - preview?: string; - preview_highlight?: string; - preview_is_truncated?: boolean; - preview_plain_text?: string; + access?: string; + alt_txt?: string; + app_id?: string; + app_name?: string; + attachments?: any[]; + blocks?: any[]; + bot_id?: string; + can_toggle_canvas_lock?: boolean; + canvas_template_mode?: string; + cc?: any[]; + channel_actions_count?: number; + channel_actions_ts?: string; + channels?: any[]; + comments_count?: number; + converted_pdf?: string; + created?: number; + deanimate?: string; + deanimate_gif?: string; + display_as_bot?: boolean; + dm_mpdm_users_with_file_access?: any[]; + duration_ms?: number; + edit_link?: string; + edit_timestamp?: number; + editable?: boolean; + editor?: string; + editors?: any[]; + external_id?: string; + external_type?: string; + external_url?: string; + favorites?: any[]; + file_access?: string; + filetype?: string; + from?: any[]; + groups?: any[]; + has_more?: boolean; + has_more_shares?: boolean; + has_rich_preview?: boolean; + headers?: Headers; + hls?: string; + hls_embed?: string; + id?: string; + image_exif_rotation?: number; + ims?: any[]; + initial_comment?: InitialComment; + is_channel_space?: boolean; + is_external?: boolean; + is_public?: boolean; + is_starred?: boolean; + last_editor?: string; + last_read?: number; + lines?: number; + lines_more?: number; + linked_channel_id?: string; + list_limits?: ListLimits; + list_metadata?: ListMetadata; + media_display_type?: string; + media_progress?: MediaProgress; + mimetype?: string; + mode?: string; + mp4?: string; + mp4_low?: string; + name?: string; + non_owner_editable?: boolean; + num_stars?: number; + org_or_workspace_access?: string; + original_attachment_count?: number; + original_h?: string; + original_w?: string; + permalink?: string; + permalink_public?: string; + pinned_to?: any[]; + pjpeg?: string; + plain_text?: string; + pretty_type?: string; + preview?: string; + preview_highlight?: string; + preview_is_truncated?: boolean; + preview_plain_text?: string; private_channels_with_file_access_count?: number; - private_file_with_access_count?: number; - public_url_shared?: boolean; - quip_thread_id?: string; - reactions?: any[]; - saved?: Saved; - sent_to_self?: boolean; - shares?: Knocks; - show_badge?: boolean; - simplified_html?: string; - size?: number; - source_team?: string; - subject?: string; - subtype?: string; - team_pref_version_history_enabled?: boolean; - teams_shared_with?: any[]; - template_conversion_ts?: number; - template_description?: string; - template_icon?: string; - template_name?: string; - template_title?: string; - thumb_1024?: string; - thumb_1024_gif?: string; - thumb_1024_h?: string; - thumb_1024_w?: string; - thumb_160?: string; - thumb_160_gif?: string; - thumb_160_h?: string; - thumb_160_w?: string; - thumb_360?: string; - thumb_360_gif?: string; - thumb_360_h?: string; - thumb_360_w?: string; - thumb_480?: string; - thumb_480_gif?: string; - thumb_480_h?: string; - thumb_480_w?: string; - thumb_64?: string; - thumb_64_gif?: string; - thumb_64_h?: string; - thumb_64_w?: string; - thumb_720?: string; - thumb_720_gif?: string; - thumb_720_h?: string; - thumb_720_w?: string; - thumb_80?: string; - thumb_800?: string; - thumb_800_gif?: string; - thumb_800_h?: string; - thumb_800_w?: string; - thumb_80_gif?: string; - thumb_80_h?: string; - thumb_80_w?: string; - thumb_960?: string; - thumb_960_gif?: string; - thumb_960_h?: string; - thumb_960_w?: string; - thumb_gif?: string; - thumb_pdf?: string; - thumb_pdf_h?: string; - thumb_pdf_w?: string; - thumb_tiny?: string; - thumb_video?: string; - thumb_video_h?: number; - thumb_video_w?: number; - timestamp?: number; - title?: string; - title_blocks?: any[]; - to?: any[]; - transcription?: Transcription; - update_notification?: number; - updated?: number; - url_private?: string; - url_private_download?: string; - url_static_preview?: string; - user?: string; - user_team?: string; - username?: string; - vtt?: string; + private_file_with_access_count?: number; + public_url_shared?: boolean; + quip_thread_id?: string; + reactions?: any[]; + saved?: Saved; + sent_to_self?: boolean; + shares?: Knocks; + show_badge?: boolean; + simplified_html?: string; + size?: number; + source_team?: string; + subject?: string; + subtype?: string; + team_pref_version_history_enabled?: boolean; + teams_shared_with?: any[]; + template_conversion_ts?: number; + template_description?: string; + template_icon?: string; + template_name?: string; + template_title?: string; + thumb_1024?: string; + thumb_1024_gif?: string; + thumb_1024_h?: string; + thumb_1024_w?: string; + thumb_160?: string; + thumb_160_gif?: string; + thumb_160_h?: string; + thumb_160_w?: string; + thumb_360?: string; + thumb_360_gif?: string; + thumb_360_h?: string; + thumb_360_w?: string; + thumb_480?: string; + thumb_480_gif?: string; + thumb_480_h?: string; + thumb_480_w?: string; + thumb_64?: string; + thumb_64_gif?: string; + thumb_64_h?: string; + thumb_64_w?: string; + thumb_720?: string; + thumb_720_gif?: string; + thumb_720_h?: string; + thumb_720_w?: string; + thumb_80?: string; + thumb_800?: string; + thumb_800_gif?: string; + thumb_800_h?: string; + thumb_800_w?: string; + thumb_80_gif?: string; + thumb_80_h?: string; + thumb_80_w?: string; + thumb_960?: string; + thumb_960_gif?: string; + thumb_960_h?: string; + thumb_960_w?: string; + thumb_gif?: string; + thumb_pdf?: string; + thumb_pdf_h?: string; + thumb_pdf_w?: string; + thumb_tiny?: string; + thumb_video?: string; + thumb_video_h?: number; + thumb_video_w?: number; + timestamp?: number; + title?: string; + title_blocks?: any[]; + to?: any[]; + transcription?: Transcription; + update_notification?: number; + updated?: number; + url_private?: string; + url_private_download?: string; + url_static_preview?: string; + user?: string; + user_team?: string; + username?: string; + vtt?: string; } export interface RootIcons { - emoji?: string; + emoji?: string; image_36?: string; image_48?: string; image_64?: string; @@ -1074,80 +1073,80 @@ export interface MessageMetadata { } export interface Room { - app_id?: string; - attached_file_ids?: string[]; - background_id?: string; - call_family?: string; - canvas_background?: string; - canvas_thread_ts?: string; - channels?: string[]; - created_by?: string; - date_end?: number; - date_start?: number; - display_id?: string; - external_unique_id?: string; - has_ended?: boolean; - id?: string; - is_dm_call?: boolean; - is_prewarmed?: boolean; - is_scheduled?: boolean; - knocks?: Knocks; - last_invite_status_by_user?: Knocks; - media_backend_type?: string; - media_server?: string; - name?: string; - participant_history?: string[]; - participants?: string[]; - participants_camera_off?: string[]; - participants_camera_on?: string[]; + app_id?: string; + attached_file_ids?: string[]; + background_id?: string; + call_family?: string; + canvas_background?: string; + canvas_thread_ts?: string; + channels?: string[]; + created_by?: string; + date_end?: number; + date_start?: number; + display_id?: string; + external_unique_id?: string; + has_ended?: boolean; + id?: string; + is_dm_call?: boolean; + is_prewarmed?: boolean; + is_scheduled?: boolean; + knocks?: Knocks; + last_invite_status_by_user?: Knocks; + media_backend_type?: string; + media_server?: string; + name?: string; + participant_history?: string[]; + participants?: string[]; + participants_camera_off?: string[]; + participants_camera_on?: string[]; participants_screenshare_off?: string[]; - participants_screenshare_on?: string[]; - pending_invitees?: Knocks; - thread_root_ts?: string; - was_accepted?: boolean; - was_missed?: boolean; - was_rejected?: boolean; + participants_screenshare_on?: string[]; + pending_invitees?: Knocks; + thread_root_ts?: string; + was_accepted?: boolean; + was_missed?: boolean; + was_rejected?: boolean; } export interface Root { - bot_id?: string; - bot_profile?: BotProfile; - edited?: Edited; - icons?: RootIcons; - last_read?: string; - latest_reply?: string; - mrkdwn?: boolean; - no_notifications?: boolean; - parent_user_id?: string; - replies?: any[]; - reply_count?: number; - reply_users?: any[]; + bot_id?: string; + bot_profile?: BotProfile; + edited?: Edited; + icons?: RootIcons; + last_read?: string; + latest_reply?: string; + mrkdwn?: boolean; + no_notifications?: boolean; + parent_user_id?: string; + replies?: any[]; + reply_count?: number; + reply_users?: any[]; reply_users_count?: number; - room?: Room; - subscribed?: boolean; - subtype?: string; - team?: string; - text?: string; - thread_ts?: string; - ts?: string; - type?: string; - unread_count?: number; - user?: string; - username?: string; + room?: Room; + subscribed?: boolean; + subtype?: string; + team?: string; + text?: string; + thread_ts?: string; + ts?: string; + type?: string; + unread_count?: number; + user?: string; + username?: string; } export interface ListRecordElement { - created_by?: string; - date_created?: number; - fields?: RecordField[]; - id?: string; - is_subscribed?: boolean; - list_id?: string; - platform_refs?: PlatformRefs; - position?: string; - saved?: Saved; - thread_ts?: string; - updated_by?: string; + created_by?: string; + date_created?: number; + fields?: RecordField[]; + id?: string; + is_subscribed?: boolean; + list_id?: string; + platform_refs?: PlatformRefs; + position?: string; + saved?: Saved; + thread_ts?: string; + updated_by?: string; updated_timestamp?: string; } @@ -1160,133 +1159,133 @@ export interface PlatformRefs { export interface MessageBlock { channel?: string; message?: FieldMessage; - team?: string; - ts?: string; + team?: string; + ts?: string; } export interface AttachmentMetadata { - extension?: string; - format?: string; - original_h?: number; - original_w?: number; - rotation?: number; - thumb_160?: boolean; + extension?: string; + format?: string; + original_h?: number; + original_w?: number; + rotation?: number; + thumb_160?: boolean; thumb_360_h?: number; thumb_360_w?: number; - thumb_64?: boolean; - thumb_80?: boolean; - thumb_tiny?: string; + thumb_64?: boolean; + thumb_80?: boolean; + thumb_tiny?: string; } export interface Preview { can_remove?: boolean; - icon_url?: string; - subtitle?: DescriptionElement; - title?: DescriptionElement; - type?: string; + icon_url?: string; + subtitle?: DescriptionElement; + title?: DescriptionElement; + type?: string; } export interface PurpleBlock { - accessory?: Accessory; - alt_text?: string; - api_decoration_available?: boolean; - app_collaborators?: string[]; - app_id?: string; - author_name?: string; - block_id?: string; - bot_user_id?: string; - button_label?: string; - call?: Call; - call_id?: string; - description?: DescriptionElement; - developer_trace_id?: string; - dispatch_action?: boolean; - element?: Accessory; - elements?: Accessory[]; - external_id?: string; - fallback?: string; - fields?: DescriptionElement[]; - file?: FileElement; - file_id?: string; - function_trigger_id?: string; - hint?: DescriptionElement; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - is_animated?: boolean; - is_workflow_app?: boolean; - label?: DescriptionElement; - optional?: boolean; - owning_team_id?: string; - provider_icon_url?: string; - provider_name?: string; + accessory?: Accessory; + alt_text?: string; + api_decoration_available?: boolean; + app_collaborators?: string[]; + app_id?: string; + author_name?: string; + block_id?: string; + bot_user_id?: string; + button_label?: string; + call?: Call; + call_id?: string; + description?: DescriptionElement; + developer_trace_id?: string; + dispatch_action?: boolean; + element?: Accessory; + elements?: Accessory[]; + external_id?: string; + fallback?: string; + fields?: DescriptionElement[]; + file?: FileElement; + file_id?: string; + function_trigger_id?: string; + hint?: DescriptionElement; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + is_animated?: boolean; + is_workflow_app?: boolean; + label?: DescriptionElement; + optional?: boolean; + owning_team_id?: string; + provider_icon_url?: string; + provider_name?: string; sales_home_workflow_app_type?: number; - share_url?: string; - slack_file?: SlackFile; - source?: string; - text?: DescriptionElement; - thumbnail_url?: string; - title?: DescriptionElement; - title_url?: string; - trigger_subtype?: string; - trigger_type?: string; - type?: BlockType; - url?: string; - video_url?: string; - workflow_id?: string; + share_url?: string; + slack_file?: SlackFile; + source?: string; + text?: DescriptionElement; + thumbnail_url?: string; + title?: DescriptionElement; + title_url?: string; + trigger_subtype?: string; + trigger_type?: string; + type?: BlockType; + url?: string; + video_url?: string; + workflow_id?: string; } export interface Call { media_backend_type?: string; - v1?: V1; + v1?: V1; } export interface V1 { - active_participants?: Participant[]; - all_participants?: Participant[]; - app_icon_urls?: AppIconUrls; - app_id?: string; - channels?: string[]; - created_by?: string; - date_end?: number; - date_start?: number; + active_participants?: Participant[]; + all_participants?: Participant[]; + app_icon_urls?: AppIconUrls; + app_id?: string; + channels?: string[]; + created_by?: string; + date_end?: number; + date_start?: number; desktop_app_join_url?: string; - display_id?: string; - has_ended?: boolean; - id?: string; - is_dm_call?: boolean; - join_url?: string; - name?: string; - was_accepted?: boolean; - was_missed?: boolean; - was_rejected?: boolean; + display_id?: string; + has_ended?: boolean; + id?: string; + is_dm_call?: boolean; + join_url?: string; + name?: string; + was_accepted?: boolean; + was_missed?: boolean; + was_rejected?: boolean; } export interface Participant { - avatar_url?: string; + avatar_url?: string; display_name?: string; - external_id?: string; - slack_id?: string; + external_id?: string; + slack_id?: string; } export interface AppIconUrls { - image_1024?: string; - image_128?: string; - image_192?: string; - image_32?: string; - image_36?: string; - image_48?: string; - image_512?: string; - image_64?: string; - image_72?: string; - image_96?: string; + image_1024?: string; + image_128?: string; + image_192?: string; + image_32?: string; + image_36?: string; + image_48?: string; + image_512?: string; + image_64?: string; + image_72?: string; + image_96?: string; image_original?: string; } export interface Paging { count?: number; - page?: number; + page?: number; pages?: number; total?: number; } diff --git a/packages/web-api/src/types/response/ReactionsRemoveResponse.ts b/packages/web-api/src/types/response/ReactionsRemoveResponse.ts index 652bbf180..3d82a32dc 100644 --- a/packages/web-api/src/types/response/ReactionsRemoveResponse.ts +++ b/packages/web-api/src/types/response/ReactionsRemoveResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ReactionsRemoveResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/RemindersAddResponse.ts b/packages/web-api/src/types/response/RemindersAddResponse.ts index 9586daa97..b3d2b0c71 100644 --- a/packages/web-api/src/types/response/RemindersAddResponse.ts +++ b/packages/web-api/src/types/response/RemindersAddResponse.ts @@ -8,24 +8,24 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type RemindersAddResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; - reminder?: Reminder; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; + reminder?: Reminder; response_metadata?: ResponseMetadata; }; export interface Reminder { complete_ts?: number; - creator?: string; - id?: string; - recurring?: boolean; - text?: string; - time?: number; - user?: string; + creator?: string; + id?: string; + recurring?: boolean; + text?: string; + time?: number; + user?: string; } export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/RemindersCompleteResponse.ts b/packages/web-api/src/types/response/RemindersCompleteResponse.ts index db6007716..9c7f20ce1 100644 --- a/packages/web-api/src/types/response/RemindersCompleteResponse.ts +++ b/packages/web-api/src/types/response/RemindersCompleteResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type RemindersCompleteResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/RemindersDeleteResponse.ts b/packages/web-api/src/types/response/RemindersDeleteResponse.ts index 1e729bceb..f8caa4433 100644 --- a/packages/web-api/src/types/response/RemindersDeleteResponse.ts +++ b/packages/web-api/src/types/response/RemindersDeleteResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type RemindersDeleteResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/RemindersInfoResponse.ts b/packages/web-api/src/types/response/RemindersInfoResponse.ts index 4ca914103..c6e332826 100644 --- a/packages/web-api/src/types/response/RemindersInfoResponse.ts +++ b/packages/web-api/src/types/response/RemindersInfoResponse.ts @@ -8,21 +8,21 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type RemindersInfoResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; reminder?: Reminder; }; export interface Reminder { complete_ts?: number; - creator?: string; - id?: string; - recurring?: boolean; - text?: string; - time?: number; - user?: string; + creator?: string; + id?: string; + recurring?: boolean; + text?: string; + time?: number; + user?: string; } diff --git a/packages/web-api/src/types/response/RemindersListResponse.ts b/packages/web-api/src/types/response/RemindersListResponse.ts index 8820c1570..ea0137967 100644 --- a/packages/web-api/src/types/response/RemindersListResponse.ts +++ b/packages/web-api/src/types/response/RemindersListResponse.ts @@ -8,28 +8,28 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type RemindersListResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; reminders?: Reminder[]; }; export interface Reminder { - channel?: string; + channel?: string; complete_ts?: number; - creator?: string; - id?: string; - recurrence?: Recurrence; - recurring?: boolean; - text?: string; - time?: number; - user?: string; + creator?: string; + id?: string; + recurrence?: Recurrence; + recurring?: boolean; + text?: string; + time?: number; + user?: string; } export interface Recurrence { frequency?: string; - weekdays?: string[]; + weekdays?: string[]; } diff --git a/packages/web-api/src/types/response/RtmConnectResponse.ts b/packages/web-api/src/types/response/RtmConnectResponse.ts index a2e037bb3..c3d14745e 100644 --- a/packages/web-api/src/types/response/RtmConnectResponse.ts +++ b/packages/web-api/src/types/response/RtmConnectResponse.ts @@ -8,24 +8,24 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type RtmConnectResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; - self?: Self; - team?: Team; - url?: string; + self?: Self; + team?: Team; + url?: string; }; export interface Self { - id?: string; + id?: string; name?: string; } export interface Team { domain?: string; - id?: string; - name?: string; + id?: string; + name?: string; } diff --git a/packages/web-api/src/types/response/RtmStartResponse.ts b/packages/web-api/src/types/response/RtmStartResponse.ts index d6e3afa30..d72e5cec7 100644 --- a/packages/web-api/src/types/response/RtmStartResponse.ts +++ b/packages/web-api/src/types/response/RtmStartResponse.ts @@ -8,46 +8,46 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type RtmStartResponse = WebAPICallResult & { - accept_tos_url?: string; - bots?: Bot[]; - cache_ts?: number; - cache_ts_version?: string; - cache_version?: string; - can_manage_shared_channels?: boolean; - channels?: Channel[]; - dnd?: Dnd; - error?: string; - groups?: Group[]; - ims?: Im[]; - is_europe?: boolean; - latest_event_ts?: string; - links?: Links; + accept_tos_url?: string; + bots?: Bot[]; + cache_ts?: number; + cache_ts_version?: string; + cache_version?: string; + can_manage_shared_channels?: boolean; + channels?: Channel[]; + dnd?: Dnd; + error?: string; + groups?: Group[]; + ims?: Im[]; + is_europe?: boolean; + latest_event_ts?: string; + links?: Links; mobile_app_requires_upgrade?: boolean; - needed?: string; - non_threadable_channels?: string[]; - ok?: boolean; - provided?: string; - read_only_channels?: string[]; - response_metadata?: ResponseMetadata; - self?: Self; - subteams?: Subteams; - team?: Team; - thread_only_channels?: string[]; - url?: string; - users?: User[]; + needed?: string; + non_threadable_channels?: string[]; + ok?: boolean; + provided?: string; + read_only_channels?: string[]; + response_metadata?: ResponseMetadata; + self?: Self; + subteams?: Subteams; + team?: Team; + thread_only_channels?: string[]; + url?: string; + users?: User[]; }; export interface Bot { - app_id?: Appid; - deleted?: boolean; - icons?: BotIcons; - id?: Id; + app_id?: Appid; + deleted?: boolean; + icons?: BotIcons; + id?: Id; is_workflow_bot?: boolean; - name?: string; - team_id?: string; - updated?: number; + name?: string; + team_id?: string; + updated?: number; } export enum Appid { @@ -68,202 +68,202 @@ export enum Id { export interface Channel { connected_limited_team_ids?: string[]; - connected_team_ids?: string[]; - context_team_id?: string; - conversation_host_id?: string; - created?: number; - creator?: string; - has_pins?: boolean; - id?: string; - internal_team_ids?: string[]; - is_archived?: boolean; - is_channel?: boolean; - is_ext_shared?: boolean; - is_general?: boolean; - is_group?: boolean; - is_im?: boolean; - is_member?: boolean; - is_mpim?: boolean; - is_org_shared?: boolean; - is_pending_ext_shared?: boolean; - is_private?: boolean; - is_shared?: boolean; - last_read?: string; - name?: string; - name_normalized?: string; + connected_team_ids?: string[]; + context_team_id?: string; + conversation_host_id?: string; + created?: number; + creator?: string; + has_pins?: boolean; + id?: string; + internal_team_ids?: string[]; + is_archived?: boolean; + is_channel?: boolean; + is_ext_shared?: boolean; + is_general?: boolean; + is_group?: boolean; + is_im?: boolean; + is_member?: boolean; + is_mpim?: boolean; + is_org_shared?: boolean; + is_pending_ext_shared?: boolean; + is_private?: boolean; + is_shared?: boolean; + last_read?: string; + name?: string; + name_normalized?: string; pending_connected_team_ids?: string[]; - pending_shared?: string[]; - previous_names?: string[]; - priority?: number; - purpose?: Purpose; - shared_team_ids?: string[]; - topic?: Purpose; - unlinked?: number; + pending_shared?: string[]; + previous_names?: string[]; + priority?: number; + purpose?: Purpose; + shared_team_ids?: string[]; + topic?: Purpose; + unlinked?: number; } export interface Purpose { - creator?: string; + creator?: string; last_set?: number; - value?: string; + value?: string; } export interface Dnd { - dnd_enabled?: boolean; - next_dnd_end_ts?: number; + dnd_enabled?: boolean; + next_dnd_end_ts?: number; next_dnd_start_ts?: number; - snooze_enabled?: boolean; + snooze_enabled?: boolean; } export interface Group { - created?: number; - creator?: string; - id?: string; - is_archived?: boolean; - is_group?: boolean; - is_mpim?: boolean; - is_open?: boolean; - is_read_only?: boolean; - is_thread_only?: boolean; - last_read?: string; - latest?: Latest; - members?: string[]; - name?: string; - name_normalized?: string; - parent_group?: string; - priority?: number; - purpose?: Purpose; - topic?: Purpose; - unread_count?: number; + created?: number; + creator?: string; + id?: string; + is_archived?: boolean; + is_group?: boolean; + is_mpim?: boolean; + is_open?: boolean; + is_read_only?: boolean; + is_thread_only?: boolean; + last_read?: string; + latest?: Latest; + members?: string[]; + name?: string; + name_normalized?: string; + parent_group?: string; + priority?: number; + purpose?: Purpose; + topic?: Purpose; + unread_count?: number; unread_count_display?: number; } export interface Latest { - attachments?: Attachment[]; - blocks?: LatestBlock[]; - bot_id?: string; - bot_link?: string; - bot_profile?: Bot; - client_msg_id?: string; + attachments?: Attachment[]; + blocks?: LatestBlock[]; + bot_id?: string; + bot_link?: string; + bot_profile?: Bot; + client_msg_id?: string; display_as_bot?: boolean; - edited?: Edited; - files?: FileElement[]; - icons?: MessageIcons; + edited?: Edited; + files?: FileElement[]; + icons?: MessageIcons; parent_user_id?: string; - reactions?: string[]; - root?: Root; - subtype?: string; - team?: string; - text?: string; - thread_ts?: string; - topic?: string; - ts?: string; - type?: string; - upload?: boolean; - user?: string; - username?: string; - x_files?: string[]; + reactions?: string[]; + root?: Root; + subtype?: string; + team?: string; + text?: string; + thread_ts?: string; + topic?: string; + ts?: string; + type?: string; + upload?: boolean; + user?: string; + username?: string; + x_files?: string[]; } export interface Attachment { - actions?: Action[]; - app_id?: string; - app_unfurl_url?: string; - author_icon?: string; - author_id?: string; - author_link?: string; - author_name?: string; - author_subname?: string; - blocks?: TitleBlockElement[]; - bot_id?: string; - callback_id?: string; - channel_id?: string; - channel_name?: string; - channel_team?: string; - color?: string; - fallback?: string; - fields?: AttachmentField[]; - file_id?: string; - filename?: string; - files?: FileElement[]; - footer?: string; - footer_icon?: string; - from_url?: string; - hide_border?: boolean; - hide_color?: boolean; - id?: number; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - indent?: boolean; - is_app_unfurl?: boolean; - is_file_attachment?: boolean; - is_msg_unfurl?: boolean; - is_reply_unfurl?: boolean; + actions?: Action[]; + app_id?: string; + app_unfurl_url?: string; + author_icon?: string; + author_id?: string; + author_link?: string; + author_name?: string; + author_subname?: string; + blocks?: TitleBlockElement[]; + bot_id?: string; + callback_id?: string; + channel_id?: string; + channel_name?: string; + channel_team?: string; + color?: string; + fallback?: string; + fields?: AttachmentField[]; + file_id?: string; + filename?: string; + files?: FileElement[]; + footer?: string; + footer_icon?: string; + from_url?: string; + hide_border?: boolean; + hide_color?: boolean; + id?: number; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + indent?: boolean; + is_app_unfurl?: boolean; + is_file_attachment?: boolean; + is_msg_unfurl?: boolean; + is_reply_unfurl?: boolean; is_thread_root_unfurl?: boolean; - list?: List; - list_record?: PurpleListRecord; - list_record_id?: string; - list_records?: ListRecordElement[]; - list_schema?: Schema[]; - list_view?: View; - list_view_id?: string; - message_blocks?: MessageBlock[]; - metadata?: AttachmentMetadata; - mimetype?: string; - mrkdwn_in?: string[]; - msg_subtype?: string; - original_url?: string; - pretext?: string; - preview?: Preview; - service_icon?: string; - service_name?: string; - service_url?: string; - size?: number; - text?: string; - thumb_height?: number; - thumb_url?: string; - thumb_width?: number; - title?: string; - title_link?: string; - ts?: string; - url?: string; - video_html?: string; - video_html_height?: number; - video_html_width?: number; - video_url?: string; + list?: List; + list_record?: PurpleListRecord; + list_record_id?: string; + list_records?: ListRecordElement[]; + list_schema?: Schema[]; + list_view?: View; + list_view_id?: string; + message_blocks?: MessageBlock[]; + metadata?: AttachmentMetadata; + mimetype?: string; + mrkdwn_in?: string[]; + msg_subtype?: string; + original_url?: string; + pretext?: string; + preview?: Preview; + service_icon?: string; + service_name?: string; + service_url?: string; + size?: number; + text?: string; + thumb_height?: number; + thumb_url?: string; + thumb_width?: number; + title?: string; + title_link?: string; + ts?: string; + url?: string; + video_html?: string; + video_html_height?: number; + video_html_width?: number; + video_url?: string; } export interface Action { - confirm?: ActionConfirm; - data_source?: string; - id?: string; + confirm?: ActionConfirm; + data_source?: string; + id?: string; min_query_length?: number; - name?: string; - option_groups?: ActionOptionGroup[]; - options?: SelectedOptionElement[]; + name?: string; + option_groups?: ActionOptionGroup[]; + options?: SelectedOptionElement[]; selected_options?: SelectedOptionElement[]; - style?: string; - text?: string; - type?: ActionType; - url?: string; - value?: string; + style?: string; + text?: string; + type?: ActionType; + url?: string; + value?: string; } export interface ActionConfirm { dismiss_text?: string; - ok_text?: string; - text?: string; - title?: string; + ok_text?: string; + text?: string; + title?: string; } export interface ActionOptionGroup { options?: SelectedOptionElement[]; - text?: string; + text?: string; } export interface SelectedOptionElement { - text?: string; + text?: string; value?: string; } @@ -294,100 +294,100 @@ export enum ActionType { } export interface TitleBlockElement { - accessory?: Accessory; - alt_text?: string; - app_collaborators?: string[]; - app_id?: string; - author_name?: string; - block_id?: string; - bot_user_id?: string; - button_label?: string; - description?: DescriptionElement | string; - developer_trace_id?: string; - elements?: Accessory[]; - fallback?: string; - fields?: DescriptionElement[]; - function_trigger_id?: string; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - is_animated?: boolean; - is_workflow_app?: boolean; - owning_team_id?: string; - provider_icon_url?: string; - provider_name?: string; + accessory?: Accessory; + alt_text?: string; + app_collaborators?: string[]; + app_id?: string; + author_name?: string; + block_id?: string; + bot_user_id?: string; + button_label?: string; + description?: DescriptionElement | string; + developer_trace_id?: string; + elements?: Accessory[]; + fallback?: string; + fields?: DescriptionElement[]; + function_trigger_id?: string; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + is_animated?: boolean; + is_workflow_app?: boolean; + owning_team_id?: string; + provider_icon_url?: string; + provider_name?: string; sales_home_workflow_app_type?: number; - share_url?: string; - slack_file?: SlackFile; - text?: DescriptionElement; - thumbnail_url?: string; - title?: DescriptionElement | string; - title_url?: string; - trigger_subtype?: string; - trigger_type?: string; - type?: BlockType; - url?: string; - video_url?: string; - workflow_id?: string; + share_url?: string; + slack_file?: SlackFile; + text?: DescriptionElement; + thumbnail_url?: string; + title?: DescriptionElement | string; + title_url?: string; + trigger_subtype?: string; + trigger_type?: string; + type?: BlockType; + url?: string; + video_url?: string; + workflow_id?: string; } export interface Accessory { - accessibility_label?: string; - action_id?: string; - alt_text?: string; - border?: number; - confirm?: AccessoryConfirm; + accessibility_label?: string; + action_id?: string; + alt_text?: string; + border?: number; + confirm?: AccessoryConfirm; default_to_current_conversation?: boolean; - elements?: AccessoryElement[]; - fallback?: string; - filter?: Filter; - focus_on_load?: boolean; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - indent?: number; - initial_channel?: string; - initial_channels?: string[]; - initial_conversation?: string; - initial_conversations?: string[]; - initial_date?: string; - initial_date_time?: number; - initial_option?: InitialOptionElement; - initial_options?: InitialOptionElement[]; - initial_time?: string; - initial_user?: string; - initial_users?: string[]; - max_selected_items?: number; - min_query_length?: number; - offset?: number; - option_groups?: AccessoryOptionGroup[]; - options?: InitialOptionElement[]; - placeholder?: DescriptionElement; - response_url_enabled?: boolean; - slack_file?: SlackFile; - style?: string; - text?: DescriptionElement; - timezone?: string; - type?: ActionType; - url?: string; - value?: string; - workflow?: Workflow; + elements?: AccessoryElement[]; + fallback?: string; + filter?: Filter; + focus_on_load?: boolean; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + indent?: number; + initial_channel?: string; + initial_channels?: string[]; + initial_conversation?: string; + initial_conversations?: string[]; + initial_date?: string; + initial_date_time?: number; + initial_option?: InitialOptionElement; + initial_options?: InitialOptionElement[]; + initial_time?: string; + initial_user?: string; + initial_users?: string[]; + max_selected_items?: number; + min_query_length?: number; + offset?: number; + option_groups?: AccessoryOptionGroup[]; + options?: InitialOptionElement[]; + placeholder?: DescriptionElement; + response_url_enabled?: boolean; + slack_file?: SlackFile; + style?: string; + text?: DescriptionElement; + timezone?: string; + type?: ActionType; + url?: string; + value?: string; + workflow?: Workflow; } export interface AccessoryConfirm { confirm?: DescriptionElement; - deny?: DescriptionElement; - style?: string; - text?: DescriptionElement; - title?: DescriptionElement; + deny?: DescriptionElement; + style?: string; + text?: DescriptionElement; + title?: DescriptionElement; } export interface DescriptionElement { - emoji?: boolean; - text?: string; - type?: DescriptionType; + emoji?: boolean; + text?: string; + type?: DescriptionType; verbatim?: boolean; } @@ -397,42 +397,42 @@ export enum DescriptionType { } export interface AccessoryElement { - border?: number; + border?: number; elements?: PurpleElement[]; - indent?: number; - offset?: number; - style?: string; - type?: ActionType; + indent?: number; + offset?: number; + style?: string; + type?: ActionType; } export interface PurpleElement { - channel_id?: string; - fallback?: string; - format?: string; - name?: string; - range?: string; - skin_tone?: number; - style?: Style; - team_id?: string; - text?: string; - timestamp?: string; - type?: PurpleType; - unicode?: string; - unsafe?: boolean; - url?: string; - user_id?: string; + channel_id?: string; + fallback?: string; + format?: string; + name?: string; + range?: string; + skin_tone?: number; + style?: Style; + team_id?: string; + text?: string; + timestamp?: string; + type?: PurpleType; + unicode?: string; + unsafe?: boolean; + url?: string; + user_id?: string; usergroup_id?: string; - value?: string; + value?: string; } export interface Style { - bold?: boolean; + bold?: boolean; client_highlight?: boolean; - code?: boolean; - highlight?: boolean; - italic?: boolean; - strike?: boolean; - unlink?: boolean; + code?: boolean; + highlight?: boolean; + italic?: boolean; + strike?: boolean; + unlink?: boolean; } export enum PurpleType { @@ -449,25 +449,25 @@ export enum PurpleType { } export interface Filter { - exclude_bot_users?: boolean; + exclude_bot_users?: boolean; exclude_external_shared_channels?: boolean; - include?: any[]; + include?: any[]; } export interface InitialOptionElement { description?: DescriptionElement; - text?: DescriptionElement; - url?: string; - value?: string; + text?: DescriptionElement; + url?: string; + value?: string; } export interface AccessoryOptionGroup { - label?: DescriptionElement; + label?: DescriptionElement; options?: InitialOptionElement[]; } export interface SlackFile { - id?: string; + id?: string; url?: string; } @@ -477,11 +477,11 @@ export interface Workflow { export interface Trigger { customizable_input_parameters?: CustomizableInputParameter[]; - url?: string; + url?: string; } export interface CustomizableInputParameter { - name?: string; + name?: string; value?: string; } @@ -503,263 +503,263 @@ export interface AttachmentField { } export interface FileElement { - access?: string; - alt_txt?: string; - app_id?: string; - app_name?: string; - attachments?: any[]; - blocks?: TitleBlockElement[]; - bot_id?: string; - can_toggle_canvas_lock?: boolean; - canvas_template_mode?: string; - cc?: Cc[]; - channel_actions_count?: number; - channel_actions_ts?: string; - channels?: string[]; - comments_count?: number; - converted_pdf?: string; - created?: number; - deanimate?: string; - deanimate_gif?: string; - display_as_bot?: boolean; - dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; - duration_ms?: number; - edit_link?: string; - edit_timestamp?: number; - editable?: boolean; - editor?: string; - editors?: string[]; - external_id?: string; - external_type?: string; - external_url?: string; - favorites?: Favorite[]; - file_access?: string; - filetype?: string; - from?: Cc[]; - groups?: string[]; - has_more?: boolean; - has_more_shares?: boolean; - has_rich_preview?: boolean; - headers?: Headers; - hls?: string; - hls_embed?: string; - id?: string; - image_exif_rotation?: number; - ims?: string[]; - initial_comment?: InitialComment; - is_channel_space?: boolean; - is_external?: boolean; - is_public?: boolean; - is_starred?: boolean; - last_editor?: string; - last_read?: number; - lines?: number; - lines_more?: number; - linked_channel_id?: string; - list_limits?: ListLimits; - list_metadata?: ListMetadata; - media_display_type?: string; - media_progress?: MediaProgress; - mimetype?: string; - mode?: string; - mp4?: string; - mp4_low?: string; - name?: string; - non_owner_editable?: boolean; - num_stars?: number; - org_or_workspace_access?: string; - original_attachment_count?: number; - original_h?: string; - original_w?: string; - permalink?: string; - permalink_public?: string; - pinned_to?: string[]; - pjpeg?: string; - plain_text?: string; - pretty_type?: string; - preview?: string; - preview_highlight?: string; - preview_is_truncated?: boolean; - preview_plain_text?: string; + access?: string; + alt_txt?: string; + app_id?: string; + app_name?: string; + attachments?: any[]; + blocks?: TitleBlockElement[]; + bot_id?: string; + can_toggle_canvas_lock?: boolean; + canvas_template_mode?: string; + cc?: Cc[]; + channel_actions_count?: number; + channel_actions_ts?: string; + channels?: string[]; + comments_count?: number; + converted_pdf?: string; + created?: number; + deanimate?: string; + deanimate_gif?: string; + display_as_bot?: boolean; + dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; + duration_ms?: number; + edit_link?: string; + edit_timestamp?: number; + editable?: boolean; + editor?: string; + editors?: string[]; + external_id?: string; + external_type?: string; + external_url?: string; + favorites?: Favorite[]; + file_access?: string; + filetype?: string; + from?: Cc[]; + groups?: string[]; + has_more?: boolean; + has_more_shares?: boolean; + has_rich_preview?: boolean; + headers?: Headers; + hls?: string; + hls_embed?: string; + id?: string; + image_exif_rotation?: number; + ims?: string[]; + initial_comment?: InitialComment; + is_channel_space?: boolean; + is_external?: boolean; + is_public?: boolean; + is_starred?: boolean; + last_editor?: string; + last_read?: number; + lines?: number; + lines_more?: number; + linked_channel_id?: string; + list_limits?: ListLimits; + list_metadata?: ListMetadata; + media_display_type?: string; + media_progress?: MediaProgress; + mimetype?: string; + mode?: string; + mp4?: string; + mp4_low?: string; + name?: string; + non_owner_editable?: boolean; + num_stars?: number; + org_or_workspace_access?: string; + original_attachment_count?: number; + original_h?: string; + original_w?: string; + permalink?: string; + permalink_public?: string; + pinned_to?: string[]; + pjpeg?: string; + plain_text?: string; + pretty_type?: string; + preview?: string; + preview_highlight?: string; + preview_is_truncated?: boolean; + preview_plain_text?: string; private_channels_with_file_access_count?: number; - private_file_with_access_count?: number; - public_url_shared?: boolean; - quip_thread_id?: string; - reactions?: Reaction[]; - saved?: Saved; - sent_to_self?: boolean; - shares?: PurpleShares; - show_badge?: boolean; - simplified_html?: string; - size?: number; - source_team?: string; - subject?: string; - subtype?: string; - team_pref_version_history_enabled?: boolean; - teams_shared_with?: any[]; - template_conversion_ts?: number; - template_description?: string; - template_icon?: string; - template_name?: string; - template_title?: string; - thumb_1024?: string; - thumb_1024_gif?: string; - thumb_1024_h?: string; - thumb_1024_w?: string; - thumb_160?: string; - thumb_160_gif?: string; - thumb_160_h?: string; - thumb_160_w?: string; - thumb_360?: string; - thumb_360_gif?: string; - thumb_360_h?: string; - thumb_360_w?: string; - thumb_480?: string; - thumb_480_gif?: string; - thumb_480_h?: string; - thumb_480_w?: string; - thumb_64?: string; - thumb_64_gif?: string; - thumb_64_h?: string; - thumb_64_w?: string; - thumb_720?: string; - thumb_720_gif?: string; - thumb_720_h?: string; - thumb_720_w?: string; - thumb_80?: string; - thumb_800?: string; - thumb_800_gif?: string; - thumb_800_h?: string; - thumb_800_w?: string; - thumb_80_gif?: string; - thumb_80_h?: string; - thumb_80_w?: string; - thumb_960?: string; - thumb_960_gif?: string; - thumb_960_h?: string; - thumb_960_w?: string; - thumb_gif?: string; - thumb_pdf?: string; - thumb_pdf_h?: string; - thumb_pdf_w?: string; - thumb_tiny?: string; - thumb_video?: string; - thumb_video_h?: number; - thumb_video_w?: number; - timestamp?: number; - title?: string; - title_blocks?: TitleBlockElement[]; - to?: Cc[]; - transcription?: Transcription; - update_notification?: number; - updated?: number; - url_private?: string; - url_private_download?: string; - url_static_preview?: string; - user?: string; - user_team?: string; - username?: string; - vtt?: string; + private_file_with_access_count?: number; + public_url_shared?: boolean; + quip_thread_id?: string; + reactions?: Reaction[]; + saved?: Saved; + sent_to_self?: boolean; + shares?: PurpleShares; + show_badge?: boolean; + simplified_html?: string; + size?: number; + source_team?: string; + subject?: string; + subtype?: string; + team_pref_version_history_enabled?: boolean; + teams_shared_with?: any[]; + template_conversion_ts?: number; + template_description?: string; + template_icon?: string; + template_name?: string; + template_title?: string; + thumb_1024?: string; + thumb_1024_gif?: string; + thumb_1024_h?: string; + thumb_1024_w?: string; + thumb_160?: string; + thumb_160_gif?: string; + thumb_160_h?: string; + thumb_160_w?: string; + thumb_360?: string; + thumb_360_gif?: string; + thumb_360_h?: string; + thumb_360_w?: string; + thumb_480?: string; + thumb_480_gif?: string; + thumb_480_h?: string; + thumb_480_w?: string; + thumb_64?: string; + thumb_64_gif?: string; + thumb_64_h?: string; + thumb_64_w?: string; + thumb_720?: string; + thumb_720_gif?: string; + thumb_720_h?: string; + thumb_720_w?: string; + thumb_80?: string; + thumb_800?: string; + thumb_800_gif?: string; + thumb_800_h?: string; + thumb_800_w?: string; + thumb_80_gif?: string; + thumb_80_h?: string; + thumb_80_w?: string; + thumb_960?: string; + thumb_960_gif?: string; + thumb_960_h?: string; + thumb_960_w?: string; + thumb_gif?: string; + thumb_pdf?: string; + thumb_pdf_h?: string; + thumb_pdf_w?: string; + thumb_tiny?: string; + thumb_video?: string; + thumb_video_h?: number; + thumb_video_w?: number; + timestamp?: number; + title?: string; + title_blocks?: TitleBlockElement[]; + to?: Cc[]; + transcription?: Transcription; + update_notification?: number; + updated?: number; + url_private?: string; + url_private_download?: string; + url_static_preview?: string; + user?: string; + user_team?: string; + username?: string; + vtt?: string; } export interface Cc { - address?: string; - name?: string; + address?: string; + name?: string; original?: string; } export interface DmMpdmUsersWithFileAccess { - access?: string; + access?: string; user_id?: string; } export interface Favorite { - collection_id?: string; + collection_id?: string; collection_name?: string; - position?: string; + position?: string; } export interface Headers { - date?: string; + date?: string; in_reply_to?: string; - message_id?: string; - reply_to?: string; + message_id?: string; + reply_to?: string; } export interface InitialComment { - channel?: string; - comment?: string; - created?: number; - id?: string; - is_intro?: boolean; + channel?: string; + comment?: string; + created?: number; + id?: string; + is_intro?: boolean; timestamp?: number; - user?: string; + user?: string; } export interface ListLimits { - column_count?: number; - column_count_limit?: number; + column_count?: number; + column_count_limit?: number; over_column_maximum?: boolean; - over_row_maximum?: boolean; - over_view_maximum?: boolean; - row_count?: number; - row_count_limit?: number; - view_count?: number; - view_count_limit?: number; + over_row_maximum?: boolean; + over_view_maximum?: boolean; + row_count?: number; + row_count_limit?: number; + view_count?: number; + view_count_limit?: number; } export interface ListMetadata { creation_source?: CreationSource; - description?: string; - icon?: string; - icon_team_id?: string; - icon_url?: string; - integrations?: string[]; - is_trial?: boolean; - schema?: Schema[]; - views?: View[]; + description?: string; + icon?: string; + icon_team_id?: string; + icon_url?: string; + integrations?: string[]; + is_trial?: boolean; + schema?: Schema[]; + views?: View[]; } export interface CreationSource { - reference_id?: string; - type?: string; + reference_id?: string; + type?: string; workflow_function_id?: string; } export interface Schema { - id?: string; + id?: string; is_primary_column?: boolean; - key?: string; - name?: string; - options?: Options; - type?: string; + key?: string; + name?: string; + options?: Options; + type?: string; } export interface Options { - canvas_id?: string; + canvas_id?: string; canvas_placeholder_mapping?: CanvasPlaceholderMapping[]; - choices?: Choice[]; - currency?: string; - currency_format?: string; - date_format?: string; - default_value?: string; - default_value_typed?: DefaultValueTyped; - emoji?: string; - emoji_team_id?: string; - for_assignment?: boolean; - format?: string; - linked_to?: string[]; - mark_as_done_when_checked?: boolean; - max?: number; - notify_users?: boolean; - precision?: number; - rounding?: string; - show_member_name?: boolean; - time_format?: string; + choices?: Choice[]; + currency?: string; + currency_format?: string; + date_format?: string; + default_value?: string; + default_value_typed?: DefaultValueTyped; + emoji?: string; + emoji_team_id?: string; + for_assignment?: boolean; + format?: string; + linked_to?: string[]; + mark_as_done_when_checked?: boolean; + max?: number; + notify_users?: boolean; + precision?: number; + rounding?: string; + show_member_name?: boolean; + time_format?: string; } export interface CanvasPlaceholderMapping { - column?: string; + column?: string; variable?: string; } @@ -774,64 +774,64 @@ export interface DefaultValueTyped { } export interface View { - columns?: Column[]; - created_by?: string; - date_created?: number; - id?: string; + columns?: Column[]; + created_by?: string; + date_created?: number; + id?: string; is_all_items_view?: boolean; - is_locked?: boolean; - name?: string; - position?: string; + is_locked?: boolean; + name?: string; + position?: string; stick_column_left?: boolean; - type?: string; + type?: string; } export interface Column { - id?: string; - key?: string; + id?: string; + key?: string; position?: string; - visible?: boolean; - width?: number; + visible?: boolean; + width?: number; } export interface MediaProgress { - duration_ms?: number; + duration_ms?: number; max_offset_ms?: number; - offset_ms?: number; + offset_ms?: number; } export interface Reaction { count?: number; - name?: string; - url?: string; + name?: string; + url?: string; users?: string[]; } export interface Saved { date_completed?: number; - date_due?: number; - is_archived?: boolean; - state?: string; + date_due?: number; + is_archived?: boolean; + state?: string; } export interface PurpleShares { private?: { [key: string]: Private[] }; - public?: { [key: string]: Private[] }; + public?: { [key: string]: Private[] }; } export interface Private { - access?: string; - channel_name?: string; - date_last_shared?: number; - latest_reply?: string; - reply_count?: number; - reply_users?: string[]; + access?: string; + channel_name?: string; + date_last_shared?: number; + latest_reply?: string; + reply_count?: number; + reply_users?: string[]; reply_users_count?: number; - share_user_id?: string; - source?: string; - team_id?: string; - thread_ts?: string; - ts?: string; + share_user_id?: string; + source?: string; + team_id?: string; + thread_ts?: string; + ts?: string; } export interface Transcription { @@ -840,48 +840,47 @@ export interface Transcription { } export interface List { - channels?: string[]; - comments_count?: number; - created?: number; - display_as_bot?: boolean; - dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; - editable?: boolean; - external_type?: string; - file_access?: string; - filetype?: string; - groups?: string[]; - has_more_shares?: boolean; - has_rich_preview?: boolean; - id?: string; - ims?: string[]; - is_external?: boolean; - is_public?: boolean; - last_editor?: string; - list_limits?: ListLimits; - list_metadata?: ListMetadata; - mimetype?: string; - mode?: string; - name?: string; - permalink?: string; - permalink_public?: string; - pretty_type?: string; + channels?: string[]; + comments_count?: number; + created?: number; + display_as_bot?: boolean; + dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; + editable?: boolean; + external_type?: string; + file_access?: string; + filetype?: string; + groups?: string[]; + has_more_shares?: boolean; + has_rich_preview?: boolean; + id?: string; + ims?: string[]; + is_external?: boolean; + is_public?: boolean; + last_editor?: string; + list_limits?: ListLimits; + list_metadata?: ListMetadata; + mimetype?: string; + mode?: string; + name?: string; + permalink?: string; + permalink_public?: string; + pretty_type?: string; private_channels_with_file_access_count?: number; - private_file_with_access_count?: number; - public_url_shared?: boolean; - shares?: ListShares; - size?: number; - timestamp?: number; - title?: string; - updated?: number; - url_private?: string; - url_private_download?: string; - user?: string; - user_team?: string; - username?: string; + private_file_with_access_count?: number; + public_url_shared?: boolean; + shares?: ListShares; + size?: number; + timestamp?: number; + title?: string; + updated?: number; + url_private?: string; + url_private_download?: string; + user?: string; + user_team?: string; + username?: string; } -export interface ListShares { -} +export type ListShares = {}; export interface PurpleListRecord { record?: Record; @@ -889,287 +888,287 @@ export interface PurpleListRecord { } export interface Record { - fields?: RecordField[]; + fields?: RecordField[]; record_id?: string; } export interface RecordField { attachment?: any[]; - channel?: any[]; - checkbox?: boolean; - column_id?: string; - date?: any[]; - email?: any[]; - key?: string; - message?: Message; - number?: any[]; - phone?: any[]; - rating?: any[]; - rich_text?: any[]; - select?: any[]; - text?: string; - timestamp?: any[]; - user?: any[]; - value?: string; + channel?: any[]; + checkbox?: boolean; + column_id?: string; + date?: any[]; + email?: any[]; + key?: string; + message?: Message; + number?: any[]; + phone?: any[]; + rating?: any[]; + rich_text?: any[]; + select?: any[]; + text?: string; + timestamp?: any[]; + user?: any[]; + value?: string; } export interface Message { - app_id?: string; - attachments?: any[]; - blocks?: TitleBlockElement[]; - bot_id?: string; - bot_link?: string; - bot_profile?: Bot; - channel?: string; - client_msg_id?: string; - comment?: Comment; - display_as_bot?: boolean; - edited?: Edited; - file?: MessageFile; - files?: any[]; - hidden?: boolean; - icons?: MessageIcons; - inviter?: string; - is_intro?: boolean; - is_locked?: boolean; - is_starred?: boolean; + app_id?: string; + attachments?: any[]; + blocks?: TitleBlockElement[]; + bot_id?: string; + bot_link?: string; + bot_profile?: Bot; + channel?: string; + client_msg_id?: string; + comment?: Comment; + display_as_bot?: boolean; + edited?: Edited; + file?: MessageFile; + files?: any[]; + hidden?: boolean; + icons?: MessageIcons; + inviter?: string; + is_intro?: boolean; + is_locked?: boolean; + is_starred?: boolean; is_thread_broadcast?: boolean; - item?: Comment; - item_type?: string; - last_read?: string; - latest_reply?: string; - metadata?: MessageMetadata; - no_notifications?: boolean; - parent_user_id?: string; - pinned_to?: any[]; - purpose?: string; - reactions?: any[]; - replies?: any[]; - reply_count?: number; - reply_users?: any[]; - reply_users_count?: number; - room?: Room; - root?: Root; - subscribed?: boolean; - subtype?: string; - team?: string; - text?: string; - thread_ts?: string; - topic?: string; - ts?: string; - type?: string; - unfurl_links?: boolean; - unfurl_media?: boolean; - upload?: boolean; - user?: string; - username?: string; - wibblr?: boolean; - x_files?: any[]; + item?: Comment; + item_type?: string; + last_read?: string; + latest_reply?: string; + metadata?: MessageMetadata; + no_notifications?: boolean; + parent_user_id?: string; + pinned_to?: any[]; + purpose?: string; + reactions?: any[]; + replies?: any[]; + reply_count?: number; + reply_users?: any[]; + reply_users_count?: number; + room?: Room; + root?: Root; + subscribed?: boolean; + subtype?: string; + team?: string; + text?: string; + thread_ts?: string; + topic?: string; + ts?: string; + type?: string; + unfurl_links?: boolean; + unfurl_media?: boolean; + upload?: boolean; + user?: string; + username?: string; + wibblr?: boolean; + x_files?: any[]; } export interface Comment { - comment?: string; - created?: string; - display_as_bot?: boolean; - edit_link?: string; - editable?: boolean; - external_type?: string; - filetype?: string; - has_rich_preview?: boolean; - id?: string; - is_external?: boolean; - is_intro?: boolean; - is_public?: boolean; - is_starred?: boolean; - lines?: number; - lines_more?: number; - media_display_type?: string; - mimetype?: string; - mode?: string; - name?: string; - permalink?: string; - permalink_public?: boolean; - pretty_type?: string; - preview?: string; - preview_highlight?: string; + comment?: string; + created?: string; + display_as_bot?: boolean; + edit_link?: string; + editable?: boolean; + external_type?: string; + filetype?: string; + has_rich_preview?: boolean; + id?: string; + is_external?: boolean; + is_intro?: boolean; + is_public?: boolean; + is_starred?: boolean; + lines?: number; + lines_more?: number; + media_display_type?: string; + mimetype?: string; + mode?: string; + name?: string; + permalink?: string; + permalink_public?: boolean; + pretty_type?: string; + preview?: string; + preview_highlight?: string; preview_is_truncated?: boolean; - public_url_shared?: boolean; - size?: number; - timestamp?: string; - title?: string; - url_private?: string; + public_url_shared?: boolean; + size?: number; + timestamp?: string; + title?: string; + url_private?: string; url_private_download?: boolean; - user?: string; - username?: string; + user?: string; + username?: string; } export interface Edited { - ts?: string; + ts?: string; user?: string; } export interface MessageFile { - access?: string; - alt_txt?: string; - app_id?: string; - app_name?: string; - attachments?: any[]; - blocks?: any[]; - bot_id?: string; - can_toggle_canvas_lock?: boolean; - canvas_template_mode?: string; - cc?: any[]; - channel_actions_count?: number; - channel_actions_ts?: string; - channels?: any[]; - comments_count?: number; - converted_pdf?: string; - created?: number; - deanimate?: string; - deanimate_gif?: string; - display_as_bot?: boolean; - dm_mpdm_users_with_file_access?: any[]; - duration_ms?: number; - edit_link?: string; - edit_timestamp?: number; - editable?: boolean; - editor?: string; - editors?: any[]; - external_id?: string; - external_type?: string; - external_url?: string; - favorites?: any[]; - file_access?: string; - filetype?: string; - from?: any[]; - groups?: any[]; - has_more?: boolean; - has_more_shares?: boolean; - has_rich_preview?: boolean; - headers?: Headers; - hls?: string; - hls_embed?: string; - id?: string; - image_exif_rotation?: number; - ims?: any[]; - initial_comment?: InitialComment; - is_channel_space?: boolean; - is_external?: boolean; - is_public?: boolean; - is_starred?: boolean; - last_editor?: string; - last_read?: number; - lines?: number; - lines_more?: number; - linked_channel_id?: string; - list_limits?: ListLimits; - list_metadata?: ListMetadata; - media_display_type?: string; - media_progress?: MediaProgress; - mimetype?: string; - mode?: string; - mp4?: string; - mp4_low?: string; - name?: string; - non_owner_editable?: boolean; - num_stars?: number; - org_or_workspace_access?: string; - original_attachment_count?: number; - original_h?: string; - original_w?: string; - permalink?: string; - permalink_public?: string; - pinned_to?: any[]; - pjpeg?: string; - plain_text?: string; - pretty_type?: string; - preview?: string; - preview_highlight?: string; - preview_is_truncated?: boolean; - preview_plain_text?: string; + access?: string; + alt_txt?: string; + app_id?: string; + app_name?: string; + attachments?: any[]; + blocks?: any[]; + bot_id?: string; + can_toggle_canvas_lock?: boolean; + canvas_template_mode?: string; + cc?: any[]; + channel_actions_count?: number; + channel_actions_ts?: string; + channels?: any[]; + comments_count?: number; + converted_pdf?: string; + created?: number; + deanimate?: string; + deanimate_gif?: string; + display_as_bot?: boolean; + dm_mpdm_users_with_file_access?: any[]; + duration_ms?: number; + edit_link?: string; + edit_timestamp?: number; + editable?: boolean; + editor?: string; + editors?: any[]; + external_id?: string; + external_type?: string; + external_url?: string; + favorites?: any[]; + file_access?: string; + filetype?: string; + from?: any[]; + groups?: any[]; + has_more?: boolean; + has_more_shares?: boolean; + has_rich_preview?: boolean; + headers?: Headers; + hls?: string; + hls_embed?: string; + id?: string; + image_exif_rotation?: number; + ims?: any[]; + initial_comment?: InitialComment; + is_channel_space?: boolean; + is_external?: boolean; + is_public?: boolean; + is_starred?: boolean; + last_editor?: string; + last_read?: number; + lines?: number; + lines_more?: number; + linked_channel_id?: string; + list_limits?: ListLimits; + list_metadata?: ListMetadata; + media_display_type?: string; + media_progress?: MediaProgress; + mimetype?: string; + mode?: string; + mp4?: string; + mp4_low?: string; + name?: string; + non_owner_editable?: boolean; + num_stars?: number; + org_or_workspace_access?: string; + original_attachment_count?: number; + original_h?: string; + original_w?: string; + permalink?: string; + permalink_public?: string; + pinned_to?: any[]; + pjpeg?: string; + plain_text?: string; + pretty_type?: string; + preview?: string; + preview_highlight?: string; + preview_is_truncated?: boolean; + preview_plain_text?: string; private_channels_with_file_access_count?: number; - private_file_with_access_count?: number; - public_url_shared?: boolean; - quip_thread_id?: string; - reactions?: any[]; - saved?: Saved; - sent_to_self?: boolean; - shares?: ListShares; - show_badge?: boolean; - simplified_html?: string; - size?: number; - source_team?: string; - subject?: string; - subtype?: string; - team_pref_version_history_enabled?: boolean; - teams_shared_with?: any[]; - template_conversion_ts?: number; - template_description?: string; - template_icon?: string; - template_name?: string; - template_title?: string; - thumb_1024?: string; - thumb_1024_gif?: string; - thumb_1024_h?: string; - thumb_1024_w?: string; - thumb_160?: string; - thumb_160_gif?: string; - thumb_160_h?: string; - thumb_160_w?: string; - thumb_360?: string; - thumb_360_gif?: string; - thumb_360_h?: string; - thumb_360_w?: string; - thumb_480?: string; - thumb_480_gif?: string; - thumb_480_h?: string; - thumb_480_w?: string; - thumb_64?: string; - thumb_64_gif?: string; - thumb_64_h?: string; - thumb_64_w?: string; - thumb_720?: string; - thumb_720_gif?: string; - thumb_720_h?: string; - thumb_720_w?: string; - thumb_80?: string; - thumb_800?: string; - thumb_800_gif?: string; - thumb_800_h?: string; - thumb_800_w?: string; - thumb_80_gif?: string; - thumb_80_h?: string; - thumb_80_w?: string; - thumb_960?: string; - thumb_960_gif?: string; - thumb_960_h?: string; - thumb_960_w?: string; - thumb_gif?: string; - thumb_pdf?: string; - thumb_pdf_h?: string; - thumb_pdf_w?: string; - thumb_tiny?: string; - thumb_video?: string; - thumb_video_h?: number; - thumb_video_w?: number; - timestamp?: number; - title?: string; - title_blocks?: any[]; - to?: any[]; - transcription?: Transcription; - update_notification?: number; - updated?: number; - url_private?: string; - url_private_download?: string; - url_static_preview?: string; - user?: string; - user_team?: string; - username?: string; - vtt?: string; + private_file_with_access_count?: number; + public_url_shared?: boolean; + quip_thread_id?: string; + reactions?: any[]; + saved?: Saved; + sent_to_self?: boolean; + shares?: ListShares; + show_badge?: boolean; + simplified_html?: string; + size?: number; + source_team?: string; + subject?: string; + subtype?: string; + team_pref_version_history_enabled?: boolean; + teams_shared_with?: any[]; + template_conversion_ts?: number; + template_description?: string; + template_icon?: string; + template_name?: string; + template_title?: string; + thumb_1024?: string; + thumb_1024_gif?: string; + thumb_1024_h?: string; + thumb_1024_w?: string; + thumb_160?: string; + thumb_160_gif?: string; + thumb_160_h?: string; + thumb_160_w?: string; + thumb_360?: string; + thumb_360_gif?: string; + thumb_360_h?: string; + thumb_360_w?: string; + thumb_480?: string; + thumb_480_gif?: string; + thumb_480_h?: string; + thumb_480_w?: string; + thumb_64?: string; + thumb_64_gif?: string; + thumb_64_h?: string; + thumb_64_w?: string; + thumb_720?: string; + thumb_720_gif?: string; + thumb_720_h?: string; + thumb_720_w?: string; + thumb_80?: string; + thumb_800?: string; + thumb_800_gif?: string; + thumb_800_h?: string; + thumb_800_w?: string; + thumb_80_gif?: string; + thumb_80_h?: string; + thumb_80_w?: string; + thumb_960?: string; + thumb_960_gif?: string; + thumb_960_h?: string; + thumb_960_w?: string; + thumb_gif?: string; + thumb_pdf?: string; + thumb_pdf_h?: string; + thumb_pdf_w?: string; + thumb_tiny?: string; + thumb_video?: string; + thumb_video_h?: number; + thumb_video_w?: number; + timestamp?: number; + title?: string; + title_blocks?: any[]; + to?: any[]; + transcription?: Transcription; + update_notification?: number; + updated?: number; + url_private?: string; + url_private_download?: string; + url_static_preview?: string; + user?: string; + user_team?: string; + username?: string; + vtt?: string; } export interface MessageIcons { - emoji?: string; + emoji?: string; image_36?: string; image_48?: string; image_64?: string; @@ -1181,77 +1180,77 @@ export interface MessageMetadata { } export interface Room { - app_id?: string; - attached_file_ids?: any[]; - background_id?: string; - call_family?: string; - canvas_background?: string; - canvas_thread_ts?: string; - channels?: any[]; - created_by?: string; - date_end?: number; - date_start?: number; - display_id?: string; - external_unique_id?: string; - has_ended?: boolean; - id?: string; - is_dm_call?: boolean; - is_prewarmed?: boolean; - is_scheduled?: boolean; - media_backend_type?: string; - media_server?: string; - name?: string; - participant_history?: any[]; - participants?: any[]; - participants_camera_off?: any[]; - participants_camera_on?: any[]; + app_id?: string; + attached_file_ids?: any[]; + background_id?: string; + call_family?: string; + canvas_background?: string; + canvas_thread_ts?: string; + channels?: any[]; + created_by?: string; + date_end?: number; + date_start?: number; + display_id?: string; + external_unique_id?: string; + has_ended?: boolean; + id?: string; + is_dm_call?: boolean; + is_prewarmed?: boolean; + is_scheduled?: boolean; + media_backend_type?: string; + media_server?: string; + name?: string; + participant_history?: any[]; + participants?: any[]; + participants_camera_off?: any[]; + participants_camera_on?: any[]; participants_screenshare_off?: any[]; - participants_screenshare_on?: any[]; - thread_root_ts?: string; - was_accepted?: boolean; - was_missed?: boolean; - was_rejected?: boolean; + participants_screenshare_on?: any[]; + thread_root_ts?: string; + was_accepted?: boolean; + was_missed?: boolean; + was_rejected?: boolean; } export interface Root { - bot_id?: string; - bot_profile?: Bot; - edited?: Edited; - icons?: MessageIcons; - last_read?: string; - latest_reply?: string; - mrkdwn?: boolean; - no_notifications?: boolean; - parent_user_id?: string; - replies?: Edited[]; - reply_count?: number; - reply_users?: string[]; + bot_id?: string; + bot_profile?: Bot; + edited?: Edited; + icons?: MessageIcons; + last_read?: string; + latest_reply?: string; + mrkdwn?: boolean; + no_notifications?: boolean; + parent_user_id?: string; + replies?: Edited[]; + reply_count?: number; + reply_users?: string[]; reply_users_count?: number; - room?: Room; - subscribed?: boolean; - subtype?: string; - team?: string; - text?: string; - thread_ts?: string; - ts?: string; - type?: string; - unread_count?: number; - user?: string; - username?: string; + room?: Room; + subscribed?: boolean; + subtype?: string; + team?: string; + text?: string; + thread_ts?: string; + ts?: string; + type?: string; + unread_count?: number; + user?: string; + username?: string; } export interface ListRecordElement { - created_by?: string; - date_created?: number; - fields?: RecordField[]; - id?: string; - is_subscribed?: boolean; - list_id?: string; - platform_refs?: PlatformRefs; - position?: string; - saved?: Saved; - thread_ts?: string; - updated_by?: string; + created_by?: string; + date_created?: number; + fields?: RecordField[]; + id?: string; + is_subscribed?: boolean; + list_id?: string; + platform_refs?: PlatformRefs; + position?: string; + saved?: Saved; + thread_ts?: string; + updated_by?: string; updated_timestamp?: string; } @@ -1264,142 +1263,142 @@ export interface PlatformRefs { export interface MessageBlock { channel?: string; message?: Message; - team?: string; - ts?: string; + team?: string; + ts?: string; } export interface AttachmentMetadata { - extension?: string; - format?: string; - original_h?: number; - original_w?: number; - rotation?: number; - thumb_160?: boolean; + extension?: string; + format?: string; + original_h?: number; + original_w?: number; + rotation?: number; + thumb_160?: boolean; thumb_360_h?: number; thumb_360_w?: number; - thumb_64?: boolean; - thumb_80?: boolean; - thumb_tiny?: string; + thumb_64?: boolean; + thumb_80?: boolean; + thumb_tiny?: string; } export interface Preview { can_remove?: boolean; - icon_url?: string; - subtitle?: DescriptionElement; - title?: DescriptionElement; - type?: string; + icon_url?: string; + subtitle?: DescriptionElement; + title?: DescriptionElement; + type?: string; } export interface LatestBlock { - accessory?: Accessory; - alt_text?: string; - api_decoration_available?: boolean; - app_collaborators?: string[]; - app_id?: string; - author_name?: string; - block_id?: string; - bot_user_id?: string; - button_label?: string; - call?: Call; - call_id?: string; - description?: DescriptionElement; - developer_trace_id?: string; - dispatch_action?: boolean; - element?: Accessory; - elements?: Accessory[]; - external_id?: string; - fallback?: string; - fields?: DescriptionElement[]; - file?: FileElement; - file_id?: string; - function_trigger_id?: string; - hint?: DescriptionElement; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - is_animated?: boolean; - is_workflow_app?: boolean; - label?: DescriptionElement; - optional?: boolean; - owning_team_id?: string; - provider_icon_url?: string; - provider_name?: string; + accessory?: Accessory; + alt_text?: string; + api_decoration_available?: boolean; + app_collaborators?: string[]; + app_id?: string; + author_name?: string; + block_id?: string; + bot_user_id?: string; + button_label?: string; + call?: Call; + call_id?: string; + description?: DescriptionElement; + developer_trace_id?: string; + dispatch_action?: boolean; + element?: Accessory; + elements?: Accessory[]; + external_id?: string; + fallback?: string; + fields?: DescriptionElement[]; + file?: FileElement; + file_id?: string; + function_trigger_id?: string; + hint?: DescriptionElement; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + is_animated?: boolean; + is_workflow_app?: boolean; + label?: DescriptionElement; + optional?: boolean; + owning_team_id?: string; + provider_icon_url?: string; + provider_name?: string; sales_home_workflow_app_type?: number; - share_url?: string; - slack_file?: SlackFile; - source?: string; - text?: DescriptionElement; - thumbnail_url?: string; - title?: DescriptionElement; - title_url?: string; - trigger_subtype?: string; - trigger_type?: string; - type?: BlockType; - url?: string; - video_url?: string; - workflow_id?: string; + share_url?: string; + slack_file?: SlackFile; + source?: string; + text?: DescriptionElement; + thumbnail_url?: string; + title?: DescriptionElement; + title_url?: string; + trigger_subtype?: string; + trigger_type?: string; + type?: BlockType; + url?: string; + video_url?: string; + workflow_id?: string; } export interface Call { media_backend_type?: string; - v1?: V1; + v1?: V1; } export interface V1 { - active_participants?: Participant[]; - all_participants?: Participant[]; - app_icon_urls?: AppIconUrls; - app_id?: string; - channels?: string[]; - created_by?: string; - date_end?: number; - date_start?: number; + active_participants?: Participant[]; + all_participants?: Participant[]; + app_icon_urls?: AppIconUrls; + app_id?: string; + channels?: string[]; + created_by?: string; + date_end?: number; + date_start?: number; desktop_app_join_url?: string; - display_id?: string; - has_ended?: boolean; - id?: string; - is_dm_call?: boolean; - join_url?: string; - name?: string; - was_accepted?: boolean; - was_missed?: boolean; - was_rejected?: boolean; + display_id?: string; + has_ended?: boolean; + id?: string; + is_dm_call?: boolean; + join_url?: string; + name?: string; + was_accepted?: boolean; + was_missed?: boolean; + was_rejected?: boolean; } export interface Participant { - avatar_url?: string; + avatar_url?: string; display_name?: string; - external_id?: string; - slack_id?: string; + external_id?: string; + slack_id?: string; } export interface AppIconUrls { - image_1024?: string; - image_128?: string; - image_192?: string; - image_32?: string; - image_36?: string; - image_48?: string; - image_512?: string; - image_64?: string; - image_72?: string; - image_96?: string; + image_1024?: string; + image_128?: string; + image_192?: string; + image_32?: string; + image_36?: string; + image_48?: string; + image_512?: string; + image_64?: string; + image_72?: string; + image_96?: string; image_original?: string; } export interface Im { context_team_id?: string; - created?: number; - has_pins?: boolean; - id?: string; - is_archived?: boolean; - is_im?: boolean; - is_open?: boolean; - is_org_shared?: boolean; - last_read?: string; - priority?: number; - user?: string; + created?: number; + has_pins?: boolean; + id?: string; + is_archived?: boolean; + is_im?: boolean; + is_open?: boolean; + is_org_shared?: boolean; + last_read?: string; + priority?: number; + user?: string; } export interface Links { @@ -1411,493 +1410,493 @@ export interface ResponseMetadata { } export interface Self { - created?: number; - first_login?: number; - id?: string; + created?: number; + first_login?: number; + id?: string; manual_presence?: string; - name?: string; - prefs?: SelfPrefs; + name?: string; + prefs?: SelfPrefs; } export interface SelfPrefs { - a11y_animations?: boolean; - a11y_dyslexic?: boolean; - a11y_play_sound_for_incoming_dm?: boolean; - a11y_play_sound_for_incoming_dm_choice?: string; - a11y_play_sound_for_sent_dm?: boolean; - a11y_play_sound_for_sent_dm_choice?: string; - a11y_read_out_incoming_dm?: boolean; - a11y_screen_reader_message_label_date_time_first?: boolean; - activity_view?: string; - add_apps_prompt_dismissed?: boolean; - add_channel_prompt_dismissed?: boolean; - add_prompt_interacted?: boolean; - all_channels_loud?: boolean; - all_notifications_prefs?: string; - all_unreads_section_filter?: string; - all_unreads_sort_order?: string; - allow_calls_to_set_current_status?: boolean; - allow_cmd_tab_iss?: boolean; - allowed_unfurl_senders?: string; - analytics_upsell_coachmark_seen?: boolean; - app_manifest_schema_format?: string; - app_subdomain_check_completed?: number; - arrow_history?: boolean; - at_channel_suppressed_channels?: string; - box_enabled?: boolean; - browsers_dismissed_channels_low_results_education?: boolean; - browsers_dismissed_files_low_results_education?: boolean; - browsers_dismissed_initial_activity_education?: boolean; - browsers_dismissed_initial_drafts_education?: boolean; - browsers_dismissed_initial_saved_education?: boolean; - browsers_dismissed_people_low_results_education?: boolean; - browsers_dismissed_user_groups_low_results_education?: boolean; - browsers_seen_initial_activity_education?: boolean; - browsers_seen_initial_channels_education?: boolean; - browsers_seen_initial_drafts_education?: boolean; - browsers_seen_initial_files_education?: boolean; - browsers_seen_initial_people_education?: boolean; - browsers_seen_initial_saved_education?: boolean; - browsers_seen_initial_user_groups_education?: boolean; - calls_disconnect_on_lock?: boolean; - calls_survey_last_seen?: string; - channel_canvas_variant?: number; - channel_sections?: string; - channel_sidebar_hide_browse_dms_link?: boolean; - channel_sidebar_hide_invite?: boolean; - channel_sort?: string; - chime_access_check_completed?: number; - clicked_close_onboarding_synth_view_banner?: boolean; - client_logs_pri?: string; - clips_feedback_survey_last_trigger_attempt?: number; - color_names_in_list?: boolean; - composer_nux?: string; - confirm_clear_all_unreads?: boolean; - confirm_sh_call_start?: boolean; - confirm_user_marked_away?: boolean; - connect_dm_early_access?: boolean; - contextual_help_reset_count?: number; - contextual_message_shortcuts_modal_was_seen?: boolean; - convert_emoticons?: boolean; - deprecation_banner_last_seen?: number; - deprecation_modal_last_seen?: number; - deprecation_toast_last_seen?: number; - desktop_client_ids?: string; - dismissed_app_config_redesign_coachmark?: boolean; - dismissed_app_launcher_atlassian_promo?: boolean; - dismissed_app_launcher_limit?: boolean; - dismissed_app_launcher_welcome?: boolean; - dismissed_app_manifest_coachmark?: boolean; - dismissed_app_manifest_description?: boolean; - dismissed_banner_download_ssb_prompt?: boolean; - dismissed_connect_auto_approval_modal?: string; - dismissed_fullscreen_download_ssb_prompt?: boolean; - dismissed_gov_slack_first_time_popup?: boolean; - dismissed_installed_app_dm_suggestions?: string; - dismissed_scdm_education?: boolean; - dismissed_scroll_search_tooltip_count?: number; - dismissed_sent_page_education?: boolean; - display_display_names?: boolean; - display_real_names_override?: number; - dnd_after_friday?: string; - dnd_after_monday?: string; - dnd_after_saturday?: string; - dnd_after_sunday?: string; - dnd_after_thursday?: string; - dnd_after_tuesday?: string; - dnd_after_wednesday?: string; - dnd_before_friday?: string; - dnd_before_monday?: string; - dnd_before_saturday?: string; - dnd_before_sunday?: string; - dnd_before_thursday?: string; - dnd_before_tuesday?: string; - dnd_before_wednesday?: string; - dnd_custom_new_badge_seen?: boolean; - dnd_days?: string; - dnd_enabled?: boolean; - dnd_enabled_friday?: string; - dnd_enabled_monday?: string; - dnd_enabled_saturday?: string; - dnd_enabled_sunday?: string; - dnd_enabled_thursday?: string; - dnd_enabled_tuesday?: string; - dnd_enabled_wednesday?: string; - dnd_end_hour?: string; - dnd_notification_schedule_new_badge_seen?: boolean; - dnd_start_hour?: string; - dnd_weekdays_off_allday?: boolean; - dropbox_enabled?: boolean; - edge_upload_proxy_check_completed?: number; - email_alerts?: string; - email_alerts_sleep_until?: number; - email_developer?: boolean; - email_offers?: boolean; - email_research?: boolean; - email_tips?: boolean; - email_weekly?: boolean; - emoji_autocomplete_big?: boolean; - emoji_mode?: string; - emoji_packs_clicked_collection_cta?: boolean; - emoji_packs_clicked_picker_cta?: boolean; - emoji_packs_clicked_picker_post_install_cta?: boolean; - emoji_packs_most_recent_available_time?: number; - emoji_use?: string; - emoji_use_org?: string; - enable_all_dms_view?: boolean; - enable_app_browser_view?: boolean; - enable_app_config_redesign?: boolean; - enable_channel_browser_view?: boolean; - enable_drafts_view?: boolean; - enable_file_browser_view?: boolean; - enable_file_browser_view_for_docs?: boolean; - enable_hq_view?: boolean; - enable_later_view?: boolean; - enable_media_captions?: boolean; - enable_mentions_and_reactions_view?: boolean; - enable_people_browser_view?: boolean; - enable_quip_file_browser_view?: boolean; - enable_react_emoji_picker?: boolean; - enable_reminders_view?: boolean; - enable_saved_items_view?: boolean; - enable_scheduled_view?: boolean; - enable_sent_view?: boolean; - enable_shortcuts_view?: boolean; - enable_slack_connect_view?: boolean; - enable_slack_connect_view_2?: number; - enable_streamline_view?: boolean; - enable_unread_view?: boolean; - ent_org_wide_channels_sidebar?: boolean; - enter_is_special_in_tbt?: boolean; - enterprise_mdm_custom_msg?: string; - enterprise_migration_seen?: boolean; - expand_inline_imgs?: boolean; - expand_internal_inline_imgs?: boolean; - expand_non_media_attachments?: boolean; - expand_snippets?: boolean; - f_key_search?: boolean; - failover_proxy_check_completed?: number; - file_picker_variant?: number; - first_seen_new_badge_in_more_menu_sidebar?: number; - first_seen_sent_page_in_sidebar?: number; - flannel_server_pool?: string; - folder_data?: string; - folders_enabled?: boolean; - frecency?: string; - frecency_ent_jumper?: string; - frecency_jumper?: string; - fuller_timestamps?: boolean; - graphic_emoticons?: boolean; - growls_enabled?: boolean; - growth_all_banners_prefs?: string; - growth_msg_limit_approaching_cta_count?: number; - growth_msg_limit_approaching_cta_ts?: number; - growth_msg_limit_long_reached_cta_count?: number; - growth_msg_limit_long_reached_cta_last_ts?: number; - growth_msg_limit_reached_cta_count?: number; - growth_msg_limit_reached_cta_last_ts?: number; - growth_msg_limit_sixty_day_banner_cta_count?: number; - growth_msg_limit_sixty_day_banner_cta_last_ts?: number; - has_acknowledged_shortcut_speedbump?: boolean; - has_created_channel?: boolean; - has_created_channel_section?: boolean; - has_dismissed_google_directory_coachmark?: boolean; - has_drafted_message?: boolean; - has_invited?: boolean; - has_joined_huddle?: boolean; - has_received_mention_or_reaction?: boolean; - has_received_threaded_message?: boolean; - has_recently_shared_a_channel?: boolean; - has_searched?: boolean; - has_sent_ten_messages?: number; - has_starred_item?: boolean; - has_uploaded?: boolean; - has_used_quickswitcher_shortcut?: boolean; - help_flexpane_clips_card_seen?: boolean; - help_flexpane_slack_connect_card_seen?: boolean; - help_menu_open_timestamp?: number; - help_modal_consult_banner_dismissed?: boolean; - help_modal_open_timestamp?: number; - hidden_users?: string; - hide_external_members_sharing_speed_bump?: boolean; - hide_hex_swatch?: boolean; - hide_user_group_info_pane?: boolean; - highlight_words?: string; - huddle_invite_sound?: string; - huddle_survey_last_seen?: string; - huddles_allow_smart_notif?: boolean; - huddles_cc_by_default?: boolean; - huddles_chime_new_endpoints_check_completed?: number; - huddles_disconnect_on_lock?: boolean; - huddles_global_mute?: boolean; - huddles_mini_panel?: boolean; - huddles_mute_by_default?: boolean; - huddles_play_music_when_last?: boolean; - huddles_reactions_play_sound?: boolean; - huddles_reactions_read_out_loud?: boolean; - huddles_set_status?: boolean; - huddles_show_shouty_rooster?: boolean; - huddles_variant?: number; - ia_details_coachmark_seen?: boolean; - ia_platform_actions_lab?: number; - ia_slackbot_survey_timestamp_48h?: number; - ia_slackbot_survey_timestamp_7d?: number; - ia_top_nav_theme?: string; - iap1_lab?: number; - identity_links_global_prefs?: string; - identity_links_prefs?: string; - in_interactive_mas_migration_flow?: boolean; - in_prod_surveys_enabled?: boolean; - inbox_views_workspace_filter?: string; - invite_accepted_notifications_muted?: boolean; - join_calls_device_settings?: string; - joiner_message_suggestion_dismissed?: boolean; - joiner_notifications_muted?: boolean; - jumbomoji?: boolean; - k_key_omnibox?: boolean; - k_key_omnibox_auto_hide_count?: number; - last_dismissed_scroll_search_tooltip_timestamp?: number; - last_seen_at_channel_warning?: number; - last_seen_sections_unreads_only_prompt_timestamp?: number; - last_snippet_type?: string; - lessons_enabled?: boolean; - load_lato_2?: boolean; - locale?: string; - locales_enabled?: LocalesEnabled; - loud_channels?: string; - loud_channels_set?: string; - ls_disabled?: boolean; - mac_ssb_bounce?: string; - mac_ssb_bullet?: boolean; - mark_msgs_read_immediately?: boolean; - media_muted?: boolean; - media_playback_speed?: number; - media_volume?: number; - mentions_exclude_at_channels?: boolean; - mentions_exclude_at_user_groups?: boolean; - mentions_exclude_reactions?: boolean; - message_navigation_toast_was_seen?: boolean; - messages_theme?: string; - mobile_channel_list_show_all_dms?: boolean; - mobile_channel_list_sort?: string; - msg_input_send_btn?: boolean; - msg_input_send_btn_auto_set?: boolean; - msg_input_sticky_composer?: boolean; - mute_sounds?: boolean; - muted_channels?: string; - mx_calendar_type?: string; - needs_initial_password_set?: boolean; - never_channels?: string; - new_msg_snd?: string; - newxp_seen_help_message?: number; - newxp_seen_last_message?: number; - newxp_suggested_channels?: string; - no_created_overlays?: boolean; - no_invites_widget_in_sidebar?: boolean; - no_joined_overlays?: boolean; - no_macelectron_banner?: boolean; - no_macssb1_banner?: boolean; - no_macssb2_banner?: boolean; - no_omnibox_in_channels?: boolean; - no_text_in_notifications?: boolean; - no_winssb1_banner?: boolean; - notification_center_filters?: string; - notifications_view?: string; - obey_inline_img_limit?: boolean; - onboarding_cancelled?: boolean; - onboarding_complete?: boolean; - onboarding_slackbot_conversation_step?: number; - onboarding_state?: number; - onboarding_tip_opt_out?: boolean; - open_quip_doc_in_flexpane?: boolean; - opened_slackbot_dm?: boolean; - overloaded_message_enabled?: boolean; - pagekeys_handled?: boolean; - phc_dismissed?: string; - phc_viewed?: string; - plain_text_mode?: boolean; - posts_formatting_guide?: boolean; - preferred_skin_tone?: string; - privacy_policy_seen?: boolean; - progressive_disclosure_state?: string; - prompted_for_email_disabling?: boolean; - purchaser?: boolean; - push_at_channel_suppressed_channels?: string; - push_dm_alert?: boolean; - push_everything?: boolean; - push_idle_wait?: number; - push_loud_channels?: string; - push_loud_channels_set?: string; - push_mention_alert?: boolean; - push_mention_channels?: string; - push_show_preview?: boolean; - push_sound?: string; - reached_all_dms_disclosure?: boolean; - reaction_notifications?: string; - reminder_notification_time?: string; - require_at?: boolean; - saved_searches?: string; - saved_view?: string; - scdm_trial_offer_banner?: string; - search_channel_sort?: string; - search_exclude_bots?: boolean; - search_exclude_channels?: string; - search_file_sort?: string; - search_hide_deactivated_users?: boolean; - search_hide_my_channels?: boolean; - search_only_current_team?: boolean; - search_only_my_channels?: boolean; - search_only_show_online?: boolean; - search_people_sort?: string; - search_sort?: string; - seen_a11y_pref_setup_coachmark?: boolean; - seen_administration_menu?: boolean; - seen_app_space_coachmark?: boolean; - seen_app_space_tutorial?: boolean; - seen_bookmarks_intro?: boolean; - seen_calls_interactive_coachmark?: boolean; - seen_channel_browser_admin_coachmark?: boolean; - seen_channel_email_tooltip?: boolean; - seen_channel_search?: boolean; - seen_connect_dm_coachmark?: boolean; - seen_connect_section_coachmark?: boolean; - seen_contextual_message_shortcuts_modal?: boolean; - seen_corporate_export_alert?: boolean; - seen_custom_status_badge?: boolean; - seen_custom_status_callout?: boolean; - seen_custom_status_expiration_badge?: boolean; - seen_domain_invite_reminder?: boolean; - seen_drafts_section_coachmark?: boolean; - seen_edit_mode?: boolean; - seen_edit_mode_edu?: boolean; - seen_emoji_pack_cta?: number; - seen_emoji_pack_dialog?: boolean; - seen_emoji_update_overlay_coachmark?: boolean; - seen_existing_install_coachmark?: boolean; - seen_first_install_coachmark?: boolean; - seen_floating_sidebar_coachmark?: boolean; - seen_gdrive_coachmark?: boolean; - seen_guest_admin_slackbot_announcement?: boolean; - seen_highlights_arrows_coachmark?: boolean; - seen_highlights_coachmark?: boolean; - seen_highlights_warm_welcome?: boolean; - seen_ia_education?: boolean; - seen_intl_channel_names_coachmark?: boolean; - seen_japanese_locale_change_message?: boolean; - seen_keyboard_shortcuts_coachmark?: boolean; - seen_link_unfurl_coachmark?: boolean; - seen_locale_change_message?: number; - seen_markdown_paste_shortcut?: number; - seen_markdown_paste_toast?: number; - seen_member_invite_reminder?: boolean; - seen_message_navigation_educational_toast?: boolean; - seen_name_tagging_coachmark?: boolean; - seen_new_badge_in_more_menu_sidebar?: boolean; - seen_new_search_ui?: boolean; - seen_onboarding_banner?: boolean; - seen_onboarding_channels?: boolean; - seen_onboarding_direct_messages?: boolean; - seen_onboarding_invites?: boolean; - seen_onboarding_private_groups?: boolean; - seen_onboarding_recent_mentions?: boolean; - seen_onboarding_search?: boolean; - seen_onboarding_slackbot_conversation?: boolean; - seen_onboarding_starred_items?: boolean; - seen_onboarding_start?: boolean; - seen_onboarding_synth_view?: boolean; - seen_onboarding_synth_view_count?: number; - seen_onboarding_synth_view_count_v2?: number; - seen_onboarding_synth_view_v2?: boolean; - seen_p3_locale_change_message_ko_kr?: number; - seen_people_search?: boolean; - seen_people_search_count?: number; - seen_quickswitcher_shortcut_tip_count?: number; - seen_sc_menu_coachmark?: boolean; - seen_sc_page?: boolean; - seen_sc_page_banner?: boolean; - seen_schedule_send_coachmark?: boolean; - seen_sections_unreads_only_prompt_count?: number; - seen_sent_page_in_sidebar?: boolean; - seen_shared_channels_coachmark?: boolean; - seen_shared_channels_opt_in_change_message?: boolean; - seen_shdep_slackbot_message?: boolean; - seen_single_emoji_msg?: boolean; - seen_sonic_deluxe_toast?: number; - seen_ssb_prompt?: boolean; - seen_threads_notification_banner?: boolean; - seen_toast_new_locale_launch?: string; - seen_toast_new_locale_launch_ts?: number; - seen_unread_view_coachmark?: boolean; - seen_welcome_2?: boolean; - seen_workflow_builder_deluxe_toast?: boolean; - seen_wysiwyg_deluxe_toast?: boolean; - separate_private_channels?: boolean; - separate_shared_channels?: boolean; - set_a11y_prefs_new_user?: boolean; - set_tz_automatically?: boolean; - shdep_promo_code_submitted?: boolean; - should_show_connect_section?: boolean; - should_show_contextual_help_for_conversation_navigation?: boolean; - should_show_contextual_help_for_jump_to_conversation?: boolean; - should_show_contextual_help_for_section_navigation?: boolean; - should_show_contextual_help_for_thread_navigation?: boolean; - should_show_unsend_message_confirmation?: boolean; - show_all_skin_tones?: boolean; - show_autocomplete_help?: number; - show_ent_onboarding?: boolean; - show_gov_slack_context_bar_banner?: boolean; - show_ia_tour_relaunch?: number; - show_jumper_scores?: boolean; - show_memory_instrument?: boolean; - show_quick_reactions?: boolean; - show_shared_channels_education_banner?: boolean; - show_sidebar_avatars?: boolean; - show_sidebar_quickswitcher_button?: boolean; - show_typing?: boolean; - sidebar_behavior?: string; - sidebar_pref_dismissed_tip?: boolean; - sidebar_theme?: string; - sidebar_theme_custom_values?: string; - slack_connect_invite_should_badge_sidebar?: boolean; - snippet_editor_wrap_long_lines?: boolean; - spaces_new_xp_banner_dismissed?: boolean; - ss_emojis?: boolean; - ssb_space_window?: string; - start_scroll_at_oldest?: boolean; - suggestions_request_id?: string; - sunset_interactive_message_views?: number; - suppress_external_invites_from_compose_warning?: boolean; - suppress_link_warning?: boolean; - suppress_thread_mention_warning?: boolean; - synth_view_prefs?: string; - tab_ui_return_selects?: boolean; - tasks_view?: string; - threads_everything?: boolean; - time24?: boolean; - tractor_enabled?: boolean; - tractor_experiment_group?: string; - two_factor_auth_enabled?: boolean; - tz?: string; - underline_links?: boolean; - up_to_browse_kb_shortcut?: boolean; - used_custom_status_kb_shortcut?: boolean; - user_colors?: string; - user_customized_quick_reactions_display_feature?: number; - user_customized_quick_reactions_has_customized?: boolean; + a11y_animations?: boolean; + a11y_dyslexic?: boolean; + a11y_play_sound_for_incoming_dm?: boolean; + a11y_play_sound_for_incoming_dm_choice?: string; + a11y_play_sound_for_sent_dm?: boolean; + a11y_play_sound_for_sent_dm_choice?: string; + a11y_read_out_incoming_dm?: boolean; + a11y_screen_reader_message_label_date_time_first?: boolean; + activity_view?: string; + add_apps_prompt_dismissed?: boolean; + add_channel_prompt_dismissed?: boolean; + add_prompt_interacted?: boolean; + all_channels_loud?: boolean; + all_notifications_prefs?: string; + all_unreads_section_filter?: string; + all_unreads_sort_order?: string; + allow_calls_to_set_current_status?: boolean; + allow_cmd_tab_iss?: boolean; + allowed_unfurl_senders?: string; + analytics_upsell_coachmark_seen?: boolean; + app_manifest_schema_format?: string; + app_subdomain_check_completed?: number; + arrow_history?: boolean; + at_channel_suppressed_channels?: string; + box_enabled?: boolean; + browsers_dismissed_channels_low_results_education?: boolean; + browsers_dismissed_files_low_results_education?: boolean; + browsers_dismissed_initial_activity_education?: boolean; + browsers_dismissed_initial_drafts_education?: boolean; + browsers_dismissed_initial_saved_education?: boolean; + browsers_dismissed_people_low_results_education?: boolean; + browsers_dismissed_user_groups_low_results_education?: boolean; + browsers_seen_initial_activity_education?: boolean; + browsers_seen_initial_channels_education?: boolean; + browsers_seen_initial_drafts_education?: boolean; + browsers_seen_initial_files_education?: boolean; + browsers_seen_initial_people_education?: boolean; + browsers_seen_initial_saved_education?: boolean; + browsers_seen_initial_user_groups_education?: boolean; + calls_disconnect_on_lock?: boolean; + calls_survey_last_seen?: string; + channel_canvas_variant?: number; + channel_sections?: string; + channel_sidebar_hide_browse_dms_link?: boolean; + channel_sidebar_hide_invite?: boolean; + channel_sort?: string; + chime_access_check_completed?: number; + clicked_close_onboarding_synth_view_banner?: boolean; + client_logs_pri?: string; + clips_feedback_survey_last_trigger_attempt?: number; + color_names_in_list?: boolean; + composer_nux?: string; + confirm_clear_all_unreads?: boolean; + confirm_sh_call_start?: boolean; + confirm_user_marked_away?: boolean; + connect_dm_early_access?: boolean; + contextual_help_reset_count?: number; + contextual_message_shortcuts_modal_was_seen?: boolean; + convert_emoticons?: boolean; + deprecation_banner_last_seen?: number; + deprecation_modal_last_seen?: number; + deprecation_toast_last_seen?: number; + desktop_client_ids?: string; + dismissed_app_config_redesign_coachmark?: boolean; + dismissed_app_launcher_atlassian_promo?: boolean; + dismissed_app_launcher_limit?: boolean; + dismissed_app_launcher_welcome?: boolean; + dismissed_app_manifest_coachmark?: boolean; + dismissed_app_manifest_description?: boolean; + dismissed_banner_download_ssb_prompt?: boolean; + dismissed_connect_auto_approval_modal?: string; + dismissed_fullscreen_download_ssb_prompt?: boolean; + dismissed_gov_slack_first_time_popup?: boolean; + dismissed_installed_app_dm_suggestions?: string; + dismissed_scdm_education?: boolean; + dismissed_scroll_search_tooltip_count?: number; + dismissed_sent_page_education?: boolean; + display_display_names?: boolean; + display_real_names_override?: number; + dnd_after_friday?: string; + dnd_after_monday?: string; + dnd_after_saturday?: string; + dnd_after_sunday?: string; + dnd_after_thursday?: string; + dnd_after_tuesday?: string; + dnd_after_wednesday?: string; + dnd_before_friday?: string; + dnd_before_monday?: string; + dnd_before_saturday?: string; + dnd_before_sunday?: string; + dnd_before_thursday?: string; + dnd_before_tuesday?: string; + dnd_before_wednesday?: string; + dnd_custom_new_badge_seen?: boolean; + dnd_days?: string; + dnd_enabled?: boolean; + dnd_enabled_friday?: string; + dnd_enabled_monday?: string; + dnd_enabled_saturday?: string; + dnd_enabled_sunday?: string; + dnd_enabled_thursday?: string; + dnd_enabled_tuesday?: string; + dnd_enabled_wednesday?: string; + dnd_end_hour?: string; + dnd_notification_schedule_new_badge_seen?: boolean; + dnd_start_hour?: string; + dnd_weekdays_off_allday?: boolean; + dropbox_enabled?: boolean; + edge_upload_proxy_check_completed?: number; + email_alerts?: string; + email_alerts_sleep_until?: number; + email_developer?: boolean; + email_offers?: boolean; + email_research?: boolean; + email_tips?: boolean; + email_weekly?: boolean; + emoji_autocomplete_big?: boolean; + emoji_mode?: string; + emoji_packs_clicked_collection_cta?: boolean; + emoji_packs_clicked_picker_cta?: boolean; + emoji_packs_clicked_picker_post_install_cta?: boolean; + emoji_packs_most_recent_available_time?: number; + emoji_use?: string; + emoji_use_org?: string; + enable_all_dms_view?: boolean; + enable_app_browser_view?: boolean; + enable_app_config_redesign?: boolean; + enable_channel_browser_view?: boolean; + enable_drafts_view?: boolean; + enable_file_browser_view?: boolean; + enable_file_browser_view_for_docs?: boolean; + enable_hq_view?: boolean; + enable_later_view?: boolean; + enable_media_captions?: boolean; + enable_mentions_and_reactions_view?: boolean; + enable_people_browser_view?: boolean; + enable_quip_file_browser_view?: boolean; + enable_react_emoji_picker?: boolean; + enable_reminders_view?: boolean; + enable_saved_items_view?: boolean; + enable_scheduled_view?: boolean; + enable_sent_view?: boolean; + enable_shortcuts_view?: boolean; + enable_slack_connect_view?: boolean; + enable_slack_connect_view_2?: number; + enable_streamline_view?: boolean; + enable_unread_view?: boolean; + ent_org_wide_channels_sidebar?: boolean; + enter_is_special_in_tbt?: boolean; + enterprise_mdm_custom_msg?: string; + enterprise_migration_seen?: boolean; + expand_inline_imgs?: boolean; + expand_internal_inline_imgs?: boolean; + expand_non_media_attachments?: boolean; + expand_snippets?: boolean; + f_key_search?: boolean; + failover_proxy_check_completed?: number; + file_picker_variant?: number; + first_seen_new_badge_in_more_menu_sidebar?: number; + first_seen_sent_page_in_sidebar?: number; + flannel_server_pool?: string; + folder_data?: string; + folders_enabled?: boolean; + frecency?: string; + frecency_ent_jumper?: string; + frecency_jumper?: string; + fuller_timestamps?: boolean; + graphic_emoticons?: boolean; + growls_enabled?: boolean; + growth_all_banners_prefs?: string; + growth_msg_limit_approaching_cta_count?: number; + growth_msg_limit_approaching_cta_ts?: number; + growth_msg_limit_long_reached_cta_count?: number; + growth_msg_limit_long_reached_cta_last_ts?: number; + growth_msg_limit_reached_cta_count?: number; + growth_msg_limit_reached_cta_last_ts?: number; + growth_msg_limit_sixty_day_banner_cta_count?: number; + growth_msg_limit_sixty_day_banner_cta_last_ts?: number; + has_acknowledged_shortcut_speedbump?: boolean; + has_created_channel?: boolean; + has_created_channel_section?: boolean; + has_dismissed_google_directory_coachmark?: boolean; + has_drafted_message?: boolean; + has_invited?: boolean; + has_joined_huddle?: boolean; + has_received_mention_or_reaction?: boolean; + has_received_threaded_message?: boolean; + has_recently_shared_a_channel?: boolean; + has_searched?: boolean; + has_sent_ten_messages?: number; + has_starred_item?: boolean; + has_uploaded?: boolean; + has_used_quickswitcher_shortcut?: boolean; + help_flexpane_clips_card_seen?: boolean; + help_flexpane_slack_connect_card_seen?: boolean; + help_menu_open_timestamp?: number; + help_modal_consult_banner_dismissed?: boolean; + help_modal_open_timestamp?: number; + hidden_users?: string; + hide_external_members_sharing_speed_bump?: boolean; + hide_hex_swatch?: boolean; + hide_user_group_info_pane?: boolean; + highlight_words?: string; + huddle_invite_sound?: string; + huddle_survey_last_seen?: string; + huddles_allow_smart_notif?: boolean; + huddles_cc_by_default?: boolean; + huddles_chime_new_endpoints_check_completed?: number; + huddles_disconnect_on_lock?: boolean; + huddles_global_mute?: boolean; + huddles_mini_panel?: boolean; + huddles_mute_by_default?: boolean; + huddles_play_music_when_last?: boolean; + huddles_reactions_play_sound?: boolean; + huddles_reactions_read_out_loud?: boolean; + huddles_set_status?: boolean; + huddles_show_shouty_rooster?: boolean; + huddles_variant?: number; + ia_details_coachmark_seen?: boolean; + ia_platform_actions_lab?: number; + ia_slackbot_survey_timestamp_48h?: number; + ia_slackbot_survey_timestamp_7d?: number; + ia_top_nav_theme?: string; + iap1_lab?: number; + identity_links_global_prefs?: string; + identity_links_prefs?: string; + in_interactive_mas_migration_flow?: boolean; + in_prod_surveys_enabled?: boolean; + inbox_views_workspace_filter?: string; + invite_accepted_notifications_muted?: boolean; + join_calls_device_settings?: string; + joiner_message_suggestion_dismissed?: boolean; + joiner_notifications_muted?: boolean; + jumbomoji?: boolean; + k_key_omnibox?: boolean; + k_key_omnibox_auto_hide_count?: number; + last_dismissed_scroll_search_tooltip_timestamp?: number; + last_seen_at_channel_warning?: number; + last_seen_sections_unreads_only_prompt_timestamp?: number; + last_snippet_type?: string; + lessons_enabled?: boolean; + load_lato_2?: boolean; + locale?: string; + locales_enabled?: LocalesEnabled; + loud_channels?: string; + loud_channels_set?: string; + ls_disabled?: boolean; + mac_ssb_bounce?: string; + mac_ssb_bullet?: boolean; + mark_msgs_read_immediately?: boolean; + media_muted?: boolean; + media_playback_speed?: number; + media_volume?: number; + mentions_exclude_at_channels?: boolean; + mentions_exclude_at_user_groups?: boolean; + mentions_exclude_reactions?: boolean; + message_navigation_toast_was_seen?: boolean; + messages_theme?: string; + mobile_channel_list_show_all_dms?: boolean; + mobile_channel_list_sort?: string; + msg_input_send_btn?: boolean; + msg_input_send_btn_auto_set?: boolean; + msg_input_sticky_composer?: boolean; + mute_sounds?: boolean; + muted_channels?: string; + mx_calendar_type?: string; + needs_initial_password_set?: boolean; + never_channels?: string; + new_msg_snd?: string; + newxp_seen_help_message?: number; + newxp_seen_last_message?: number; + newxp_suggested_channels?: string; + no_created_overlays?: boolean; + no_invites_widget_in_sidebar?: boolean; + no_joined_overlays?: boolean; + no_macelectron_banner?: boolean; + no_macssb1_banner?: boolean; + no_macssb2_banner?: boolean; + no_omnibox_in_channels?: boolean; + no_text_in_notifications?: boolean; + no_winssb1_banner?: boolean; + notification_center_filters?: string; + notifications_view?: string; + obey_inline_img_limit?: boolean; + onboarding_cancelled?: boolean; + onboarding_complete?: boolean; + onboarding_slackbot_conversation_step?: number; + onboarding_state?: number; + onboarding_tip_opt_out?: boolean; + open_quip_doc_in_flexpane?: boolean; + opened_slackbot_dm?: boolean; + overloaded_message_enabled?: boolean; + pagekeys_handled?: boolean; + phc_dismissed?: string; + phc_viewed?: string; + plain_text_mode?: boolean; + posts_formatting_guide?: boolean; + preferred_skin_tone?: string; + privacy_policy_seen?: boolean; + progressive_disclosure_state?: string; + prompted_for_email_disabling?: boolean; + purchaser?: boolean; + push_at_channel_suppressed_channels?: string; + push_dm_alert?: boolean; + push_everything?: boolean; + push_idle_wait?: number; + push_loud_channels?: string; + push_loud_channels_set?: string; + push_mention_alert?: boolean; + push_mention_channels?: string; + push_show_preview?: boolean; + push_sound?: string; + reached_all_dms_disclosure?: boolean; + reaction_notifications?: string; + reminder_notification_time?: string; + require_at?: boolean; + saved_searches?: string; + saved_view?: string; + scdm_trial_offer_banner?: string; + search_channel_sort?: string; + search_exclude_bots?: boolean; + search_exclude_channels?: string; + search_file_sort?: string; + search_hide_deactivated_users?: boolean; + search_hide_my_channels?: boolean; + search_only_current_team?: boolean; + search_only_my_channels?: boolean; + search_only_show_online?: boolean; + search_people_sort?: string; + search_sort?: string; + seen_a11y_pref_setup_coachmark?: boolean; + seen_administration_menu?: boolean; + seen_app_space_coachmark?: boolean; + seen_app_space_tutorial?: boolean; + seen_bookmarks_intro?: boolean; + seen_calls_interactive_coachmark?: boolean; + seen_channel_browser_admin_coachmark?: boolean; + seen_channel_email_tooltip?: boolean; + seen_channel_search?: boolean; + seen_connect_dm_coachmark?: boolean; + seen_connect_section_coachmark?: boolean; + seen_contextual_message_shortcuts_modal?: boolean; + seen_corporate_export_alert?: boolean; + seen_custom_status_badge?: boolean; + seen_custom_status_callout?: boolean; + seen_custom_status_expiration_badge?: boolean; + seen_domain_invite_reminder?: boolean; + seen_drafts_section_coachmark?: boolean; + seen_edit_mode?: boolean; + seen_edit_mode_edu?: boolean; + seen_emoji_pack_cta?: number; + seen_emoji_pack_dialog?: boolean; + seen_emoji_update_overlay_coachmark?: boolean; + seen_existing_install_coachmark?: boolean; + seen_first_install_coachmark?: boolean; + seen_floating_sidebar_coachmark?: boolean; + seen_gdrive_coachmark?: boolean; + seen_guest_admin_slackbot_announcement?: boolean; + seen_highlights_arrows_coachmark?: boolean; + seen_highlights_coachmark?: boolean; + seen_highlights_warm_welcome?: boolean; + seen_ia_education?: boolean; + seen_intl_channel_names_coachmark?: boolean; + seen_japanese_locale_change_message?: boolean; + seen_keyboard_shortcuts_coachmark?: boolean; + seen_link_unfurl_coachmark?: boolean; + seen_locale_change_message?: number; + seen_markdown_paste_shortcut?: number; + seen_markdown_paste_toast?: number; + seen_member_invite_reminder?: boolean; + seen_message_navigation_educational_toast?: boolean; + seen_name_tagging_coachmark?: boolean; + seen_new_badge_in_more_menu_sidebar?: boolean; + seen_new_search_ui?: boolean; + seen_onboarding_banner?: boolean; + seen_onboarding_channels?: boolean; + seen_onboarding_direct_messages?: boolean; + seen_onboarding_invites?: boolean; + seen_onboarding_private_groups?: boolean; + seen_onboarding_recent_mentions?: boolean; + seen_onboarding_search?: boolean; + seen_onboarding_slackbot_conversation?: boolean; + seen_onboarding_starred_items?: boolean; + seen_onboarding_start?: boolean; + seen_onboarding_synth_view?: boolean; + seen_onboarding_synth_view_count?: number; + seen_onboarding_synth_view_count_v2?: number; + seen_onboarding_synth_view_v2?: boolean; + seen_p3_locale_change_message_ko_kr?: number; + seen_people_search?: boolean; + seen_people_search_count?: number; + seen_quickswitcher_shortcut_tip_count?: number; + seen_sc_menu_coachmark?: boolean; + seen_sc_page?: boolean; + seen_sc_page_banner?: boolean; + seen_schedule_send_coachmark?: boolean; + seen_sections_unreads_only_prompt_count?: number; + seen_sent_page_in_sidebar?: boolean; + seen_shared_channels_coachmark?: boolean; + seen_shared_channels_opt_in_change_message?: boolean; + seen_shdep_slackbot_message?: boolean; + seen_single_emoji_msg?: boolean; + seen_sonic_deluxe_toast?: number; + seen_ssb_prompt?: boolean; + seen_threads_notification_banner?: boolean; + seen_toast_new_locale_launch?: string; + seen_toast_new_locale_launch_ts?: number; + seen_unread_view_coachmark?: boolean; + seen_welcome_2?: boolean; + seen_workflow_builder_deluxe_toast?: boolean; + seen_wysiwyg_deluxe_toast?: boolean; + separate_private_channels?: boolean; + separate_shared_channels?: boolean; + set_a11y_prefs_new_user?: boolean; + set_tz_automatically?: boolean; + shdep_promo_code_submitted?: boolean; + should_show_connect_section?: boolean; + should_show_contextual_help_for_conversation_navigation?: boolean; + should_show_contextual_help_for_jump_to_conversation?: boolean; + should_show_contextual_help_for_section_navigation?: boolean; + should_show_contextual_help_for_thread_navigation?: boolean; + should_show_unsend_message_confirmation?: boolean; + show_all_skin_tones?: boolean; + show_autocomplete_help?: number; + show_ent_onboarding?: boolean; + show_gov_slack_context_bar_banner?: boolean; + show_ia_tour_relaunch?: number; + show_jumper_scores?: boolean; + show_memory_instrument?: boolean; + show_quick_reactions?: boolean; + show_shared_channels_education_banner?: boolean; + show_sidebar_avatars?: boolean; + show_sidebar_quickswitcher_button?: boolean; + show_typing?: boolean; + sidebar_behavior?: string; + sidebar_pref_dismissed_tip?: boolean; + sidebar_theme?: string; + sidebar_theme_custom_values?: string; + slack_connect_invite_should_badge_sidebar?: boolean; + snippet_editor_wrap_long_lines?: boolean; + spaces_new_xp_banner_dismissed?: boolean; + ss_emojis?: boolean; + ssb_space_window?: string; + start_scroll_at_oldest?: boolean; + suggestions_request_id?: string; + sunset_interactive_message_views?: number; + suppress_external_invites_from_compose_warning?: boolean; + suppress_link_warning?: boolean; + suppress_thread_mention_warning?: boolean; + synth_view_prefs?: string; + tab_ui_return_selects?: boolean; + tasks_view?: string; + threads_everything?: boolean; + time24?: boolean; + tractor_enabled?: boolean; + tractor_experiment_group?: string; + two_factor_auth_enabled?: boolean; + tz?: string; + underline_links?: boolean; + up_to_browse_kb_shortcut?: boolean; + used_custom_status_kb_shortcut?: boolean; + user_colors?: string; + user_customized_quick_reactions_display_feature?: number; + user_customized_quick_reactions_has_customized?: boolean; user_customized_quick_reactions_use_frequently_used_emoji?: boolean; - user_expectations_survey_last_trigger_attempt?: number; - webapp_spellcheck?: boolean; - welcome_message_hidden?: boolean; - welcome_place_state?: string; - whats_new_read?: number; - who_can_see_account_by_searching_email?: string; - who_can_share_contact_card?: string; - whocanseethis_dm_mpdm_badge?: boolean; - workflow_builder_coachmarks?: string; - workflow_builder_intro_modal_clicked_through?: boolean; - xws_dismissed_education?: boolean; - xws_seen_education?: number; - xws_sidebar_variant?: number; + user_expectations_survey_last_trigger_attempt?: number; + webapp_spellcheck?: boolean; + welcome_message_hidden?: boolean; + welcome_place_state?: string; + whats_new_read?: number; + who_can_see_account_by_searching_email?: string; + who_can_share_contact_card?: string; + whocanseethis_dm_mpdm_badge?: boolean; + workflow_builder_coachmarks?: string; + workflow_builder_intro_modal_clicked_through?: boolean; + xws_dismissed_education?: boolean; + xws_seen_education?: number; + xws_sidebar_variant?: number; } export interface LocalesEnabled { @@ -1917,288 +1916,288 @@ export interface LocalesEnabled { } export interface Subteams { - all?: All[]; + all?: All[]; self?: string[]; } export interface All { - auto_provision?: boolean; - channel_count?: number; - created_by?: string; - date_create?: number; - date_delete?: number; - date_update?: number; - description?: string; + auto_provision?: boolean; + channel_count?: number; + created_by?: string; + date_create?: number; + date_delete?: number; + date_update?: number; + description?: string; enterprise_subteam_id?: string; - handle?: string; - id?: string; - is_external?: boolean; - is_subteam?: boolean; - is_usergroup?: boolean; - name?: string; - prefs?: AllPrefs; - team_id?: string; - updated_by?: string; - user_count?: number; + handle?: string; + id?: string; + is_external?: boolean; + is_subteam?: boolean; + is_usergroup?: boolean; + name?: string; + prefs?: AllPrefs; + team_id?: string; + updated_by?: string; + user_count?: number; } export interface AllPrefs { channels?: string[]; - groups?: Group[]; + groups?: Group[]; } export interface Team { - avatar_base_url?: string; - date_create?: number; - domain?: string; - email_domain?: string; - icon?: Icon; - id?: string; - is_verified?: boolean; - limit_ts?: number; - messages_count?: number; - msg_edit_window_mins?: number; - name?: string; + avatar_base_url?: string; + date_create?: number; + domain?: string; + email_domain?: string; + icon?: Icon; + id?: string; + is_verified?: boolean; + limit_ts?: number; + messages_count?: number; + msg_edit_window_mins?: number; + name?: string; onboarding_channel_id?: string; - over_storage_limit?: boolean; - plan?: string; - prefs?: TeamPrefs; - url?: string; + over_storage_limit?: boolean; + plan?: string; + prefs?: TeamPrefs; + url?: string; } export interface Icon { - image_102?: string; - image_132?: string; - image_230?: string; - image_34?: string; - image_44?: string; - image_68?: string; - image_88?: string; + image_102?: string; + image_132?: string; + image_230?: string; + image_34?: string; + image_44?: string; + image_68?: string; + image_88?: string; image_original?: string; } export interface TeamPrefs { - admin_customized_quick_reactions?: string[]; - all_users_can_purchase?: boolean; - allow_admin_retention_override?: number; - allow_audio_clip_sharing_slack_connect?: boolean; - allow_audio_clips?: boolean; - allow_box_cfs?: boolean; - allow_calls?: boolean; - allow_calls_interactive_screen_sharing?: boolean; - allow_clip_downloads?: string; - allow_free_automated_trials?: boolean; - allow_huddles?: boolean; - allow_huddles_transcriptions?: boolean; - allow_huddles_video?: boolean; - allow_media_transcriptions?: boolean; - allow_message_deletion?: boolean; - allow_retention_override?: boolean; - allow_spaceship?: string; - allow_sponsored_slack_connections?: boolean; - allow_video_clip_sharing_slack_connect?: boolean; - allow_video_clips?: boolean; - app_dir_only?: boolean; - app_management_apps?: string[]; - app_whitelist_enabled?: boolean; - auth_mode?: string; - block_file_download?: boolean; - box_app_installed?: boolean; - calls_apps?: CallsApps; - calls_locations?: string[]; - can_accept_slack_connect_channel_invites?: boolean; - can_create_external_limited_invite?: boolean; - can_create_slack_connect_channel_invite?: boolean; - can_receive_shared_channels_invites?: boolean; - channel_email_addresses_enabled?: boolean; - compliance_export_start?: number; - content_review_enabled?: boolean; - created_with_google?: boolean; - custom_status_default_emoji?: string; - custom_status_presets?: Array; - daily_prompts_enabled?: boolean; - default_channel_creation_enabled?: boolean; - default_channels?: string[]; - default_create_private_channel?: boolean; - default_rxns?: string[]; - disable_email_ingestion?: boolean; - disable_file_deleting?: boolean; - disable_file_editing?: boolean; - disable_file_uploads?: string; - disable_sidebar_connect_prompts?: string[]; - disable_sidebar_install_prompts?: string[]; - disallow_public_file_urls?: boolean; - discoverable?: string; - display_anniversary_celebration?: boolean; - display_default_phone?: boolean; - display_email_addresses?: boolean; - display_external_email_addresses?: boolean; - display_name_pronunciation?: boolean; - display_new_hire_celebration?: boolean; - display_pronouns?: boolean; - display_real_names?: boolean; - dm_retention_duration?: number; - dm_retention_redaction_duration?: number; - dm_retention_type?: number; - dnd_after_friday?: string; - dnd_after_monday?: string; - dnd_after_saturday?: string; - dnd_after_sunday?: string; - dnd_after_thursday?: string; - dnd_after_tuesday?: string; - dnd_after_wednesday?: string; - dnd_before_friday?: string; - dnd_before_monday?: string; - dnd_before_saturday?: string; - dnd_before_sunday?: string; - dnd_before_thursday?: string; - dnd_before_tuesday?: string; - dnd_before_wednesday?: string; - dnd_days?: string; - dnd_enabled?: boolean; - dnd_enabled_friday?: string; - dnd_enabled_monday?: string; - dnd_enabled_saturday?: string; - dnd_enabled_sunday?: string; - dnd_enabled_thursday?: string; - dnd_enabled_tuesday?: string; - dnd_enabled_wednesday?: string; - dnd_end_hour?: string; - dnd_start_hour?: string; - dnd_weekdays_off_allday?: boolean; - dropbox_legacy_picker?: boolean; - emoji_only_admins?: boolean; - enable_connect_dm_early_access?: boolean; - enable_domain_allowlist_for_cea?: boolean; - enable_info_barriers?: boolean; - enable_mpdm_to_private_channel_conversion?: boolean; - enable_shared_channels?: number; - enterprise_default_channels?: string[]; - enterprise_has_corporate_exports?: boolean; - enterprise_intune_enabled?: boolean; - enterprise_mandatory_channels?: string[]; - enterprise_mdm_date_enabled?: number; - enterprise_mdm_disable_file_download?: boolean; - enterprise_mdm_level?: number; - enterprise_mdm_token?: string; - enterprise_mobile_device_check?: boolean; - enterprise_team_creation_request?: EnterpriseTeamCreationRequest; - ext_audit_log_retention_duration?: number; - ext_audit_log_retention_type?: number; - file_limit_whitelisted?: boolean; - file_retention_duration?: number; - file_retention_type?: number; - filepicker_app_first_install?: boolean; - gdrive_enabled_team?: boolean; - gg_enabled?: boolean; - group_retention_duration?: number; - group_retention_type?: number; - has_compliance_export?: boolean; - has_hipaa_compliance?: boolean; - has_seen_partner_promo?: boolean; - hermes_has_accepted_tos?: boolean; + admin_customized_quick_reactions?: string[]; + all_users_can_purchase?: boolean; + allow_admin_retention_override?: number; + allow_audio_clip_sharing_slack_connect?: boolean; + allow_audio_clips?: boolean; + allow_box_cfs?: boolean; + allow_calls?: boolean; + allow_calls_interactive_screen_sharing?: boolean; + allow_clip_downloads?: string; + allow_free_automated_trials?: boolean; + allow_huddles?: boolean; + allow_huddles_transcriptions?: boolean; + allow_huddles_video?: boolean; + allow_media_transcriptions?: boolean; + allow_message_deletion?: boolean; + allow_retention_override?: boolean; + allow_spaceship?: string; + allow_sponsored_slack_connections?: boolean; + allow_video_clip_sharing_slack_connect?: boolean; + allow_video_clips?: boolean; + app_dir_only?: boolean; + app_management_apps?: string[]; + app_whitelist_enabled?: boolean; + auth_mode?: string; + block_file_download?: boolean; + box_app_installed?: boolean; + calls_apps?: CallsApps; + calls_locations?: string[]; + can_accept_slack_connect_channel_invites?: boolean; + can_create_external_limited_invite?: boolean; + can_create_slack_connect_channel_invite?: boolean; + can_receive_shared_channels_invites?: boolean; + channel_email_addresses_enabled?: boolean; + compliance_export_start?: number; + content_review_enabled?: boolean; + created_with_google?: boolean; + custom_status_default_emoji?: string; + custom_status_presets?: Array; + daily_prompts_enabled?: boolean; + default_channel_creation_enabled?: boolean; + default_channels?: string[]; + default_create_private_channel?: boolean; + default_rxns?: string[]; + disable_email_ingestion?: boolean; + disable_file_deleting?: boolean; + disable_file_editing?: boolean; + disable_file_uploads?: string; + disable_sidebar_connect_prompts?: string[]; + disable_sidebar_install_prompts?: string[]; + disallow_public_file_urls?: boolean; + discoverable?: string; + display_anniversary_celebration?: boolean; + display_default_phone?: boolean; + display_email_addresses?: boolean; + display_external_email_addresses?: boolean; + display_name_pronunciation?: boolean; + display_new_hire_celebration?: boolean; + display_pronouns?: boolean; + display_real_names?: boolean; + dm_retention_duration?: number; + dm_retention_redaction_duration?: number; + dm_retention_type?: number; + dnd_after_friday?: string; + dnd_after_monday?: string; + dnd_after_saturday?: string; + dnd_after_sunday?: string; + dnd_after_thursday?: string; + dnd_after_tuesday?: string; + dnd_after_wednesday?: string; + dnd_before_friday?: string; + dnd_before_monday?: string; + dnd_before_saturday?: string; + dnd_before_sunday?: string; + dnd_before_thursday?: string; + dnd_before_tuesday?: string; + dnd_before_wednesday?: string; + dnd_days?: string; + dnd_enabled?: boolean; + dnd_enabled_friday?: string; + dnd_enabled_monday?: string; + dnd_enabled_saturday?: string; + dnd_enabled_sunday?: string; + dnd_enabled_thursday?: string; + dnd_enabled_tuesday?: string; + dnd_enabled_wednesday?: string; + dnd_end_hour?: string; + dnd_start_hour?: string; + dnd_weekdays_off_allday?: boolean; + dropbox_legacy_picker?: boolean; + emoji_only_admins?: boolean; + enable_connect_dm_early_access?: boolean; + enable_domain_allowlist_for_cea?: boolean; + enable_info_barriers?: boolean; + enable_mpdm_to_private_channel_conversion?: boolean; + enable_shared_channels?: number; + enterprise_default_channels?: string[]; + enterprise_has_corporate_exports?: boolean; + enterprise_intune_enabled?: boolean; + enterprise_mandatory_channels?: string[]; + enterprise_mdm_date_enabled?: number; + enterprise_mdm_disable_file_download?: boolean; + enterprise_mdm_level?: number; + enterprise_mdm_token?: string; + enterprise_mobile_device_check?: boolean; + enterprise_team_creation_request?: EnterpriseTeamCreationRequest; + ext_audit_log_retention_duration?: number; + ext_audit_log_retention_type?: number; + file_limit_whitelisted?: boolean; + file_retention_duration?: number; + file_retention_type?: number; + filepicker_app_first_install?: boolean; + gdrive_enabled_team?: boolean; + gg_enabled?: boolean; + group_retention_duration?: number; + group_retention_type?: number; + has_compliance_export?: boolean; + has_hipaa_compliance?: boolean; + has_seen_partner_promo?: boolean; + hermes_has_accepted_tos?: boolean; hermes_triggers_trippable_by_slack_connected_teams?: boolean; - hide_gsuite_invite_option?: boolean; - hide_referers?: boolean; - identity_links_prefs?: EnterpriseTeamCreationRequest; - invite_requests_enabled?: boolean; - invited_user_preset?: InvitedUserPreset; - invites_limit?: boolean; - invites_only_admins?: boolean; - joiner_notifications_enabled?: boolean; - loading_only_admins?: boolean; - locale?: string; - loud_channel_mentions_limit?: number; - magic_unfurls_enabled?: boolean; - member_analytics_disabled?: boolean; - ml_opt_out?: boolean; - mobile_passcode_timeout_in_seconds?: number; - mobile_session_duration?: number; - msg_edit_window_mins?: number; - notification_redaction_type?: string; - notify_pending_enabled?: boolean; - ntlm_credential_domains?: string; - onedrive_app_installed?: boolean; - onedrive_enabled_team?: boolean; - private_channel_membership_limit?: number; - private_retention_redaction_duration?: number; - public_retention_redaction_duration?: number; - received_esc_route_to_channel_awareness_message?: boolean; - retention_duration?: number; - retention_type?: number; - rich_previews_default?: string; - saml_enable?: boolean; - search_feedback_opt_out?: boolean; - self_serve_select?: boolean; - session_duration?: number; - session_duration_type?: number; - show_join_leave?: boolean; - show_legacy_paid_benefits_page?: boolean; - show_mobile_promos?: boolean; - sign_in_with_slack_default?: string; - sign_in_with_slack_disabled?: boolean; - single_user_exports?: boolean; - slack_connect_account_visibility?: string; - slack_connect_allowed_workspaces?: SlackConnectAllowedWorkspaces; - slack_connect_approval_type?: string; - slack_connect_dm_only_verified_orgs?: boolean; - slack_connect_file_upload_sharing_enabled?: boolean; - slackbot_responses_disabled?: boolean; - slackbot_responses_only_admins?: boolean; - spaceship_workspace_setting_visible?: boolean; - sso_disable_emails?: boolean; - sso_optional?: boolean; - sso_signup_restrictions?: number; - sso_sync_with_provider?: boolean; - stats_only_admins?: boolean; - subteams_auto_create_admin?: boolean; - subteams_auto_create_owner?: boolean; - thorn_safer_scan?: boolean; - two_factor_auth_required?: number; - uneditable_user_profile_fields?: string[]; - use_browser_picker?: boolean; - uses_customized_custom_status_presets?: boolean; - warn_before_at_channel?: string; - warn_user_before_logout?: boolean; - warn_user_before_logout_desktop?: boolean; - warn_user_before_logout_mobile?: boolean; - welcome_place_enabled?: boolean; - who_can_accept_slack_connect_channel_invites?: SlackConnectAllowedWorkspaces; - who_can_archive_channels?: string; - who_can_at_channel?: string; - who_can_at_everyone?: string; - who_can_change_team_profile?: string; - who_can_create_channel_email_addresses?: SlackConnectAllowedWorkspaces; - who_can_create_channels?: string; - who_can_create_delete_user_groups?: string; - who_can_create_external_limited_invite?: SlackConnectAllowedWorkspaces; - who_can_create_groups?: string; - who_can_create_shared_channels?: string; - who_can_create_slack_connect_channel_invite?: SlackConnectAllowedWorkspaces; - who_can_create_workflows?: SlackConnectAllowedWorkspaces; - who_can_dm_anyone?: SlackConnectAllowedWorkspaces; - who_can_edit_user_groups?: string; - who_can_kick_channels?: string; - who_can_kick_groups?: string; - who_can_manage_channel_posting_prefs?: string; - who_can_manage_ext_shared_channels?: SlackConnectAllowedWorkspaces; - who_can_manage_guests?: SlackConnectAllowedWorkspaces; - who_can_manage_integrations?: SlackConnectAllowedWorkspaces; - who_can_manage_private_channels?: WhoCanManageP; + hide_gsuite_invite_option?: boolean; + hide_referers?: boolean; + identity_links_prefs?: EnterpriseTeamCreationRequest; + invite_requests_enabled?: boolean; + invited_user_preset?: InvitedUserPreset; + invites_limit?: boolean; + invites_only_admins?: boolean; + joiner_notifications_enabled?: boolean; + loading_only_admins?: boolean; + locale?: string; + loud_channel_mentions_limit?: number; + magic_unfurls_enabled?: boolean; + member_analytics_disabled?: boolean; + ml_opt_out?: boolean; + mobile_passcode_timeout_in_seconds?: number; + mobile_session_duration?: number; + msg_edit_window_mins?: number; + notification_redaction_type?: string; + notify_pending_enabled?: boolean; + ntlm_credential_domains?: string; + onedrive_app_installed?: boolean; + onedrive_enabled_team?: boolean; + private_channel_membership_limit?: number; + private_retention_redaction_duration?: number; + public_retention_redaction_duration?: number; + received_esc_route_to_channel_awareness_message?: boolean; + retention_duration?: number; + retention_type?: number; + rich_previews_default?: string; + saml_enable?: boolean; + search_feedback_opt_out?: boolean; + self_serve_select?: boolean; + session_duration?: number; + session_duration_type?: number; + show_join_leave?: boolean; + show_legacy_paid_benefits_page?: boolean; + show_mobile_promos?: boolean; + sign_in_with_slack_default?: string; + sign_in_with_slack_disabled?: boolean; + single_user_exports?: boolean; + slack_connect_account_visibility?: string; + slack_connect_allowed_workspaces?: SlackConnectAllowedWorkspaces; + slack_connect_approval_type?: string; + slack_connect_dm_only_verified_orgs?: boolean; + slack_connect_file_upload_sharing_enabled?: boolean; + slackbot_responses_disabled?: boolean; + slackbot_responses_only_admins?: boolean; + spaceship_workspace_setting_visible?: boolean; + sso_disable_emails?: boolean; + sso_optional?: boolean; + sso_signup_restrictions?: number; + sso_sync_with_provider?: boolean; + stats_only_admins?: boolean; + subteams_auto_create_admin?: boolean; + subteams_auto_create_owner?: boolean; + thorn_safer_scan?: boolean; + two_factor_auth_required?: number; + uneditable_user_profile_fields?: string[]; + use_browser_picker?: boolean; + uses_customized_custom_status_presets?: boolean; + warn_before_at_channel?: string; + warn_user_before_logout?: boolean; + warn_user_before_logout_desktop?: boolean; + warn_user_before_logout_mobile?: boolean; + welcome_place_enabled?: boolean; + who_can_accept_slack_connect_channel_invites?: SlackConnectAllowedWorkspaces; + who_can_archive_channels?: string; + who_can_at_channel?: string; + who_can_at_everyone?: string; + who_can_change_team_profile?: string; + who_can_create_channel_email_addresses?: SlackConnectAllowedWorkspaces; + who_can_create_channels?: string; + who_can_create_delete_user_groups?: string; + who_can_create_external_limited_invite?: SlackConnectAllowedWorkspaces; + who_can_create_groups?: string; + who_can_create_shared_channels?: string; + who_can_create_slack_connect_channel_invite?: SlackConnectAllowedWorkspaces; + who_can_create_workflows?: SlackConnectAllowedWorkspaces; + who_can_dm_anyone?: SlackConnectAllowedWorkspaces; + who_can_edit_user_groups?: string; + who_can_kick_channels?: string; + who_can_kick_groups?: string; + who_can_manage_channel_posting_prefs?: string; + who_can_manage_ext_shared_channels?: SlackConnectAllowedWorkspaces; + who_can_manage_guests?: SlackConnectAllowedWorkspaces; + who_can_manage_integrations?: SlackConnectAllowedWorkspaces; + who_can_manage_private_channels?: WhoCanManageP; who_can_manage_private_channels_at_workspace_level?: WhoCanManageP; - who_can_manage_public_channels?: WhoCanManageP; - who_can_manage_shared_channels?: SlackConnectAllowedWorkspaces; - who_can_post_general?: string; - who_can_post_in_shared_channels?: SlackConnectAllowedWorkspaces; - who_can_request_ext_shared_channels?: SlackConnectAllowedWorkspaces; - who_can_review_flagged_content?: SlackConnectAllowedWorkspaces; - who_can_use_hermes?: WhoCanUseHermes; - who_can_view_message_activity?: SlackConnectAllowedWorkspaces; - workflow_builder_enabled?: boolean; - workflow_extension_steps_beta_opt_in?: boolean; - workflow_extension_steps_enabled?: boolean; - workflows_export_csv_enabled?: boolean; - workflows_webhook_trigger_enabled?: boolean; + who_can_manage_public_channels?: WhoCanManageP; + who_can_manage_shared_channels?: SlackConnectAllowedWorkspaces; + who_can_post_general?: string; + who_can_post_in_shared_channels?: SlackConnectAllowedWorkspaces; + who_can_request_ext_shared_channels?: SlackConnectAllowedWorkspaces; + who_can_review_flagged_content?: SlackConnectAllowedWorkspaces; + who_can_use_hermes?: WhoCanUseHermes; + who_can_view_message_activity?: SlackConnectAllowedWorkspaces; + workflow_builder_enabled?: boolean; + workflow_extension_steps_beta_opt_in?: boolean; + workflow_extension_steps_enabled?: boolean; + workflows_export_csv_enabled?: boolean; + workflows_webhook_trigger_enabled?: boolean; } export interface CallsApps { @@ -2207,9 +2206,9 @@ export interface CallsApps { } export interface Video { - id?: string; + id?: string; image?: string; - name?: string; + name?: string; } export interface EnterpriseTeamCreationRequest { @@ -2231,71 +2230,71 @@ export interface WhoCanManageP { export interface WhoCanUseHermes { subteam?: string[]; - type?: string[]; - user?: string[]; + type?: string[]; + user?: string[]; } export interface User { - color?: string; - deleted?: boolean; - id?: string; - is_admin?: boolean; - is_app_user?: boolean; - is_bot?: boolean; - is_email_confirmed?: boolean; - is_invited_user?: boolean; - is_owner?: boolean; - is_primary_owner?: boolean; - is_restricted?: boolean; - is_ultra_restricted?: boolean; - is_workflow_bot?: boolean; - name?: string; - presence?: string; - profile?: Profile; - real_name?: string; - team_id?: string; - tz?: string; - tz_label?: string; - tz_offset?: number; - updated?: number; + color?: string; + deleted?: boolean; + id?: string; + is_admin?: boolean; + is_app_user?: boolean; + is_bot?: boolean; + is_email_confirmed?: boolean; + is_invited_user?: boolean; + is_owner?: boolean; + is_primary_owner?: boolean; + is_restricted?: boolean; + is_ultra_restricted?: boolean; + is_workflow_bot?: boolean; + name?: string; + presence?: string; + profile?: Profile; + real_name?: string; + team_id?: string; + tz?: string; + tz_label?: string; + tz_offset?: number; + updated?: number; who_can_share_contact_card?: string; } export interface Profile { - always_active?: boolean; - api_app_id?: string; - avatar_hash?: string; - bot_id?: Id; - display_name?: string; - display_name_normalized?: string; - email?: string; - fields?: Fields; - first_name?: string; - guest_invited_by?: string; - huddle_state?: string; + always_active?: boolean; + api_app_id?: string; + avatar_hash?: string; + bot_id?: Id; + display_name?: string; + display_name_normalized?: string; + email?: string; + fields?: Fields; + first_name?: string; + guest_invited_by?: string; + huddle_state?: string; huddle_state_expiration_ts?: number; - image_1024?: string; - image_192?: string; - image_24?: string; - image_32?: string; - image_48?: string; - image_512?: string; - image_72?: string; - image_original?: string; - is_custom_image?: boolean; - last_name?: string; - phone?: string; - pronouns?: string; - real_name?: string; - real_name_normalized?: string; - skype?: string; - status_emoji?: string; - status_emoji_display_info?: StatusEmojiDisplayInfo[]; - status_expiration?: number; - status_text?: string; - status_text_canonical?: string; - team?: string; - title?: string; + image_1024?: string; + image_192?: string; + image_24?: string; + image_32?: string; + image_48?: string; + image_512?: string; + image_72?: string; + image_original?: string; + is_custom_image?: boolean; + last_name?: string; + phone?: string; + pronouns?: string; + real_name?: string; + real_name_normalized?: string; + skype?: string; + status_emoji?: string; + status_emoji_display_info?: StatusEmojiDisplayInfo[]; + status_expiration?: number; + status_text?: string; + status_text_canonical?: string; + team?: string; + title?: string; } export interface Fields { @@ -2303,13 +2302,13 @@ export interface Fields { } export interface Xf019LT13Z16 { - alt?: string; + alt?: string; value?: string; } export interface StatusEmojiDisplayInfo { display_alias?: string; - display_url?: string; - emoji_name?: string; - unicode?: string; + display_url?: string; + emoji_name?: string; + unicode?: string; } diff --git a/packages/web-api/src/types/response/SearchAllResponse.ts b/packages/web-api/src/types/response/SearchAllResponse.ts index baa23d576..d79529263 100644 --- a/packages/web-api/src/types/response/SearchAllResponse.ts +++ b/packages/web-api/src/types/response/SearchAllResponse.ts @@ -8,233 +8,233 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type SearchAllResponse = WebAPICallResult & { - error?: string; - files?: Files; + error?: string; + files?: Files; messages?: Messages; - needed?: string; - ok?: boolean; - posts?: Posts; + needed?: string; + ok?: boolean; + posts?: Posts; provided?: string; - query?: string; + query?: string; }; export interface Files { - matches?: FilesMatch[]; + matches?: FilesMatch[]; pagination?: Pagination; - paging?: Paging; - total?: number; + paging?: Paging; + total?: number; } export interface FilesMatch { - access?: string; - attachments?: Attachment[]; - bot_id?: string; - cc?: Cc[]; - channels?: string[]; - comments_count?: number; - converted_pdf?: string; - created?: number; - deanimate?: string; - deanimate_gif?: string; - display_as_bot?: boolean; - dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; - edit_link?: string; - editable?: boolean; - editors?: LastEditor[]; - editors_count?: number; - external_id?: string; - external_type?: string; - external_url?: string; - file_access?: string; - filetype?: string; - from?: Cc[]; - groups?: string[]; - has_more?: boolean; - has_more_shares?: boolean; - has_rich_preview?: boolean; - headers?: MatchHeaders; - id?: string; - image_exif_rotation?: number; - ims?: string[]; - is_channel_space?: boolean; - is_external?: boolean; - is_public?: boolean; - is_starred?: boolean; - last_editor?: LastEditor; - lines?: number; - lines_more?: number; - linked_channel_id?: string; - media_display_type?: string; - mimetype?: string; - mode?: string; - name?: string; - non_owner_editable?: boolean; - org_or_workspace_access?: string; - original_attachment_count?: number; - original_h?: number; - original_w?: number; - permalink?: string; - permalink_public?: string; - plain_text?: string; - pretty_type?: string; - preview?: string; - preview_highlight?: string; - preview_is_truncated?: boolean; - preview_plain_text?: string; + access?: string; + attachments?: Attachment[]; + bot_id?: string; + cc?: Cc[]; + channels?: string[]; + comments_count?: number; + converted_pdf?: string; + created?: number; + deanimate?: string; + deanimate_gif?: string; + display_as_bot?: boolean; + dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; + edit_link?: string; + editable?: boolean; + editors?: LastEditor[]; + editors_count?: number; + external_id?: string; + external_type?: string; + external_url?: string; + file_access?: string; + filetype?: string; + from?: Cc[]; + groups?: string[]; + has_more?: boolean; + has_more_shares?: boolean; + has_rich_preview?: boolean; + headers?: MatchHeaders; + id?: string; + image_exif_rotation?: number; + ims?: string[]; + is_channel_space?: boolean; + is_external?: boolean; + is_public?: boolean; + is_starred?: boolean; + last_editor?: LastEditor; + lines?: number; + lines_more?: number; + linked_channel_id?: string; + media_display_type?: string; + mimetype?: string; + mode?: string; + name?: string; + non_owner_editable?: boolean; + org_or_workspace_access?: string; + original_attachment_count?: number; + original_h?: number; + original_w?: number; + permalink?: string; + permalink_public?: string; + plain_text?: string; + pretty_type?: string; + preview?: string; + preview_highlight?: string; + preview_is_truncated?: boolean; + preview_plain_text?: string; private_channels_with_file_access_count?: number; - private_file_with_access_count?: number; - public_url_shared?: boolean; - quip_thread_id?: string; - sent_to_self?: boolean; - shares?: MatchShares; - size?: number; - subject?: string; - team_pref_version_history_enabled?: boolean; - teams_shared_with?: string[]; - thumb_1024?: string; - thumb_1024_h?: number; - thumb_1024_w?: number; - thumb_160?: string; - thumb_360?: string; - thumb_360_gif?: string; - thumb_360_h?: number; - thumb_360_w?: number; - thumb_480?: string; - thumb_480_gif?: string; - thumb_480_h?: number; - thumb_480_w?: number; - thumb_64?: string; - thumb_720?: string; - thumb_720_h?: number; - thumb_720_w?: number; - thumb_80?: string; - thumb_800?: string; - thumb_800_h?: number; - thumb_800_w?: number; - thumb_960?: string; - thumb_960_h?: number; - thumb_960_w?: number; - thumb_pdf?: string; - thumb_pdf_h?: number; - thumb_pdf_w?: number; - thumb_tiny?: string; - thumb_video?: string; - timestamp?: number; - title?: string; - title_blocks?: MatchTitleBlock[]; - to?: Cc[]; - update_notification?: number; - updated?: number; - url_private?: string; - url_private_download?: string; - url_static_preview?: string; - user?: LastEditor; - user_team?: UserTeam; - username?: string; + private_file_with_access_count?: number; + public_url_shared?: boolean; + quip_thread_id?: string; + sent_to_self?: boolean; + shares?: MatchShares; + size?: number; + subject?: string; + team_pref_version_history_enabled?: boolean; + teams_shared_with?: string[]; + thumb_1024?: string; + thumb_1024_h?: number; + thumb_1024_w?: number; + thumb_160?: string; + thumb_360?: string; + thumb_360_gif?: string; + thumb_360_h?: number; + thumb_360_w?: number; + thumb_480?: string; + thumb_480_gif?: string; + thumb_480_h?: number; + thumb_480_w?: number; + thumb_64?: string; + thumb_720?: string; + thumb_720_h?: number; + thumb_720_w?: number; + thumb_80?: string; + thumb_800?: string; + thumb_800_h?: number; + thumb_800_w?: number; + thumb_960?: string; + thumb_960_h?: number; + thumb_960_w?: number; + thumb_pdf?: string; + thumb_pdf_h?: number; + thumb_pdf_w?: number; + thumb_tiny?: string; + thumb_video?: string; + timestamp?: number; + title?: string; + title_blocks?: MatchTitleBlock[]; + to?: Cc[]; + update_notification?: number; + updated?: number; + url_private?: string; + url_private_download?: string; + url_static_preview?: string; + user?: LastEditor; + user_team?: UserTeam; + username?: string; } export interface Attachment { - actions?: Action[]; - app_id?: string; - app_unfurl_url?: string; - author_icon?: string; - author_id?: string; - author_link?: string; - author_name?: string; - author_subname?: string; - blocks?: AttachmentBlock[]; - bot_id?: string; - callback_id?: string; - channel_id?: string; - channel_name?: string; - channel_team?: string; - color?: string; - fallback?: string; - fields?: AttachmentField[]; - file_id?: string; - filename?: string; - files?: FileElement[]; - footer?: string; - footer_icon?: string; - from_url?: string; - hide_border?: boolean; - hide_color?: boolean; - id?: number; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - indent?: boolean; - is_app_unfurl?: boolean; - is_file_attachment?: boolean; - is_msg_unfurl?: boolean; - is_reply_unfurl?: boolean; + actions?: Action[]; + app_id?: string; + app_unfurl_url?: string; + author_icon?: string; + author_id?: string; + author_link?: string; + author_name?: string; + author_subname?: string; + blocks?: AttachmentBlock[]; + bot_id?: string; + callback_id?: string; + channel_id?: string; + channel_name?: string; + channel_team?: string; + color?: string; + fallback?: string; + fields?: AttachmentField[]; + file_id?: string; + filename?: string; + files?: FileElement[]; + footer?: string; + footer_icon?: string; + from_url?: string; + hide_border?: boolean; + hide_color?: boolean; + id?: number; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + indent?: boolean; + is_app_unfurl?: boolean; + is_file_attachment?: boolean; + is_msg_unfurl?: boolean; + is_reply_unfurl?: boolean; is_thread_root_unfurl?: boolean; - list?: List; - list_record?: PurpleListRecord; - list_record_id?: string; - list_records?: ListRecordElement[]; - list_schema?: Schema[]; - list_view?: View; - list_view_id?: string; - message_blocks?: MessageBlock[]; - metadata?: AttachmentMetadata; - mimetype?: string; - mrkdwn_in?: string[]; - msg_subtype?: string; - original_url?: string; - pretext?: string; - preview?: Preview; - service_icon?: string; - service_name?: string; - service_url?: string; - size?: number; - text?: string; - thumb_height?: number; - thumb_url?: string; - thumb_width?: number; - title?: string; - title_link?: string; - ts?: string; - url?: string; - video_html?: string; - video_html_height?: number; - video_html_width?: number; - video_url?: string; + list?: List; + list_record?: PurpleListRecord; + list_record_id?: string; + list_records?: ListRecordElement[]; + list_schema?: Schema[]; + list_view?: View; + list_view_id?: string; + message_blocks?: MessageBlock[]; + metadata?: AttachmentMetadata; + mimetype?: string; + mrkdwn_in?: string[]; + msg_subtype?: string; + original_url?: string; + pretext?: string; + preview?: Preview; + service_icon?: string; + service_name?: string; + service_url?: string; + size?: number; + text?: string; + thumb_height?: number; + thumb_url?: string; + thumb_width?: number; + title?: string; + title_link?: string; + ts?: string; + url?: string; + video_html?: string; + video_html_height?: number; + video_html_width?: number; + video_url?: string; } export interface Action { - confirm?: ActionConfirm; - data_source?: string; - id?: string; + confirm?: ActionConfirm; + data_source?: string; + id?: string; min_query_length?: number; - name?: string; - option_groups?: ActionOptionGroup[]; - options?: SelectedOptionElement[]; + name?: string; + option_groups?: ActionOptionGroup[]; + options?: SelectedOptionElement[]; selected_options?: SelectedOptionElement[]; - style?: string; - text?: string; - type?: ActionType; - url?: string; - value?: string; + style?: string; + text?: string; + type?: ActionType; + url?: string; + value?: string; } export interface ActionConfirm { dismiss_text?: string; - ok_text?: string; - text?: string; - title?: string; + ok_text?: string; + text?: string; + title?: string; } export interface ActionOptionGroup { options?: SelectedOptionElement[]; - text?: string; + text?: string; } export interface SelectedOptionElement { - text?: string; + text?: string; value?: string; } @@ -265,100 +265,100 @@ export enum ActionType { } export interface AttachmentBlock { - accessory?: Accessory; - alt_text?: string; - app_collaborators?: string[]; - app_id?: string; - author_name?: string; - block_id?: string; - bot_user_id?: string; - button_label?: string; - description?: DescriptionElement | string; - developer_trace_id?: string; - elements?: Accessory[]; - fallback?: string; - fields?: DescriptionElement[]; - function_trigger_id?: string; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - is_animated?: boolean; - is_workflow_app?: boolean; - owning_team_id?: string; - provider_icon_url?: string; - provider_name?: string; + accessory?: Accessory; + alt_text?: string; + app_collaborators?: string[]; + app_id?: string; + author_name?: string; + block_id?: string; + bot_user_id?: string; + button_label?: string; + description?: DescriptionElement | string; + developer_trace_id?: string; + elements?: Accessory[]; + fallback?: string; + fields?: DescriptionElement[]; + function_trigger_id?: string; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + is_animated?: boolean; + is_workflow_app?: boolean; + owning_team_id?: string; + provider_icon_url?: string; + provider_name?: string; sales_home_workflow_app_type?: number; - share_url?: string; - slack_file?: SlackFile; - text?: DescriptionElement; - thumbnail_url?: string; - title?: DescriptionElement | string; - title_url?: string; - trigger_subtype?: string; - trigger_type?: string; - type?: BlockType; - url?: string; - video_url?: string; - workflow_id?: string; + share_url?: string; + slack_file?: SlackFile; + text?: DescriptionElement; + thumbnail_url?: string; + title?: DescriptionElement | string; + title_url?: string; + trigger_subtype?: string; + trigger_type?: string; + type?: BlockType; + url?: string; + video_url?: string; + workflow_id?: string; } export interface Accessory { - accessibility_label?: string; - action_id?: string; - alt_text?: string; - border?: number; - confirm?: AccessoryConfirm; + accessibility_label?: string; + action_id?: string; + alt_text?: string; + border?: number; + confirm?: AccessoryConfirm; default_to_current_conversation?: boolean; - elements?: AccessoryElement[]; - fallback?: string; - filter?: Filter; - focus_on_load?: boolean; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - indent?: number; - initial_channel?: string; - initial_channels?: string[]; - initial_conversation?: string; - initial_conversations?: string[]; - initial_date?: string; - initial_date_time?: number; - initial_option?: InitialOptionElement; - initial_options?: InitialOptionElement[]; - initial_time?: string; - initial_user?: string; - initial_users?: string[]; - max_selected_items?: number; - min_query_length?: number; - offset?: number; - option_groups?: AccessoryOptionGroup[]; - options?: InitialOptionElement[]; - placeholder?: DescriptionElement; - response_url_enabled?: boolean; - slack_file?: SlackFile; - style?: string; - text?: DescriptionElement; - timezone?: string; - type?: ActionType; - url?: string; - value?: string; - workflow?: Workflow; + elements?: AccessoryElement[]; + fallback?: string; + filter?: Filter; + focus_on_load?: boolean; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + indent?: number; + initial_channel?: string; + initial_channels?: string[]; + initial_conversation?: string; + initial_conversations?: string[]; + initial_date?: string; + initial_date_time?: number; + initial_option?: InitialOptionElement; + initial_options?: InitialOptionElement[]; + initial_time?: string; + initial_user?: string; + initial_users?: string[]; + max_selected_items?: number; + min_query_length?: number; + offset?: number; + option_groups?: AccessoryOptionGroup[]; + options?: InitialOptionElement[]; + placeholder?: DescriptionElement; + response_url_enabled?: boolean; + slack_file?: SlackFile; + style?: string; + text?: DescriptionElement; + timezone?: string; + type?: ActionType; + url?: string; + value?: string; + workflow?: Workflow; } export interface AccessoryConfirm { confirm?: DescriptionElement; - deny?: DescriptionElement; - style?: string; - text?: DescriptionElement; - title?: DescriptionElement; + deny?: DescriptionElement; + style?: string; + text?: DescriptionElement; + title?: DescriptionElement; } export interface DescriptionElement { - emoji?: boolean; - text?: string; - type?: DescriptionType; + emoji?: boolean; + text?: string; + type?: DescriptionType; verbatim?: boolean; } @@ -368,42 +368,42 @@ export enum DescriptionType { } export interface AccessoryElement { - border?: number; + border?: number; elements?: PurpleElement[]; - indent?: number; - offset?: number; - style?: string; - type?: ActionType; + indent?: number; + offset?: number; + style?: string; + type?: ActionType; } export interface PurpleElement { - channel_id?: string; - fallback?: string; - format?: string; - name?: string; - range?: string; - skin_tone?: number; - style?: Style; - team_id?: string; - text?: string; - timestamp?: string; - type?: PurpleType; - unicode?: string; - unsafe?: boolean; - url?: string; - user_id?: string; + channel_id?: string; + fallback?: string; + format?: string; + name?: string; + range?: string; + skin_tone?: number; + style?: Style; + team_id?: string; + text?: string; + timestamp?: string; + type?: PurpleType; + unicode?: string; + unsafe?: boolean; + url?: string; + user_id?: string; usergroup_id?: string; - value?: string; + value?: string; } export interface Style { - bold?: boolean; + bold?: boolean; client_highlight?: boolean; - code?: boolean; - highlight?: boolean; - italic?: boolean; - strike?: boolean; - unlink?: boolean; + code?: boolean; + highlight?: boolean; + italic?: boolean; + strike?: boolean; + unlink?: boolean; } export enum PurpleType { @@ -420,25 +420,25 @@ export enum PurpleType { } export interface Filter { - exclude_bot_users?: boolean; + exclude_bot_users?: boolean; exclude_external_shared_channels?: boolean; - include?: any[]; + include?: any[]; } export interface InitialOptionElement { description?: DescriptionElement; - text?: DescriptionElement; - url?: string; - value?: string; + text?: DescriptionElement; + url?: string; + value?: string; } export interface AccessoryOptionGroup { - label?: DescriptionElement; + label?: DescriptionElement; options?: InitialOptionElement[]; } export interface SlackFile { - id?: string; + id?: string; url?: string; } @@ -448,11 +448,11 @@ export interface Workflow { export interface Trigger { customizable_input_parameters?: CustomizableInputParameter[]; - url?: string; + url?: string; } export interface CustomizableInputParameter { - name?: string; + name?: string; value?: string; } @@ -474,173 +474,173 @@ export interface AttachmentField { } export interface FileElement { - access?: string; - alt_txt?: string; - app_id?: string; - app_name?: string; - attachments?: any[]; - blocks?: AttachmentBlock[]; - bot_id?: string; - can_toggle_canvas_lock?: boolean; - canvas_template_mode?: string; - cc?: Cc[]; - channel_actions_count?: number; - channel_actions_ts?: string; - channels?: string[]; - comments_count?: number; - converted_pdf?: string; - created?: number; - deanimate?: string; - deanimate_gif?: string; - display_as_bot?: boolean; - dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; - duration_ms?: number; - edit_link?: string; - edit_timestamp?: number; - editable?: boolean; - editor?: string; - editors?: string[]; - external_id?: string; - external_type?: string; - external_url?: string; - favorites?: Favorite[]; - file_access?: string; - filetype?: string; - from?: Cc[]; - groups?: string[]; - has_more?: boolean; - has_more_shares?: boolean; - has_rich_preview?: boolean; - headers?: FileHeaders; - hls?: string; - hls_embed?: string; - id?: string; - image_exif_rotation?: number; - ims?: string[]; - initial_comment?: InitialComment; - is_channel_space?: boolean; - is_external?: boolean; - is_public?: boolean; - is_starred?: boolean; - last_editor?: string; - last_read?: number; - lines?: number; - lines_more?: number; - linked_channel_id?: string; - list_limits?: ListLimits; - list_metadata?: ListMetadata; - media_display_type?: string; - media_progress?: MediaProgress; - mimetype?: string; - mode?: string; - mp4?: string; - mp4_low?: string; - name?: string; - non_owner_editable?: boolean; - num_stars?: number; - org_or_workspace_access?: string; - original_attachment_count?: number; - original_h?: string; - original_w?: string; - permalink?: string; - permalink_public?: string; - pinned_to?: string[]; - pjpeg?: string; - plain_text?: string; - pretty_type?: string; - preview?: string; - preview_highlight?: string; - preview_is_truncated?: boolean; - preview_plain_text?: string; + access?: string; + alt_txt?: string; + app_id?: string; + app_name?: string; + attachments?: any[]; + blocks?: AttachmentBlock[]; + bot_id?: string; + can_toggle_canvas_lock?: boolean; + canvas_template_mode?: string; + cc?: Cc[]; + channel_actions_count?: number; + channel_actions_ts?: string; + channels?: string[]; + comments_count?: number; + converted_pdf?: string; + created?: number; + deanimate?: string; + deanimate_gif?: string; + display_as_bot?: boolean; + dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; + duration_ms?: number; + edit_link?: string; + edit_timestamp?: number; + editable?: boolean; + editor?: string; + editors?: string[]; + external_id?: string; + external_type?: string; + external_url?: string; + favorites?: Favorite[]; + file_access?: string; + filetype?: string; + from?: Cc[]; + groups?: string[]; + has_more?: boolean; + has_more_shares?: boolean; + has_rich_preview?: boolean; + headers?: FileHeaders; + hls?: string; + hls_embed?: string; + id?: string; + image_exif_rotation?: number; + ims?: string[]; + initial_comment?: InitialComment; + is_channel_space?: boolean; + is_external?: boolean; + is_public?: boolean; + is_starred?: boolean; + last_editor?: string; + last_read?: number; + lines?: number; + lines_more?: number; + linked_channel_id?: string; + list_limits?: ListLimits; + list_metadata?: ListMetadata; + media_display_type?: string; + media_progress?: MediaProgress; + mimetype?: string; + mode?: string; + mp4?: string; + mp4_low?: string; + name?: string; + non_owner_editable?: boolean; + num_stars?: number; + org_or_workspace_access?: string; + original_attachment_count?: number; + original_h?: string; + original_w?: string; + permalink?: string; + permalink_public?: string; + pinned_to?: string[]; + pjpeg?: string; + plain_text?: string; + pretty_type?: string; + preview?: string; + preview_highlight?: string; + preview_is_truncated?: boolean; + preview_plain_text?: string; private_channels_with_file_access_count?: number; - private_file_with_access_count?: number; - public_url_shared?: boolean; - quip_thread_id?: string; - reactions?: Reaction[]; - saved?: Saved; - sent_to_self?: boolean; - shares?: PurpleShares; - show_badge?: boolean; - simplified_html?: string; - size?: number; - source_team?: string; - subject?: string; - subtype?: string; - team_pref_version_history_enabled?: boolean; - teams_shared_with?: any[]; - template_conversion_ts?: number; - template_description?: string; - template_icon?: string; - template_name?: string; - template_title?: string; - thumb_1024?: string; - thumb_1024_gif?: string; - thumb_1024_h?: string; - thumb_1024_w?: string; - thumb_160?: string; - thumb_160_gif?: string; - thumb_160_h?: string; - thumb_160_w?: string; - thumb_360?: string; - thumb_360_gif?: string; - thumb_360_h?: string; - thumb_360_w?: string; - thumb_480?: string; - thumb_480_gif?: string; - thumb_480_h?: string; - thumb_480_w?: string; - thumb_64?: string; - thumb_64_gif?: string; - thumb_64_h?: string; - thumb_64_w?: string; - thumb_720?: string; - thumb_720_gif?: string; - thumb_720_h?: string; - thumb_720_w?: string; - thumb_80?: string; - thumb_800?: string; - thumb_800_gif?: string; - thumb_800_h?: string; - thumb_800_w?: string; - thumb_80_gif?: string; - thumb_80_h?: string; - thumb_80_w?: string; - thumb_960?: string; - thumb_960_gif?: string; - thumb_960_h?: string; - thumb_960_w?: string; - thumb_gif?: string; - thumb_pdf?: string; - thumb_pdf_h?: string; - thumb_pdf_w?: string; - thumb_tiny?: string; - thumb_video?: string; - thumb_video_h?: number; - thumb_video_w?: number; - timestamp?: number; - title?: string; - title_blocks?: AttachmentBlock[]; - to?: Cc[]; - transcription?: Transcription; - update_notification?: number; - updated?: number; - url_private?: string; - url_private_download?: string; - url_static_preview?: string; - user?: string; - user_team?: string; - username?: string; - vtt?: string; + private_file_with_access_count?: number; + public_url_shared?: boolean; + quip_thread_id?: string; + reactions?: Reaction[]; + saved?: Saved; + sent_to_self?: boolean; + shares?: PurpleShares; + show_badge?: boolean; + simplified_html?: string; + size?: number; + source_team?: string; + subject?: string; + subtype?: string; + team_pref_version_history_enabled?: boolean; + teams_shared_with?: any[]; + template_conversion_ts?: number; + template_description?: string; + template_icon?: string; + template_name?: string; + template_title?: string; + thumb_1024?: string; + thumb_1024_gif?: string; + thumb_1024_h?: string; + thumb_1024_w?: string; + thumb_160?: string; + thumb_160_gif?: string; + thumb_160_h?: string; + thumb_160_w?: string; + thumb_360?: string; + thumb_360_gif?: string; + thumb_360_h?: string; + thumb_360_w?: string; + thumb_480?: string; + thumb_480_gif?: string; + thumb_480_h?: string; + thumb_480_w?: string; + thumb_64?: string; + thumb_64_gif?: string; + thumb_64_h?: string; + thumb_64_w?: string; + thumb_720?: string; + thumb_720_gif?: string; + thumb_720_h?: string; + thumb_720_w?: string; + thumb_80?: string; + thumb_800?: string; + thumb_800_gif?: string; + thumb_800_h?: string; + thumb_800_w?: string; + thumb_80_gif?: string; + thumb_80_h?: string; + thumb_80_w?: string; + thumb_960?: string; + thumb_960_gif?: string; + thumb_960_h?: string; + thumb_960_w?: string; + thumb_gif?: string; + thumb_pdf?: string; + thumb_pdf_h?: string; + thumb_pdf_w?: string; + thumb_tiny?: string; + thumb_video?: string; + thumb_video_h?: number; + thumb_video_w?: number; + timestamp?: number; + title?: string; + title_blocks?: AttachmentBlock[]; + to?: Cc[]; + transcription?: Transcription; + update_notification?: number; + updated?: number; + url_private?: string; + url_private_download?: string; + url_static_preview?: string; + user?: string; + user_team?: string; + username?: string; + vtt?: string; } export interface Cc { - address?: string; - name?: string; + address?: string; + name?: string; original?: string; } export interface DmMpdmUsersWithFileAccess { - access?: string; + access?: string; user_id?: LastEditor; } @@ -650,92 +650,92 @@ export enum LastEditor { } export interface Favorite { - collection_id?: string; + collection_id?: string; collection_name?: string; - position?: string; + position?: string; } export interface FileHeaders { - date?: string; + date?: string; in_reply_to?: string; - message_id?: string; - reply_to?: string; + message_id?: string; + reply_to?: string; } export interface InitialComment { - channel?: string; - comment?: string; - created?: number; - id?: string; - is_intro?: boolean; + channel?: string; + comment?: string; + created?: number; + id?: string; + is_intro?: boolean; timestamp?: number; - user?: string; + user?: string; } export interface ListLimits { - column_count?: number; - column_count_limit?: number; + column_count?: number; + column_count_limit?: number; over_column_maximum?: boolean; - over_row_maximum?: boolean; - over_view_maximum?: boolean; - row_count?: number; - row_count_limit?: number; - view_count?: number; - view_count_limit?: number; + over_row_maximum?: boolean; + over_view_maximum?: boolean; + row_count?: number; + row_count_limit?: number; + view_count?: number; + view_count_limit?: number; } export interface ListMetadata { creation_source?: CreationSource; - description?: string; - icon?: string; - icon_team_id?: string; - icon_url?: string; - integrations?: string[]; - is_trial?: boolean; - schema?: Schema[]; - views?: View[]; + description?: string; + icon?: string; + icon_team_id?: string; + icon_url?: string; + integrations?: string[]; + is_trial?: boolean; + schema?: Schema[]; + views?: View[]; } export interface CreationSource { - reference_id?: string; - type?: string; + reference_id?: string; + type?: string; workflow_function_id?: string; } export interface Schema { - id?: string; + id?: string; is_primary_column?: boolean; - key?: string; - name?: string; - options?: Options; - type?: string; + key?: string; + name?: string; + options?: Options; + type?: string; } export interface Options { - canvas_id?: string; + canvas_id?: string; canvas_placeholder_mapping?: CanvasPlaceholderMapping[]; - choices?: Choice[]; - currency?: string; - currency_format?: string; - date_format?: string; - default_value?: string; - default_value_typed?: DefaultValueTyped; - emoji?: string; - emoji_team_id?: string; - for_assignment?: boolean; - format?: string; - linked_to?: string[]; - mark_as_done_when_checked?: boolean; - max?: number; - notify_users?: boolean; - precision?: number; - rounding?: string; - show_member_name?: boolean; - time_format?: string; + choices?: Choice[]; + currency?: string; + currency_format?: string; + date_format?: string; + default_value?: string; + default_value_typed?: DefaultValueTyped; + emoji?: string; + emoji_team_id?: string; + for_assignment?: boolean; + format?: string; + linked_to?: string[]; + mark_as_done_when_checked?: boolean; + max?: number; + notify_users?: boolean; + precision?: number; + rounding?: string; + show_member_name?: boolean; + time_format?: string; } export interface CanvasPlaceholderMapping { - column?: string; + column?: string; variable?: string; } @@ -750,64 +750,64 @@ export interface DefaultValueTyped { } export interface View { - columns?: Column[]; - created_by?: string; - date_created?: number; - id?: string; + columns?: Column[]; + created_by?: string; + date_created?: number; + id?: string; is_all_items_view?: boolean; - is_locked?: boolean; - name?: string; - position?: string; + is_locked?: boolean; + name?: string; + position?: string; stick_column_left?: boolean; - type?: string; + type?: string; } export interface Column { - id?: string; - key?: string; + id?: string; + key?: string; position?: string; - visible?: boolean; - width?: number; + visible?: boolean; + width?: number; } export interface MediaProgress { - duration_ms?: number; + duration_ms?: number; max_offset_ms?: number; - offset_ms?: number; + offset_ms?: number; } export interface Reaction { count?: number; - name?: string; - url?: string; + name?: string; + url?: string; users?: string[]; } export interface Saved { date_completed?: number; - date_due?: number; - is_archived?: boolean; - state?: string; + date_due?: number; + is_archived?: boolean; + state?: string; } export interface PurpleShares { private?: { [key: string]: Public[] }; - public?: { [key: string]: Public[] }; + public?: { [key: string]: Public[] }; } export interface Public { - access?: string; - channel_name?: string; - date_last_shared?: number; - latest_reply?: string; - reply_count?: number; - reply_users?: string[]; + access?: string; + channel_name?: string; + date_last_shared?: number; + latest_reply?: string; + reply_count?: number; + reply_users?: string[]; reply_users_count?: number; - share_user_id?: LastEditor; - source?: string; - team_id?: UserTeam; - thread_ts?: string; - ts?: Ts; + share_user_id?: LastEditor; + source?: string; + team_id?: UserTeam; + thread_ts?: string; + ts?: Ts; } export enum UserTeam { @@ -826,48 +826,47 @@ export interface Transcription { } export interface List { - channels?: string[]; - comments_count?: number; - created?: number; - display_as_bot?: boolean; - dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; - editable?: boolean; - external_type?: string; - file_access?: string; - filetype?: string; - groups?: string[]; - has_more_shares?: boolean; - has_rich_preview?: boolean; - id?: string; - ims?: string[]; - is_external?: boolean; - is_public?: boolean; - last_editor?: string; - list_limits?: ListLimits; - list_metadata?: ListMetadata; - mimetype?: string; - mode?: string; - name?: string; - permalink?: string; - permalink_public?: string; - pretty_type?: string; + channels?: string[]; + comments_count?: number; + created?: number; + display_as_bot?: boolean; + dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; + editable?: boolean; + external_type?: string; + file_access?: string; + filetype?: string; + groups?: string[]; + has_more_shares?: boolean; + has_rich_preview?: boolean; + id?: string; + ims?: string[]; + is_external?: boolean; + is_public?: boolean; + last_editor?: string; + list_limits?: ListLimits; + list_metadata?: ListMetadata; + mimetype?: string; + mode?: string; + name?: string; + permalink?: string; + permalink_public?: string; + pretty_type?: string; private_channels_with_file_access_count?: number; - private_file_with_access_count?: number; - public_url_shared?: boolean; - shares?: ListShares; - size?: number; - timestamp?: number; - title?: string; - updated?: number; - url_private?: string; - url_private_download?: string; - user?: string; - user_team?: string; - username?: string; + private_file_with_access_count?: number; + public_url_shared?: boolean; + shares?: ListShares; + size?: number; + timestamp?: number; + title?: string; + updated?: number; + url_private?: string; + url_private_download?: string; + user?: string; + user_team?: string; + username?: string; } -export interface ListShares { -} +export type ListShares = {}; export interface PurpleListRecord { record?: Record; @@ -875,90 +874,90 @@ export interface PurpleListRecord { } export interface Record { - fields?: RecordField[]; + fields?: RecordField[]; record_id?: string; } export interface RecordField { attachment?: any[]; - channel?: any[]; - checkbox?: boolean; - column_id?: string; - date?: any[]; - email?: any[]; - key?: string; - message?: Message; - number?: any[]; - phone?: any[]; - rating?: any[]; - rich_text?: any[]; - select?: any[]; - text?: string; - timestamp?: any[]; - user?: any[]; - value?: string; + channel?: any[]; + checkbox?: boolean; + column_id?: string; + date?: any[]; + email?: any[]; + key?: string; + message?: Message; + number?: any[]; + phone?: any[]; + rating?: any[]; + rich_text?: any[]; + select?: any[]; + text?: string; + timestamp?: any[]; + user?: any[]; + value?: string; } export interface Message { - app_id?: string; - attachments?: any[]; - blocks?: AttachmentBlock[]; - bot_id?: string; - bot_link?: string; - bot_profile?: BotProfile; - channel?: string; - client_msg_id?: string; - comment?: Comment; - display_as_bot?: boolean; - edited?: Edited; - file?: MessageFile; - files?: any[]; - hidden?: boolean; - icons?: MessageIcons; - inviter?: string; - is_intro?: boolean; - is_locked?: boolean; - is_starred?: boolean; + app_id?: string; + attachments?: any[]; + blocks?: AttachmentBlock[]; + bot_id?: string; + bot_link?: string; + bot_profile?: BotProfile; + channel?: string; + client_msg_id?: string; + comment?: Comment; + display_as_bot?: boolean; + edited?: Edited; + file?: MessageFile; + files?: any[]; + hidden?: boolean; + icons?: MessageIcons; + inviter?: string; + is_intro?: boolean; + is_locked?: boolean; + is_starred?: boolean; is_thread_broadcast?: boolean; - item?: Comment; - item_type?: string; - last_read?: string; - latest_reply?: string; - metadata?: MessageMetadata; - no_notifications?: boolean; - parent_user_id?: string; - pinned_to?: any[]; - purpose?: string; - reactions?: any[]; - replies?: any[]; - reply_count?: number; - reply_users?: any[]; - reply_users_count?: number; - room?: Room; - root?: Root; - subscribed?: boolean; - subtype?: string; - team?: string; - text?: string; - thread_ts?: string; - topic?: string; - ts?: string; - type?: string; - unfurl_links?: boolean; - unfurl_media?: boolean; - upload?: boolean; - user?: string; - username?: string; - wibblr?: boolean; - x_files?: any[]; + item?: Comment; + item_type?: string; + last_read?: string; + latest_reply?: string; + metadata?: MessageMetadata; + no_notifications?: boolean; + parent_user_id?: string; + pinned_to?: any[]; + purpose?: string; + reactions?: any[]; + replies?: any[]; + reply_count?: number; + reply_users?: any[]; + reply_users_count?: number; + room?: Room; + root?: Root; + subscribed?: boolean; + subtype?: string; + team?: string; + text?: string; + thread_ts?: string; + topic?: string; + ts?: string; + type?: string; + unfurl_links?: boolean; + unfurl_media?: boolean; + upload?: boolean; + user?: string; + username?: string; + wibblr?: boolean; + x_files?: any[]; } export interface BotProfile { - app_id?: string; + app_id?: string; deleted?: boolean; - icons?: BotProfileIcons; - id?: string; - name?: string; + icons?: BotProfileIcons; + id?: string; + name?: string; team_id?: string; updated?: number; } @@ -970,208 +969,208 @@ export interface BotProfileIcons { } export interface Comment { - comment?: string; - created?: string; - display_as_bot?: boolean; - edit_link?: string; - editable?: boolean; - external_type?: string; - filetype?: string; - has_rich_preview?: boolean; - id?: string; - is_external?: boolean; - is_intro?: boolean; - is_public?: boolean; - is_starred?: boolean; - lines?: number; - lines_more?: number; - media_display_type?: string; - mimetype?: string; - mode?: string; - name?: string; - permalink?: string; - permalink_public?: boolean; - pretty_type?: string; - preview?: string; - preview_highlight?: string; + comment?: string; + created?: string; + display_as_bot?: boolean; + edit_link?: string; + editable?: boolean; + external_type?: string; + filetype?: string; + has_rich_preview?: boolean; + id?: string; + is_external?: boolean; + is_intro?: boolean; + is_public?: boolean; + is_starred?: boolean; + lines?: number; + lines_more?: number; + media_display_type?: string; + mimetype?: string; + mode?: string; + name?: string; + permalink?: string; + permalink_public?: boolean; + pretty_type?: string; + preview?: string; + preview_highlight?: string; preview_is_truncated?: boolean; - public_url_shared?: boolean; - size?: number; - timestamp?: string; - title?: string; - url_private?: string; + public_url_shared?: boolean; + size?: number; + timestamp?: string; + title?: string; + url_private?: string; url_private_download?: boolean; - user?: string; - username?: string; + user?: string; + username?: string; } export interface Edited { - ts?: string; + ts?: string; user?: string; } export interface MessageFile { - access?: string; - alt_txt?: string; - app_id?: string; - app_name?: string; - attachments?: any[]; - blocks?: any[]; - bot_id?: string; - can_toggle_canvas_lock?: boolean; - canvas_template_mode?: string; - cc?: any[]; - channel_actions_count?: number; - channel_actions_ts?: string; - channels?: any[]; - comments_count?: number; - converted_pdf?: string; - created?: number; - deanimate?: string; - deanimate_gif?: string; - display_as_bot?: boolean; - dm_mpdm_users_with_file_access?: any[]; - duration_ms?: number; - edit_link?: string; - edit_timestamp?: number; - editable?: boolean; - editor?: string; - editors?: any[]; - external_id?: string; - external_type?: string; - external_url?: string; - favorites?: any[]; - file_access?: string; - filetype?: string; - from?: any[]; - groups?: any[]; - has_more?: boolean; - has_more_shares?: boolean; - has_rich_preview?: boolean; - headers?: FileHeaders; - hls?: string; - hls_embed?: string; - id?: string; - image_exif_rotation?: number; - ims?: any[]; - initial_comment?: InitialComment; - is_channel_space?: boolean; - is_external?: boolean; - is_public?: boolean; - is_starred?: boolean; - last_editor?: string; - last_read?: number; - lines?: number; - lines_more?: number; - linked_channel_id?: string; - list_limits?: ListLimits; - list_metadata?: ListMetadata; - media_display_type?: string; - media_progress?: MediaProgress; - mimetype?: string; - mode?: string; - mp4?: string; - mp4_low?: string; - name?: string; - non_owner_editable?: boolean; - num_stars?: number; - org_or_workspace_access?: string; - original_attachment_count?: number; - original_h?: string; - original_w?: string; - permalink?: string; - permalink_public?: string; - pinned_to?: any[]; - pjpeg?: string; - plain_text?: string; - pretty_type?: string; - preview?: string; - preview_highlight?: string; - preview_is_truncated?: boolean; - preview_plain_text?: string; + access?: string; + alt_txt?: string; + app_id?: string; + app_name?: string; + attachments?: any[]; + blocks?: any[]; + bot_id?: string; + can_toggle_canvas_lock?: boolean; + canvas_template_mode?: string; + cc?: any[]; + channel_actions_count?: number; + channel_actions_ts?: string; + channels?: any[]; + comments_count?: number; + converted_pdf?: string; + created?: number; + deanimate?: string; + deanimate_gif?: string; + display_as_bot?: boolean; + dm_mpdm_users_with_file_access?: any[]; + duration_ms?: number; + edit_link?: string; + edit_timestamp?: number; + editable?: boolean; + editor?: string; + editors?: any[]; + external_id?: string; + external_type?: string; + external_url?: string; + favorites?: any[]; + file_access?: string; + filetype?: string; + from?: any[]; + groups?: any[]; + has_more?: boolean; + has_more_shares?: boolean; + has_rich_preview?: boolean; + headers?: FileHeaders; + hls?: string; + hls_embed?: string; + id?: string; + image_exif_rotation?: number; + ims?: any[]; + initial_comment?: InitialComment; + is_channel_space?: boolean; + is_external?: boolean; + is_public?: boolean; + is_starred?: boolean; + last_editor?: string; + last_read?: number; + lines?: number; + lines_more?: number; + linked_channel_id?: string; + list_limits?: ListLimits; + list_metadata?: ListMetadata; + media_display_type?: string; + media_progress?: MediaProgress; + mimetype?: string; + mode?: string; + mp4?: string; + mp4_low?: string; + name?: string; + non_owner_editable?: boolean; + num_stars?: number; + org_or_workspace_access?: string; + original_attachment_count?: number; + original_h?: string; + original_w?: string; + permalink?: string; + permalink_public?: string; + pinned_to?: any[]; + pjpeg?: string; + plain_text?: string; + pretty_type?: string; + preview?: string; + preview_highlight?: string; + preview_is_truncated?: boolean; + preview_plain_text?: string; private_channels_with_file_access_count?: number; - private_file_with_access_count?: number; - public_url_shared?: boolean; - quip_thread_id?: string; - reactions?: any[]; - saved?: Saved; - sent_to_self?: boolean; - shares?: ListShares; - show_badge?: boolean; - simplified_html?: string; - size?: number; - source_team?: string; - subject?: string; - subtype?: string; - team_pref_version_history_enabled?: boolean; - teams_shared_with?: any[]; - template_conversion_ts?: number; - template_description?: string; - template_icon?: string; - template_name?: string; - template_title?: string; - thumb_1024?: string; - thumb_1024_gif?: string; - thumb_1024_h?: string; - thumb_1024_w?: string; - thumb_160?: string; - thumb_160_gif?: string; - thumb_160_h?: string; - thumb_160_w?: string; - thumb_360?: string; - thumb_360_gif?: string; - thumb_360_h?: string; - thumb_360_w?: string; - thumb_480?: string; - thumb_480_gif?: string; - thumb_480_h?: string; - thumb_480_w?: string; - thumb_64?: string; - thumb_64_gif?: string; - thumb_64_h?: string; - thumb_64_w?: string; - thumb_720?: string; - thumb_720_gif?: string; - thumb_720_h?: string; - thumb_720_w?: string; - thumb_80?: string; - thumb_800?: string; - thumb_800_gif?: string; - thumb_800_h?: string; - thumb_800_w?: string; - thumb_80_gif?: string; - thumb_80_h?: string; - thumb_80_w?: string; - thumb_960?: string; - thumb_960_gif?: string; - thumb_960_h?: string; - thumb_960_w?: string; - thumb_gif?: string; - thumb_pdf?: string; - thumb_pdf_h?: string; - thumb_pdf_w?: string; - thumb_tiny?: string; - thumb_video?: string; - thumb_video_h?: number; - thumb_video_w?: number; - timestamp?: number; - title?: string; - title_blocks?: any[]; - to?: any[]; - transcription?: Transcription; - update_notification?: number; - updated?: number; - url_private?: string; - url_private_download?: string; - url_static_preview?: string; - user?: string; - user_team?: string; - username?: string; - vtt?: string; + private_file_with_access_count?: number; + public_url_shared?: boolean; + quip_thread_id?: string; + reactions?: any[]; + saved?: Saved; + sent_to_self?: boolean; + shares?: ListShares; + show_badge?: boolean; + simplified_html?: string; + size?: number; + source_team?: string; + subject?: string; + subtype?: string; + team_pref_version_history_enabled?: boolean; + teams_shared_with?: any[]; + template_conversion_ts?: number; + template_description?: string; + template_icon?: string; + template_name?: string; + template_title?: string; + thumb_1024?: string; + thumb_1024_gif?: string; + thumb_1024_h?: string; + thumb_1024_w?: string; + thumb_160?: string; + thumb_160_gif?: string; + thumb_160_h?: string; + thumb_160_w?: string; + thumb_360?: string; + thumb_360_gif?: string; + thumb_360_h?: string; + thumb_360_w?: string; + thumb_480?: string; + thumb_480_gif?: string; + thumb_480_h?: string; + thumb_480_w?: string; + thumb_64?: string; + thumb_64_gif?: string; + thumb_64_h?: string; + thumb_64_w?: string; + thumb_720?: string; + thumb_720_gif?: string; + thumb_720_h?: string; + thumb_720_w?: string; + thumb_80?: string; + thumb_800?: string; + thumb_800_gif?: string; + thumb_800_h?: string; + thumb_800_w?: string; + thumb_80_gif?: string; + thumb_80_h?: string; + thumb_80_w?: string; + thumb_960?: string; + thumb_960_gif?: string; + thumb_960_h?: string; + thumb_960_w?: string; + thumb_gif?: string; + thumb_pdf?: string; + thumb_pdf_h?: string; + thumb_pdf_w?: string; + thumb_tiny?: string; + thumb_video?: string; + thumb_video_h?: number; + thumb_video_w?: number; + timestamp?: number; + title?: string; + title_blocks?: any[]; + to?: any[]; + transcription?: Transcription; + update_notification?: number; + updated?: number; + url_private?: string; + url_private_download?: string; + url_static_preview?: string; + user?: string; + user_team?: string; + username?: string; + vtt?: string; } export interface MessageIcons { - emoji?: string; + emoji?: string; image_36?: string; image_48?: string; image_64?: string; @@ -1183,77 +1182,77 @@ export interface MessageMetadata { } export interface Room { - app_id?: string; - attached_file_ids?: any[]; - background_id?: string; - call_family?: string; - canvas_background?: string; - canvas_thread_ts?: string; - channels?: any[]; - created_by?: string; - date_end?: number; - date_start?: number; - display_id?: string; - external_unique_id?: string; - has_ended?: boolean; - id?: string; - is_dm_call?: boolean; - is_prewarmed?: boolean; - is_scheduled?: boolean; - media_backend_type?: string; - media_server?: string; - name?: string; - participant_history?: any[]; - participants?: any[]; - participants_camera_off?: any[]; - participants_camera_on?: any[]; + app_id?: string; + attached_file_ids?: any[]; + background_id?: string; + call_family?: string; + canvas_background?: string; + canvas_thread_ts?: string; + channels?: any[]; + created_by?: string; + date_end?: number; + date_start?: number; + display_id?: string; + external_unique_id?: string; + has_ended?: boolean; + id?: string; + is_dm_call?: boolean; + is_prewarmed?: boolean; + is_scheduled?: boolean; + media_backend_type?: string; + media_server?: string; + name?: string; + participant_history?: any[]; + participants?: any[]; + participants_camera_off?: any[]; + participants_camera_on?: any[]; participants_screenshare_off?: any[]; - participants_screenshare_on?: any[]; - thread_root_ts?: string; - was_accepted?: boolean; - was_missed?: boolean; - was_rejected?: boolean; + participants_screenshare_on?: any[]; + thread_root_ts?: string; + was_accepted?: boolean; + was_missed?: boolean; + was_rejected?: boolean; } export interface Root { - bot_id?: string; - bot_profile?: BotProfile; - edited?: Edited; - icons?: MessageIcons; - last_read?: string; - latest_reply?: string; - mrkdwn?: boolean; - no_notifications?: boolean; - parent_user_id?: string; - replies?: any[]; - reply_count?: number; - reply_users?: any[]; + bot_id?: string; + bot_profile?: BotProfile; + edited?: Edited; + icons?: MessageIcons; + last_read?: string; + latest_reply?: string; + mrkdwn?: boolean; + no_notifications?: boolean; + parent_user_id?: string; + replies?: any[]; + reply_count?: number; + reply_users?: any[]; reply_users_count?: number; - room?: Room; - subscribed?: boolean; - subtype?: string; - team?: string; - text?: string; - thread_ts?: string; - ts?: string; - type?: string; - unread_count?: number; - user?: string; - username?: string; + room?: Room; + subscribed?: boolean; + subtype?: string; + team?: string; + text?: string; + thread_ts?: string; + ts?: string; + type?: string; + unread_count?: number; + user?: string; + username?: string; } export interface ListRecordElement { - created_by?: string; - date_created?: number; - fields?: RecordField[]; - id?: string; - is_subscribed?: boolean; - list_id?: string; - platform_refs?: PlatformRefs; - position?: string; - saved?: Saved; - thread_ts?: string; - updated_by?: string; + created_by?: string; + date_created?: number; + fields?: RecordField[]; + id?: string; + is_subscribed?: boolean; + list_id?: string; + platform_refs?: PlatformRefs; + position?: string; + saved?: Saved; + thread_ts?: string; + updated_by?: string; updated_timestamp?: string; } @@ -1266,30 +1265,30 @@ export interface PlatformRefs { export interface MessageBlock { channel?: string; message?: Message; - team?: string; - ts?: string; + team?: string; + ts?: string; } export interface AttachmentMetadata { - extension?: string; - format?: string; - original_h?: number; - original_w?: number; - rotation?: number; - thumb_160?: boolean; + extension?: string; + format?: string; + original_h?: number; + original_w?: number; + rotation?: number; + thumb_160?: boolean; thumb_360_h?: number; thumb_360_w?: number; - thumb_64?: boolean; - thumb_80?: boolean; - thumb_tiny?: string; + thumb_64?: boolean; + thumb_80?: boolean; + thumb_tiny?: string; } export interface Preview { can_remove?: boolean; - icon_url?: string; - subtitle?: DescriptionElement; - title?: DescriptionElement; - type?: string; + icon_url?: string; + subtitle?: DescriptionElement; + title?: DescriptionElement; + type?: string; } export interface MatchHeaders { @@ -1301,177 +1300,177 @@ export interface MatchShares { } export interface MatchTitleBlock { - accessory?: Accessory; - alt_text?: string; - api_decoration_available?: boolean; - app_collaborators?: string[]; - app_id?: string; - author_name?: string; - block_id?: string; - bot_user_id?: string; - button_label?: string; - call?: Call; - call_id?: string; - description?: DescriptionElement; - developer_trace_id?: string; - dispatch_action?: boolean; - element?: Accessory; - elements?: Accessory[]; - external_id?: string; - fallback?: string; - fields?: DescriptionElement[]; - file?: FileElement; - file_id?: string; - function_trigger_id?: string; - hint?: DescriptionElement; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - is_animated?: boolean; - is_workflow_app?: boolean; - label?: DescriptionElement; - optional?: boolean; - owning_team_id?: string; - provider_icon_url?: string; - provider_name?: string; + accessory?: Accessory; + alt_text?: string; + api_decoration_available?: boolean; + app_collaborators?: string[]; + app_id?: string; + author_name?: string; + block_id?: string; + bot_user_id?: string; + button_label?: string; + call?: Call; + call_id?: string; + description?: DescriptionElement; + developer_trace_id?: string; + dispatch_action?: boolean; + element?: Accessory; + elements?: Accessory[]; + external_id?: string; + fallback?: string; + fields?: DescriptionElement[]; + file?: FileElement; + file_id?: string; + function_trigger_id?: string; + hint?: DescriptionElement; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + is_animated?: boolean; + is_workflow_app?: boolean; + label?: DescriptionElement; + optional?: boolean; + owning_team_id?: string; + provider_icon_url?: string; + provider_name?: string; sales_home_workflow_app_type?: number; - share_url?: string; - slack_file?: SlackFile; - source?: string; - text?: DescriptionElement; - thumbnail_url?: string; - title?: DescriptionElement; - title_url?: string; - trigger_subtype?: string; - trigger_type?: string; - type?: BlockType; - url?: string; - video_url?: string; - workflow_id?: string; + share_url?: string; + slack_file?: SlackFile; + source?: string; + text?: DescriptionElement; + thumbnail_url?: string; + title?: DescriptionElement; + title_url?: string; + trigger_subtype?: string; + trigger_type?: string; + type?: BlockType; + url?: string; + video_url?: string; + workflow_id?: string; } export interface Call { media_backend_type?: string; - v1?: V1; + v1?: V1; } export interface V1 { - active_participants?: Participant[]; - all_participants?: Participant[]; - app_icon_urls?: AppIconUrls; - app_id?: string; - channels?: string[]; - created_by?: string; - date_end?: number; - date_start?: number; + active_participants?: Participant[]; + all_participants?: Participant[]; + app_icon_urls?: AppIconUrls; + app_id?: string; + channels?: string[]; + created_by?: string; + date_end?: number; + date_start?: number; desktop_app_join_url?: string; - display_id?: string; - has_ended?: boolean; - id?: string; - is_dm_call?: boolean; - join_url?: string; - name?: string; - was_accepted?: boolean; - was_missed?: boolean; - was_rejected?: boolean; + display_id?: string; + has_ended?: boolean; + id?: string; + is_dm_call?: boolean; + join_url?: string; + name?: string; + was_accepted?: boolean; + was_missed?: boolean; + was_rejected?: boolean; } export interface Participant { - avatar_url?: string; + avatar_url?: string; display_name?: string; - external_id?: string; - slack_id?: string; + external_id?: string; + slack_id?: string; } export interface AppIconUrls { - image_1024?: string; - image_128?: string; - image_192?: string; - image_32?: string; - image_36?: string; - image_48?: string; - image_512?: string; - image_64?: string; - image_72?: string; - image_96?: string; + image_1024?: string; + image_128?: string; + image_192?: string; + image_32?: string; + image_36?: string; + image_48?: string; + image_512?: string; + image_64?: string; + image_72?: string; + image_96?: string; image_original?: string; } export interface Pagination { - first?: number; - last?: number; - page?: number; - page_count?: number; - per_page?: number; + first?: number; + last?: number; + page?: number; + page_count?: number; + per_page?: number; total_count?: number; } export interface Paging { count?: number; - page?: number; + page?: number; pages?: number; total?: number; } export interface Messages { - matches?: MessagesMatch[]; + matches?: MessagesMatch[]; pagination?: Pagination; - paging?: Paging; - total?: number; + paging?: Paging; + total?: number; } export interface MessagesMatch { - attachments?: Attachment[]; - blocks?: MatchTitleBlock[]; - channel?: Channel; - files?: FileElement[]; - iid?: string; - is_mpim?: boolean; + attachments?: Attachment[]; + blocks?: MatchTitleBlock[]; + channel?: Channel; + files?: FileElement[]; + iid?: string; + is_mpim?: boolean; no_reactions?: boolean; - permalink?: string; - previous?: Previous; - previous_2?: Previous; - score?: number; - team?: UserTeam; - text?: string; - ts?: Ts; - type?: string; - user?: LastEditor; - username?: string; + permalink?: string; + previous?: Previous; + previous_2?: Previous; + score?: number; + team?: UserTeam; + text?: string; + ts?: Ts; + type?: string; + user?: LastEditor; + username?: string; } export interface Channel { - id?: string; - is_channel?: boolean; - is_ext_shared?: boolean; - is_file?: boolean; - is_group?: boolean; - is_im?: boolean; - is_mpim?: boolean; - is_org_shared?: boolean; + id?: string; + is_channel?: boolean; + is_ext_shared?: boolean; + is_file?: boolean; + is_group?: boolean; + is_im?: boolean; + is_mpim?: boolean; + is_org_shared?: boolean; is_pending_ext_shared?: boolean; - is_private?: boolean; - is_shared?: boolean; - name?: string; - name_normalized?: string; - pending_shared?: string[]; - user?: LastEditor; + is_private?: boolean; + is_shared?: boolean; + name?: string; + name_normalized?: string; + pending_shared?: string[]; + user?: LastEditor; } export interface Previous { attachments?: Attachment[]; - blocks?: MatchTitleBlock[]; - iid?: string; - permalink?: string; - text?: string; - ts?: Ts; - type?: string; - user?: LastEditor; - username?: string; + blocks?: MatchTitleBlock[]; + iid?: string; + permalink?: string; + text?: string; + ts?: Ts; + type?: string; + user?: LastEditor; + username?: string; } export interface Posts { matches?: string[]; - total?: number; + total?: number; } diff --git a/packages/web-api/src/types/response/SearchFilesResponse.ts b/packages/web-api/src/types/response/SearchFilesResponse.ts index 480917bc1..b72c691b1 100644 --- a/packages/web-api/src/types/response/SearchFilesResponse.ts +++ b/packages/web-api/src/types/response/SearchFilesResponse.ts @@ -8,329 +8,329 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type SearchFilesResponse = WebAPICallResult & { - error?: string; - files?: Files; - needed?: string; - ok?: boolean; + error?: string; + files?: Files; + needed?: string; + ok?: boolean; provided?: string; - query?: string; + query?: string; }; export interface Files { - matches?: Match[]; + matches?: Match[]; pagination?: Pagination; - paging?: Paging; - total?: number; + paging?: Paging; + total?: number; } export interface Match { - access?: string; - attachments?: Attachment[]; - bot_id?: string; - cc?: Cc[]; - channels?: string[]; - comments_count?: number; - converted_pdf?: string; - created?: number; - deanimate?: string; - deanimate_gif?: string; - display_as_bot?: boolean; - dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; - edit_link?: string; - editable?: boolean; - editors?: LastEditor[]; - editors_count?: number; - external_id?: string; - external_type?: string; - external_url?: string; - file_access?: string; - filetype?: string; - from?: Cc[]; - groups?: string[]; - has_more?: boolean; - has_more_shares?: boolean; - has_rich_preview?: boolean; - headers?: MatchHeaders; - id?: string; - image_exif_rotation?: number; - ims?: string[]; - is_channel_space?: boolean; - is_external?: boolean; - is_public?: boolean; - is_starred?: boolean; - last_editor?: LastEditor; - lines?: number; - lines_more?: number; - linked_channel_id?: string; - media_display_type?: string; - mimetype?: string; - mode?: string; - name?: string; - non_owner_editable?: boolean; - org_or_workspace_access?: string; - original_attachment_count?: number; - original_h?: number; - original_w?: number; - permalink?: string; - permalink_public?: string; - plain_text?: string; - pretty_type?: string; - preview?: string; - preview_highlight?: string; - preview_is_truncated?: boolean; - preview_plain_text?: string; + access?: string; + attachments?: Attachment[]; + bot_id?: string; + cc?: Cc[]; + channels?: string[]; + comments_count?: number; + converted_pdf?: string; + created?: number; + deanimate?: string; + deanimate_gif?: string; + display_as_bot?: boolean; + dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; + edit_link?: string; + editable?: boolean; + editors?: LastEditor[]; + editors_count?: number; + external_id?: string; + external_type?: string; + external_url?: string; + file_access?: string; + filetype?: string; + from?: Cc[]; + groups?: string[]; + has_more?: boolean; + has_more_shares?: boolean; + has_rich_preview?: boolean; + headers?: MatchHeaders; + id?: string; + image_exif_rotation?: number; + ims?: string[]; + is_channel_space?: boolean; + is_external?: boolean; + is_public?: boolean; + is_starred?: boolean; + last_editor?: LastEditor; + lines?: number; + lines_more?: number; + linked_channel_id?: string; + media_display_type?: string; + mimetype?: string; + mode?: string; + name?: string; + non_owner_editable?: boolean; + org_or_workspace_access?: string; + original_attachment_count?: number; + original_h?: number; + original_w?: number; + permalink?: string; + permalink_public?: string; + plain_text?: string; + pretty_type?: string; + preview?: string; + preview_highlight?: string; + preview_is_truncated?: boolean; + preview_plain_text?: string; private_channels_with_file_access_count?: number; - private_file_with_access_count?: number; - public_url_shared?: boolean; - quip_thread_id?: string; - sent_to_self?: boolean; - shares?: MatchShares; - size?: number; - subject?: string; - team_pref_version_history_enabled?: boolean; - teams_shared_with?: string[]; - thumb_1024?: string; - thumb_1024_h?: number; - thumb_1024_w?: number; - thumb_160?: string; - thumb_360?: string; - thumb_360_gif?: string; - thumb_360_h?: number; - thumb_360_w?: number; - thumb_480?: string; - thumb_480_gif?: string; - thumb_480_h?: number; - thumb_480_w?: number; - thumb_64?: string; - thumb_720?: string; - thumb_720_h?: number; - thumb_720_w?: number; - thumb_80?: string; - thumb_800?: string; - thumb_800_h?: number; - thumb_800_w?: number; - thumb_960?: string; - thumb_960_h?: number; - thumb_960_w?: number; - thumb_pdf?: string; - thumb_pdf_h?: number; - thumb_pdf_w?: number; - thumb_tiny?: string; - thumb_video?: string; - timestamp?: number; - title?: string; - title_blocks?: TitleBlock[]; - to?: Cc[]; - update_notification?: number; - updated?: number; - url_private?: string; - url_private_download?: string; - url_static_preview?: string; - user?: LastEditor; - user_team?: UserTeam; - username?: string; + private_file_with_access_count?: number; + public_url_shared?: boolean; + quip_thread_id?: string; + sent_to_self?: boolean; + shares?: MatchShares; + size?: number; + subject?: string; + team_pref_version_history_enabled?: boolean; + teams_shared_with?: string[]; + thumb_1024?: string; + thumb_1024_h?: number; + thumb_1024_w?: number; + thumb_160?: string; + thumb_360?: string; + thumb_360_gif?: string; + thumb_360_h?: number; + thumb_360_w?: number; + thumb_480?: string; + thumb_480_gif?: string; + thumb_480_h?: number; + thumb_480_w?: number; + thumb_64?: string; + thumb_720?: string; + thumb_720_h?: number; + thumb_720_w?: number; + thumb_80?: string; + thumb_800?: string; + thumb_800_h?: number; + thumb_800_w?: number; + thumb_960?: string; + thumb_960_h?: number; + thumb_960_w?: number; + thumb_pdf?: string; + thumb_pdf_h?: number; + thumb_pdf_w?: number; + thumb_tiny?: string; + thumb_video?: string; + timestamp?: number; + title?: string; + title_blocks?: TitleBlock[]; + to?: Cc[]; + update_notification?: number; + updated?: number; + url_private?: string; + url_private_download?: string; + url_static_preview?: string; + user?: LastEditor; + user_team?: UserTeam; + username?: string; } export interface Attachment { - actions?: Action[]; - app_id?: string; - app_unfurl_url?: string; - author_icon?: string; - author_id?: string; - author_link?: string; - author_name?: string; - author_subname?: string; - blocks?: Block[]; - bot_id?: string; - callback_id?: string; - channel_id?: string; - channel_name?: string; - channel_team?: string; - color?: string; - fallback?: string; - fields?: AttachmentField[]; - file_id?: string; - filename?: string; - files?: FileElement[]; - footer?: string; - footer_icon?: string; - from_url?: string; - hide_border?: boolean; - hide_color?: boolean; - id?: number; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - indent?: boolean; - is_app_unfurl?: boolean; - is_file_attachment?: boolean; - is_msg_unfurl?: boolean; - is_reply_unfurl?: boolean; + actions?: Action[]; + app_id?: string; + app_unfurl_url?: string; + author_icon?: string; + author_id?: string; + author_link?: string; + author_name?: string; + author_subname?: string; + blocks?: Block[]; + bot_id?: string; + callback_id?: string; + channel_id?: string; + channel_name?: string; + channel_team?: string; + color?: string; + fallback?: string; + fields?: AttachmentField[]; + file_id?: string; + filename?: string; + files?: FileElement[]; + footer?: string; + footer_icon?: string; + from_url?: string; + hide_border?: boolean; + hide_color?: boolean; + id?: number; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + indent?: boolean; + is_app_unfurl?: boolean; + is_file_attachment?: boolean; + is_msg_unfurl?: boolean; + is_reply_unfurl?: boolean; is_thread_root_unfurl?: boolean; - list?: List; - list_record?: PurpleListRecord; - list_record_id?: string; - list_records?: ListRecordElement[]; - list_schema?: Schema[]; - list_view?: View; - list_view_id?: string; - message_blocks?: MessageBlock[]; - metadata?: AttachmentMetadata; - mimetype?: string; - mrkdwn_in?: string[]; - msg_subtype?: string; - original_url?: string; - pretext?: string; - preview?: Preview; - service_icon?: string; - service_name?: string; - service_url?: string; - size?: number; - text?: string; - thumb_height?: number; - thumb_url?: string; - thumb_width?: number; - title?: string; - title_link?: string; - ts?: string; - url?: string; - video_html?: string; - video_html_height?: number; - video_html_width?: number; - video_url?: string; + list?: List; + list_record?: PurpleListRecord; + list_record_id?: string; + list_records?: ListRecordElement[]; + list_schema?: Schema[]; + list_view?: View; + list_view_id?: string; + message_blocks?: MessageBlock[]; + metadata?: AttachmentMetadata; + mimetype?: string; + mrkdwn_in?: string[]; + msg_subtype?: string; + original_url?: string; + pretext?: string; + preview?: Preview; + service_icon?: string; + service_name?: string; + service_url?: string; + size?: number; + text?: string; + thumb_height?: number; + thumb_url?: string; + thumb_width?: number; + title?: string; + title_link?: string; + ts?: string; + url?: string; + video_html?: string; + video_html_height?: number; + video_html_width?: number; + video_url?: string; } export interface Action { - confirm?: ActionConfirm; - data_source?: string; - id?: string; + confirm?: ActionConfirm; + data_source?: string; + id?: string; min_query_length?: number; - name?: string; - option_groups?: ActionOptionGroup[]; - options?: SelectedOptionElement[]; + name?: string; + option_groups?: ActionOptionGroup[]; + options?: SelectedOptionElement[]; selected_options?: SelectedOptionElement[]; - style?: string; - text?: string; - type?: string; - url?: string; - value?: string; + style?: string; + text?: string; + type?: string; + url?: string; + value?: string; } export interface ActionConfirm { dismiss_text?: string; - ok_text?: string; - text?: string; - title?: string; + ok_text?: string; + text?: string; + title?: string; } export interface ActionOptionGroup { options?: SelectedOptionElement[]; - text?: string; + text?: string; } export interface SelectedOptionElement { - text?: string; + text?: string; value?: string; } export interface Block { - accessory?: Accessory; - alt_text?: string; - app_collaborators?: string[]; - app_id?: string; - author_name?: string; - block_id?: string; - bot_user_id?: string; - button_label?: string; - description?: DescriptionElement | string; - developer_trace_id?: string; - elements?: Accessory[]; - fallback?: string; - fields?: DescriptionElement[]; - function_trigger_id?: string; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - is_animated?: boolean; - is_workflow_app?: boolean; - owning_team_id?: string; - provider_icon_url?: string; - provider_name?: string; + accessory?: Accessory; + alt_text?: string; + app_collaborators?: string[]; + app_id?: string; + author_name?: string; + block_id?: string; + bot_user_id?: string; + button_label?: string; + description?: DescriptionElement | string; + developer_trace_id?: string; + elements?: Accessory[]; + fallback?: string; + fields?: DescriptionElement[]; + function_trigger_id?: string; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + is_animated?: boolean; + is_workflow_app?: boolean; + owning_team_id?: string; + provider_icon_url?: string; + provider_name?: string; sales_home_workflow_app_type?: number; - share_url?: string; - slack_file?: SlackFile; - text?: DescriptionElement; - thumbnail_url?: string; - title?: DescriptionElement | string; - title_url?: string; - trigger_subtype?: string; - trigger_type?: string; - type?: BlockType; - url?: string; - video_url?: string; - workflow_id?: string; + share_url?: string; + slack_file?: SlackFile; + text?: DescriptionElement; + thumbnail_url?: string; + title?: DescriptionElement | string; + title_url?: string; + trigger_subtype?: string; + trigger_type?: string; + type?: BlockType; + url?: string; + video_url?: string; + workflow_id?: string; } export interface Accessory { - accessibility_label?: string; - action_id?: string; - alt_text?: string; - border?: number; - confirm?: AccessoryConfirm; + accessibility_label?: string; + action_id?: string; + alt_text?: string; + border?: number; + confirm?: AccessoryConfirm; default_to_current_conversation?: boolean; - elements?: AccessoryElement[]; - fallback?: string; - filter?: Filter; - focus_on_load?: boolean; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - indent?: number; - initial_channel?: string; - initial_channels?: string[]; - initial_conversation?: string; - initial_conversations?: string[]; - initial_date?: string; - initial_date_time?: number; - initial_option?: InitialOptionElement; - initial_options?: InitialOptionElement[]; - initial_time?: string; - initial_user?: string; - initial_users?: string[]; - max_selected_items?: number; - min_query_length?: number; - offset?: number; - option_groups?: AccessoryOptionGroup[]; - options?: InitialOptionElement[]; - placeholder?: DescriptionElement; - response_url_enabled?: boolean; - slack_file?: SlackFile; - style?: string; - text?: DescriptionElement; - timezone?: string; - type?: string; - url?: string; - value?: string; - workflow?: Workflow; + elements?: AccessoryElement[]; + fallback?: string; + filter?: Filter; + focus_on_load?: boolean; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + indent?: number; + initial_channel?: string; + initial_channels?: string[]; + initial_conversation?: string; + initial_conversations?: string[]; + initial_date?: string; + initial_date_time?: number; + initial_option?: InitialOptionElement; + initial_options?: InitialOptionElement[]; + initial_time?: string; + initial_user?: string; + initial_users?: string[]; + max_selected_items?: number; + min_query_length?: number; + offset?: number; + option_groups?: AccessoryOptionGroup[]; + options?: InitialOptionElement[]; + placeholder?: DescriptionElement; + response_url_enabled?: boolean; + slack_file?: SlackFile; + style?: string; + text?: DescriptionElement; + timezone?: string; + type?: string; + url?: string; + value?: string; + workflow?: Workflow; } export interface AccessoryConfirm { confirm?: DescriptionElement; - deny?: DescriptionElement; - style?: string; - text?: DescriptionElement; - title?: DescriptionElement; + deny?: DescriptionElement; + style?: string; + text?: DescriptionElement; + title?: DescriptionElement; } export interface DescriptionElement { - emoji?: boolean; - text?: string; - type?: DescriptionType; + emoji?: boolean; + text?: string; + type?: DescriptionType; verbatim?: boolean; } @@ -340,42 +340,42 @@ export enum DescriptionType { } export interface AccessoryElement { - border?: number; + border?: number; elements?: PurpleElement[]; - indent?: number; - offset?: number; - style?: string; - type?: FluffyType; + indent?: number; + offset?: number; + style?: string; + type?: FluffyType; } export interface PurpleElement { - channel_id?: string; - fallback?: string; - format?: string; - name?: string; - range?: string; - skin_tone?: number; - style?: Style; - team_id?: string; - text?: string; - timestamp?: string; - type?: PurpleType; - unicode?: string; - unsafe?: boolean; - url?: string; - user_id?: string; + channel_id?: string; + fallback?: string; + format?: string; + name?: string; + range?: string; + skin_tone?: number; + style?: Style; + team_id?: string; + text?: string; + timestamp?: string; + type?: PurpleType; + unicode?: string; + unsafe?: boolean; + url?: string; + user_id?: string; usergroup_id?: string; - value?: string; + value?: string; } export interface Style { - bold?: boolean; + bold?: boolean; client_highlight?: boolean; - code?: boolean; - highlight?: boolean; - italic?: boolean; - strike?: boolean; - unlink?: boolean; + code?: boolean; + highlight?: boolean; + italic?: boolean; + strike?: boolean; + unlink?: boolean; } export enum PurpleType { @@ -399,25 +399,25 @@ export enum FluffyType { } export interface Filter { - exclude_bot_users?: boolean; + exclude_bot_users?: boolean; exclude_external_shared_channels?: boolean; - include?: any[]; + include?: any[]; } export interface InitialOptionElement { description?: DescriptionElement; - text?: DescriptionElement; - url?: string; - value?: string; + text?: DescriptionElement; + url?: string; + value?: string; } export interface AccessoryOptionGroup { - label?: DescriptionElement; + label?: DescriptionElement; options?: InitialOptionElement[]; } export interface SlackFile { - id?: string; + id?: string; url?: string; } @@ -427,11 +427,11 @@ export interface Workflow { export interface Trigger { customizable_input_parameters?: CustomizableInputParameter[]; - url?: string; + url?: string; } export interface CustomizableInputParameter { - name?: string; + name?: string; value?: string; } @@ -453,173 +453,173 @@ export interface AttachmentField { } export interface FileElement { - access?: string; - alt_txt?: string; - app_id?: string; - app_name?: string; - attachments?: any[]; - blocks?: Block[]; - bot_id?: string; - can_toggle_canvas_lock?: boolean; - canvas_template_mode?: string; - cc?: Cc[]; - channel_actions_count?: number; - channel_actions_ts?: string; - channels?: string[]; - comments_count?: number; - converted_pdf?: string; - created?: number; - deanimate?: string; - deanimate_gif?: string; - display_as_bot?: boolean; - dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; - duration_ms?: number; - edit_link?: string; - edit_timestamp?: number; - editable?: boolean; - editor?: string; - editors?: string[]; - external_id?: string; - external_type?: string; - external_url?: string; - favorites?: Favorite[]; - file_access?: string; - filetype?: string; - from?: Cc[]; - groups?: string[]; - has_more?: boolean; - has_more_shares?: boolean; - has_rich_preview?: boolean; - headers?: FileHeaders; - hls?: string; - hls_embed?: string; - id?: string; - image_exif_rotation?: number; - ims?: string[]; - initial_comment?: InitialComment; - is_channel_space?: boolean; - is_external?: boolean; - is_public?: boolean; - is_starred?: boolean; - last_editor?: string; - last_read?: number; - lines?: number; - lines_more?: number; - linked_channel_id?: string; - list_limits?: ListLimits; - list_metadata?: ListMetadata; - media_display_type?: string; - media_progress?: MediaProgress; - mimetype?: string; - mode?: string; - mp4?: string; - mp4_low?: string; - name?: string; - non_owner_editable?: boolean; - num_stars?: number; - org_or_workspace_access?: string; - original_attachment_count?: number; - original_h?: string; - original_w?: string; - permalink?: string; - permalink_public?: string; - pinned_to?: string[]; - pjpeg?: string; - plain_text?: string; - pretty_type?: string; - preview?: string; - preview_highlight?: string; - preview_is_truncated?: boolean; - preview_plain_text?: string; + access?: string; + alt_txt?: string; + app_id?: string; + app_name?: string; + attachments?: any[]; + blocks?: Block[]; + bot_id?: string; + can_toggle_canvas_lock?: boolean; + canvas_template_mode?: string; + cc?: Cc[]; + channel_actions_count?: number; + channel_actions_ts?: string; + channels?: string[]; + comments_count?: number; + converted_pdf?: string; + created?: number; + deanimate?: string; + deanimate_gif?: string; + display_as_bot?: boolean; + dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; + duration_ms?: number; + edit_link?: string; + edit_timestamp?: number; + editable?: boolean; + editor?: string; + editors?: string[]; + external_id?: string; + external_type?: string; + external_url?: string; + favorites?: Favorite[]; + file_access?: string; + filetype?: string; + from?: Cc[]; + groups?: string[]; + has_more?: boolean; + has_more_shares?: boolean; + has_rich_preview?: boolean; + headers?: FileHeaders; + hls?: string; + hls_embed?: string; + id?: string; + image_exif_rotation?: number; + ims?: string[]; + initial_comment?: InitialComment; + is_channel_space?: boolean; + is_external?: boolean; + is_public?: boolean; + is_starred?: boolean; + last_editor?: string; + last_read?: number; + lines?: number; + lines_more?: number; + linked_channel_id?: string; + list_limits?: ListLimits; + list_metadata?: ListMetadata; + media_display_type?: string; + media_progress?: MediaProgress; + mimetype?: string; + mode?: string; + mp4?: string; + mp4_low?: string; + name?: string; + non_owner_editable?: boolean; + num_stars?: number; + org_or_workspace_access?: string; + original_attachment_count?: number; + original_h?: string; + original_w?: string; + permalink?: string; + permalink_public?: string; + pinned_to?: string[]; + pjpeg?: string; + plain_text?: string; + pretty_type?: string; + preview?: string; + preview_highlight?: string; + preview_is_truncated?: boolean; + preview_plain_text?: string; private_channels_with_file_access_count?: number; - private_file_with_access_count?: number; - public_url_shared?: boolean; - quip_thread_id?: string; - reactions?: Reaction[]; - saved?: Saved; - sent_to_self?: boolean; - shares?: PurpleShares; - show_badge?: boolean; - simplified_html?: string; - size?: number; - source_team?: string; - subject?: string; - subtype?: string; - team_pref_version_history_enabled?: boolean; - teams_shared_with?: any[]; - template_conversion_ts?: number; - template_description?: string; - template_icon?: string; - template_name?: string; - template_title?: string; - thumb_1024?: string; - thumb_1024_gif?: string; - thumb_1024_h?: string; - thumb_1024_w?: string; - thumb_160?: string; - thumb_160_gif?: string; - thumb_160_h?: string; - thumb_160_w?: string; - thumb_360?: string; - thumb_360_gif?: string; - thumb_360_h?: string; - thumb_360_w?: string; - thumb_480?: string; - thumb_480_gif?: string; - thumb_480_h?: string; - thumb_480_w?: string; - thumb_64?: string; - thumb_64_gif?: string; - thumb_64_h?: string; - thumb_64_w?: string; - thumb_720?: string; - thumb_720_gif?: string; - thumb_720_h?: string; - thumb_720_w?: string; - thumb_80?: string; - thumb_800?: string; - thumb_800_gif?: string; - thumb_800_h?: string; - thumb_800_w?: string; - thumb_80_gif?: string; - thumb_80_h?: string; - thumb_80_w?: string; - thumb_960?: string; - thumb_960_gif?: string; - thumb_960_h?: string; - thumb_960_w?: string; - thumb_gif?: string; - thumb_pdf?: string; - thumb_pdf_h?: string; - thumb_pdf_w?: string; - thumb_tiny?: string; - thumb_video?: string; - thumb_video_h?: number; - thumb_video_w?: number; - timestamp?: number; - title?: string; - title_blocks?: Block[]; - to?: Cc[]; - transcription?: Transcription; - update_notification?: number; - updated?: number; - url_private?: string; - url_private_download?: string; - url_static_preview?: string; - user?: string; - user_team?: string; - username?: string; - vtt?: string; + private_file_with_access_count?: number; + public_url_shared?: boolean; + quip_thread_id?: string; + reactions?: Reaction[]; + saved?: Saved; + sent_to_self?: boolean; + shares?: PurpleShares; + show_badge?: boolean; + simplified_html?: string; + size?: number; + source_team?: string; + subject?: string; + subtype?: string; + team_pref_version_history_enabled?: boolean; + teams_shared_with?: any[]; + template_conversion_ts?: number; + template_description?: string; + template_icon?: string; + template_name?: string; + template_title?: string; + thumb_1024?: string; + thumb_1024_gif?: string; + thumb_1024_h?: string; + thumb_1024_w?: string; + thumb_160?: string; + thumb_160_gif?: string; + thumb_160_h?: string; + thumb_160_w?: string; + thumb_360?: string; + thumb_360_gif?: string; + thumb_360_h?: string; + thumb_360_w?: string; + thumb_480?: string; + thumb_480_gif?: string; + thumb_480_h?: string; + thumb_480_w?: string; + thumb_64?: string; + thumb_64_gif?: string; + thumb_64_h?: string; + thumb_64_w?: string; + thumb_720?: string; + thumb_720_gif?: string; + thumb_720_h?: string; + thumb_720_w?: string; + thumb_80?: string; + thumb_800?: string; + thumb_800_gif?: string; + thumb_800_h?: string; + thumb_800_w?: string; + thumb_80_gif?: string; + thumb_80_h?: string; + thumb_80_w?: string; + thumb_960?: string; + thumb_960_gif?: string; + thumb_960_h?: string; + thumb_960_w?: string; + thumb_gif?: string; + thumb_pdf?: string; + thumb_pdf_h?: string; + thumb_pdf_w?: string; + thumb_tiny?: string; + thumb_video?: string; + thumb_video_h?: number; + thumb_video_w?: number; + timestamp?: number; + title?: string; + title_blocks?: Block[]; + to?: Cc[]; + transcription?: Transcription; + update_notification?: number; + updated?: number; + url_private?: string; + url_private_download?: string; + url_static_preview?: string; + user?: string; + user_team?: string; + username?: string; + vtt?: string; } export interface Cc { - address?: string; - name?: string; + address?: string; + name?: string; original?: string; } export interface DmMpdmUsersWithFileAccess { - access?: string; + access?: string; user_id?: LastEditor; } @@ -629,92 +629,92 @@ export enum LastEditor { } export interface Favorite { - collection_id?: string; + collection_id?: string; collection_name?: string; - position?: string; + position?: string; } export interface FileHeaders { - date?: string; + date?: string; in_reply_to?: string; - message_id?: string; - reply_to?: string; + message_id?: string; + reply_to?: string; } export interface InitialComment { - channel?: string; - comment?: string; - created?: number; - id?: string; - is_intro?: boolean; + channel?: string; + comment?: string; + created?: number; + id?: string; + is_intro?: boolean; timestamp?: number; - user?: string; + user?: string; } export interface ListLimits { - column_count?: number; - column_count_limit?: number; + column_count?: number; + column_count_limit?: number; over_column_maximum?: boolean; - over_row_maximum?: boolean; - over_view_maximum?: boolean; - row_count?: number; - row_count_limit?: number; - view_count?: number; - view_count_limit?: number; + over_row_maximum?: boolean; + over_view_maximum?: boolean; + row_count?: number; + row_count_limit?: number; + view_count?: number; + view_count_limit?: number; } export interface ListMetadata { creation_source?: CreationSource; - description?: string; - icon?: string; - icon_team_id?: string; - icon_url?: string; - integrations?: string[]; - is_trial?: boolean; - schema?: Schema[]; - views?: View[]; + description?: string; + icon?: string; + icon_team_id?: string; + icon_url?: string; + integrations?: string[]; + is_trial?: boolean; + schema?: Schema[]; + views?: View[]; } export interface CreationSource { - reference_id?: string; - type?: string; + reference_id?: string; + type?: string; workflow_function_id?: string; } export interface Schema { - id?: string; + id?: string; is_primary_column?: boolean; - key?: string; - name?: string; - options?: Options; - type?: string; + key?: string; + name?: string; + options?: Options; + type?: string; } export interface Options { - canvas_id?: string; + canvas_id?: string; canvas_placeholder_mapping?: CanvasPlaceholderMapping[]; - choices?: Choice[]; - currency?: string; - currency_format?: string; - date_format?: string; - default_value?: string; - default_value_typed?: DefaultValueTyped; - emoji?: string; - emoji_team_id?: string; - for_assignment?: boolean; - format?: string; - linked_to?: string[]; - mark_as_done_when_checked?: boolean; - max?: number; - notify_users?: boolean; - precision?: number; - rounding?: string; - show_member_name?: boolean; - time_format?: string; + choices?: Choice[]; + currency?: string; + currency_format?: string; + date_format?: string; + default_value?: string; + default_value_typed?: DefaultValueTyped; + emoji?: string; + emoji_team_id?: string; + for_assignment?: boolean; + format?: string; + linked_to?: string[]; + mark_as_done_when_checked?: boolean; + max?: number; + notify_users?: boolean; + precision?: number; + rounding?: string; + show_member_name?: boolean; + time_format?: string; } export interface CanvasPlaceholderMapping { - column?: string; + column?: string; variable?: string; } @@ -729,64 +729,64 @@ export interface DefaultValueTyped { } export interface View { - columns?: Column[]; - created_by?: string; - date_created?: number; - id?: string; + columns?: Column[]; + created_by?: string; + date_created?: number; + id?: string; is_all_items_view?: boolean; - is_locked?: boolean; - name?: string; - position?: string; + is_locked?: boolean; + name?: string; + position?: string; stick_column_left?: boolean; - type?: string; + type?: string; } export interface Column { - id?: string; - key?: string; + id?: string; + key?: string; position?: string; - visible?: boolean; - width?: number; + visible?: boolean; + width?: number; } export interface MediaProgress { - duration_ms?: number; + duration_ms?: number; max_offset_ms?: number; - offset_ms?: number; + offset_ms?: number; } export interface Reaction { count?: number; - name?: string; - url?: string; + name?: string; + url?: string; users?: string[]; } export interface Saved { date_completed?: number; - date_due?: number; - is_archived?: boolean; - state?: string; + date_due?: number; + is_archived?: boolean; + state?: string; } export interface PurpleShares { private?: { [key: string]: Public[] }; - public?: { [key: string]: Public[] }; + public?: { [key: string]: Public[] }; } export interface Public { - access?: string; - channel_name?: string; - date_last_shared?: number; - latest_reply?: string; - reply_count?: number; - reply_users?: string[]; + access?: string; + channel_name?: string; + date_last_shared?: number; + latest_reply?: string; + reply_count?: number; + reply_users?: string[]; reply_users_count?: number; - share_user_id?: LastEditor; - source?: string; - team_id?: UserTeam; - thread_ts?: string; - ts?: Ts; + share_user_id?: LastEditor; + source?: string; + team_id?: UserTeam; + thread_ts?: string; + ts?: Ts; } export enum UserTeam { @@ -805,48 +805,47 @@ export interface Transcription { } export interface List { - channels?: string[]; - comments_count?: number; - created?: number; - display_as_bot?: boolean; - dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; - editable?: boolean; - external_type?: string; - file_access?: string; - filetype?: string; - groups?: string[]; - has_more_shares?: boolean; - has_rich_preview?: boolean; - id?: string; - ims?: string[]; - is_external?: boolean; - is_public?: boolean; - last_editor?: string; - list_limits?: ListLimits; - list_metadata?: ListMetadata; - mimetype?: string; - mode?: string; - name?: string; - permalink?: string; - permalink_public?: string; - pretty_type?: string; + channels?: string[]; + comments_count?: number; + created?: number; + display_as_bot?: boolean; + dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; + editable?: boolean; + external_type?: string; + file_access?: string; + filetype?: string; + groups?: string[]; + has_more_shares?: boolean; + has_rich_preview?: boolean; + id?: string; + ims?: string[]; + is_external?: boolean; + is_public?: boolean; + last_editor?: string; + list_limits?: ListLimits; + list_metadata?: ListMetadata; + mimetype?: string; + mode?: string; + name?: string; + permalink?: string; + permalink_public?: string; + pretty_type?: string; private_channels_with_file_access_count?: number; - private_file_with_access_count?: number; - public_url_shared?: boolean; - shares?: ListShares; - size?: number; - timestamp?: number; - title?: string; - updated?: number; - url_private?: string; - url_private_download?: string; - user?: string; - user_team?: string; - username?: string; + private_file_with_access_count?: number; + public_url_shared?: boolean; + shares?: ListShares; + size?: number; + timestamp?: number; + title?: string; + updated?: number; + url_private?: string; + url_private_download?: string; + user?: string; + user_team?: string; + username?: string; } -export interface ListShares { -} +export type ListShares = {}; export interface PurpleListRecord { record?: Record; @@ -854,90 +853,90 @@ export interface PurpleListRecord { } export interface Record { - fields?: RecordField[]; + fields?: RecordField[]; record_id?: string; } export interface RecordField { attachment?: any[]; - channel?: any[]; - checkbox?: boolean; - column_id?: string; - date?: any[]; - email?: any[]; - key?: string; - message?: Message; - number?: any[]; - phone?: any[]; - rating?: any[]; - rich_text?: any[]; - select?: any[]; - text?: string; - timestamp?: any[]; - user?: any[]; - value?: string; + channel?: any[]; + checkbox?: boolean; + column_id?: string; + date?: any[]; + email?: any[]; + key?: string; + message?: Message; + number?: any[]; + phone?: any[]; + rating?: any[]; + rich_text?: any[]; + select?: any[]; + text?: string; + timestamp?: any[]; + user?: any[]; + value?: string; } export interface Message { - app_id?: string; - attachments?: any[]; - blocks?: Block[]; - bot_id?: string; - bot_link?: string; - bot_profile?: BotProfile; - channel?: string; - client_msg_id?: string; - comment?: Comment; - display_as_bot?: boolean; - edited?: Edited; - file?: MessageFile; - files?: any[]; - hidden?: boolean; - icons?: MessageIcons; - inviter?: string; - is_intro?: boolean; - is_locked?: boolean; - is_starred?: boolean; + app_id?: string; + attachments?: any[]; + blocks?: Block[]; + bot_id?: string; + bot_link?: string; + bot_profile?: BotProfile; + channel?: string; + client_msg_id?: string; + comment?: Comment; + display_as_bot?: boolean; + edited?: Edited; + file?: MessageFile; + files?: any[]; + hidden?: boolean; + icons?: MessageIcons; + inviter?: string; + is_intro?: boolean; + is_locked?: boolean; + is_starred?: boolean; is_thread_broadcast?: boolean; - item?: Comment; - item_type?: string; - last_read?: string; - latest_reply?: string; - metadata?: MessageMetadata; - no_notifications?: boolean; - parent_user_id?: string; - pinned_to?: any[]; - purpose?: string; - reactions?: any[]; - replies?: any[]; - reply_count?: number; - reply_users?: any[]; - reply_users_count?: number; - room?: Room; - root?: Root; - subscribed?: boolean; - subtype?: string; - team?: string; - text?: string; - thread_ts?: string; - topic?: string; - ts?: string; - type?: string; - unfurl_links?: boolean; - unfurl_media?: boolean; - upload?: boolean; - user?: string; - username?: string; - wibblr?: boolean; - x_files?: any[]; + item?: Comment; + item_type?: string; + last_read?: string; + latest_reply?: string; + metadata?: MessageMetadata; + no_notifications?: boolean; + parent_user_id?: string; + pinned_to?: any[]; + purpose?: string; + reactions?: any[]; + replies?: any[]; + reply_count?: number; + reply_users?: any[]; + reply_users_count?: number; + room?: Room; + root?: Root; + subscribed?: boolean; + subtype?: string; + team?: string; + text?: string; + thread_ts?: string; + topic?: string; + ts?: string; + type?: string; + unfurl_links?: boolean; + unfurl_media?: boolean; + upload?: boolean; + user?: string; + username?: string; + wibblr?: boolean; + x_files?: any[]; } export interface BotProfile { - app_id?: string; + app_id?: string; deleted?: boolean; - icons?: BotProfileIcons; - id?: string; - name?: string; + icons?: BotProfileIcons; + id?: string; + name?: string; team_id?: string; updated?: number; } @@ -949,208 +948,208 @@ export interface BotProfileIcons { } export interface Comment { - comment?: string; - created?: string; - display_as_bot?: boolean; - edit_link?: string; - editable?: boolean; - external_type?: string; - filetype?: string; - has_rich_preview?: boolean; - id?: string; - is_external?: boolean; - is_intro?: boolean; - is_public?: boolean; - is_starred?: boolean; - lines?: number; - lines_more?: number; - media_display_type?: string; - mimetype?: string; - mode?: string; - name?: string; - permalink?: string; - permalink_public?: boolean; - pretty_type?: string; - preview?: string; - preview_highlight?: string; + comment?: string; + created?: string; + display_as_bot?: boolean; + edit_link?: string; + editable?: boolean; + external_type?: string; + filetype?: string; + has_rich_preview?: boolean; + id?: string; + is_external?: boolean; + is_intro?: boolean; + is_public?: boolean; + is_starred?: boolean; + lines?: number; + lines_more?: number; + media_display_type?: string; + mimetype?: string; + mode?: string; + name?: string; + permalink?: string; + permalink_public?: boolean; + pretty_type?: string; + preview?: string; + preview_highlight?: string; preview_is_truncated?: boolean; - public_url_shared?: boolean; - size?: number; - timestamp?: string; - title?: string; - url_private?: string; + public_url_shared?: boolean; + size?: number; + timestamp?: string; + title?: string; + url_private?: string; url_private_download?: boolean; - user?: string; - username?: string; + user?: string; + username?: string; } export interface Edited { - ts?: string; + ts?: string; user?: string; } export interface MessageFile { - access?: string; - alt_txt?: string; - app_id?: string; - app_name?: string; - attachments?: any[]; - blocks?: any[]; - bot_id?: string; - can_toggle_canvas_lock?: boolean; - canvas_template_mode?: string; - cc?: any[]; - channel_actions_count?: number; - channel_actions_ts?: string; - channels?: any[]; - comments_count?: number; - converted_pdf?: string; - created?: number; - deanimate?: string; - deanimate_gif?: string; - display_as_bot?: boolean; - dm_mpdm_users_with_file_access?: any[]; - duration_ms?: number; - edit_link?: string; - edit_timestamp?: number; - editable?: boolean; - editor?: string; - editors?: any[]; - external_id?: string; - external_type?: string; - external_url?: string; - favorites?: any[]; - file_access?: string; - filetype?: string; - from?: any[]; - groups?: any[]; - has_more?: boolean; - has_more_shares?: boolean; - has_rich_preview?: boolean; - headers?: FileHeaders; - hls?: string; - hls_embed?: string; - id?: string; - image_exif_rotation?: number; - ims?: any[]; - initial_comment?: InitialComment; - is_channel_space?: boolean; - is_external?: boolean; - is_public?: boolean; - is_starred?: boolean; - last_editor?: string; - last_read?: number; - lines?: number; - lines_more?: number; - linked_channel_id?: string; - list_limits?: ListLimits; - list_metadata?: ListMetadata; - media_display_type?: string; - media_progress?: MediaProgress; - mimetype?: string; - mode?: string; - mp4?: string; - mp4_low?: string; - name?: string; - non_owner_editable?: boolean; - num_stars?: number; - org_or_workspace_access?: string; - original_attachment_count?: number; - original_h?: string; - original_w?: string; - permalink?: string; - permalink_public?: string; - pinned_to?: any[]; - pjpeg?: string; - plain_text?: string; - pretty_type?: string; - preview?: string; - preview_highlight?: string; - preview_is_truncated?: boolean; - preview_plain_text?: string; + access?: string; + alt_txt?: string; + app_id?: string; + app_name?: string; + attachments?: any[]; + blocks?: any[]; + bot_id?: string; + can_toggle_canvas_lock?: boolean; + canvas_template_mode?: string; + cc?: any[]; + channel_actions_count?: number; + channel_actions_ts?: string; + channels?: any[]; + comments_count?: number; + converted_pdf?: string; + created?: number; + deanimate?: string; + deanimate_gif?: string; + display_as_bot?: boolean; + dm_mpdm_users_with_file_access?: any[]; + duration_ms?: number; + edit_link?: string; + edit_timestamp?: number; + editable?: boolean; + editor?: string; + editors?: any[]; + external_id?: string; + external_type?: string; + external_url?: string; + favorites?: any[]; + file_access?: string; + filetype?: string; + from?: any[]; + groups?: any[]; + has_more?: boolean; + has_more_shares?: boolean; + has_rich_preview?: boolean; + headers?: FileHeaders; + hls?: string; + hls_embed?: string; + id?: string; + image_exif_rotation?: number; + ims?: any[]; + initial_comment?: InitialComment; + is_channel_space?: boolean; + is_external?: boolean; + is_public?: boolean; + is_starred?: boolean; + last_editor?: string; + last_read?: number; + lines?: number; + lines_more?: number; + linked_channel_id?: string; + list_limits?: ListLimits; + list_metadata?: ListMetadata; + media_display_type?: string; + media_progress?: MediaProgress; + mimetype?: string; + mode?: string; + mp4?: string; + mp4_low?: string; + name?: string; + non_owner_editable?: boolean; + num_stars?: number; + org_or_workspace_access?: string; + original_attachment_count?: number; + original_h?: string; + original_w?: string; + permalink?: string; + permalink_public?: string; + pinned_to?: any[]; + pjpeg?: string; + plain_text?: string; + pretty_type?: string; + preview?: string; + preview_highlight?: string; + preview_is_truncated?: boolean; + preview_plain_text?: string; private_channels_with_file_access_count?: number; - private_file_with_access_count?: number; - public_url_shared?: boolean; - quip_thread_id?: string; - reactions?: any[]; - saved?: Saved; - sent_to_self?: boolean; - shares?: ListShares; - show_badge?: boolean; - simplified_html?: string; - size?: number; - source_team?: string; - subject?: string; - subtype?: string; - team_pref_version_history_enabled?: boolean; - teams_shared_with?: any[]; - template_conversion_ts?: number; - template_description?: string; - template_icon?: string; - template_name?: string; - template_title?: string; - thumb_1024?: string; - thumb_1024_gif?: string; - thumb_1024_h?: string; - thumb_1024_w?: string; - thumb_160?: string; - thumb_160_gif?: string; - thumb_160_h?: string; - thumb_160_w?: string; - thumb_360?: string; - thumb_360_gif?: string; - thumb_360_h?: string; - thumb_360_w?: string; - thumb_480?: string; - thumb_480_gif?: string; - thumb_480_h?: string; - thumb_480_w?: string; - thumb_64?: string; - thumb_64_gif?: string; - thumb_64_h?: string; - thumb_64_w?: string; - thumb_720?: string; - thumb_720_gif?: string; - thumb_720_h?: string; - thumb_720_w?: string; - thumb_80?: string; - thumb_800?: string; - thumb_800_gif?: string; - thumb_800_h?: string; - thumb_800_w?: string; - thumb_80_gif?: string; - thumb_80_h?: string; - thumb_80_w?: string; - thumb_960?: string; - thumb_960_gif?: string; - thumb_960_h?: string; - thumb_960_w?: string; - thumb_gif?: string; - thumb_pdf?: string; - thumb_pdf_h?: string; - thumb_pdf_w?: string; - thumb_tiny?: string; - thumb_video?: string; - thumb_video_h?: number; - thumb_video_w?: number; - timestamp?: number; - title?: string; - title_blocks?: any[]; - to?: any[]; - transcription?: Transcription; - update_notification?: number; - updated?: number; - url_private?: string; - url_private_download?: string; - url_static_preview?: string; - user?: string; - user_team?: string; - username?: string; - vtt?: string; + private_file_with_access_count?: number; + public_url_shared?: boolean; + quip_thread_id?: string; + reactions?: any[]; + saved?: Saved; + sent_to_self?: boolean; + shares?: ListShares; + show_badge?: boolean; + simplified_html?: string; + size?: number; + source_team?: string; + subject?: string; + subtype?: string; + team_pref_version_history_enabled?: boolean; + teams_shared_with?: any[]; + template_conversion_ts?: number; + template_description?: string; + template_icon?: string; + template_name?: string; + template_title?: string; + thumb_1024?: string; + thumb_1024_gif?: string; + thumb_1024_h?: string; + thumb_1024_w?: string; + thumb_160?: string; + thumb_160_gif?: string; + thumb_160_h?: string; + thumb_160_w?: string; + thumb_360?: string; + thumb_360_gif?: string; + thumb_360_h?: string; + thumb_360_w?: string; + thumb_480?: string; + thumb_480_gif?: string; + thumb_480_h?: string; + thumb_480_w?: string; + thumb_64?: string; + thumb_64_gif?: string; + thumb_64_h?: string; + thumb_64_w?: string; + thumb_720?: string; + thumb_720_gif?: string; + thumb_720_h?: string; + thumb_720_w?: string; + thumb_80?: string; + thumb_800?: string; + thumb_800_gif?: string; + thumb_800_h?: string; + thumb_800_w?: string; + thumb_80_gif?: string; + thumb_80_h?: string; + thumb_80_w?: string; + thumb_960?: string; + thumb_960_gif?: string; + thumb_960_h?: string; + thumb_960_w?: string; + thumb_gif?: string; + thumb_pdf?: string; + thumb_pdf_h?: string; + thumb_pdf_w?: string; + thumb_tiny?: string; + thumb_video?: string; + thumb_video_h?: number; + thumb_video_w?: number; + timestamp?: number; + title?: string; + title_blocks?: any[]; + to?: any[]; + transcription?: Transcription; + update_notification?: number; + updated?: number; + url_private?: string; + url_private_download?: string; + url_static_preview?: string; + user?: string; + user_team?: string; + username?: string; + vtt?: string; } export interface MessageIcons { - emoji?: string; + emoji?: string; image_36?: string; image_48?: string; image_64?: string; @@ -1162,77 +1161,77 @@ export interface MessageMetadata { } export interface Room { - app_id?: string; - attached_file_ids?: any[]; - background_id?: string; - call_family?: string; - canvas_background?: string; - canvas_thread_ts?: string; - channels?: any[]; - created_by?: string; - date_end?: number; - date_start?: number; - display_id?: string; - external_unique_id?: string; - has_ended?: boolean; - id?: string; - is_dm_call?: boolean; - is_prewarmed?: boolean; - is_scheduled?: boolean; - media_backend_type?: string; - media_server?: string; - name?: string; - participant_history?: any[]; - participants?: any[]; - participants_camera_off?: any[]; - participants_camera_on?: any[]; + app_id?: string; + attached_file_ids?: any[]; + background_id?: string; + call_family?: string; + canvas_background?: string; + canvas_thread_ts?: string; + channels?: any[]; + created_by?: string; + date_end?: number; + date_start?: number; + display_id?: string; + external_unique_id?: string; + has_ended?: boolean; + id?: string; + is_dm_call?: boolean; + is_prewarmed?: boolean; + is_scheduled?: boolean; + media_backend_type?: string; + media_server?: string; + name?: string; + participant_history?: any[]; + participants?: any[]; + participants_camera_off?: any[]; + participants_camera_on?: any[]; participants_screenshare_off?: any[]; - participants_screenshare_on?: any[]; - thread_root_ts?: string; - was_accepted?: boolean; - was_missed?: boolean; - was_rejected?: boolean; + participants_screenshare_on?: any[]; + thread_root_ts?: string; + was_accepted?: boolean; + was_missed?: boolean; + was_rejected?: boolean; } export interface Root { - bot_id?: string; - bot_profile?: BotProfile; - edited?: Edited; - icons?: MessageIcons; - last_read?: string; - latest_reply?: string; - mrkdwn?: boolean; - no_notifications?: boolean; - parent_user_id?: string; - replies?: any[]; - reply_count?: number; - reply_users?: any[]; + bot_id?: string; + bot_profile?: BotProfile; + edited?: Edited; + icons?: MessageIcons; + last_read?: string; + latest_reply?: string; + mrkdwn?: boolean; + no_notifications?: boolean; + parent_user_id?: string; + replies?: any[]; + reply_count?: number; + reply_users?: any[]; reply_users_count?: number; - room?: Room; - subscribed?: boolean; - subtype?: string; - team?: string; - text?: string; - thread_ts?: string; - ts?: string; - type?: string; - unread_count?: number; - user?: string; - username?: string; + room?: Room; + subscribed?: boolean; + subtype?: string; + team?: string; + text?: string; + thread_ts?: string; + ts?: string; + type?: string; + unread_count?: number; + user?: string; + username?: string; } export interface ListRecordElement { - created_by?: string; - date_created?: number; - fields?: RecordField[]; - id?: string; - is_subscribed?: boolean; - list_id?: string; - platform_refs?: PlatformRefs; - position?: string; - saved?: Saved; - thread_ts?: string; - updated_by?: string; + created_by?: string; + date_created?: number; + fields?: RecordField[]; + id?: string; + is_subscribed?: boolean; + list_id?: string; + platform_refs?: PlatformRefs; + position?: string; + saved?: Saved; + thread_ts?: string; + updated_by?: string; updated_timestamp?: string; } @@ -1245,30 +1244,30 @@ export interface PlatformRefs { export interface MessageBlock { channel?: string; message?: Message; - team?: string; - ts?: string; + team?: string; + ts?: string; } export interface AttachmentMetadata { - extension?: string; - format?: string; - original_h?: number; - original_w?: number; - rotation?: number; - thumb_160?: boolean; + extension?: string; + format?: string; + original_h?: number; + original_w?: number; + rotation?: number; + thumb_160?: boolean; thumb_360_h?: number; thumb_360_w?: number; - thumb_64?: boolean; - thumb_80?: boolean; - thumb_tiny?: string; + thumb_64?: boolean; + thumb_80?: boolean; + thumb_tiny?: string; } export interface Preview { can_remove?: boolean; - icon_url?: string; - subtitle?: DescriptionElement; - title?: DescriptionElement; - type?: string; + icon_url?: string; + subtitle?: DescriptionElement; + title?: DescriptionElement; + type?: string; } export interface MatchHeaders { @@ -1280,115 +1279,115 @@ export interface MatchShares { } export interface TitleBlock { - accessory?: Accessory; - alt_text?: string; - api_decoration_available?: boolean; - app_collaborators?: string[]; - app_id?: string; - author_name?: string; - block_id?: string; - bot_user_id?: string; - button_label?: string; - call?: Call; - call_id?: string; - description?: DescriptionElement; - developer_trace_id?: string; - dispatch_action?: boolean; - element?: Accessory; - elements?: Accessory[]; - external_id?: string; - fallback?: string; - fields?: DescriptionElement[]; - file?: FileElement; - file_id?: string; - function_trigger_id?: string; - hint?: DescriptionElement; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - is_animated?: boolean; - is_workflow_app?: boolean; - label?: DescriptionElement; - optional?: boolean; - owning_team_id?: string; - provider_icon_url?: string; - provider_name?: string; + accessory?: Accessory; + alt_text?: string; + api_decoration_available?: boolean; + app_collaborators?: string[]; + app_id?: string; + author_name?: string; + block_id?: string; + bot_user_id?: string; + button_label?: string; + call?: Call; + call_id?: string; + description?: DescriptionElement; + developer_trace_id?: string; + dispatch_action?: boolean; + element?: Accessory; + elements?: Accessory[]; + external_id?: string; + fallback?: string; + fields?: DescriptionElement[]; + file?: FileElement; + file_id?: string; + function_trigger_id?: string; + hint?: DescriptionElement; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + is_animated?: boolean; + is_workflow_app?: boolean; + label?: DescriptionElement; + optional?: boolean; + owning_team_id?: string; + provider_icon_url?: string; + provider_name?: string; sales_home_workflow_app_type?: number; - share_url?: string; - slack_file?: SlackFile; - source?: string; - text?: DescriptionElement; - thumbnail_url?: string; - title?: DescriptionElement; - title_url?: string; - trigger_subtype?: string; - trigger_type?: string; - type?: BlockType; - url?: string; - video_url?: string; - workflow_id?: string; + share_url?: string; + slack_file?: SlackFile; + source?: string; + text?: DescriptionElement; + thumbnail_url?: string; + title?: DescriptionElement; + title_url?: string; + trigger_subtype?: string; + trigger_type?: string; + type?: BlockType; + url?: string; + video_url?: string; + workflow_id?: string; } export interface Call { media_backend_type?: string; - v1?: V1; + v1?: V1; } export interface V1 { - active_participants?: Participant[]; - all_participants?: Participant[]; - app_icon_urls?: AppIconUrls; - app_id?: string; - channels?: string[]; - created_by?: string; - date_end?: number; - date_start?: number; + active_participants?: Participant[]; + all_participants?: Participant[]; + app_icon_urls?: AppIconUrls; + app_id?: string; + channels?: string[]; + created_by?: string; + date_end?: number; + date_start?: number; desktop_app_join_url?: string; - display_id?: string; - has_ended?: boolean; - id?: string; - is_dm_call?: boolean; - join_url?: string; - name?: string; - was_accepted?: boolean; - was_missed?: boolean; - was_rejected?: boolean; + display_id?: string; + has_ended?: boolean; + id?: string; + is_dm_call?: boolean; + join_url?: string; + name?: string; + was_accepted?: boolean; + was_missed?: boolean; + was_rejected?: boolean; } export interface Participant { - avatar_url?: string; + avatar_url?: string; display_name?: string; - external_id?: string; - slack_id?: string; + external_id?: string; + slack_id?: string; } export interface AppIconUrls { - image_1024?: string; - image_128?: string; - image_192?: string; - image_32?: string; - image_36?: string; - image_48?: string; - image_512?: string; - image_64?: string; - image_72?: string; - image_96?: string; + image_1024?: string; + image_128?: string; + image_192?: string; + image_32?: string; + image_36?: string; + image_48?: string; + image_512?: string; + image_64?: string; + image_72?: string; + image_96?: string; image_original?: string; } export interface Pagination { - first?: number; - last?: number; - page?: number; - page_count?: number; - per_page?: number; + first?: number; + last?: number; + page?: number; + page_count?: number; + per_page?: number; total_count?: number; } export interface Paging { count?: number; - page?: number; + page?: number; pages?: number; total?: number; } diff --git a/packages/web-api/src/types/response/SearchMessagesResponse.ts b/packages/web-api/src/types/response/SearchMessagesResponse.ts index a871fa241..1de72cf18 100644 --- a/packages/web-api/src/types/response/SearchMessagesResponse.ts +++ b/packages/web-api/src/types/response/SearchMessagesResponse.ts @@ -8,143 +8,143 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type SearchMessagesResponse = WebAPICallResult & { - error?: string; + error?: string; messages?: Messages; - needed?: string; - ok?: boolean; + needed?: string; + ok?: boolean; provided?: string; - query?: string; + query?: string; }; export interface Messages { - matches?: Match[]; + matches?: Match[]; pagination?: Pagination; - paging?: Paging; - total?: number; + paging?: Paging; + total?: number; } export interface Match { - attachments?: Attachment[]; - blocks?: MatchBlock[]; - channel?: Channel; - files?: FileElement[]; - iid?: string; - is_mpim?: boolean; + attachments?: Attachment[]; + blocks?: MatchBlock[]; + channel?: Channel; + files?: FileElement[]; + iid?: string; + is_mpim?: boolean; no_reactions?: boolean; - permalink?: string; - previous?: Previous; - previous_2?: Previous; - score?: number; - team?: string; - text?: string; - ts?: string; - type?: string; - user?: string; - username?: string; + permalink?: string; + previous?: Previous; + previous_2?: Previous; + score?: number; + team?: string; + text?: string; + ts?: string; + type?: string; + user?: string; + username?: string; } export interface Attachment { - actions?: Action[]; - app_id?: string; - app_unfurl_url?: string; - author_icon?: string; - author_id?: string; - author_link?: string; - author_name?: string; - author_subname?: string; - blocks?: TitleBlockElement[]; - bot_id?: string; - callback_id?: string; - channel_id?: string; - channel_name?: string; - channel_team?: string; - color?: string; - fallback?: string; - fields?: AttachmentField[]; - file_id?: string; - filename?: string; - files?: FileElement[]; - footer?: string; - footer_icon?: string; - from_url?: string; - hide_border?: boolean; - hide_color?: boolean; - id?: number; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - indent?: boolean; - is_app_unfurl?: boolean; - is_file_attachment?: boolean; - is_msg_unfurl?: boolean; - is_reply_unfurl?: boolean; + actions?: Action[]; + app_id?: string; + app_unfurl_url?: string; + author_icon?: string; + author_id?: string; + author_link?: string; + author_name?: string; + author_subname?: string; + blocks?: TitleBlockElement[]; + bot_id?: string; + callback_id?: string; + channel_id?: string; + channel_name?: string; + channel_team?: string; + color?: string; + fallback?: string; + fields?: AttachmentField[]; + file_id?: string; + filename?: string; + files?: FileElement[]; + footer?: string; + footer_icon?: string; + from_url?: string; + hide_border?: boolean; + hide_color?: boolean; + id?: number; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + indent?: boolean; + is_app_unfurl?: boolean; + is_file_attachment?: boolean; + is_msg_unfurl?: boolean; + is_reply_unfurl?: boolean; is_thread_root_unfurl?: boolean; - list?: List; - list_record?: PurpleListRecord; - list_record_id?: string; - list_records?: ListRecordElement[]; - list_schema?: Schema[]; - list_view?: View; - list_view_id?: string; - message_blocks?: MessageBlock[]; - metadata?: AttachmentMetadata; - mimetype?: string; - mrkdwn_in?: string[]; - msg_subtype?: string; - original_url?: string; - pretext?: string; - preview?: Preview; - service_icon?: string; - service_name?: string; - service_url?: string; - size?: number; - text?: string; - thumb_height?: number; - thumb_url?: string; - thumb_width?: number; - title?: string; - title_link?: string; - ts?: string; - url?: string; - video_html?: string; - video_html_height?: number; - video_html_width?: number; - video_url?: string; + list?: List; + list_record?: PurpleListRecord; + list_record_id?: string; + list_records?: ListRecordElement[]; + list_schema?: Schema[]; + list_view?: View; + list_view_id?: string; + message_blocks?: MessageBlock[]; + metadata?: AttachmentMetadata; + mimetype?: string; + mrkdwn_in?: string[]; + msg_subtype?: string; + original_url?: string; + pretext?: string; + preview?: Preview; + service_icon?: string; + service_name?: string; + service_url?: string; + size?: number; + text?: string; + thumb_height?: number; + thumb_url?: string; + thumb_width?: number; + title?: string; + title_link?: string; + ts?: string; + url?: string; + video_html?: string; + video_html_height?: number; + video_html_width?: number; + video_url?: string; } export interface Action { - confirm?: ActionConfirm; - data_source?: string; - id?: string; + confirm?: ActionConfirm; + data_source?: string; + id?: string; min_query_length?: number; - name?: string; - option_groups?: ActionOptionGroup[]; - options?: SelectedOptionElement[]; + name?: string; + option_groups?: ActionOptionGroup[]; + options?: SelectedOptionElement[]; selected_options?: SelectedOptionElement[]; - style?: string; - text?: string; - type?: ActionType; - url?: string; - value?: string; + style?: string; + text?: string; + type?: ActionType; + url?: string; + value?: string; } export interface ActionConfirm { dismiss_text?: string; - ok_text?: string; - text?: string; - title?: string; + ok_text?: string; + text?: string; + title?: string; } export interface ActionOptionGroup { options?: SelectedOptionElement[]; - text?: string; + text?: string; } export interface SelectedOptionElement { - text?: string; + text?: string; value?: string; } @@ -175,100 +175,100 @@ export enum ActionType { } export interface TitleBlockElement { - accessory?: Accessory; - alt_text?: string; - app_collaborators?: string[]; - app_id?: string; - author_name?: string; - block_id?: string; - bot_user_id?: string; - button_label?: string; - description?: DescriptionElement | string; - developer_trace_id?: string; - elements?: Accessory[]; - fallback?: string; - fields?: DescriptionElement[]; - function_trigger_id?: string; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - is_animated?: boolean; - is_workflow_app?: boolean; - owning_team_id?: string; - provider_icon_url?: string; - provider_name?: string; + accessory?: Accessory; + alt_text?: string; + app_collaborators?: string[]; + app_id?: string; + author_name?: string; + block_id?: string; + bot_user_id?: string; + button_label?: string; + description?: DescriptionElement | string; + developer_trace_id?: string; + elements?: Accessory[]; + fallback?: string; + fields?: DescriptionElement[]; + function_trigger_id?: string; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + is_animated?: boolean; + is_workflow_app?: boolean; + owning_team_id?: string; + provider_icon_url?: string; + provider_name?: string; sales_home_workflow_app_type?: number; - share_url?: string; - slack_file?: SlackFile; - text?: DescriptionElement; - thumbnail_url?: string; - title?: DescriptionElement | string; - title_url?: string; - trigger_subtype?: string; - trigger_type?: string; - type?: BlockType; - url?: string; - video_url?: string; - workflow_id?: string; + share_url?: string; + slack_file?: SlackFile; + text?: DescriptionElement; + thumbnail_url?: string; + title?: DescriptionElement | string; + title_url?: string; + trigger_subtype?: string; + trigger_type?: string; + type?: BlockType; + url?: string; + video_url?: string; + workflow_id?: string; } export interface Accessory { - accessibility_label?: string; - action_id?: string; - alt_text?: string; - border?: number; - confirm?: AccessoryConfirm; + accessibility_label?: string; + action_id?: string; + alt_text?: string; + border?: number; + confirm?: AccessoryConfirm; default_to_current_conversation?: boolean; - elements?: AccessoryElement[]; - fallback?: string; - filter?: Filter; - focus_on_load?: boolean; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - indent?: number; - initial_channel?: string; - initial_channels?: string[]; - initial_conversation?: string; - initial_conversations?: string[]; - initial_date?: string; - initial_date_time?: number; - initial_option?: InitialOptionElement; - initial_options?: InitialOptionElement[]; - initial_time?: string; - initial_user?: string; - initial_users?: string[]; - max_selected_items?: number; - min_query_length?: number; - offset?: number; - option_groups?: AccessoryOptionGroup[]; - options?: InitialOptionElement[]; - placeholder?: DescriptionElement; - response_url_enabled?: boolean; - slack_file?: SlackFile; - style?: string; - text?: DescriptionElement; - timezone?: string; - type?: ActionType; - url?: string; - value?: string; - workflow?: Workflow; + elements?: AccessoryElement[]; + fallback?: string; + filter?: Filter; + focus_on_load?: boolean; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + indent?: number; + initial_channel?: string; + initial_channels?: string[]; + initial_conversation?: string; + initial_conversations?: string[]; + initial_date?: string; + initial_date_time?: number; + initial_option?: InitialOptionElement; + initial_options?: InitialOptionElement[]; + initial_time?: string; + initial_user?: string; + initial_users?: string[]; + max_selected_items?: number; + min_query_length?: number; + offset?: number; + option_groups?: AccessoryOptionGroup[]; + options?: InitialOptionElement[]; + placeholder?: DescriptionElement; + response_url_enabled?: boolean; + slack_file?: SlackFile; + style?: string; + text?: DescriptionElement; + timezone?: string; + type?: ActionType; + url?: string; + value?: string; + workflow?: Workflow; } export interface AccessoryConfirm { confirm?: DescriptionElement; - deny?: DescriptionElement; - style?: string; - text?: DescriptionElement; - title?: DescriptionElement; + deny?: DescriptionElement; + style?: string; + text?: DescriptionElement; + title?: DescriptionElement; } export interface DescriptionElement { - emoji?: boolean; - text?: string; - type?: DescriptionType; + emoji?: boolean; + text?: string; + type?: DescriptionType; verbatim?: boolean; } @@ -278,42 +278,42 @@ export enum DescriptionType { } export interface AccessoryElement { - border?: number; + border?: number; elements?: PurpleElement[]; - indent?: number; - offset?: number; - style?: string; - type?: ActionType; + indent?: number; + offset?: number; + style?: string; + type?: ActionType; } export interface PurpleElement { - channel_id?: string; - fallback?: string; - format?: string; - name?: string; - range?: string; - skin_tone?: number; - style?: Style; - team_id?: string; - text?: string; - timestamp?: string; - type?: PurpleType; - unicode?: string; - unsafe?: boolean; - url?: string; - user_id?: string; + channel_id?: string; + fallback?: string; + format?: string; + name?: string; + range?: string; + skin_tone?: number; + style?: Style; + team_id?: string; + text?: string; + timestamp?: string; + type?: PurpleType; + unicode?: string; + unsafe?: boolean; + url?: string; + user_id?: string; usergroup_id?: string; - value?: string; + value?: string; } export interface Style { - bold?: boolean; + bold?: boolean; client_highlight?: boolean; - code?: boolean; - highlight?: boolean; - italic?: boolean; - strike?: boolean; - unlink?: boolean; + code?: boolean; + highlight?: boolean; + italic?: boolean; + strike?: boolean; + unlink?: boolean; } export enum PurpleType { @@ -330,25 +330,25 @@ export enum PurpleType { } export interface Filter { - exclude_bot_users?: boolean; + exclude_bot_users?: boolean; exclude_external_shared_channels?: boolean; - include?: any[]; + include?: any[]; } export interface InitialOptionElement { description?: DescriptionElement; - text?: DescriptionElement; - url?: string; - value?: string; + text?: DescriptionElement; + url?: string; + value?: string; } export interface AccessoryOptionGroup { - label?: DescriptionElement; + label?: DescriptionElement; options?: InitialOptionElement[]; } export interface SlackFile { - id?: string; + id?: string; url?: string; } @@ -358,11 +358,11 @@ export interface Workflow { export interface Trigger { customizable_input_parameters?: CustomizableInputParameter[]; - url?: string; + url?: string; } export interface CustomizableInputParameter { - name?: string; + name?: string; value?: string; } @@ -384,263 +384,263 @@ export interface AttachmentField { } export interface FileElement { - access?: string; - alt_txt?: string; - app_id?: string; - app_name?: string; - attachments?: any[]; - blocks?: TitleBlockElement[]; - bot_id?: string; - can_toggle_canvas_lock?: boolean; - canvas_template_mode?: string; - cc?: Cc[]; - channel_actions_count?: number; - channel_actions_ts?: string; - channels?: string[]; - comments_count?: number; - converted_pdf?: string; - created?: number; - deanimate?: string; - deanimate_gif?: string; - display_as_bot?: boolean; - dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; - duration_ms?: number; - edit_link?: string; - edit_timestamp?: number; - editable?: boolean; - editor?: string; - editors?: string[]; - external_id?: string; - external_type?: string; - external_url?: string; - favorites?: Favorite[]; - file_access?: string; - filetype?: string; - from?: Cc[]; - groups?: string[]; - has_more?: boolean; - has_more_shares?: boolean; - has_rich_preview?: boolean; - headers?: Headers; - hls?: string; - hls_embed?: string; - id?: string; - image_exif_rotation?: number; - ims?: string[]; - initial_comment?: InitialComment; - is_channel_space?: boolean; - is_external?: boolean; - is_public?: boolean; - is_starred?: boolean; - last_editor?: string; - last_read?: number; - lines?: number; - lines_more?: number; - linked_channel_id?: string; - list_limits?: ListLimits; - list_metadata?: ListMetadata; - media_display_type?: string; - media_progress?: MediaProgress; - mimetype?: string; - mode?: string; - mp4?: string; - mp4_low?: string; - name?: string; - non_owner_editable?: boolean; - num_stars?: number; - org_or_workspace_access?: string; - original_attachment_count?: number; - original_h?: string; - original_w?: string; - permalink?: string; - permalink_public?: string; - pinned_to?: string[]; - pjpeg?: string; - plain_text?: string; - pretty_type?: string; - preview?: string; - preview_highlight?: string; - preview_is_truncated?: boolean; - preview_plain_text?: string; + access?: string; + alt_txt?: string; + app_id?: string; + app_name?: string; + attachments?: any[]; + blocks?: TitleBlockElement[]; + bot_id?: string; + can_toggle_canvas_lock?: boolean; + canvas_template_mode?: string; + cc?: Cc[]; + channel_actions_count?: number; + channel_actions_ts?: string; + channels?: string[]; + comments_count?: number; + converted_pdf?: string; + created?: number; + deanimate?: string; + deanimate_gif?: string; + display_as_bot?: boolean; + dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; + duration_ms?: number; + edit_link?: string; + edit_timestamp?: number; + editable?: boolean; + editor?: string; + editors?: string[]; + external_id?: string; + external_type?: string; + external_url?: string; + favorites?: Favorite[]; + file_access?: string; + filetype?: string; + from?: Cc[]; + groups?: string[]; + has_more?: boolean; + has_more_shares?: boolean; + has_rich_preview?: boolean; + headers?: Headers; + hls?: string; + hls_embed?: string; + id?: string; + image_exif_rotation?: number; + ims?: string[]; + initial_comment?: InitialComment; + is_channel_space?: boolean; + is_external?: boolean; + is_public?: boolean; + is_starred?: boolean; + last_editor?: string; + last_read?: number; + lines?: number; + lines_more?: number; + linked_channel_id?: string; + list_limits?: ListLimits; + list_metadata?: ListMetadata; + media_display_type?: string; + media_progress?: MediaProgress; + mimetype?: string; + mode?: string; + mp4?: string; + mp4_low?: string; + name?: string; + non_owner_editable?: boolean; + num_stars?: number; + org_or_workspace_access?: string; + original_attachment_count?: number; + original_h?: string; + original_w?: string; + permalink?: string; + permalink_public?: string; + pinned_to?: string[]; + pjpeg?: string; + plain_text?: string; + pretty_type?: string; + preview?: string; + preview_highlight?: string; + preview_is_truncated?: boolean; + preview_plain_text?: string; private_channels_with_file_access_count?: number; - private_file_with_access_count?: number; - public_url_shared?: boolean; - quip_thread_id?: string; - reactions?: Reaction[]; - saved?: Saved; - sent_to_self?: boolean; - shares?: PurpleShares; - show_badge?: boolean; - simplified_html?: string; - size?: number; - source_team?: string; - subject?: string; - subtype?: string; - team_pref_version_history_enabled?: boolean; - teams_shared_with?: any[]; - template_conversion_ts?: number; - template_description?: string; - template_icon?: string; - template_name?: string; - template_title?: string; - thumb_1024?: string; - thumb_1024_gif?: string; - thumb_1024_h?: string; - thumb_1024_w?: string; - thumb_160?: string; - thumb_160_gif?: string; - thumb_160_h?: string; - thumb_160_w?: string; - thumb_360?: string; - thumb_360_gif?: string; - thumb_360_h?: string; - thumb_360_w?: string; - thumb_480?: string; - thumb_480_gif?: string; - thumb_480_h?: string; - thumb_480_w?: string; - thumb_64?: string; - thumb_64_gif?: string; - thumb_64_h?: string; - thumb_64_w?: string; - thumb_720?: string; - thumb_720_gif?: string; - thumb_720_h?: string; - thumb_720_w?: string; - thumb_80?: string; - thumb_800?: string; - thumb_800_gif?: string; - thumb_800_h?: string; - thumb_800_w?: string; - thumb_80_gif?: string; - thumb_80_h?: string; - thumb_80_w?: string; - thumb_960?: string; - thumb_960_gif?: string; - thumb_960_h?: string; - thumb_960_w?: string; - thumb_gif?: string; - thumb_pdf?: string; - thumb_pdf_h?: string; - thumb_pdf_w?: string; - thumb_tiny?: string; - thumb_video?: string; - thumb_video_h?: number; - thumb_video_w?: number; - timestamp?: number; - title?: string; - title_blocks?: TitleBlockElement[]; - to?: Cc[]; - transcription?: Transcription; - update_notification?: number; - updated?: number; - url_private?: string; - url_private_download?: string; - url_static_preview?: string; - user?: string; - user_team?: string; - username?: string; - vtt?: string; + private_file_with_access_count?: number; + public_url_shared?: boolean; + quip_thread_id?: string; + reactions?: Reaction[]; + saved?: Saved; + sent_to_self?: boolean; + shares?: PurpleShares; + show_badge?: boolean; + simplified_html?: string; + size?: number; + source_team?: string; + subject?: string; + subtype?: string; + team_pref_version_history_enabled?: boolean; + teams_shared_with?: any[]; + template_conversion_ts?: number; + template_description?: string; + template_icon?: string; + template_name?: string; + template_title?: string; + thumb_1024?: string; + thumb_1024_gif?: string; + thumb_1024_h?: string; + thumb_1024_w?: string; + thumb_160?: string; + thumb_160_gif?: string; + thumb_160_h?: string; + thumb_160_w?: string; + thumb_360?: string; + thumb_360_gif?: string; + thumb_360_h?: string; + thumb_360_w?: string; + thumb_480?: string; + thumb_480_gif?: string; + thumb_480_h?: string; + thumb_480_w?: string; + thumb_64?: string; + thumb_64_gif?: string; + thumb_64_h?: string; + thumb_64_w?: string; + thumb_720?: string; + thumb_720_gif?: string; + thumb_720_h?: string; + thumb_720_w?: string; + thumb_80?: string; + thumb_800?: string; + thumb_800_gif?: string; + thumb_800_h?: string; + thumb_800_w?: string; + thumb_80_gif?: string; + thumb_80_h?: string; + thumb_80_w?: string; + thumb_960?: string; + thumb_960_gif?: string; + thumb_960_h?: string; + thumb_960_w?: string; + thumb_gif?: string; + thumb_pdf?: string; + thumb_pdf_h?: string; + thumb_pdf_w?: string; + thumb_tiny?: string; + thumb_video?: string; + thumb_video_h?: number; + thumb_video_w?: number; + timestamp?: number; + title?: string; + title_blocks?: TitleBlockElement[]; + to?: Cc[]; + transcription?: Transcription; + update_notification?: number; + updated?: number; + url_private?: string; + url_private_download?: string; + url_static_preview?: string; + user?: string; + user_team?: string; + username?: string; + vtt?: string; } export interface Cc { - address?: string; - name?: string; + address?: string; + name?: string; original?: string; } export interface DmMpdmUsersWithFileAccess { - access?: string; + access?: string; user_id?: string; } export interface Favorite { - collection_id?: string; + collection_id?: string; collection_name?: string; - position?: string; + position?: string; } export interface Headers { - date?: string; + date?: string; in_reply_to?: string; - message_id?: string; - reply_to?: string; + message_id?: string; + reply_to?: string; } export interface InitialComment { - channel?: string; - comment?: string; - created?: number; - id?: string; - is_intro?: boolean; + channel?: string; + comment?: string; + created?: number; + id?: string; + is_intro?: boolean; timestamp?: number; - user?: string; + user?: string; } export interface ListLimits { - column_count?: number; - column_count_limit?: number; + column_count?: number; + column_count_limit?: number; over_column_maximum?: boolean; - over_row_maximum?: boolean; - over_view_maximum?: boolean; - row_count?: number; - row_count_limit?: number; - view_count?: number; - view_count_limit?: number; + over_row_maximum?: boolean; + over_view_maximum?: boolean; + row_count?: number; + row_count_limit?: number; + view_count?: number; + view_count_limit?: number; } export interface ListMetadata { creation_source?: CreationSource; - description?: string; - icon?: string; - icon_team_id?: string; - icon_url?: string; - integrations?: string[]; - is_trial?: boolean; - schema?: Schema[]; - views?: View[]; + description?: string; + icon?: string; + icon_team_id?: string; + icon_url?: string; + integrations?: string[]; + is_trial?: boolean; + schema?: Schema[]; + views?: View[]; } export interface CreationSource { - reference_id?: string; - type?: string; + reference_id?: string; + type?: string; workflow_function_id?: string; } export interface Schema { - id?: string; + id?: string; is_primary_column?: boolean; - key?: string; - name?: string; - options?: Options; - type?: string; + key?: string; + name?: string; + options?: Options; + type?: string; } export interface Options { - canvas_id?: string; + canvas_id?: string; canvas_placeholder_mapping?: CanvasPlaceholderMapping[]; - choices?: Choice[]; - currency?: string; - currency_format?: string; - date_format?: string; - default_value?: string; - default_value_typed?: DefaultValueTyped; - emoji?: string; - emoji_team_id?: string; - for_assignment?: boolean; - format?: string; - linked_to?: string[]; - mark_as_done_when_checked?: boolean; - max?: number; - notify_users?: boolean; - precision?: number; - rounding?: string; - show_member_name?: boolean; - time_format?: string; + choices?: Choice[]; + currency?: string; + currency_format?: string; + date_format?: string; + default_value?: string; + default_value_typed?: DefaultValueTyped; + emoji?: string; + emoji_team_id?: string; + for_assignment?: boolean; + format?: string; + linked_to?: string[]; + mark_as_done_when_checked?: boolean; + max?: number; + notify_users?: boolean; + precision?: number; + rounding?: string; + show_member_name?: boolean; + time_format?: string; } export interface CanvasPlaceholderMapping { - column?: string; + column?: string; variable?: string; } @@ -655,64 +655,64 @@ export interface DefaultValueTyped { } export interface View { - columns?: Column[]; - created_by?: string; - date_created?: number; - id?: string; + columns?: Column[]; + created_by?: string; + date_created?: number; + id?: string; is_all_items_view?: boolean; - is_locked?: boolean; - name?: string; - position?: string; + is_locked?: boolean; + name?: string; + position?: string; stick_column_left?: boolean; - type?: string; + type?: string; } export interface Column { - id?: string; - key?: string; + id?: string; + key?: string; position?: string; - visible?: boolean; - width?: number; + visible?: boolean; + width?: number; } export interface MediaProgress { - duration_ms?: number; + duration_ms?: number; max_offset_ms?: number; - offset_ms?: number; + offset_ms?: number; } export interface Reaction { count?: number; - name?: string; - url?: string; + name?: string; + url?: string; users?: string[]; } export interface Saved { date_completed?: number; - date_due?: number; - is_archived?: boolean; - state?: string; + date_due?: number; + is_archived?: boolean; + state?: string; } export interface PurpleShares { private?: { [key: string]: Private[] }; - public?: { [key: string]: Private[] }; + public?: { [key: string]: Private[] }; } export interface Private { - access?: string; - channel_name?: string; - date_last_shared?: number; - latest_reply?: string; - reply_count?: number; - reply_users?: string[]; + access?: string; + channel_name?: string; + date_last_shared?: number; + latest_reply?: string; + reply_count?: number; + reply_users?: string[]; reply_users_count?: number; - share_user_id?: string; - source?: string; - team_id?: string; - thread_ts?: string; - ts?: string; + share_user_id?: string; + source?: string; + team_id?: string; + thread_ts?: string; + ts?: string; } export interface Transcription { @@ -721,48 +721,47 @@ export interface Transcription { } export interface List { - channels?: string[]; - comments_count?: number; - created?: number; - display_as_bot?: boolean; - dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; - editable?: boolean; - external_type?: string; - file_access?: string; - filetype?: string; - groups?: string[]; - has_more_shares?: boolean; - has_rich_preview?: boolean; - id?: string; - ims?: string[]; - is_external?: boolean; - is_public?: boolean; - last_editor?: string; - list_limits?: ListLimits; - list_metadata?: ListMetadata; - mimetype?: string; - mode?: string; - name?: string; - permalink?: string; - permalink_public?: string; - pretty_type?: string; + channels?: string[]; + comments_count?: number; + created?: number; + display_as_bot?: boolean; + dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; + editable?: boolean; + external_type?: string; + file_access?: string; + filetype?: string; + groups?: string[]; + has_more_shares?: boolean; + has_rich_preview?: boolean; + id?: string; + ims?: string[]; + is_external?: boolean; + is_public?: boolean; + last_editor?: string; + list_limits?: ListLimits; + list_metadata?: ListMetadata; + mimetype?: string; + mode?: string; + name?: string; + permalink?: string; + permalink_public?: string; + pretty_type?: string; private_channels_with_file_access_count?: number; - private_file_with_access_count?: number; - public_url_shared?: boolean; - shares?: ListShares; - size?: number; - timestamp?: number; - title?: string; - updated?: number; - url_private?: string; - url_private_download?: string; - user?: string; - user_team?: string; - username?: string; + private_file_with_access_count?: number; + public_url_shared?: boolean; + shares?: ListShares; + size?: number; + timestamp?: number; + title?: string; + updated?: number; + url_private?: string; + url_private_download?: string; + user?: string; + user_team?: string; + username?: string; } -export interface ListShares { -} +export type ListShares = {}; export interface PurpleListRecord { record?: Record; @@ -770,90 +769,90 @@ export interface PurpleListRecord { } export interface Record { - fields?: RecordField[]; + fields?: RecordField[]; record_id?: string; } export interface RecordField { attachment?: any[]; - channel?: any[]; - checkbox?: boolean; - column_id?: string; - date?: any[]; - email?: any[]; - key?: string; - message?: Message; - number?: any[]; - phone?: any[]; - rating?: any[]; - rich_text?: any[]; - select?: any[]; - text?: string; - timestamp?: any[]; - user?: any[]; - value?: string; + channel?: any[]; + checkbox?: boolean; + column_id?: string; + date?: any[]; + email?: any[]; + key?: string; + message?: Message; + number?: any[]; + phone?: any[]; + rating?: any[]; + rich_text?: any[]; + select?: any[]; + text?: string; + timestamp?: any[]; + user?: any[]; + value?: string; } export interface Message { - app_id?: string; - attachments?: any[]; - blocks?: TitleBlockElement[]; - bot_id?: string; - bot_link?: string; - bot_profile?: BotProfile; - channel?: string; - client_msg_id?: string; - comment?: Comment; - display_as_bot?: boolean; - edited?: Edited; - file?: MessageFile; - files?: any[]; - hidden?: boolean; - icons?: MessageIcons; - inviter?: string; - is_intro?: boolean; - is_locked?: boolean; - is_starred?: boolean; + app_id?: string; + attachments?: any[]; + blocks?: TitleBlockElement[]; + bot_id?: string; + bot_link?: string; + bot_profile?: BotProfile; + channel?: string; + client_msg_id?: string; + comment?: Comment; + display_as_bot?: boolean; + edited?: Edited; + file?: MessageFile; + files?: any[]; + hidden?: boolean; + icons?: MessageIcons; + inviter?: string; + is_intro?: boolean; + is_locked?: boolean; + is_starred?: boolean; is_thread_broadcast?: boolean; - item?: Comment; - item_type?: string; - last_read?: string; - latest_reply?: string; - metadata?: MessageMetadata; - no_notifications?: boolean; - parent_user_id?: string; - pinned_to?: any[]; - purpose?: string; - reactions?: any[]; - replies?: any[]; - reply_count?: number; - reply_users?: any[]; - reply_users_count?: number; - room?: Room; - root?: Root; - subscribed?: boolean; - subtype?: string; - team?: string; - text?: string; - thread_ts?: string; - topic?: string; - ts?: string; - type?: string; - unfurl_links?: boolean; - unfurl_media?: boolean; - upload?: boolean; - user?: string; - username?: string; - wibblr?: boolean; - x_files?: any[]; + item?: Comment; + item_type?: string; + last_read?: string; + latest_reply?: string; + metadata?: MessageMetadata; + no_notifications?: boolean; + parent_user_id?: string; + pinned_to?: any[]; + purpose?: string; + reactions?: any[]; + replies?: any[]; + reply_count?: number; + reply_users?: any[]; + reply_users_count?: number; + room?: Room; + root?: Root; + subscribed?: boolean; + subtype?: string; + team?: string; + text?: string; + thread_ts?: string; + topic?: string; + ts?: string; + type?: string; + unfurl_links?: boolean; + unfurl_media?: boolean; + upload?: boolean; + user?: string; + username?: string; + wibblr?: boolean; + x_files?: any[]; } export interface BotProfile { - app_id?: string; + app_id?: string; deleted?: boolean; - icons?: BotProfileIcons; - id?: string; - name?: string; + icons?: BotProfileIcons; + id?: string; + name?: string; team_id?: string; updated?: number; } @@ -865,208 +864,208 @@ export interface BotProfileIcons { } export interface Comment { - comment?: string; - created?: string; - display_as_bot?: boolean; - edit_link?: string; - editable?: boolean; - external_type?: string; - filetype?: string; - has_rich_preview?: boolean; - id?: string; - is_external?: boolean; - is_intro?: boolean; - is_public?: boolean; - is_starred?: boolean; - lines?: number; - lines_more?: number; - media_display_type?: string; - mimetype?: string; - mode?: string; - name?: string; - permalink?: string; - permalink_public?: boolean; - pretty_type?: string; - preview?: string; - preview_highlight?: string; + comment?: string; + created?: string; + display_as_bot?: boolean; + edit_link?: string; + editable?: boolean; + external_type?: string; + filetype?: string; + has_rich_preview?: boolean; + id?: string; + is_external?: boolean; + is_intro?: boolean; + is_public?: boolean; + is_starred?: boolean; + lines?: number; + lines_more?: number; + media_display_type?: string; + mimetype?: string; + mode?: string; + name?: string; + permalink?: string; + permalink_public?: boolean; + pretty_type?: string; + preview?: string; + preview_highlight?: string; preview_is_truncated?: boolean; - public_url_shared?: boolean; - size?: number; - timestamp?: string; - title?: string; - url_private?: string; + public_url_shared?: boolean; + size?: number; + timestamp?: string; + title?: string; + url_private?: string; url_private_download?: boolean; - user?: string; - username?: string; + user?: string; + username?: string; } export interface Edited { - ts?: string; + ts?: string; user?: string; } export interface MessageFile { - access?: string; - alt_txt?: string; - app_id?: string; - app_name?: string; - attachments?: any[]; - blocks?: any[]; - bot_id?: string; - can_toggle_canvas_lock?: boolean; - canvas_template_mode?: string; - cc?: any[]; - channel_actions_count?: number; - channel_actions_ts?: string; - channels?: any[]; - comments_count?: number; - converted_pdf?: string; - created?: number; - deanimate?: string; - deanimate_gif?: string; - display_as_bot?: boolean; - dm_mpdm_users_with_file_access?: any[]; - duration_ms?: number; - edit_link?: string; - edit_timestamp?: number; - editable?: boolean; - editor?: string; - editors?: any[]; - external_id?: string; - external_type?: string; - external_url?: string; - favorites?: any[]; - file_access?: string; - filetype?: string; - from?: any[]; - groups?: any[]; - has_more?: boolean; - has_more_shares?: boolean; - has_rich_preview?: boolean; - headers?: Headers; - hls?: string; - hls_embed?: string; - id?: string; - image_exif_rotation?: number; - ims?: any[]; - initial_comment?: InitialComment; - is_channel_space?: boolean; - is_external?: boolean; - is_public?: boolean; - is_starred?: boolean; - last_editor?: string; - last_read?: number; - lines?: number; - lines_more?: number; - linked_channel_id?: string; - list_limits?: ListLimits; - list_metadata?: ListMetadata; - media_display_type?: string; - media_progress?: MediaProgress; - mimetype?: string; - mode?: string; - mp4?: string; - mp4_low?: string; - name?: string; - non_owner_editable?: boolean; - num_stars?: number; - org_or_workspace_access?: string; - original_attachment_count?: number; - original_h?: string; - original_w?: string; - permalink?: string; - permalink_public?: string; - pinned_to?: any[]; - pjpeg?: string; - plain_text?: string; - pretty_type?: string; - preview?: string; - preview_highlight?: string; - preview_is_truncated?: boolean; - preview_plain_text?: string; + access?: string; + alt_txt?: string; + app_id?: string; + app_name?: string; + attachments?: any[]; + blocks?: any[]; + bot_id?: string; + can_toggle_canvas_lock?: boolean; + canvas_template_mode?: string; + cc?: any[]; + channel_actions_count?: number; + channel_actions_ts?: string; + channels?: any[]; + comments_count?: number; + converted_pdf?: string; + created?: number; + deanimate?: string; + deanimate_gif?: string; + display_as_bot?: boolean; + dm_mpdm_users_with_file_access?: any[]; + duration_ms?: number; + edit_link?: string; + edit_timestamp?: number; + editable?: boolean; + editor?: string; + editors?: any[]; + external_id?: string; + external_type?: string; + external_url?: string; + favorites?: any[]; + file_access?: string; + filetype?: string; + from?: any[]; + groups?: any[]; + has_more?: boolean; + has_more_shares?: boolean; + has_rich_preview?: boolean; + headers?: Headers; + hls?: string; + hls_embed?: string; + id?: string; + image_exif_rotation?: number; + ims?: any[]; + initial_comment?: InitialComment; + is_channel_space?: boolean; + is_external?: boolean; + is_public?: boolean; + is_starred?: boolean; + last_editor?: string; + last_read?: number; + lines?: number; + lines_more?: number; + linked_channel_id?: string; + list_limits?: ListLimits; + list_metadata?: ListMetadata; + media_display_type?: string; + media_progress?: MediaProgress; + mimetype?: string; + mode?: string; + mp4?: string; + mp4_low?: string; + name?: string; + non_owner_editable?: boolean; + num_stars?: number; + org_or_workspace_access?: string; + original_attachment_count?: number; + original_h?: string; + original_w?: string; + permalink?: string; + permalink_public?: string; + pinned_to?: any[]; + pjpeg?: string; + plain_text?: string; + pretty_type?: string; + preview?: string; + preview_highlight?: string; + preview_is_truncated?: boolean; + preview_plain_text?: string; private_channels_with_file_access_count?: number; - private_file_with_access_count?: number; - public_url_shared?: boolean; - quip_thread_id?: string; - reactions?: any[]; - saved?: Saved; - sent_to_self?: boolean; - shares?: ListShares; - show_badge?: boolean; - simplified_html?: string; - size?: number; - source_team?: string; - subject?: string; - subtype?: string; - team_pref_version_history_enabled?: boolean; - teams_shared_with?: any[]; - template_conversion_ts?: number; - template_description?: string; - template_icon?: string; - template_name?: string; - template_title?: string; - thumb_1024?: string; - thumb_1024_gif?: string; - thumb_1024_h?: string; - thumb_1024_w?: string; - thumb_160?: string; - thumb_160_gif?: string; - thumb_160_h?: string; - thumb_160_w?: string; - thumb_360?: string; - thumb_360_gif?: string; - thumb_360_h?: string; - thumb_360_w?: string; - thumb_480?: string; - thumb_480_gif?: string; - thumb_480_h?: string; - thumb_480_w?: string; - thumb_64?: string; - thumb_64_gif?: string; - thumb_64_h?: string; - thumb_64_w?: string; - thumb_720?: string; - thumb_720_gif?: string; - thumb_720_h?: string; - thumb_720_w?: string; - thumb_80?: string; - thumb_800?: string; - thumb_800_gif?: string; - thumb_800_h?: string; - thumb_800_w?: string; - thumb_80_gif?: string; - thumb_80_h?: string; - thumb_80_w?: string; - thumb_960?: string; - thumb_960_gif?: string; - thumb_960_h?: string; - thumb_960_w?: string; - thumb_gif?: string; - thumb_pdf?: string; - thumb_pdf_h?: string; - thumb_pdf_w?: string; - thumb_tiny?: string; - thumb_video?: string; - thumb_video_h?: number; - thumb_video_w?: number; - timestamp?: number; - title?: string; - title_blocks?: any[]; - to?: any[]; - transcription?: Transcription; - update_notification?: number; - updated?: number; - url_private?: string; - url_private_download?: string; - url_static_preview?: string; - user?: string; - user_team?: string; - username?: string; - vtt?: string; + private_file_with_access_count?: number; + public_url_shared?: boolean; + quip_thread_id?: string; + reactions?: any[]; + saved?: Saved; + sent_to_self?: boolean; + shares?: ListShares; + show_badge?: boolean; + simplified_html?: string; + size?: number; + source_team?: string; + subject?: string; + subtype?: string; + team_pref_version_history_enabled?: boolean; + teams_shared_with?: any[]; + template_conversion_ts?: number; + template_description?: string; + template_icon?: string; + template_name?: string; + template_title?: string; + thumb_1024?: string; + thumb_1024_gif?: string; + thumb_1024_h?: string; + thumb_1024_w?: string; + thumb_160?: string; + thumb_160_gif?: string; + thumb_160_h?: string; + thumb_160_w?: string; + thumb_360?: string; + thumb_360_gif?: string; + thumb_360_h?: string; + thumb_360_w?: string; + thumb_480?: string; + thumb_480_gif?: string; + thumb_480_h?: string; + thumb_480_w?: string; + thumb_64?: string; + thumb_64_gif?: string; + thumb_64_h?: string; + thumb_64_w?: string; + thumb_720?: string; + thumb_720_gif?: string; + thumb_720_h?: string; + thumb_720_w?: string; + thumb_80?: string; + thumb_800?: string; + thumb_800_gif?: string; + thumb_800_h?: string; + thumb_800_w?: string; + thumb_80_gif?: string; + thumb_80_h?: string; + thumb_80_w?: string; + thumb_960?: string; + thumb_960_gif?: string; + thumb_960_h?: string; + thumb_960_w?: string; + thumb_gif?: string; + thumb_pdf?: string; + thumb_pdf_h?: string; + thumb_pdf_w?: string; + thumb_tiny?: string; + thumb_video?: string; + thumb_video_h?: number; + thumb_video_w?: number; + timestamp?: number; + title?: string; + title_blocks?: any[]; + to?: any[]; + transcription?: Transcription; + update_notification?: number; + updated?: number; + url_private?: string; + url_private_download?: string; + url_static_preview?: string; + user?: string; + user_team?: string; + username?: string; + vtt?: string; } export interface MessageIcons { - emoji?: string; + emoji?: string; image_36?: string; image_48?: string; image_64?: string; @@ -1078,77 +1077,77 @@ export interface MessageMetadata { } export interface Room { - app_id?: string; - attached_file_ids?: any[]; - background_id?: string; - call_family?: string; - canvas_background?: string; - canvas_thread_ts?: string; - channels?: any[]; - created_by?: string; - date_end?: number; - date_start?: number; - display_id?: string; - external_unique_id?: string; - has_ended?: boolean; - id?: string; - is_dm_call?: boolean; - is_prewarmed?: boolean; - is_scheduled?: boolean; - media_backend_type?: string; - media_server?: string; - name?: string; - participant_history?: any[]; - participants?: any[]; - participants_camera_off?: any[]; - participants_camera_on?: any[]; + app_id?: string; + attached_file_ids?: any[]; + background_id?: string; + call_family?: string; + canvas_background?: string; + canvas_thread_ts?: string; + channels?: any[]; + created_by?: string; + date_end?: number; + date_start?: number; + display_id?: string; + external_unique_id?: string; + has_ended?: boolean; + id?: string; + is_dm_call?: boolean; + is_prewarmed?: boolean; + is_scheduled?: boolean; + media_backend_type?: string; + media_server?: string; + name?: string; + participant_history?: any[]; + participants?: any[]; + participants_camera_off?: any[]; + participants_camera_on?: any[]; participants_screenshare_off?: any[]; - participants_screenshare_on?: any[]; - thread_root_ts?: string; - was_accepted?: boolean; - was_missed?: boolean; - was_rejected?: boolean; + participants_screenshare_on?: any[]; + thread_root_ts?: string; + was_accepted?: boolean; + was_missed?: boolean; + was_rejected?: boolean; } export interface Root { - bot_id?: string; - bot_profile?: BotProfile; - edited?: Edited; - icons?: MessageIcons; - last_read?: string; - latest_reply?: string; - mrkdwn?: boolean; - no_notifications?: boolean; - parent_user_id?: string; - replies?: any[]; - reply_count?: number; - reply_users?: any[]; + bot_id?: string; + bot_profile?: BotProfile; + edited?: Edited; + icons?: MessageIcons; + last_read?: string; + latest_reply?: string; + mrkdwn?: boolean; + no_notifications?: boolean; + parent_user_id?: string; + replies?: any[]; + reply_count?: number; + reply_users?: any[]; reply_users_count?: number; - room?: Room; - subscribed?: boolean; - subtype?: string; - team?: string; - text?: string; - thread_ts?: string; - ts?: string; - type?: string; - unread_count?: number; - user?: string; - username?: string; + room?: Room; + subscribed?: boolean; + subtype?: string; + team?: string; + text?: string; + thread_ts?: string; + ts?: string; + type?: string; + unread_count?: number; + user?: string; + username?: string; } export interface ListRecordElement { - created_by?: string; - date_created?: number; - fields?: RecordField[]; - id?: string; - is_subscribed?: boolean; - list_id?: string; - platform_refs?: PlatformRefs; - position?: string; - saved?: Saved; - thread_ts?: string; - updated_by?: string; + created_by?: string; + date_created?: number; + fields?: RecordField[]; + id?: string; + is_subscribed?: boolean; + list_id?: string; + platform_refs?: PlatformRefs; + position?: string; + saved?: Saved; + thread_ts?: string; + updated_by?: string; updated_timestamp?: string; } @@ -1161,172 +1160,172 @@ export interface PlatformRefs { export interface MessageBlock { channel?: string; message?: Message; - team?: string; - ts?: string; + team?: string; + ts?: string; } export interface AttachmentMetadata { - extension?: string; - format?: string; - original_h?: number; - original_w?: number; - rotation?: number; - thumb_160?: boolean; + extension?: string; + format?: string; + original_h?: number; + original_w?: number; + rotation?: number; + thumb_160?: boolean; thumb_360_h?: number; thumb_360_w?: number; - thumb_64?: boolean; - thumb_80?: boolean; - thumb_tiny?: string; + thumb_64?: boolean; + thumb_80?: boolean; + thumb_tiny?: string; } export interface Preview { can_remove?: boolean; - icon_url?: string; - subtitle?: DescriptionElement; - title?: DescriptionElement; - type?: string; + icon_url?: string; + subtitle?: DescriptionElement; + title?: DescriptionElement; + type?: string; } export interface MatchBlock { - accessory?: Accessory; - alt_text?: string; - api_decoration_available?: boolean; - app_collaborators?: string[]; - app_id?: string; - author_name?: string; - block_id?: string; - bot_user_id?: string; - button_label?: string; - call?: Call; - call_id?: string; - description?: DescriptionElement; - developer_trace_id?: string; - dispatch_action?: boolean; - element?: Accessory; - elements?: Accessory[]; - external_id?: string; - fallback?: string; - fields?: DescriptionElement[]; - file?: FileElement; - file_id?: string; - function_trigger_id?: string; - hint?: DescriptionElement; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - is_animated?: boolean; - is_workflow_app?: boolean; - label?: DescriptionElement; - optional?: boolean; - owning_team_id?: string; - provider_icon_url?: string; - provider_name?: string; + accessory?: Accessory; + alt_text?: string; + api_decoration_available?: boolean; + app_collaborators?: string[]; + app_id?: string; + author_name?: string; + block_id?: string; + bot_user_id?: string; + button_label?: string; + call?: Call; + call_id?: string; + description?: DescriptionElement; + developer_trace_id?: string; + dispatch_action?: boolean; + element?: Accessory; + elements?: Accessory[]; + external_id?: string; + fallback?: string; + fields?: DescriptionElement[]; + file?: FileElement; + file_id?: string; + function_trigger_id?: string; + hint?: DescriptionElement; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + is_animated?: boolean; + is_workflow_app?: boolean; + label?: DescriptionElement; + optional?: boolean; + owning_team_id?: string; + provider_icon_url?: string; + provider_name?: string; sales_home_workflow_app_type?: number; - share_url?: string; - slack_file?: SlackFile; - source?: string; - text?: DescriptionElement; - thumbnail_url?: string; - title?: DescriptionElement; - title_url?: string; - trigger_subtype?: string; - trigger_type?: string; - type?: BlockType; - url?: string; - video_url?: string; - workflow_id?: string; + share_url?: string; + slack_file?: SlackFile; + source?: string; + text?: DescriptionElement; + thumbnail_url?: string; + title?: DescriptionElement; + title_url?: string; + trigger_subtype?: string; + trigger_type?: string; + type?: BlockType; + url?: string; + video_url?: string; + workflow_id?: string; } export interface Call { media_backend_type?: string; - v1?: V1; + v1?: V1; } export interface V1 { - active_participants?: Participant[]; - all_participants?: Participant[]; - app_icon_urls?: AppIconUrls; - app_id?: string; - channels?: string[]; - created_by?: string; - date_end?: number; - date_start?: number; + active_participants?: Participant[]; + all_participants?: Participant[]; + app_icon_urls?: AppIconUrls; + app_id?: string; + channels?: string[]; + created_by?: string; + date_end?: number; + date_start?: number; desktop_app_join_url?: string; - display_id?: string; - has_ended?: boolean; - id?: string; - is_dm_call?: boolean; - join_url?: string; - name?: string; - was_accepted?: boolean; - was_missed?: boolean; - was_rejected?: boolean; + display_id?: string; + has_ended?: boolean; + id?: string; + is_dm_call?: boolean; + join_url?: string; + name?: string; + was_accepted?: boolean; + was_missed?: boolean; + was_rejected?: boolean; } export interface Participant { - avatar_url?: string; + avatar_url?: string; display_name?: string; - external_id?: string; - slack_id?: string; + external_id?: string; + slack_id?: string; } export interface AppIconUrls { - image_1024?: string; - image_128?: string; - image_192?: string; - image_32?: string; - image_36?: string; - image_48?: string; - image_512?: string; - image_64?: string; - image_72?: string; - image_96?: string; + image_1024?: string; + image_128?: string; + image_192?: string; + image_32?: string; + image_36?: string; + image_48?: string; + image_512?: string; + image_64?: string; + image_72?: string; + image_96?: string; image_original?: string; } export interface Channel { - id?: string; - is_channel?: boolean; - is_ext_shared?: boolean; - is_file?: boolean; - is_group?: boolean; - is_im?: boolean; - is_mpim?: boolean; - is_org_shared?: boolean; + id?: string; + is_channel?: boolean; + is_ext_shared?: boolean; + is_file?: boolean; + is_group?: boolean; + is_im?: boolean; + is_mpim?: boolean; + is_org_shared?: boolean; is_pending_ext_shared?: boolean; - is_private?: boolean; - is_shared?: boolean; - name?: string; - name_normalized?: string; - pending_shared?: string[]; - user?: string; + is_private?: boolean; + is_shared?: boolean; + name?: string; + name_normalized?: string; + pending_shared?: string[]; + user?: string; } export interface Previous { attachments?: Attachment[]; - blocks?: MatchBlock[]; - iid?: string; - permalink?: string; - text?: string; - ts?: string; - type?: string; - user?: string; - username?: string; + blocks?: MatchBlock[]; + iid?: string; + permalink?: string; + text?: string; + ts?: string; + type?: string; + user?: string; + username?: string; } export interface Pagination { - first?: number; - last?: number; - page?: number; - page_count?: number; - per_page?: number; + first?: number; + last?: number; + page?: number; + page_count?: number; + per_page?: number; total_count?: number; } export interface Paging { count?: number; - page?: number; + page?: number; pages?: number; total?: number; } diff --git a/packages/web-api/src/types/response/StarsAddResponse.ts b/packages/web-api/src/types/response/StarsAddResponse.ts index 44712411b..c32e94c9a 100644 --- a/packages/web-api/src/types/response/StarsAddResponse.ts +++ b/packages/web-api/src/types/response/StarsAddResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type StarsAddResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/StarsListResponse.ts b/packages/web-api/src/types/response/StarsListResponse.ts index 8d466a9a0..45d532ea8 100644 --- a/packages/web-api/src/types/response/StarsListResponse.ts +++ b/packages/web-api/src/types/response/StarsListResponse.ts @@ -8,216 +8,216 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type StarsListResponse = WebAPICallResult & { - error?: string; - items?: Item[]; - needed?: string; - ok?: boolean; - paging?: Paging; + error?: string; + items?: Item[]; + needed?: string; + ok?: boolean; + paging?: Paging; provided?: string; }; export interface Item { - channel?: string; - comment?: Comment; + channel?: string; + comment?: Comment; date_create?: number; - file?: ItemFile; - message?: Message; - type?: string; + file?: ItemFile; + message?: Message; + type?: string; } export interface Comment { - channel?: string; - comment?: string; - created?: number; - id?: string; - is_intro?: boolean; + channel?: string; + comment?: string; + created?: number; + id?: string; + is_intro?: boolean; is_starred?: boolean; - num_stars?: number; - timestamp?: number; - user?: string; + num_stars?: number; + timestamp?: number; + user?: string; } export interface ItemFile { - alt_txt?: string; - app_id?: string; - app_name?: string; - bot_id?: string; - cc?: Cc[]; - channel_actions_count?: number; - channel_actions_ts?: string; - channels?: string[]; - comments_count?: number; - converted_pdf?: string; - created?: number; - deanimate?: string; - deanimate_gif?: string; - display_as_bot?: boolean; - duration_ms?: number; - edit_link?: string; - editable?: boolean; - editor?: string; - external_id?: string; - external_type?: string; - external_url?: string; - file_access?: string; - filetype?: string; - from?: Cc[]; - groups?: string[]; - has_more?: boolean; - has_more_shares?: boolean; - has_rich_preview?: boolean; - headers?: Headers; - hls?: string; - hls_embed?: string; - id?: string; - image_exif_rotation?: number; - ims?: string[]; - initial_comment?: Comment; - is_external?: boolean; - is_public?: boolean; - is_starred?: boolean; - last_editor?: string; - lines?: number; - lines_more?: number; - media_display_type?: string; - media_progress?: MediaProgress; - mimetype?: string; - mode?: string; - mp4?: string; - mp4_low?: string; - name?: string; - non_owner_editable?: boolean; - num_stars?: number; + alt_txt?: string; + app_id?: string; + app_name?: string; + bot_id?: string; + cc?: Cc[]; + channel_actions_count?: number; + channel_actions_ts?: string; + channels?: string[]; + comments_count?: number; + converted_pdf?: string; + created?: number; + deanimate?: string; + deanimate_gif?: string; + display_as_bot?: boolean; + duration_ms?: number; + edit_link?: string; + editable?: boolean; + editor?: string; + external_id?: string; + external_type?: string; + external_url?: string; + file_access?: string; + filetype?: string; + from?: Cc[]; + groups?: string[]; + has_more?: boolean; + has_more_shares?: boolean; + has_rich_preview?: boolean; + headers?: Headers; + hls?: string; + hls_embed?: string; + id?: string; + image_exif_rotation?: number; + ims?: string[]; + initial_comment?: Comment; + is_external?: boolean; + is_public?: boolean; + is_starred?: boolean; + last_editor?: string; + lines?: number; + lines_more?: number; + media_display_type?: string; + media_progress?: MediaProgress; + mimetype?: string; + mode?: string; + mp4?: string; + mp4_low?: string; + name?: string; + non_owner_editable?: boolean; + num_stars?: number; original_attachment_count?: number; - original_h?: string; - original_w?: string; - permalink?: string; - permalink_public?: string; - pinned_to?: string[]; - pjpeg?: string; - plain_text?: string; - pretty_type?: string; - preview?: string; - preview_highlight?: string; - preview_is_truncated?: boolean; - preview_plain_text?: string; - public_url_shared?: boolean; - reactions?: Reaction[]; - saved?: Saved; - sent_to_self?: boolean; - shares?: Shares; - simplified_html?: string; - size?: number; - source_team?: string; - subject?: string; - subtype?: string; - thumb_1024?: string; - thumb_1024_gif?: string; - thumb_1024_h?: string; - thumb_1024_w?: string; - thumb_160?: string; - thumb_160_gif?: string; - thumb_160_h?: string; - thumb_160_w?: string; - thumb_360?: string; - thumb_360_gif?: string; - thumb_360_h?: string; - thumb_360_w?: string; - thumb_480?: string; - thumb_480_gif?: string; - thumb_480_h?: string; - thumb_480_w?: string; - thumb_64?: string; - thumb_64_gif?: string; - thumb_64_h?: string; - thumb_64_w?: string; - thumb_720?: string; - thumb_720_gif?: string; - thumb_720_h?: string; - thumb_720_w?: string; - thumb_80?: string; - thumb_800?: string; - thumb_800_gif?: string; - thumb_800_h?: string; - thumb_800_w?: string; - thumb_80_gif?: string; - thumb_80_h?: string; - thumb_80_w?: string; - thumb_960?: string; - thumb_960_gif?: string; - thumb_960_h?: string; - thumb_960_w?: string; - thumb_gif?: string; - thumb_pdf?: string; - thumb_pdf_h?: string; - thumb_pdf_w?: string; - thumb_tiny?: string; - thumb_video?: string; - thumb_video_h?: number; - thumb_video_w?: number; - timestamp?: number; - title?: string; - to?: Cc[]; - transcription?: Transcription; - updated?: number; - url_private?: string; - url_private_download?: string; - user?: string; - user_team?: string; - username?: string; - vtt?: string; + original_h?: string; + original_w?: string; + permalink?: string; + permalink_public?: string; + pinned_to?: string[]; + pjpeg?: string; + plain_text?: string; + pretty_type?: string; + preview?: string; + preview_highlight?: string; + preview_is_truncated?: boolean; + preview_plain_text?: string; + public_url_shared?: boolean; + reactions?: Reaction[]; + saved?: Saved; + sent_to_self?: boolean; + shares?: Shares; + simplified_html?: string; + size?: number; + source_team?: string; + subject?: string; + subtype?: string; + thumb_1024?: string; + thumb_1024_gif?: string; + thumb_1024_h?: string; + thumb_1024_w?: string; + thumb_160?: string; + thumb_160_gif?: string; + thumb_160_h?: string; + thumb_160_w?: string; + thumb_360?: string; + thumb_360_gif?: string; + thumb_360_h?: string; + thumb_360_w?: string; + thumb_480?: string; + thumb_480_gif?: string; + thumb_480_h?: string; + thumb_480_w?: string; + thumb_64?: string; + thumb_64_gif?: string; + thumb_64_h?: string; + thumb_64_w?: string; + thumb_720?: string; + thumb_720_gif?: string; + thumb_720_h?: string; + thumb_720_w?: string; + thumb_80?: string; + thumb_800?: string; + thumb_800_gif?: string; + thumb_800_h?: string; + thumb_800_w?: string; + thumb_80_gif?: string; + thumb_80_h?: string; + thumb_80_w?: string; + thumb_960?: string; + thumb_960_gif?: string; + thumb_960_h?: string; + thumb_960_w?: string; + thumb_gif?: string; + thumb_pdf?: string; + thumb_pdf_h?: string; + thumb_pdf_w?: string; + thumb_tiny?: string; + thumb_video?: string; + thumb_video_h?: number; + thumb_video_w?: number; + timestamp?: number; + title?: string; + to?: Cc[]; + transcription?: Transcription; + updated?: number; + url_private?: string; + url_private_download?: string; + user?: string; + user_team?: string; + username?: string; + vtt?: string; } export interface Cc { - address?: string; - name?: string; + address?: string; + name?: string; original?: string; } export interface Headers { - date?: string; + date?: string; in_reply_to?: string; - message_id?: string; - reply_to?: string; + message_id?: string; + reply_to?: string; } export interface MediaProgress { - duration_ms?: number; + duration_ms?: number; max_offset_ms?: number; - offset_ms?: number; + offset_ms?: number; } export interface Reaction { count?: number; - name?: string; - url?: string; + name?: string; + url?: string; users?: string[]; } export interface Saved { date_completed?: number; - date_due?: number; - is_archived?: boolean; - state?: string; + date_due?: number; + is_archived?: boolean; + state?: string; } export interface Shares { private?: { [key: string]: Private[] }; - public?: { [key: string]: Private[] }; + public?: { [key: string]: Private[] }; } export interface Private { - channel_name?: string; - latest_reply?: string; - reply_count?: number; - reply_users?: string[]; + channel_name?: string; + latest_reply?: string; + reply_count?: number; + reply_users?: string[]; reply_users_count?: number; - share_user_id?: string; - team_id?: string; - thread_ts?: string; - ts?: string; + share_user_id?: string; + team_id?: string; + thread_ts?: string; + ts?: string; } export interface Transcription { @@ -226,321 +226,321 @@ export interface Transcription { } export interface Message { - attachments?: Attachment[]; - blocks?: Block[]; - bot_id?: string; - bot_profile?: BotProfile; - client_msg_id?: string; - display_as_bot?: boolean; - edited?: Edited; - files?: FileElement[]; - inviter?: string; - is_locked?: boolean; - is_starred?: boolean; - last_read?: string; - latest_reply?: string; - permalink?: string; - reactions?: Reaction[]; - reply_count?: number; - reply_users?: string[]; + attachments?: Attachment[]; + blocks?: Block[]; + bot_id?: string; + bot_profile?: BotProfile; + client_msg_id?: string; + display_as_bot?: boolean; + edited?: Edited; + files?: FileElement[]; + inviter?: string; + is_locked?: boolean; + is_starred?: boolean; + last_read?: string; + latest_reply?: string; + permalink?: string; + reactions?: Reaction[]; + reply_count?: number; + reply_users?: string[]; reply_users_count?: number; - subscribed?: boolean; - subtype?: string; - team?: string; - text?: string; - thread_ts?: string; - ts?: string; - type?: string; - upload?: boolean; - user?: string; - username?: string; + subscribed?: boolean; + subtype?: string; + team?: string; + text?: string; + thread_ts?: string; + ts?: string; + type?: string; + upload?: boolean; + user?: string; + username?: string; } export interface Attachment { - actions?: Action[]; - app_id?: string; - app_unfurl_url?: string; - author_icon?: string; - author_id?: string; - author_link?: string; - author_name?: string; - author_subname?: string; - blocks?: Block[]; - bot_id?: string; - callback_id?: string; - channel_id?: string; - channel_name?: string; - channel_team?: string; - color?: string; - fallback?: string; - fields?: Field[]; - filename?: string; - files?: FileElement[]; - footer?: string; - footer_icon?: string; - from_url?: string; - id?: number; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - indent?: boolean; - is_app_unfurl?: boolean; - is_msg_unfurl?: boolean; - is_reply_unfurl?: boolean; + actions?: Action[]; + app_id?: string; + app_unfurl_url?: string; + author_icon?: string; + author_id?: string; + author_link?: string; + author_name?: string; + author_subname?: string; + blocks?: Block[]; + bot_id?: string; + callback_id?: string; + channel_id?: string; + channel_name?: string; + channel_team?: string; + color?: string; + fallback?: string; + fields?: Field[]; + filename?: string; + files?: FileElement[]; + footer?: string; + footer_icon?: string; + from_url?: string; + id?: number; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + indent?: boolean; + is_app_unfurl?: boolean; + is_msg_unfurl?: boolean; + is_reply_unfurl?: boolean; is_thread_root_unfurl?: boolean; - metadata?: Metadata; - mimetype?: string; - mrkdwn_in?: string[]; - msg_subtype?: string; - original_url?: string; - pretext?: string; - preview?: Preview; - service_icon?: string; - service_name?: string; - service_url?: string; - size?: number; - text?: string; - thumb_height?: number; - thumb_url?: string; - thumb_width?: number; - title?: string; - title_link?: string; - ts?: string; - url?: string; - video_html?: string; - video_html_height?: number; - video_html_width?: number; - video_url?: string; + metadata?: Metadata; + mimetype?: string; + mrkdwn_in?: string[]; + msg_subtype?: string; + original_url?: string; + pretext?: string; + preview?: Preview; + service_icon?: string; + service_name?: string; + service_url?: string; + size?: number; + text?: string; + thumb_height?: number; + thumb_url?: string; + thumb_width?: number; + title?: string; + title_link?: string; + ts?: string; + url?: string; + video_html?: string; + video_html_height?: number; + video_html_width?: number; + video_url?: string; } export interface Action { - confirm?: ActionConfirm; - data_source?: string; - id?: string; + confirm?: ActionConfirm; + data_source?: string; + id?: string; min_query_length?: number; - name?: string; - option_groups?: ActionOptionGroup[]; - options?: SelectedOptionElement[]; + name?: string; + option_groups?: ActionOptionGroup[]; + options?: SelectedOptionElement[]; selected_options?: SelectedOptionElement[]; - style?: string; - text?: string; - type?: string; - url?: string; - value?: string; + style?: string; + text?: string; + type?: string; + url?: string; + value?: string; } export interface ActionConfirm { dismiss_text?: string; - ok_text?: string; - text?: string; - title?: string; + ok_text?: string; + text?: string; + title?: string; } export interface ActionOptionGroup { options?: SelectedOptionElement[]; - text?: string; + text?: string; } export interface SelectedOptionElement { - text?: string; + text?: string; value?: string; } export interface Block { - accessory?: Accessory; - alt_text?: string; + accessory?: Accessory; + alt_text?: string; api_decoration_available?: boolean; - app_collaborators?: string[]; - app_id?: string; - author_name?: string; - block_id?: string; - bot_user_id?: string; - button_label?: string; - call?: Call; - call_id?: string; - description?: Description; - dispatch_action?: boolean; - element?: Accessory; - elements?: Accessory[]; - external_id?: string; - fallback?: string; - fields?: Description[]; - file?: ItemFile; - file_id?: string; - function_trigger_id?: string; - hint?: Description; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - is_workflow_app?: boolean; - label?: Description; - optional?: boolean; - provider_icon_url?: string; - provider_name?: string; - source?: string; - text?: Description; - thumbnail_url?: string; - title?: Description; - title_url?: string; - type?: string; - url?: string; - video_url?: string; + app_collaborators?: string[]; + app_id?: string; + author_name?: string; + block_id?: string; + bot_user_id?: string; + button_label?: string; + call?: Call; + call_id?: string; + description?: Description; + dispatch_action?: boolean; + element?: Accessory; + elements?: Accessory[]; + external_id?: string; + fallback?: string; + fields?: Description[]; + file?: ItemFile; + file_id?: string; + function_trigger_id?: string; + hint?: Description; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + is_workflow_app?: boolean; + label?: Description; + optional?: boolean; + provider_icon_url?: string; + provider_name?: string; + source?: string; + text?: Description; + thumbnail_url?: string; + title?: Description; + title_url?: string; + type?: string; + url?: string; + video_url?: string; } export interface Accessory { - accessibility_label?: string; - action_id?: string; - alt_text?: string; - border?: number; - confirm?: AccessoryConfirm; + accessibility_label?: string; + action_id?: string; + alt_text?: string; + border?: number; + confirm?: AccessoryConfirm; default_to_current_conversation?: boolean; - elements?: AccessoryElement[]; - fallback?: string; - filter?: Filter; - focus_on_load?: boolean; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - indent?: number; - initial_channel?: string; - initial_channels?: string[]; - initial_conversation?: string; - initial_conversations?: string[]; - initial_date?: string; - initial_date_time?: number; - initial_option?: InitialOptionElement; - initial_options?: InitialOptionElement[]; - initial_time?: string; - initial_user?: string; - initial_users?: string[]; - max_selected_items?: number; - min_query_length?: number; - offset?: number; - option_groups?: AccessoryOptionGroup[]; - options?: InitialOptionElement[]; - placeholder?: Description; - response_url_enabled?: boolean; - style?: string; - text?: Description; - timezone?: string; - type?: string; - url?: string; - value?: string; + elements?: AccessoryElement[]; + fallback?: string; + filter?: Filter; + focus_on_load?: boolean; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + indent?: number; + initial_channel?: string; + initial_channels?: string[]; + initial_conversation?: string; + initial_conversations?: string[]; + initial_date?: string; + initial_date_time?: number; + initial_option?: InitialOptionElement; + initial_options?: InitialOptionElement[]; + initial_time?: string; + initial_user?: string; + initial_users?: string[]; + max_selected_items?: number; + min_query_length?: number; + offset?: number; + option_groups?: AccessoryOptionGroup[]; + options?: InitialOptionElement[]; + placeholder?: Description; + response_url_enabled?: boolean; + style?: string; + text?: Description; + timezone?: string; + type?: string; + url?: string; + value?: string; } export interface AccessoryConfirm { confirm?: Description; - deny?: Description; - style?: string; - text?: Description; - title?: Description; + deny?: Description; + style?: string; + text?: Description; + title?: Description; } export interface Description { - emoji?: boolean; - text?: string; - type?: string; + emoji?: boolean; + text?: string; + type?: string; verbatim?: boolean; } export interface AccessoryElement { - border?: number; + border?: number; elements?: PurpleElement[]; - indent?: number; - offset?: number; - style?: string; - type?: string; + indent?: number; + offset?: number; + style?: string; + type?: string; } export interface PurpleElement { - channel_id?: string; - name?: string; - range?: string; - skin_tone?: number; - style?: Style; - team_id?: string; - text?: string; - timestamp?: string; - type?: string; - unicode?: string; - url?: string; - user_id?: string; + channel_id?: string; + name?: string; + range?: string; + skin_tone?: number; + style?: Style; + team_id?: string; + text?: string; + timestamp?: string; + type?: string; + unicode?: string; + url?: string; + user_id?: string; usergroup_id?: string; - value?: string; + value?: string; } export interface Style { - bold?: boolean; - code?: boolean; + bold?: boolean; + code?: boolean; italic?: boolean; strike?: boolean; } export interface Filter { - exclude_bot_users?: boolean; + exclude_bot_users?: boolean; exclude_external_shared_channels?: boolean; - include?: string[]; + include?: string[]; } export interface InitialOptionElement { description?: Description; - text?: Description; - url?: string; - value?: string; + text?: Description; + url?: string; + value?: string; } export interface AccessoryOptionGroup { - label?: Description; + label?: Description; options?: InitialOptionElement[]; } export interface Call { media_backend_type?: string; - v1?: V1; + v1?: V1; } export interface V1 { - active_participants?: Participant[]; - all_participants?: Participant[]; - app_icon_urls?: AppIconUrls; - app_id?: string; - channels?: string[]; - created_by?: string; - date_end?: number; - date_start?: number; + active_participants?: Participant[]; + all_participants?: Participant[]; + app_icon_urls?: AppIconUrls; + app_id?: string; + channels?: string[]; + created_by?: string; + date_end?: number; + date_start?: number; desktop_app_join_url?: string; - display_id?: string; - has_ended?: boolean; - id?: string; - is_dm_call?: boolean; - join_url?: string; - name?: string; - was_accepted?: boolean; - was_missed?: boolean; - was_rejected?: boolean; + display_id?: string; + has_ended?: boolean; + id?: string; + is_dm_call?: boolean; + join_url?: string; + name?: string; + was_accepted?: boolean; + was_missed?: boolean; + was_rejected?: boolean; } export interface Participant { - avatar_url?: string; + avatar_url?: string; display_name?: string; - external_id?: string; - slack_id?: string; + external_id?: string; + slack_id?: string; } export interface AppIconUrls { - image_1024?: string; - image_128?: string; - image_192?: string; - image_32?: string; - image_36?: string; - image_48?: string; - image_512?: string; - image_64?: string; - image_72?: string; - image_96?: string; + image_1024?: string; + image_128?: string; + image_192?: string; + image_32?: string; + image_36?: string; + image_48?: string; + image_512?: string; + image_64?: string; + image_72?: string; + image_96?: string; image_original?: string; } @@ -551,164 +551,164 @@ export interface Field { } export interface FileElement { - alt_txt?: string; - app_id?: string; - app_name?: string; - bot_id?: string; - cc?: Cc[]; - channel_actions_count?: number; - channel_actions_ts?: string; - channels?: string[]; - comments_count?: number; - converted_pdf?: string; - created?: number; - deanimate?: string; - deanimate_gif?: string; - display_as_bot?: boolean; - duration_ms?: number; - edit_link?: string; - editable?: boolean; - editor?: string; - external_id?: string; - external_type?: string; - external_url?: string; - file_access?: string; - filetype?: string; - from?: Cc[]; - groups?: string[]; - has_more?: boolean; - has_more_shares?: boolean; - has_rich_preview?: boolean; - headers?: Headers; - hls?: string; - hls_embed?: string; - id?: string; - image_exif_rotation?: number; - ims?: string[]; - initial_comment?: Comment; - is_external?: boolean; - is_public?: boolean; - is_starred?: boolean; - last_editor?: string; - lines?: number; - lines_more?: number; - media_display_type?: string; - media_progress?: MediaProgress; - mimetype?: string; - mode?: string; - mp4?: string; - mp4_low?: string; - name?: string; - non_owner_editable?: boolean; - num_stars?: number; + alt_txt?: string; + app_id?: string; + app_name?: string; + bot_id?: string; + cc?: Cc[]; + channel_actions_count?: number; + channel_actions_ts?: string; + channels?: string[]; + comments_count?: number; + converted_pdf?: string; + created?: number; + deanimate?: string; + deanimate_gif?: string; + display_as_bot?: boolean; + duration_ms?: number; + edit_link?: string; + editable?: boolean; + editor?: string; + external_id?: string; + external_type?: string; + external_url?: string; + file_access?: string; + filetype?: string; + from?: Cc[]; + groups?: string[]; + has_more?: boolean; + has_more_shares?: boolean; + has_rich_preview?: boolean; + headers?: Headers; + hls?: string; + hls_embed?: string; + id?: string; + image_exif_rotation?: number; + ims?: string[]; + initial_comment?: Comment; + is_external?: boolean; + is_public?: boolean; + is_starred?: boolean; + last_editor?: string; + lines?: number; + lines_more?: number; + media_display_type?: string; + media_progress?: MediaProgress; + mimetype?: string; + mode?: string; + mp4?: string; + mp4_low?: string; + name?: string; + non_owner_editable?: boolean; + num_stars?: number; original_attachment_count?: number; - original_h?: string; - original_w?: string; - permalink?: string; - permalink_public?: string; - pinned_to?: string[]; - pjpeg?: string; - plain_text?: string; - pretty_type?: string; - preview?: string; - preview_highlight?: string; - preview_is_truncated?: boolean; - preview_plain_text?: string; - public_url_shared?: boolean; - reactions?: Reaction[]; - saved?: Saved; - sent_to_self?: boolean; - shares?: Shares; - simplified_html?: string; - size?: number; - source_team?: string; - subject?: string; - subtype?: string; - thumb_1024?: string; - thumb_1024_gif?: string; - thumb_1024_h?: string; - thumb_1024_w?: string; - thumb_160?: string; - thumb_160_gif?: string; - thumb_160_h?: string; - thumb_160_w?: string; - thumb_360?: string; - thumb_360_gif?: string; - thumb_360_h?: string; - thumb_360_w?: string; - thumb_480?: string; - thumb_480_gif?: string; - thumb_480_h?: string; - thumb_480_w?: string; - thumb_64?: string; - thumb_64_gif?: string; - thumb_64_h?: string; - thumb_64_w?: string; - thumb_720?: string; - thumb_720_gif?: string; - thumb_720_h?: string; - thumb_720_w?: string; - thumb_80?: string; - thumb_800?: string; - thumb_800_gif?: string; - thumb_800_h?: string; - thumb_800_w?: string; - thumb_80_gif?: string; - thumb_80_h?: string; - thumb_80_w?: string; - thumb_960?: string; - thumb_960_gif?: string; - thumb_960_h?: string; - thumb_960_w?: string; - thumb_gif?: string; - thumb_pdf?: string; - thumb_pdf_h?: string; - thumb_pdf_w?: string; - thumb_tiny?: string; - thumb_video?: string; - thumb_video_h?: number; - thumb_video_w?: number; - timestamp?: number; - title?: string; - to?: Cc[]; - transcription?: Transcription; - updated?: number; - url_private?: string; - url_private_download?: string; - user?: string; - user_team?: string; - username?: string; - vtt?: string; + original_h?: string; + original_w?: string; + permalink?: string; + permalink_public?: string; + pinned_to?: string[]; + pjpeg?: string; + plain_text?: string; + pretty_type?: string; + preview?: string; + preview_highlight?: string; + preview_is_truncated?: boolean; + preview_plain_text?: string; + public_url_shared?: boolean; + reactions?: Reaction[]; + saved?: Saved; + sent_to_self?: boolean; + shares?: Shares; + simplified_html?: string; + size?: number; + source_team?: string; + subject?: string; + subtype?: string; + thumb_1024?: string; + thumb_1024_gif?: string; + thumb_1024_h?: string; + thumb_1024_w?: string; + thumb_160?: string; + thumb_160_gif?: string; + thumb_160_h?: string; + thumb_160_w?: string; + thumb_360?: string; + thumb_360_gif?: string; + thumb_360_h?: string; + thumb_360_w?: string; + thumb_480?: string; + thumb_480_gif?: string; + thumb_480_h?: string; + thumb_480_w?: string; + thumb_64?: string; + thumb_64_gif?: string; + thumb_64_h?: string; + thumb_64_w?: string; + thumb_720?: string; + thumb_720_gif?: string; + thumb_720_h?: string; + thumb_720_w?: string; + thumb_80?: string; + thumb_800?: string; + thumb_800_gif?: string; + thumb_800_h?: string; + thumb_800_w?: string; + thumb_80_gif?: string; + thumb_80_h?: string; + thumb_80_w?: string; + thumb_960?: string; + thumb_960_gif?: string; + thumb_960_h?: string; + thumb_960_w?: string; + thumb_gif?: string; + thumb_pdf?: string; + thumb_pdf_h?: string; + thumb_pdf_w?: string; + thumb_tiny?: string; + thumb_video?: string; + thumb_video_h?: number; + thumb_video_w?: number; + timestamp?: number; + title?: string; + to?: Cc[]; + transcription?: Transcription; + updated?: number; + url_private?: string; + url_private_download?: string; + user?: string; + user_team?: string; + username?: string; + vtt?: string; } export interface Metadata { - extension?: string; - format?: string; - original_h?: number; - original_w?: number; - rotation?: number; - thumb_160?: boolean; + extension?: string; + format?: string; + original_h?: number; + original_w?: number; + rotation?: number; + thumb_160?: boolean; thumb_360_h?: number; thumb_360_w?: number; - thumb_64?: boolean; - thumb_80?: boolean; - thumb_tiny?: string; + thumb_64?: boolean; + thumb_80?: boolean; + thumb_tiny?: string; } export interface Preview { can_remove?: boolean; - icon_url?: string; - subtitle?: Description; - title?: Description; - type?: string; + icon_url?: string; + subtitle?: Description; + title?: Description; + type?: string; } export interface BotProfile { - app_id?: string; + app_id?: string; deleted?: boolean; - icons?: Icons; - id?: string; - name?: string; + icons?: Icons; + id?: string; + name?: string; team_id?: string; updated?: number; } @@ -720,14 +720,14 @@ export interface Icons { } export interface Edited { - ts?: string; + ts?: string; user?: string; } export interface Paging { - page?: number; - pages?: number; + page?: number; + pages?: number; per_page?: number; - spill?: number; - total?: number; + spill?: number; + total?: number; } diff --git a/packages/web-api/src/types/response/StarsRemoveResponse.ts b/packages/web-api/src/types/response/StarsRemoveResponse.ts index d22d82a0d..73fb46223 100644 --- a/packages/web-api/src/types/response/StarsRemoveResponse.ts +++ b/packages/web-api/src/types/response/StarsRemoveResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type StarsRemoveResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/TeamAccessLogsResponse.ts b/packages/web-api/src/types/response/TeamAccessLogsResponse.ts index 7312ef0d1..6a6c9de7c 100644 --- a/packages/web-api/src/types/response/TeamAccessLogsResponse.ts +++ b/packages/web-api/src/types/response/TeamAccessLogsResponse.ts @@ -8,33 +8,33 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type TeamAccessLogsResponse = WebAPICallResult & { - error?: string; - logins?: Login[]; - needed?: string; - ok?: boolean; - paging?: Paging; - provided?: string; + error?: string; + logins?: Login[]; + needed?: string; + ok?: boolean; + paging?: Paging; + provided?: string; response_metadata?: ResponseMetadata; }; export interface Login { - count?: number; - country?: string; + count?: number; + country?: string; date_first?: number; - date_last?: number; - ip?: string; - isp?: string; - region?: string; + date_last?: number; + ip?: string; + isp?: string; + region?: string; user_agent?: string; - user_id?: string; - username?: string; + user_id?: string; + username?: string; } export interface Paging { count?: number; - page?: number; + page?: number; pages?: number; total?: number; } diff --git a/packages/web-api/src/types/response/TeamBillableInfoResponse.ts b/packages/web-api/src/types/response/TeamBillableInfoResponse.ts index 30c6fb668..bf8a5839a 100644 --- a/packages/web-api/src/types/response/TeamBillableInfoResponse.ts +++ b/packages/web-api/src/types/response/TeamBillableInfoResponse.ts @@ -8,13 +8,13 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type TeamBillableInfoResponse = WebAPICallResult & { - billable_info?: { [key: string]: BillableInfo }; - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + billable_info?: { [key: string]: BillableInfo }; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; diff --git a/packages/web-api/src/types/response/TeamBillingInfoResponse.ts b/packages/web-api/src/types/response/TeamBillingInfoResponse.ts index 55262c442..c8ae0e599 100644 --- a/packages/web-api/src/types/response/TeamBillingInfoResponse.ts +++ b/packages/web-api/src/types/response/TeamBillingInfoResponse.ts @@ -8,11 +8,11 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type TeamBillingInfoResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - plan?: string; + error?: string; + needed?: string; + ok?: boolean; + plan?: string; provided?: string; }; diff --git a/packages/web-api/src/types/response/TeamExternalTeamsDisconnectResponse.ts b/packages/web-api/src/types/response/TeamExternalTeamsDisconnectResponse.ts index f06e85cb4..2318bf471 100644 --- a/packages/web-api/src/types/response/TeamExternalTeamsDisconnectResponse.ts +++ b/packages/web-api/src/types/response/TeamExternalTeamsDisconnectResponse.ts @@ -8,12 +8,12 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type TeamExternalTeamsDisconnectResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; diff --git a/packages/web-api/src/types/response/TeamExternalTeamsListResponse.ts b/packages/web-api/src/types/response/TeamExternalTeamsListResponse.ts index 43ab136fb..e53d21f7d 100644 --- a/packages/web-api/src/types/response/TeamExternalTeamsListResponse.ts +++ b/packages/web-api/src/types/response/TeamExternalTeamsListResponse.ts @@ -8,124 +8,124 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type TeamExternalTeamsListResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - organizations?: Organization[]; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + organizations?: Organization[]; + provided?: string; response_metadata?: ResponseMetadata; - total_count?: number; + total_count?: number; }; export interface Organization { - canvas?: Canvas; - connected_workspaces?: ConnectedWorkspace[]; - connection_status?: string; - im_channel_count?: number; - is_sponsored?: boolean; + canvas?: Canvas; + connected_workspaces?: ConnectedWorkspace[]; + connection_status?: string; + im_channel_count?: number; + is_sponsored?: boolean; last_active_timestamp?: number; - lists?: Canvas; - mpim_channel_count?: number; + lists?: Canvas; + mpim_channel_count?: number; private_channel_count?: number; - public_channel_count?: number; - slack_connect_prefs?: SlackConnectPrefs; - team_domain?: string; - team_id?: string; - team_name?: string; + public_channel_count?: number; + slack_connect_prefs?: SlackConnectPrefs; + team_domain?: string; + team_id?: string; + team_name?: string; } export interface Canvas { ownership_details?: OwnershipDetail[]; - total_count?: number; + total_count?: number; } export interface OwnershipDetail { - count?: number; + count?: number; team_id?: string; } export interface ConnectedWorkspace { - workspace_id?: string; + workspace_id?: string; workspace_name?: string; } export interface SlackConnectPrefs { - accept_sc_invites?: AcceptScInvites; - allow_sc_file_uploads?: AllowScFileUploads; - allowed_canvas_sharing?: AllowScFileUploads; - allowed_list_sharing?: AllowScFileUploads; - allowed_workspaces?: AllowedWorkspaces; - approved_org_info?: AllowScFileUploads; + accept_sc_invites?: AcceptScInvites; + allow_sc_file_uploads?: AllowScFileUploads; + allowed_canvas_sharing?: AllowScFileUploads; + allowed_list_sharing?: AllowScFileUploads; + allowed_workspaces?: AllowedWorkspaces; + approved_org_info?: AllowScFileUploads; away_team_sc_invite_permissions?: AllowedWorkspaces; away_team_sc_invite_require_2fa?: AllowScFileUploads; - external_awareness_context_bar?: AllowScFileUploads; - profile_visibility?: AllowScFileUploads; - require_sc_channel_for_sc_dm?: AllowScFileUploads; - sc_channel_limited_access?: AllowScFileUploads; - sc_mpdm_to_private?: ScMpdmToPrivate; + external_awareness_context_bar?: AllowScFileUploads; + profile_visibility?: AllowScFileUploads; + require_sc_channel_for_sc_dm?: AllowScFileUploads; + sc_channel_limited_access?: AllowScFileUploads; + sc_mpdm_to_private?: ScMpdmToPrivate; shared_channel_invite_requested?: SharedChannelInviteRequested; } export interface AcceptScInvites { accept_in_workspace_ids?: string[]; - accept_private?: boolean; - actor?: string; - date_update?: number; - invalid_workspace_ids?: string[]; - source?: string; - type?: string; - use_allowed_workspaces?: boolean; + accept_private?: boolean; + actor?: string; + date_update?: number; + invalid_workspace_ids?: string[]; + source?: string; + type?: string; + use_allowed_workspaces?: boolean; } export interface AllowScFileUploads { - actor?: string; + actor?: string; approval_type?: string; - date_update?: number; - source?: string; - type?: boolean | string; - value?: boolean; + date_update?: number; + source?: string; + type?: boolean | string; + value?: boolean; } export interface AllowedWorkspaces { - actor?: string; + actor?: string; date_update?: number; - source?: string; - team_ids?: string[]; - type?: string; + source?: string; + team_ids?: string[]; + type?: string; } export interface ScMpdmToPrivate { accept_in_workspace_id?: string; - actor?: string; - date_update?: number; - invalid_workspace_ids?: string[]; - source?: string; - type?: string; + actor?: string; + date_update?: number; + invalid_workspace_ids?: string[]; + source?: string; + type?: string; } export interface SharedChannelInviteRequested { - actor?: string; + actor?: string; approval_destination?: ApprovalDestination; - date_update?: number; - enabled?: boolean; - source?: string; - usergroup_exclude?: UsergroupClude; - usergroup_include?: UsergroupClude; + date_update?: number; + enabled?: boolean; + source?: string; + usergroup_exclude?: UsergroupClude; + usergroup_include?: UsergroupClude; } export interface ApprovalDestination { all_who_can_manage_shared_channels?: boolean; - channel_id?: string; + channel_id?: string; } export interface UsergroupClude { - id?: string; + id?: string; team_id?: string; } export interface ResponseMetadata { - messages?: string[]; + messages?: string[]; next_cursor?: string; } diff --git a/packages/web-api/src/types/response/TeamInfoResponse.ts b/packages/web-api/src/types/response/TeamInfoResponse.ts index fc93fd118..dc05a3992 100644 --- a/packages/web-api/src/types/response/TeamInfoResponse.ts +++ b/packages/web-api/src/types/response/TeamInfoResponse.ts @@ -8,39 +8,39 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type TeamInfoResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; - team?: Team; + team?: Team; }; export interface Team { - avatar_base_url?: string; - discoverable?: string; - domain?: string; - email_domain?: string; - enterprise_domain?: string; - enterprise_id?: string; - enterprise_name?: string; - icon?: Icon; - id?: string; - is_verified?: boolean; + avatar_base_url?: string; + discoverable?: string; + domain?: string; + email_domain?: string; + enterprise_domain?: string; + enterprise_id?: string; + enterprise_name?: string; + icon?: Icon; + id?: string; + is_verified?: boolean; lob_sales_home_enabled?: boolean; - name?: string; - url?: string; + name?: string; + url?: string; } export interface Icon { - image_102?: string; - image_132?: string; - image_230?: string; - image_34?: string; - image_44?: string; - image_68?: string; - image_88?: string; - image_default?: boolean; + image_102?: string; + image_132?: string; + image_230?: string; + image_34?: string; + image_44?: string; + image_68?: string; + image_88?: string; + image_default?: boolean; image_original?: string; } diff --git a/packages/web-api/src/types/response/TeamIntegrationLogsResponse.ts b/packages/web-api/src/types/response/TeamIntegrationLogsResponse.ts index f5cf5ffb3..06cdc0379 100644 --- a/packages/web-api/src/types/response/TeamIntegrationLogsResponse.ts +++ b/packages/web-api/src/types/response/TeamIntegrationLogsResponse.ts @@ -8,38 +8,38 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type TeamIntegrationLogsResponse = WebAPICallResult & { - error?: string; - logs?: Log[]; - needed?: string; - ok?: boolean; - paging?: Paging; + error?: string; + logs?: Log[]; + needed?: string; + ok?: boolean; + paging?: Paging; provided?: string; }; export interface Log { - app_id?: string; - app_type?: string; - change_type?: string; - channel?: string; - date?: string; - reason?: string; - resolution?: string; - rss_feed?: boolean; + app_id?: string; + app_type?: string; + change_type?: string; + channel?: string; + date?: string; + reason?: string; + resolution?: string; + rss_feed?: boolean; rss_feed_change_type?: string; - rss_feed_title?: string; - rss_feed_url?: string; - scope?: string; - service_id?: number; - service_type?: string; - user_id?: string; - user_name?: string; + rss_feed_title?: string; + rss_feed_url?: string; + scope?: string; + service_id?: number; + service_type?: string; + user_id?: string; + user_name?: string; } export interface Paging { count?: number; - page?: number; + page?: number; pages?: number; total?: number; } diff --git a/packages/web-api/src/types/response/TeamPreferencesListResponse.ts b/packages/web-api/src/types/response/TeamPreferencesListResponse.ts index 064b55782..ea7e4d885 100644 --- a/packages/web-api/src/types/response/TeamPreferencesListResponse.ts +++ b/packages/web-api/src/types/response/TeamPreferencesListResponse.ts @@ -8,15 +8,15 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type TeamPreferencesListResponse = WebAPICallResult & { allow_message_deletion?: boolean; - disable_file_uploads?: string; - display_real_names?: boolean; - error?: string; - msg_edit_window_mins?: number; - needed?: string; - ok?: boolean; - provided?: string; - who_can_post_general?: string; + disable_file_uploads?: string; + display_real_names?: boolean; + error?: string; + msg_edit_window_mins?: number; + needed?: string; + ok?: boolean; + provided?: string; + who_can_post_general?: string; }; diff --git a/packages/web-api/src/types/response/TeamProfileGetResponse.ts b/packages/web-api/src/types/response/TeamProfileGetResponse.ts index f61d615df..7a3d02b5a 100644 --- a/packages/web-api/src/types/response/TeamProfileGetResponse.ts +++ b/packages/web-api/src/types/response/TeamProfileGetResponse.ts @@ -8,51 +8,51 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type TeamProfileGetResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - profile?: Profile; + error?: string; + needed?: string; + ok?: boolean; + profile?: Profile; provided?: string; }; export interface Profile { - fields?: Field[]; + fields?: Field[]; sections?: Section[]; } export interface Field { - field_name?: string; - hint?: string; - id?: string; - is_hidden?: boolean; - is_inverse?: boolean; - label?: string; - options?: Options; - ordering?: number; - permissions?: Permissions; + field_name?: string; + hint?: string; + id?: string; + is_hidden?: boolean; + is_inverse?: boolean; + label?: string; + options?: Options; + ordering?: number; + permissions?: Permissions; possible_values?: string[]; - section_id?: string; - type?: string; + section_id?: string; + type?: string; } export interface Options { is_protected?: boolean; - is_scim?: boolean; + is_scim?: boolean; } export interface Permissions { - api?: string[]; + api?: string[]; scim?: boolean; - ui?: boolean; + ui?: boolean; } export interface Section { - id?: string; - is_hidden?: boolean; - label?: string; - order?: number; + id?: string; + is_hidden?: boolean; + label?: string; + order?: number; section_type?: string; - team_id?: string; + team_id?: string; } diff --git a/packages/web-api/src/types/response/ToolingTokensRotateResponse.ts b/packages/web-api/src/types/response/ToolingTokensRotateResponse.ts index 94e5b79a1..711d25020 100644 --- a/packages/web-api/src/types/response/ToolingTokensRotateResponse.ts +++ b/packages/web-api/src/types/response/ToolingTokensRotateResponse.ts @@ -8,19 +8,19 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ToolingTokensRotateResponse = WebAPICallResult & { - error?: string; - exp?: number; - iat?: number; - needed?: string; - ok?: boolean; - provided?: string; - refresh_token?: string; + error?: string; + exp?: number; + iat?: number; + needed?: string; + ok?: boolean; + provided?: string; + refresh_token?: string; response_metadata?: ResponseMetadata; - team_id?: string; - token?: string; - user_id?: string; + team_id?: string; + token?: string; + user_id?: string; }; export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/UsergroupsCreateResponse.ts b/packages/web-api/src/types/response/UsergroupsCreateResponse.ts index 3f77cf8a5..da8f8cc62 100644 --- a/packages/web-api/src/types/response/UsergroupsCreateResponse.ts +++ b/packages/web-api/src/types/response/UsergroupsCreateResponse.ts @@ -8,37 +8,37 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type UsergroupsCreateResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; usergroup?: Usergroup; }; export interface Usergroup { - auto_provision?: boolean; - channel_count?: number; - created_by?: string; - date_create?: number; - date_delete?: number; - date_update?: number; - description?: string; + auto_provision?: boolean; + channel_count?: number; + created_by?: string; + date_create?: number; + date_delete?: number; + date_update?: number; + description?: string; enterprise_subteam_id?: string; - handle?: string; - id?: string; - is_external?: boolean; - is_subteam?: boolean; - is_usergroup?: boolean; - name?: string; - prefs?: Prefs; - team_id?: string; - updated_by?: string; - users?: string[]; + handle?: string; + id?: string; + is_external?: boolean; + is_subteam?: boolean; + is_usergroup?: boolean; + name?: string; + prefs?: Prefs; + team_id?: string; + updated_by?: string; + users?: string[]; } export interface Prefs { channels?: string[]; - groups?: string[]; + groups?: string[]; } diff --git a/packages/web-api/src/types/response/UsergroupsDisableResponse.ts b/packages/web-api/src/types/response/UsergroupsDisableResponse.ts index 29c7a2e09..001e20ea0 100644 --- a/packages/web-api/src/types/response/UsergroupsDisableResponse.ts +++ b/packages/web-api/src/types/response/UsergroupsDisableResponse.ts @@ -8,38 +8,38 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type UsergroupsDisableResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; usergroup?: Usergroup; }; export interface Usergroup { - auto_provision?: boolean; - channel_count?: number; - created_by?: string; - date_create?: number; - date_delete?: number; - date_update?: number; - deleted_by?: string; - description?: string; + auto_provision?: boolean; + channel_count?: number; + created_by?: string; + date_create?: number; + date_delete?: number; + date_update?: number; + deleted_by?: string; + description?: string; enterprise_subteam_id?: string; - handle?: string; - id?: string; - is_external?: boolean; - is_subteam?: boolean; - is_usergroup?: boolean; - name?: string; - prefs?: Prefs; - team_id?: string; - updated_by?: string; - users?: string[]; + handle?: string; + id?: string; + is_external?: boolean; + is_subteam?: boolean; + is_usergroup?: boolean; + name?: string; + prefs?: Prefs; + team_id?: string; + updated_by?: string; + users?: string[]; } export interface Prefs { channels?: string[]; - groups?: string[]; + groups?: string[]; } diff --git a/packages/web-api/src/types/response/UsergroupsEnableResponse.ts b/packages/web-api/src/types/response/UsergroupsEnableResponse.ts index 9ebabcac4..6e45241d8 100644 --- a/packages/web-api/src/types/response/UsergroupsEnableResponse.ts +++ b/packages/web-api/src/types/response/UsergroupsEnableResponse.ts @@ -8,37 +8,37 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type UsergroupsEnableResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; usergroup?: Usergroup; }; export interface Usergroup { - auto_provision?: boolean; - channel_count?: number; - created_by?: string; - date_create?: number; - date_delete?: number; - date_update?: number; - description?: string; + auto_provision?: boolean; + channel_count?: number; + created_by?: string; + date_create?: number; + date_delete?: number; + date_update?: number; + description?: string; enterprise_subteam_id?: string; - handle?: string; - id?: string; - is_external?: boolean; - is_subteam?: boolean; - is_usergroup?: boolean; - name?: string; - prefs?: Prefs; - team_id?: string; - updated_by?: string; - users?: string[]; + handle?: string; + id?: string; + is_external?: boolean; + is_subteam?: boolean; + is_usergroup?: boolean; + name?: string; + prefs?: Prefs; + team_id?: string; + updated_by?: string; + users?: string[]; } export interface Prefs { channels?: string[]; - groups?: string[]; + groups?: string[]; } diff --git a/packages/web-api/src/types/response/UsergroupsListResponse.ts b/packages/web-api/src/types/response/UsergroupsListResponse.ts index ed962117f..6a87313bc 100644 --- a/packages/web-api/src/types/response/UsergroupsListResponse.ts +++ b/packages/web-api/src/types/response/UsergroupsListResponse.ts @@ -8,38 +8,38 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type UsergroupsListResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; usergroups?: Usergroup[]; }; export interface Usergroup { - auto_provision?: boolean; - channel_count?: number; - created_by?: string; - date_create?: number; - date_delete?: number; - date_update?: number; - description?: string; + auto_provision?: boolean; + channel_count?: number; + created_by?: string; + date_create?: number; + date_delete?: number; + date_update?: number; + description?: string; enterprise_subteam_id?: string; - handle?: string; - id?: string; - is_external?: boolean; - is_subteam?: boolean; - is_usergroup?: boolean; - name?: string; - prefs?: Prefs; - team_id?: string; - updated_by?: string; - user_count?: number; - users?: string[]; + handle?: string; + id?: string; + is_external?: boolean; + is_subteam?: boolean; + is_usergroup?: boolean; + name?: string; + prefs?: Prefs; + team_id?: string; + updated_by?: string; + user_count?: number; + users?: string[]; } export interface Prefs { channels?: string[]; - groups?: string[]; + groups?: string[]; } diff --git a/packages/web-api/src/types/response/UsergroupsUpdateResponse.ts b/packages/web-api/src/types/response/UsergroupsUpdateResponse.ts index cfa03043d..3fc507ca5 100644 --- a/packages/web-api/src/types/response/UsergroupsUpdateResponse.ts +++ b/packages/web-api/src/types/response/UsergroupsUpdateResponse.ts @@ -8,37 +8,37 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type UsergroupsUpdateResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; usergroup?: Usergroup; }; export interface Usergroup { - auto_provision?: boolean; - channel_count?: number; - created_by?: string; - date_create?: number; - date_delete?: number; - date_update?: number; - description?: string; + auto_provision?: boolean; + channel_count?: number; + created_by?: string; + date_create?: number; + date_delete?: number; + date_update?: number; + description?: string; enterprise_subteam_id?: string; - handle?: string; - id?: string; - is_external?: boolean; - is_subteam?: boolean; - is_usergroup?: boolean; - name?: string; - prefs?: Prefs; - team_id?: string; - updated_by?: string; - users?: string[]; + handle?: string; + id?: string; + is_external?: boolean; + is_subteam?: boolean; + is_usergroup?: boolean; + name?: string; + prefs?: Prefs; + team_id?: string; + updated_by?: string; + users?: string[]; } export interface Prefs { channels?: string[]; - groups?: string[]; + groups?: string[]; } diff --git a/packages/web-api/src/types/response/UsergroupsUsersListResponse.ts b/packages/web-api/src/types/response/UsergroupsUsersListResponse.ts index 33a66d2f7..32a9d0ab5 100644 --- a/packages/web-api/src/types/response/UsergroupsUsersListResponse.ts +++ b/packages/web-api/src/types/response/UsergroupsUsersListResponse.ts @@ -8,11 +8,11 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type UsergroupsUsersListResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; - users?: string[]; + users?: string[]; }; diff --git a/packages/web-api/src/types/response/UsergroupsUsersUpdateResponse.ts b/packages/web-api/src/types/response/UsergroupsUsersUpdateResponse.ts index 33899c869..542a81a6b 100644 --- a/packages/web-api/src/types/response/UsergroupsUsersUpdateResponse.ts +++ b/packages/web-api/src/types/response/UsergroupsUsersUpdateResponse.ts @@ -8,37 +8,37 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type UsergroupsUsersUpdateResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; usergroup?: Usergroup; }; export interface Usergroup { - auto_provision?: boolean; - channel_count?: number; - created_by?: string; - date_create?: number; - date_delete?: number; - date_update?: number; - description?: string; + auto_provision?: boolean; + channel_count?: number; + created_by?: string; + date_create?: number; + date_delete?: number; + date_update?: number; + description?: string; enterprise_subteam_id?: string; - handle?: string; - id?: string; - is_external?: boolean; - is_subteam?: boolean; - is_usergroup?: boolean; - name?: string; - prefs?: Prefs; - team_id?: string; - updated_by?: string; - users?: string[]; + handle?: string; + id?: string; + is_external?: boolean; + is_subteam?: boolean; + is_usergroup?: boolean; + name?: string; + prefs?: Prefs; + team_id?: string; + updated_by?: string; + users?: string[]; } export interface Prefs { channels?: string[]; - groups?: string[]; + groups?: string[]; } diff --git a/packages/web-api/src/types/response/UsersConversationsResponse.ts b/packages/web-api/src/types/response/UsersConversationsResponse.ts index 027795d79..143906ed8 100644 --- a/packages/web-api/src/types/response/UsersConversationsResponse.ts +++ b/packages/web-api/src/types/response/UsersConversationsResponse.ts @@ -8,69 +8,69 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type UsersConversationsResponse = WebAPICallResult & { - channels?: Channel[]; - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + channels?: Channel[]; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; export interface Channel { - context_team_id?: string; - conversation_host_id?: string; - created?: number; - creator?: string; - enterprise_id?: string; - id?: string; - internal_team_ids?: string[]; - is_archived?: boolean; - is_channel?: boolean; - is_ext_shared?: boolean; - is_general?: boolean; - is_global_shared?: boolean; - is_group?: boolean; - is_im?: boolean; - is_moved?: number; - is_mpim?: boolean; - is_open?: boolean; - is_org_default?: boolean; - is_org_mandatory?: boolean; - is_org_shared?: boolean; - is_pending_ext_shared?: boolean; - is_private?: boolean; - is_shared?: boolean; - is_user_deleted?: boolean; - last_read?: string; - name?: string; - name_normalized?: string; - parent_conversation?: string; + context_team_id?: string; + conversation_host_id?: string; + created?: number; + creator?: string; + enterprise_id?: string; + id?: string; + internal_team_ids?: string[]; + is_archived?: boolean; + is_channel?: boolean; + is_ext_shared?: boolean; + is_general?: boolean; + is_global_shared?: boolean; + is_group?: boolean; + is_im?: boolean; + is_moved?: number; + is_mpim?: boolean; + is_open?: boolean; + is_org_default?: boolean; + is_org_mandatory?: boolean; + is_org_shared?: boolean; + is_pending_ext_shared?: boolean; + is_private?: boolean; + is_shared?: boolean; + is_user_deleted?: boolean; + last_read?: string; + name?: string; + name_normalized?: string; + parent_conversation?: string; pending_connected_team_ids?: string[]; - pending_shared?: string[]; - previous_names?: string[]; - priority?: number; - properties?: Properties; - purpose?: Purpose; - shared_team_ids?: string[]; - topic?: Purpose; - unlinked?: number; - updated?: number; - user?: string; + pending_shared?: string[]; + previous_names?: string[]; + priority?: number; + properties?: Properties; + purpose?: Purpose; + shared_team_ids?: string[]; + topic?: Purpose; + unlinked?: number; + updated?: number; + user?: string; } export interface Properties { - canvas?: Canvas; - huddles_restricted?: boolean; + canvas?: Canvas; + huddles_restricted?: boolean; posting_restricted_to?: PostingRestrictedTo; - tabs?: Tab[]; + tabs?: Tab[]; threads_restricted_to?: ThreadsRestrictedTo; } export interface Canvas { - file_id?: string; - is_empty?: boolean; + file_id?: string; + is_empty?: boolean; quip_thread_id?: string; } @@ -80,9 +80,9 @@ export interface PostingRestrictedTo { } export interface Tab { - id?: string; + id?: string; label?: string; - type?: string; + type?: string; } export interface ThreadsRestrictedTo { @@ -90,9 +90,9 @@ export interface ThreadsRestrictedTo { } export interface Purpose { - creator?: string; + creator?: string; last_set?: number; - value?: string; + value?: string; } export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/UsersDeletePhotoResponse.ts b/packages/web-api/src/types/response/UsersDeletePhotoResponse.ts index 3917e1297..ce940b023 100644 --- a/packages/web-api/src/types/response/UsersDeletePhotoResponse.ts +++ b/packages/web-api/src/types/response/UsersDeletePhotoResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type UsersDeletePhotoResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/UsersDiscoverableContactsLookupResponse.ts b/packages/web-api/src/types/response/UsersDiscoverableContactsLookupResponse.ts index 8806cf76b..6ea47e1bf 100644 --- a/packages/web-api/src/types/response/UsersDiscoverableContactsLookupResponse.ts +++ b/packages/web-api/src/types/response/UsersDiscoverableContactsLookupResponse.ts @@ -8,13 +8,13 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type UsersDiscoverableContactsLookupResponse = WebAPICallResult & { - error?: string; - is_discoverable?: boolean; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + is_discoverable?: boolean; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; diff --git a/packages/web-api/src/types/response/UsersGetPresenceResponse.ts b/packages/web-api/src/types/response/UsersGetPresenceResponse.ts index cd675caeb..9ccd29150 100644 --- a/packages/web-api/src/types/response/UsersGetPresenceResponse.ts +++ b/packages/web-api/src/types/response/UsersGetPresenceResponse.ts @@ -8,17 +8,17 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type UsersGetPresenceResponse = WebAPICallResult & { - auto_away?: boolean; + auto_away?: boolean; connection_count?: number; - error?: string; - last_activity?: number; - manual_away?: boolean; - needed?: string; - ok?: boolean; - online?: boolean; - presence?: string; - provided?: string; - warning?: string; + error?: string; + last_activity?: number; + manual_away?: boolean; + needed?: string; + ok?: boolean; + online?: boolean; + presence?: string; + provided?: string; + warning?: string; }; diff --git a/packages/web-api/src/types/response/UsersIdentityResponse.ts b/packages/web-api/src/types/response/UsersIdentityResponse.ts index d8c54e65e..f476cfe37 100644 --- a/packages/web-api/src/types/response/UsersIdentityResponse.ts +++ b/packages/web-api/src/types/response/UsersIdentityResponse.ts @@ -8,30 +8,30 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type UsersIdentityResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; - team?: Team; - user?: User; - warning?: string; + team?: Team; + user?: User; + warning?: string; }; export interface Team { - id?: string; + id?: string; name?: string; } export interface User { - email?: string; - id?: string; + email?: string; + id?: string; image_192?: string; - image_24?: string; - image_32?: string; - image_48?: string; + image_24?: string; + image_32?: string; + image_48?: string; image_512?: string; - image_72?: string; - name?: string; + image_72?: string; + name?: string; } diff --git a/packages/web-api/src/types/response/UsersInfoResponse.ts b/packages/web-api/src/types/response/UsersInfoResponse.ts index 6ddd53c88..a95de8fa2 100644 --- a/packages/web-api/src/types/response/UsersInfoResponse.ts +++ b/packages/web-api/src/types/response/UsersInfoResponse.ts @@ -8,94 +8,94 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type UsersInfoResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; - user?: User; + user?: User; }; export interface User { - color?: string; - deleted?: boolean; - enterprise_user?: EnterpriseUser; - has_2fa?: boolean; - id?: string; - is_admin?: boolean; - is_app_user?: boolean; - is_bot?: boolean; - is_connector_bot?: boolean; - is_email_confirmed?: boolean; - is_invited_user?: boolean; - is_owner?: boolean; - is_primary_owner?: boolean; - is_restricted?: boolean; - is_stranger?: boolean; - is_ultra_restricted?: boolean; - is_workflow_bot?: boolean; - locale?: string; - name?: string; - profile?: Profile; - real_name?: string; - team_id?: string; - tz?: string; - tz_label?: string; - tz_offset?: number; - updated?: number; + color?: string; + deleted?: boolean; + enterprise_user?: EnterpriseUser; + has_2fa?: boolean; + id?: string; + is_admin?: boolean; + is_app_user?: boolean; + is_bot?: boolean; + is_connector_bot?: boolean; + is_email_confirmed?: boolean; + is_invited_user?: boolean; + is_owner?: boolean; + is_primary_owner?: boolean; + is_restricted?: boolean; + is_stranger?: boolean; + is_ultra_restricted?: boolean; + is_workflow_bot?: boolean; + locale?: string; + name?: string; + profile?: Profile; + real_name?: string; + team_id?: string; + tz?: string; + tz_label?: string; + tz_offset?: number; + updated?: number; who_can_share_contact_card?: string; } export interface EnterpriseUser { - enterprise_id?: string; + enterprise_id?: string; enterprise_name?: string; - id?: string; - is_admin?: boolean; - is_owner?: boolean; - teams?: string[]; + id?: string; + is_admin?: boolean; + is_owner?: boolean; + teams?: string[]; } export interface Profile { - always_active?: boolean; - api_app_id?: string; - avatar_hash?: string; - bot_id?: string; - display_name?: string; - display_name_normalized?: string; - email?: string; - first_name?: string; - guest_invited_by?: string; - huddle_state?: string; + always_active?: boolean; + api_app_id?: string; + avatar_hash?: string; + bot_id?: string; + display_name?: string; + display_name_normalized?: string; + email?: string; + first_name?: string; + guest_invited_by?: string; + huddle_state?: string; huddle_state_expiration_ts?: number; - image_1024?: string; - image_192?: string; - image_24?: string; - image_32?: string; - image_48?: string; - image_512?: string; - image_72?: string; - image_original?: string; - is_custom_image?: boolean; - last_name?: string; - phone?: string; - pronouns?: string; - real_name?: string; - real_name_normalized?: string; - skype?: string; - status_emoji?: string; - status_emoji_display_info?: StatusEmojiDisplayInfo[]; - status_emoji_url?: string; - status_expiration?: number; - status_text?: string; - status_text_canonical?: string; - team?: string; - title?: string; + image_1024?: string; + image_192?: string; + image_24?: string; + image_32?: string; + image_48?: string; + image_512?: string; + image_72?: string; + image_original?: string; + is_custom_image?: boolean; + last_name?: string; + phone?: string; + pronouns?: string; + real_name?: string; + real_name_normalized?: string; + skype?: string; + status_emoji?: string; + status_emoji_display_info?: StatusEmojiDisplayInfo[]; + status_emoji_url?: string; + status_expiration?: number; + status_text?: string; + status_text_canonical?: string; + team?: string; + title?: string; } export interface StatusEmojiDisplayInfo { display_alias?: string; - display_url?: string; - emoji_name?: string; - unicode?: string; + display_url?: string; + emoji_name?: string; + unicode?: string; } diff --git a/packages/web-api/src/types/response/UsersListResponse.ts b/packages/web-api/src/types/response/UsersListResponse.ts index bb17aa38f..5365ed57e 100644 --- a/packages/web-api/src/types/response/UsersListResponse.ts +++ b/packages/web-api/src/types/response/UsersListResponse.ts @@ -8,105 +8,104 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type UsersListResponse = WebAPICallResult & { - arg?: string; - cache_ts?: number; - error?: string; - members?: Member[]; - needed?: string; - offset?: string; - ok?: boolean; - provided?: string; + arg?: string; + cache_ts?: number; + error?: string; + members?: Member[]; + needed?: string; + offset?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; }; export interface Member { - color?: string; - deleted?: boolean; - enterprise_user?: EnterpriseUser; - has_2fa?: boolean; - id?: string; - is_admin?: boolean; - is_app_user?: boolean; - is_bot?: boolean; - is_connector_bot?: boolean; - is_email_confirmed?: boolean; - is_invited_user?: boolean; - is_owner?: boolean; - is_primary_owner?: boolean; - is_restricted?: boolean; - is_ultra_restricted?: boolean; - is_workflow_bot?: boolean; - locale?: string; - name?: string; - profile?: Profile; - real_name?: string; - team_id?: string; - two_factor_type?: string; - tz?: string; - tz_label?: string; - tz_offset?: number; - updated?: number; + color?: string; + deleted?: boolean; + enterprise_user?: EnterpriseUser; + has_2fa?: boolean; + id?: string; + is_admin?: boolean; + is_app_user?: boolean; + is_bot?: boolean; + is_connector_bot?: boolean; + is_email_confirmed?: boolean; + is_invited_user?: boolean; + is_owner?: boolean; + is_primary_owner?: boolean; + is_restricted?: boolean; + is_ultra_restricted?: boolean; + is_workflow_bot?: boolean; + locale?: string; + name?: string; + profile?: Profile; + real_name?: string; + team_id?: string; + two_factor_type?: string; + tz?: string; + tz_label?: string; + tz_offset?: number; + updated?: number; who_can_share_contact_card?: string; } export interface EnterpriseUser { - enterprise_id?: string; - enterprise_name?: string; - id?: string; - is_admin?: boolean; - is_owner?: boolean; + enterprise_id?: string; + enterprise_name?: string; + id?: string; + is_admin?: boolean; + is_owner?: boolean; is_primary_owner?: boolean; - teams?: string[]; + teams?: string[]; } export interface Profile { - always_active?: boolean; - api_app_id?: string; - avatar_hash?: string; - bot_id?: string; - display_name?: string; - display_name_normalized?: string; - email?: string; - fields?: Fields; - first_name?: string; - guest_expiration_ts?: number; - guest_invited_by?: string; - huddle_state?: string; + always_active?: boolean; + api_app_id?: string; + avatar_hash?: string; + bot_id?: string; + display_name?: string; + display_name_normalized?: string; + email?: string; + fields?: Fields; + first_name?: string; + guest_expiration_ts?: number; + guest_invited_by?: string; + huddle_state?: string; huddle_state_expiration_ts?: number; - image_1024?: string; - image_192?: string; - image_24?: string; - image_32?: string; - image_48?: string; - image_512?: string; - image_72?: string; - image_original?: string; - is_custom_image?: boolean; - last_name?: string; - phone?: string; - pronouns?: string; - real_name?: string; - real_name_normalized?: string; - skype?: string; - status_emoji?: string; - status_emoji_display_info?: StatusEmojiDisplayInfo[]; - status_expiration?: number; - status_text?: string; - status_text_canonical?: string; - team?: string; - title?: string; + image_1024?: string; + image_192?: string; + image_24?: string; + image_32?: string; + image_48?: string; + image_512?: string; + image_72?: string; + image_original?: string; + is_custom_image?: boolean; + last_name?: string; + phone?: string; + pronouns?: string; + real_name?: string; + real_name_normalized?: string; + skype?: string; + status_emoji?: string; + status_emoji_display_info?: StatusEmojiDisplayInfo[]; + status_expiration?: number; + status_text?: string; + status_text_canonical?: string; + team?: string; + title?: string; } -export interface Fields { -} +export type Fields = {}; export interface StatusEmojiDisplayInfo { display_alias?: string; - display_url?: string; - emoji_name?: string; - unicode?: string; + display_url?: string; + emoji_name?: string; + unicode?: string; } export interface ResponseMetadata { diff --git a/packages/web-api/src/types/response/UsersLookupByEmailResponse.ts b/packages/web-api/src/types/response/UsersLookupByEmailResponse.ts index 9f036eb34..fb1829ba4 100644 --- a/packages/web-api/src/types/response/UsersLookupByEmailResponse.ts +++ b/packages/web-api/src/types/response/UsersLookupByEmailResponse.ts @@ -8,14 +8,14 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type UsersLookupByEmailResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; - user?: User; + user?: User; }; export interface ResponseMetadata { @@ -23,67 +23,67 @@ export interface ResponseMetadata { } export interface User { - color?: string; - deleted?: boolean; - has_2fa?: boolean; - id?: string; - is_admin?: boolean; - is_app_user?: boolean; - is_bot?: boolean; - is_email_confirmed?: boolean; - is_invited_user?: boolean; - is_owner?: boolean; - is_primary_owner?: boolean; - is_restricted?: boolean; - is_ultra_restricted?: boolean; - name?: string; - profile?: Profile; - real_name?: string; - team_id?: string; - tz?: string; - tz_label?: string; - tz_offset?: number; - updated?: number; + color?: string; + deleted?: boolean; + has_2fa?: boolean; + id?: string; + is_admin?: boolean; + is_app_user?: boolean; + is_bot?: boolean; + is_email_confirmed?: boolean; + is_invited_user?: boolean; + is_owner?: boolean; + is_primary_owner?: boolean; + is_restricted?: boolean; + is_ultra_restricted?: boolean; + name?: string; + profile?: Profile; + real_name?: string; + team_id?: string; + tz?: string; + tz_label?: string; + tz_offset?: number; + updated?: number; who_can_share_contact_card?: string; } export interface Profile { - avatar_hash?: string; - display_name?: string; - display_name_normalized?: string; - email?: string; - first_name?: string; - guest_invited_by?: string; - huddle_state?: string; + avatar_hash?: string; + display_name?: string; + display_name_normalized?: string; + email?: string; + first_name?: string; + guest_invited_by?: string; + huddle_state?: string; huddle_state_expiration_ts?: number; - image_1024?: string; - image_192?: string; - image_24?: string; - image_32?: string; - image_48?: string; - image_512?: string; - image_72?: string; - image_original?: string; - is_custom_image?: boolean; - last_name?: string; - phone?: string; - pronouns?: string; - real_name?: string; - real_name_normalized?: string; - skype?: string; - status_emoji?: string; - status_emoji_display_info?: StatusEmojiDisplayInfo[]; - status_emoji_url?: string; - status_expiration?: number; - status_text?: string; - status_text_canonical?: string; - team?: string; - title?: string; + image_1024?: string; + image_192?: string; + image_24?: string; + image_32?: string; + image_48?: string; + image_512?: string; + image_72?: string; + image_original?: string; + is_custom_image?: boolean; + last_name?: string; + phone?: string; + pronouns?: string; + real_name?: string; + real_name_normalized?: string; + skype?: string; + status_emoji?: string; + status_emoji_display_info?: StatusEmojiDisplayInfo[]; + status_emoji_url?: string; + status_expiration?: number; + status_text?: string; + status_text_canonical?: string; + team?: string; + title?: string; } export interface StatusEmojiDisplayInfo { display_alias?: string; - display_url?: string; - emoji_name?: string; - unicode?: string; + display_url?: string; + emoji_name?: string; + unicode?: string; } diff --git a/packages/web-api/src/types/response/UsersProfileGetResponse.ts b/packages/web-api/src/types/response/UsersProfileGetResponse.ts index 51e1f88e6..957231a74 100644 --- a/packages/web-api/src/types/response/UsersProfileGetResponse.ts +++ b/packages/web-api/src/types/response/UsersProfileGetResponse.ts @@ -8,57 +8,57 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type UsersProfileGetResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - profile?: Profile; + error?: string; + needed?: string; + ok?: boolean; + profile?: Profile; provided?: string; }; export interface Profile { - avatar_hash?: string; - display_name?: string; - display_name_normalized?: string; - email?: string; - fields?: { [key: string]: Field }; - first_name?: string; - huddle_state?: string; + avatar_hash?: string; + display_name?: string; + display_name_normalized?: string; + email?: string; + fields?: { [key: string]: Field }; + first_name?: string; + huddle_state?: string; huddle_state_expiration_ts?: number; - image_1024?: string; - image_192?: string; - image_24?: string; - image_32?: string; - image_48?: string; - image_512?: string; - image_72?: string; - image_original?: string; - is_custom_image?: boolean; - last_name?: string; - phone?: string; - pronouns?: string; - real_name?: string; - real_name_normalized?: string; - skype?: string; - status_emoji?: string; - status_emoji_display_info?: StatusEmojiDisplayInfo[]; - status_emoji_url?: string; - status_expiration?: number; - status_text?: string; - status_text_canonical?: string; - title?: string; + image_1024?: string; + image_192?: string; + image_24?: string; + image_32?: string; + image_48?: string; + image_512?: string; + image_72?: string; + image_original?: string; + is_custom_image?: boolean; + last_name?: string; + phone?: string; + pronouns?: string; + real_name?: string; + real_name_normalized?: string; + skype?: string; + status_emoji?: string; + status_emoji_display_info?: StatusEmojiDisplayInfo[]; + status_emoji_url?: string; + status_expiration?: number; + status_text?: string; + status_text_canonical?: string; + title?: string; } export interface Field { - alt?: string; + alt?: string; label?: string; value?: string; } export interface StatusEmojiDisplayInfo { display_alias?: string; - display_url?: string; - emoji_name?: string; - unicode?: string; + display_url?: string; + emoji_name?: string; + unicode?: string; } diff --git a/packages/web-api/src/types/response/UsersProfileSetResponse.ts b/packages/web-api/src/types/response/UsersProfileSetResponse.ts index df307449e..ba65ece3a 100644 --- a/packages/web-api/src/types/response/UsersProfileSetResponse.ts +++ b/packages/web-api/src/types/response/UsersProfileSetResponse.ts @@ -8,57 +8,57 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type UsersProfileSetResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - profile?: Profile; + error?: string; + needed?: string; + ok?: boolean; + profile?: Profile; provided?: string; username?: string; }; export interface Profile { - avatar_hash?: string; - display_name?: string; - display_name_normalized?: string; - email?: string; - fields?: { [key: string]: Field }; - first_name?: string; - huddle_state?: string; + avatar_hash?: string; + display_name?: string; + display_name_normalized?: string; + email?: string; + fields?: { [key: string]: Field }; + first_name?: string; + huddle_state?: string; huddle_state_expiration_ts?: number; - image_1024?: string; - image_192?: string; - image_24?: string; - image_32?: string; - image_48?: string; - image_512?: string; - image_72?: string; - image_original?: string; - is_custom_image?: boolean; - last_name?: string; - phone?: string; - pronouns?: string; - real_name?: string; - real_name_normalized?: string; - skype?: string; - status_emoji?: string; - status_emoji_display_info?: StatusEmojiDisplayInfo[]; - status_emoji_url?: string; - status_expiration?: number; - status_text?: string; - status_text_canonical?: string; - title?: string; + image_1024?: string; + image_192?: string; + image_24?: string; + image_32?: string; + image_48?: string; + image_512?: string; + image_72?: string; + image_original?: string; + is_custom_image?: boolean; + last_name?: string; + phone?: string; + pronouns?: string; + real_name?: string; + real_name_normalized?: string; + skype?: string; + status_emoji?: string; + status_emoji_display_info?: StatusEmojiDisplayInfo[]; + status_emoji_url?: string; + status_expiration?: number; + status_text?: string; + status_text_canonical?: string; + title?: string; } export interface Field { - alt?: string; + alt?: string; value?: string; } export interface StatusEmojiDisplayInfo { display_alias?: string; - display_url?: string; - emoji_name?: string; - unicode?: string; + display_url?: string; + emoji_name?: string; + unicode?: string; } diff --git a/packages/web-api/src/types/response/UsersSetActiveResponse.ts b/packages/web-api/src/types/response/UsersSetActiveResponse.ts index 19d0e8a2a..d3252658d 100644 --- a/packages/web-api/src/types/response/UsersSetActiveResponse.ts +++ b/packages/web-api/src/types/response/UsersSetActiveResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type UsersSetActiveResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/UsersSetPhotoResponse.ts b/packages/web-api/src/types/response/UsersSetPhotoResponse.ts index 87d31637e..1c273a88c 100644 --- a/packages/web-api/src/types/response/UsersSetPhotoResponse.ts +++ b/packages/web-api/src/types/response/UsersSetPhotoResponse.ts @@ -8,23 +8,23 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type UsersSetPhotoResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - profile?: Profile; + error?: string; + needed?: string; + ok?: boolean; + profile?: Profile; provided?: string; }; export interface Profile { - avatar_hash?: string; - image_1024?: string; - image_192?: string; - image_24?: string; - image_32?: string; - image_48?: string; - image_512?: string; - image_72?: string; + avatar_hash?: string; + image_1024?: string; + image_192?: string; + image_24?: string; + image_32?: string; + image_48?: string; + image_512?: string; + image_72?: string; image_original?: string; } diff --git a/packages/web-api/src/types/response/UsersSetPresenceResponse.ts b/packages/web-api/src/types/response/UsersSetPresenceResponse.ts index 011735983..2bd4955e2 100644 --- a/packages/web-api/src/types/response/UsersSetPresenceResponse.ts +++ b/packages/web-api/src/types/response/UsersSetPresenceResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type UsersSetPresenceResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/ViewsOpenResponse.ts b/packages/web-api/src/types/response/ViewsOpenResponse.ts index 2a965f6d9..813ebe4d5 100644 --- a/packages/web-api/src/types/response/ViewsOpenResponse.ts +++ b/packages/web-api/src/types/response/ViewsOpenResponse.ts @@ -8,15 +8,15 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ViewsOpenResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; - view?: View; - warning?: string; + view?: View; + warning?: string; }; export interface ResponseMetadata { @@ -24,78 +24,78 @@ export interface ResponseMetadata { } export interface View { - app_id?: string; + app_id?: string; app_installed_team_id?: string; - blocks?: Block[]; - bot_id?: string; - callback_id?: string; - clear_on_close?: boolean; - close?: Close; - external_id?: string; - hash?: string; - id?: string; - notify_on_close?: boolean; - previous_view_id?: string; - private_metadata?: string; - root_view_id?: string; - state?: State; - submit?: Close; - submit_disabled?: boolean; - team_id?: string; - title?: Close; - type?: string; + blocks?: Block[]; + bot_id?: string; + callback_id?: string; + clear_on_close?: boolean; + close?: Close; + external_id?: string; + hash?: string; + id?: string; + notify_on_close?: boolean; + previous_view_id?: string; + private_metadata?: string; + root_view_id?: string; + state?: State; + submit?: Close; + submit_disabled?: boolean; + team_id?: string; + title?: Close; + type?: string; } export interface Block { - accessory?: Accessory; - alt_text?: string; - author_name?: string; - block_id?: string; - description?: Close; - dispatch_action?: boolean; - element?: PurpleElement; - elements?: StickyElement[]; - fallback?: string; - fields?: Close[]; - hint?: Close; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - is_animated?: boolean; - label?: Close; - optional?: boolean; + accessory?: Accessory; + alt_text?: string; + author_name?: string; + block_id?: string; + description?: Close; + dispatch_action?: boolean; + element?: PurpleElement; + elements?: StickyElement[]; + fallback?: string; + fields?: Close[]; + hint?: Close; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + is_animated?: boolean; + label?: Close; + optional?: boolean; provider_icon_url?: string; - provider_name?: string; - slack_file?: SlackFile; - text?: Close; - thumbnail_url?: string; - title?: Close; - title_url?: string; - type?: string; - video_url?: string; + provider_name?: string; + slack_file?: SlackFile; + text?: Close; + thumbnail_url?: string; + title?: Close; + title_url?: string; + type?: string; + video_url?: string; } export interface Accessory { - alt_text?: string; - fallback?: string; - image_bytes?: number; + alt_text?: string; + fallback?: string; + image_bytes?: number; image_height?: number; - image_url?: string; - image_width?: number; - slack_file?: SlackFile; - type?: string; + image_url?: string; + image_width?: number; + slack_file?: SlackFile; + type?: string; } export interface SlackFile { - id?: string; + id?: string; url?: string; } export interface Close { - emoji?: boolean; - text?: string; - type?: CloseType; + emoji?: boolean; + text?: string; + type?: CloseType; verbatim?: boolean; } @@ -106,50 +106,50 @@ export enum CloseType { } export interface PurpleElement { - accessibility_label?: string; - action_id?: string; - alt_text?: string; - confirm?: Confirm; + accessibility_label?: string; + action_id?: string; + alt_text?: string; + confirm?: Confirm; default_to_current_conversation?: boolean; - dispatch_action_config?: DispatchActionConfig; - fallback?: string; - filter?: Filter; - focus_on_load?: boolean; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - initial_channel?: string; - initial_conversation?: string; - initial_date?: string; - initial_date_time?: number; - initial_option?: Option; - initial_time?: string; - initial_user?: string; - initial_value?: InitialValueClass | string; - max_length?: number; - min_length?: number; - min_query_length?: number; - multiline?: boolean; - option_groups?: OptionGroup[]; - options?: Option[]; - placeholder?: Close; - response_url_enabled?: boolean; - slack_file?: SlackFile; - style?: string; - text?: Close; - timezone?: string; - type?: string; - url?: string; - value?: string; + dispatch_action_config?: DispatchActionConfig; + fallback?: string; + filter?: Filter; + focus_on_load?: boolean; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + initial_channel?: string; + initial_conversation?: string; + initial_date?: string; + initial_date_time?: number; + initial_option?: Option; + initial_time?: string; + initial_user?: string; + initial_value?: InitialValueClass | string; + max_length?: number; + min_length?: number; + min_query_length?: number; + multiline?: boolean; + option_groups?: OptionGroup[]; + options?: Option[]; + placeholder?: Close; + response_url_enabled?: boolean; + slack_file?: SlackFile; + style?: string; + text?: Close; + timezone?: string; + type?: string; + url?: string; + value?: string; } export interface Confirm { confirm?: Close; - deny?: Close; - style?: string; - text?: Close; - title?: Close; + deny?: Close; + style?: string; + text?: Close; + title?: Close; } export interface DispatchActionConfig { @@ -157,70 +157,70 @@ export interface DispatchActionConfig { } export interface Filter { - exclude_bot_users?: boolean; + exclude_bot_users?: boolean; exclude_external_shared_channels?: boolean; - include?: any[]; + include?: any[]; } export interface Option { description?: Close; - text?: Close; - url?: string; - value?: string; + text?: Close; + url?: string; + value?: string; } export interface InitialValueClass { block_id?: string; elements?: InitialValueElement[]; - type?: string; + type?: string; } export interface InitialValueElement { - border?: number; + border?: number; elements?: FluffyElement[]; - indent?: number; - offset?: number; - style?: string; - type?: string; + indent?: number; + offset?: number; + style?: string; + type?: string; } export interface FluffyElement { - border?: number; + border?: number; elements?: TentacledElement[]; - indent?: number; - offset?: number; - style?: string; - type?: string; + indent?: number; + offset?: number; + style?: string; + type?: string; } export interface TentacledElement { - channel_id?: string; - fallback?: string; - format?: string; - name?: string; - range?: string; - skin_tone?: number; - style?: Style; - team_id?: string; - text?: string; - timestamp?: string; - type?: ElementType; - unicode?: string; - unsafe?: boolean; - url?: string; - user_id?: string; + channel_id?: string; + fallback?: string; + format?: string; + name?: string; + range?: string; + skin_tone?: number; + style?: Style; + team_id?: string; + text?: string; + timestamp?: string; + type?: ElementType; + unicode?: string; + unsafe?: boolean; + url?: string; + user_id?: string; usergroup_id?: string; - value?: string; + value?: string; } export interface Style { - bold?: boolean; + bold?: boolean; client_highlight?: boolean; - code?: boolean; - highlight?: boolean; - italic?: boolean; - strike?: boolean; - unlink?: boolean; + code?: boolean; + highlight?: boolean; + italic?: boolean; + strike?: boolean; + unlink?: boolean; } export enum ElementType { @@ -237,48 +237,48 @@ export enum ElementType { } export interface OptionGroup { - label?: Close; + label?: Close; options?: Option[]; } export interface StickyElement { - accessibility_label?: string; - action_id?: string; - alt_text?: string; - confirm?: Confirm; + accessibility_label?: string; + action_id?: string; + alt_text?: string; + confirm?: Confirm; default_to_current_conversation?: boolean; - fallback?: string; - filter?: Filter; - focus_on_load?: boolean; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - initial_channel?: string; - initial_channels?: string[]; - initial_conversation?: string; - initial_conversations?: string[]; - initial_date?: string; - initial_date_time?: number; - initial_option?: Option; - initial_options?: Option[]; - initial_time?: string; - initial_user?: string; - initial_users?: string[]; - max_selected_items?: number; - min_query_length?: number; - option_groups?: OptionGroup[]; - options?: Option[]; - placeholder?: Close; - response_url_enabled?: boolean; - slack_file?: SlackFile; - style?: string; - text?: Close; - timezone?: string; - type?: string; - url?: string; - value?: string; - workflow?: Workflow; + fallback?: string; + filter?: Filter; + focus_on_load?: boolean; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + initial_channel?: string; + initial_channels?: string[]; + initial_conversation?: string; + initial_conversations?: string[]; + initial_date?: string; + initial_date_time?: number; + initial_option?: Option; + initial_options?: Option[]; + initial_time?: string; + initial_user?: string; + initial_users?: string[]; + max_selected_items?: number; + min_query_length?: number; + option_groups?: OptionGroup[]; + options?: Option[]; + placeholder?: Close; + response_url_enabled?: boolean; + slack_file?: SlackFile; + style?: string; + text?: Close; + timezone?: string; + type?: string; + url?: string; + value?: string; + workflow?: Workflow; } export interface Workflow { @@ -287,13 +287,12 @@ export interface Workflow { export interface Trigger { customizable_input_parameters?: CustomizableInputParameter[]; - url?: string; + url?: string; } export interface CustomizableInputParameter { - name?: string; + name?: string; value?: string; } -export interface State { -} +export type State = {}; diff --git a/packages/web-api/src/types/response/ViewsPublishResponse.ts b/packages/web-api/src/types/response/ViewsPublishResponse.ts index 7dc5a9c66..e9f3fc753 100644 --- a/packages/web-api/src/types/response/ViewsPublishResponse.ts +++ b/packages/web-api/src/types/response/ViewsPublishResponse.ts @@ -8,15 +8,15 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ViewsPublishResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; - view?: View; - warning?: string; + view?: View; + warning?: string; }; export interface ResponseMetadata { @@ -24,78 +24,78 @@ export interface ResponseMetadata { } export interface View { - app_id?: string; + app_id?: string; app_installed_team_id?: string; - blocks?: Block[]; - bot_id?: string; - callback_id?: string; - clear_on_close?: boolean; - close?: Close; - external_id?: string; - hash?: string; - id?: string; - notify_on_close?: boolean; - previous_view_id?: string; - private_metadata?: string; - root_view_id?: string; - state?: State; - submit?: Close; - submit_disabled?: boolean; - team_id?: string; - title?: Close; - type?: string; + blocks?: Block[]; + bot_id?: string; + callback_id?: string; + clear_on_close?: boolean; + close?: Close; + external_id?: string; + hash?: string; + id?: string; + notify_on_close?: boolean; + previous_view_id?: string; + private_metadata?: string; + root_view_id?: string; + state?: State; + submit?: Close; + submit_disabled?: boolean; + team_id?: string; + title?: Close; + type?: string; } export interface Block { - accessory?: Accessory; - alt_text?: string; - author_name?: string; - block_id?: string; - description?: Close; - dispatch_action?: boolean; - element?: PurpleElement; - elements?: StickyElement[]; - fallback?: string; - fields?: Close[]; - hint?: Close; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - is_animated?: boolean; - label?: Close; - optional?: boolean; + accessory?: Accessory; + alt_text?: string; + author_name?: string; + block_id?: string; + description?: Close; + dispatch_action?: boolean; + element?: PurpleElement; + elements?: StickyElement[]; + fallback?: string; + fields?: Close[]; + hint?: Close; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + is_animated?: boolean; + label?: Close; + optional?: boolean; provider_icon_url?: string; - provider_name?: string; - slack_file?: SlackFile; - text?: Close; - thumbnail_url?: string; - title?: Close; - title_url?: string; - type?: string; - video_url?: string; + provider_name?: string; + slack_file?: SlackFile; + text?: Close; + thumbnail_url?: string; + title?: Close; + title_url?: string; + type?: string; + video_url?: string; } export interface Accessory { - alt_text?: string; - fallback?: string; - image_bytes?: number; + alt_text?: string; + fallback?: string; + image_bytes?: number; image_height?: number; - image_url?: string; - image_width?: number; - slack_file?: SlackFile; - type?: string; + image_url?: string; + image_width?: number; + slack_file?: SlackFile; + type?: string; } export interface SlackFile { - id?: string; + id?: string; url?: string; } export interface Close { - emoji?: boolean; - text?: string; - type?: CloseType; + emoji?: boolean; + text?: string; + type?: CloseType; verbatim?: boolean; } @@ -106,50 +106,50 @@ export enum CloseType { } export interface PurpleElement { - accessibility_label?: string; - action_id?: string; - alt_text?: string; - confirm?: Confirm; + accessibility_label?: string; + action_id?: string; + alt_text?: string; + confirm?: Confirm; default_to_current_conversation?: boolean; - dispatch_action_config?: DispatchActionConfig; - fallback?: string; - filter?: Filter; - focus_on_load?: boolean; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - initial_channel?: string; - initial_conversation?: string; - initial_date?: string; - initial_date_time?: number; - initial_option?: Option; - initial_time?: string; - initial_user?: string; - initial_value?: InitialValueClass | string; - max_length?: number; - min_length?: number; - min_query_length?: number; - multiline?: boolean; - option_groups?: OptionGroup[]; - options?: Option[]; - placeholder?: Close; - response_url_enabled?: boolean; - slack_file?: SlackFile; - style?: string; - text?: Close; - timezone?: string; - type?: string; - url?: string; - value?: string; + dispatch_action_config?: DispatchActionConfig; + fallback?: string; + filter?: Filter; + focus_on_load?: boolean; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + initial_channel?: string; + initial_conversation?: string; + initial_date?: string; + initial_date_time?: number; + initial_option?: Option; + initial_time?: string; + initial_user?: string; + initial_value?: InitialValueClass | string; + max_length?: number; + min_length?: number; + min_query_length?: number; + multiline?: boolean; + option_groups?: OptionGroup[]; + options?: Option[]; + placeholder?: Close; + response_url_enabled?: boolean; + slack_file?: SlackFile; + style?: string; + text?: Close; + timezone?: string; + type?: string; + url?: string; + value?: string; } export interface Confirm { confirm?: Close; - deny?: Close; - style?: string; - text?: Close; - title?: Close; + deny?: Close; + style?: string; + text?: Close; + title?: Close; } export interface DispatchActionConfig { @@ -157,70 +157,70 @@ export interface DispatchActionConfig { } export interface Filter { - exclude_bot_users?: boolean; + exclude_bot_users?: boolean; exclude_external_shared_channels?: boolean; - include?: any[]; + include?: any[]; } export interface Option { description?: Close; - text?: Close; - url?: string; - value?: string; + text?: Close; + url?: string; + value?: string; } export interface InitialValueClass { block_id?: string; elements?: InitialValueElement[]; - type?: string; + type?: string; } export interface InitialValueElement { - border?: number; + border?: number; elements?: FluffyElement[]; - indent?: number; - offset?: number; - style?: string; - type?: string; + indent?: number; + offset?: number; + style?: string; + type?: string; } export interface FluffyElement { - border?: number; + border?: number; elements?: TentacledElement[]; - indent?: number; - offset?: number; - style?: string; - type?: string; + indent?: number; + offset?: number; + style?: string; + type?: string; } export interface TentacledElement { - channel_id?: string; - fallback?: string; - format?: string; - name?: string; - range?: string; - skin_tone?: number; - style?: Style; - team_id?: string; - text?: string; - timestamp?: string; - type?: ElementType; - unicode?: string; - unsafe?: boolean; - url?: string; - user_id?: string; + channel_id?: string; + fallback?: string; + format?: string; + name?: string; + range?: string; + skin_tone?: number; + style?: Style; + team_id?: string; + text?: string; + timestamp?: string; + type?: ElementType; + unicode?: string; + unsafe?: boolean; + url?: string; + user_id?: string; usergroup_id?: string; - value?: string; + value?: string; } export interface Style { - bold?: boolean; + bold?: boolean; client_highlight?: boolean; - code?: boolean; - highlight?: boolean; - italic?: boolean; - strike?: boolean; - unlink?: boolean; + code?: boolean; + highlight?: boolean; + italic?: boolean; + strike?: boolean; + unlink?: boolean; } export enum ElementType { @@ -237,48 +237,48 @@ export enum ElementType { } export interface OptionGroup { - label?: Close; + label?: Close; options?: Option[]; } export interface StickyElement { - accessibility_label?: string; - action_id?: string; - alt_text?: string; - confirm?: Confirm; + accessibility_label?: string; + action_id?: string; + alt_text?: string; + confirm?: Confirm; default_to_current_conversation?: boolean; - fallback?: string; - filter?: Filter; - focus_on_load?: boolean; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - initial_channel?: string; - initial_channels?: string[]; - initial_conversation?: string; - initial_conversations?: string[]; - initial_date?: string; - initial_date_time?: number; - initial_option?: Option; - initial_options?: Option[]; - initial_time?: string; - initial_user?: string; - initial_users?: string[]; - max_selected_items?: number; - min_query_length?: number; - option_groups?: OptionGroup[]; - options?: Option[]; - placeholder?: Close; - response_url_enabled?: boolean; - slack_file?: SlackFile; - style?: string; - text?: Close; - timezone?: string; - type?: string; - url?: string; - value?: string; - workflow?: Workflow; + fallback?: string; + filter?: Filter; + focus_on_load?: boolean; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + initial_channel?: string; + initial_channels?: string[]; + initial_conversation?: string; + initial_conversations?: string[]; + initial_date?: string; + initial_date_time?: number; + initial_option?: Option; + initial_options?: Option[]; + initial_time?: string; + initial_user?: string; + initial_users?: string[]; + max_selected_items?: number; + min_query_length?: number; + option_groups?: OptionGroup[]; + options?: Option[]; + placeholder?: Close; + response_url_enabled?: boolean; + slack_file?: SlackFile; + style?: string; + text?: Close; + timezone?: string; + type?: string; + url?: string; + value?: string; + workflow?: Workflow; } export interface Workflow { @@ -287,13 +287,12 @@ export interface Workflow { export interface Trigger { customizable_input_parameters?: CustomizableInputParameter[]; - url?: string; + url?: string; } export interface CustomizableInputParameter { - name?: string; + name?: string; value?: string; } -export interface State { -} +export type State = {}; diff --git a/packages/web-api/src/types/response/ViewsPushResponse.ts b/packages/web-api/src/types/response/ViewsPushResponse.ts index a2541b7cc..056536cdf 100644 --- a/packages/web-api/src/types/response/ViewsPushResponse.ts +++ b/packages/web-api/src/types/response/ViewsPushResponse.ts @@ -8,15 +8,15 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ViewsPushResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; - view?: View; - warning?: string; + view?: View; + warning?: string; }; export interface ResponseMetadata { @@ -24,78 +24,78 @@ export interface ResponseMetadata { } export interface View { - app_id?: string; + app_id?: string; app_installed_team_id?: string; - blocks?: Block[]; - bot_id?: string; - callback_id?: string; - clear_on_close?: boolean; - close?: Close; - external_id?: string; - hash?: string; - id?: string; - notify_on_close?: boolean; - previous_view_id?: string; - private_metadata?: string; - root_view_id?: string; - state?: State; - submit?: Close; - submit_disabled?: boolean; - team_id?: string; - title?: Close; - type?: string; + blocks?: Block[]; + bot_id?: string; + callback_id?: string; + clear_on_close?: boolean; + close?: Close; + external_id?: string; + hash?: string; + id?: string; + notify_on_close?: boolean; + previous_view_id?: string; + private_metadata?: string; + root_view_id?: string; + state?: State; + submit?: Close; + submit_disabled?: boolean; + team_id?: string; + title?: Close; + type?: string; } export interface Block { - accessory?: Accessory; - alt_text?: string; - author_name?: string; - block_id?: string; - description?: Close; - dispatch_action?: boolean; - element?: PurpleElement; - elements?: StickyElement[]; - fallback?: string; - fields?: Close[]; - hint?: Close; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - is_animated?: boolean; - label?: Close; - optional?: boolean; + accessory?: Accessory; + alt_text?: string; + author_name?: string; + block_id?: string; + description?: Close; + dispatch_action?: boolean; + element?: PurpleElement; + elements?: StickyElement[]; + fallback?: string; + fields?: Close[]; + hint?: Close; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + is_animated?: boolean; + label?: Close; + optional?: boolean; provider_icon_url?: string; - provider_name?: string; - slack_file?: SlackFile; - text?: Close; - thumbnail_url?: string; - title?: Close; - title_url?: string; - type?: string; - video_url?: string; + provider_name?: string; + slack_file?: SlackFile; + text?: Close; + thumbnail_url?: string; + title?: Close; + title_url?: string; + type?: string; + video_url?: string; } export interface Accessory { - alt_text?: string; - fallback?: string; - image_bytes?: number; + alt_text?: string; + fallback?: string; + image_bytes?: number; image_height?: number; - image_url?: string; - image_width?: number; - slack_file?: SlackFile; - type?: string; + image_url?: string; + image_width?: number; + slack_file?: SlackFile; + type?: string; } export interface SlackFile { - id?: string; + id?: string; url?: string; } export interface Close { - emoji?: boolean; - text?: string; - type?: CloseType; + emoji?: boolean; + text?: string; + type?: CloseType; verbatim?: boolean; } @@ -106,50 +106,50 @@ export enum CloseType { } export interface PurpleElement { - accessibility_label?: string; - action_id?: string; - alt_text?: string; - confirm?: Confirm; + accessibility_label?: string; + action_id?: string; + alt_text?: string; + confirm?: Confirm; default_to_current_conversation?: boolean; - dispatch_action_config?: DispatchActionConfig; - fallback?: string; - filter?: Filter; - focus_on_load?: boolean; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - initial_channel?: string; - initial_conversation?: string; - initial_date?: string; - initial_date_time?: number; - initial_option?: Option; - initial_time?: string; - initial_user?: string; - initial_value?: InitialValueClass | string; - max_length?: number; - min_length?: number; - min_query_length?: number; - multiline?: boolean; - option_groups?: OptionGroup[]; - options?: Option[]; - placeholder?: Close; - response_url_enabled?: boolean; - slack_file?: SlackFile; - style?: string; - text?: Close; - timezone?: string; - type?: string; - url?: string; - value?: string; + dispatch_action_config?: DispatchActionConfig; + fallback?: string; + filter?: Filter; + focus_on_load?: boolean; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + initial_channel?: string; + initial_conversation?: string; + initial_date?: string; + initial_date_time?: number; + initial_option?: Option; + initial_time?: string; + initial_user?: string; + initial_value?: InitialValueClass | string; + max_length?: number; + min_length?: number; + min_query_length?: number; + multiline?: boolean; + option_groups?: OptionGroup[]; + options?: Option[]; + placeholder?: Close; + response_url_enabled?: boolean; + slack_file?: SlackFile; + style?: string; + text?: Close; + timezone?: string; + type?: string; + url?: string; + value?: string; } export interface Confirm { confirm?: Close; - deny?: Close; - style?: string; - text?: Close; - title?: Close; + deny?: Close; + style?: string; + text?: Close; + title?: Close; } export interface DispatchActionConfig { @@ -157,70 +157,70 @@ export interface DispatchActionConfig { } export interface Filter { - exclude_bot_users?: boolean; + exclude_bot_users?: boolean; exclude_external_shared_channels?: boolean; - include?: any[]; + include?: any[]; } export interface Option { description?: Close; - text?: Close; - url?: string; - value?: string; + text?: Close; + url?: string; + value?: string; } export interface InitialValueClass { block_id?: string; elements?: InitialValueElement[]; - type?: string; + type?: string; } export interface InitialValueElement { - border?: number; + border?: number; elements?: FluffyElement[]; - indent?: number; - offset?: number; - style?: string; - type?: string; + indent?: number; + offset?: number; + style?: string; + type?: string; } export interface FluffyElement { - border?: number; + border?: number; elements?: TentacledElement[]; - indent?: number; - offset?: number; - style?: string; - type?: string; + indent?: number; + offset?: number; + style?: string; + type?: string; } export interface TentacledElement { - channel_id?: string; - fallback?: string; - format?: string; - name?: string; - range?: string; - skin_tone?: number; - style?: Style; - team_id?: string; - text?: string; - timestamp?: string; - type?: ElementType; - unicode?: string; - unsafe?: boolean; - url?: string; - user_id?: string; + channel_id?: string; + fallback?: string; + format?: string; + name?: string; + range?: string; + skin_tone?: number; + style?: Style; + team_id?: string; + text?: string; + timestamp?: string; + type?: ElementType; + unicode?: string; + unsafe?: boolean; + url?: string; + user_id?: string; usergroup_id?: string; - value?: string; + value?: string; } export interface Style { - bold?: boolean; + bold?: boolean; client_highlight?: boolean; - code?: boolean; - highlight?: boolean; - italic?: boolean; - strike?: boolean; - unlink?: boolean; + code?: boolean; + highlight?: boolean; + italic?: boolean; + strike?: boolean; + unlink?: boolean; } export enum ElementType { @@ -237,48 +237,48 @@ export enum ElementType { } export interface OptionGroup { - label?: Close; + label?: Close; options?: Option[]; } export interface StickyElement { - accessibility_label?: string; - action_id?: string; - alt_text?: string; - confirm?: Confirm; + accessibility_label?: string; + action_id?: string; + alt_text?: string; + confirm?: Confirm; default_to_current_conversation?: boolean; - fallback?: string; - filter?: Filter; - focus_on_load?: boolean; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - initial_channel?: string; - initial_channels?: string[]; - initial_conversation?: string; - initial_conversations?: string[]; - initial_date?: string; - initial_date_time?: number; - initial_option?: Option; - initial_options?: Option[]; - initial_time?: string; - initial_user?: string; - initial_users?: string[]; - max_selected_items?: number; - min_query_length?: number; - option_groups?: OptionGroup[]; - options?: Option[]; - placeholder?: Close; - response_url_enabled?: boolean; - slack_file?: SlackFile; - style?: string; - text?: Close; - timezone?: string; - type?: string; - url?: string; - value?: string; - workflow?: Workflow; + fallback?: string; + filter?: Filter; + focus_on_load?: boolean; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + initial_channel?: string; + initial_channels?: string[]; + initial_conversation?: string; + initial_conversations?: string[]; + initial_date?: string; + initial_date_time?: number; + initial_option?: Option; + initial_options?: Option[]; + initial_time?: string; + initial_user?: string; + initial_users?: string[]; + max_selected_items?: number; + min_query_length?: number; + option_groups?: OptionGroup[]; + options?: Option[]; + placeholder?: Close; + response_url_enabled?: boolean; + slack_file?: SlackFile; + style?: string; + text?: Close; + timezone?: string; + type?: string; + url?: string; + value?: string; + workflow?: Workflow; } export interface Workflow { @@ -287,13 +287,12 @@ export interface Workflow { export interface Trigger { customizable_input_parameters?: CustomizableInputParameter[]; - url?: string; + url?: string; } export interface CustomizableInputParameter { - name?: string; + name?: string; value?: string; } -export interface State { -} +export type State = {}; diff --git a/packages/web-api/src/types/response/ViewsUpdateResponse.ts b/packages/web-api/src/types/response/ViewsUpdateResponse.ts index bf14c0c15..7de19bf79 100644 --- a/packages/web-api/src/types/response/ViewsUpdateResponse.ts +++ b/packages/web-api/src/types/response/ViewsUpdateResponse.ts @@ -8,15 +8,15 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type ViewsUpdateResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; response_metadata?: ResponseMetadata; - view?: View; - warning?: string; + view?: View; + warning?: string; }; export interface ResponseMetadata { @@ -24,78 +24,78 @@ export interface ResponseMetadata { } export interface View { - app_id?: string; + app_id?: string; app_installed_team_id?: string; - blocks?: Block[]; - bot_id?: string; - callback_id?: string; - clear_on_close?: boolean; - close?: Close; - external_id?: string; - hash?: string; - id?: string; - notify_on_close?: boolean; - previous_view_id?: string; - private_metadata?: string; - root_view_id?: string; - state?: State; - submit?: Close; - submit_disabled?: boolean; - team_id?: string; - title?: Close; - type?: string; + blocks?: Block[]; + bot_id?: string; + callback_id?: string; + clear_on_close?: boolean; + close?: Close; + external_id?: string; + hash?: string; + id?: string; + notify_on_close?: boolean; + previous_view_id?: string; + private_metadata?: string; + root_view_id?: string; + state?: State; + submit?: Close; + submit_disabled?: boolean; + team_id?: string; + title?: Close; + type?: string; } export interface Block { - accessory?: Accessory; - alt_text?: string; - author_name?: string; - block_id?: string; - description?: Close; - dispatch_action?: boolean; - element?: PurpleElement; - elements?: StickyElement[]; - fallback?: string; - fields?: Close[]; - hint?: Close; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - is_animated?: boolean; - label?: Close; - optional?: boolean; + accessory?: Accessory; + alt_text?: string; + author_name?: string; + block_id?: string; + description?: Close; + dispatch_action?: boolean; + element?: PurpleElement; + elements?: StickyElement[]; + fallback?: string; + fields?: Close[]; + hint?: Close; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + is_animated?: boolean; + label?: Close; + optional?: boolean; provider_icon_url?: string; - provider_name?: string; - slack_file?: SlackFile; - text?: Close; - thumbnail_url?: string; - title?: Close; - title_url?: string; - type?: string; - video_url?: string; + provider_name?: string; + slack_file?: SlackFile; + text?: Close; + thumbnail_url?: string; + title?: Close; + title_url?: string; + type?: string; + video_url?: string; } export interface Accessory { - alt_text?: string; - fallback?: string; - image_bytes?: number; + alt_text?: string; + fallback?: string; + image_bytes?: number; image_height?: number; - image_url?: string; - image_width?: number; - slack_file?: SlackFile; - type?: string; + image_url?: string; + image_width?: number; + slack_file?: SlackFile; + type?: string; } export interface SlackFile { - id?: string; + id?: string; url?: string; } export interface Close { - emoji?: boolean; - text?: string; - type?: CloseType; + emoji?: boolean; + text?: string; + type?: CloseType; verbatim?: boolean; } @@ -106,50 +106,50 @@ export enum CloseType { } export interface PurpleElement { - accessibility_label?: string; - action_id?: string; - alt_text?: string; - confirm?: Confirm; + accessibility_label?: string; + action_id?: string; + alt_text?: string; + confirm?: Confirm; default_to_current_conversation?: boolean; - dispatch_action_config?: DispatchActionConfig; - fallback?: string; - filter?: Filter; - focus_on_load?: boolean; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - initial_channel?: string; - initial_conversation?: string; - initial_date?: string; - initial_date_time?: number; - initial_option?: Option; - initial_time?: string; - initial_user?: string; - initial_value?: InitialValueClass | string; - max_length?: number; - min_length?: number; - min_query_length?: number; - multiline?: boolean; - option_groups?: OptionGroup[]; - options?: Option[]; - placeholder?: Close; - response_url_enabled?: boolean; - slack_file?: SlackFile; - style?: string; - text?: Close; - timezone?: string; - type?: string; - url?: string; - value?: string; + dispatch_action_config?: DispatchActionConfig; + fallback?: string; + filter?: Filter; + focus_on_load?: boolean; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + initial_channel?: string; + initial_conversation?: string; + initial_date?: string; + initial_date_time?: number; + initial_option?: Option; + initial_time?: string; + initial_user?: string; + initial_value?: InitialValueClass | string; + max_length?: number; + min_length?: number; + min_query_length?: number; + multiline?: boolean; + option_groups?: OptionGroup[]; + options?: Option[]; + placeholder?: Close; + response_url_enabled?: boolean; + slack_file?: SlackFile; + style?: string; + text?: Close; + timezone?: string; + type?: string; + url?: string; + value?: string; } export interface Confirm { confirm?: Close; - deny?: Close; - style?: string; - text?: Close; - title?: Close; + deny?: Close; + style?: string; + text?: Close; + title?: Close; } export interface DispatchActionConfig { @@ -157,70 +157,70 @@ export interface DispatchActionConfig { } export interface Filter { - exclude_bot_users?: boolean; + exclude_bot_users?: boolean; exclude_external_shared_channels?: boolean; - include?: any[]; + include?: any[]; } export interface Option { description?: Close; - text?: Close; - url?: string; - value?: string; + text?: Close; + url?: string; + value?: string; } export interface InitialValueClass { block_id?: string; elements?: InitialValueElement[]; - type?: string; + type?: string; } export interface InitialValueElement { - border?: number; + border?: number; elements?: FluffyElement[]; - indent?: number; - offset?: number; - style?: string; - type?: string; + indent?: number; + offset?: number; + style?: string; + type?: string; } export interface FluffyElement { - border?: number; + border?: number; elements?: TentacledElement[]; - indent?: number; - offset?: number; - style?: string; - type?: string; + indent?: number; + offset?: number; + style?: string; + type?: string; } export interface TentacledElement { - channel_id?: string; - fallback?: string; - format?: string; - name?: string; - range?: string; - skin_tone?: number; - style?: Style; - team_id?: string; - text?: string; - timestamp?: string; - type?: ElementType; - unicode?: string; - unsafe?: boolean; - url?: string; - user_id?: string; + channel_id?: string; + fallback?: string; + format?: string; + name?: string; + range?: string; + skin_tone?: number; + style?: Style; + team_id?: string; + text?: string; + timestamp?: string; + type?: ElementType; + unicode?: string; + unsafe?: boolean; + url?: string; + user_id?: string; usergroup_id?: string; - value?: string; + value?: string; } export interface Style { - bold?: boolean; + bold?: boolean; client_highlight?: boolean; - code?: boolean; - highlight?: boolean; - italic?: boolean; - strike?: boolean; - unlink?: boolean; + code?: boolean; + highlight?: boolean; + italic?: boolean; + strike?: boolean; + unlink?: boolean; } export enum ElementType { @@ -237,48 +237,48 @@ export enum ElementType { } export interface OptionGroup { - label?: Close; + label?: Close; options?: Option[]; } export interface StickyElement { - accessibility_label?: string; - action_id?: string; - alt_text?: string; - confirm?: Confirm; + accessibility_label?: string; + action_id?: string; + alt_text?: string; + confirm?: Confirm; default_to_current_conversation?: boolean; - fallback?: string; - filter?: Filter; - focus_on_load?: boolean; - image_bytes?: number; - image_height?: number; - image_url?: string; - image_width?: number; - initial_channel?: string; - initial_channels?: string[]; - initial_conversation?: string; - initial_conversations?: string[]; - initial_date?: string; - initial_date_time?: number; - initial_option?: Option; - initial_options?: Option[]; - initial_time?: string; - initial_user?: string; - initial_users?: string[]; - max_selected_items?: number; - min_query_length?: number; - option_groups?: OptionGroup[]; - options?: Option[]; - placeholder?: Close; - response_url_enabled?: boolean; - slack_file?: SlackFile; - style?: string; - text?: Close; - timezone?: string; - type?: string; - url?: string; - value?: string; - workflow?: Workflow; + fallback?: string; + filter?: Filter; + focus_on_load?: boolean; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + initial_channel?: string; + initial_channels?: string[]; + initial_conversation?: string; + initial_conversations?: string[]; + initial_date?: string; + initial_date_time?: number; + initial_option?: Option; + initial_options?: Option[]; + initial_time?: string; + initial_user?: string; + initial_users?: string[]; + max_selected_items?: number; + min_query_length?: number; + option_groups?: OptionGroup[]; + options?: Option[]; + placeholder?: Close; + response_url_enabled?: boolean; + slack_file?: SlackFile; + style?: string; + text?: Close; + timezone?: string; + type?: string; + url?: string; + value?: string; + workflow?: Workflow; } export interface Workflow { @@ -287,13 +287,12 @@ export interface Workflow { export interface Trigger { customizable_input_parameters?: CustomizableInputParameter[]; - url?: string; + url?: string; } export interface CustomizableInputParameter { - name?: string; + name?: string; value?: string; } -export interface State { -} +export type State = {}; diff --git a/packages/web-api/src/types/response/WorkflowsStepCompletedResponse.ts b/packages/web-api/src/types/response/WorkflowsStepCompletedResponse.ts index 13e34f298..717f73928 100644 --- a/packages/web-api/src/types/response/WorkflowsStepCompletedResponse.ts +++ b/packages/web-api/src/types/response/WorkflowsStepCompletedResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type WorkflowsStepCompletedResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/WorkflowsStepFailedResponse.ts b/packages/web-api/src/types/response/WorkflowsStepFailedResponse.ts index 8c000ea37..f203382fb 100644 --- a/packages/web-api/src/types/response/WorkflowsStepFailedResponse.ts +++ b/packages/web-api/src/types/response/WorkflowsStepFailedResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type WorkflowsStepFailedResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/WorkflowsUpdateStepResponse.ts b/packages/web-api/src/types/response/WorkflowsUpdateStepResponse.ts index 7f04e0980..de11fa37a 100644 --- a/packages/web-api/src/types/response/WorkflowsUpdateStepResponse.ts +++ b/packages/web-api/src/types/response/WorkflowsUpdateStepResponse.ts @@ -8,10 +8,10 @@ // // ///////////////////////////////////////////////////////////////////////////////////////// -import { WebAPICallResult } from '../../WebClient'; +import type { WebAPICallResult } from '../../WebClient'; export type WorkflowsUpdateStepResponse = WebAPICallResult & { - error?: string; - needed?: string; - ok?: boolean; + error?: string; + needed?: string; + ok?: boolean; provided?: string; }; diff --git a/packages/web-api/src/types/response/index.ts b/packages/web-api/src/types/response/index.ts index e9b723a27..5ea973d37 100644 --- a/packages/web-api/src/types/response/index.ts +++ b/packages/web-api/src/types/response/index.ts @@ -1,4 +1,9 @@ -export { AdminAnalyticsGetFileResponse, AdminAnalyticsMemberDetails, AdminAnalyticsPublicChannelDetails, AdminAnalyticsPublicChannelMetadataDetails } from './AdminAnalyticsGetFileResponse'; +export { + AdminAnalyticsGetFileResponse, + AdminAnalyticsMemberDetails, + AdminAnalyticsPublicChannelDetails, + AdminAnalyticsPublicChannelMetadataDetails, +} from './AdminAnalyticsGetFileResponse'; export { AdminAppsActivitiesListResponse } from './AdminAppsActivitiesListResponse'; export { AdminAppsApproveResponse } from './AdminAppsApproveResponse'; export { AdminAppsApprovedListResponse } from './AdminAppsApprovedListResponse'; diff --git a/packages/web-api/test/integration/commonjs-project/index.js b/packages/web-api/test/integration/commonjs-project/index.js index f4b70cd6e..4ff234c6c 100644 --- a/packages/web-api/test/integration/commonjs-project/index.js +++ b/packages/web-api/test/integration/commonjs-project/index.js @@ -1,11 +1,19 @@ /* eslint-disable */ const WebApi = require('../../../dist/index'); const client = new WebApi.WebClient('invalid-token'); -const assert = require('assert'); -client.auth.test().then((res) => { - console.error('❌ Unexpected `auth.test` API success! Exiting CJS project integration test with non-zero exit code.'); - process.exit(1); -}).catch((e) => { - assert(e.message.includes('invalid_auth'), '❌ Did not receive expected "invalid_auth" response from `auth.test` API, CJS project integration test failed.'); - console.log('✅ CJS project integration test succeeded!'); -}); +const assert = require('node:assert'); +client.auth + .test() + .then((res) => { + console.error( + '❌ Unexpected `auth.test` API success! Exiting CJS project integration test with non-zero exit code.', + ); + process.exit(1); + }) + .catch((e) => { + assert( + e.message.includes('invalid_auth'), + '❌ Did not receive expected "invalid_auth" response from `auth.test` API, CJS project integration test failed.', + ); + console.log('✅ CJS project integration test succeeded!'); + }); diff --git a/packages/web-api/test/integration/esm-project/index.mjs b/packages/web-api/test/integration/esm-project/index.mjs index e361528fb..8d0c8d859 100644 --- a/packages/web-api/test/integration/esm-project/index.mjs +++ b/packages/web-api/test/integration/esm-project/index.mjs @@ -1,12 +1,15 @@ +import assert from 'node:assert'; /* eslint-disable */ import { WebClient } from '../../../dist/index.js'; -import assert from 'assert'; const client = new WebClient('invalid-token'); try { const res = await client.auth.test(); console.error('❌ Unexpected auth.test success! Exiting ESM project integration test with non-zero exit code.'); process.exit(1); } catch (e) { - assert(e.message.includes('invalid_auth'), '❌ Did not receive expected "invalid_auth" response from `auth.test` API, ESM project integration test failed.'); + assert( + e.message.includes('invalid_auth'), + '❌ Did not receive expected "invalid_auth" response from `auth.test` API, ESM project integration test failed.', + ); console.log('✅ ESM project integration test succeeded!'); } diff --git a/packages/web-api/test/integration/ts-4.7-project/tsconfig.json b/packages/web-api/test/integration/ts-4.7-project/tsconfig.json index 8f4612c2c..3259b22b9 100644 --- a/packages/web-api/test/integration/ts-4.7-project/tsconfig.json +++ b/packages/web-api/test/integration/ts-4.7-project/tsconfig.json @@ -16,10 +16,8 @@ "moduleResolution": "node", "baseUrl": ".", - "esModuleInterop" : true, + "esModuleInterop": true, "resolveJsonModule": true }, - "include": [ - "index.ts" - ] + "include": ["index.ts"] } diff --git a/packages/web-api/test/types/methods/admin.analytics.test-d.ts b/packages/web-api/test/types/methods/admin.analytics.test-d.ts index 629fad9e0..65ef19c03 100644 --- a/packages/web-api/test/types/methods/admin.analytics.test-d.ts +++ b/packages/web-api/test/types/methods/admin.analytics.test-d.ts @@ -7,39 +7,57 @@ const web = new WebClient('TOKEN'); // -- sad path expectError(web.admin.analytics.getFile()); // lacking argument expectError(web.admin.analytics.getFile({})); // empty argument -expectError(web.admin.analytics.getFile({ - type: 'member', // missing date -})); -expectError(web.admin.analytics.getFile({ - date: '2023-11-01', // missing type -})); -expectError(web.admin.analytics.getFile({ - type: 'public_channel', // missing date or metadata_only=true -})); -expectError(web.admin.analytics.getFile({ - type: 'public_channel', - metadata_only: false, // w/ type=public_channel and no date, metadata_only must be true -})); -expectError(web.admin.analytics.getFile({ - type: 'public_channel', - date: '2023-11-01', - metadata_only: true, // w/ type=public_channel and date specified, metadata_only must be falsy -})); +expectError( + web.admin.analytics.getFile({ + type: 'member', // missing date + }), +); +expectError( + web.admin.analytics.getFile({ + date: '2023-11-01', // missing type + }), +); +expectError( + web.admin.analytics.getFile({ + type: 'public_channel', // missing date or metadata_only=true + }), +); +expectError( + web.admin.analytics.getFile({ + type: 'public_channel', + metadata_only: false, // w/ type=public_channel and no date, metadata_only must be true + }), +); +expectError( + web.admin.analytics.getFile({ + type: 'public_channel', + date: '2023-11-01', + metadata_only: true, // w/ type=public_channel and date specified, metadata_only must be falsy + }), +); // -- happy path -expectAssignable>([{ - type: 'member', - date: '2023-11-01', -}]); -expectAssignable>([{ - type: 'public_channel', - date: '2023-11-01', -}]); -expectAssignable>([{ - type: 'public_channel', - date: '2023-11-01', - metadata_only: false, -}]); -expectAssignable>([{ - type: 'public_channel', - metadata_only: true, -}]); +expectAssignable>([ + { + type: 'member', + date: '2023-11-01', + }, +]); +expectAssignable>([ + { + type: 'public_channel', + date: '2023-11-01', + }, +]); +expectAssignable>([ + { + type: 'public_channel', + date: '2023-11-01', + metadata_only: false, + }, +]); +expectAssignable>([ + { + type: 'public_channel', + metadata_only: true, + }, +]); diff --git a/packages/web-api/test/types/methods/admin.apps.test-d.ts b/packages/web-api/test/types/methods/admin.apps.test-d.ts index 499a735dc..b1eb0e81e 100644 --- a/packages/web-api/test/types/methods/admin.apps.test-d.ts +++ b/packages/web-api/test/types/methods/admin.apps.test-d.ts @@ -13,252 +13,358 @@ expectAssignable>([]); // no a // -- sad path expectError(web.admin.apps.approve()); // lacking argument expectError(web.admin.apps.approve({})); // empty argument -expectError(web.admin.apps.approve({ - app_id: 'A1234', // missing team or enterprise id -})); -expectError(web.admin.apps.approve({ - request_id: 'R1234', // missing team or enterprise id -})); -expectError(web.admin.apps.approve({ - team_id: 'T1234', // missing request or app id -})); -expectError(web.admin.apps.approve({ - enterprise_id: 'E1234', // missing request or app id -})); -expectError(web.admin.apps.approve({ - app_id: 'A1234', - request_id: 'R1234', // missing team or enterprise id, and cant specify both app and request id -})); -expectError(web.admin.apps.approve({ - enterprise_id: 'E1234', - team_id: 'T1234', // missing request or app id, and canot specify both enterprise and team id -})); +expectError( + web.admin.apps.approve({ + app_id: 'A1234', // missing team or enterprise id + }), +); +expectError( + web.admin.apps.approve({ + request_id: 'R1234', // missing team or enterprise id + }), +); +expectError( + web.admin.apps.approve({ + team_id: 'T1234', // missing request or app id + }), +); +expectError( + web.admin.apps.approve({ + enterprise_id: 'E1234', // missing request or app id + }), +); +expectError( + web.admin.apps.approve({ + app_id: 'A1234', + request_id: 'R1234', // missing team or enterprise id, and cant specify both app and request id + }), +); +expectError( + web.admin.apps.approve({ + enterprise_id: 'E1234', + team_id: 'T1234', // missing request or app id, and canot specify both enterprise and team id + }), +); // -- happy path -expectAssignable>([{ - app_id: 'A1234', - team_id: 'T1234', -}]); -expectAssignable>([{ - app_id: 'A1234', - enterprise_id: 'T1234', -}]); -expectAssignable>([{ - request_id: 'R1234', - team_id: 'T1234', -}]); -expectAssignable>([{ - request_id: 'R1234', - enterprise_id: 'T1234', -}]); +expectAssignable>([ + { + app_id: 'A1234', + team_id: 'T1234', + }, +]); +expectAssignable>([ + { + app_id: 'A1234', + enterprise_id: 'T1234', + }, +]); +expectAssignable>([ + { + request_id: 'R1234', + team_id: 'T1234', + }, +]); +expectAssignable>([ + { + request_id: 'R1234', + enterprise_id: 'T1234', + }, +]); // admin.apps.approved.list // -- sad path expectError(web.admin.apps.approved.list()); // lacking argument -expectError(web.admin.apps.approved.list({ - enterprise_id: 'E1234', - team_id: 'T1234', // cannot specify both enterprise and team id -})); +expectError( + web.admin.apps.approved.list({ + enterprise_id: 'E1234', + team_id: 'T1234', // cannot specify both enterprise and team id + }), +); // -- happy path expectAssignable>([{}]); // all args optional -expectAssignable>([{ - team_id: 'T1234', // can optionally specify team id -}]); -expectAssignable>([{ - enterprise_id: 'T1234', // can optionally specify enterprise id -}]); +expectAssignable>([ + { + team_id: 'T1234', // can optionally specify team id + }, +]); +expectAssignable>([ + { + enterprise_id: 'T1234', // can optionally specify enterprise id + }, +]); // admin.apps.clearResolution // -- sad path expectError(web.admin.apps.clearResolution()); // lacking argument expectError(web.admin.apps.clearResolution({})); // empty argument -expectError(web.admin.apps.clearResolution({ - app_id: 'A1234', // missing team or enterprise id -})); -expectError(web.admin.apps.clearResolution({ - enterprise_id: 'E1234', // missing app_id -})); -expectError(web.admin.apps.clearResolution({ - team_id: 'T1234', // missing app_id -})); -expectError(web.admin.apps.clearResolution({ - app_id: 'A1234', - enterprise_id: 'E1234', - team_id: 'T1234', // cannot specify both enterprise and team id -})); +expectError( + web.admin.apps.clearResolution({ + app_id: 'A1234', // missing team or enterprise id + }), +); +expectError( + web.admin.apps.clearResolution({ + enterprise_id: 'E1234', // missing app_id + }), +); +expectError( + web.admin.apps.clearResolution({ + team_id: 'T1234', // missing app_id + }), +); +expectError( + web.admin.apps.clearResolution({ + app_id: 'A1234', + enterprise_id: 'E1234', + team_id: 'T1234', // cannot specify both enterprise and team id + }), +); // -- happy path -expectAssignable>([{ - app_id: 'A1234', - team_id: 'T1234', -}]); -expectAssignable>([{ - token: 'xoxp-example', - app_id: 'A1234', - team_id: 'T1234', -}]); -expectAssignable>([{ - app_id: 'A1234', - enterprise_id: 'E1234', -}]); -expectAssignable>([{ - token: 'xoxp-example', - app_id: 'A1234', - enterprise_id: 'E1234', -}]); +expectAssignable>([ + { + app_id: 'A1234', + team_id: 'T1234', + }, +]); +expectAssignable>([ + { + token: 'xoxp-example', + app_id: 'A1234', + team_id: 'T1234', + }, +]); +expectAssignable>([ + { + app_id: 'A1234', + enterprise_id: 'E1234', + }, +]); +expectAssignable>([ + { + token: 'xoxp-example', + app_id: 'A1234', + enterprise_id: 'E1234', + }, +]); // admin.apps.config.lookup // -- sad path expectError(web.admin.apps.config.lookup()); // lacking argument expectError(web.admin.apps.config.lookup({})); // empty argument // -- happy path -expectAssignable>([{ - app_ids: ['A1234'], -}]); +expectAssignable>([ + { + app_ids: ['A1234'], + }, +]); // admin.apps.config.set // -- sad path expectError(web.admin.apps.config.set()); // lacking argument expectError(web.admin.apps.config.set({})); // empty argument // -- happy path -expectAssignable>([{ - app_id: 'A1234', -}]); +expectAssignable>([ + { + app_id: 'A1234', + }, +]); // admin.apps.requests.cancel // -- sad path expectError(web.admin.apps.requests.cancel()); // lacking argument expectError(web.admin.apps.requests.cancel({})); // empty argument -expectError(web.admin.apps.requests.cancel({ - request_id: 'A1234', // missing team or enterprise id -})); -expectError(web.admin.apps.requests.cancel({ - enterprise_id: 'E1234', // missing request_id -})); -expectError(web.admin.apps.requests.cancel({ - team_id: 'T1234', // missing request_id -})); -expectError(web.admin.apps.requests.cancel({ - request_id: 'A1234', - enterprise_id: 'E1234', - team_id: 'T1234', // cannot specify both enterprise and team id -})); +expectError( + web.admin.apps.requests.cancel({ + request_id: 'A1234', // missing team or enterprise id + }), +); +expectError( + web.admin.apps.requests.cancel({ + enterprise_id: 'E1234', // missing request_id + }), +); +expectError( + web.admin.apps.requests.cancel({ + team_id: 'T1234', // missing request_id + }), +); +expectError( + web.admin.apps.requests.cancel({ + request_id: 'A1234', + enterprise_id: 'E1234', + team_id: 'T1234', // cannot specify both enterprise and team id + }), +); // -- happy path -expectAssignable>([{ - request_id: 'A1234', - team_id: 'T1234', -}]); -expectAssignable>([{ - request_id: 'A1234', - enterprise_id: 'E1234', -}]); +expectAssignable>([ + { + request_id: 'A1234', + team_id: 'T1234', + }, +]); +expectAssignable>([ + { + request_id: 'A1234', + enterprise_id: 'E1234', + }, +]); // admin.apps.requests.list // -- sad path expectError(web.admin.apps.requests.list()); // lacking argument expectError(web.admin.apps.requests.list({})); // empty argument -expectError(web.admin.apps.requests.list({ - enterprise_id: 'E1234', - team_id: 'T1234', // cannot specify both enterprise and team id -})); +expectError( + web.admin.apps.requests.list({ + enterprise_id: 'E1234', + team_id: 'T1234', // cannot specify both enterprise and team id + }), +); // -- happy path -expectAssignable>([{ - team_id: 'T1234', -}]); -expectAssignable>([{ - enterprise_id: 'E1234', -}]); +expectAssignable>([ + { + team_id: 'T1234', + }, +]); +expectAssignable>([ + { + enterprise_id: 'E1234', + }, +]); // admin.apps.restrict // -- sad path expectError(web.admin.apps.restrict()); // lacking argument expectError(web.admin.apps.restrict({})); // empty argument -expectError(web.admin.apps.restrict({ - app_id: 'A1234', // missing team or enterprise id -})); -expectError(web.admin.apps.restrict({ - request_id: 'R1234', // missing team or enterprise id -})); -expectError(web.admin.apps.restrict({ - team_id: 'T1234', // missing request or app id -})); -expectError(web.admin.apps.restrict({ - enterprise_id: 'E1234', // missing request or app id -})); -expectError(web.admin.apps.restrict({ - app_id: 'A1234', - request_id: 'R1234', // missing team or enterprise id, and cant specify both app and request id -})); -expectError(web.admin.apps.restrict({ - enterprise_id: 'E1234', - team_id: 'T1234', // missing request or app id, and canot specify both enterprise and team id -})); +expectError( + web.admin.apps.restrict({ + app_id: 'A1234', // missing team or enterprise id + }), +); +expectError( + web.admin.apps.restrict({ + request_id: 'R1234', // missing team or enterprise id + }), +); +expectError( + web.admin.apps.restrict({ + team_id: 'T1234', // missing request or app id + }), +); +expectError( + web.admin.apps.restrict({ + enterprise_id: 'E1234', // missing request or app id + }), +); +expectError( + web.admin.apps.restrict({ + app_id: 'A1234', + request_id: 'R1234', // missing team or enterprise id, and cant specify both app and request id + }), +); +expectError( + web.admin.apps.restrict({ + enterprise_id: 'E1234', + team_id: 'T1234', // missing request or app id, and canot specify both enterprise and team id + }), +); // -- happy path -expectAssignable>([{ - app_id: 'A1234', - team_id: 'T1234', -}]); -expectAssignable>([{ - app_id: 'A1234', - enterprise_id: 'T1234', -}]); -expectAssignable>([{ - request_id: 'R1234', - team_id: 'T1234', -}]); -expectAssignable>([{ - request_id: 'R1234', - enterprise_id: 'T1234', -}]); +expectAssignable>([ + { + app_id: 'A1234', + team_id: 'T1234', + }, +]); +expectAssignable>([ + { + app_id: 'A1234', + enterprise_id: 'T1234', + }, +]); +expectAssignable>([ + { + request_id: 'R1234', + team_id: 'T1234', + }, +]); +expectAssignable>([ + { + request_id: 'R1234', + enterprise_id: 'T1234', + }, +]); // admin.apps.restricted.list // -- sad path expectError(web.admin.apps.restricted.list()); // lacking argument expectError(web.admin.apps.restricted.list({})); // empty argument -expectError(web.admin.apps.restricted.list({ - enterprise_id: 'E1234', - team_id: 'T1234', // cannot specify both enterprise and team id -})); +expectError( + web.admin.apps.restricted.list({ + enterprise_id: 'E1234', + team_id: 'T1234', // cannot specify both enterprise and team id + }), +); // -- happy path -expectAssignable>([{ - team_id: 'T1234', -}]); -expectAssignable>([{ - enterprise_id: 'E1234', -}]); +expectAssignable>([ + { + team_id: 'T1234', + }, +]); +expectAssignable>([ + { + enterprise_id: 'E1234', + }, +]); // admin.apps.uninstall // -- sad path expectError(web.admin.apps.uninstall()); // lacking argument expectError(web.admin.apps.uninstall({})); // empty argument -expectError(web.admin.apps.uninstall({ - app_id: 'A1234', // missing team or enterprise id -})); -expectError(web.admin.apps.uninstall({ - enterprise_id: 'E1234', // missing app_id -})); -expectError(web.admin.apps.uninstall({ - team_id: 'T1234', // missing app_id -})); -expectError(web.admin.apps.uninstall({ - app_id: 'A1234', - enterprise_id: 'E1234', - team_id: 'T1234', // cannot specify both enterprise and team id -})); +expectError( + web.admin.apps.uninstall({ + app_id: 'A1234', // missing team or enterprise id + }), +); +expectError( + web.admin.apps.uninstall({ + enterprise_id: 'E1234', // missing app_id + }), +); +expectError( + web.admin.apps.uninstall({ + team_id: 'T1234', // missing app_id + }), +); +expectError( + web.admin.apps.uninstall({ + app_id: 'A1234', + enterprise_id: 'E1234', + team_id: 'T1234', // cannot specify both enterprise and team id + }), +); // -- happy path -expectAssignable>([{ - app_id: 'A1234', - team_id: 'T1234', -}]); -expectAssignable>([{ - token: 'xoxp-example', - app_id: 'A1234', - team_id: 'T1234', -}]); -expectAssignable>([{ - app_id: 'A1234', - enterprise_id: 'E1234', -}]); -expectAssignable>([{ - token: 'xoxp-example', - app_id: 'A1234', - enterprise_id: 'E1234', -}]); +expectAssignable>([ + { + app_id: 'A1234', + team_id: 'T1234', + }, +]); +expectAssignable>([ + { + token: 'xoxp-example', + app_id: 'A1234', + team_id: 'T1234', + }, +]); +expectAssignable>([ + { + app_id: 'A1234', + enterprise_id: 'E1234', + }, +]); +expectAssignable>([ + { + token: 'xoxp-example', + app_id: 'A1234', + enterprise_id: 'E1234', + }, +]); diff --git a/packages/web-api/test/types/methods/admin.auth.test-d.ts b/packages/web-api/test/types/methods/admin.auth.test-d.ts index a85075965..3334b6565 100644 --- a/packages/web-api/test/types/methods/admin.auth.test-d.ts +++ b/packages/web-api/test/types/methods/admin.auth.test-d.ts @@ -7,71 +7,101 @@ const web = new WebClient('TOKEN'); // -- sad path expectError(web.admin.auth.policy.assignEntities()); // lacking argument expectError(web.admin.auth.policy.assignEntities({})); // empty argument -expectError(web.admin.auth.policy.assignEntities({ - entity_ids: ['U1234'], // missing entity_type and policy_name -})); -expectError(web.admin.auth.policy.assignEntities({ - entity_type: 'USER', // missing entity_ids and policy_name -})); -expectError(web.admin.auth.policy.assignEntities({ - policy_name: 'email_password', // missing entity_ids and entity_type -})); -expectError(web.admin.auth.policy.assignEntities({ - entity_ids: ['U1234'], // missing policy_name - entity_type: 'USER', -})); -expectError(web.admin.auth.policy.assignEntities({ - entity_ids: ['U1234'], // missing entity_type - policy_name: 'email_password', -})); -expectError(web.admin.auth.policy.assignEntities({ - entity_type: 'USER', // missing entity_ids - policy_name: 'email_password', -})); +expectError( + web.admin.auth.policy.assignEntities({ + entity_ids: ['U1234'], // missing entity_type and policy_name + }), +); +expectError( + web.admin.auth.policy.assignEntities({ + entity_type: 'USER', // missing entity_ids and policy_name + }), +); +expectError( + web.admin.auth.policy.assignEntities({ + policy_name: 'email_password', // missing entity_ids and entity_type + }), +); +expectError( + web.admin.auth.policy.assignEntities({ + entity_ids: ['U1234'], // missing policy_name + entity_type: 'USER', + }), +); +expectError( + web.admin.auth.policy.assignEntities({ + entity_ids: ['U1234'], // missing entity_type + policy_name: 'email_password', + }), +); +expectError( + web.admin.auth.policy.assignEntities({ + entity_type: 'USER', // missing entity_ids + policy_name: 'email_password', + }), +); // -- happy path -expectAssignable>([{ - policy_name: 'email_password', - entity_type: 'USER', - entity_ids: ['U1234'], -}]); +expectAssignable>([ + { + policy_name: 'email_password', + entity_type: 'USER', + entity_ids: ['U1234'], + }, +]); // admin.auth.policy.getEntities // -- sad path expectError(web.admin.auth.policy.getEntities()); // lacking argument expectError(web.admin.auth.policy.getEntities({})); // empty argument // -- happy path -expectAssignable>([{ - policy_name: 'email_password', -}]); +expectAssignable>([ + { + policy_name: 'email_password', + }, +]); // admin.auth.policy.removeEntities // -- sad path expectError(web.admin.auth.policy.removeEntities()); // lacking argument expectError(web.admin.auth.policy.removeEntities({})); // empty argument -expectError(web.admin.auth.policy.removeEntities({ - entity_ids: ['U1234'], // missing entity_type and policy_name -})); -expectError(web.admin.auth.policy.removeEntities({ - entity_type: 'USER', // missing entity_ids and policy_name -})); -expectError(web.admin.auth.policy.removeEntities({ - policy_name: 'email_password', // missing entity_ids and entity_type -})); -expectError(web.admin.auth.policy.removeEntities({ - entity_ids: ['U1234'], // missing policy_name - entity_type: 'USER', -})); -expectError(web.admin.auth.policy.removeEntities({ - entity_ids: ['U1234'], // missing entity_type - policy_name: 'email_password', -})); -expectError(web.admin.auth.policy.removeEntities({ - entity_type: 'USER', // missing entity_ids - policy_name: 'email_password', -})); +expectError( + web.admin.auth.policy.removeEntities({ + entity_ids: ['U1234'], // missing entity_type and policy_name + }), +); +expectError( + web.admin.auth.policy.removeEntities({ + entity_type: 'USER', // missing entity_ids and policy_name + }), +); +expectError( + web.admin.auth.policy.removeEntities({ + policy_name: 'email_password', // missing entity_ids and entity_type + }), +); +expectError( + web.admin.auth.policy.removeEntities({ + entity_ids: ['U1234'], // missing policy_name + entity_type: 'USER', + }), +); +expectError( + web.admin.auth.policy.removeEntities({ + entity_ids: ['U1234'], // missing entity_type + policy_name: 'email_password', + }), +); +expectError( + web.admin.auth.policy.removeEntities({ + entity_type: 'USER', // missing entity_ids + policy_name: 'email_password', + }), +); // -- happy path -expectAssignable>([{ - policy_name: 'email_password', - entity_type: 'USER', - entity_ids: ['U1234'], -}]); +expectAssignable>([ + { + policy_name: 'email_password', + entity_type: 'USER', + entity_ids: ['U1234'], + }, +]); diff --git a/packages/web-api/test/types/methods/admin.barriers.test-d.ts b/packages/web-api/test/types/methods/admin.barriers.test-d.ts index 7534848ca..ecc6699fb 100644 --- a/packages/web-api/test/types/methods/admin.barriers.test-d.ts +++ b/packages/web-api/test/types/methods/admin.barriers.test-d.ts @@ -7,47 +7,65 @@ const web = new WebClient('TOKEN'); // -- sad path expectError(web.admin.barriers.create()); // lacking argument expectError(web.admin.barriers.create({})); // empty argument -expectError(web.admin.barriers.create({ - barriered_from_usergroup_ids: [], // missing primary_usergroup_id and restricted_subjects -})); -expectError(web.admin.barriers.create({ - primary_usergroup_id: '1234', // missing barriered_from_usergroup_ids and restricted_subjets -})); -expectError(web.admin.barriers.create({ - restricted_subjects: ['im', 'mpim', 'call'], // missing barriered_from_usergroup_ids and primary_usergroup_id -})); -expectError(web.admin.barriers.create({ - barriered_from_usergroup_ids: [], // missing restricted_subjects - primary_usergroup_id: '1234', -})); -expectError(web.admin.barriers.create({ - barriered_from_usergroup_ids: [], // missing primary_usergroup_id - restricted_subjects: ['im', 'mpim', 'call'], -})); -expectError(web.admin.barriers.create({ - primary_usergroup_id: '1234', // missing barriered_from_usergroup_ids - restricted_subjects: ['im', 'mpim', 'call'], -})); -expectError(web.admin.barriers.create({ - barriered_from_usergroup_ids: [], - primary_usergroup_id: '1234', - restricted_subjects: ['im', 'mpim'], // must provide all three of im, mpim and call -})); +expectError( + web.admin.barriers.create({ + barriered_from_usergroup_ids: [], // missing primary_usergroup_id and restricted_subjects + }), +); +expectError( + web.admin.barriers.create({ + primary_usergroup_id: '1234', // missing barriered_from_usergroup_ids and restricted_subjets + }), +); +expectError( + web.admin.barriers.create({ + restricted_subjects: ['im', 'mpim', 'call'], // missing barriered_from_usergroup_ids and primary_usergroup_id + }), +); +expectError( + web.admin.barriers.create({ + barriered_from_usergroup_ids: [], // missing restricted_subjects + primary_usergroup_id: '1234', + }), +); +expectError( + web.admin.barriers.create({ + barriered_from_usergroup_ids: [], // missing primary_usergroup_id + restricted_subjects: ['im', 'mpim', 'call'], + }), +); +expectError( + web.admin.barriers.create({ + primary_usergroup_id: '1234', // missing barriered_from_usergroup_ids + restricted_subjects: ['im', 'mpim', 'call'], + }), +); +expectError( + web.admin.barriers.create({ + barriered_from_usergroup_ids: [], + primary_usergroup_id: '1234', + restricted_subjects: ['im', 'mpim'], // must provide all three of im, mpim and call + }), +); // -- happy path -expectAssignable>([{ - barriered_from_usergroup_ids: [], - primary_usergroup_id: '1234', - restricted_subjects: ['im', 'mpim', 'call'], -}]); +expectAssignable>([ + { + barriered_from_usergroup_ids: [], + primary_usergroup_id: '1234', + restricted_subjects: ['im', 'mpim', 'call'], + }, +]); // admin.barriers.delete // -- sad path expectError(web.admin.barriers.delete()); // lacking argument expectError(web.admin.barriers.delete({})); // empty argument // -- happy path -expectAssignable>([{ - barrier_id: 'B1234', -}]); +expectAssignable>([ + { + barrier_id: 'B1234', + }, +]); // admin.barriers.list // -- sad path @@ -59,72 +77,104 @@ expectAssignable>([]); // no arg is f // -- sad path expectError(web.admin.barriers.update()); // lacking argument expectError(web.admin.barriers.update({})); // empty argument -expectError(web.admin.barriers.update({ - barriered_from_usergroup_ids: [], // missing primary_usergroup_id and restricted_subjects and barrier_id -})); -expectError(web.admin.barriers.update({ - primary_usergroup_id: '1234', // missing barriered_from_usergroup_ids and restricted_subjets and barrier_id -})); -expectError(web.admin.barriers.update({ - restricted_subjects: ['im', 'mpim', 'call'], // missing barriered_from_usergroup_ids and primary_usergroup_id and barrier_id -})); -expectError(web.admin.barriers.update({ - barrier_id: 'B1234', // missing barriered_from_usergroup_ids, primary_usergroup_id and restricted_subjects -})); -expectError(web.admin.barriers.update({ - barriered_from_usergroup_ids: [], // missing restricted_subjects and barrier_id - primary_usergroup_id: '1234', -})); -expectError(web.admin.barriers.update({ - barriered_from_usergroup_ids: [], // missing primary_usergroup_id and barrier_id - restricted_subjects: ['im', 'mpim', 'call'], -})); -expectError(web.admin.barriers.update({ - barriered_from_usergroup_ids: [], // missing primary_usergroup_id and restructed_subjects - barrier_id: 'B1234', -})); -expectError(web.admin.barriers.update({ - primary_usergroup_id: '1234', // missing barriered_from_usergroup_ids and barrier_id - restricted_subjects: ['im', 'mpim', 'call'], -})); -expectError(web.admin.barriers.update({ - primary_usergroup_id: '1234', // missing barriered_from_usergroup_ids and restricted_subjects - barrier_id: 'B1234', -})); -expectError(web.admin.barriers.update({ - restricted_subjects: ['im', 'mpim', 'call'], - barrier_id: 'B1234', // missing barriered_from_usergroup_ids and primary_usergroup_id -})); -expectError(web.admin.barriers.update({ - barriered_from_usergroup_ids: [], - primary_usergroup_id: '1234', - restricted_subjects: ['im', 'mpim', 'call'], // missing barrier_id -})); -expectError(web.admin.barriers.update({ - barriered_from_usergroup_ids: [], - primary_usergroup_id: '1234', - barrier_id: 'B1234', // missing restricted_subjects -})); -expectError(web.admin.barriers.update({ - primary_usergroup_id: '1234', - barrier_id: 'B1234', - restricted_subjects: ['im', 'mpim', 'call'], // missing barriered_from_usergroup_ids -})); -expectError(web.admin.barriers.update({ - barriered_from_usergroup_ids: [], - barrier_id: 'B1234', - restricted_subjects: ['im', 'mpim', 'call'], // missing primary_usergroup_id -})); -expectError(web.admin.barriers.update({ - barrier_id: 'B1234', - barriered_from_usergroup_ids: [], - primary_usergroup_id: '1234', - restricted_subjects: ['im', 'mpim'], // must provide all three of im, mpim and call -})); +expectError( + web.admin.barriers.update({ + barriered_from_usergroup_ids: [], // missing primary_usergroup_id and restricted_subjects and barrier_id + }), +); +expectError( + web.admin.barriers.update({ + primary_usergroup_id: '1234', // missing barriered_from_usergroup_ids and restricted_subjets and barrier_id + }), +); +expectError( + web.admin.barriers.update({ + restricted_subjects: ['im', 'mpim', 'call'], // missing barriered_from_usergroup_ids and primary_usergroup_id and barrier_id + }), +); +expectError( + web.admin.barriers.update({ + barrier_id: 'B1234', // missing barriered_from_usergroup_ids, primary_usergroup_id and restricted_subjects + }), +); +expectError( + web.admin.barriers.update({ + barriered_from_usergroup_ids: [], // missing restricted_subjects and barrier_id + primary_usergroup_id: '1234', + }), +); +expectError( + web.admin.barriers.update({ + barriered_from_usergroup_ids: [], // missing primary_usergroup_id and barrier_id + restricted_subjects: ['im', 'mpim', 'call'], + }), +); +expectError( + web.admin.barriers.update({ + barriered_from_usergroup_ids: [], // missing primary_usergroup_id and restructed_subjects + barrier_id: 'B1234', + }), +); +expectError( + web.admin.barriers.update({ + primary_usergroup_id: '1234', // missing barriered_from_usergroup_ids and barrier_id + restricted_subjects: ['im', 'mpim', 'call'], + }), +); +expectError( + web.admin.barriers.update({ + primary_usergroup_id: '1234', // missing barriered_from_usergroup_ids and restricted_subjects + barrier_id: 'B1234', + }), +); +expectError( + web.admin.barriers.update({ + restricted_subjects: ['im', 'mpim', 'call'], + barrier_id: 'B1234', // missing barriered_from_usergroup_ids and primary_usergroup_id + }), +); +expectError( + web.admin.barriers.update({ + barriered_from_usergroup_ids: [], + primary_usergroup_id: '1234', + restricted_subjects: ['im', 'mpim', 'call'], // missing barrier_id + }), +); +expectError( + web.admin.barriers.update({ + barriered_from_usergroup_ids: [], + primary_usergroup_id: '1234', + barrier_id: 'B1234', // missing restricted_subjects + }), +); +expectError( + web.admin.barriers.update({ + primary_usergroup_id: '1234', + barrier_id: 'B1234', + restricted_subjects: ['im', 'mpim', 'call'], // missing barriered_from_usergroup_ids + }), +); +expectError( + web.admin.barriers.update({ + barriered_from_usergroup_ids: [], + barrier_id: 'B1234', + restricted_subjects: ['im', 'mpim', 'call'], // missing primary_usergroup_id + }), +); +expectError( + web.admin.barriers.update({ + barrier_id: 'B1234', + barriered_from_usergroup_ids: [], + primary_usergroup_id: '1234', + restricted_subjects: ['im', 'mpim'], // must provide all three of im, mpim and call + }), +); // -- happy path -expectAssignable>([{ - barrier_id: 'B1234', - barriered_from_usergroup_ids: [], - primary_usergroup_id: '1234', - restricted_subjects: ['im', 'mpim', 'call'], -}]); +expectAssignable>([ + { + barrier_id: 'B1234', + barriered_from_usergroup_ids: [], + primary_usergroup_id: '1234', + restricted_subjects: ['im', 'mpim', 'call'], + }, +]); diff --git a/packages/web-api/test/types/methods/admin.conversations.test-d.ts b/packages/web-api/test/types/methods/admin.conversations.test-d.ts index 14a7a8ba3..0b4682ac3 100644 --- a/packages/web-api/test/types/methods/admin.conversations.test-d.ts +++ b/packages/web-api/test/types/methods/admin.conversations.test-d.ts @@ -8,155 +8,206 @@ const web = new WebClient('TOKEN'); expectError(web.admin.conversations.archive()); // lacking argument expectError(web.admin.conversations.archive({})); // empty argument // -- happy path -expectAssignable>([{ - channel_id: 'C1234', -}]); +expectAssignable>([ + { + channel_id: 'C1234', + }, +]); // admin.conversations.bulkArchive // -- sad path expectError(web.admin.conversations.bulkArchive()); // lacking argument expectError(web.admin.conversations.bulkArchive({})); // empty argument -expectError(web.admin.conversations.bulkArchive({ - channel_ids: [], // must include at least one element -})); +expectError( + web.admin.conversations.bulkArchive({ + channel_ids: [], // must include at least one element + }), +); // -- happy path -expectAssignable>([{ - channel_ids: ['C1234'], -}]); +expectAssignable>([ + { + channel_ids: ['C1234'], + }, +]); // admin.conversations.bulkDelete // -- sad path expectError(web.admin.conversations.bulkDelete()); // lacking argument expectError(web.admin.conversations.bulkDelete({})); // empty argument -expectError(web.admin.conversations.bulkDelete({ - channel_ids: [], // must include at least one element -})); +expectError( + web.admin.conversations.bulkDelete({ + channel_ids: [], // must include at least one element + }), +); // -- happy path -expectAssignable>([{ - channel_ids: ['C1234'], -}]); +expectAssignable>([ + { + channel_ids: ['C1234'], + }, +]); // admin.conversations.bulkMove // -- sad path expectError(web.admin.conversations.bulkMove()); // lacking argument expectError(web.admin.conversations.bulkMove({})); // empty argument -expectError(web.admin.conversations.bulkMove({ - channel_ids: ['C1234'], // missing target_team_id -})); -expectError(web.admin.conversations.bulkMove({ - target_team_id: 'T1234', // missing channel_ids -})); -expectError(web.admin.conversations.bulkMove({ - target_team_id: 'T1234', - channel_ids: [], // must include at least one element -})); +expectError( + web.admin.conversations.bulkMove({ + channel_ids: ['C1234'], // missing target_team_id + }), +); +expectError( + web.admin.conversations.bulkMove({ + target_team_id: 'T1234', // missing channel_ids + }), +); +expectError( + web.admin.conversations.bulkMove({ + target_team_id: 'T1234', + channel_ids: [], // must include at least one element + }), +); // -- happy path -expectAssignable>([{ - target_team_id: 'T1234', - channel_ids: ['C1234'], -}]); +expectAssignable>([ + { + target_team_id: 'T1234', + channel_ids: ['C1234'], + }, +]); // admin.conversations.convertToPrivate // -- sad path expectError(web.admin.conversations.convertToPrivate()); // lacking argument expectError(web.admin.conversations.convertToPrivate({})); // empty argument // -- happy path -expectAssignable>([{ - channel_id: 'C1234', -}]); +expectAssignable>([ + { + channel_id: 'C1234', + }, +]); // admin.conversations.convertToPublic // -- sad path expectError(web.admin.conversations.convertToPublic()); // lacking argument expectError(web.admin.conversations.convertToPublic({})); // empty argument // -- happy path -expectAssignable>([{ - channel_id: 'C1234', -}]); +expectAssignable>([ + { + channel_id: 'C1234', + }, +]); // admin.conversations.create // -- sad path expectError(web.admin.conversations.create()); // lacking argument expectError(web.admin.conversations.create({})); // empty argument -expectError(web.admin.conversations.create({ - is_private: true, // missing name and either teamid or orgwide -})); -expectError(web.admin.conversations.create({ - name: 'test', // missing is_private and either teamid or orgwide -})); -expectError(web.admin.conversations.create({ - org_wide: true, // missing is_private and name -})); -expectError(web.admin.conversations.create({ - team_id: 'T1234', // missing is_private and name -})); -expectError(web.admin.conversations.create({ - is_private: true, // missing either teamid or orgwide - name: 'test', -})); -expectError(web.admin.conversations.create({ - is_private: true, // missing name - org_wide: true, -})); -expectError(web.admin.conversations.create({ - is_private: true, // missing name - team_id: 'T1234', -})); -expectError(web.admin.conversations.create({ - name: 'test', - org_wide: true, // missing is_private -})); -expectError(web.admin.conversations.create({ - name: 'test', - team_id: 'T1234', // missing is_private -})); -expectError(web.admin.conversations.create({ - is_private: true, - name: 'test', - org_wide: true, - team_id: 'T1234', // cannot specify org_wide=true and a team id -})); +expectError( + web.admin.conversations.create({ + is_private: true, // missing name and either teamid or orgwide + }), +); +expectError( + web.admin.conversations.create({ + name: 'test', // missing is_private and either teamid or orgwide + }), +); +expectError( + web.admin.conversations.create({ + org_wide: true, // missing is_private and name + }), +); +expectError( + web.admin.conversations.create({ + team_id: 'T1234', // missing is_private and name + }), +); +expectError( + web.admin.conversations.create({ + is_private: true, // missing either teamid or orgwide + name: 'test', + }), +); +expectError( + web.admin.conversations.create({ + is_private: true, // missing name + org_wide: true, + }), +); +expectError( + web.admin.conversations.create({ + is_private: true, // missing name + team_id: 'T1234', + }), +); +expectError( + web.admin.conversations.create({ + name: 'test', + org_wide: true, // missing is_private + }), +); +expectError( + web.admin.conversations.create({ + name: 'test', + team_id: 'T1234', // missing is_private + }), +); +expectError( + web.admin.conversations.create({ + is_private: true, + name: 'test', + org_wide: true, + team_id: 'T1234', // cannot specify org_wide=true and a team id + }), +); // -- happy path -expectAssignable>([{ - is_private: false, - name: 'test', - org_wide: true, -}]); -expectAssignable>([{ - is_private: false, - name: 'test', - org_wide: false, - team_id: 'T1234', -}]); -expectAssignable>([{ - is_private: false, - name: 'test', - team_id: 'T1234', -}]); +expectAssignable>([ + { + is_private: false, + name: 'test', + org_wide: true, + }, +]); +expectAssignable>([ + { + is_private: false, + name: 'test', + org_wide: false, + team_id: 'T1234', + }, +]); +expectAssignable>([ + { + is_private: false, + name: 'test', + team_id: 'T1234', + }, +]); // admin.conversations.delete // -- sad path expectError(web.admin.conversations.delete()); // lacking argument expectError(web.admin.conversations.delete({})); // empty argument // -- happy path -expectAssignable>([{ - channel_id: 'C1234', -}]); +expectAssignable>([ + { + channel_id: 'C1234', + }, +]); // admin.conversations.disconnectShared // -- sad path expectError(web.admin.conversations.disconnectShared()); // lacking argument expectError(web.admin.conversations.disconnectShared({})); // empty argument // -- happy path -expectAssignable>([{ - channel_id: 'C1234', -}]); +expectAssignable>([ + { + channel_id: 'C1234', + }, +]); // admin.conversations.ekm.listOriginalConnectedChannelInfo // -- sad path // -- happy path -expectAssignable>([{ -}]); // all optional args +expectAssignable>([{}]); // all optional args expectAssignable>([]); // all optional args // admin.conversations.getConversationPrefs @@ -164,180 +215,235 @@ expectAssignable>([{ - channel_id: 'C1234', -}]); +expectAssignable>([ + { + channel_id: 'C1234', + }, +]); // admin.conversations.getCustomRetention // -- sad path expectError(web.admin.conversations.getCustomRetention()); // lacking argument expectError(web.admin.conversations.getCustomRetention({})); // empty argument // -- happy path -expectAssignable>([{ - channel_id: 'C1234', -}]); +expectAssignable>([ + { + channel_id: 'C1234', + }, +]); // admin.conversations.getTeams // -- sad path expectError(web.admin.conversations.getTeams()); // lacking argument expectError(web.admin.conversations.getTeams({})); // empty argument // -- happy path -expectAssignable>([{ - channel_id: 'C1234', -}]); +expectAssignable>([ + { + channel_id: 'C1234', + }, +]); // admin.conversations.invite // -- sad path expectError(web.admin.conversations.invite()); // lacking argument expectError(web.admin.conversations.invite({})); // empty argument -expectError(web.admin.conversations.invite({ - channel_id: 'C1234', // missing user_ids -})); -expectError(web.admin.conversations.invite({ - channel_id: 'C1234', - user_ids: [], // empty user_ids -})); +expectError( + web.admin.conversations.invite({ + channel_id: 'C1234', // missing user_ids + }), +); +expectError( + web.admin.conversations.invite({ + channel_id: 'C1234', + user_ids: [], // empty user_ids + }), +); // -- happy path -expectAssignable>([{ - channel_id: 'C1234', - user_ids: ['U1234'], -}]); +expectAssignable>([ + { + channel_id: 'C1234', + user_ids: ['U1234'], + }, +]); // admin.conversations.lookup // -- sad path expectError(web.admin.conversations.lookup()); // lacking argument expectError(web.admin.conversations.lookup({})); // empty argument -expectError(web.admin.conversations.lookup({ - team_ids: [], // missing last_message_activity_before -})); -expectError(web.admin.conversations.lookup({ - last_message_activity_before: 1969, // missing team_ids -})); +expectError( + web.admin.conversations.lookup({ + team_ids: [], // missing last_message_activity_before + }), +); +expectError( + web.admin.conversations.lookup({ + last_message_activity_before: 1969, // missing team_ids + }), +); // -- happy path -expectAssignable>([{ - team_ids: ['T1234'], - last_message_activity_before: 10, -}]); +expectAssignable>([ + { + team_ids: ['T1234'], + last_message_activity_before: 10, + }, +]); // admin.conversations.removeCustomRetention // -- sad path expectError(web.admin.conversations.removeCustomRetention()); // lacking argument expectError(web.admin.conversations.removeCustomRetention({})); // empty argument // -- happy path -expectAssignable>([{ - channel_id: 'C1234', -}]); +expectAssignable>([ + { + channel_id: 'C1234', + }, +]); // admin.conversations.rename // -- sad path expectError(web.admin.conversations.rename()); // lacking argument expectError(web.admin.conversations.rename({})); // empty argument -expectError(web.admin.conversations.rename({ - channel_id: 'C1234', // missing name -})); -expectError(web.admin.conversations.rename({ - name: 'C1234', // missing channel_id -})); +expectError( + web.admin.conversations.rename({ + channel_id: 'C1234', // missing name + }), +); +expectError( + web.admin.conversations.rename({ + name: 'C1234', // missing channel_id + }), +); // -- happy path -expectAssignable>([{ - channel_id: 'C1234', - name: 'heyho', -}]); +expectAssignable>([ + { + channel_id: 'C1234', + name: 'heyho', + }, +]); // admin.conversations.restrictAccess.addGroup // -- sad path expectError(web.admin.conversations.restrictAccess.addGroup()); // lacking argument expectError(web.admin.conversations.restrictAccess.addGroup({})); // empty argument -expectError(web.admin.conversations.restrictAccess.addGroup({ - channel_id: 'C1234', // missing group_id -})); -expectError(web.admin.conversations.restrictAccess.addGroup({ - group_id: 'G1234', // missing channel_id -})); +expectError( + web.admin.conversations.restrictAccess.addGroup({ + channel_id: 'C1234', // missing group_id + }), +); +expectError( + web.admin.conversations.restrictAccess.addGroup({ + group_id: 'G1234', // missing channel_id + }), +); // -- happy path -expectAssignable>([{ - channel_id: 'C1234', - group_id: 'G1234', -}]); +expectAssignable>([ + { + channel_id: 'C1234', + group_id: 'G1234', + }, +]); // admin.conversations.restrictAccess.listGroups // -- sad path expectError(web.admin.conversations.restrictAccess.listGroups()); // lacking argument expectError(web.admin.conversations.restrictAccess.listGroups({})); // empty argument // -- happy path -expectAssignable>([{ - channel_id: 'C1234', -}]); +expectAssignable>([ + { + channel_id: 'C1234', + }, +]); // admin.conversations.restrictAccess.removeGroup // -- sad path expectError(web.admin.conversations.restrictAccess.removeGroup()); // lacking argument expectError(web.admin.conversations.restrictAccess.removeGroup({})); // empty argument -expectError(web.admin.conversations.restrictAccess.removeGroup({ - channel_id: 'C1234', // missing group_id -})); -expectError(web.admin.conversations.restrictAccess.removeGroup({ - group_id: 'G1234', // missing channel_id -})); +expectError( + web.admin.conversations.restrictAccess.removeGroup({ + channel_id: 'C1234', // missing group_id + }), +); +expectError( + web.admin.conversations.restrictAccess.removeGroup({ + group_id: 'G1234', // missing channel_id + }), +); // -- happy path -expectAssignable>([{ - channel_id: 'C1234', - group_id: 'G1234', -}]); +expectAssignable>([ + { + channel_id: 'C1234', + group_id: 'G1234', + }, +]); // admin.conversations.search // -- sad path // -- happy path -expectAssignable>([{ -}]); // all optional args +expectAssignable>([{}]); // all optional args expectAssignable>([]); // no arg is fine // admin.conversations.setConversationPrefs // -- sad path expectError(web.admin.conversations.setConversationPrefs()); // lacking argument expectError(web.admin.conversations.setConversationPrefs({})); // empty argument -expectError(web.admin.conversations.setConversationPrefs({ - channel_id: 'C1234', // missing prefs -})); -expectError(web.admin.conversations.setConversationPrefs({ - prefs: {}, // missing channel_id -})); +expectError( + web.admin.conversations.setConversationPrefs({ + channel_id: 'C1234', // missing prefs + }), +); +expectError( + web.admin.conversations.setConversationPrefs({ + prefs: {}, // missing channel_id + }), +); // -- happy path -expectAssignable>([{ - channel_id: 'C1234', - prefs: {}, -}]); +expectAssignable>([ + { + channel_id: 'C1234', + prefs: {}, + }, +]); // admin.conversations.setCustomRetention // -- sad path expectError(web.admin.conversations.setCustomRetention()); // lacking argument expectError(web.admin.conversations.setCustomRetention({})); // empty argument -expectError(web.admin.conversations.setCustomRetention({ - channel_id: 'C1234', // missing duration_days -})); -expectError(web.admin.conversations.setCustomRetention({ - duration_days: 420, // missing channel_id -})); +expectError( + web.admin.conversations.setCustomRetention({ + channel_id: 'C1234', // missing duration_days + }), +); +expectError( + web.admin.conversations.setCustomRetention({ + duration_days: 420, // missing channel_id + }), +); // -- happy path -expectAssignable>([{ - channel_id: 'C1234', - duration_days: 69, -}]); +expectAssignable>([ + { + channel_id: 'C1234', + duration_days: 69, + }, +]); // admin.conversations.setTeams // -- sad path expectError(web.admin.conversations.setTeams()); // lacking argument expectError(web.admin.conversations.setTeams({})); // empty argument // -- happy path -expectAssignable>([{ - channel_id: 'C1234', -}]); +expectAssignable>([ + { + channel_id: 'C1234', + }, +]); // admin.conversations.unarchive // -- sad path expectError(web.admin.conversations.unarchive()); // lacking argument expectError(web.admin.conversations.unarchive({})); // empty argument // -- happy path -expectAssignable>([{ - channel_id: 'C1234', -}]); +expectAssignable>([ + { + channel_id: 'C1234', + }, +]); diff --git a/packages/web-api/test/types/methods/admin.emoji.test-d.ts b/packages/web-api/test/types/methods/admin.emoji.test-d.ts index b16361dc5..c6244b62b 100644 --- a/packages/web-api/test/types/methods/admin.emoji.test-d.ts +++ b/packages/web-api/test/types/methods/admin.emoji.test-d.ts @@ -7,33 +7,45 @@ const web = new WebClient('TOKEN'); // -- sad path expectError(web.admin.emoji.add()); // lacking argument expectError(web.admin.emoji.add({})); // empty argument -expectError(web.admin.emoji.add({ - name: 'facepalm', // missing url -})); -expectError(web.admin.emoji.add({ - url: 'facepalm', // missing name -})); +expectError( + web.admin.emoji.add({ + name: 'facepalm', // missing url + }), +); +expectError( + web.admin.emoji.add({ + url: 'facepalm', // missing name + }), +); // -- happy path -expectAssignable>([{ - name: 'facepalm', - url: 'http://example.com', -}]); +expectAssignable>([ + { + name: 'facepalm', + url: 'http://example.com', + }, +]); // admin.emoji.addAlias // -- sad path expectError(web.admin.emoji.addAlias()); // lacking argument expectError(web.admin.emoji.addAlias({})); // empty argument -expectError(web.admin.emoji.addAlias({ - name: 'facepalm', // missing alias_for -})); -expectError(web.admin.emoji.addAlias({ - alias_for: 'facepalm', // missing name -})); +expectError( + web.admin.emoji.addAlias({ + name: 'facepalm', // missing alias_for + }), +); +expectError( + web.admin.emoji.addAlias({ + alias_for: 'facepalm', // missing name + }), +); // -- happy path -expectAssignable>([{ - name: 'facepalm', - alias_for: 'fp', -}]); +expectAssignable>([ + { + name: 'facepalm', + alias_for: 'fp', + }, +]); // admin.emoji.list // -- sad path @@ -46,22 +58,30 @@ expectAssignable>([]); // no arg is fine expectError(web.admin.emoji.remove()); // lacking argument expectError(web.admin.emoji.remove({})); // empty argument // -- happy path -expectAssignable>([{ - name: 'facepalm', -}]); +expectAssignable>([ + { + name: 'facepalm', + }, +]); // admin.emoji.rename // -- sad path expectError(web.admin.emoji.rename()); // lacking argument expectError(web.admin.emoji.rename({})); // empty argument -expectError(web.admin.emoji.rename({ - name: 'facepalm', // missing new_name -})); -expectError(web.admin.emoji.rename({ - new_name: 'facepalm', // missing name -})); +expectError( + web.admin.emoji.rename({ + name: 'facepalm', // missing new_name + }), +); +expectError( + web.admin.emoji.rename({ + new_name: 'facepalm', // missing name + }), +); // -- happy path -expectAssignable>([{ - name: 'facepalm', - new_name: 'fp', -}]); +expectAssignable>([ + { + name: 'facepalm', + new_name: 'fp', + }, +]); diff --git a/packages/web-api/test/types/methods/admin.functions.test-d.ts b/packages/web-api/test/types/methods/admin.functions.test-d.ts index b2067ea7f..4db421401 100644 --- a/packages/web-api/test/types/methods/admin.functions.test-d.ts +++ b/packages/web-api/test/types/methods/admin.functions.test-d.ts @@ -8,34 +8,46 @@ const web = new WebClient('TOKEN'); expectError(web.admin.functions.list()); // lacking argument expectError(web.admin.functions.list({})); // empty argument // -- happy path -expectAssignable>([{ - app_ids: [], -}]); +expectAssignable>([ + { + app_ids: [], + }, +]); // admin.functions.permissions.lookup // -- sad path expectError(web.admin.functions.permissions.lookup()); // lacking argument expectError(web.admin.functions.permissions.lookup({})); // empty argument -expectError(web.admin.functions.permissions.lookup({ - function_ids: [], // must provide at least 1 -})); +expectError( + web.admin.functions.permissions.lookup({ + function_ids: [], // must provide at least 1 + }), +); // -- happy path -expectAssignable>([{ - function_ids: ['F1234'], -}]); +expectAssignable>([ + { + function_ids: ['F1234'], + }, +]); // admin.functions.permissions.set // -- sad path expectError(web.admin.functions.permissions.set()); // lacking argument expectError(web.admin.functions.permissions.set({})); // empty argument -expectError(web.admin.functions.permissions.set({ - function_id: 'F1234', // missing visibility -})); -expectError(web.admin.functions.permissions.set({ - visibility: 'named_entities', // missing function_id -})); +expectError( + web.admin.functions.permissions.set({ + function_id: 'F1234', // missing visibility + }), +); +expectError( + web.admin.functions.permissions.set({ + visibility: 'named_entities', // missing function_id + }), +); // -- happy path -expectAssignable>([{ - function_id: 'F1234', - visibility: 'named_entities', -}]); +expectAssignable>([ + { + function_id: 'F1234', + visibility: 'named_entities', + }, +]); diff --git a/packages/web-api/test/types/methods/admin.inviteRequests.test-d.ts b/packages/web-api/test/types/methods/admin.inviteRequests.test-d.ts index 29a25a097..a8867652b 100644 --- a/packages/web-api/test/types/methods/admin.inviteRequests.test-d.ts +++ b/packages/web-api/test/types/methods/admin.inviteRequests.test-d.ts @@ -7,57 +7,75 @@ const web = new WebClient('TOKEN'); // -- sad path expectError(web.admin.inviteRequests.approve()); // lacking argument expectError(web.admin.inviteRequests.approve({})); // empty argument -expectError(web.admin.inviteRequests.approve({ - invite_request_id: 'I1234', // missing team_id -})); -expectError(web.admin.inviteRequests.approve({ - team_id: 'T1234', // missing invite_request_id -})); +expectError( + web.admin.inviteRequests.approve({ + invite_request_id: 'I1234', // missing team_id + }), +); +expectError( + web.admin.inviteRequests.approve({ + team_id: 'T1234', // missing invite_request_id + }), +); // -- happy path -expectAssignable>([{ - team_id: 'T1234', - invite_request_id: 'I1234', -}]); +expectAssignable>([ + { + team_id: 'T1234', + invite_request_id: 'I1234', + }, +]); // admin.inviteRequests.approved.list // -- sad path expectError(web.admin.inviteRequests.approved.list()); // lacking argument expectError(web.admin.inviteRequests.approved.list({})); // empty argument // -- happy path -expectAssignable>([{ - team_id: 'T1234', -}]); +expectAssignable>([ + { + team_id: 'T1234', + }, +]); // admin.inviteRequests.denied.list // -- sad path expectError(web.admin.inviteRequests.denied.list()); // lacking argument expectError(web.admin.inviteRequests.denied.list({})); // empty argument // -- happy path -expectAssignable>([{ - team_id: 'T1234', -}]); +expectAssignable>([ + { + team_id: 'T1234', + }, +]); // admin.inviteRequests.deny // -- sad path expectError(web.admin.inviteRequests.deny()); // lacking argument expectError(web.admin.inviteRequests.deny({})); // empty argument -expectError(web.admin.inviteRequests.deny({ - invite_request_id: 'I1234', // missing team_id -})); -expectError(web.admin.inviteRequests.deny({ - team_id: 'T1234', // missing invite_request_id -})); +expectError( + web.admin.inviteRequests.deny({ + invite_request_id: 'I1234', // missing team_id + }), +); +expectError( + web.admin.inviteRequests.deny({ + team_id: 'T1234', // missing invite_request_id + }), +); // -- happy path -expectAssignable>([{ - team_id: 'T1234', - invite_request_id: 'I1234', -}]); +expectAssignable>([ + { + team_id: 'T1234', + invite_request_id: 'I1234', + }, +]); // admin.inviteRequests.list // -- sad path expectError(web.admin.inviteRequests.list()); // lacking argument expectError(web.admin.inviteRequests.list({})); // empty argument // -- happy path -expectAssignable>([{ - team_id: 'T1234', -}]); +expectAssignable>([ + { + team_id: 'T1234', + }, +]); diff --git a/packages/web-api/test/types/methods/admin.roles.test-d.ts b/packages/web-api/test/types/methods/admin.roles.test-d.ts index de8510707..9ed583c05 100644 --- a/packages/web-api/test/types/methods/admin.roles.test-d.ts +++ b/packages/web-api/test/types/methods/admin.roles.test-d.ts @@ -7,43 +7,61 @@ const web = new WebClient('TOKEN'); // -- sad path expectError(web.admin.roles.addAssignments()); // lacking argument expectError(web.admin.roles.addAssignments({})); // empty argument -expectError(web.admin.roles.addAssignments({ - entity_ids: ['E1234'], // missing role_id, user_ids -})); -expectError(web.admin.roles.addAssignments({ - role_id: 'Rl0A', // missing entity_ids, user_ids -})); -expectError(web.admin.roles.addAssignments({ - user_ids: ['U1234'], // missing entity_ids, role_id -})); -expectError(web.admin.roles.addAssignments({ - entity_ids: ['E1234'], // missing user_ids - role_id: 'Rl0A', -})); -expectError(web.admin.roles.addAssignments({ - entity_ids: ['E1234'], // missing role_id - user_ids: ['U1234'], -})); -expectError(web.admin.roles.addAssignments({ - role_id: 'Rl0A', // missing entity_ids - user_ids: ['U1234'], -})); -expectError(web.admin.roles.addAssignments({ - entity_ids: [], // need at least 1 item - role_id: 'Rl0A', - user_ids: ['U1234'], -})); -expectError(web.admin.roles.addAssignments({ - entity_ids: ['C1234'], - role_id: 'Rl0A', - user_ids: [], // need at least 1 item, -})); +expectError( + web.admin.roles.addAssignments({ + entity_ids: ['E1234'], // missing role_id, user_ids + }), +); +expectError( + web.admin.roles.addAssignments({ + role_id: 'Rl0A', // missing entity_ids, user_ids + }), +); +expectError( + web.admin.roles.addAssignments({ + user_ids: ['U1234'], // missing entity_ids, role_id + }), +); +expectError( + web.admin.roles.addAssignments({ + entity_ids: ['E1234'], // missing user_ids + role_id: 'Rl0A', + }), +); +expectError( + web.admin.roles.addAssignments({ + entity_ids: ['E1234'], // missing role_id + user_ids: ['U1234'], + }), +); +expectError( + web.admin.roles.addAssignments({ + role_id: 'Rl0A', // missing entity_ids + user_ids: ['U1234'], + }), +); +expectError( + web.admin.roles.addAssignments({ + entity_ids: [], // need at least 1 item + role_id: 'Rl0A', + user_ids: ['U1234'], + }), +); +expectError( + web.admin.roles.addAssignments({ + entity_ids: ['C1234'], + role_id: 'Rl0A', + user_ids: [], // need at least 1 item, + }), +); // -- happy path -expectAssignable>([{ - entity_ids: ['C1234'], - role_id: 'Rl0A', - user_ids: ['U1234'], -}]); +expectAssignable>([ + { + entity_ids: ['C1234'], + role_id: 'Rl0A', + user_ids: ['U1234'], + }, +]); // admin.roles.listAssignments // -- sad path @@ -55,40 +73,58 @@ expectAssignable>([]); // no // -- sad path expectError(web.admin.roles.removeAssignments()); // lacking argument expectError(web.admin.roles.removeAssignments({})); // empty argument -expectError(web.admin.roles.removeAssignments({ - entity_ids: ['E1234'], // missing role_id, user_ids -})); -expectError(web.admin.roles.removeAssignments({ - role_id: 'Rl0A', // missing entity_ids, user_ids -})); -expectError(web.admin.roles.removeAssignments({ - user_ids: ['U1234'], // missing entity_ids, role_id -})); -expectError(web.admin.roles.removeAssignments({ - entity_ids: ['E1234'], // missing user_ids - role_id: 'Rl0A', -})); -expectError(web.admin.roles.removeAssignments({ - entity_ids: ['E1234'], // missing role_id - user_ids: ['U1234'], -})); -expectError(web.admin.roles.removeAssignments({ - role_id: 'Rl0A', // missing entity_ids - user_ids: ['U1234'], -})); -expectError(web.admin.roles.removeAssignments({ - entity_ids: [], // need at least 1 item - role_id: 'Rl0A', - user_ids: ['U1234'], -})); -expectError(web.admin.roles.removeAssignments({ - entity_ids: ['C1234'], - role_id: 'Rl0A', - user_ids: [], // need at least 1 item, -})); +expectError( + web.admin.roles.removeAssignments({ + entity_ids: ['E1234'], // missing role_id, user_ids + }), +); +expectError( + web.admin.roles.removeAssignments({ + role_id: 'Rl0A', // missing entity_ids, user_ids + }), +); +expectError( + web.admin.roles.removeAssignments({ + user_ids: ['U1234'], // missing entity_ids, role_id + }), +); +expectError( + web.admin.roles.removeAssignments({ + entity_ids: ['E1234'], // missing user_ids + role_id: 'Rl0A', + }), +); +expectError( + web.admin.roles.removeAssignments({ + entity_ids: ['E1234'], // missing role_id + user_ids: ['U1234'], + }), +); +expectError( + web.admin.roles.removeAssignments({ + role_id: 'Rl0A', // missing entity_ids + user_ids: ['U1234'], + }), +); +expectError( + web.admin.roles.removeAssignments({ + entity_ids: [], // need at least 1 item + role_id: 'Rl0A', + user_ids: ['U1234'], + }), +); +expectError( + web.admin.roles.removeAssignments({ + entity_ids: ['C1234'], + role_id: 'Rl0A', + user_ids: [], // need at least 1 item, + }), +); // -- happy path -expectAssignable>([{ - entity_ids: ['C1234'], - role_id: 'Rl0A', - user_ids: ['U1234'], -}]); +expectAssignable>([ + { + entity_ids: ['C1234'], + role_id: 'Rl0A', + user_ids: ['U1234'], + }, +]); diff --git a/packages/web-api/test/types/methods/admin.teams.test-d.ts b/packages/web-api/test/types/methods/admin.teams.test-d.ts index 16580afd8..23406c27f 100644 --- a/packages/web-api/test/types/methods/admin.teams.test-d.ts +++ b/packages/web-api/test/types/methods/admin.teams.test-d.ts @@ -8,25 +8,33 @@ const web = new WebClient('TOKEN'); expectError(web.admin.teams.admins.list()); // lacking argument expectError(web.admin.teams.admins.list({})); // empty argument // -- happy path -expectAssignable>([{ - team_id: 'T1234', -}]); +expectAssignable>([ + { + team_id: 'T1234', + }, +]); // admin.teams.create // -- sad path expectError(web.admin.teams.create()); // lacking argument expectError(web.admin.teams.create({})); // empty argument -expectError(web.admin.teams.create({ - team_name: 'Jokers', // missing team_domain -})); -expectError(web.admin.teams.create({ - team_domain: 'jokers', // missing team_name -})); +expectError( + web.admin.teams.create({ + team_name: 'Jokers', // missing team_domain + }), +); +expectError( + web.admin.teams.create({ + team_domain: 'jokers', // missing team_name + }), +); // -- happy path -expectAssignable>([{ - team_domain: 'jokers', - team_name: 'Jokers', -}]); +expectAssignable>([ + { + team_domain: 'jokers', + team_name: 'Jokers', + }, +]); // admin.teams.list // -- sad path @@ -39,99 +47,135 @@ expectAssignable>([]); // no arg is fine expectError(web.admin.teams.owners.list()); // lacking argument expectError(web.admin.teams.owners.list({})); // empty argument // -- happy path -expectAssignable>([{ - team_id: 'T1234', -}]); +expectAssignable>([ + { + team_id: 'T1234', + }, +]); // admin.teams.settings.info // -- sad path expectError(web.admin.teams.settings.info()); // lacking argument expectError(web.admin.teams.settings.info({})); // empty argument // -- happy path -expectAssignable>([{ - team_id: 'T1234', -}]); +expectAssignable>([ + { + team_id: 'T1234', + }, +]); // admin.teams.settings.setDefaultChannels // -- sad path expectError(web.admin.teams.settings.setDefaultChannels()); // lacking argument expectError(web.admin.teams.settings.setDefaultChannels({})); // empty argument -expectError(web.admin.teams.settings.setDefaultChannels({ - team_id: 'T1234', // missing channel_ids -})); -expectError(web.admin.teams.settings.setDefaultChannels({ - channel_ids: ['C1234'], // missing team_id -})); -expectError(web.admin.teams.settings.setDefaultChannels({ - team_id: 'T1234', - channel_ids: [], // must include at least 1 channel -})); +expectError( + web.admin.teams.settings.setDefaultChannels({ + team_id: 'T1234', // missing channel_ids + }), +); +expectError( + web.admin.teams.settings.setDefaultChannels({ + channel_ids: ['C1234'], // missing team_id + }), +); +expectError( + web.admin.teams.settings.setDefaultChannels({ + team_id: 'T1234', + channel_ids: [], // must include at least 1 channel + }), +); // -- happy path -expectAssignable>([{ - team_id: 'T1234', - channel_ids: ['C1234'], -}]); +expectAssignable>([ + { + team_id: 'T1234', + channel_ids: ['C1234'], + }, +]); // admin.teams.settings.setDescription // -- sad path expectError(web.admin.teams.settings.setDescription()); // lacking argument expectError(web.admin.teams.settings.setDescription({})); // empty argument -expectError(web.admin.teams.settings.setDescription({ - team_id: 'T1234', // missing description -})); -expectError(web.admin.teams.settings.setDescription({ - description: 'hey ho', // missing team_id -})); +expectError( + web.admin.teams.settings.setDescription({ + team_id: 'T1234', // missing description + }), +); +expectError( + web.admin.teams.settings.setDescription({ + description: 'hey ho', // missing team_id + }), +); // -- happy path -expectAssignable>([{ - team_id: 'T1234', - description: 'existential dread', -}]); +expectAssignable>([ + { + team_id: 'T1234', + description: 'existential dread', + }, +]); // admin.teams.settings.setDiscoverability // -- sad path expectError(web.admin.teams.settings.setDiscoverability()); // lacking argument expectError(web.admin.teams.settings.setDiscoverability({})); // empty argument -expectError(web.admin.teams.settings.setDiscoverability({ - team_id: 'T1234', // missing discoverability -})); -expectError(web.admin.teams.settings.setDiscoverability({ - discoverability: 'open', // missing team_id -})); +expectError( + web.admin.teams.settings.setDiscoverability({ + team_id: 'T1234', // missing discoverability + }), +); +expectError( + web.admin.teams.settings.setDiscoverability({ + discoverability: 'open', // missing team_id + }), +); // -- happy path -expectAssignable>([{ - team_id: 'T1234', - discoverability: 'closed', -}]); +expectAssignable>([ + { + team_id: 'T1234', + discoverability: 'closed', + }, +]); // admin.teams.settings.setIcon // -- sad path expectError(web.admin.teams.settings.setIcon()); // lacking argument expectError(web.admin.teams.settings.setIcon({})); // empty argument -expectError(web.admin.teams.settings.setIcon({ - team_id: 'T1234', // missing image_url -})); -expectError(web.admin.teams.settings.setIcon({ - image_url: 'example.com', // missing team_id -})); +expectError( + web.admin.teams.settings.setIcon({ + team_id: 'T1234', // missing image_url + }), +); +expectError( + web.admin.teams.settings.setIcon({ + image_url: 'example.com', // missing team_id + }), +); // -- happy path -expectAssignable>([{ - team_id: 'T1234', - image_url: 'example.com', -}]); +expectAssignable>([ + { + team_id: 'T1234', + image_url: 'example.com', + }, +]); // admin.teams.settings.setName // -- sad path expectError(web.admin.teams.settings.setName()); // lacking argument expectError(web.admin.teams.settings.setName({})); // empty argument -expectError(web.admin.teams.settings.setName({ - team_id: 'T1234', // missing name -})); -expectError(web.admin.teams.settings.setName({ - name: 'SlackHQ', // missing team_id -})); +expectError( + web.admin.teams.settings.setName({ + team_id: 'T1234', // missing name + }), +); +expectError( + web.admin.teams.settings.setName({ + name: 'SlackHQ', // missing team_id + }), +); // -- happy path -expectAssignable>([{ - team_id: 'T1234', - name: 'SlackHQ', -}]); +expectAssignable>([ + { + team_id: 'T1234', + name: 'SlackHQ', + }, +]); diff --git a/packages/web-api/test/types/methods/admin.usergroups.test-d.ts b/packages/web-api/test/types/methods/admin.usergroups.test-d.ts index 2b12d49d7..dc0091441 100644 --- a/packages/web-api/test/types/methods/admin.usergroups.test-d.ts +++ b/packages/web-api/test/types/methods/admin.usergroups.test-d.ts @@ -7,67 +7,93 @@ const web = new WebClient('TOKEN'); // -- sad path expectError(web.admin.usergroups.addChannels()); // lacking argument expectError(web.admin.usergroups.addChannels({})); // lacking argument -expectError(web.admin.usergroups.addChannels({ - channel_ids: 'C1234', // missing usergroup_id -})); -expectError(web.admin.usergroups.addChannels({ - usergroup_id: 'S1234', // missing channel_ids -})); +expectError( + web.admin.usergroups.addChannels({ + channel_ids: 'C1234', // missing usergroup_id + }), +); +expectError( + web.admin.usergroups.addChannels({ + usergroup_id: 'S1234', // missing channel_ids + }), +); // -- happy path -expectAssignable>([{ - channel_ids: 'C1234', // can accept a string - usergroup_id: 'S1234', -}]); -expectAssignable>([{ - channel_ids: ['C1234', 'C2345'], // can accept an array - usergroup_id: 'S1234', -}]); +expectAssignable>([ + { + channel_ids: 'C1234', // can accept a string + usergroup_id: 'S1234', + }, +]); +expectAssignable>([ + { + channel_ids: ['C1234', 'C2345'], // can accept an array + usergroup_id: 'S1234', + }, +]); // admin.usergroups.addTeams // -- sad path expectError(web.admin.usergroups.addTeams()); // lacking argument expectError(web.admin.usergroups.addTeams({})); // lacking argument -expectError(web.admin.usergroups.addTeams({ - team_ids: 'T1234', // missing usergroup_id -})); -expectError(web.admin.usergroups.addTeams({ - usergroup_id: 'S1234', // missing team_ids -})); +expectError( + web.admin.usergroups.addTeams({ + team_ids: 'T1234', // missing usergroup_id + }), +); +expectError( + web.admin.usergroups.addTeams({ + usergroup_id: 'S1234', // missing team_ids + }), +); // -- happy path -expectAssignable>([{ - team_ids: 'T1234', // can accept a string - usergroup_id: 'S1234', -}]); -expectAssignable>([{ - team_ids: ['T1234', 'T2345'], // can accept an array - usergroup_id: 'S1234', -}]); +expectAssignable>([ + { + team_ids: 'T1234', // can accept a string + usergroup_id: 'S1234', + }, +]); +expectAssignable>([ + { + team_ids: ['T1234', 'T2345'], // can accept an array + usergroup_id: 'S1234', + }, +]); // admin.usergroups.listChannels // -- sad path expectError(web.admin.usergroups.listChannels()); // lacking argument expectError(web.admin.usergroups.listChannels({})); // lacking argument // -- happy path -expectAssignable>([{ - usergroup_id: 'S1234', -}]); +expectAssignable>([ + { + usergroup_id: 'S1234', + }, +]); // admin.usergroups.removeChannels // -- sad path expectError(web.admin.usergroups.removeChannels()); // lacking argument expectError(web.admin.usergroups.removeChannels({})); // lacking argument -expectError(web.admin.usergroups.removeChannels({ - channel_ids: 'C1234', // missing usergroup_id -})); -expectError(web.admin.usergroups.removeChannels({ - usergroup_id: 'S1234', // missing channel_ids -})); +expectError( + web.admin.usergroups.removeChannels({ + channel_ids: 'C1234', // missing usergroup_id + }), +); +expectError( + web.admin.usergroups.removeChannels({ + usergroup_id: 'S1234', // missing channel_ids + }), +); // -- happy path -expectAssignable>([{ - channel_ids: 'C1234', // can accept a string - usergroup_id: 'S1234', -}]); -expectAssignable>([{ - channel_ids: ['C1234', 'C2345'], // can accept an array - usergroup_id: 'S1234', -}]); +expectAssignable>([ + { + channel_ids: 'C1234', // can accept a string + usergroup_id: 'S1234', + }, +]); +expectAssignable>([ + { + channel_ids: ['C1234', 'C2345'], // can accept an array + usergroup_id: 'S1234', + }, +]); diff --git a/packages/web-api/test/types/methods/admin.users.test-d.ts b/packages/web-api/test/types/methods/admin.users.test-d.ts index b882db662..40a53cb31 100644 --- a/packages/web-api/test/types/methods/admin.users.test-d.ts +++ b/packages/web-api/test/types/methods/admin.users.test-d.ts @@ -7,255 +7,351 @@ const web = new WebClient('TOKEN'); // -- sad path expectError(web.admin.users.assign()); // lacking argument expectError(web.admin.users.assign({})); // empty argument -expectError(web.admin.users.assign({ - team_id: 'T1234', // missing user_id -})); -expectError(web.admin.users.assign({ - user_id: 'U1234', // missing team_id -})); -expectError(web.admin.users.assign({ - user_id: 'U1234', - team_id: 'T1234', - channel_ids: [], // requires at least 1 channel -})); +expectError( + web.admin.users.assign({ + team_id: 'T1234', // missing user_id + }), +); +expectError( + web.admin.users.assign({ + user_id: 'U1234', // missing team_id + }), +); +expectError( + web.admin.users.assign({ + user_id: 'U1234', + team_id: 'T1234', + channel_ids: [], // requires at least 1 channel + }), +); // -- happy path -expectAssignable>([{ - team_id: 'T1234', - user_id: 'U1234', -}]); +expectAssignable>([ + { + team_id: 'T1234', + user_id: 'U1234', + }, +]); // admin.users.invite // -- sad path expectError(web.admin.users.invite()); // lacking argument expectError(web.admin.users.invite({})); // empty argument -expectError(web.admin.users.invite({ - team_id: 'T1234', // missing channel_ids, email -})); -expectError(web.admin.users.invite({ - channel_ids: ['C1234'], // missing team_id, email -})); -expectError(web.admin.users.invite({ - email: 'me@you.com', // missing channel_ids, team_id -})); -expectError(web.admin.users.invite({ - email: 'me@you.com', - team_id: 'T1234', // missing channel_ids -})); -expectError(web.admin.users.invite({ - email: 'me@you.com', - channel_ids: ['C1234'], // missing team_id -})); -expectError(web.admin.users.invite({ - team_id: 'T1234', - channel_ids: ['C1234'], // missing email -})); -expectError(web.admin.users.invite({ - team_id: 'T1234', - channel_ids: [], // requires at least 1 channel -})); -expectError(web.admin.users.invite({ - email: 'me@you.com', - team_id: 'T1234', - channel_ids: [], // required at least 1 channel -})); +expectError( + web.admin.users.invite({ + team_id: 'T1234', // missing channel_ids, email + }), +); +expectError( + web.admin.users.invite({ + channel_ids: ['C1234'], // missing team_id, email + }), +); +expectError( + web.admin.users.invite({ + email: 'me@you.com', // missing channel_ids, team_id + }), +); +expectError( + web.admin.users.invite({ + email: 'me@you.com', + team_id: 'T1234', // missing channel_ids + }), +); +expectError( + web.admin.users.invite({ + email: 'me@you.com', + channel_ids: ['C1234'], // missing team_id + }), +); +expectError( + web.admin.users.invite({ + team_id: 'T1234', + channel_ids: ['C1234'], // missing email + }), +); +expectError( + web.admin.users.invite({ + team_id: 'T1234', + channel_ids: [], // requires at least 1 channel + }), +); +expectError( + web.admin.users.invite({ + email: 'me@you.com', + team_id: 'T1234', + channel_ids: [], // required at least 1 channel + }), +); // -- happy path -expectAssignable>([{ - team_id: 'T1234', - email: 'me@you.com', - channel_ids: ['C1234'], -}]); +expectAssignable>([ + { + team_id: 'T1234', + email: 'me@you.com', + channel_ids: ['C1234'], + }, +]); // admin.users.list // -- sad path -expectError(web.admin.users.list({ - team_id: 'T1234', - include_deactivated_user_workspaces: true, // cannot set both team_id and include_deactivated=true -})); -expectError(web.admin.users.list({ - user_id: 'U1234', // missing team_id -})); +expectError( + web.admin.users.list({ + team_id: 'T1234', + include_deactivated_user_workspaces: true, // cannot set both team_id and include_deactivated=true + }), +); +expectError( + web.admin.users.list({ + user_id: 'U1234', // missing team_id + }), +); // -- happy path expectAssignable>([{}]); // all optional args is ok expectAssignable>([]); // no args is fine -expectAssignable>([{ - team_id: 'T1234', - include_deactivated_user_workspaces: false, // team_id and include_deactivated=false is ok -}]); -expectAssignable>([{ - team_id: 'T1234', // team_id and undefined include_deactivated is ok -}]); -expectAssignable>([{ - include_deactivated_user_workspaces: true, // team_id and=undefined and include_deactivated is ok -}]); +expectAssignable>([ + { + team_id: 'T1234', + include_deactivated_user_workspaces: false, // team_id and include_deactivated=false is ok + }, +]); +expectAssignable>([ + { + team_id: 'T1234', // team_id and undefined include_deactivated is ok + }, +]); +expectAssignable>([ + { + include_deactivated_user_workspaces: true, // team_id and=undefined and include_deactivated is ok + }, +]); // admin.users.remove // -- sad path expectError(web.admin.users.remove()); // lacking argument expectError(web.admin.users.remove({})); // empty argument -expectError(web.admin.users.remove({ - team_id: 'T1234', // missing user_id -})); -expectError(web.admin.users.remove({ - user_id: 'U1234', // missing team_id -})); +expectError( + web.admin.users.remove({ + team_id: 'T1234', // missing user_id + }), +); +expectError( + web.admin.users.remove({ + user_id: 'U1234', // missing team_id + }), +); // -- happy path -expectAssignable>([{ - team_id: 'T1234', - user_id: 'U1234', -}]); +expectAssignable>([ + { + team_id: 'T1234', + user_id: 'U1234', + }, +]); // admin.users.session.clearSettings // -- sad path expectError(web.admin.users.session.clearSettings()); // lacking argument expectError(web.admin.users.session.clearSettings({})); // empty argument -expectError(web.admin.users.session.clearSettings({ - user_ids: [], -})); // must provide at least one user_id +expectError( + web.admin.users.session.clearSettings({ + user_ids: [], + }), +); // must provide at least one user_id // -- happy path -expectAssignable>([{ - user_ids: ['U1234'], -}]); +expectAssignable>([ + { + user_ids: ['U1234'], + }, +]); // admin.users.session.getSettings // -- sad path expectError(web.admin.users.session.getSettings()); // lacking argument expectError(web.admin.users.session.getSettings({})); // empty argument -expectError(web.admin.users.session.getSettings({ - user_ids: [], -})); // must provide at least one user_id +expectError( + web.admin.users.session.getSettings({ + user_ids: [], + }), +); // must provide at least one user_id // -- happy path -expectAssignable>([{ - user_ids: ['U1234'], -}]); +expectAssignable>([ + { + user_ids: ['U1234'], + }, +]); // admin.users.session.invalidate // -- sad path expectError(web.admin.users.session.invalidate()); // lacking argument expectError(web.admin.users.session.invalidate({})); // empty argument -expectError(web.admin.users.session.invalidate({ - team_id: 'T1234', // missing session_id -})); -expectError(web.admin.users.session.invalidate({ - session_id: '1234', // missing team_id -})); +expectError( + web.admin.users.session.invalidate({ + team_id: 'T1234', // missing session_id + }), +); +expectError( + web.admin.users.session.invalidate({ + session_id: '1234', // missing team_id + }), +); // -- happy path -expectAssignable>([{ - team_id: 'T1234', - session_id: '1234', -}]); +expectAssignable>([ + { + team_id: 'T1234', + session_id: '1234', + }, +]); // admin.users.session.list // -- sad path -expectError(web.admin.users.session.list({ - team_id: 'T1234', // if team_id is provided, must also provide user_id -})); -expectError(web.admin.users.session.list({ - user_id: 'T1234', // if user_id is provided, must also provide team_id -})); +expectError( + web.admin.users.session.list({ + team_id: 'T1234', // if team_id is provided, must also provide user_id + }), +); +expectError( + web.admin.users.session.list({ + user_id: 'T1234', // if user_id is provided, must also provide team_id + }), +); // -- happy path expectAssignable>([{}]); // all optional args is OK expectAssignable>([]); // no arg is fine -expectAssignable>([{ - team_id: 'T1234', - user_id: 'U1234', // also providing both team and user id - but has to be both -}]); +expectAssignable>([ + { + team_id: 'T1234', + user_id: 'U1234', // also providing both team and user id - but has to be both + }, +]); // admin.users.session.reset // -- sad path expectError(web.admin.users.session.reset()); // lacking argument expectError(web.admin.users.session.reset({})); // empty argument // -- happy path -expectAssignable>([{ - user_id: 'U1234', -}]); +expectAssignable>([ + { + user_id: 'U1234', + }, +]); // admin.users.session.resetBulk // -- sad path expectError(web.admin.users.session.resetBulk()); // lacking argument expectError(web.admin.users.session.resetBulk({})); // empty argument -expectError(web.admin.users.session.resetBulk({ - user_ids: [], -})); // must provide at least one user_id +expectError( + web.admin.users.session.resetBulk({ + user_ids: [], + }), +); // must provide at least one user_id // -- happy path -expectAssignable>([{ - user_ids: ['U1234'], -}]); +expectAssignable>([ + { + user_ids: ['U1234'], + }, +]); // admin.users.session.setSettings // -- sad path expectError(web.admin.users.session.setSettings()); // lacking argument expectError(web.admin.users.session.setSettings({})); // empty argument -expectError(web.admin.users.session.setSettings({ - user_ids: [], -})); // must provide at least one user_id +expectError( + web.admin.users.session.setSettings({ + user_ids: [], + }), +); // must provide at least one user_id // -- happy path -expectAssignable>([{ - user_ids: ['U1234'], -}]); +expectAssignable>([ + { + user_ids: ['U1234'], + }, +]); // admin.users.session.setAdmin // -- sad path expectError(web.admin.users.setAdmin()); // lacking argument expectError(web.admin.users.setAdmin({})); // empty argument -expectError(web.admin.users.setAdmin({ - team_id: 'T1234', // missing user_id -})); -expectError(web.admin.users.setAdmin({ - user_id: 'T1234', // missing team_id -})); +expectError( + web.admin.users.setAdmin({ + team_id: 'T1234', // missing user_id + }), +); +expectError( + web.admin.users.setAdmin({ + user_id: 'T1234', // missing team_id + }), +); // -- happy path -expectAssignable>([{ - team_id: 'T1234', - user_id: 'U1234', -}]); +expectAssignable>([ + { + team_id: 'T1234', + user_id: 'U1234', + }, +]); // admin.users.session.setExpiration // -- sad path expectError(web.admin.users.setExpiration()); // lacking argument expectError(web.admin.users.setExpiration({})); // empty argument -expectError(web.admin.users.setExpiration({ - expiration_ts: 1234, // missing user_id -})); -expectError(web.admin.users.setExpiration({ - user_id: 'T1234', // missing expiration_ts -})); +expectError( + web.admin.users.setExpiration({ + expiration_ts: 1234, // missing user_id + }), +); +expectError( + web.admin.users.setExpiration({ + user_id: 'T1234', // missing expiration_ts + }), +); // -- happy path -expectAssignable>([{ - user_id: 'U1234', - expiration_ts: 1234, -}]); +expectAssignable>([ + { + user_id: 'U1234', + expiration_ts: 1234, + }, +]); // admin.users.session.setOwner // -- sad path expectError(web.admin.users.setOwner()); // lacking argument expectError(web.admin.users.setOwner({})); // empty argument -expectError(web.admin.users.setOwner({ - team_id: 'T1234', // missing user_id -})); -expectError(web.admin.users.setOwner({ - user_id: 'T1234', // missing team_id -})); +expectError( + web.admin.users.setOwner({ + team_id: 'T1234', // missing user_id + }), +); +expectError( + web.admin.users.setOwner({ + user_id: 'T1234', // missing team_id + }), +); // -- happy path -expectAssignable>([{ - team_id: 'T1234', - user_id: 'U1234', -}]); +expectAssignable>([ + { + team_id: 'T1234', + user_id: 'U1234', + }, +]); // admin.users.session.setRegular // -- sad path expectError(web.admin.users.setRegular()); // lacking argument expectError(web.admin.users.setRegular({})); // empty argument -expectError(web.admin.users.setRegular({ - team_id: 'T1234', // missing user_id -})); -expectError(web.admin.users.setRegular({ - user_id: 'T1234', // missing team_id -})); +expectError( + web.admin.users.setRegular({ + team_id: 'T1234', // missing user_id + }), +); +expectError( + web.admin.users.setRegular({ + user_id: 'T1234', // missing team_id + }), +); // -- happy path -expectAssignable>([{ - team_id: 'T1234', - user_id: 'U1234', -}]); +expectAssignable>([ + { + team_id: 'T1234', + user_id: 'U1234', + }, +]); // admin.users.session.unsupportedVersions.export // -- sad path diff --git a/packages/web-api/test/types/methods/admin.workflows.test-d.ts b/packages/web-api/test/types/methods/admin.workflows.test-d.ts index f459961b1..790b8c693 100644 --- a/packages/web-api/test/types/methods/admin.workflows.test-d.ts +++ b/packages/web-api/test/types/methods/admin.workflows.test-d.ts @@ -7,67 +7,93 @@ const web = new WebClient('TOKEN'); // -- sad path expectError(web.admin.workflows.collaborators.add()); // lacking argument expectError(web.admin.workflows.collaborators.add({})); // empty argument -expectError(web.admin.workflows.collaborators.add({ - collaborator_ids: ['U1234'], // missing workflow_ids -})); -expectError(web.admin.workflows.collaborators.add({ - workflow_ids: ['Wf1234'], // missing user_ids -})); -expectError(web.admin.workflows.collaborators.add({ - collaborator_ids: ['U1234'], - workflow_ids: [], // must provide at least 1 id -})); -expectError(web.admin.workflows.collaborators.add({ - workflow_ids: ['Wf1234'], - collaborator_ids: [], // must provide at least 1 id -})); +expectError( + web.admin.workflows.collaborators.add({ + collaborator_ids: ['U1234'], // missing workflow_ids + }), +); +expectError( + web.admin.workflows.collaborators.add({ + workflow_ids: ['Wf1234'], // missing user_ids + }), +); +expectError( + web.admin.workflows.collaborators.add({ + collaborator_ids: ['U1234'], + workflow_ids: [], // must provide at least 1 id + }), +); +expectError( + web.admin.workflows.collaborators.add({ + workflow_ids: ['Wf1234'], + collaborator_ids: [], // must provide at least 1 id + }), +); // -- happy path -expectAssignable>([{ - collaborator_ids: ['U1234'], - workflow_ids: ['Wf1234'], -}]); +expectAssignable>([ + { + collaborator_ids: ['U1234'], + workflow_ids: ['Wf1234'], + }, +]); // admin.workflows.collaborators.remove // -- sad path expectError(web.admin.workflows.collaborators.remove()); // lacking argument expectError(web.admin.workflows.collaborators.remove({})); // empty argument -expectError(web.admin.workflows.collaborators.remove({ - collaborator_ids: ['U1234'], // missing workflow_ids -})); -expectError(web.admin.workflows.collaborators.remove({ - workflow_ids: ['Wf1234'], // missing user_ids -})); -expectError(web.admin.workflows.collaborators.remove({ - collaborator_ids: ['U1234'], - workflow_ids: [], // must provide at least 1 id -})); -expectError(web.admin.workflows.collaborators.remove({ - workflow_ids: ['Wf1234'], - collaborator_ids: [], // must provide at least 1 id -})); +expectError( + web.admin.workflows.collaborators.remove({ + collaborator_ids: ['U1234'], // missing workflow_ids + }), +); +expectError( + web.admin.workflows.collaborators.remove({ + workflow_ids: ['Wf1234'], // missing user_ids + }), +); +expectError( + web.admin.workflows.collaborators.remove({ + collaborator_ids: ['U1234'], + workflow_ids: [], // must provide at least 1 id + }), +); +expectError( + web.admin.workflows.collaborators.remove({ + workflow_ids: ['Wf1234'], + collaborator_ids: [], // must provide at least 1 id + }), +); // -- happy path -expectAssignable>([{ - collaborator_ids: ['U1234'], - workflow_ids: ['Wf1234'], -}]); +expectAssignable>([ + { + collaborator_ids: ['U1234'], + workflow_ids: ['Wf1234'], + }, +]); // admin.workflows.permissions.lookup // -- sad path expectError(web.admin.workflows.permissions.lookup()); // lacking argument expectError(web.admin.workflows.permissions.lookup({})); // empty argument -expectError(web.admin.workflows.permissions.lookup({ - workflow_ids: [], // must provide at least 1 id -})); +expectError( + web.admin.workflows.permissions.lookup({ + workflow_ids: [], // must provide at least 1 id + }), +); // -- happy path -expectAssignable>([{ - workflow_ids: ['Wf1234'], -}]); +expectAssignable>([ + { + workflow_ids: ['Wf1234'], + }, +]); // admin.workflows.search // -- sad path -expectError(web.admin.workflows.search({ - collaborator_ids: [], // must provide at least 1 ID -})); +expectError( + web.admin.workflows.search({ + collaborator_ids: [], // must provide at least 1 ID + }), +); // -- happy path expectAssignable>([{}]); // all optional args OK expectAssignable>([]); // no arg is fine @@ -75,10 +101,14 @@ expectAssignable>([]); // no arg i // admin.workflows.unpublish // -- sad path expectError(web.admin.workflows.unpublish()); // lacking argument -expectError(web.admin.workflows.unpublish({ - workflow_ids: [], // must provide at least 1 ID -})); +expectError( + web.admin.workflows.unpublish({ + workflow_ids: [], // must provide at least 1 ID + }), +); // -- happy path -expectAssignable>([{ - workflow_ids: ['Wf1234'], -}]); +expectAssignable>([ + { + workflow_ids: ['Wf1234'], + }, +]); diff --git a/packages/web-api/test/types/methods/apps.test-d.ts b/packages/web-api/test/types/methods/apps.test-d.ts index e4b288887..a59b9cdc8 100644 --- a/packages/web-api/test/types/methods/apps.test-d.ts +++ b/packages/web-api/test/types/methods/apps.test-d.ts @@ -14,95 +14,120 @@ expectAssignable>([]); // no arg is expectError(web.apps.event.authorizations.list()); // lacking argument expectError(web.apps.event.authorizations.list({})); // empty argument // -- happy path -expectAssignable>([{ - event_context: '12345', -}]); +expectAssignable>([ + { + event_context: '12345', + }, +]); // apps.manifest.create // -- sad path expectError(web.apps.manifest.create()); // lacking argument expectError(web.apps.manifest.create({})); // empty argument // -- happy path -expectAssignable>([{ - manifest: { - display_information: { - name: 'Bare Minimum', +expectAssignable>([ + { + manifest: { + display_information: { + name: 'Bare Minimum', + }, }, }, -}]); +]); // apps.manifest.delete // -- sad path expectError(web.apps.manifest.delete()); // lacking argument expectError(web.apps.manifest.delete({})); // empty argument // -- happy path -expectAssignable>([{ - app_id: 'A1234', -}]); +expectAssignable>([ + { + app_id: 'A1234', + }, +]); // apps.manifest.export // -- sad path expectError(web.apps.manifest.export()); // lacking argument expectError(web.apps.manifest.export({})); // empty argument // -- happy path -expectAssignable>([{ - app_id: 'A1234', -}]); +expectAssignable>([ + { + app_id: 'A1234', + }, +]); // apps.manifest.update // -- sad path expectError(web.apps.manifest.update()); // lacking argument expectError(web.apps.manifest.update({})); // empty argument -expectError(web.apps.manifest.update({ - app_id: 'A1234', // missing manifest -})); -expectError(web.apps.manifest.update({ - manifest: { // missing app_id - display_information: { - name: 'Bare Minimum', +expectError( + web.apps.manifest.update({ + app_id: 'A1234', // missing manifest + }), +); +expectError( + web.apps.manifest.update({ + manifest: { + // missing app_id + display_information: { + name: 'Bare Minimum', + }, }, - }, -})); + }), +); // -- happy path -expectAssignable>([{ - app_id: 'A1234', - manifest: { - display_information: { - name: 'Bare Minimum', +expectAssignable>([ + { + app_id: 'A1234', + manifest: { + display_information: { + name: 'Bare Minimum', + }, }, }, -}]); +]); // apps.manifest.validate // -- sad path expectError(web.apps.manifest.validate()); // lacking argument expectError(web.apps.manifest.validate({})); // empty argument // -- happy path -expectAssignable>([{ - manifest: { - display_information: { - name: 'Bare Minimum', +expectAssignable>([ + { + manifest: { + display_information: { + name: 'Bare Minimum', + }, }, }, -}]); +]); // apps.uninstall // -- sad path expectError(web.apps.uninstall()); // lacking argument expectError(web.apps.uninstall({})); // empty argument -expectError(web.apps.uninstall({ - client_id: '1234.56', // missing client_secret -})); -expectError(web.apps.uninstall({ - client_secret: '1234.56', // missing client_id -})); +expectError( + web.apps.uninstall({ + client_id: '1234.56', // missing client_secret + }), +); +expectError( + web.apps.uninstall({ + client_secret: '1234.56', // missing client_id + }), +); // -- happy path -expectAssignable>([{ - client_id: '1234.56', - client_secret: 'ABC123', -}]); -expectAssignable>([{ - token: 'xoxb-example', - client_id: '1234.56', - client_secret: 'ABC123', -}]); +expectAssignable>([ + { + client_id: '1234.56', + client_secret: 'ABC123', + }, +]); +expectAssignable>([ + { + token: 'xoxb-example', + client_id: '1234.56', + client_secret: 'ABC123', + }, +]); diff --git a/packages/web-api/test/types/methods/bookmarks.test-d.ts b/packages/web-api/test/types/methods/bookmarks.test-d.ts index 86474f108..ec5e1b1c1 100644 --- a/packages/web-api/test/types/methods/bookmarks.test-d.ts +++ b/packages/web-api/test/types/methods/bookmarks.test-d.ts @@ -7,117 +7,165 @@ const web = new WebClient('TOKEN'); // -- sad path expectError(web.bookmarks.add()); // lacking argument expectError(web.bookmarks.add({})); // empty argument -expectError(web.bookmarks.add({ - channel_id: 'C1234', // missing title, link, type -})); -expectError(web.bookmarks.add({ - type: 'link', - channel_id: 'C1234', // missing title, link -})); -expectError(web.bookmarks.add({ - title: 'link', - channel_id: 'C1234', // missing type, link -})); -expectError(web.bookmarks.add({ - link: 'url.com', - channel_id: 'C1234', // missing type, channel_id -})); -expectError(web.bookmarks.add({ - type: 'link', - channel_id: 'C1234', // missing link - title: 'test', -})); -expectError(web.bookmarks.add({ - link: 'link', - channel_id: 'C1234', // missing type - title: 'test', -})); -expectError(web.bookmarks.add({ - link: 'link', - channel_id: 'C1234', // missing title - type: 'link', -})); -expectError(web.bookmarks.add({ - type: 'link', // missing channel_id, link, title -})); -expectError(web.bookmarks.add({ - type: 'link', // missing channel_id, link - title: 'test', -})); -expectError(web.bookmarks.add({ - type: 'link', // missing channel_id, title - link: 'url', -})); -expectError(web.bookmarks.add({ - link: 'link', - title: 'test', // missing channel_id - type: 'link', -})); -expectError(web.bookmarks.add({ - title: 'test', // missing channel_id, link, type -})); -expectError(web.bookmarks.add({ - title: 'test', // missing channel_id, type - link: 'test.com', -})); -expectError(web.bookmarks.add({ - channel_id: 'C1234', - title: 'test', // missing link - type: 'link', -})); -expectError(web.bookmarks.add({ - link: 'test', // missing channel_id, title, type -})); -expectError(web.bookmarks.add({ - link: 'link', - title: 'test', // missing channel - type: 'link', -})); +expectError( + web.bookmarks.add({ + channel_id: 'C1234', // missing title, link, type + }), +); +expectError( + web.bookmarks.add({ + type: 'link', + channel_id: 'C1234', // missing title, link + }), +); +expectError( + web.bookmarks.add({ + title: 'link', + channel_id: 'C1234', // missing type, link + }), +); +expectError( + web.bookmarks.add({ + link: 'url.com', + channel_id: 'C1234', // missing type, channel_id + }), +); +expectError( + web.bookmarks.add({ + type: 'link', + channel_id: 'C1234', // missing link + title: 'test', + }), +); +expectError( + web.bookmarks.add({ + link: 'link', + channel_id: 'C1234', // missing type + title: 'test', + }), +); +expectError( + web.bookmarks.add({ + link: 'link', + channel_id: 'C1234', // missing title + type: 'link', + }), +); +expectError( + web.bookmarks.add({ + type: 'link', // missing channel_id, link, title + }), +); +expectError( + web.bookmarks.add({ + type: 'link', // missing channel_id, link + title: 'test', + }), +); +expectError( + web.bookmarks.add({ + type: 'link', // missing channel_id, title + link: 'url', + }), +); +expectError( + web.bookmarks.add({ + link: 'link', + title: 'test', // missing channel_id + type: 'link', + }), +); +expectError( + web.bookmarks.add({ + title: 'test', // missing channel_id, link, type + }), +); +expectError( + web.bookmarks.add({ + title: 'test', // missing channel_id, type + link: 'test.com', + }), +); +expectError( + web.bookmarks.add({ + channel_id: 'C1234', + title: 'test', // missing link + type: 'link', + }), +); +expectError( + web.bookmarks.add({ + link: 'test', // missing channel_id, title, type + }), +); +expectError( + web.bookmarks.add({ + link: 'link', + title: 'test', // missing channel + type: 'link', + }), +); // -- happy path -expectAssignable>([{ - type: 'link', - title: 'test', - channel_id: 'C1234', - link: 'example.com', -}]); +expectAssignable>([ + { + type: 'link', + title: 'test', + channel_id: 'C1234', + link: 'example.com', + }, +]); // bookmarks.edit // -- sad path expectError(web.bookmarks.edit()); // lacking argument expectError(web.bookmarks.edit({})); // empty argument -expectError(web.bookmarks.edit({ - channel_id: 'C1234', // missing bookmark_id -})); -expectError(web.bookmarks.edit({ - bookmark_id: 'B1234', // missing channel_id -})); +expectError( + web.bookmarks.edit({ + channel_id: 'C1234', // missing bookmark_id + }), +); +expectError( + web.bookmarks.edit({ + bookmark_id: 'B1234', // missing channel_id + }), +); // -- happy path -expectAssignable>([{ - channel_id: 'C1234', - bookmark_id: 'B1234', -}]); +expectAssignable>([ + { + channel_id: 'C1234', + bookmark_id: 'B1234', + }, +]); // bookmarks.list // -- sad path expectError(web.bookmarks.list()); // lacking argument expectError(web.bookmarks.list({})); // empty argument // -- happy path -expectAssignable>([{ - channel_id: 'C1234', -}]); +expectAssignable>([ + { + channel_id: 'C1234', + }, +]); // bookmarks.remove // -- sad path expectError(web.bookmarks.remove()); // lacking argument expectError(web.bookmarks.remove({})); // empty argument -expectError(web.bookmarks.remove({ - channel_id: 'C1234', // missing bookmark_id -})); -expectError(web.bookmarks.remove({ - bookmark_id: 'B1234', // missing channel_id -})); +expectError( + web.bookmarks.remove({ + channel_id: 'C1234', // missing bookmark_id + }), +); +expectError( + web.bookmarks.remove({ + bookmark_id: 'B1234', // missing channel_id + }), +); // -- happy path -expectAssignable>([{ - channel_id: 'C1234', - bookmark_id: 'B1234', -}]); +expectAssignable>([ + { + channel_id: 'C1234', + bookmark_id: 'B1234', + }, +]); diff --git a/packages/web-api/test/types/methods/calls.test-d.ts b/packages/web-api/test/types/methods/calls.test-d.ts index 438ba293d..9a9c2f79b 100644 --- a/packages/web-api/test/types/methods/calls.test-d.ts +++ b/packages/web-api/test/types/methods/calls.test-d.ts @@ -7,73 +7,97 @@ const web = new WebClient('TOKEN'); // -- sad path expectError(web.calls.add()); // lacking argument expectError(web.calls.add({})); // empty argument -expectError(web.calls.add({ - external_unique_id: '1234.566', // missing join_url -})); -expectError(web.calls.add({ - join_url: '1234.566', // missing external_unique_id -})); +expectError( + web.calls.add({ + external_unique_id: '1234.566', // missing join_url + }), +); +expectError( + web.calls.add({ + join_url: '1234.566', // missing external_unique_id + }), +); // -- happy path -expectAssignable>([{ - external_unique_id: '1234.566', - join_url: '1234.566', -}]); +expectAssignable>([ + { + external_unique_id: '1234.566', + join_url: '1234.566', + }, +]); // calls.end // -- sad path expectError(web.calls.end()); // lacking argument expectError(web.calls.end({})); // empty argument // -- happy path -expectAssignable>([{ - id: 'R1234', -}]); +expectAssignable>([ + { + id: 'R1234', + }, +]); // calls.info // -- sad path expectError(web.calls.info()); // lacking argument expectError(web.calls.info({})); // empty argument // -- happy path -expectAssignable>([{ - id: 'R1234', -}]); +expectAssignable>([ + { + id: 'R1234', + }, +]); // calls.update // -- sad path expectError(web.calls.update()); // lacking argument expectError(web.calls.update({})); // empty argument // -- happy path -expectAssignable>([{ - id: 'R1234', -}]); +expectAssignable>([ + { + id: 'R1234', + }, +]); // calls.participants.add // -- sad path expectError(web.calls.participants.add()); // lacking argument expectError(web.calls.participants.add({})); // empty argument -expectError(web.calls.participants.add({ - id: 'R1234', // missing users -})); -expectError(web.calls.participants.add({ - users: [], // missing id -})); +expectError( + web.calls.participants.add({ + id: 'R1234', // missing users + }), +); +expectError( + web.calls.participants.add({ + users: [], // missing id + }), +); // -- happy path -expectAssignable>([{ - id: 'R1234', - users: [], -}]); +expectAssignable>([ + { + id: 'R1234', + users: [], + }, +]); // calls.participants.remove // -- sad path expectError(web.calls.participants.remove()); // lacking argument expectError(web.calls.participants.remove({})); // empty argument -expectError(web.calls.participants.remove({ - id: 'R1234', // missing users -})); -expectError(web.calls.participants.remove({ - users: [], // missing id -})); +expectError( + web.calls.participants.remove({ + id: 'R1234', // missing users + }), +); +expectError( + web.calls.participants.remove({ + users: [], // missing id + }), +); // -- happy path -expectAssignable>([{ - id: 'R1234', - users: [], -}]); +expectAssignable>([ + { + id: 'R1234', + users: [], + }, +]); diff --git a/packages/web-api/test/types/methods/canvas.test-d.ts b/packages/web-api/test/types/methods/canvas.test-d.ts index 19c6740d5..38fbdd9b8 100644 --- a/packages/web-api/test/types/methods/canvas.test-d.ts +++ b/packages/web-api/test/types/methods/canvas.test-d.ts @@ -8,34 +8,46 @@ const web = new WebClient('TOKEN'); expectError(web.canvases.access.delete()); // lacking argument expectError(web.canvases.access.delete({})); // empty argument // -- happy path -expectAssignable>([{ - canvas_id: 'F1234', -}]); +expectAssignable>([ + { + canvas_id: 'F1234', + }, +]); // canvases.access.set // -- sad path expectError(web.canvases.access.set()); // lacking argument expectError(web.canvases.access.set({})); // empty argument -expectError(web.canvases.access.set({ - canvas_id: 'F1234', // missing access_level -})); -expectError(web.canvases.access.set({ - access_level: 'read', // missing canvas_id -})); +expectError( + web.canvases.access.set({ + canvas_id: 'F1234', // missing access_level + }), +); +expectError( + web.canvases.access.set({ + access_level: 'read', // missing canvas_id + }), +); // -- happy path -expectAssignable>([{ - canvas_id: 'F1234', - access_level: 'write', -}]); +expectAssignable>([ + { + canvas_id: 'F1234', + access_level: 'write', + }, +]); // canvases.create // -- sad path -expectError(web.canvases.create({ - document_content: 'heyo', // invalid document_content -})); -expectError(web.canvases.create({ - document_content: { type: 'mrkdwn', markdown: 'hihi' }, // invalid document_content -})); +expectError( + web.canvases.create({ + document_content: 'heyo', // invalid document_content + }), +); +expectError( + web.canvases.create({ + document_content: { type: 'mrkdwn', markdown: 'hihi' }, // invalid document_content + }), +); // -- happy path expectAssignable>([]); // no arg ok expectAssignable>([{}]); // all optional args @@ -44,129 +56,186 @@ expectAssignable>([{}]); // all optional // -- sad path expectError(web.canvases.sections.lookup()); // lacking argument expectError(web.canvases.sections.lookup({})); // empty argument -expectError(web.canvases.sections.lookup({ - canvas_id: 'F1234', // missing criteria -})); -expectError(web.canvases.sections.lookup({ - criteria: { contains_text: 'hi' }, // missing canvas_id -})); -expectError(web.canvases.sections.lookup({ - canvas_id: 'F1234', - criteria: {}, // empty criteria object -})); -expectError(web.canvases.sections.lookup({ - canvas_id: 'F1234', - criteria: { - section_types: [], // need at least one section type - }, -})); +expectError( + web.canvases.sections.lookup({ + canvas_id: 'F1234', // missing criteria + }), +); +expectError( + web.canvases.sections.lookup({ + criteria: { contains_text: 'hi' }, // missing canvas_id + }), +); +expectError( + web.canvases.sections.lookup({ + canvas_id: 'F1234', + criteria: {}, // empty criteria object + }), +); +expectError( + web.canvases.sections.lookup({ + canvas_id: 'F1234', + criteria: { + section_types: [], // need at least one section type + }, + }), +); // -- happy path -expectAssignable>([{ - canvas_id: 'F1234', - criteria: { contains_text: 'hi' }, -}]); -expectAssignable>([{ - canvas_id: 'F1234', - criteria: { section_types: ['any_header'] }, -}]); -expectAssignable>([{ - canvas_id: 'F1234', - criteria: { - section_types: ['any_header'], - contains_text: 'list', +expectAssignable>([ + { + canvas_id: 'F1234', + criteria: { contains_text: 'hi' }, + }, +]); +expectAssignable>([ + { + canvas_id: 'F1234', + criteria: { section_types: ['any_header'] }, }, -}]); +]); +expectAssignable>([ + { + canvas_id: 'F1234', + criteria: { + section_types: ['any_header'], + contains_text: 'list', + }, + }, +]); // canvases.delete // -- sad path expectError(web.canvases.delete()); // lacking argument expectError(web.canvases.delete({})); // empty argument // -- happy path -expectAssignable>([{ - canvas_id: 'F1234', -}]); +expectAssignable>([ + { + canvas_id: 'F1234', + }, +]); // canvases.edit // -- sad path expectError(web.canvases.edit()); // lacking argument expectError(web.canvases.edit({})); // empty argument -expectError(web.canvases.edit({ - canvas_id: 'F1234', // missing changes -})); -expectError(web.canvases.edit({ - changes: [{ - operation: 'delete', - section_id: 'S1234', - }], // missing canvas_id -})); -expectError(web.canvases.edit({ - changes: [], // minimum 1 change - canvas_id: 'F1234', -})); -expectError(web.canvases.edit({ - changes: [{ - document_content: { type: 'markdown', markdown: 'hihi' }, // missing operation - }], - canvas_id: 'F1234', -})); -expectError(web.canvases.edit({ - changes: [{ - operation: 'insert_after', - document_content: { type: 'markdown', markdown: 'hihi' }, // missing section_id for op: insert_after - }], - canvas_id: 'F1234', -})); -expectError(web.canvases.edit({ - changes: [{ - operation: 'insert_before', - section_id: '1234', // missing document_content for op: insert_before - }], - canvas_id: 'F1234', -})); -expectError(web.canvases.edit({ - changes: [{ - operation: 'insert_at_end', // missing document_content for op: insert_at_end - }], - canvas_id: 'F1234', -})); -expectError(web.canvases.edit({ - changes: [{ - operation: 'replace', // missing document_content for op: replace - section_id: '1234', - }], - canvas_id: 'F1234', -})); -expectError(web.canvases.edit({ - changes: [{ - operation: 'delete', // missing section_id for op: delete - }], - canvas_id: 'F1234', -})); +expectError( + web.canvases.edit({ + canvas_id: 'F1234', // missing changes + }), +); +expectError( + web.canvases.edit({ + changes: [ + { + operation: 'delete', + section_id: 'S1234', + }, + ], // missing canvas_id + }), +); +expectError( + web.canvases.edit({ + changes: [], // minimum 1 change + canvas_id: 'F1234', + }), +); +expectError( + web.canvases.edit({ + changes: [ + { + document_content: { type: 'markdown', markdown: 'hihi' }, // missing operation + }, + ], + canvas_id: 'F1234', + }), +); +expectError( + web.canvases.edit({ + changes: [ + { + operation: 'insert_after', + document_content: { type: 'markdown', markdown: 'hihi' }, // missing section_id for op: insert_after + }, + ], + canvas_id: 'F1234', + }), +); +expectError( + web.canvases.edit({ + changes: [ + { + operation: 'insert_before', + section_id: '1234', // missing document_content for op: insert_before + }, + ], + canvas_id: 'F1234', + }), +); +expectError( + web.canvases.edit({ + changes: [ + { + operation: 'insert_at_end', // missing document_content for op: insert_at_end + }, + ], + canvas_id: 'F1234', + }), +); +expectError( + web.canvases.edit({ + changes: [ + { + operation: 'replace', // missing document_content for op: replace + section_id: '1234', + }, + ], + canvas_id: 'F1234', + }), +); +expectError( + web.canvases.edit({ + changes: [ + { + operation: 'delete', // missing section_id for op: delete + }, + ], + canvas_id: 'F1234', + }), +); // -- happy path -expectAssignable>([{ - canvas_id: 'F1234', - changes: [{ - operation: 'insert_after', - document_content: { type: 'markdown', markdown: 'hihi' }, - section_id: '1234', - }, { - operation: 'insert_at_start', - document_content: { type: 'markdown', markdown: 'hihi' }, - }, { - operation: 'replace', - document_content: { type: 'markdown', markdown: 'hihi' }, - section_id: '1234', - }, { - operation: 'delete', - section_id: '1234', - }], -}]); +expectAssignable>([ + { + canvas_id: 'F1234', + changes: [ + { + operation: 'insert_after', + document_content: { type: 'markdown', markdown: 'hihi' }, + section_id: '1234', + }, + { + operation: 'insert_at_start', + document_content: { type: 'markdown', markdown: 'hihi' }, + }, + { + operation: 'replace', + document_content: { type: 'markdown', markdown: 'hihi' }, + section_id: '1234', + }, + { + operation: 'delete', + section_id: '1234', + }, + ], + }, +]); // conversations.canvases.create // -- sad path expectError(web.conversations.canvases.create()); // lacking argument expectError(web.conversations.canvases.create({})); // empty argument // -- happy path -expectAssignable>([{ - channel_id: 'C1234', -}]); +expectAssignable>([ + { + channel_id: 'C1234', + }, +]); diff --git a/packages/web-api/test/types/methods/chat.test-d.ts b/packages/web-api/test/types/methods/chat.test-d.ts index 530ebb088..cf5349a30 100644 --- a/packages/web-api/test/types/methods/chat.test-d.ts +++ b/packages/web-api/test/types/methods/chat.test-d.ts @@ -8,298 +8,408 @@ const web = new WebClient('TOKEN'); // -- sad path expectError(web.chat.delete()); // lacking argument expectError(web.chat.delete({})); // empty argument -expectError(web.chat.delete({ - channel: 'C1234', // missing ts -})); -expectError(web.chat.delete({ - ts: '1234.56', // missing channel -})); +expectError( + web.chat.delete({ + channel: 'C1234', // missing ts + }), +); +expectError( + web.chat.delete({ + ts: '1234.56', // missing channel + }), +); // -- happy path -expectAssignable>([{ - channel: 'C1234', - ts: '1234.56', -}]); +expectAssignable>([ + { + channel: 'C1234', + ts: '1234.56', + }, +]); // chat.deleteScheduledMessage // -- sad path expectError(web.chat.deleteScheduledMessage()); // lacking argument expectError(web.chat.deleteScheduledMessage({})); // empty argument -expectError(web.chat.deleteScheduledMessage({ - channel: 'C1234', // missing scheduled_message_id -})); -expectError(web.chat.deleteScheduledMessage({ - scheduled_message_id: 'Q1234', // missing channel -})); +expectError( + web.chat.deleteScheduledMessage({ + channel: 'C1234', // missing scheduled_message_id + }), +); +expectError( + web.chat.deleteScheduledMessage({ + scheduled_message_id: 'Q1234', // missing channel + }), +); // -- happy path -expectAssignable>([{ - channel: 'C1234', - scheduled_message_id: 'Q1234', -}]); +expectAssignable>([ + { + channel: 'C1234', + scheduled_message_id: 'Q1234', + }, +]); // chat.getPermalink // -- sad path expectError(web.chat.getPermalink()); // lacking argument expectError(web.chat.getPermalink({})); // empty argument -expectError(web.chat.getPermalink({ - channel: 'C1234', // missing message_ts -})); -expectError(web.chat.getPermalink({ - message_ts: '1234.56', // missing channel -})); +expectError( + web.chat.getPermalink({ + channel: 'C1234', // missing message_ts + }), +); +expectError( + web.chat.getPermalink({ + message_ts: '1234.56', // missing channel + }), +); // -- happy path -expectAssignable>([{ - channel: 'C1234', - message_ts: '1234.56', -}]); +expectAssignable>([ + { + channel: 'C1234', + message_ts: '1234.56', + }, +]); // chat.meMessage // -- sad path expectError(web.chat.meMessage()); // lacking argument expectError(web.chat.meMessage({})); // empty argument -expectError(web.chat.meMessage({ - channel: 'C1234', // missing text -})); -expectError(web.chat.meMessage({ - text: '1234.56', // missing channel -})); +expectError( + web.chat.meMessage({ + channel: 'C1234', // missing text + }), +); +expectError( + web.chat.meMessage({ + text: '1234.56', // missing channel + }), +); // -- happy path -expectAssignable>([{ - channel: 'C1234', - text: '1234.56', -}]); +expectAssignable>([ + { + channel: 'C1234', + text: '1234.56', + }, +]); // chat.postEphemeral // -- sad path expectError(web.chat.postEphemeral()); // lacking argument expectError(web.chat.postEphemeral({})); // empty argument -expectError(web.chat.postEphemeral({ - channel: 'C1234', // missing text/attachments/blocks and user -})); -expectError(web.chat.postEphemeral({ - channel: 'C1234', // missing text/attachments/blocks - user: 'U1234', -})); -expectError(web.chat.postEphemeral({ - channel: 'C1234', // missing user - text: 'U1234', -})); -expectError(web.chat.postEphemeral({ - user: 'U1234', // missing channel - text: 'U1234', -})); -expectError(web.chat.postEphemeral({ - channel: 'C1234', // missing user - blocks: [], -})); -expectError(web.chat.postEphemeral({ - user: 'U1234', // missing channel - blocks: [], -})); -expectError(web.chat.postEphemeral({ - channel: 'C1234', // missing user - attachments: [], -})); -expectError(web.chat.postEphemeral({ - user: 'U1234', // missing channel - attachments: [], -})); -expectError(web.chat.postEphemeral({ - channel: 'C123', - user: 'U1234', - attachments: [], - icon_url: 'someurl.png', - icon_emoji: 'smile', // cannot use both icon_url and icon_emoji -})); -expectError(web.chat.postEphemeral({ - channel: 'C123', - user: 'U1234', - attachments: [], - icon_url: 'someurl.png', - as_user: true, // cannot set both as_user=true and icon_url -})); -expectError(web.chat.postEphemeral({ - channel: 'C123', - user: 'U1234', - attachments: [], - icon_emoji: 'smile', - as_user: true, // cannot set both as_user=true and icon_emoji -})); +expectError( + web.chat.postEphemeral({ + channel: 'C1234', // missing text/attachments/blocks and user + }), +); +expectError( + web.chat.postEphemeral({ + channel: 'C1234', // missing text/attachments/blocks + user: 'U1234', + }), +); +expectError( + web.chat.postEphemeral({ + channel: 'C1234', // missing user + text: 'U1234', + }), +); +expectError( + web.chat.postEphemeral({ + user: 'U1234', // missing channel + text: 'U1234', + }), +); +expectError( + web.chat.postEphemeral({ + channel: 'C1234', // missing user + blocks: [], + }), +); +expectError( + web.chat.postEphemeral({ + user: 'U1234', // missing channel + blocks: [], + }), +); +expectError( + web.chat.postEphemeral({ + channel: 'C1234', // missing user + attachments: [], + }), +); +expectError( + web.chat.postEphemeral({ + user: 'U1234', // missing channel + attachments: [], + }), +); +expectError( + web.chat.postEphemeral({ + channel: 'C123', + user: 'U1234', + attachments: [], + icon_url: 'someurl.png', + icon_emoji: 'smile', // cannot use both icon_url and icon_emoji + }), +); +expectError( + web.chat.postEphemeral({ + channel: 'C123', + user: 'U1234', + attachments: [], + icon_url: 'someurl.png', + as_user: true, // cannot set both as_user=true and icon_url + }), +); +expectError( + web.chat.postEphemeral({ + channel: 'C123', + user: 'U1234', + attachments: [], + icon_emoji: 'smile', + as_user: true, // cannot set both as_user=true and icon_emoji + }), +); // -- happy path -expectAssignable>([{ - channel: 'C1234', - user: 'U1234', - text: '1234.56', -}]); -expectAssignable>([{ - channel: 'C1234', - user: 'U1234', - blocks: [], -}]); -expectAssignable>([{ - channel: 'C1234', - user: 'U1234', - blocks: [], - text: 'fallback', -}]); -expectAssignable>([{ - channel: 'C1234', - user: 'U1234', - attachments: [], -}]); -expectAssignable>([{ - channel: 'C1234', - user: 'U1234', - attachments: [], - text: 'fallback', -}]); -expectAssignable>([{ - channel: 'C1234', - user: 'U1234', - attachments: [], - as_user: true, // can pass as_user=true if no icon or username fields set -}]); -expectAssignable>([{ - channel: 'C1234', - user: 'U1234', - attachments: [], - icon_emoji: 'smile', // icon can be set on its own... -}]); -expectAssignable>([{ - channel: 'C1234', - user: 'U1234', - attachments: [], - icon_emoji: 'smile', - as_user: false, // ... or with as_user=false -}]); -expectAssignable>([{ - channel: 'C1234', - user: 'U1234', - attachments: [], - icon_url: 'someurl.png', // icon can be set on its own... -}]); -expectAssignable>([{ - channel: 'C1234', - user: 'U1234', - attachments: [], - icon_emoji: 'someurl.png', - as_user: false, // ... or with as_user=false -}]); +expectAssignable>([ + { + channel: 'C1234', + user: 'U1234', + text: '1234.56', + }, +]); +expectAssignable>([ + { + channel: 'C1234', + user: 'U1234', + blocks: [], + }, +]); +expectAssignable>([ + { + channel: 'C1234', + user: 'U1234', + blocks: [], + text: 'fallback', + }, +]); +expectAssignable>([ + { + channel: 'C1234', + user: 'U1234', + attachments: [], + }, +]); +expectAssignable>([ + { + channel: 'C1234', + user: 'U1234', + attachments: [], + text: 'fallback', + }, +]); +expectAssignable>([ + { + channel: 'C1234', + user: 'U1234', + attachments: [], + as_user: true, // can pass as_user=true if no icon or username fields set + }, +]); +expectAssignable>([ + { + channel: 'C1234', + user: 'U1234', + attachments: [], + icon_emoji: 'smile', // icon can be set on its own... + }, +]); +expectAssignable>([ + { + channel: 'C1234', + user: 'U1234', + attachments: [], + icon_emoji: 'smile', + as_user: false, // ... or with as_user=false + }, +]); +expectAssignable>([ + { + channel: 'C1234', + user: 'U1234', + attachments: [], + icon_url: 'someurl.png', // icon can be set on its own... + }, +]); +expectAssignable>([ + { + channel: 'C1234', + user: 'U1234', + attachments: [], + icon_emoji: 'someurl.png', + as_user: false, // ... or with as_user=false + }, +]); // chat.postMessage // -- sad path expectError(web.chat.postMessage()); // lacking argument expectError(web.chat.postMessage({})); // empty argument -expectError(web.chat.postMessage({ - channel: 'C1234', // missing text/attachments/blocks -})); -expectError(web.chat.postMessage({ - text: 'U1234', // missing channel -})); -expectError(web.chat.postMessage({ - blocks: [], // missing channel -})); -expectError(web.chat.postMessage({ - attachments: [], // missing channel -})); -expectError(web.chat.postMessage({ - channel: 'C123', - attachments: [], - icon_url: 'someurl.png', - icon_emoji: 'smile', // cannot use both icon_url and icon_emoji -})); -expectError(web.chat.postMessage({ - channel: 'C123', - attachments: [], - icon_url: 'someurl.png', - as_user: true, // cannot set both as_user=true and icon_url -})); -expectError(web.chat.postMessage({ - channel: 'C123', - attachments: [], - icon_emoji: 'smile', - as_user: true, // cannot set both as_user=true and icon_emoji -})); -expectError(web.chat.postMessage({ - channel: 'C123', - attachments: [], - reply_broadcast: true, // cannot reply_broadcast=true without setting thread_ts -})); +expectError( + web.chat.postMessage({ + channel: 'C1234', // missing text/attachments/blocks + }), +); +expectError( + web.chat.postMessage({ + text: 'U1234', // missing channel + }), +); +expectError( + web.chat.postMessage({ + blocks: [], // missing channel + }), +); +expectError( + web.chat.postMessage({ + attachments: [], // missing channel + }), +); +expectError( + web.chat.postMessage({ + channel: 'C123', + attachments: [], + icon_url: 'someurl.png', + icon_emoji: 'smile', // cannot use both icon_url and icon_emoji + }), +); +expectError( + web.chat.postMessage({ + channel: 'C123', + attachments: [], + icon_url: 'someurl.png', + as_user: true, // cannot set both as_user=true and icon_url + }), +); +expectError( + web.chat.postMessage({ + channel: 'C123', + attachments: [], + icon_emoji: 'smile', + as_user: true, // cannot set both as_user=true and icon_emoji + }), +); +expectError( + web.chat.postMessage({ + channel: 'C123', + attachments: [], + reply_broadcast: true, // cannot reply_broadcast=true without setting thread_ts + }), +); // -- happy path -expectAssignable>([{ - channel: 'C1234', - text: '1234.56', -}]); -expectAssignable>([{ - channel: 'C1234', - blocks: [], -}]); -expectAssignable>([{ - channel: 'C1234', - blocks: [], - text: 'fallback', -}]); -expectAssignable>([{ - channel: 'C1234', - attachments: [], -}]); -expectAssignable>([{ - channel: 'C1234', - attachments: [], - text: 'fallback', -}]); -expectAssignable>([{ - channel: 'C1234', - attachments: [], - as_user: true, // can pass as_user=true if no icon or username fields set -}]); -expectAssignable>([{ - channel: 'C1234', - attachments: [], - icon_emoji: 'smile', // icon can be set on its own... -}]); -expectAssignable>([{ - channel: 'C1234', - attachments: [], - icon_emoji: 'smile', - as_user: false, // ... or with as_user=false -}]); -expectAssignable>([{ - channel: 'C1234', - attachments: [], - icon_url: 'someurl.png', // icon can be set on its own... -}]); -expectAssignable>([{ - channel: 'C1234', - attachments: [], - icon_emoji: 'someurl.png', - as_user: false, // ... or with as_user=false -}]); -expectAssignable>([{ - channel: 'C1234', - text: 'hello', - thread_ts: '1234.56', // can send a threaded message -}]); -expectAssignable>([{ - channel: 'C1234', - text: 'hello', - thread_ts: '1234.56', - reply_broadcast: true, // can send a threaded message and broadcast it, too -}]); -expectAssignable>([{ - channel: 'C1234', - blocks: [], - thread_ts: '1234.56', - reply_broadcast: false, // can send a threaded message and explicitly not broadcast it -}]); -// adding a test for when `reply_broadcast` specific boolean value is not known ahead of time -// https://github.com/slackapi/node-slack-sdk/issues/1859 -function wideBooleanTest(b: boolean) { - expectAssignable>([{ +expectAssignable>([ + { + channel: 'C1234', + text: '1234.56', + }, +]); +expectAssignable>([ + { + channel: 'C1234', + blocks: [], + }, +]); +expectAssignable>([ + { + channel: 'C1234', + blocks: [], + text: 'fallback', + }, +]); +expectAssignable>([ + { + channel: 'C1234', + attachments: [], + }, +]); +expectAssignable>([ + { + channel: 'C1234', + attachments: [], + text: 'fallback', + }, +]); +expectAssignable>([ + { + channel: 'C1234', + attachments: [], + as_user: true, // can pass as_user=true if no icon or username fields set + }, +]); +expectAssignable>([ + { + channel: 'C1234', + attachments: [], + icon_emoji: 'smile', // icon can be set on its own... + }, +]); +expectAssignable>([ + { + channel: 'C1234', + attachments: [], + icon_emoji: 'smile', + as_user: false, // ... or with as_user=false + }, +]); +expectAssignable>([ + { + channel: 'C1234', + attachments: [], + icon_url: 'someurl.png', // icon can be set on its own... + }, +]); +expectAssignable>([ + { + channel: 'C1234', + attachments: [], + icon_emoji: 'someurl.png', + as_user: false, // ... or with as_user=false + }, +]); +expectAssignable>([ + { + channel: 'C1234', + text: 'hello', + thread_ts: '1234.56', // can send a threaded message + }, +]); +expectAssignable>([ + { + channel: 'C1234', + text: 'hello', + thread_ts: '1234.56', + reply_broadcast: true, // can send a threaded message and broadcast it, too + }, +]); +expectAssignable>([ + { channel: 'C1234', blocks: [], thread_ts: '1234.56', - reply_broadcast: b, // can reply_broadcast be parameterized? - }]); + reply_broadcast: false, // can send a threaded message and explicitly not broadcast it + }, +]); +// adding a test for when `reply_broadcast` specific boolean value is not known ahead of time +// https://github.com/slackapi/node-slack-sdk/issues/1859 +function wideBooleanTest(b: boolean) { + expectAssignable>([ + { + channel: 'C1234', + blocks: [], + thread_ts: '1234.56', + reply_broadcast: b, // can reply_broadcast be parameterized? + }, + ]); } wideBooleanTest(true); wideBooleanTest(false); @@ -308,84 +418,116 @@ wideBooleanTest(false); // -- sad path expectError(web.chat.scheduleMessage()); // lacking argument expectError(web.chat.scheduleMessage({})); // empty argument -expectError(web.chat.scheduleMessage({ - channel: 'C1234', // missing text/attachments/blocks and post_at -})); -expectError(web.chat.scheduleMessage({ - channel: 'C1234', // missing text/attachments/blocks - post_at: 'U1234', -})); -expectError(web.chat.scheduleMessage({ - channel: 'C1234', // missing post_at - text: 'U1234', -})); -expectError(web.chat.scheduleMessage({ - post_at: 'U1234', // missing channel - text: 'U1234', -})); -expectError(web.chat.scheduleMessage({ - channel: 'C1234', // missing post_at - blocks: [], -})); -expectError(web.chat.scheduleMessage({ - post_at: 'U1234', // missing channel - blocks: [], -})); -expectError(web.chat.scheduleMessage({ - channel: 'C1234', // missing post_at - attachments: [], -})); -expectError(web.chat.scheduleMessage({ - post_at: 'U1234', // missing channel - attachments: [], -})); -expectError(web.chat.scheduleMessage({ - post_at: 17000000000, - channel: 'C123', - attachments: [], - reply_broadcast: true, // cannot reply_broadcast=true without setting thread_ts -})); +expectError( + web.chat.scheduleMessage({ + channel: 'C1234', // missing text/attachments/blocks and post_at + }), +); +expectError( + web.chat.scheduleMessage({ + channel: 'C1234', // missing text/attachments/blocks + post_at: 'U1234', + }), +); +expectError( + web.chat.scheduleMessage({ + channel: 'C1234', // missing post_at + text: 'U1234', + }), +); +expectError( + web.chat.scheduleMessage({ + post_at: 'U1234', // missing channel + text: 'U1234', + }), +); +expectError( + web.chat.scheduleMessage({ + channel: 'C1234', // missing post_at + blocks: [], + }), +); +expectError( + web.chat.scheduleMessage({ + post_at: 'U1234', // missing channel + blocks: [], + }), +); +expectError( + web.chat.scheduleMessage({ + channel: 'C1234', // missing post_at + attachments: [], + }), +); +expectError( + web.chat.scheduleMessage({ + post_at: 'U1234', // missing channel + attachments: [], + }), +); +expectError( + web.chat.scheduleMessage({ + post_at: 17000000000, + channel: 'C123', + attachments: [], + reply_broadcast: true, // cannot reply_broadcast=true without setting thread_ts + }), +); // -- happy path -expectAssignable>([{ - channel: 'C1234', - post_at: 'U1234', - text: '1234.56', -}]); -expectAssignable>([{ - channel: 'C1234', - post_at: 'U1234', - blocks: [], -}]); -expectAssignable>([{ - channel: 'C1234', - post_at: 'U1234', - blocks: [], - text: 'fallback', -}]); -expectAssignable>([{ - channel: 'C1234', - post_at: 'U1234', - attachments: [], -}]); -expectAssignable>([{ - channel: 'C1234', - post_at: 'U1234', - attachments: [], - text: 'fallback', -}]); -expectAssignable>([{ - channel: 'C1234', - text: 'hello', - post_at: 180000000, - thread_ts: '1234.56', // can send a threaded message -}]); -expectAssignable>([{ - channel: 'C1234', - text: 'hello', - thread_ts: '1234.56', - post_at: 19000000, - reply_broadcast: true, // can send a threaded message and broadcast it, too -}]); +expectAssignable>([ + { + channel: 'C1234', + post_at: 'U1234', + text: '1234.56', + }, +]); +expectAssignable>([ + { + channel: 'C1234', + post_at: 'U1234', + blocks: [], + }, +]); +expectAssignable>([ + { + channel: 'C1234', + post_at: 'U1234', + blocks: [], + text: 'fallback', + }, +]); +expectAssignable>([ + { + channel: 'C1234', + post_at: 'U1234', + attachments: [], + }, +]); +expectAssignable>([ + { + channel: 'C1234', + post_at: 'U1234', + attachments: [], + text: 'fallback', + }, +]); +expectAssignable>([ + { + channel: 'C1234', + text: 'hello', + post_at: 180000000, + thread_ts: '1234.56', // can send a threaded message + }, +]); +expectAssignable>([ + { + channel: 'C1234', + text: 'hello', + thread_ts: '1234.56', + post_at: 19000000, + reply_broadcast: true, // can send a threaded message and broadcast it, too + }, +]); // chat.scheduledMessages.list // -- sad path @@ -397,123 +539,177 @@ expectAssignable>([]); // no // -- sad path expectError(web.chat.unfurl()); // lacking argument expectError(web.chat.unfurl({})); // empty argument -expectError(web.chat.unfurl({ - channel: 'C1234', // missing ts and unfurls -})); -expectError(web.chat.unfurl({ - channel: 'C1234', // missing unfurls - ts: '1234.56', -})); -expectError(web.chat.unfurl({ - ts: '1234.56', - unfurls: {}, -})); -expectError(web.chat.unfurl({ - channel: 'C1234', - unfurls: {}, -})); -expectError(web.chat.unfurl({ - source: 'composer', // missing unfurl_id and unfurls -})); -expectError(web.chat.unfurl({ - source: 'composer', // missing unfurls - unfurl_id: '1234', -})); -expectError(web.chat.unfurl({ - unfurl_id: '1234.56', - unfurls: {}, -})); -expectError(web.chat.unfurl({ - source: 'conversations_history', - unfurls: {}, -})); +expectError( + web.chat.unfurl({ + channel: 'C1234', // missing ts and unfurls + }), +); +expectError( + web.chat.unfurl({ + channel: 'C1234', // missing unfurls + ts: '1234.56', + }), +); +expectError( + web.chat.unfurl({ + ts: '1234.56', + unfurls: {}, + }), +); +expectError( + web.chat.unfurl({ + channel: 'C1234', + unfurls: {}, + }), +); +expectError( + web.chat.unfurl({ + source: 'composer', // missing unfurl_id and unfurls + }), +); +expectError( + web.chat.unfurl({ + source: 'composer', // missing unfurls + unfurl_id: '1234', + }), +); +expectError( + web.chat.unfurl({ + unfurl_id: '1234.56', + unfurls: {}, + }), +); +expectError( + web.chat.unfurl({ + source: 'conversations_history', + unfurls: {}, + }), +); // -- happy path -expectAssignable>([{ - unfurls: {}, - source: 'conversations_history', - unfurl_id: '12345', -}]); -expectAssignable>([{ - unfurls: {}, - channel: 'C1234', - ts: '1234.56', -}]); +expectAssignable>([ + { + unfurls: {}, + source: 'conversations_history', + unfurl_id: '12345', + }, +]); +expectAssignable>([ + { + unfurls: {}, + channel: 'C1234', + ts: '1234.56', + }, +]); // chat.update // -- sad path expectError(web.chat.update()); // lacking argument expectError(web.chat.update({})); // empty argument -expectError(web.chat.update({ - channel: 'C1234', // missing text/attachments/blocks and ts -})); -expectError(web.chat.update({ - channel: 'C1234', // missing text/attachments/blocks - ts: '1234.56', -})); -expectError(web.chat.update({ - text: 'U1234', // missing channel and ts -})); -expectError(web.chat.update({ - text: 'U1234', // missing channel - ts: '1234.56', -})); -expectError(web.chat.update({ - text: 'U1234', // missing ts - channel: 'C1234', -})); -expectError(web.chat.update({ - blocks: [], // missing channel and ts -})); -expectError(web.chat.update({ - blocks: [], // missing channel - ts: '1234.56', -})); -expectError(web.chat.update({ - blocks: [], // missing ts - channel: 'C1234', -})); -expectError(web.chat.update({ - attachments: [], // missing channel and ts -})); -expectError(web.chat.update({ - attachments: [], // missing channel - ts: '1234.56', -})); -expectError(web.chat.update({ - attachments: [], // missing ts - channel: 'C1234', -})); +expectError( + web.chat.update({ + channel: 'C1234', // missing text/attachments/blocks and ts + }), +); +expectError( + web.chat.update({ + channel: 'C1234', // missing text/attachments/blocks + ts: '1234.56', + }), +); +expectError( + web.chat.update({ + text: 'U1234', // missing channel and ts + }), +); +expectError( + web.chat.update({ + text: 'U1234', // missing channel + ts: '1234.56', + }), +); +expectError( + web.chat.update({ + text: 'U1234', // missing ts + channel: 'C1234', + }), +); +expectError( + web.chat.update({ + blocks: [], // missing channel and ts + }), +); +expectError( + web.chat.update({ + blocks: [], // missing channel + ts: '1234.56', + }), +); +expectError( + web.chat.update({ + blocks: [], // missing ts + channel: 'C1234', + }), +); +expectError( + web.chat.update({ + attachments: [], // missing channel and ts + }), +); +expectError( + web.chat.update({ + attachments: [], // missing channel + ts: '1234.56', + }), +); +expectError( + web.chat.update({ + attachments: [], // missing ts + channel: 'C1234', + }), +); // -- happy path -expectAssignable>([{ - channel: 'C1234', - ts: '1234.56', - text: '1234.56', -}]); -expectAssignable>([{ - channel: 'C1234', - ts: '1234.56', - blocks: [], -}]); -expectAssignable>([{ - channel: 'C1234', - ts: '1234.56', - blocks: [], - text: 'fallback', -}]); -expectAssignable>([{ - channel: 'C1234', - ts: '1234.56', - attachments: [], -}]); -expectAssignable>([{ - channel: 'C1234', - ts: '1234.56', - attachments: [], - text: 'fallback', -}]); -expectAssignable>([{ - channel: 'C1234', - ts: '1234.56', - text: 'hello', - reply_broadcast: true, // can broadcast a threaded msg -}]); +expectAssignable>([ + { + channel: 'C1234', + ts: '1234.56', + text: '1234.56', + }, +]); +expectAssignable>([ + { + channel: 'C1234', + ts: '1234.56', + blocks: [], + }, +]); +expectAssignable>([ + { + channel: 'C1234', + ts: '1234.56', + blocks: [], + text: 'fallback', + }, +]); +expectAssignable>([ + { + channel: 'C1234', + ts: '1234.56', + attachments: [], + }, +]); +expectAssignable>([ + { + channel: 'C1234', + ts: '1234.56', + attachments: [], + text: 'fallback', + }, +]); +expectAssignable>([ + { + channel: 'C1234', + ts: '1234.56', + text: 'hello', + reply_broadcast: true, // can broadcast a threaded msg + }, +]); diff --git a/packages/web-api/test/types/methods/conversations.test-d.ts b/packages/web-api/test/types/methods/conversations.test-d.ts index a23df782e..197da1d30 100644 --- a/packages/web-api/test/types/methods/conversations.test-d.ts +++ b/packages/web-api/test/types/methods/conversations.test-d.ts @@ -8,69 +8,89 @@ const web = new WebClient('TOKEN'); // -- sad path expectError(web.conversations.acceptSharedInvite()); // lacking argument expectError(web.conversations.acceptSharedInvite({})); // empty argument -expectError(web.conversations.acceptSharedInvite({ - channel_name: 'puppies-r-us', // missing invite_id or channel_id -})); -expectError(web.conversations.acceptSharedInvite({ - channel_id: 'C1234', // missing channel_name -})); -expectError(web.conversations.acceptSharedInvite({ - invite_id: 'I1234', // missing channel_name -})); +expectError( + web.conversations.acceptSharedInvite({ + channel_name: 'puppies-r-us', // missing invite_id or channel_id + }), +); +expectError( + web.conversations.acceptSharedInvite({ + channel_id: 'C1234', // missing channel_name + }), +); +expectError( + web.conversations.acceptSharedInvite({ + invite_id: 'I1234', // missing channel_name + }), +); // -- happy path -expectAssignable>([{ - channel_name: 'puppies-r-us', - invite_id: 'I1234', -}]); -expectAssignable>([{ - channel_name: 'puppies-r-us', - channel_id: 'C1234', -}]); +expectAssignable>([ + { + channel_name: 'puppies-r-us', + invite_id: 'I1234', + }, +]); +expectAssignable>([ + { + channel_name: 'puppies-r-us', + channel_id: 'C1234', + }, +]); // conversations.approveSharedInvite // -- sad path expectError(web.conversations.approveSharedInvite()); // lacking argument expectError(web.conversations.approveSharedInvite({})); // empty argument // -- happy path -expectAssignable>([{ - invite_id: 'I1234', -}]); +expectAssignable>([ + { + invite_id: 'I1234', + }, +]); // conversations.archive // -- sad path expectError(web.conversations.archive()); // lacking argument expectError(web.conversations.archive({})); // empty argument // -- happy path -expectAssignable>([{ - channel: 'C1234', -}]); +expectAssignable>([ + { + channel: 'C1234', + }, +]); // conversations.close // -- sad path expectError(web.conversations.close()); // lacking argument expectError(web.conversations.close({})); // empty argument // -- happy path -expectAssignable>([{ - channel: 'C1234', -}]); +expectAssignable>([ + { + channel: 'C1234', + }, +]); // conversations.create // -- sad path expectError(web.conversations.create()); // lacking argument expectError(web.conversations.create({})); // empty argument // -- happy path -expectAssignable>([{ - name: 'grunge-fans', -}]); +expectAssignable>([ + { + name: 'grunge-fans', + }, +]); // conversations.declineSharedInvite // -- sad path expectError(web.conversations.declineSharedInvite()); // lacking argument expectError(web.conversations.declineSharedInvite({})); // empty argument // -- happy path -expectAssignable>([{ - invite_id: 'I1234', -}]); +expectAssignable>([ + { + invite_id: 'I1234', + }, +]); // conversations.externalInvitePermissions.set // -- sad path @@ -83,107 +103,141 @@ expectError(web.conversations.externalInvitePermissions.set({ action: 'upgrade', expectError(web.conversations.externalInvitePermissions.set({ channel: 'C1234', target_team: 'T1234' })); // missing action expectError(web.conversations.externalInvitePermissions.set({ target_team: 'T1234', action: 'downgrade' })); // missing channel // -- happy path -expectAssignable>([{ - channel: 'C1234', - target_team: 'T1234', - action: 'upgrade', -}]); +expectAssignable>([ + { + channel: 'C1234', + target_team: 'T1234', + action: 'upgrade', + }, +]); // conversations.history // -- sad path expectError(web.conversations.history()); // lacking argument expectError(web.conversations.history({})); // empty argument // -- happy path -expectAssignable>([{ - channel: 'C1234', -}]); +expectAssignable>([ + { + channel: 'C1234', + }, +]); // conversations.info // -- sad path expectError(web.conversations.info()); // lacking argument expectError(web.conversations.info({})); // empty argument // -- happy path -expectAssignable>([{ - channel: 'C1234', -}]); +expectAssignable>([ + { + channel: 'C1234', + }, +]); // conversations.invite // -- sad path expectError(web.conversations.invite()); // lacking argument expectError(web.conversations.invite({})); // empty argument -expectError(web.conversations.invite({ - channel: 'C1234', // missing users -})); -expectError(web.conversations.invite({ - users: 'U1234', // missing channel -})); +expectError( + web.conversations.invite({ + channel: 'C1234', // missing users + }), +); +expectError( + web.conversations.invite({ + users: 'U1234', // missing channel + }), +); // -- happy path -expectAssignable>([{ - channel: 'C1234', - users: 'U1234', -}]); +expectAssignable>([ + { + channel: 'C1234', + users: 'U1234', + }, +]); // conversations.inviteShared // -- sad path expectError(web.conversations.inviteShared()); // lacking argument expectError(web.conversations.inviteShared({})); // empty argument -expectError(web.conversations.inviteShared({ - channel: 'C1234', // missing emails or user_ids -})); -expectError(web.conversations.inviteShared({ - user_ids: ['U1234'], // missing channel -})); -expectError(web.conversations.inviteShared({ - emails: ['ceo@salesforce.com'], // missing channel -})); -expectError(web.conversations.inviteShared({ - channel: 'C1234', - emails: ['ceo@salesforce.com'], - user_ids: ['U1234'], // either emails or user_ids, but not both -})); +expectError( + web.conversations.inviteShared({ + channel: 'C1234', // missing emails or user_ids + }), +); +expectError( + web.conversations.inviteShared({ + user_ids: ['U1234'], // missing channel + }), +); +expectError( + web.conversations.inviteShared({ + emails: ['ceo@salesforce.com'], // missing channel + }), +); +expectError( + web.conversations.inviteShared({ + channel: 'C1234', + emails: ['ceo@salesforce.com'], + user_ids: ['U1234'], // either emails or user_ids, but not both + }), +); // -- happy path -expectAssignable>([{ - channel: 'C1234', - user_ids: ['U1234'], -}]); -expectAssignable>([{ - channel: 'C1234', - emails: ['ceo@salesforce.com'], -}]); +expectAssignable>([ + { + channel: 'C1234', + user_ids: ['U1234'], + }, +]); +expectAssignable>([ + { + channel: 'C1234', + emails: ['ceo@salesforce.com'], + }, +]); // conversations.join // -- sad path expectError(web.conversations.join()); // lacking argument expectError(web.conversations.join({})); // empty argument // -- happy path -expectAssignable>([{ - channel: 'C1234', -}]); +expectAssignable>([ + { + channel: 'C1234', + }, +]); // conversations.kick // -- sad path expectError(web.conversations.kick()); // lacking argument expectError(web.conversations.kick({})); // empty argument -expectError(web.conversations.kick({ - channel: 'C1234', // missing user -})); -expectError(web.conversations.kick({ - user: 'U1234', // missing channel -})); +expectError( + web.conversations.kick({ + channel: 'C1234', // missing user + }), +); +expectError( + web.conversations.kick({ + user: 'U1234', // missing channel + }), +); // -- happy path -expectAssignable>([{ - channel: 'C1234', - user: 'U1234', -}]); +expectAssignable>([ + { + channel: 'C1234', + user: 'U1234', + }, +]); // conversations.leave // -- sad path expectError(web.conversations.leave()); // lacking argument expectError(web.conversations.leave({})); // empty argument // -- happy path -expectAssignable>([{ - channel: 'C1234', -}]); +expectAssignable>([ + { + channel: 'C1234', + }, +]); // conversations.list // -- sad path @@ -201,108 +255,146 @@ expectAssignable>([]); / // -- sad path expectError(web.conversations.mark()); // lacking argument expectError(web.conversations.mark({})); // empty argument -expectError(web.conversations.mark({ - channel: 'C1234', // missing ts -})); -expectError(web.conversations.mark({ - ts: '12345.67', // missing channel -})); +expectError( + web.conversations.mark({ + channel: 'C1234', // missing ts + }), +); +expectError( + web.conversations.mark({ + ts: '12345.67', // missing channel + }), +); // -- happy path -expectAssignable>([{ - channel: 'C1234', - ts: '12345.67', -}]); +expectAssignable>([ + { + channel: 'C1234', + ts: '12345.67', + }, +]); // conversations.members // -- sad path expectError(web.conversations.members()); // lacking argument expectError(web.conversations.members({})); // empty argument // -- happy path -expectAssignable>([{ - channel: 'C1234', -}]); +expectAssignable>([ + { + channel: 'C1234', + }, +]); // conversations.open // -- sad path expectError(web.conversations.open()); // lacking argument expectError(web.conversations.open({})); // empty argument // -- happy path -expectAssignable>([{ - channel: 'C1234', -}]); -expectAssignable>([{ - users: 'U1234,U2345', -}]); +expectAssignable>([ + { + channel: 'C1234', + }, +]); +expectAssignable>([ + { + users: 'U1234,U2345', + }, +]); // conversations.rename // -- sad path expectError(web.conversations.rename()); // lacking argument expectError(web.conversations.rename({})); // empty argument -expectError(web.conversations.rename({ - channel: 'C1234', // missing name -})); -expectError(web.conversations.rename({ - name: 'batman-fans', // missing channel -})); +expectError( + web.conversations.rename({ + channel: 'C1234', // missing name + }), +); +expectError( + web.conversations.rename({ + name: 'batman-fans', // missing channel + }), +); // -- happy path -expectAssignable>([{ - channel: 'C1234', - name: 'batman-fans', -}]); +expectAssignable>([ + { + channel: 'C1234', + name: 'batman-fans', + }, +]); // conversations.replies // -- sad path expectError(web.conversations.replies()); // lacking argument expectError(web.conversations.replies({})); // empty argument -expectError(web.conversations.replies({ - channel: 'C1234', // missing ts -})); -expectError(web.conversations.replies({ - ts: '12345.67', // missing channel -})); +expectError( + web.conversations.replies({ + channel: 'C1234', // missing ts + }), +); +expectError( + web.conversations.replies({ + ts: '12345.67', // missing channel + }), +); // -- happy path -expectAssignable>([{ - channel: 'C1234', - ts: '12345.67', -}]); +expectAssignable>([ + { + channel: 'C1234', + ts: '12345.67', + }, +]); // conversations.setPurpose // -- sad path expectError(web.conversations.setPurpose()); // lacking argument expectError(web.conversations.setPurpose({})); // empty argument -expectError(web.conversations.setPurpose({ - channel: 'C1234', // missing purpose -})); -expectError(web.conversations.setPurpose({ - purpose: 'Feed the world', // missing channel -})); +expectError( + web.conversations.setPurpose({ + channel: 'C1234', // missing purpose + }), +); +expectError( + web.conversations.setPurpose({ + purpose: 'Feed the world', // missing channel + }), +); // -- happy path -expectAssignable>([{ - channel: 'C1234', - purpose: 'Feed the world', -}]); +expectAssignable>([ + { + channel: 'C1234', + purpose: 'Feed the world', + }, +]); // conversations.setTopic // -- sad path expectError(web.conversations.setTopic()); // lacking argument expectError(web.conversations.setTopic({})); // empty argument -expectError(web.conversations.setTopic({ - channel: 'C1234', // missing topic -})); -expectError(web.conversations.setTopic({ - topic: 'Eat and be merry', // missing channel -})); +expectError( + web.conversations.setTopic({ + channel: 'C1234', // missing topic + }), +); +expectError( + web.conversations.setTopic({ + topic: 'Eat and be merry', // missing channel + }), +); // -- happy path -expectAssignable>([{ - channel: 'C1234', - topic: 'Eat and be merry', -}]); +expectAssignable>([ + { + channel: 'C1234', + topic: 'Eat and be merry', + }, +]); // conversations.unarchive // -- sad path expectError(web.conversations.unarchive()); // lacking argument expectError(web.conversations.unarchive({})); // empty argument // -- happy path -expectAssignable>([{ - channel: 'C1234', -}]); +expectAssignable>([ + { + channel: 'C1234', + }, +]); diff --git a/packages/web-api/test/types/methods/dialog.test-d.ts b/packages/web-api/test/types/methods/dialog.test-d.ts index 2c9aaf457..a02e22663 100644 --- a/packages/web-api/test/types/methods/dialog.test-d.ts +++ b/packages/web-api/test/types/methods/dialog.test-d.ts @@ -13,14 +13,20 @@ const dialog = { // -- sad path expectError(web.dialog.open()); // lacking argument expectError(web.dialog.open({})); // empty argument -expectError(web.dialog.open({ - trigger_id: '1234.566', // missing `dialog` -})); -expectError(web.dialog.open({ - dialog, // missing `trigger_id` -})); +expectError( + web.dialog.open({ + trigger_id: '1234.566', // missing `dialog` + }), +); +expectError( + web.dialog.open({ + dialog, // missing `trigger_id` + }), +); // -- happy path -expectAssignable>([{ - trigger_id: '1234.56', - dialog, -}]); +expectAssignable>([ + { + trigger_id: '1234.56', + dialog, + }, +]); diff --git a/packages/web-api/test/types/methods/dnd.test-d.ts b/packages/web-api/test/types/methods/dnd.test-d.ts index ecc891413..8e49b55f0 100644 --- a/packages/web-api/test/types/methods/dnd.test-d.ts +++ b/packages/web-api/test/types/methods/dnd.test-d.ts @@ -26,15 +26,19 @@ expectAssignable>([]); // no arg is fine expectError(web.dnd.setSnooze()); // lacking argument expectError(web.dnd.setSnooze({})); // empty argument // -- happy path -expectAssignable>([{ - num_minutes: 1, -}]); +expectAssignable>([ + { + num_minutes: 1, + }, +]); // dnd.teamInfo // -- sad path expectError(web.dnd.teamInfo()); // lacking argument expectError(web.dnd.teamInfo({})); // empty argument // -- happy path -expectAssignable>([{ - users: 'U1234', -}]); +expectAssignable>([ + { + users: 'U1234', + }, +]); diff --git a/packages/web-api/test/types/methods/files.test-d.ts b/packages/web-api/test/types/methods/files.test-d.ts index 60e69d8ca..60b8e873b 100644 --- a/packages/web-api/test/types/methods/files.test-d.ts +++ b/packages/web-api/test/types/methods/files.test-d.ts @@ -10,36 +10,48 @@ const file = { id: 'F1234', title: 'Choose Boring Technology' }; // -- sad path expectError(web.files.completeUploadExternal()); // lacking argument expectError(web.files.completeUploadExternal({})); // empty argument -expectError(web.files.completeUploadExternal({ - files: [file], - thread_ts: '1234.567', // has thread_ts but no channel -})); -expectError(web.files.completeUploadExternal({ - files: [], // must specify at least one file -})); -// -- happy path -expectAssignable>([{ - files: [file], // must specify at least one file - // not shared to any destination, so it is a 'private' file -}]); -expectAssignable>([{ - files: [file], - channel_id: 'C1234', // share to a channel -}]); -expectAssignable>([{ - files: [file], - channel_id: 'C1234', - thread_ts: '1234.567', // share to a thread -}]); +expectError( + web.files.completeUploadExternal({ + files: [file], + thread_ts: '1234.567', // has thread_ts but no channel + }), +); +expectError( + web.files.completeUploadExternal({ + files: [], // must specify at least one file + }), +); +// -- happy path +expectAssignable>([ + { + files: [file], // must specify at least one file + // not shared to any destination, so it is a 'private' file + }, +]); +expectAssignable>([ + { + files: [file], + channel_id: 'C1234', // share to a channel + }, +]); +expectAssignable>([ + { + files: [file], + channel_id: 'C1234', + thread_ts: '1234.567', // share to a thread + }, +]); // files.delete // -- sad path expectError(web.files.delete()); // lacking argument expectError(web.files.delete({})); // empty argument // -- happy path -expectAssignable>([{ - file: 'F123', // must specify a file -}]); +expectAssignable>([ + { + file: 'F123', // must specify a file + }, +]); // files.getUploadURLExternal // -- sad path @@ -48,19 +60,23 @@ expectError(web.files.getUploadURLExternal({})); // empty argument expectError(web.files.getUploadURLExternal({ filename: 'hi' })); // missing `length` expectError(web.files.getUploadURLExternal({ length: 42 })); // missing `filename` // -- happy path -expectAssignable>([{ - filename: 'batman', - length: 420, -}]); +expectAssignable>([ + { + filename: 'batman', + length: 420, + }, +]); // files.info // -- sad path expectError(web.files.info()); // lacking argument expectError(web.files.info({})); // empty argument // -- happy path -expectAssignable>([{ - file: 'F123', // must specify a file -}]); +expectAssignable>([ + { + file: 'F123', // must specify a file + }, +]); // files.list // -- sad path @@ -73,18 +89,22 @@ expectAssignable>([{}]); // able to call it wi expectError(web.files.revokePublicURL()); // lacking argument expectError(web.files.revokePublicURL({})); // empty argument // -- happy path -expectAssignable>([{ - file: 'F123', // must specify a file -}]); +expectAssignable>([ + { + file: 'F123', // must specify a file + }, +]); // files.sharedPublicURL // -- sad path expectError(web.files.sharedPublicURL()); // lacking argument expectError(web.files.sharedPublicURL({})); // empty argument // -- happy path -expectAssignable>([{ - file: 'F123', // must specify a file -}]); +expectAssignable>([ + { + file: 'F123', // must specify a file + }, +]); // files.upload // -- sad path @@ -92,20 +112,28 @@ expectError(web.files.upload()); // lacking argument expectError(web.files.upload({})); // empty argument expectError(web.files.upload({ file: 'test.png', thread_ts: '123.456' })); // if providing thread_ts, must provide channels // -- happy path -expectAssignable>([{ - file: 'test.png', // must specify either a file... -}]); -expectAssignable>([{ - content: 'text', // or file contents -}]); -expectAssignable>([{ - channels: 'C1234', // optionally share to one or more channels - content: 'text', -}]); -expectAssignable>([{ - channels: 'C1234', // or even to a specific thread - content: 'text', -}]); +expectAssignable>([ + { + file: 'test.png', // must specify either a file... + }, +]); +expectAssignable>([ + { + content: 'text', // or file contents + }, +]); +expectAssignable>([ + { + channels: 'C1234', // optionally share to one or more channels + content: 'text', + }, +]); +expectAssignable>([ + { + channels: 'C1234', // or even to a specific thread + content: 'text', + }, +]); // files.uploadV2 // -- sad path @@ -113,30 +141,42 @@ expectError(web.files.uploadV2()); // lacking argument expectError(web.files.uploadV2({})); // empty argument expectError(web.files.uploadV2({ file: 'test.png', thread_ts: '123.456' })); // if providing thread_ts, must provide channels // -- happy path -expectAssignable>([{ - file: 'test.png', // must specify either a file... -}]); -expectAssignable>([{ - content: 'text', // or file contents... -}]); -expectAssignable>([{ - channels: 'C1234', // optionally share to one or more channels - content: 'text', -}]); -expectAssignable>([{ - channel_id: 'C1234', // optionally share to one or more channels - content: 'text', -}]); -expectAssignable>([{ - channels: 'C1234', - thread_ts: '12345.67', // or even to a specific thread - content: 'text', -}]); -expectAssignable>([{ - channel_id: 'C1234', - thread_ts: '12345.67', // or even to a specific thread - content: 'text', -}]); +expectAssignable>([ + { + file: 'test.png', // must specify either a file... + }, +]); +expectAssignable>([ + { + content: 'text', // or file contents... + }, +]); +expectAssignable>([ + { + channels: 'C1234', // optionally share to one or more channels + content: 'text', + }, +]); +expectAssignable>([ + { + channel_id: 'C1234', // optionally share to one or more channels + content: 'text', + }, +]); +expectAssignable>([ + { + channels: 'C1234', + thread_ts: '12345.67', // or even to a specific thread + content: 'text', + }, +]); +expectAssignable>([ + { + channel_id: 'C1234', + thread_ts: '12345.67', // or even to a specific thread + content: 'text', + }, +]); // files.comments.delete // -- sad path @@ -145,10 +185,12 @@ expectError(web.files.comments.delete({})); // empty argument expectError(web.files.comments.delete({ file: 'F123' })); // missing comment ID expectError(web.files.comments.delete({ id: 'Fc123' })); // missing file ID // -- happy path -expectAssignable>([{ - file: 'F1234', - id: 'Fc1234', -}]); +expectAssignable>([ + { + file: 'F1234', + id: 'Fc1234', + }, +]); // files.remote.add // -- sad path @@ -161,11 +203,13 @@ expectError(web.files.remote.add({ external_id: '1234', external_url: 'https://e expectError(web.files.remote.add({ external_id: '1234', title: 'this is a test' })); // missing url expectError(web.files.remote.add({ external_url: '1234', title: 'this is a test' })); // missing id // -- happy path -expectAssignable>([{ - external_id: '1234', - external_url: 'https://example.com', - title: 'my document', -}]); +expectAssignable>([ + { + external_id: '1234', + external_url: 'https://example.com', + title: 'my document', + }, +]); // files.remote.info // -- sad path @@ -173,12 +217,16 @@ expectError(web.files.remote.info()); // lacking argument expectError(web.files.remote.info({})); // empty argument expectError(web.files.remote.info({ external_id: '1234', file: 'F1234' })); // either external ID, or file ID, but not both // -- happy path -expectAssignable>([{ - external_id: '1234', -}]); -expectAssignable>([{ - file: 'F1234', -}]); +expectAssignable>([ + { + external_id: '1234', + }, +]); +expectAssignable>([ + { + file: 'F1234', + }, +]); // files.remote.list // -- sad path @@ -192,12 +240,16 @@ expectError(web.files.remote.remove()); // lacking argument expectError(web.files.remote.remove({})); // empty argument expectError(web.files.remote.remove({ external_id: '1234', file: 'F1234' })); // either external ID, or file ID, but not both // -- happy path -expectAssignable>([{ - external_id: '1234', -}]); -expectAssignable>([{ - file: 'F1234', -}]); +expectAssignable>([ + { + external_id: '1234', + }, +]); +expectAssignable>([ + { + file: 'F1234', + }, +]); // files.remote.share // -- sad path @@ -206,14 +258,18 @@ expectError(web.files.remote.share({})); // empty argument expectError(web.files.remote.share({ external_id: '1234', file: 'F1234' })); // either external ID, or file ID, but not both expectError(web.files.remote.share({ channels: 'C1234' })); // missing one of external ID or file ID // -- happy path -expectAssignable>([{ - channels: 'C123', - external_id: '1234', -}]); -expectAssignable>([{ - channels: 'C123', - file: 'F1234', -}]); +expectAssignable>([ + { + channels: 'C123', + external_id: '1234', + }, +]); +expectAssignable>([ + { + channels: 'C123', + file: 'F1234', + }, +]); // files.remote.update // -- sad path @@ -222,11 +278,15 @@ expectError(web.files.remote.update({})); // empty argument expectError(web.files.remote.update({ external_id: '1234', file: 'F1234' })); // either external ID, or file ID, but not both expectError(web.files.remote.update({ title: 'Fear and Loathing in Las Vegas' })); // missing one of external ID or file ID // -- happy path -expectAssignable>([{ - external_id: '1234', - title: 'Moby Dick', -}]); -expectAssignable>([{ - file: 'F1234', - external_url: 'https://someurl.com', -}]); +expectAssignable>([ + { + external_id: '1234', + title: 'Moby Dick', + }, +]); +expectAssignable>([ + { + file: 'F1234', + external_url: 'https://someurl.com', + }, +]); diff --git a/packages/web-api/test/types/methods/functions.test-d.ts b/packages/web-api/test/types/methods/functions.test-d.ts index 20e8814bf..30c1a9169 100644 --- a/packages/web-api/test/types/methods/functions.test-d.ts +++ b/packages/web-api/test/types/methods/functions.test-d.ts @@ -7,30 +7,42 @@ const web = new WebClient('TOKEN'); // -- sad path expectError(web.functions.completeError()); // lacking argument expectError(web.functions.completeError({})); // empty argument -expectError(web.functions.completeError({ - function_execution_id: 'Fx1234', // missing error -})); -expectError(web.functions.completeError({ - error: 'boomsies', // missing function_execution_id -})); +expectError( + web.functions.completeError({ + function_execution_id: 'Fx1234', // missing error + }), +); +expectError( + web.functions.completeError({ + error: 'boomsies', // missing function_execution_id + }), +); // -- happy path -expectAssignable>([{ - function_execution_id: 'Fx1234', - error: 'oh noes', -}]); +expectAssignable>([ + { + function_execution_id: 'Fx1234', + error: 'oh noes', + }, +]); // functions.completeSuccess // -- sad path expectError(web.functions.completeSuccess()); // lacking argument expectError(web.functions.completeSuccess({})); // empty argument -expectError(web.functions.completeSuccess({ - function_execution_id: 'Fx1234', // missing output -})); -expectError(web.functions.completeSuccess({ - outputs: {}, // missing function_execution_id -})); +expectError( + web.functions.completeSuccess({ + function_execution_id: 'Fx1234', // missing output + }), +); +expectError( + web.functions.completeSuccess({ + outputs: {}, // missing function_execution_id + }), +); // -- happy path -expectAssignable>([{ - function_execution_id: 'Fx1234', - outputs: {}, -}]); +expectAssignable>([ + { + function_execution_id: 'Fx1234', + outputs: {}, + }, +]); diff --git a/packages/web-api/test/types/methods/migration.test-d.ts b/packages/web-api/test/types/methods/migration.test-d.ts index 420eaba04..d99a6b964 100644 --- a/packages/web-api/test/types/methods/migration.test-d.ts +++ b/packages/web-api/test/types/methods/migration.test-d.ts @@ -8,6 +8,8 @@ const web = new WebClient('TOKEN'); expectError(web.migration.exchange()); // lacking argument expectError(web.migration.exchange({})); // empty argument // -- happy path -expectAssignable>([{ - users: 'U1234', -}]); +expectAssignable>([ + { + users: 'U1234', + }, +]); diff --git a/packages/web-api/test/types/methods/oauth.test-d.ts b/packages/web-api/test/types/methods/oauth.test-d.ts index 3056677dd..e67486619 100644 --- a/packages/web-api/test/types/methods/oauth.test-d.ts +++ b/packages/web-api/test/types/methods/oauth.test-d.ts @@ -10,59 +10,85 @@ const creds = { client_id: 'C1234', client_secret: '1234.567' }; // -- sad path expectError(web.oauth.access()); // lacking argument expectError(web.oauth.access({})); // empty argument -expectError(web.oauth.access({ - client_id: 'C1234', // missing client_secret -})); -expectError(web.oauth.access({ - client_secret: '1234.567', // missing `client_id` -})); +expectError( + web.oauth.access({ + client_id: 'C1234', // missing client_secret + }), +); +expectError( + web.oauth.access({ + client_secret: '1234.567', // missing `client_id` + }), +); // -- happy path -expectAssignable>([{ - ...creds, -}]); +expectAssignable>([ + { + ...creds, + }, +]); // oauth.v2.access // -- sad path expectError(web.oauth.v2.access()); // lacking argument expectError(web.oauth.v2.access({})); // empty argument -expectError(web.oauth.v2.access({ - client_id: 'C1234', // missing client_secret -})); -expectError(web.oauth.v2.access({ - client_secret: '1234.567', // missing `client_id` -})); +expectError( + web.oauth.v2.access({ + client_id: 'C1234', // missing client_secret + }), +); +expectError( + web.oauth.v2.access({ + client_secret: '1234.567', // missing `client_id` + }), +); // -- happy path -expectAssignable>([{ - ...creds, -}]); +expectAssignable>([ + { + ...creds, + }, +]); // oauth.v2.exchange // -- sad path expectError(web.oauth.v2.exchange()); // lacking argument expectError(web.oauth.v2.exchange({})); // empty argument -expectError(web.oauth.v2.exchange({ - client_id: 'C1234', // missing client_secret, token -})); -expectError(web.oauth.v2.exchange({ - client_secret: '1234.567', // missing `client_id`, token -})); -expectError(web.oauth.v2.exchange({ - token: 'xoxp-blah', // missing `client_id`, client_secret -})); -expectError(web.oauth.v2.exchange({ - client_id: 'C1234', - client_secret: '1234.567', // missing token -})); -expectError(web.oauth.v2.exchange({ - client_id: 'C1234', - token: 'xoxb-blah', // missing client_secret -})); -expectError(web.oauth.v2.exchange({ - client_secret: '1234.567', - token: 'xoxb-blah', // missing client_id -})); +expectError( + web.oauth.v2.exchange({ + client_id: 'C1234', // missing client_secret, token + }), +); +expectError( + web.oauth.v2.exchange({ + client_secret: '1234.567', // missing `client_id`, token + }), +); +expectError( + web.oauth.v2.exchange({ + token: 'xoxp-blah', // missing `client_id`, client_secret + }), +); +expectError( + web.oauth.v2.exchange({ + client_id: 'C1234', + client_secret: '1234.567', // missing token + }), +); +expectError( + web.oauth.v2.exchange({ + client_id: 'C1234', + token: 'xoxb-blah', // missing client_secret + }), +); +expectError( + web.oauth.v2.exchange({ + client_secret: '1234.567', + token: 'xoxb-blah', // missing client_id + }), +); // -- happy path -expectAssignable>([{ - token: 'xoxb-blah', - ...creds, -}]); +expectAssignable>([ + { + token: 'xoxb-blah', + ...creds, + }, +]); diff --git a/packages/web-api/test/types/methods/openid.test-d.ts b/packages/web-api/test/types/methods/openid.test-d.ts index 0871960e4..0c36ed918 100644 --- a/packages/web-api/test/types/methods/openid.test-d.ts +++ b/packages/web-api/test/types/methods/openid.test-d.ts @@ -10,16 +10,22 @@ const creds = { client_id: 'C1234', client_secret: '1234.567' }; // -- sad path expectError(web.openid.connect.token()); // lacking argument expectError(web.openid.connect.token({})); // empty argument -expectError(web.openid.connect.token({ - client_id: 'C1234', // missing client_secret -})); -expectError(web.openid.connect.token({ - client_secret: '1234.567', // missing `client_id` -})); +expectError( + web.openid.connect.token({ + client_id: 'C1234', // missing client_secret + }), +); +expectError( + web.openid.connect.token({ + client_secret: '1234.567', // missing `client_id` + }), +); // -- happy path -expectAssignable>([{ - ...creds, -}]); +expectAssignable>([ + { + ...creds, + }, +]); // openid.connect.userInfo // -- sad path diff --git a/packages/web-api/test/types/methods/pins.test-d.ts b/packages/web-api/test/types/methods/pins.test-d.ts index 3173134b1..2960ef0c0 100644 --- a/packages/web-api/test/types/methods/pins.test-d.ts +++ b/packages/web-api/test/types/methods/pins.test-d.ts @@ -10,37 +10,51 @@ const message = { channel: 'C1234', timestamp: '1234.567' }; // -- sad path expectError(web.pins.add()); // lacking argument expectError(web.pins.add({})); // empty argument -expectError(web.pins.add({ - channel: 'C1234', // missing timestamp -})); -expectError(web.pins.add({ - timestamp: '1234.567', // missing `channel` -})); +expectError( + web.pins.add({ + channel: 'C1234', // missing timestamp + }), +); +expectError( + web.pins.add({ + timestamp: '1234.567', // missing `channel` + }), +); // -- happy path -expectAssignable>([{ - ...message, -}]); +expectAssignable>([ + { + ...message, + }, +]); // pins.list // -- sad path expectError(web.pins.list()); // lacking argument expectError(web.pins.list({})); // empty argument // -- happy path -expectAssignable>([{ - channel: message.channel, -}]); +expectAssignable>([ + { + channel: message.channel, + }, +]); // pins.remove // -- sad path expectError(web.pins.remove()); // lacking argument expectError(web.pins.remove({})); // empty argument -expectError(web.pins.remove({ - channel: 'C1234', // missing timestamp -})); -expectError(web.pins.remove({ - timestamp: '1234.567', // missing `channel` -})); +expectError( + web.pins.remove({ + channel: 'C1234', // missing timestamp + }), +); +expectError( + web.pins.remove({ + timestamp: '1234.567', // missing `channel` + }), +); // -- happy path -expectAssignable>([{ - ...message, -}]); +expectAssignable>([ + { + ...message, + }, +]); diff --git a/packages/web-api/test/types/methods/reactions.test-d.ts b/packages/web-api/test/types/methods/reactions.test-d.ts index b7e14a850..608d4a3cc 100644 --- a/packages/web-api/test/types/methods/reactions.test-d.ts +++ b/packages/web-api/test/types/methods/reactions.test-d.ts @@ -10,46 +10,66 @@ const message = { channel: 'C1234', timestamp: '1234.567' }; // -- sad path expectError(web.reactions.add()); // lacking argument expectError(web.reactions.add({})); // empty argument -expectError(web.reactions.add({ - ...message, // missing `name` -})); -expectError(web.reactions.add({ - name: 'smile', // missing `channel` and `timestamp` -})); -expectError(web.reactions.add({ - name: 'smile', // missing `timestamp` - channel: 'C1234', -})); -expectError(web.reactions.add({ - name: 'smile', // missing `channel` - timestamp: '1234.567', -})); +expectError( + web.reactions.add({ + ...message, // missing `name` + }), +); +expectError( + web.reactions.add({ + name: 'smile', // missing `channel` and `timestamp` + }), +); +expectError( + web.reactions.add({ + name: 'smile', // missing `timestamp` + channel: 'C1234', + }), +); +expectError( + web.reactions.add({ + name: 'smile', // missing `channel` + timestamp: '1234.567', + }), +); // -- happy path -expectAssignable>([{ - ...message, - name: 'smile', -}]); +expectAssignable>([ + { + ...message, + name: 'smile', + }, +]); // reactions.get // -- sad path expectError(web.reactions.get()); // lacking argument expectError(web.reactions.get({})); // empty argument -expectError(web.reactions.get({ - channel: 'C1234', // missing timestamp -})); -expectError(web.reactions.get({ - timestamp: '1234.567', // missing channel -})); +expectError( + web.reactions.get({ + channel: 'C1234', // missing timestamp + }), +); +expectError( + web.reactions.get({ + timestamp: '1234.567', // missing channel + }), +); // -- happy path -expectAssignable>([{ - ...message, // get reactions for a message -}]); -expectAssignable>([{ - file: 'F1234', // or a file -}]); -expectAssignable>([{ - file_comment: 'Fc1234', // or a file comment -}]); +expectAssignable>([ + { + ...message, // get reactions for a message + }, +]); +expectAssignable>([ + { + file: 'F1234', // or a file + }, +]); +expectAssignable>([ + { + file_comment: 'Fc1234', // or a file comment + }, +]); // reactions.list // -- sad path @@ -61,36 +81,54 @@ expectAssignable>([]); // no arg is fine // -- sad path expectError(web.reactions.remove()); // lacking argument expectError(web.reactions.remove({})); // empty argument -expectError(web.reactions.remove({ - ...message, // missing `name` -})); -expectError(web.reactions.remove({ - name: 'smile', // missing `channel` and `timestamp`, or `file`, or `file_comment` -})); -expectError(web.reactions.remove({ - name: 'smile', // missing `timestamp` - channel: 'C1234', -})); -expectError(web.reactions.remove({ - name: 'smile', // missing `channel` - timestamp: '1234.567', -})); -expectError(web.reactions.remove({ - file: 'F1234', // missing name -})); -expectError(web.reactions.remove({ - file_comment: 'Fc1234', // missing name -})); +expectError( + web.reactions.remove({ + ...message, // missing `name` + }), +); +expectError( + web.reactions.remove({ + name: 'smile', // missing `channel` and `timestamp`, or `file`, or `file_comment` + }), +); +expectError( + web.reactions.remove({ + name: 'smile', // missing `timestamp` + channel: 'C1234', + }), +); +expectError( + web.reactions.remove({ + name: 'smile', // missing `channel` + timestamp: '1234.567', + }), +); +expectError( + web.reactions.remove({ + file: 'F1234', // missing name + }), +); +expectError( + web.reactions.remove({ + file_comment: 'Fc1234', // missing name + }), +); // -- happy path -expectAssignable>([{ - ...message, - name: 'smile', // remove a reaction from a message -}]); -expectAssignable>([{ - file: 'F1234', - name: 'smile', // remove a reaction from a file -}]); -expectAssignable>([{ - file_comment: 'Fc1234', - name: 'smile', // remove a reaction from a file comment -}]); +expectAssignable>([ + { + ...message, + name: 'smile', // remove a reaction from a message + }, +]); +expectAssignable>([ + { + file: 'F1234', + name: 'smile', // remove a reaction from a file + }, +]); +expectAssignable>([ + { + file_comment: 'Fc1234', + name: 'smile', // remove a reaction from a file comment + }, +]); diff --git a/packages/web-api/test/types/methods/reminders.test-d.ts b/packages/web-api/test/types/methods/reminders.test-d.ts index 4c815c22f..1e0c5f933 100644 --- a/packages/web-api/test/types/methods/reminders.test-d.ts +++ b/packages/web-api/test/types/methods/reminders.test-d.ts @@ -9,68 +9,84 @@ expectError(web.reminders.add()); // lacking argument expectError(web.reminders.add({})); // empty argument expectError(web.reminders.add({ text: 'take out the garbage' })); // missing time expectError(web.reminders.add({ time: 'mondays at 6pm' })); // missing text -expectError(web.reminders.add({ - time: '6pm', - text: 'take out the garbage', - recurrence: { - frequency: 'weekly', // missing weekdays property - }, -})); -expectError(web.reminders.add({ - time: '6pm', - text: 'take out the garbage', - recurrence: { - frequency: 'weekly', // missing weekdays property - weekdays: [], // must provide at least one weekday if frequency=weekly - }, -})); +expectError( + web.reminders.add({ + time: '6pm', + text: 'take out the garbage', + recurrence: { + frequency: 'weekly', // missing weekdays property + }, + }), +); +expectError( + web.reminders.add({ + time: '6pm', + text: 'take out the garbage', + recurrence: { + frequency: 'weekly', // missing weekdays property + weekdays: [], // must provide at least one weekday if frequency=weekly + }, + }), +); // -- happy path -expectAssignable>([{ - text: 'floss your teeth', - time: 'every damn day', -}]); // must provide at a minimum time and text -expectAssignable>([{ - text: 'take out the garbage', - time: '6pm', // must provide at a minimum time and text - recurrence: { - frequency: 'weekly', - weekdays: ['monday'], // and weekly recurrence needs at least one weekday +expectAssignable>([ + { + text: 'floss your teeth', + time: 'every damn day', + }, +]); // must provide at a minimum time and text +expectAssignable>([ + { + text: 'take out the garbage', + time: '6pm', // must provide at a minimum time and text + recurrence: { + frequency: 'weekly', + weekdays: ['monday'], // and weekly recurrence needs at least one weekday + }, }, -}]); -expectAssignable>([{ - text: 'call mom for her birthday', - time: 'April 8th', // must provide at a minimum time and text - recurrence: { - frequency: 'yearly', +]); +expectAssignable>([ + { + text: 'call mom for her birthday', + time: 'April 8th', // must provide at a minimum time and text + recurrence: { + frequency: 'yearly', + }, }, -}]); +]); // reminders.complete // -- sad path expectError(web.reminders.complete()); // lacking argument expectError(web.reminders.complete({})); // empty argument // -- happy path -expectAssignable>([{ - reminder: 'R1234', // needs the reminder ID -}]); +expectAssignable>([ + { + reminder: 'R1234', // needs the reminder ID + }, +]); // reminders.delete // -- sad path expectError(web.reminders.delete()); // lacking argument expectError(web.reminders.delete({})); // empty argument // -- happy path -expectAssignable>([{ - reminder: 'R1234', // needs the reminder ID -}]); +expectAssignable>([ + { + reminder: 'R1234', // needs the reminder ID + }, +]); // reminders.info // -- sad path expectError(web.reminders.info()); // lacking argument expectError(web.reminders.info({})); // empty argument // -- happy path -expectAssignable>([{ - reminder: 'R1234', // needs the reminder ID -}]); +expectAssignable>([ + { + reminder: 'R1234', // needs the reminder ID + }, +]); // reminders.list // -- sad path diff --git a/packages/web-api/test/types/methods/search.test-d.ts b/packages/web-api/test/types/methods/search.test-d.ts index c675690b1..1d835f370 100644 --- a/packages/web-api/test/types/methods/search.test-d.ts +++ b/packages/web-api/test/types/methods/search.test-d.ts @@ -8,24 +8,30 @@ const web = new WebClient('TOKEN'); expectError(web.search.all()); // lacking argument expectError(web.search.all({})); // empty argument // -- happy path -expectAssignable>([{ - query: '1234', // must specify query -}]); +expectAssignable>([ + { + query: '1234', // must specify query + }, +]); // search.files // -- sad path expectError(web.search.files()); // lacking argument expectError(web.search.files({})); // empty argument // -- happy path -expectAssignable>([{ - query: '1234', // must specify query -}]); +expectAssignable>([ + { + query: '1234', // must specify query + }, +]); // search.messages // -- sad path expectError(web.search.messages()); // lacking argument expectError(web.search.messages({})); // empty argument // -- happy path -expectAssignable>([{ - query: '1234', // must specify query -}]); +expectAssignable>([ + { + query: '1234', // must specify query + }, +]); diff --git a/packages/web-api/test/types/methods/team.test-d.ts b/packages/web-api/test/types/methods/team.test-d.ts index e8dad312b..a5b4f4618 100644 --- a/packages/web-api/test/types/methods/team.test-d.ts +++ b/packages/web-api/test/types/methods/team.test-d.ts @@ -26,9 +26,11 @@ expectAssignable>([{}]); // all optiona expectError(web.team.externalTeams.disconnect()); // lacking argument expectError(web.team.externalTeams.disconnect({})); // missing `target_team` // -- happy path -expectAssignable>([{ - target_team: 'T1234', -}]); +expectAssignable>([ + { + target_team: 'T1234', + }, +]); // team.externalTeams.list // -- sad path diff --git a/packages/web-api/test/types/methods/tooling.test-d.ts b/packages/web-api/test/types/methods/tooling.test-d.ts index 3eb7b9770..b79c5e08e 100644 --- a/packages/web-api/test/types/methods/tooling.test-d.ts +++ b/packages/web-api/test/types/methods/tooling.test-d.ts @@ -8,6 +8,8 @@ const web = new WebClient('TOKEN'); expectError(web.tooling.tokens.rotate()); // lacking argument expectError(web.tooling.tokens.rotate({})); // empty argument // -- happy path -expectAssignable>([{ - refresh_token: '1234', // must specify refresh_token -}]); +expectAssignable>([ + { + refresh_token: '1234', // must specify refresh_token + }, +]); diff --git a/packages/web-api/test/types/methods/usergroups.test-d.ts b/packages/web-api/test/types/methods/usergroups.test-d.ts index 009737c30..e12477968 100644 --- a/packages/web-api/test/types/methods/usergroups.test-d.ts +++ b/packages/web-api/test/types/methods/usergroups.test-d.ts @@ -8,27 +8,33 @@ const web = new WebClient('TOKEN'); expectError(web.usergroups.create()); // lacking argument expectError(web.usergroups.create({})); // empty argument // -- happy path -expectAssignable>([{ - name: 'knights who say ni', // must specify name -}]); +expectAssignable>([ + { + name: 'knights who say ni', // must specify name + }, +]); // usergroups.disable // -- sad path expectError(web.usergroups.disable()); // lacking argument expectError(web.usergroups.disable({})); // empty argument // -- happy path -expectAssignable>([{ - usergroup: 'Sg1234', // must specify usergroup -}]); +expectAssignable>([ + { + usergroup: 'Sg1234', // must specify usergroup + }, +]); // usergroups.enable // -- sad path expectError(web.usergroups.enable()); // lacking argument expectError(web.usergroups.enable({})); // empty argument // -- happy path -expectAssignable>([{ - usergroup: 'Sg1234', // must specify usergroup -}]); +expectAssignable>([ + { + usergroup: 'Sg1234', // must specify usergroup + }, +]); // usergroups.list // -- sad path @@ -41,18 +47,22 @@ expectAssignable>([]); // no arg is fine expectError(web.usergroups.update()); // lacking argument expectError(web.usergroups.update({})); // empty argument // -- happy path -expectAssignable>([{ - usergroup: 'Sg1234', // must specify usergroup -}]); +expectAssignable>([ + { + usergroup: 'Sg1234', // must specify usergroup + }, +]); // usergroups.users.list // -- sad path expectError(web.usergroups.users.list()); // lacking argument expectError(web.usergroups.users.list({})); // empty argument // -- happy path -expectAssignable>([{ - usergroup: 'Sg1234', // must specify usergroup -}]); +expectAssignable>([ + { + usergroup: 'Sg1234', // must specify usergroup + }, +]); // usergroups.users.update // -- sad path @@ -61,7 +71,9 @@ expectError(web.usergroups.users.update({})); // empty argument expectError(web.usergroups.users.update({ usergroup: 'Sg1234' })); // missing users expectError(web.usergroups.users.update({ users: 'U1,U2,U3' })); // missing usergroups // -- happy path -expectAssignable>([{ - usergroup: 'Sg1234', - users: 'U1,U2,U3', // must specify usergroup and users -}]); +expectAssignable>([ + { + usergroup: 'Sg1234', + users: 'U1,U2,U3', // must specify usergroup and users + }, +]); diff --git a/packages/web-api/test/types/methods/users.test-d.ts b/packages/web-api/test/types/methods/users.test-d.ts index 9a1b9a26d..8ff5b8cdf 100644 --- a/packages/web-api/test/types/methods/users.test-d.ts +++ b/packages/web-api/test/types/methods/users.test-d.ts @@ -32,9 +32,11 @@ expectAssignable>([{}]); // all args are o expectError(web.users.info()); // lacking argument expectError(web.users.info({})); // empty argument // -- happy path -expectAssignable>([{ - user: 'U1234', // must specify a user -}]); +expectAssignable>([ + { + user: 'U1234', // must specify a user + }, +]); // users.list // -- sad path @@ -47,27 +49,33 @@ expectAssignable>([{}]); // all args are optio expectError(web.users.lookupByEmail()); // lacking argument expectError(web.users.lookupByEmail({})); // empty argument // -- happy path -expectAssignable>([{ - email: 'ceo@slack.com', // must specify an email -}]); +expectAssignable>([ + { + email: 'ceo@slack.com', // must specify an email + }, +]); // users.setPhoto // -- sad path expectError(web.users.setPhoto()); // lacking argument expectError(web.users.setPhoto({})); // empty argument // -- happy path -expectAssignable>([{ - image: Buffer.from([1]), // must specify an image -}]); +expectAssignable>([ + { + image: Buffer.from([1]), // must specify an image + }, +]); // users.setPresence // -- sad path expectError(web.users.setPresence()); // lacking argument expectError(web.users.setPresence({})); // empty argument // -- happy path -expectAssignable>([{ - presence: 'auto', // must specify presence -}]); +expectAssignable>([ + { + presence: 'auto', // must specify presence + }, +]); // users.profile.get // -- sad path diff --git a/packages/web-api/test/types/methods/views.test-d.ts b/packages/web-api/test/types/methods/views.test-d.ts index a0411ba30..2d0c838df 100644 --- a/packages/web-api/test/types/methods/views.test-d.ts +++ b/packages/web-api/test/types/methods/views.test-d.ts @@ -7,116 +7,163 @@ const web = new WebClient('TOKEN'); // -- sad path expectError(web.views.open()); // lacking argument expectError(web.views.open({})); // empty argument -expectError(web.views.open({ // missing interactivity_pointer or trigger_id - view: { - type: 'home', - blocks: [], - }, -})); -expectError(web.views.open({ // missing view - interactivity_pointer: '1234', -})); -expectError(web.views.open({ // missing view - trigger_id: '1234', -})); +expectError( + web.views.open({ + // missing interactivity_pointer or trigger_id + view: { + type: 'home', + blocks: [], + }, + }), +); +expectError( + web.views.open({ + // missing view + interactivity_pointer: '1234', + }), +); +expectError( + web.views.open({ + // missing view + trigger_id: '1234', + }), +); // -- happy path -expectAssignable>([{ - view: { - type: 'home', - blocks: [], +expectAssignable>([ + { + view: { + type: 'home', + blocks: [], + }, + interactivity_pointer: '1234', // provide a view and interactivity pointer, or.. }, - interactivity_pointer: '1234', // provide a view and interactivity pointer, or.. -}]); -expectAssignable>([{ - view: { - type: 'home', - blocks: [], +]); +expectAssignable>([ + { + view: { + type: 'home', + blocks: [], + }, + trigger_id: '1234', // .. a trigger_id }, - trigger_id: '1234', // .. a trigger_id -}]); +]); // views.push // -- sad path expectError(web.views.push()); // lacking argument expectError(web.views.push({})); // empty argument -expectError(web.views.push({ // missing interactivity_pointer or trigger_id - view: { - type: 'home', - blocks: [], - }, -})); -expectError(web.views.push({ // missing view - interactivity_pointer: '1234', -})); -expectError(web.views.push({ // missing view - trigger_id: '1234', -})); +expectError( + web.views.push({ + // missing interactivity_pointer or trigger_id + view: { + type: 'home', + blocks: [], + }, + }), +); +expectError( + web.views.push({ + // missing view + interactivity_pointer: '1234', + }), +); +expectError( + web.views.push({ + // missing view + trigger_id: '1234', + }), +); // -- happy path -expectAssignable>([{ - view: { - type: 'home', - blocks: [], +expectAssignable>([ + { + view: { + type: 'home', + blocks: [], + }, + interactivity_pointer: '1234', // provide a view and interactivity pointer, or.. }, - interactivity_pointer: '1234', // provide a view and interactivity pointer, or.. -}]); -expectAssignable>([{ - view: { - type: 'home', - blocks: [], +]); +expectAssignable>([ + { + view: { + type: 'home', + blocks: [], + }, + trigger_id: '1234', // .. a trigger_id }, - trigger_id: '1234', // .. a trigger_id -}]); +]); // views.publish // -- sad path expectError(web.views.publish()); // lacking argument expectError(web.views.publish({})); // empty argument -expectError(web.views.publish({ // missing user_id - view: { - type: 'home', - blocks: [], - }, -})); -expectError(web.views.publish({ // missing view - user_id: 'U1234', -})); +expectError( + web.views.publish({ + // missing user_id + view: { + type: 'home', + blocks: [], + }, + }), +); +expectError( + web.views.publish({ + // missing view + user_id: 'U1234', + }), +); // -- happy path -expectAssignable>([{ - view: { - type: 'home', - blocks: [], +expectAssignable>([ + { + view: { + type: 'home', + blocks: [], + }, + user_id: 'U1234', // provide a view and user_id }, - user_id: 'U1234', // provide a view and user_id -}]); +]); // views.update // -- sad path expectError(web.views.update()); // lacking argument expectError(web.views.update({})); // empty argument -expectError(web.views.update({ // missing external_id or view_id - view: { - type: 'home', - blocks: [], - }, -})); -expectError(web.views.update({ // missing view - external_id: '1234', -})); -expectError(web.views.update({ // missing view - view_id: '1234', -})); +expectError( + web.views.update({ + // missing external_id or view_id + view: { + type: 'home', + blocks: [], + }, + }), +); +expectError( + web.views.update({ + // missing view + external_id: '1234', + }), +); +expectError( + web.views.update({ + // missing view + view_id: '1234', + }), +); // -- happy path -expectAssignable>([{ - view: { - type: 'home', - blocks: [], +expectAssignable>([ + { + view: { + type: 'home', + blocks: [], + }, + external_id: '1234', // provide a view and view_id, or.. }, - external_id: '1234', // provide a view and view_id, or.. -}]); -expectAssignable>([{ - view: { - type: 'home', - blocks: [], +]); +expectAssignable>([ + { + view: { + type: 'home', + blocks: [], + }, + view_id: '1234', // .. a view_id }, - view_id: '1234', // .. a view_id -}]); +]); diff --git a/packages/web-api/test/types/webclient-no-token.test-d.ts b/packages/web-api/test/types/webclient-no-token.test-d.ts index fc96355e9..1e3f383e0 100644 --- a/packages/web-api/test/types/webclient-no-token.test-d.ts +++ b/packages/web-api/test/types/webclient-no-token.test-d.ts @@ -1,12 +1,14 @@ import { expectType } from 'tsd'; import { WebClient } from '../..'; -import { OauthAccessResponse } from '../../src/types/response/OauthAccessResponse'; +import type { OauthAccessResponse } from '../../src/types/response/OauthAccessResponse'; const web = new WebClient(); -expectType>(web.oauth.access({ - client_id: 'CLIENT_ID', - client_secret: 'CLIENT_SECRET', - code: 'CODE', - redirect_uri: 'REDIRECT_URI', -})); +expectType>( + web.oauth.access({ + client_id: 'CLIENT_ID', + client_secret: 'CLIENT_SECRET', + code: 'CODE', + redirect_uri: 'REDIRECT_URI', + }), +); diff --git a/packages/web-api/test/types/webclient-paginate-types.test-d.ts b/packages/web-api/test/types/webclient-paginate-types.test-d.ts index 94c82eedf..f5376010d 100644 --- a/packages/web-api/test/types/webclient-paginate-types.test-d.ts +++ b/packages/web-api/test/types/webclient-paginate-types.test-d.ts @@ -1,7 +1,7 @@ /// -import { expectType, expectError } from 'tsd'; -import { WebClient, WebAPICallResult } from '../../'; +import { expectError, expectType } from 'tsd'; +import { type WebAPICallResult, WebClient } from '../../'; const web = new WebClient(); @@ -15,7 +15,14 @@ expectType>(web.paginate('conversations.list', {}, () => false)); expectError(web.paginate('conversations.list', {}, () => 7)); -expectType>(web.paginate('conversations.list', {}, () => false, () => 5)); +expectType>( + web.paginate( + 'conversations.list', + {}, + () => false, + () => 5, + ), +); // NOTE: this error does not arise with TypeScript 4.4+ // When there's no shouldStop predicate given but there is a reducer, the behavior is undefined. @@ -39,20 +46,24 @@ web.paginate('conversations.list', {}, (page) => { /* Testing the arguments of the reduce param */ // Dummy type to make sure the generic param is bound properly -interface Dummy { t: 'dummy'; } +interface Dummy { + t: 'dummy'; +} const d: Dummy = { t: 'dummy' }; // Ideally, we would get all the same expected types even when accumulator was not explicitly typed (only the return // value of reduce having a known type). -expectType>(web.paginate( - 'conversations.list', - {}, - () => false, - (accumulator, page, pageNumber) => { - expectType(accumulator); - expectType(page); - expectType(pageNumber); - - return d; - } -)); +expectType>( + web.paginate( + 'conversations.list', + {}, + () => false, + (accumulator, page, pageNumber) => { + expectType(accumulator); + expectType(page); + expectType(pageNumber); + + return d; + }, + ), +); diff --git a/packages/web-api/tsconfig.eslint.json b/packages/web-api/tsconfig.eslint.json deleted file mode 120000 index 2cd9fb812..000000000 --- a/packages/web-api/tsconfig.eslint.json +++ /dev/null @@ -1 +0,0 @@ -../../lint-configs/tsconfig.eslint.json \ No newline at end of file diff --git a/packages/web-api/tsconfig.json b/packages/web-api/tsconfig.json index 1ba8e53b9..31cde99f7 100644 --- a/packages/web-api/tsconfig.json +++ b/packages/web-api/tsconfig.json @@ -12,16 +12,12 @@ "sourceMap": true }, "extends": "@tsconfig/recommended/tsconfig.json", - "include": [ - "src/**/*" - ], + "include": ["src/**/*"], "jsdoc": { "out": "support/jsdoc", "access": "public" }, - "exclude": [ - "src/**/*.js" - ], + "exclude": ["src/**/*.js"], "ts-node": { "esm": true }