dotvvm-types 5.0.0-preview09-final → 5.0.0-preview10-final
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 +25 -21
package/package.json
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -331,6 +331,29 @@ declare module "binding-handlers/named-command" {
|
|
|
331
331
|
};
|
|
332
332
|
export default _default_9;
|
|
333
333
|
}
|
|
334
|
+
declare module "utils/uri" {
|
|
335
|
+
export function removeVirtualDirectoryFromUrl(url: string): string;
|
|
336
|
+
export function addVirtualDirectoryToUrl(appRelativeUrl: string): string;
|
|
337
|
+
export function addLeadingSlash(url: string): string;
|
|
338
|
+
export function concatUrl(url1: string, url2: string): string;
|
|
339
|
+
}
|
|
340
|
+
declare module "postback/http" {
|
|
341
|
+
export type WrappedResponse<T> = {
|
|
342
|
+
readonly result: T;
|
|
343
|
+
readonly response?: Response;
|
|
344
|
+
};
|
|
345
|
+
export function getJSON<T>(url: string, spaPlaceHolderUniqueId?: string, signal?: AbortSignal, additionalHeaders?: {
|
|
346
|
+
[key: string]: string;
|
|
347
|
+
}): Promise<WrappedResponse<T>>;
|
|
348
|
+
export function postJSON<T>(url: string, postData: any, signal: AbortSignal | undefined, additionalHeaders?: {
|
|
349
|
+
[key: string]: string;
|
|
350
|
+
}): Promise<WrappedResponse<T>>;
|
|
351
|
+
export function fetchJson<T>(url: string, init: RequestInit): Promise<WrappedResponse<T>>;
|
|
352
|
+
/** Returns the DotVVM CSRF token.
|
|
353
|
+
* If LazyCsrfToken is enabled, this function will fetch it from the server, otherwise returns immediately */
|
|
354
|
+
export function getCsrfToken(signal: AbortSignal | undefined): Promise<string>;
|
|
355
|
+
export function retryOnInvalidCsrfToken<TResult>(postbackFunction: () => Promise<TResult>, iteration?: number, customErrorHandler?: () => void): Promise<TResult>;
|
|
356
|
+
}
|
|
334
357
|
declare module "binding-handlers/file-upload" {
|
|
335
358
|
const _default_10: {
|
|
336
359
|
"dotvvm-FileUpload": {
|
|
@@ -613,27 +636,6 @@ declare var compileConstants: {
|
|
|
613
636
|
/** If the compiled bundle is unminified */
|
|
614
637
|
debug: boolean;
|
|
615
638
|
};
|
|
616
|
-
declare module "utils/uri" {
|
|
617
|
-
export function removeVirtualDirectoryFromUrl(url: string): string;
|
|
618
|
-
export function addVirtualDirectoryToUrl(appRelativeUrl: string): string;
|
|
619
|
-
export function addLeadingSlash(url: string): string;
|
|
620
|
-
export function concatUrl(url1: string, url2: string): string;
|
|
621
|
-
}
|
|
622
|
-
declare module "postback/http" {
|
|
623
|
-
export type WrappedResponse<T> = {
|
|
624
|
-
readonly result: T;
|
|
625
|
-
readonly response?: Response;
|
|
626
|
-
};
|
|
627
|
-
export function getJSON<T>(url: string, spaPlaceHolderUniqueId?: string, signal?: AbortSignal, additionalHeaders?: {
|
|
628
|
-
[key: string]: string;
|
|
629
|
-
}): Promise<WrappedResponse<T>>;
|
|
630
|
-
export function postJSON<T>(url: string, postData: any, signal: AbortSignal | undefined, additionalHeaders?: {
|
|
631
|
-
[key: string]: string;
|
|
632
|
-
}): Promise<WrappedResponse<T>>;
|
|
633
|
-
export function fetchJson<T>(url: string, init: RequestInit): Promise<WrappedResponse<T>>;
|
|
634
|
-
export function fetchCsrfToken(signal: AbortSignal | undefined): Promise<string>;
|
|
635
|
-
export function retryOnInvalidCsrfToken<TResult>(postbackFunction: () => Promise<TResult>, iteration?: number, customErrorHandler?: () => void): Promise<TResult>;
|
|
636
|
-
}
|
|
637
639
|
declare module "postback/counter" {
|
|
638
640
|
export function backUpPostBackCounter(): number;
|
|
639
641
|
}
|
|
@@ -991,6 +993,7 @@ declare module "dotvvm-root" {
|
|
|
991
993
|
import * as metadataHelper from "metadata/metadataHelper";
|
|
992
994
|
import { StateManager } from "state-manager";
|
|
993
995
|
import { loadDataSet } from "dataset/loader";
|
|
996
|
+
import { getCsrfToken } from "postback/http";
|
|
994
997
|
function init(culture: string): void;
|
|
995
998
|
const dotvvmExports: {
|
|
996
999
|
getCulture: typeof getCulture;
|
|
@@ -1032,6 +1035,7 @@ declare module "dotvvm-root" {
|
|
|
1032
1035
|
removeErrors: typeof validation.removeErrors;
|
|
1033
1036
|
};
|
|
1034
1037
|
postBack: typeof postBack;
|
|
1038
|
+
getCsrfToken: typeof getCsrfToken;
|
|
1035
1039
|
init: typeof init;
|
|
1036
1040
|
registerGlobalComponent: typeof viewModuleManager.registerGlobalComponent;
|
|
1037
1041
|
isPostbackRunning: KnockoutObservable<boolean>;
|