UNPKG

3.22 kBTypeScriptView Raw
1import { t } from '../common';
2import { Uri } from '../Uri';
3import { Url } from './Url';
4export declare class Urls implements t.IUrls {
5 static readonly routes: {
6 WILDCARD: string;
7 SYS: {
8 FAVICON: string;
9 INFO: string[];
10 UID: string;
11 };
12 LOCAL: {
13 FS: string;
14 };
15 FILE: {
16 BASE: string;
17 INFO: string;
18 UPLOADED: string;
19 };
20 NS: {
21 CELL: string;
22 INFO: string;
23 TYPES: string;
24 };
25 CELL: {
26 NS: string;
27 INFO: string;
28 FS: {
29 FILE: {
30 BY_NAME: string;
31 BY_FILE_URI: string;
32 };
33 FILES: {
34 BASE: string;
35 UPLOAD: string;
36 UPLOADED: string;
37 COPY: string;
38 };
39 };
40 };
41 ROW: {
42 INFO: string;
43 };
44 COLUMN: {
45 INFO: string;
46 };
47 FUNC: {
48 RUN: string;
49 };
50 };
51 static readonly Uri: typeof Uri;
52 static readonly Url: typeof Url;
53 static readonly parse: typeof Url.parse;
54 static create(input?: string | number): t.IUrls;
55 private constructor();
56 readonly protocol: t.HttpProtocol;
57 readonly host: string;
58 readonly hostname: string;
59 readonly port: number;
60 readonly origin: string;
61 get sys(): {
62 readonly info: t.IUrl<Record<string, unknown>>;
63 readonly uid: t.IUrl<t.IReqQuerySysUid>;
64 };
65 get local(): {
66 readonly fs: t.IUrl<Record<string, unknown>>;
67 };
68 get fn(): {
69 bundle: t.IUrlsBundle;
70 readonly run: t.IUrl<t.IReqQueryFunc>;
71 };
72 ns(input: string | t.INsUri): {
73 uri: string;
74 readonly info: t.IUrl<t.IReqQueryNsInfo>;
75 };
76 cell(input: string | t.ICellUri): {
77 uri: string;
78 readonly info: t.IUrl<Record<string, unknown>>;
79 files: {
80 readonly list: t.IUrl<t.IReqQueryCellFsList>;
81 readonly delete: t.IUrl<Record<string, unknown>>;
82 readonly copy: t.IUrl<t.IReqQueryCellFsCopy>;
83 readonly upload: t.IUrl<t.IReqQueryCellFsUpload>;
84 readonly uploaded: t.IUrl<t.IReqQueryCellFsUploaded>;
85 };
86 file: {
87 toString(): string;
88 byName(filename: string): t.IUrl<t.IReqQueryCellFileDownloadByName>;
89 byFileUri(fileUri: string, fileExtension?: string | undefined): t.IUrl<t.IReqQueryCellFileDownloadByName>;
90 };
91 };
92 row(input: string | t.IRowUri): {
93 uri: string;
94 readonly info: t.IUrl<Record<string, unknown>>;
95 };
96 column(input: string | t.IColumnUri): {
97 uri: string;
98 readonly info: t.IUrl<Record<string, unknown>>;
99 };
100 file(input: string | t.IFileUri): {
101 uri: string;
102 readonly info: t.IUrl<Record<string, unknown>>;
103 readonly download: t.IUrl<t.IReqQueryFileDownload>;
104 readonly delete: t.IUrl<t.IReqQueryFileDelete>;
105 readonly uploaded: t.IUrl<t.IReqQueryFileUploadComplete>;
106 };
107 private toUrl;
108}