diff --git a/types/chrome/index.d.ts b/types/chrome/index.d.ts index 4e003752125805..b5ce1ff3c59c87 100644 --- a/types/chrome/index.d.ts +++ b/types/chrome/index.d.ts @@ -1027,7 +1027,10 @@ declare namespace chrome { indexedDB?: boolean | undefined; /** The browser's cookies. */ cookies?: boolean | undefined; - /** Stored passwords. */ + /** + * Stored passwords. + * @deprecated Support for password deletion through extensions has been removed. This data type will be ignored. + */ passwords?: boolean | undefined; /** * Server-bound certificates. @@ -1122,6 +1125,7 @@ declare namespace chrome { * Clears the browser's stored passwords. * * Can return its result via Promise in Manifest V3 or later since Chrome 96. + * @deprecated Support for password deletion through extensions has been removed. This function has no effect. */ export function removePasswords(options: RemovalOptions): Promise; export function removePasswords(options: RemovalOptions, callback: () => void): void; @@ -9549,6 +9553,13 @@ declare namespace chrome { */ export function getURL(path: string): string; + /** + * Returns the extension's version as declared in the manifest. + * @returns The extension's version. + * @since Chrome 143 + */ + export function getVersion(): string; + /** Reloads the app or extension. This method is not supported in kiosk mode. For kiosk mode, use {@link chrome.runtime.restart()} method. */ export function reload(): void; diff --git a/types/chrome/test/index.ts b/types/chrome/test/index.ts index 0e717d95ce8d95..732896898d2613 100644 --- a/types/chrome/test/index.ts +++ b/types/chrome/test/index.ts @@ -872,6 +872,8 @@ function testRuntime() { chrome.runtime.getURL(""); // $ExpectType string + chrome.runtime.getVersion(); // $ExpectType string + chrome.runtime.openOptionsPage(); // $ExpectType Promise chrome.runtime.openOptionsPage(() => {}); // $ExpectType void // @ts-expect-error diff --git a/types/dom-webcodecs/webcodecs.generated.d.ts b/types/dom-webcodecs/webcodecs.generated.d.ts index 359a50ca80e939..fd08e9b510e718 100644 --- a/types/dom-webcodecs/webcodecs.generated.d.ts +++ b/types/dom-webcodecs/webcodecs.generated.d.ts @@ -190,6 +190,7 @@ interface VideoFrameInit { duration?: number | undefined; timestamp?: number | undefined; visibleRect?: DOMRectInit | undefined; + rotation?: number; } interface AudioData { diff --git a/types/express/express-tests.ts b/types/express/express-tests.ts index 84904c4e916780..93decba108e1ea 100644 --- a/types/express/express-tests.ts +++ b/types/express/express-tests.ts @@ -8,9 +8,6 @@ namespace express_tests { app.engine("jade", require("jade").__express); app.engine("html", require("ejs").renderFile); - express.static.mime.define({ - "application/fx": ["fx"], - }); app.use( "/static", express.static(__dirname + "/public", { diff --git a/types/express/package.json b/types/express/package.json index fa9d7b6485e687..23ee08718482d1 100644 --- a/types/express/package.json +++ b/types/express/package.json @@ -8,7 +8,7 @@ "dependencies": { "@types/body-parser": "*", "@types/express-serve-static-core": "^5.0.0", - "@types/serve-static": "^1" + "@types/serve-static": "^2" }, "devDependencies": { "@types/express": "workspace:.", diff --git a/types/office-js-preview/index.d.ts b/types/office-js-preview/index.d.ts index edcc9efabe49aa..28655ba690b559 100644 --- a/types/office-js-preview/index.d.ts +++ b/types/office-js-preview/index.d.ts @@ -32093,7 +32093,7 @@ declare namespace Excel { * Represents the value of a cell containing a number with a format string. Number format strings must conform to Excel guidelines. To learn more, see {@link https://support.microsoft.com/office/c0a1d1fa-d3f4-4018-96b7-9c9354dd99f5 | Review guidelines for customizing a number format}. * In this scenario, the format is applied to the value and not to the cell, so the value retains its format string throughout calculation. * - * @deprecated As of [Api set: ExcelApi 1.19], use {@link https://learn.microsoft.com/javascript/api/excel/excel.doublecellvalue | DoubleCellValue} instead. + * @deprecated As of ExcelApi 1.19, use {@link https://learn.microsoft.com/javascript/api/excel/excel.doublecellvalue | DoubleCellValue} instead. * * @remarks * [Api set: ExcelApi 1.16] @@ -32102,7 +32102,7 @@ declare namespace Excel { /** * Represents the type of this cell value. * - * @deprecated Deprecated since [Api set: ExcelApi 1.19]. + * @deprecated Deprecated since ExcelApi 1.19. * * @remarks * [Api set: ExcelApi 1.16] @@ -32111,7 +32111,7 @@ declare namespace Excel { /** * Represents the value that would be returned by `Range.values` for a cell with this value. * - * @deprecated Deprecated since [Api set: ExcelApi 1.19]. + * @deprecated Deprecated since ExcelApi 1.19. * * @remarks * [Api set: ExcelApi 1.16] @@ -32120,7 +32120,7 @@ declare namespace Excel { /** * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. * - * @deprecated Deprecated since [Api set: ExcelApi 1.19]. + * @deprecated Deprecated since ExcelApi 1.19. * * @remarks * [Api set: ExcelApi 1.16] @@ -32132,7 +32132,7 @@ declare namespace Excel { * Number format strings must conform to Excel guidelines. * To learn more, see {@link https://support.microsoft.com/office/c0a1d1fa-d3f4-4018-96b7-9c9354dd99f5 | Review guidelines for customizing a number format}. * - * @deprecated Deprecated since [Api set: ExcelApi 1.19]. + * @deprecated Deprecated since ExcelApi 1.19. * * @remarks * [Api set: ExcelApi 1.16] @@ -34625,10 +34625,17 @@ declare namespace Excel { } /** * - * Creates and opens a new workbook. Optionally, the workbook can be pre-populated with a Base64-encoded .xlsx file. - * The `extensionHardening` Windows registry key affects the `base64File` param. The file extension defined by the param must match the real file type of the file. If `extensionHardening` is set to deny mismatches and the file extension does not match the real file type, this API throws the following error: "This operation is not allowed due to the extension hardening policy." - * Note: Macros can be a security risk. If this API is used to create a workbook that includes a macro, the add-in user will be prompted with a "Trust this add-in?" dialog in the Excel UI. The user must select the "Trust add-in" button to proceed. - * + * Creates and opens a new workbook. Optionally, the workbook can be pre-populated + * with a Base64-encoded .xlsx file. + + * Note: Macros can be a security risk. If this API is used to create a workbook that + * includes a macro, the add-in user will be prompted with a "Trust this add-in?" dialog + * in the Excel UI. The user must select the "Trust add-in" button to proceed. + * + * Note: The `extensionHardening` Windows registry key affects the `base64File` param. + * The file extension defined by the param must match the real file type of the file. + * If `extensionHardening` is set to deny mismatches and the file extension does not match the real file type, this API throws the following error: + * "This operation is not allowed due to the extension hardening policy." * [Api set: ExcelApi 1.8] * * @param base64File Optional. The Base64-encoded .xlsx file. The default value is null. @@ -34800,11 +34807,11 @@ declare namespace Excel { class RequestContext extends OfficeCore.RequestContext { constructor(url?: string | Session, invocation?: { invocationId: number; - isInCFSyncScenario: boolean; + isInSyncExecution: boolean; }); setInvocation(invocation: { invocationId: number; - isInCFSyncScenario: boolean; + isInSyncExecution: boolean; }): void; readonly workbook: Workbook; readonly application: Application; @@ -34827,7 +34834,6 @@ declare namespace Excel { * * When false, each `context.sync()` call creates an undo record. * When true, all `context.sync()` calls in a single `Excel.run` are merged into one `undo` group. - * * @remarks * [Api set: ExcelApi 1.20] */ @@ -39860,6 +39866,66 @@ declare namespace Excel { */ toJSON(): Excel.Interfaces.IterativeCalculationData; } + /** + * Specifies the type of autorun event. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + enum AutorunEventType { + /** + * The autorun event type is unknown. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ + unknown = "Unknown", + /** + * The autorun event type is triggered when the document is saved. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ + onDocumentSave = "OnDocumentSave", + /** + * The autorun event type is triggered when the document is saved as a new file. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ + onDocumentSaveAs = "OnDocumentSaveAs" + } + /** + * Specifies the options for completing an autorun event. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + interface AutorunEventCompletedOptions { + /** + * Specifies whether to allow the event to proceed. The default value is `false`. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + allowEvent: boolean; + /** + * Specifies the type of autorun event to be completed if allowed. The default value is `unknown`. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + autorunEventType: Excel.AutorunEventType | "Unknown" | "OnDocumentSave" | "OnDocumentSaveAs"; + /** + * If provided, specifies an optional error message if the event isn't allowed to proceed. The default value is "" (empty string). + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + */ + message?: string; + } /** * Workbook is the top level object which contains related workbook objects such as worksheets, tables, and ranges. To learn more about the workbook object model, read {@link https://learn.microsoft.com/office/dev/add-ins/excel/excel-add-ins-workbooks | Work with workbooks using the Excel JavaScript API}. @@ -40139,6 +40205,16 @@ declare namespace Excel { set(properties: Interfaces.WorkbookUpdateData, options?: OfficeExtension.UpdateOptions): void; /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ set(properties: Excel.Workbook): void; + /** + * Notifies the host application that the add-in's code has finished running in an autorun event. + * + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + * @beta + * + * @param AutorunEventCompletedOptions Required. Options for completing the autorun event. + */ + autorunEventCompleted(AutorunEventCompletedOptions: Excel.AutorunEventCompletedOptions): void; /** * Close current workbook. * @@ -40158,8 +40234,7 @@ declare namespace Excel { */ close(closeBehavior?: "Save" | "SkipSave"): void; /** - * Sets focus on the workbook. This will cause the grid or the currently active object - to receive keyboard events. + * Sets focus on the workbook. This causes the Excel grid or the currently active object to receive keyboard events. * * @remarks * [Api set: ExcelApiDesktop 1.1] @@ -40254,7 +40329,10 @@ declare namespace Excel { getSelectedRanges(): Excel.RangeAreas; /** * Inserts the specified worksheets from a source workbook into the current workbook. - * The `extensionHardening` Windows registry key affects this API. The file extension defined by the `base64File` param must match the real file type of the inserted file. If `extensionHardening` is set to deny mismatches and the file extension does not match the real file type, this API throws the following error: "This operation is not allowed due to the extension hardening policy." + + The `extensionHardening` Windows registry key affects this API. The file extension defined by the `base64File` param must match the real file type of the inserted file. If `extensionHardening` is set to deny mismatches and the file extension does not match the real file type, this API throws the following error: "This operation is not allowed due to the extension hardening policy." + + **Note**: This API is currently only supported for Office on Windows, Mac, and the web. * * @remarks * [Api set: ExcelApi 1.13] @@ -45290,35 +45368,35 @@ declare namespace Excel { */ enum TableSource { /** - * External data source (such as Microsoft SharePoint Foundation). + * An external data source, such as Microsoft SharePoint Foundation. * @remarks * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta */ external = "External", /** - * An Excel range object. + * A range object in this worksheet. * @remarks * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta */ range = "Range", /** - * XML data source. + * An XML data source. * @remarks * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta */ xml = "Xml", /** - * Query data source. + * A Power Query query data source. * @remarks * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta */ query = "Query", /** - * Power Pivot model. + * A Power Pivot model. * @remarks * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta @@ -66334,7 +66412,13 @@ declare namespace Excel { * [Api set: ExcelApi BETA (PREVIEW ONLY)] * @beta */ - externalCodeServiceDiffResultReceived = "ExternalCodeServiceDiffResultReceived" + externalCodeServiceDiffResultReceived = "ExternalCodeServiceDiffResultReceived", + /** + * AugmentationLoopUploadStatusChanged represents the type of event registered when the upload status of the augmentation loop changes. + * @remarks + * [Api set: ExcelApi BETA (PREVIEW ONLY)] + */ + augmentationLoopUploadStatusChanged = "AugmentationLoopUploadStatusChanged" } /** * @remarks @@ -69276,6 +69360,7 @@ declare namespace Excel { content: string; /** * Specifies the height of the note. + * Note: This property is not supported in Excel on the web. * * @remarks * [Api set: ExcelApi 1.18] @@ -69283,6 +69368,7 @@ declare namespace Excel { height: number; /** * Specifies the visibility of the note. A value of `true` means the note is shown. + * Note: This property is not supported in Excel on the web. * * @remarks * [Api set: ExcelApi 1.18] @@ -69290,6 +69376,7 @@ declare namespace Excel { visible: boolean; /** * Specifies the width of the note. + * Note: This property is not supported in Excel on the web. * * @remarks * [Api set: ExcelApi 1.18] @@ -79271,6 +79358,7 @@ declare namespace Excel { content?: string; /** * Specifies the height of the note. + * Note: This property is not supported in Excel on the web. * * @remarks * [Api set: ExcelApi 1.18] @@ -79278,6 +79366,7 @@ declare namespace Excel { height?: number; /** * Specifies the visibility of the note. A value of `true` means the note is shown. + * Note: This property is not supported in Excel on the web. * * @remarks * [Api set: ExcelApi 1.18] @@ -79285,6 +79374,7 @@ declare namespace Excel { visible?: boolean; /** * Specifies the width of the note. + * Note: This property is not supported in Excel on the web. * * @remarks * [Api set: ExcelApi 1.18] @@ -86969,6 +87059,7 @@ declare namespace Excel { content?: string; /** * Specifies the height of the note. + * Note: This property is not supported in Excel on the web. * * @remarks * [Api set: ExcelApi 1.18] @@ -86976,6 +87067,7 @@ declare namespace Excel { height?: number; /** * Specifies the visibility of the note. A value of `true` means the note is shown. + * Note: This property is not supported in Excel on the web. * * @remarks * [Api set: ExcelApi 1.18] @@ -86983,6 +87075,7 @@ declare namespace Excel { visible?: boolean; /** * Specifies the width of the note. + * Note: This property is not supported in Excel on the web. * * @remarks * [Api set: ExcelApi 1.18] @@ -99738,6 +99831,7 @@ declare namespace Excel { content?: boolean; /** * For EACH ITEM in the collection: Specifies the height of the note. + * Note: This property is not supported in Excel on the web. * * @remarks * [Api set: ExcelApi 1.18] @@ -99745,6 +99839,7 @@ declare namespace Excel { height?: boolean; /** * For EACH ITEM in the collection: Specifies the visibility of the note. A value of `true` means the note is shown. + * Note: This property is not supported in Excel on the web. * * @remarks * [Api set: ExcelApi 1.18] @@ -99752,6 +99847,7 @@ declare namespace Excel { visible?: boolean; /** * For EACH ITEM in the collection: Specifies the width of the note. + * Note: This property is not supported in Excel on the web. * * @remarks * [Api set: ExcelApi 1.18] diff --git a/types/office-js/index.d.ts b/types/office-js/index.d.ts index 55b14b089f05bd..0585ec0dc78763 100644 --- a/types/office-js/index.d.ts +++ b/types/office-js/index.d.ts @@ -30677,7 +30677,7 @@ declare namespace Excel { * Represents the value of a cell containing a number with a format string. Number format strings must conform to Excel guidelines. To learn more, see {@link https://support.microsoft.com/office/c0a1d1fa-d3f4-4018-96b7-9c9354dd99f5 | Review guidelines for customizing a number format}. * In this scenario, the format is applied to the value and not to the cell, so the value retains its format string throughout calculation. * - * @deprecated As of [Api set: ExcelApi 1.19], use {@link https://learn.microsoft.com/javascript/api/excel/excel.doublecellvalue | DoubleCellValue} instead. + * @deprecated As of ExcelApi 1.19, use {@link https://learn.microsoft.com/javascript/api/excel/excel.doublecellvalue | DoubleCellValue} instead. * * @remarks * [Api set: ExcelApi 1.16] @@ -30686,7 +30686,7 @@ declare namespace Excel { /** * Represents the type of this cell value. * - * @deprecated Deprecated since [Api set: ExcelApi 1.19]. + * @deprecated Deprecated since ExcelApi 1.19. * * @remarks * [Api set: ExcelApi 1.16] @@ -30695,7 +30695,7 @@ declare namespace Excel { /** * Represents the value that would be returned by `Range.values` for a cell with this value. * - * @deprecated Deprecated since [Api set: ExcelApi 1.19]. + * @deprecated Deprecated since ExcelApi 1.19. * * @remarks * [Api set: ExcelApi 1.16] @@ -30704,7 +30704,7 @@ declare namespace Excel { /** * Represents the value that would be returned by `Range.valueTypes` for a cell with this value. * - * @deprecated Deprecated since [Api set: ExcelApi 1.19]. + * @deprecated Deprecated since ExcelApi 1.19. * * @remarks * [Api set: ExcelApi 1.16] @@ -30716,7 +30716,7 @@ declare namespace Excel { * Number format strings must conform to Excel guidelines. * To learn more, see {@link https://support.microsoft.com/office/c0a1d1fa-d3f4-4018-96b7-9c9354dd99f5 | Review guidelines for customizing a number format}. * - * @deprecated Deprecated since [Api set: ExcelApi 1.19]. + * @deprecated Deprecated since ExcelApi 1.19. * * @remarks * [Api set: ExcelApi 1.16] @@ -32170,10 +32170,17 @@ declare namespace Excel { } /** * - * Creates and opens a new workbook. Optionally, the workbook can be pre-populated with a Base64-encoded .xlsx file. - * The `extensionHardening` Windows registry key affects the `base64File` param. The file extension defined by the param must match the real file type of the file. If `extensionHardening` is set to deny mismatches and the file extension does not match the real file type, this API throws the following error: "This operation is not allowed due to the extension hardening policy." - * Note: Macros can be a security risk. If this API is used to create a workbook that includes a macro, the add-in user will be prompted with a "Trust this add-in?" dialog in the Excel UI. The user must select the "Trust add-in" button to proceed. - * + * Creates and opens a new workbook. Optionally, the workbook can be pre-populated + * with a Base64-encoded .xlsx file. + + * Note: Macros can be a security risk. If this API is used to create a workbook that + * includes a macro, the add-in user will be prompted with a "Trust this add-in?" dialog + * in the Excel UI. The user must select the "Trust add-in" button to proceed. + * + * Note: The `extensionHardening` Windows registry key affects the `base64File` param. + * The file extension defined by the param must match the real file type of the file. + * If `extensionHardening` is set to deny mismatches and the file extension does not match the real file type, this API throws the following error: + * "This operation is not allowed due to the extension hardening policy." * [Api set: ExcelApi 1.8] * * @param base64File Optional. The Base64-encoded .xlsx file. The default value is null. @@ -32365,7 +32372,6 @@ declare namespace Excel { * * When false, each `context.sync()` call creates an undo record. * When true, all `context.sync()` calls in a single `Excel.run` are merged into one `undo` group. - * * @remarks * [Api set: ExcelApi 1.20] */ @@ -35781,8 +35787,7 @@ declare namespace Excel { */ close(closeBehavior?: "Save" | "SkipSave"): void; /** - * Sets focus on the workbook. This will cause the grid or the currently active object - to receive keyboard events. + * Sets focus on the workbook. This causes the Excel grid or the currently active object to receive keyboard events. * * @remarks * [Api set: ExcelApiDesktop 1.1] @@ -35877,7 +35882,10 @@ declare namespace Excel { getSelectedRanges(): Excel.RangeAreas; /** * Inserts the specified worksheets from a source workbook into the current workbook. - * The `extensionHardening` Windows registry key affects this API. The file extension defined by the `base64File` param must match the real file type of the inserted file. If `extensionHardening` is set to deny mismatches and the file extension does not match the real file type, this API throws the following error: "This operation is not allowed due to the extension hardening policy." + + The `extensionHardening` Windows registry key affects this API. The file extension defined by the `base64File` param must match the real file type of the inserted file. If `extensionHardening` is set to deny mismatches and the file extension does not match the real file type, this API throws the following error: "This operation is not allowed due to the extension hardening policy." + + **Note**: This API is currently only supported for Office on Windows, Mac, and the web. * * @remarks * [Api set: ExcelApi 1.13] @@ -64306,6 +64314,7 @@ declare namespace Excel { content: string; /** * Specifies the height of the note. + * Note: This property is not supported in Excel on the web. * * @remarks * [Api set: ExcelApi 1.18] @@ -64313,6 +64322,7 @@ declare namespace Excel { height: number; /** * Specifies the visibility of the note. A value of `true` means the note is shown. + * Note: This property is not supported in Excel on the web. * * @remarks * [Api set: ExcelApi 1.18] @@ -64320,6 +64330,7 @@ declare namespace Excel { visible: boolean; /** * Specifies the width of the note. + * Note: This property is not supported in Excel on the web. * * @remarks * [Api set: ExcelApi 1.18] @@ -74108,6 +74119,7 @@ declare namespace Excel { content?: string; /** * Specifies the height of the note. + * Note: This property is not supported in Excel on the web. * * @remarks * [Api set: ExcelApi 1.18] @@ -74115,6 +74127,7 @@ declare namespace Excel { height?: number; /** * Specifies the visibility of the note. A value of `true` means the note is shown. + * Note: This property is not supported in Excel on the web. * * @remarks * [Api set: ExcelApi 1.18] @@ -74122,6 +74135,7 @@ declare namespace Excel { visible?: boolean; /** * Specifies the width of the note. + * Note: This property is not supported in Excel on the web. * * @remarks * [Api set: ExcelApi 1.18] @@ -81425,6 +81439,7 @@ declare namespace Excel { content?: string; /** * Specifies the height of the note. + * Note: This property is not supported in Excel on the web. * * @remarks * [Api set: ExcelApi 1.18] @@ -81432,6 +81447,7 @@ declare namespace Excel { height?: number; /** * Specifies the visibility of the note. A value of `true` means the note is shown. + * Note: This property is not supported in Excel on the web. * * @remarks * [Api set: ExcelApi 1.18] @@ -81439,6 +81455,7 @@ declare namespace Excel { visible?: boolean; /** * Specifies the width of the note. + * Note: This property is not supported in Excel on the web. * * @remarks * [Api set: ExcelApi 1.18] @@ -93509,6 +93526,7 @@ declare namespace Excel { content?: boolean; /** * For EACH ITEM in the collection: Specifies the height of the note. + * Note: This property is not supported in Excel on the web. * * @remarks * [Api set: ExcelApi 1.18] @@ -93516,6 +93534,7 @@ declare namespace Excel { height?: boolean; /** * For EACH ITEM in the collection: Specifies the visibility of the note. A value of `true` means the note is shown. + * Note: This property is not supported in Excel on the web. * * @remarks * [Api set: ExcelApi 1.18] @@ -93523,6 +93542,7 @@ declare namespace Excel { visible?: boolean; /** * For EACH ITEM in the collection: Specifies the width of the note. + * Note: This property is not supported in Excel on the web. * * @remarks * [Api set: ExcelApi 1.18] diff --git a/types/papaparse/package.json b/types/papaparse/package.json index 3ac41f73cc9f87..db4e15e29a5cf2 100644 --- a/types/papaparse/package.json +++ b/types/papaparse/package.json @@ -36,10 +36,6 @@ "name": "Janne Liuhtonen", "githubUsername": "jliuhtonen" }, - { - "name": "Raphaël Barbazza", - "githubUsername": "rbarbazz" - }, { "name": "Piotr Błażejewicz", "githubUsername": "peterblazejewicz" diff --git a/types/react-responsive-masonry/index.d.ts b/types/react-responsive-masonry/index.d.ts index 4a9bab25379bf1..7019bfa1ab27d3 100644 --- a/types/react-responsive-masonry/index.d.ts +++ b/types/react-responsive-masonry/index.d.ts @@ -52,6 +52,14 @@ export interface ResponsiveMasonryProps { columnsCountBreakPoints?: { [key: number]: number; }; + /** + * A Object containing Keys as breakpoints in px and values as the gutter size + * + * Default Value = { 350: '10px', 750: '10px', 900: '10px' } + */ + gutterBreakPoints?: { + [key: number]: string; + }; className?: string; style?: CSSProperties; } diff --git a/types/react-responsive-masonry/package.json b/types/react-responsive-masonry/package.json index c13c0a81ed19fa..95633927737ef4 100644 --- a/types/react-responsive-masonry/package.json +++ b/types/react-responsive-masonry/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@types/react-responsive-masonry", - "version": "2.6.9999", + "version": "2.7.9999", "projects": [ "https://github.com/cedricdelpoux/react-responsive-masonry#readme" ], diff --git a/types/react-responsive-masonry/react-responsive-masonry-tests.tsx b/types/react-responsive-masonry/react-responsive-masonry-tests.tsx index aedf7cbfb6c95b..e1ff721dc711dc 100644 --- a/types/react-responsive-masonry/react-responsive-masonry-tests.tsx +++ b/types/react-responsive-masonry/react-responsive-masonry-tests.tsx @@ -44,6 +44,7 @@ const Test = () => { {/* Test with all props */} diff --git a/types/reveal.js/index.d.ts b/types/reveal.js/index.d.ts index 97a2c13805de4d..e8c06180ce6765 100644 --- a/types/reveal.js/index.d.ts +++ b/types/reveal.js/index.d.ts @@ -1535,7 +1535,7 @@ declare namespace Reveal { */ interface HighlightConfig { highlightOnLoad?: boolean; - excapeHTML?: boolean; + escapeHTML?: boolean; beforeHighlight?: (...args: any) => any; } diff --git a/types/reveal.js/reveal.esm.js-tests.ts b/types/reveal.js/reveal.esm.js-tests.ts index b2335e6a30128a..90543a35b283c5 100644 --- a/types/reveal.js/reveal.esm.js-tests.ts +++ b/types/reveal.js/reveal.esm.js-tests.ts @@ -342,7 +342,7 @@ deck.initialize({ // highlight highlight: { highlightOnLoad: true, - excapeHTML: true, + escapeHTML: true, beforeHighlight: () => {}, }, diff --git a/types/reveal.js/reveal.js-tests.ts b/types/reveal.js/reveal.js-tests.ts index 3ebe0c2f6d3bea..eb83eb1d0d147e 100644 --- a/types/reveal.js/reveal.js-tests.ts +++ b/types/reveal.js/reveal.js-tests.ts @@ -372,7 +372,7 @@ deck.initialize({ // highlight highlight: { highlightOnLoad: true, - excapeHTML: true, + escapeHTML: true, beforeHighlight: () => {}, }, diff --git a/types/sharetribe-flex-integration-sdk/.npmignore b/types/sharetribe-flex-integration-sdk/.npmignore new file mode 100644 index 00000000000000..93e307400a5456 --- /dev/null +++ b/types/sharetribe-flex-integration-sdk/.npmignore @@ -0,0 +1,5 @@ +* +!**/*.d.ts +!**/*.d.cts +!**/*.d.mts +!**/*.d.*.ts diff --git a/types/sharetribe-flex-integration-sdk/index.d.ts b/types/sharetribe-flex-integration-sdk/index.d.ts new file mode 100644 index 00000000000000..594785ff90c15b --- /dev/null +++ b/types/sharetribe-flex-integration-sdk/index.d.ts @@ -0,0 +1,260 @@ +export interface UUID { + _sdkType: "UUID"; + uuid: string; +} + +export interface Money { + _sdkType: "Money"; + amount: number; + currency: string; +} + +export interface ResourceReference { + id: UUID; + type: string; +} + +export interface IncludedResource { + type: string; + id?: { + uuid: string; + }; + [key: string]: unknown; +} + +export interface TransactionRelationships { + customer: { + data: ResourceReference; + }; + provider: { + data: ResourceReference; + }; + listing: { + data: ResourceReference; + }; + marketplace?: { + data: ResourceReference; + }; + messages: { + data: ResourceReference[]; + }; +} + +export interface TransactionAttributes { + lastTransition?: string; + payinTotal?: Money; + processName?: string; + metadata?: { + lastUpdatedAt?: string; + }; + transitions?: unknown[]; + createdAt?: number; +} + +export interface Transaction { + id: UUID; + type: string; + attributes: TransactionAttributes; + relationships: TransactionRelationships; +} + +export interface UserProfile { + displayName?: string; + firstName?: string; + lastName?: string; + publicData?: { + userType?: string; + [key: string]: unknown; + }; +} + +export interface UserAttributes { + email: string; + profile: UserProfile; + state?: string; +} + +export interface UserRelationships { + profileImage?: { + data?: ResourceReference; + }; +} + +export interface User { + id: UUID; + type: string; + attributes: UserAttributes; + relationships?: UserRelationships; +} + +export interface ListingAttributes { + title: string; + description?: string; + state?: string; + price?: Money; + publicData?: Record; + privateData?: Record; + deleted?: boolean; + geolocation?: unknown; + createdAt?: number; + availabilityPlan?: unknown; + metadata?: Record; +} + +export interface ListingRelationships { + author?: { + data: ResourceReference; + }; + marketplace?: { + data: ResourceReference; + }; + currentStock?: { + data: ResourceReference; + }; + images?: { + data: ResourceReference[]; + }; +} + +export interface Listing { + id: UUID; + type: string; + attributes: ListingAttributes; + relationships?: ListingRelationships; +} + +export interface MessageAttributes { + content: string; + createdAt: { + _seconds: number; + _nanoseconds: number; + }; +} + +export interface MessageRelationships { + transaction: { + data: ResourceReference; + }; + sender?: { + data: ResourceReference; + }; + customer?: { + data: ResourceReference; + }; + provider?: { + data: ResourceReference; + }; +} + +export interface Message { + id: UUID; + type: string; + attributes: MessageAttributes; + relationships: MessageRelationships; +} + +export interface EventAttributes { + sequenceId: number; + marketplaceId: string; + eventType: string; + resourceType: string; + resourceId: string; + resource: unknown; + previousValues?: Record; + source?: string; + createdAt: string; +} + +export interface Event { + id: UUID; + type: string; + attributes: EventAttributes; +} + +export interface MarketplaceAttributes { + name: string; + description: string | null; +} + +export interface MarketplaceData { + id: UUID; + type: string; + attributes: MarketplaceAttributes; +} + +export interface MarketplaceShowResponse { + status: number; + statusText: string; + data: { + data: MarketplaceData; + }; +} + +export interface QueryMeta { + totalPages: number; + totalItems?: number; + page?: number; + perPage?: number; +} + +export interface QueryResponse { + status: number; + data: { + data: T[]; + included?: IncludedResource[]; + meta: QueryMeta; + }; +} + +export interface ShowResponse { + status: number; + data: { + data: T; + included?: IncludedResource[]; + }; +} + +export interface MutationResponse { + status: number; + data: unknown; +} + +export interface IntegrationSdk { + marketplace: { + show: () => Promise; + }; + events: { + query: (params?: { startAfterSequenceId?: number }) => Promise>; + }; + users: { + query: (params?: { page?: number; include?: string[] }) => Promise>; + show: (params: { id: string; include?: string[] }) => Promise>; + updatePermissions: (params: Record) => Promise; + }; + transactions: { + query: (params?: { page?: number; include?: string[] }) => Promise>; + transition: ( + params: { id: string; transition: string; params: Record }, + ) => Promise; + updateMetadata: ( + params: { id: string; metadata: Record }, + options?: { expand?: boolean }, + ) => Promise; + }; + listings: { + query: (params?: { page?: number; include?: string[] }) => Promise>; + }; +} + +export function createInstance(config: { + clientId: string; + clientSecret: string; + queryLimiter?: unknown; + commandLimiter?: unknown; +}): IntegrationSdk; + +export namespace util { + function createRateLimiter(config: unknown): unknown; + const prodQueryLimiterConfig: unknown; + const prodCommandLimiterConfig: unknown; +} diff --git a/types/sharetribe-flex-integration-sdk/package.json b/types/sharetribe-flex-integration-sdk/package.json new file mode 100644 index 00000000000000..90be71f1ea2376 --- /dev/null +++ b/types/sharetribe-flex-integration-sdk/package.json @@ -0,0 +1,22 @@ +{ + "private": true, + "name": "@types/sharetribe-flex-integration-sdk", + "version": "1.11.9999", + "projects": [ + "https://github.com/sharetribe/flex-integration-sdk-js" + ], + "minimumTypeScriptVersion": "4.5", + "devDependencies": { + "@types/sharetribe-flex-integration-sdk": "workspace:." + }, + "owners": [ + { + "name": "Jayen Ashar", + "githubUsername": "jayenashar" + }, + { + "name": "Adam Martinovic", + "githubUsername": "venmartin" + } + ] +} diff --git a/types/sharetribe-flex-integration-sdk/sharetribe-flex-integration-sdk-tests.ts b/types/sharetribe-flex-integration-sdk/sharetribe-flex-integration-sdk-tests.ts new file mode 100644 index 00000000000000..14c3ed725dd910 --- /dev/null +++ b/types/sharetribe-flex-integration-sdk/sharetribe-flex-integration-sdk-tests.ts @@ -0,0 +1,28 @@ +import { createInstance, util } from "sharetribe-flex-integration-sdk"; + +const sdk = createInstance({ + clientId: "client-id", + clientSecret: "client-secret", +}); + +sdk.marketplace.show().then((response) => { + const name: string = response.data.data.attributes.name; +}); + +sdk.users.query({ page: 1, include: ["profileImage"] }).then((response) => { + const firstUser = response.data.data[0]; + if (firstUser) { + const email: string = firstUser.attributes.email; + } +}); + +sdk.transactions.transition({ + id: "transaction-id", + transition: "request-payment", + params: { listingId: "listing-id" }, +}).then((response) => { + const status: number = response.status; +}); + +const rateLimiterConfig = util.prodQueryLimiterConfig; +const rateLimiter = util.createRateLimiter(rateLimiterConfig); diff --git a/types/sharetribe-flex-integration-sdk/tsconfig.json b/types/sharetribe-flex-integration-sdk/tsconfig.json new file mode 100644 index 00000000000000..cdac1d4cede84d --- /dev/null +++ b/types/sharetribe-flex-integration-sdk/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "types": [] + }, + "files": [ + "index.d.ts", + "sharetribe-flex-integration-sdk-tests.ts" + ] +} diff --git a/types/sharetribe-flex-sdk/.npmignore b/types/sharetribe-flex-sdk/.npmignore new file mode 100644 index 00000000000000..93e307400a5456 --- /dev/null +++ b/types/sharetribe-flex-sdk/.npmignore @@ -0,0 +1,5 @@ +* +!**/*.d.ts +!**/*.d.cts +!**/*.d.mts +!**/*.d.*.ts diff --git a/types/sharetribe-flex-sdk/index.d.ts b/types/sharetribe-flex-sdk/index.d.ts new file mode 100644 index 00000000000000..25e4adc47898d3 --- /dev/null +++ b/types/sharetribe-flex-sdk/index.d.ts @@ -0,0 +1,65 @@ +export interface ImageVariant { + name: string; + width: number; + height: number; + url: string; +} + +export interface ImageVariants { + [key: string]: ImageVariant; +} + +export interface BrandingImageAttributes { + variants: ImageVariants; +} + +export interface BrandingImage { + id: string; + type: string; + attributes: BrandingImageAttributes; +} + +export interface MarketplaceColors { + primaryButton: string; + notificationPrimaryButton: string; + mainColor: string; +} + +export interface BrandingData { + marketplaceColors: MarketplaceColors; +} + +export interface Branding { + data: BrandingData; + included: BrandingImage[]; +} + +export interface UUID { + _sdkType?: "UUID"; + uuid: string; +} + +export interface MarketplaceAttributes { + name: string; + description: string | null; +} + +export interface MarketplaceData { + id: UUID; + type: "marketplace"; + attributes: MarketplaceAttributes; +} + +export interface MarketplaceDataResponse { + data: MarketplaceData; +} + +export interface MarketplaceSdk { + marketplace: { + show: () => Promise<{ status: number; statusText: string; data: MarketplaceDataResponse }>; + }; + assetByAlias: (params: { path: string; alias: string }) => Promise<{ status?: number; data: unknown }>; + Branding: Branding; +} + +export function createInstance(config: { clientId: string }): MarketplaceSdk; diff --git a/types/sharetribe-flex-sdk/package.json b/types/sharetribe-flex-sdk/package.json new file mode 100644 index 00000000000000..54f5eeda4e78ec --- /dev/null +++ b/types/sharetribe-flex-sdk/package.json @@ -0,0 +1,22 @@ +{ + "private": true, + "name": "@types/sharetribe-flex-sdk", + "version": "1.21.9999", + "projects": [ + "https://github.com/sharetribe/flex-sdk-js" + ], + "minimumTypeScriptVersion": "4.5", + "devDependencies": { + "@types/sharetribe-flex-sdk": "workspace:." + }, + "owners": [ + { + "name": "Jayen Ashar", + "githubUsername": "jayenashar" + }, + { + "name": "Adam Martinovic", + "githubUsername": "venmartin" + } + ] +} diff --git a/types/sharetribe-flex-sdk/sharetribe-flex-sdk-tests.ts b/types/sharetribe-flex-sdk/sharetribe-flex-sdk-tests.ts new file mode 100644 index 00000000000000..a57a63daa99c81 --- /dev/null +++ b/types/sharetribe-flex-sdk/sharetribe-flex-sdk-tests.ts @@ -0,0 +1,18 @@ +import { createInstance, MarketplaceDataResponse } from "sharetribe-flex-sdk"; + +const sdk = createInstance({ clientId: "client-id" }); + +sdk.marketplace.show().then((response: { status: number; statusText: string; data: MarketplaceDataResponse }) => { + const name: string = response.data.data.attributes.name; + const description: string | null = response.data.data.attributes.description; +}); + +sdk.assetByAlias({ path: "/assets", alias: "logo" }).then((result: { status?: number; data: unknown }) => { + const status: number | undefined = result.status; + const data: unknown = result.data; +}); + +const colors = sdk.Branding.data.marketplaceColors; +const primary: string = colors.primaryButton; +const notification: string = colors.notificationPrimaryButton; +const mainColor: string = colors.mainColor; diff --git a/types/sharetribe-flex-sdk/tsconfig.json b/types/sharetribe-flex-sdk/tsconfig.json new file mode 100644 index 00000000000000..ef580548bf62a6 --- /dev/null +++ b/types/sharetribe-flex-sdk/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "types": [] + }, + "files": [ + "index.d.ts", + "sharetribe-flex-sdk-tests.ts" + ] +} diff --git a/types/socketcluster-client/package.json b/types/socketcluster-client/package.json index a1f1f2e13fc668..be31e72168d123 100644 --- a/types/socketcluster-client/package.json +++ b/types/socketcluster-client/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@types/socketcluster-client", - "version": "19.1.9999", + "version": "20.0.9999", "projects": [ "https://github.com/SocketCluster/socketcluster-client", "http://socketcluster.io" diff --git a/types/socketcluster-server/package.json b/types/socketcluster-server/package.json index bd605648608eb0..daadf7a143daae 100644 --- a/types/socketcluster-server/package.json +++ b/types/socketcluster-server/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@types/socketcluster-server", - "version": "19.0.9999", + "version": "20.0.9999", "projects": [ "https://github.com/SocketCluster/socketcluster-server" ], diff --git a/types/telegram-web-app/index.d.ts b/types/telegram-web-app/index.d.ts index e867c2977e6b14..2d6a29fb2cd49a 100644 --- a/types/telegram-web-app/index.d.ts +++ b/types/telegram-web-app/index.d.ts @@ -12,208 +12,338 @@ export interface Telegram { export interface WebApp { /** - * A string with raw data transferred to the Web App, convenient for - * validating data. WARNING: Validate data from this field before using it - * on the bot's server. + * A string with raw data transferred to the Web App, + * convenient for {@link https://core.telegram.org/bots/webapps#validating-data-received-via-the-mini-app| validating data}. + * + * **WARNING:** {@link https://core.telegram.org/bots/webapps#validating-data-received-via-the-mini-app| Validate data} from this field before using it on the bot's server. */ initData: string; + /** - * An object with input data transferred to the Web App. WARNING: Data from - * this field should not be trusted. You should only use data from initData - * on the bot's server and only after it has been validated. + * An object with input data transferred to the Mini App. + * + * **WARNING:** Data from this field should not be trusted. + * You should only use data from {@link initData} on the bot's server and only after it has been {@link https://core.telegram.org/bots/webapps#validating-data-received-via-the-mini-app| validated}. */ initDataUnsafe: WebAppInitData; + /** * The version of the Bot API available in the user's Telegram app. */ version: string; + /** * The name of the platform of the user's Telegram app. */ platform: string; + /** - * The color scheme currently used in the Telegram app. Either “light” or - * “dark”. Also available as the CSS variable var(--tg-color-scheme). + * The color scheme currently used in the Telegram app. + * Either “light” or “dark”. + * + * @see available as the CSS variable `var(--tg-color-scheme)`. */ colorScheme: "light" | "dark"; + /** * An object containing the current theme settings used in the Telegram app. */ themeParams: ThemeParams; + /** - * **Bot API 8.0+** + * *True*, if the Mini App is currently active. + * *False*, if the Mini App is minimized. * - * True, if the Mini App is currently active. - * False, if the Mini App is minimized. + * @since Bot API 8.0+ */ isActive: boolean; + /** - * True if the Web App is expanded to the maximum available height. - * False, if the Web App occupies part of the screen and can be expanded to the - * full height using the expand() method. + * *True*, if the Mini App is expanded to the maximum available height. + * (False*, if the Mini App occupies part of the screen and can be expanded to the full height using the {@link expand| expand()} method. */ isExpanded: boolean; + /** - * The current height of the visible area of the Web App. - * Also available in CSS as the variable var(--tg-viewport-height). + * The current height of the visible area of the Mini App. + * + * The application can display just the top part of the Mini App, + * with its lower part remaining outside the screen area. + * From this position, the user can “pull” the Mini App to its maximum height, + * while the bot can do the same by calling the {@link expand| expand()} method. + * As the position of the Mini App changes, + * the current height value of the visible area will be updated in real time. * - * The application can display just the top part of the Web App, with its - * lower part remaining outside the screen area. From this position, the - * user can “pull” the Web App to its maximum height, while the bot can do - * the same by calling the expand() method. As the position of the Web App - * changes, the current height value of the visible area will be updated in - * real time. + * Please note that the refresh rate of this value is not sufficient to smoothly follow the lower border of the window. + * It should not be used to pin interface elements to the bottom of the visible area. + * It's more appropriate to use the value of the {@link viewportStableHeight} field for this purpose. * - * Please note that the refresh rate of this value is not sufficient to - * smoothly follow the lower border of the window. It should not be used to - * pin interface elements to the bottom of the visible area. It's more - * appropriate to use the value of the viewportStableHeight field for this - * purpose. + * @see Available in CSS as the variable `var(--tg-viewport-height)`. */ viewportHeight: number; + /** - * The height of the visible area of the Web App in its last stable state. - * Also available in CSS as a variable var(--tg-viewport-stable-height). + * The height of the visible area of the Mini App in its last stable state. + * + * The application can display just the top part of the Mini App, + * with its lower part remaining outside the screen area. + * From this position, the user can “pull” the Mini App to its maximum height, + * while the bot can do the same by calling the {@link expand| expand()} method. + * Unlike the value of {@link viewportHeight}, the value of {@link viewportStableHeight} does not change as the position of the Mini App changes with user gestures or during animations. + * The value of {@link viewportStableHeight} will be updated after all gestures and animations are completed and the Mini App reaches its final size. * - * The application can display just the top part of the Web App, with its - * lower part remaining outside the screen area. From this position, the - * user can “pull” the Web App to its maximum height, while the bot can do - * the same by calling the expand() method. Unlike the value of - * viewportHeight, the value of viewportStableHeight does not change as the - * position of the Web App changes with user gestures or during animations. - * The value of viewportStableHeight will be updated after all gestures and - * animations are completed and the Web App reaches its final size. + * @remarks The event viewportChanged with the passed parameter `isStateStable=true`, + * which will allow you to track when the stable state of the height of the visible area changes. * - * Note the event viewportChanged with the passed parameter - * isStateStable=true, which will allow you to track when the stable state - * of the height of the visible area changes. + * @see Available in CSS as a variable `var(--tg-viewport-stable-height)`. */ viewportStableHeight: number; + /** - * Current header color in the #RRGGBB format. + * Current header color in the `#RRGGBB` format. */ headerColor: string; + /** - * Current background color in the #RRGGBB format. + * Current background color in the `#RRGGBB` format. */ backgroundColor: string; + /** - * Current bottom bar color in the #RRGGBB format. + * Current bottom bar color in the `#RRGGBB` format. */ bottomBarColor: string; + /** - * True, if the confirmation dialog is enabled while the user is trying to - * close the Web App. False, if the confirmation dialog is disabled. + * *True*, if the confirmation dialog is enabled while the user is trying to close the Mini App. + * *False*, if the confirmation dialog is disabled. */ isClosingConfirmationEnabled: boolean; + + /** + * *True*, if vertical swipes to close or minimize the Mini App are enabled. + * *False*, if vertical swipes to close or minimize the Mini App are disabled. + * In any case, the user will still be able to minimize and close the Mini App by swiping the Mini App's header. + */ + isVerticalSwipesEnabled: boolean; + /** - * True, if the Mini App is currently being displayed in fullscreen mode. + * *True*, if the Mini App is currently being displayed in fullscreen mode. */ isFullscreen: boolean; + /** - * True, if the Mini App’s orientation is currently locked. - * False, if orientation changes freely based on the device’s rotation. + * *True*, if the Mini App’s orientation is currently locked. + * *False*, if orientation changes freely based on the device’s rotation. */ isOrientationLocked: boolean; + /** * An object representing the device's safe area insets, * accounting for system UI elements like notches or navigation bars. */ safeAreaInset: SafeAreaInset; + /** * An object representing the safe area for displaying content within the app, * free from overlapping Telegram UI elements. */ contentSafeAreaInset: ContentSafeAreaInset; + /** - * An object for controlling the back button which can be displayed in the - * header of the Web App in the Telegram interface. + * An object for controlling the back button, + * which can be displayed in the header of the Mini App in the Telegram interface. */ BackButton: BackButton; + /** - * An object for controlling the main button, which is displayed at the - * bottom of the Web App in the Telegram interface. + * An object for controlling the main button, + * which is displayed at the bottom of the Mini App in the Telegram interface. */ MainButton: BottomButton; + /** * An object for controlling the secondary button, * which is displayed at the bottom of the Mini App in the Telegram interface. */ SecondaryButton: BottomButton; + /** - * An object for controlling the Settings item in the context menu of the - * Mini App in the Telegram interface. + * An object for controlling the Settings item in the context menu of the Mini App in the Telegram interface. */ SettingsButton: SettingsButton; + /** * An object for controlling haptic feedback. */ HapticFeedback: HapticFeedback; + /** * An object for controlling cloud storage. */ CloudStorage: CloudStorage; + /** * An object for controlling biometrics on the device. */ BiometricManager: BiometricManager; + /** - * An object for accessing device orientation data on the device. + * An object for accessing accelerometer data on the device. */ Accelerometer: Accelerometer; + /** * An object for accessing device orientation data on the device. */ DeviceOrientation: DeviceOrientation; + /** * An object for accessing gyroscope data on the device. */ Gyroscope: Gyroscope; + /** * An object for controlling location on the device. */ LocationManager: LocationManager; + /** * An object for storing and retrieving data from the device's local storage. */ DeviceStorage: DeviceStorage; + /** * An object for storing and retrieving data from the device's secure storage. */ SecureStorage: SecureStorage; + /** - * Returns true if the user's app supports a version of the Bot API that is - * equal to or higher than the version passed as the parameter. + * Returns true if the user's app supports a version of the Bot API + * that is equal to or higher than the version passed as the parameter. */ isVersionAtLeast(version: string): boolean; + /** * A method that sets the app header color in the `#RRGGBB` format. - * You can also use keywords bg_color and secondary_bg_color. + * You can also use keywords `bg_color` and `secondary_bg_color`. + * + * Up to Bot API 6.9 You can only pass Telegram.WebApp.themeParams.bg_color + * or Telegram.WebApp.themeParams.secondary_bg_color as a color + * or bg_color, secondary_bg_color keywords. + * + * @since Bot API 6.1+ */ setHeaderColor(color: "bg_color" | "secondary_bg_color" | (string & {})): void; + /** - * A method that sets the app background color in the `#RRGGBB` format - * or you can use keywords bg_color, secondary_bg_color instead. + * A method that sets the app background color in the `#RRGGBB` format. + * You can also use keywords `bg_color` and `secondary_bg_color`. + * + * @since Bot API 6.1+ */ setBackgroundColor(color: "bg_color" | "secondary_bg_color" | "bottom_bar_bg_color" | (string & {})): void; + /** - * A method that sets the app's bottom bar color in the #RRGGBB format. - * You can also use the keywords bg_color, secondary_bg_color and bottom_bar_bg_color. + * A method that sets the app's bottom bar color in the `#RRGGBB` format. + * You can also use the keywords `bg_color`, `secondary_bg_color`, and `bottom_bar_bg_color`. + * This color is also applied to the navigation bar on Android. + * + * @since Bot API 7.10+ */ setBottomBarColor(color: "bg_color" | "secondary_bg_color" | (string & {})): void; + /** - * A method that enables a confirmation dialog while the user is trying to - * close the Web App. + * A method that enables a confirmation dialog while the user is trying to close the Mini App. + * + * @since Bot API 6.2+ */ enableClosingConfirmation(): void; + /** - * A method that disables the confirmation dialog while the user is trying - * to close the Web App. + * A method that disables the confirmation dialog while the user is trying to close the Mini App. + * + * @since Bot API 6.2+ */ disableClosingConfirmation(): void; + + /** + * A method that enables vertical swipes to close or minimize the Mini App. + * For user convenience, it is recommended to always enable swipes unless they conflict with the Mini App's own gestures. + * + * @since Bot API 7.7+ + */ + enableVerticalSwipes(): void; + + /** + * A method that disables vertical swipes to close or minimize the Mini App. + * This method is useful if your Mini App uses swipe gestures that may conflict with the gestures for minimizing and closing the app. + * + * @since Bot API 7.7+ + */ + disableVerticalSwipes(): void; + + /** + * A method that requests opening the Mini App in fullscreen mode. + * Although the header is transparent in fullscreen mode, + * it is recommended that the Mini App sets the header color using the setHeaderColor method. + * This color helps determine a contrasting color for the status bar and other UI controls. + * + * @since Bot API 8.0+ + */ + requestFullscreen(): void; + + /** + * A method that requests exiting fullscreen mode. + * + * @since Bot API 8.0+ + */ + exitFullscreen(): void; + /** - * A method that sets the app event handler. Check the list of available - * events. + * A method that locks the Mini App’s orientation to its current mode (either portrait or landscape). + * Once locked, the orientation remains fixed, regardless of device rotation. + * This is useful if a stable orientation is needed during specific interactions. + * + * @since Bot API 8.0+ + */ + lockOrientation(): void; + + /** + * A method that unlocks the Mini App’s orientation, allowing it to follow the device's rotation freely. + * Use this to restore automatic orientation adjustments based on the device orientation. + * + * @since Bot API 8.0+ + */ + unlockOrientation(): void; + + /** + * A method that prompts the user to add the Mini App to the home screen. + * After successfully adding the icon, the homeScreenAdded event will be triggered if supported by the device. + * + * @remarks That if the device cannot determine the installation status, the event may not be received even if the icon has been added. + * + * @since Bot API 8.0+ + */ + addToHomeScreen(): void; + + /** + * A method that checks if adding to the home screen is supported and if the Mini App has already been added. + * If an optional callback parameter is provided, the callback function will be called with a single argument status, + * which is a string indicating the home screen status. + * + * Possible values for status are: + * - **unsupported** – the feature is not supported, and it is not possible to add the icon to the home screen, + * - **unknown** – the feature is supported, and the icon can be added, but it is not possible to determine if the icon has already been added, + * - **added** – the icon has already been added to the home screen, + * - **missed** – the icon has not been added to the home screen. + * + * @since Bot API 8.0+ + */ + checkHomeScreenStatus(callback?: (status: "unsupported" | "unknown" | "added" | "missed") => void): void; + + /** + * A method that sets the app event handler. Check the list of available events. */ onEvent(eventType: "activated", eventHandler: ActivatedCallback): void; onEvent(eventType: "deactivated", eventHandler: DeactivatedCallback): void; @@ -260,7 +390,9 @@ export interface WebApp { onEvent(eventType: "emojiStatusAccessRequested", eventHandler: EmojiStatusAccessRequestedCallback): void; onEvent(eventType: "fileDownloadRequested", eventHandler: FileDownloadRequestedCallback): void; - /** A method that deletes a previously set event handler. */ + /** + * A method that deletes a previously set event handler. + */ offEvent(eventType: "activated", eventHandler: ActivatedCallback): void; offEvent(eventType: "deactivated", eventHandler: DeactivatedCallback): void; offEvent(eventType: "themeChanged", eventHandler: ThemeChangedCallback): void; @@ -307,260 +439,202 @@ export interface WebApp { offEvent(eventType: "fileDownloadRequested", eventHandler: FileDownloadRequestedCallback): void; /** - * A method used to send data to the bot. When this method is called, a - * service message is sent to the bot containing the data data of the length - * up to 4096 bytes, and the Web App is closed. See the field web_app_data - * in the class Message. + * A method used to send data to the bot. + * When this method is called, a service message is sent to the bot containing the data *data* of the length up to 4096 bytes, and the Mini App is closed. See the field web_app_data in the class Message. * - * This method is only available for Web Apps launched via a Keyboard - * button. + * *This method is only available for Mini Apps launched via a {@link https://core.telegram.org/bots/webapps#keyboard-button-mini-apps| Keyboard button}.* */ sendData(data: string): void; + /** - * A method that inserts the bot's username and the specified inline query - * in the current chat's input field. Query may be empty, in which case only - * the bot's username will be inserted. If an optional choose_chat_types - * parameter was passed, the client prompts the user to choose a specific - * chat, then opens that chat and inserts the bot's username and the - * specified inline query in the input field. You can specify which types of - * chats the user will be able to choose from. It can be one or more of the - * following types: users, bots, groups, channels. + * A method that inserts the bot's username and the specified inline query in the current chat's input field. + * Query may be empty, in which case only the bot's username will be inserted. + * If an optional choose_chat_types parameter was passed, the client prompts the user to choose a specific chat, + * then opens that chat and inserts the bot's username and the specified inline query in the input field. + * You can specify which types of chats the user will be able to choose from. + * It can be one or more of the following types: users, bots, groups, channels. + * + * @since Bot API 6.7+ */ - switchInlineQuery(query: string, choose_chat_types?: Array<"users" | "bots" | "groups" | "channels">): void; + switchInlineQuery(query: string, choose_chat_types?: ("users" | "bots" | "groups" | "channels")[]): void; + /** - * A method that opens a link in an external browser. The Web App will not - * be closed. If the optional options parameter is passed with the field - * @param try_instant_view the link will be opened in Instant View mode if - * possible. + * A method that opens a link in an external browser. The Mini App will not be closed. + * Bot API 6.4+ If the optional options parameter is passed with the field try_instant_view=true, the link will be opened in Instant View mode if possible. * - * Note that this method can be called only in response to user interaction - * with the Web App interface (e.g. a click inside the Web App or on the - * main button) + * @remarks That this method can be called only in response to user interaction with the Mini App interface (e.g. a click inside the Mini App or on the main button) */ openLink(url: string, options?: { try_instant_view?: boolean }): void; + /** - * A method that opens a telegram link inside Telegram app. The Web App will - * be closed. + * A method that opens a telegram link inside the Telegram app. The Mini App will not be closed after this method is called. + * + * Up to Bot API 7.0 The Mini App will be closed after this method is called. */ openTelegramLink(url: string): void; + /** - * A method that opens an invoice using the link url. The Web App will - * receive the event invoiceClosed when the invoice is closed. If an - * optional callback parameter was passed, the callback function will be - * called and the invoice status will be passed as the first argument. + * A method that opens an invoice using the link url. + * The Mini App will receive the event invoiceClosed when the invoice is closed. + * If an optional callback parameter was passed, + * the callback function will be called and the invoice status will be passed as the first argument. + * + * @since Bot API 6.1+ */ openInvoice(url: string, callback: (status: "paid" | "cancelled" | "failed" | "pending") => void): void; + /** - * **Bot API 9.1+** + * A method that opens the native story editor with the media specified in the media_url parameter as an HTTPS URL. + * An optional params argument of the type StoryShareParams describes additional sharing settings. * - * A method that hides the on-screen keyboard, if it is currently visible. - * Does nothing if the keyboard is not active. - */ - hideKeyboard(): void; - /** - * A method that shows a native popup described by the params argument of - * the type PopupParams. The Web App will receive the event popupClosed when - * the popup is closed. If an optional callback parameter was passed, the - * callback function will be called and the field id of the pressed button - * will be passed as the first argument. - */ - showPopup(params: PopupParams, callback?: (button_id: string) => void): void; - /** - * A method that shows message in a simple alert with a 'Close' button. If - * an optional callback parameter was passed, the callback function will be - * called when the popup is closed. - */ - showAlert(message: string, callback?: () => void): void; - /** - * A method that shows message in a simple confirmation window with 'OK' and - * 'Cancel' buttons. If an optional callback parameter was passed, the - * callback function will be called when the popup is closed and the first - * argument will be a boolean indicating whether the user pressed the 'OK' - * button. - */ - showConfirm(message: string, callback?: (ok: boolean) => void): void; - /** - * A method that shows a native popup for scanning a QR code described by - * the params argument of the type ScanQrPopupParams. The Web App will - * receive the event qrTextReceived every time the scanner catches a code - * with text data. If an optional callback parameter was passed, the - * callback function will be called and the text from the QR code will be - * passed as the first argument. Returning true inside this callback - * function causes the popup to be closed. Starting from **Bot API 7.7**, - * the Mini App will receive the scanQrPopupClosed event if the user closes - * the native popup for scanning a QR code. - */ - showScanQrPopup(params: ScanQrPopupParams, callback?: (data: string) => void): void; - /** - * A method that closes the native popup for scanning a QR code opened with - * the showScanQrPopup method. Run it if you received valid data in the - * event qrTextReceived. + * @since Bot API 7.8+ */ - closeScanQrPopup(): void; - /** A method that opens the native story editor with the media specified in - * the media_url parameter as an HTTPS URL. An optional params argument of - * the type StoryShareParams describes additional sharing settings. */ shareToStory(media_url: string, params?: StoryShareParams): void; + /** - * **Bot API 8.0+** + * A method that opens a dialog allowing the user to share a message provided by the bot. + * If an optional callback parameter is provided, + * the callback function will be called with a boolean as the first argument, + * indicating whether the message was successfully sent. + * The message id passed to this method must belong to a PreparedInlineMessage previously obtained via the Bot API method savePreparedInlineMessage. * - * A method that opens a dialog allowing the user to share a message provided by the bot. - * If an optional callback parameter is provided, - * the callback function will be called with a boolean as the first argument, - * indicating whether the message was successfully sent. + * @since Bot API 8.0+ */ shareMessage(msg_id: number, callback?: (success: boolean) => void): void; + /** - * **Bot API 8.0+** + * A method that opens a dialog allowing the user to set the specified custom emoji as their status. + * An optional params argument of type EmojiStatusParams specifies additional settings, such as duration. + * If an optional callback parameter is provided, + * the callback function will be called with a boolean as the first argument, + * indicating whether the status was set. * - * A method that opens a dialog allowing the user to set the specified custom emoji as their status. - * An optional params argument of type EmojiStatusParams specifies additional settings,such as duration. - * If an optional callback parameter is provided, - * the callback function will be called with a boolean as the first argument, - * indicating whether the status was set. + * Note: this method opens a native dialog and cannot be used to set the emoji status without manual user interaction. + * For fully programmatic changes, you should instead use the Bot API method setUserEmojiStatus after obtaining authorization to do so via the Mini App method requestEmojiStatusAccess. * - * Note: this method opens a native dialog and cannot be used to set the emoji status without manual user interaction. - * For fully programmatic changes, you should instead use the Bot API method setUserEmojiStatus - * after obtaining authorization to do so via the Mini App method requestEmojiStatusAccess. + * @since Bot API 8.0+ */ setEmojiStatus(custom_emoji_id: string, params?: EmojiStatusParams, callback?: (success: boolean) => void): void; + /** - * **Bot API 8.0+** + * A method that shows a native popup requesting permission for the bot to manage user's emoji status. + * If an optional callback parameter was passed, the callback function will be called when the popup is closed and the first argument will be a boolean indicating whether the user granted this access. * - * A method that shows a native popup requesting permission for the bot to manage user's emoji status. - * If an optional callback parameter was passed, - * the callback function will be called when the popup is closed - * and the first argument will be a boolean indicating whether the user granted this access. + * @since Bot API 8.0+ */ requestEmojiStatusAccess(callback?: (success: boolean) => void): void; + /** - * **Bot API 8.0+** + * A method that displays a native popup prompting the user to download a file specified by the params argument of type DownloadFileParams. If an optional callback parameter is provided, the callback function will be called when the popup is closed, with the first argument as a boolean indicating whether the user accepted the download request. * - * A method that displays a native popup prompting the user to download a file - * specified by the params argument of type DownloadFileParams. - * If an optional callback parameter is provided, - * the callback function will be called when the popup is closed, - * with the first argument as a boolean indicating whether the user accepted the download request. + * @since Bot API 8.0+ */ downloadFile(params: DownloadFileParams, callback?: (success: boolean) => void): void; + /** - * A method that requests text from the clipboard. - * The Web App will receive the event clipboardTextReceived. - * If an optional callback parameter was passed, - * the callback function will be called and the text from the clipboard will be passed as the first argument. + * A method that hides the on-screen keyboard, if it is currently visible. Does nothing if the keyboard is not active. * - * Note: this method can be called only for Web Apps launched from the - * attachment menu and only in response to a user interaction with the Web - * App interface (e.g. a click inside the Web App or on the main button). + * @since Bot API 9.1+ */ - readTextFromClipboard(callback?: (data: string | null) => void): void; + hideKeyboard(): void; + /** - * A method that shows a native popup requesting permission for the bot to - * send messages to the user. + * A method that shows a native popup described by the params argument of the type PopupParams. + * The Mini App will receive the event popupClosed when the popup is closed. + * If an optional callback parameter was passed, the callback function will be called + * and the field id of the pressed button will be passed as the first argument. * - * @param callback If an optional callback parameter was passed, the - * callback function will be called when the popup is closed and the first - * argument will be a boolean indicating whether the user granted this - * access. + * @since Bot API 6.2+ */ - requestWriteAccess(callback?: (success: boolean) => void): void; + showPopup(params: PopupParams, callback?: (button_id: string) => void): void; + /** - * A method that shows a native popup prompting the user for their phone - * number. + * A method that shows message in a simple confirmation window with 'OK' and 'Cancel' buttons. + * If an optional callback parameter was passed, the callback function will be called when the popup is closed and the first argument will be a boolean indicating whether the user pressed the 'OK' button. * - * @param callback If an optional callback parameter was passed, the - * callback function will be called when the popup is closed and the first - * argument will be a boolean indicating whether the user shared its phone - * number. The second argument, contingent upon success, will be an object - * detailing the shared contact information or a cancellation response. - */ - requestContact(callback?: (success: boolean, response: RequestContactResponse) => void): void; - /** - * A method that informs the Telegram app that the Web App is ready to be - * displayed. It is recommended to call this method as early as possible, as - * soon as all essential interface elements are loaded. Once this method is - * called, the loading placeholder is hidden and the Web App is shown. If - * the method is not called, the placeholder will be hidden only when the - * page is fully loaded. - */ - ready(): void; - /** - * A method that expands the Web App to the maximum available height. To - * find out if the Web App is expanded to the maximum height, refer to the - * value of the Telegram.WebApp.isExpanded parameter + * @since Bot API 6.2+ */ - expand(): void; - /** A method that closes the Web App. */ - close(): void; + showAlert(message: string, callback?: () => void): void; + /** - * `True`, if vertical swipes to close or minimize the Mini App are enabled. - * `False`, if vertical swipes to close or minimize the Mini App are - * disabled. In any case, the user will still be able to minimize and close - * the Mini App by swiping the Mini App's header. + * A method that shows message in a simple confirmation window with 'OK' and 'Cancel' buttons. + * If an optional callback parameter was passed, the callback function will be called when the popup is closed and the first argument will be a boolean indicating whether the user pressed the 'OK' button. + * + * @since Bot API 6.2+ */ - isVerticalSwipesEnabled: boolean; + showConfirm(message: string, callback?: (success: boolean) => void): void; + /** - * **Bot API 7.7+** - * A method that enables vertical swipes to close or minimize the Mini App. - * For user convenience, it is recommended to always enable swipes unless they conflict - * with the Mini App's own gestures. + * A method that shows a native popup for scanning a QR code described by the params argument of the type ScanQrPopupParams. + * The Mini App will receive the event qrTextReceived every time the scanner catches a code with text data. + * If an optional callback parameter was passed, + * the callback function will be called and the text from the QR code will be passed as the first argument. + * Returning true inside this callback function causes the popup to be closed. + * Starting from Bot API 7.7, the Mini App will receive the scanQrPopupClosed event if the user closes the native popup for scanning a QR code. + * + * @since Bot API 6.4+ */ - enableVerticalSwipes(): void; + showScanQrPopup(params: ScanQrPopupParams, callback?: (data: string) => void): void; + /** - * **Bot API 7.7+** - * A method that disables vertical swipes to close or minimize the Mini App. - * This method is useful if your Mini App uses swipe gestures that may conflict - * with the gestures for minimizing and closing the app. + * A method that closes the native popup for scanning a QR code opened with the showScanQrPopup method. + * Run it if you received valid data in the event qrTextReceived. + * + * @since Bot API 6.4+ */ - disableVerticalSwipes(): void; + closeScanQrPopup(): void; + /** - * **Bot API 8.0+** + * A method that requests text from the clipboard. + * The Mini App will receive the event clipboardTextReceived. + * If an optional callback parameter was passed, + * the callback function will be called and the text from the clipboard will be passed as the first argument. * - * A method that requests opening the Mini App in fullscreen mode. - * Although the header is transparent in fullscreen mode, - * it is recommended that the Mini App sets the header color using the setHeaderColor method. - * This color helps determine a contrasting color for the status bar and other UI controls. + * @remarks This method can be called only for Mini Apps launched from the attachment menu + * and only in response to a user interaction with the Mini App interface + * (e.g. a click inside the Mini App or on the main button). + * + * @since Bot API 6.4+ */ - requestFullscreen(): void; + readTextFromClipboard(callback?: (data: string | null) => void): void; + /** - * **Bot API 8.0+** + * A method that shows a native popup requesting permission for the bot to send messages to the user. + * If an optional callback parameter was passed, + * the callback function will be called when the popup is closed and the first argument will be a boolean indicating whether the user granted this access. * - * A method that requests exiting fullscreen mode. + * @since Bot API 6.9+ */ - exitFullscreen(): void; + requestWriteAccess(callback?: (success: boolean) => void): void; + /** - * **Bot API 8.0+** + * A method that shows a native popup prompting the user for their phone number. + * If an optional callback parameter was passed, + * the callback function will be called when the popup is closed and the first argument will be a boolean indicating whether the user shared its phone number. * - * A method that locks the Mini App’s orientation to its current mode (either portrait or landscape). - * Once locked, the orientation remains fixed, regardless of device rotation. - * This is useful if a stable orientation is needed during specific interactions. + * @since Bot API 6.9+ */ - lockOrientation(): void; + requestContact(callback?: (success: boolean, response: RequestContactResponse) => void): void; + /** - * **Bot API 8.0+** - * - * A method that unlocks the Mini App’s orientation, allowing it to follow the device's rotation freely. - * Use this to restore automatic orientation adjustments based on the device orientation. + * A method that informs the Telegram app that the Mini App is ready to be displayed. + * It is recommended to call this method as early as possible, as soon as all essential interface elements are loaded. + * Once this method is called, the loading placeholder is hidden and the Mini App is shown. + * If the method is not called, the placeholder will be hidden only when the page is fully loaded. */ - unlockOrientation(): void; + ready(): void; + /** - * **Bot API 8.0+** - * - * A method that prompts the user to add the Mini App to the home screen. - * After successfully adding the icon, the homeScreenAdded event will be triggered if supported by the device. - * Note that if the device cannot determine the installation status, - * the event may not be received even if the icon has been added. + * A method that expands the Mini App to the maximum available height. + * To find out if the Mini App is expanded to the maximum height, + * refer to the value of the {@link isExpanded| Telegram.WebApp.isExpanded} parameter */ - addToHomeScreen(): void; + expand(): void; + /** - * **Bot API 8.0+** - * - * A method that checks if adding to the home screen is supported and if the Mini App has already been added. - * If an optional callback parameter is provided, - * the callback function will be called with a single argument status, - * which is a string indicating the home screen status. + * A method that closes the Mini App. */ - checkHomeScreenStatus(callback?: (status: "unsupported" | "unknown" | "added" | "missed") => void): void; + close(): void; } export type ActivatedCallback = () => void; @@ -635,103 +709,130 @@ export type FileDownloadRequestedCallback = (eventData: { }) => void; /** - * Web Apps can adjust the appearance of the interface to match the Telegram - * user's app in real time. This object contains the user's current theme - * settings: + * Mini Apps can adjust the appearance of the interface to match the Telegram user's app in real time. + * This object contains the user's current theme setting */ export interface ThemeParams { /** * Background color in the `#RRGGBB` format. - * Also available as the CSS variable `var(--tg-theme-bg-color)`. + * + * @see Available as the CSS variable `var(--tg-theme-bg-color)`. */ bg_color?: string; + /** * Main text color in the `#RRGGBB` format. - * Also available as the CSS variable `var(--tg-theme-text-color)`. + * + * @see Available as the CSS variable `var(--tg-theme-text-color)`. */ text_color?: string; + /** * Hint text color in the `#RRGGBB` format. - * Also available as the CSS variable `var(--tg-theme-hint-color)`. + * + * @see Available as the CSS variable `var(--tg-theme-hint-color)`. */ hint_color?: string; + /** * Link color in the `#RRGGBB` format. - * Also available as the CSS variable `var(--tg-theme-link-color)`. + * + * @see Available as the CSS variable `var(--tg-theme-link-color)`. */ link_color?: string; + /** * Button color in the `#RRGGBB` format. - * Also available as the CSS variable `var(--tg-theme-button-color)`. + * + * @see Available as the CSS variable `var(--tg-theme-button-color)`. */ button_color?: string; + /** * Button text color in the `#RRGGBB` format. - * Also available as the CSS variable `var(--tg-theme-button-text-color)`. + * + * @see Available as the CSS variable `var(--tg-theme-button-text-color)`. */ button_text_color?: string; + /** - * **Bot API 6.1+** - * * Secondary background color in the `#RRGGBB` format. - * Also available as the CSS variable `var(--tg-theme-secondary-bg-color)`. + * + * @since Bot API 6.1+ + * + * @see Available as the CSS variable `var(--tg-theme-secondary-bg-color)`. */ secondary_bg_color?: string; + /** - * **Bot API 7.0+** - * * Header background color in the `#RRGGBB` format. - * Also available as the CSS variable `var(--tg-theme-header-bg-color)`. + * + * @since Bot API 7.0+ + * + * @see Available as the CSS variable `var(--tg-theme-header-bg-color)`. */ header_bg_color?: string; + /** - * **Bot API 7.10+** + * Bottom background color in the `#RRGGBB` format. + * + * @since Bot API 7.10+ * - * Bottom background color in the #RRGGBB format. - * Also available as the CSS variable var(--tg-theme-bottom-bar-bg-color). + * @see Available as the CSS variable `var(--tg-theme-bottom-bar-bg-color)`. */ bottom_bar_bg_color?: string; + /** - * **Bot API 7.0+** - * * Accent text color in the `#RRGGBB` format. - * Also available as the CSS variable `var(--tg-theme-accent-text-color)`. + * + * @since Bot API 7.0+ + * + * @see Available as the CSS variable `var(--tg-theme-accent-text-color)`. */ accent_text_color?: string; + /** - * **Bot API 7.0+** + * Section background color in the `#RRGGBB` format. + * + * @since Bot API 7.0+ * - * Background color for the section in the `#RRGGBB` format. - * It is recommended to use this in conjunction with *secondary_bg_color*. - * Also available as the CSS variable `var(--tg-theme-section-bg-color)`. + * @see Available as the CSS variable `var(--tg-theme-section-bg-color)`. */ section_bg_color?: string; + /** - * **Bot API 7.0+** + * Section header text color in the `#RRGGBB` format. + * + * @since Bot API 7.0+ * - * Header text color for the section in the `#RRGGBB` format. - * Also available as the CSS variable `var(--tg-theme-section-header-text-color)`. + * @see Available as the CSS variable `var(--tg-theme-section-header-text-color)`. */ - section_header_text_color?: `#${string}`; + section_header_text_color?: string; + /** - * **Bot API 7.6+** - * * Section separator color in the `#RRGGBB` format. - * Also available as the CSS variable `var(--tg-theme-section-separator-color)`. + * + * @since Bot API 7.6+ + * + * @see Available as the CSS variable `var(--tg-theme-section-separator-color)`. */ section_separator_color?: string; + /** - * **Bot API 7.0+** - * * Subtitle text color in the `#RRGGBB` format. - * Also available as the CSS variable `var(--tg-theme-subtitle-text-color)`. + * + * @since Bot API 7.0+ + * + * @see Available as the CSS variable `var(--tg-theme-subtitle-text-color)`. */ subtitle_text_color?: string; + /** - * **Bot API 7.0+** + * Destructive text color in the `#RRGGBB` format. + * + * @since Bot API 7.0+ * - * Text color for destructive actions in the `#RRGGBB` format. - * Also available as the CSS variable `var(--tg-theme-destructive-text-color)`. + * @see Available as the CSS variable `var(--tg-theme-destructive-text-color)`. */ destructive_text_color?: string; } diff --git a/types/typography/package.json b/types/typography/package.json index 049a05db667095..4d10295bbe208a 100644 --- a/types/typography/package.json +++ b/types/typography/package.json @@ -9,10 +9,6 @@ "@types/typography": "workspace:." }, "owners": [ - { - "name": "Krzysztof Żuraw", - "githubUsername": "krzysztofzuraw" - }, { "name": "Dominic Fallows", "githubUsername": "dominicfallows"