dotvvm-types 4.3.13 → 4.3.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/types/index.d.ts +23 -21
package/package.json
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -495,6 +495,27 @@ declare module "binding-handlers/named-command" {
|
|
|
495
495
|
};
|
|
496
496
|
export default _default_9;
|
|
497
497
|
}
|
|
498
|
+
declare module "utils/uri" {
|
|
499
|
+
export function removeVirtualDirectoryFromUrl(url: string): string;
|
|
500
|
+
export function addVirtualDirectoryToUrl(appRelativeUrl: string): string;
|
|
501
|
+
export function addLeadingSlash(url: string): string;
|
|
502
|
+
export function concatUrl(url1: string, url2: string): string;
|
|
503
|
+
}
|
|
504
|
+
declare module "postback/http" {
|
|
505
|
+
export type WrappedResponse<T> = {
|
|
506
|
+
readonly result: T;
|
|
507
|
+
readonly response?: Response;
|
|
508
|
+
};
|
|
509
|
+
export function getJSON<T>(url: string, spaPlaceHolderUniqueId?: string, signal?: AbortSignal, additionalHeaders?: {
|
|
510
|
+
[key: string]: string;
|
|
511
|
+
}): Promise<WrappedResponse<T>>;
|
|
512
|
+
export function postJSON<T>(url: string, postData: any, signal: AbortSignal | undefined, additionalHeaders?: {
|
|
513
|
+
[key: string]: string;
|
|
514
|
+
}): Promise<WrappedResponse<T>>;
|
|
515
|
+
export function fetchJson<T>(url: string, init: RequestInit): Promise<WrappedResponse<T>>;
|
|
516
|
+
export function fetchCsrfToken(signal: AbortSignal | undefined): Promise<string>;
|
|
517
|
+
export function retryOnInvalidCsrfToken<TResult>(postbackFunction: () => Promise<TResult>, iteration?: number, customErrorHandler?: () => void): Promise<TResult>;
|
|
518
|
+
}
|
|
498
519
|
declare module "binding-handlers/file-upload" {
|
|
499
520
|
const _default_10: {
|
|
500
521
|
"dotvvm-FileUpload": {
|
|
@@ -583,27 +604,6 @@ declare var compileConstants: {
|
|
|
583
604
|
/** If the compiled bundle is unminified */
|
|
584
605
|
debug: boolean;
|
|
585
606
|
};
|
|
586
|
-
declare module "utils/uri" {
|
|
587
|
-
export function removeVirtualDirectoryFromUrl(url: string): string;
|
|
588
|
-
export function addVirtualDirectoryToUrl(appRelativeUrl: string): string;
|
|
589
|
-
export function addLeadingSlash(url: string): string;
|
|
590
|
-
export function concatUrl(url1: string, url2: string): string;
|
|
591
|
-
}
|
|
592
|
-
declare module "postback/http" {
|
|
593
|
-
export type WrappedResponse<T> = {
|
|
594
|
-
readonly result: T;
|
|
595
|
-
readonly response?: Response;
|
|
596
|
-
};
|
|
597
|
-
export function getJSON<T>(url: string, spaPlaceHolderUniqueId?: string, signal?: AbortSignal, additionalHeaders?: {
|
|
598
|
-
[key: string]: string;
|
|
599
|
-
}): Promise<WrappedResponse<T>>;
|
|
600
|
-
export function postJSON<T>(url: string, postData: any, signal: AbortSignal | undefined, additionalHeaders?: {
|
|
601
|
-
[key: string]: string;
|
|
602
|
-
}): Promise<WrappedResponse<T>>;
|
|
603
|
-
export function fetchJson<T>(url: string, init: RequestInit): Promise<WrappedResponse<T>>;
|
|
604
|
-
export function fetchCsrfToken(signal: AbortSignal | undefined): Promise<string>;
|
|
605
|
-
export function retryOnInvalidCsrfToken<TResult>(postbackFunction: () => Promise<TResult>, iteration?: number, customErrorHandler?: () => void): Promise<TResult>;
|
|
606
|
-
}
|
|
607
607
|
declare module "postback/counter" {
|
|
608
608
|
export function backUpPostBackCounter(): number;
|
|
609
609
|
}
|
|
@@ -877,6 +877,7 @@ declare module "dotvvm-root" {
|
|
|
877
877
|
import { logError, logWarning, logInfo, logInfoVerbose, logPostBackScriptError, setLogger } from "utils/logging";
|
|
878
878
|
import * as metadataHelper from "metadata/metadataHelper";
|
|
879
879
|
import { StateManager } from "state-manager";
|
|
880
|
+
import { fetchCsrfToken } from "postback/http";
|
|
880
881
|
function init(culture: string): void;
|
|
881
882
|
const dotvvmExports: {
|
|
882
883
|
getCulture: typeof getCulture;
|
|
@@ -918,6 +919,7 @@ declare module "dotvvm-root" {
|
|
|
918
919
|
removeErrors: typeof validation.removeErrors;
|
|
919
920
|
};
|
|
920
921
|
postBack: typeof postBack;
|
|
922
|
+
getCsrfToken: typeof fetchCsrfToken;
|
|
921
923
|
init: typeof init;
|
|
922
924
|
registerGlobalComponent: typeof viewModuleManager.registerGlobalComponent;
|
|
923
925
|
isPostbackRunning: KnockoutObservable<boolean>;
|