From 8f9b644dc25836342fced90e1235252bbcd62818 Mon Sep 17 00:00:00 2001 From: marle3003 <56543258+marle3003@users.noreply.github.com> Date: Mon, 8 Dec 2025 08:41:56 +0100 Subject: [PATCH 1/4] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#74185=20[mokap?= =?UTF-8?q?i]=20Update=20typings=20to=20v0.30.0=20by=20@marle3003?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/mokapi/http.d.ts | 48 +++++++++++++++---------------- types/mokapi/index.d.ts | 21 ++++++++++---- types/mokapi/test/mokapi-tests.ts | 17 +++++++---- 3 files changed, 51 insertions(+), 35 deletions(-) diff --git a/types/mokapi/http.d.ts b/types/mokapi/http.d.ts index 18410b02215956..5bbc019a319efc 100644 --- a/types/mokapi/http.d.ts +++ b/types/mokapi/http.d.ts @@ -113,29 +113,7 @@ export function options(url: string, body?: JSONValue, args?: Args): Response; * maxRedirects: 2 * }); */ -export function fetch(url: string, opts?: FetchOptions): Promise; - -/** - * Request arguments. - * Used to add headers to a request. - */ -export interface Args { - /** Request headers. */ - headers?: { [name: string]: string }; - /** - * The number of redirects to follow for this request. - * @default 5 - */ - maxRedirects?: number; - /** - * Maximum time to wait for the request to complete. Default - * timeout is 60 seconds ("60s"). The type can also be a number, in which - * case Mokapi interprets it as milliseconds - * @example - * const res = get(url, { timeout: '5m' }) - */ - timeout?: number | string; -} +export function fetch(url: string, opts?: FetchOptions): Promise /** * Options for the {@link fetch} function. @@ -187,6 +165,28 @@ export interface FetchOptions { timeout?: number | string; } +/** + * Request arguments. + * Used to add headers to a request. + */ +export interface Args { + /** Request headers. */ + headers?: { [name: string]: string }; + /** + * The number of redirects to follow for this request. + * @default 5 + */ + maxRedirects?: number; + /** + * Maximum time to wait for the request to complete. Default + * timeout is 60 seconds ("60s"). The type can also be a number, in which + * case Mokapi interprets it as milliseconds + * @example + * const res = get(url, { timeout: '5m' }) + */ + timeout?: number | string; +} + /** * Response of an HTTP request * https://mokapi.io/docs/javascript-api/mokapi-http/httpresponse @@ -209,4 +209,4 @@ export interface Response { * res.json() */ json(): JSONValue; -} +} \ No newline at end of file diff --git a/types/mokapi/index.d.ts b/types/mokapi/index.d.ts index 481866a3b7c3da..4bb6115364c1b6 100644 --- a/types/mokapi/index.d.ts +++ b/types/mokapi/index.d.ts @@ -162,6 +162,9 @@ export interface HttpRequest { /** OperationId defined in OpenAPI */ readonly operationId: string; + + /** Returns a string representing this HttpRequest object. */ + toString(): string } /** @@ -170,7 +173,7 @@ export interface HttpRequest { */ export interface HttpResponse { /** Object contains header parameters specified by OpenAPI header parameters. */ - headers: { [key: string]: string }; + headers: { [key: string]: any }; /** Specifies the http status used to select the OpenAPI response definition. */ statusCode: number; @@ -192,11 +195,17 @@ export interface Url { /** URL host. */ readonly host: string; + /** URL port */ + readonly port: number; + /** URL path. */ readonly path: string; /** URL query string. */ readonly query: string; + + /** Returns a string representing this Url object. */ + toString(): string; } /** @@ -429,20 +438,20 @@ export type DateLayout = */ export interface EventArgs { /** - * Optional key-value pairs used to label the event in the dashboard. + * Adds or overrides existing tags used to label the event in dashboard */ tags?: { [key: string]: string }; /** * Set to `true` to enable tracking of this event handler in the dashboard. - * If omitted, Mokapi automatically checks whether the response object has - * been modified and tracks the handler only if a change is detected. + * Set to `false` to disable tracking. If omitted, Mokapi checks the response + * object to determine if the handler changed it, and tracks it accordingly. */ track?: boolean; } /** - * cheduledEventArgs is an object used by every and cron function. + * ScheduledEventHandler is an object used by every and cron function. * https://mokapi.io/docs/javascript-api/mokapi/eventhandler/scheduledeventargs * @example * export default function() { @@ -631,4 +640,4 @@ export interface SharedMemory { * mokapi.log(`Current counter: ${count}`) * ``` */ -export const shared: SharedMemory; +export const shared: SharedMemory; \ No newline at end of file diff --git a/types/mokapi/test/mokapi-tests.ts b/types/mokapi/test/mokapi-tests.ts index f658ef792fda0d..e5c5962311089e 100644 --- a/types/mokapi/test/mokapi-tests.ts +++ b/types/mokapi/test/mokapi-tests.ts @@ -14,10 +14,10 @@ import { LdapSearchResponse, on, patch, - shared, sleep, SmtpEventHandler, SmtpEventMessage, + shared } from "mokapi"; const handler = () => {}; @@ -47,9 +47,17 @@ on("http", handler, {}); on("http", handler, { tags: { foo: "bar" } }); on("http", handler, { track: true }); on("http", async () => {}); -on("http", (request) => { - request.querystring; -}); +on("http", (request) => { request.querystring }); +on("http", (request, response) => { + const s = request.toString(); + const url = request.url.toString(); + + response.headers = { + "Content-Type": "application/json", + } + response.headers["Access-Control-Allow-Origin"] = "*"; + response.headers["foo"] = { bar: 123 }; +}) // @ts-expect-error every(12, () => {}); @@ -134,7 +142,6 @@ h = (req: HttpRequest, res: HttpResponse) => { res.data = 12; res.data = "foo"; res.data = {}; - // @ts-expect-error res.headers.foo = 12; res.headers.foo = "bar"; res.headers["Content-Type"] = "application/json"; From 807c6478bf599a0470e17463790019be93b03a93 Mon Sep 17 00:00:00 2001 From: TypeScript Bot Date: Mon, 8 Dec 2025 07:42:36 +0000 Subject: [PATCH 2/4] =?UTF-8?q?=F0=9F=A4=96=20dprint=20fmt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/mokapi/http.d.ts | 4 ++-- types/mokapi/index.d.ts | 4 ++-- types/mokapi/test/mokapi-tests.ts | 10 ++++++---- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/types/mokapi/http.d.ts b/types/mokapi/http.d.ts index 5bbc019a319efc..43cf6d463f0ff1 100644 --- a/types/mokapi/http.d.ts +++ b/types/mokapi/http.d.ts @@ -113,7 +113,7 @@ export function options(url: string, body?: JSONValue, args?: Args): Response; * maxRedirects: 2 * }); */ -export function fetch(url: string, opts?: FetchOptions): Promise +export function fetch(url: string, opts?: FetchOptions): Promise; /** * Options for the {@link fetch} function. @@ -209,4 +209,4 @@ export interface Response { * res.json() */ json(): JSONValue; -} \ No newline at end of file +} diff --git a/types/mokapi/index.d.ts b/types/mokapi/index.d.ts index 4bb6115364c1b6..e768bd318d9659 100644 --- a/types/mokapi/index.d.ts +++ b/types/mokapi/index.d.ts @@ -164,7 +164,7 @@ export interface HttpRequest { readonly operationId: string; /** Returns a string representing this HttpRequest object. */ - toString(): string + toString(): string; } /** @@ -640,4 +640,4 @@ export interface SharedMemory { * mokapi.log(`Current counter: ${count}`) * ``` */ -export const shared: SharedMemory; \ No newline at end of file +export const shared: SharedMemory; diff --git a/types/mokapi/test/mokapi-tests.ts b/types/mokapi/test/mokapi-tests.ts index e5c5962311089e..aa5d31822101f3 100644 --- a/types/mokapi/test/mokapi-tests.ts +++ b/types/mokapi/test/mokapi-tests.ts @@ -14,10 +14,10 @@ import { LdapSearchResponse, on, patch, + shared, sleep, SmtpEventHandler, SmtpEventMessage, - shared } from "mokapi"; const handler = () => {}; @@ -47,17 +47,19 @@ on("http", handler, {}); on("http", handler, { tags: { foo: "bar" } }); on("http", handler, { track: true }); on("http", async () => {}); -on("http", (request) => { request.querystring }); +on("http", (request) => { + request.querystring; +}); on("http", (request, response) => { const s = request.toString(); const url = request.url.toString(); response.headers = { "Content-Type": "application/json", - } + }; response.headers["Access-Control-Allow-Origin"] = "*"; response.headers["foo"] = { bar: 123 }; -}) +}); // @ts-expect-error every(12, () => {}); From eb37e93aa855b3fd9dca68663f98a66675b2ac70 Mon Sep 17 00:00:00 2001 From: TypeScript Bot Date: Mon, 8 Dec 2025 08:15:19 +0000 Subject: [PATCH 3/4] =?UTF-8?q?=F0=9F=A4=96=20Update=20CODEOWNERS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/CODEOWNERS | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 296e9469e6d771..16049d26b74758 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -99,7 +99,7 @@ /types/ajv-async/ @dmitriismitnov /types/ajv-bsontype/ @adjerbetian /types/ajv-pack/ @qm3ster @ChristianMurphy -/types/akamai-edgeworkers/ @evan-hughes @wabain @swathimr @ananner @bmatthew +/types/akamai-edgeworkers/ @cdaley-akamai @wabain @yanakad @miliworking @lperra /types/akumina-core/ @akumina @jasonarden @MarshHawk /types/akumina-core/v4/ @akumina @jasonarden @MarshHawk /types/alcides/ @asaidimu @@ -5493,7 +5493,7 @@ /types/palx/ @mikefowler /types/pangu/ @plantain-00 @AH-dark /types/pannellum/ @zhirzh -/types/papaparse/ @torpedro @rainshen49 @jfloff @johnnyreilly @albertorestifo @jliuhtonen @rbarbazz @peterblazejewicz @emmanuelgautier @OpportunityLiu @matsuby +/types/papaparse/ @torpedro @rainshen49 @jfloff @johnnyreilly @albertorestifo @jliuhtonen @peterblazejewicz @emmanuelgautier @OpportunityLiu @matsuby /types/parallel-transform/ @djcsdy /types/paralleljs/ @jbaldwin /types/parameter/ @zhyupe @Runtu4378 @@ -7209,6 +7209,8 @@ /types/share-api-polyfill/ @jnv /types/sharedb/ @soney @ericyhwang @pxpeterxu @alecgibson @pypmannetjies @craigbeck /types/sharepoint/ @gandjustas @andrei-markeev @teroarvola @dennispg @SPWizard01 @betlgtu +/types/sharetribe-flex-integration-sdk/ @jayenashar @venmartin +/types/sharetribe-flex-sdk/ @jayenashar @venmartin /types/sharpie/ @peterblazejewicz /types/shasum/ @TeamworkGuy2 /types/shebang-command/ @BendingBender @@ -7968,7 +7970,7 @@ /types/typeof/ @OpenByteDev /types/typescript-deferred/ @DirtyHairy /types/typo-js/ @whawker -/types/typography/ @krzysztofzuraw @dominicfallows +/types/typography/ @dominicfallows /types/typography-breakpoint-constants/ @goblindegook /types/typopo/ @peterblazejewicz /types/typpy/ @BendingBender From 4330aa1ebeb1a434854b2b60e67fbfa7876f342d Mon Sep 17 00:00:00 2001 From: Mikhail Novikov Date: Mon, 8 Dec 2025 09:52:32 +0000 Subject: [PATCH 4/4] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#74143=20[googl?= =?UTF-8?q?e-one-tap]=20Add=20state=20and=20click=5Flistener=20to=20GsiBut?= =?UTF-8?q?tonConfiguration=20by=20@thepocp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/google-one-tap/index.d.ts | 2 ++ types/google-one-tap/test/google-one-tap-global.test.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/types/google-one-tap/index.d.ts b/types/google-one-tap/index.d.ts index fc84750a40886b..8372f86c84b5b2 100644 --- a/types/google-one-tap/index.d.ts +++ b/types/google-one-tap/index.d.ts @@ -23,6 +23,8 @@ export interface GsiButtonConfiguration { logo_alignment?: "left" | "center"; width?: number; locale?: string; + click_listener?: () => void; + state?: string; } export interface CredentialResponse { diff --git a/types/google-one-tap/test/google-one-tap-global.test.ts b/types/google-one-tap/test/google-one-tap-global.test.ts index 04ae19aa3e6064..bfdc406d55127a 100644 --- a/types/google-one-tap/test/google-one-tap-global.test.ts +++ b/types/google-one-tap/test/google-one-tap-global.test.ts @@ -59,6 +59,8 @@ const buttonOptions: google.GsiButtonConfiguration = { theme: "outline", size: "large", text: "continue_with", + click_listener: () => {}, + state: "test_state", }; const button: HTMLElement = new HTMLDivElement();