@opra/client 0.17.0 → 0.17.2

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.
Files changed (188) hide show
  1. package/cjs/client-error.js +17 -0
  2. package/cjs/constants.js +7 -0
  3. package/cjs/http/batch-request.js +90 -0
  4. package/cjs/http/http-client.js +232 -0
  5. package/cjs/http/http-collection-node.js +110 -0
  6. package/cjs/http/http-request-observable.js +36 -0
  7. package/cjs/http/http-request.js +88 -0
  8. package/cjs/http/http-response.js +24 -0
  9. package/cjs/http/http-service-base.js +9 -0
  10. package/cjs/http/http-singleton-node.js +63 -0
  11. package/cjs/http/http-types.js +2 -0
  12. package/cjs/index.js +12 -0
  13. package/cjs/package.json +3 -0
  14. package/esm/client-error.js +13 -0
  15. package/esm/constants.js +4 -0
  16. package/esm/http/batch-request.js +90 -0
  17. package/esm/http/http-client.js +228 -0
  18. package/esm/http/http-collection-node.js +106 -0
  19. package/esm/http/http-request-observable.js +32 -0
  20. package/esm/http/http-request.js +84 -0
  21. package/esm/http/http-response.js +20 -0
  22. package/esm/http/http-service-base.js +5 -0
  23. package/esm/http/http-singleton-node.js +59 -0
  24. package/esm/http/http-types.js +1 -0
  25. package/esm/index.js +9 -0
  26. package/package.json +32 -12
  27. package/types/client-error.d.ts +1 -1
  28. package/types/http/http-client.d.ts +1 -1
  29. package/types/http/http-collection-node.d.ts +5 -5
  30. package/types/http/http-request-observable.d.ts +1 -1
  31. package/types/http/http-request.d.ts +1 -1
  32. package/types/http/http-response.d.ts +3 -1
  33. package/types/http/http-singleton-node.d.ts +1 -1
  34. package/types/http/http-types.d.ts +1 -1
  35. package/types/index.d.ts +0 -6
  36. package/cjs/content-disposition-d575fee5.js +0 -473
  37. package/cjs/cookie-signature-3e974173.js +0 -64
  38. package/cjs/index.min.mjs +0 -9295
  39. package/cjs/mime-db-49f150d0.js +0 -10719
  40. package/cjs/mime-types-6e2bdb57.js +0 -201
  41. package/cjs/safe-buffer-8acd60c7.js +0 -78
  42. package/esm/content-disposition-65f281a9.js +0 -470
  43. package/esm/cookie-signature-bf274b6b.js +0 -62
  44. package/esm/index.min.mjs +0 -9174
  45. package/esm/mime-db-d0f15d8f.js +0 -10717
  46. package/esm/mime-types-79c091fd.js +0 -199
  47. package/esm/safe-buffer-63383356.js +0 -76
  48. package/types/common/document/api-document.d.ts +0 -102
  49. package/types/common/document/constants.d.ts +0 -3
  50. package/types/common/document/data-type/api-field.d.ts +0 -41
  51. package/types/common/document/data-type/builtin/any.type.d.ts +0 -2
  52. package/types/common/document/data-type/builtin/base64.type.d.ts +0 -6
  53. package/types/common/document/data-type/builtin/bigint.type.d.ts +0 -6
  54. package/types/common/document/data-type/builtin/boolean.type.d.ts +0 -5
  55. package/types/common/document/data-type/builtin/date.type.d.ts +0 -4
  56. package/types/common/document/data-type/builtin/guid.type.d.ts +0 -7
  57. package/types/common/document/data-type/builtin/index.d.ts +0 -10
  58. package/types/common/document/data-type/builtin/integer.type.d.ts +0 -6
  59. package/types/common/document/data-type/builtin/number.type.d.ts +0 -6
  60. package/types/common/document/data-type/builtin/object.type.d.ts +0 -3
  61. package/types/common/document/data-type/builtin/string.type.d.ts +0 -5
  62. package/types/common/document/data-type/builtin/time.type.d.ts +0 -7
  63. package/types/common/document/data-type/builtin/timestamp.type.d.ts +0 -5
  64. package/types/common/document/data-type/complex-type.d.ts +0 -56
  65. package/types/common/document/data-type/data-type.d.ts +0 -33
  66. package/types/common/document/data-type/enum-type.d.ts +0 -32
  67. package/types/common/document/data-type/mapped-type.d.ts +0 -53
  68. package/types/common/document/data-type/simple-type.d.ts +0 -33
  69. package/types/common/document/data-type/union-type.d.ts +0 -42
  70. package/types/common/document/factory/add-references.d.ts +0 -4
  71. package/types/common/document/factory/create-document.d.ts +0 -12
  72. package/types/common/document/factory/factory.d.ts +0 -61
  73. package/types/common/document/factory/import-resource-class.d.ts +0 -10
  74. package/types/common/document/factory/import-type-class.d.ts +0 -17
  75. package/types/common/document/factory/index.d.ts +0 -1
  76. package/types/common/document/factory/process-resources.d.ts +0 -7
  77. package/types/common/document/factory/process-types.d.ts +0 -6
  78. package/types/common/document/index.d.ts +0 -14
  79. package/types/common/document/resource/collection.d.ts +0 -69
  80. package/types/common/document/resource/resource.d.ts +0 -29
  81. package/types/common/document/resource/singleton.d.ts +0 -51
  82. package/types/common/document/utils/inspect.util.d.ts +0 -4
  83. package/types/common/document/utils/string-compare.util.d.ts +0 -1
  84. package/types/common/exception/enums/issue-severity.enum.d.ts +0 -13
  85. package/types/common/exception/error-issue.d.ts +0 -9
  86. package/types/common/exception/http-errors/bad-request.error.d.ts +0 -10
  87. package/types/common/exception/http-errors/failed-dependency.error.d.ts +0 -9
  88. package/types/common/exception/http-errors/forbidden.error.d.ts +0 -11
  89. package/types/common/exception/http-errors/internal-server.error.d.ts +0 -9
  90. package/types/common/exception/http-errors/method-not-allowed.error.d.ts +0 -10
  91. package/types/common/exception/http-errors/not-acceptable.error.d.ts +0 -10
  92. package/types/common/exception/http-errors/not-found.error.d.ts +0 -13
  93. package/types/common/exception/http-errors/unauthorized.error.d.ts +0 -10
  94. package/types/common/exception/http-errors/unprocessable-entity.error.d.ts +0 -9
  95. package/types/common/exception/index.d.ts +0 -15
  96. package/types/common/exception/opra-exception.d.ts +0 -15
  97. package/types/common/exception/resource-errors/resource-conflict.error.d.ts +0 -5
  98. package/types/common/exception/resource-errors/resource-not-found.error.d.ts +0 -8
  99. package/types/common/exception/wrap-exception.d.ts +0 -2
  100. package/types/common/filter/antlr/OpraFilterLexer.d.ts +0 -77
  101. package/types/common/filter/antlr/OpraFilterListener.d.ts +0 -430
  102. package/types/common/filter/antlr/OpraFilterParser.d.ts +0 -437
  103. package/types/common/filter/antlr/OpraFilterVisitor.d.ts +0 -260
  104. package/types/common/filter/ast/abstract/ast.d.ts +0 -5
  105. package/types/common/filter/ast/abstract/expression.d.ts +0 -3
  106. package/types/common/filter/ast/abstract/literal.d.ts +0 -6
  107. package/types/common/filter/ast/abstract/term.d.ts +0 -3
  108. package/types/common/filter/ast/expressions/arithmetic-expression.d.ts +0 -13
  109. package/types/common/filter/ast/expressions/array-expression.d.ts +0 -7
  110. package/types/common/filter/ast/expressions/comparison-expression.d.ts +0 -10
  111. package/types/common/filter/ast/expressions/logical-expression.d.ts +0 -8
  112. package/types/common/filter/ast/expressions/parentheses-expression.d.ts +0 -6
  113. package/types/common/filter/ast/index.d.ts +0 -16
  114. package/types/common/filter/ast/terms/boolean-literal.d.ts +0 -5
  115. package/types/common/filter/ast/terms/date-literal.d.ts +0 -6
  116. package/types/common/filter/ast/terms/external-constant.d.ts +0 -5
  117. package/types/common/filter/ast/terms/null-literal.d.ts +0 -5
  118. package/types/common/filter/ast/terms/number-literal.d.ts +0 -6
  119. package/types/common/filter/ast/terms/qualified-identifier.d.ts +0 -8
  120. package/types/common/filter/ast/terms/string-literal.d.ts +0 -5
  121. package/types/common/filter/ast/terms/time-literal.d.ts +0 -6
  122. package/types/common/filter/build.d.ts +0 -31
  123. package/types/common/filter/errors.d.ts +0 -20
  124. package/types/common/filter/filter-tree-visitor.d.ts +0 -33
  125. package/types/common/filter/index.d.ts +0 -5
  126. package/types/common/filter/opra-error-listener.d.ts +0 -8
  127. package/types/common/filter/parse.d.ts +0 -2
  128. package/types/common/filter/utils.d.ts +0 -2
  129. package/types/common/helpers/function-utils.d.ts +0 -4
  130. package/types/common/helpers/get-stack-filename.d.ts +0 -1
  131. package/types/common/helpers/index.d.ts +0 -8
  132. package/types/common/helpers/is-url.d.ts +0 -1
  133. package/types/common/helpers/mixin-utils.d.ts +0 -3
  134. package/types/common/helpers/object-utils.d.ts +0 -2
  135. package/types/common/helpers/path-to-object-tree.d.ts +0 -4
  136. package/types/common/helpers/responsive-map.d.ts +0 -34
  137. package/types/common/helpers/type-guards.d.ts +0 -11
  138. package/types/common/http/codecs/boolean-codec.d.ts +0 -5
  139. package/types/common/http/codecs/date-codec.d.ts +0 -16
  140. package/types/common/http/codecs/filter-codec.d.ts +0 -6
  141. package/types/common/http/codecs/integer-codec.d.ts +0 -11
  142. package/types/common/http/codecs/number-codec.d.ts +0 -14
  143. package/types/common/http/codecs/string-codec.d.ts +0 -16
  144. package/types/common/http/enums/http-headers-codes.enum.d.ts +0 -388
  145. package/types/common/http/enums/http-status-codes.enum.d.ts +0 -290
  146. package/types/common/http/enums/http-status-messages.d.ts +0 -65
  147. package/types/common/http/http-headers.d.ts +0 -86
  148. package/types/common/http/http-message.host.d.ts +0 -122
  149. package/types/common/http/http-params.d.ts +0 -114
  150. package/types/common/http/http-request-message.d.ts +0 -213
  151. package/types/common/http/http-response-message.d.ts +0 -318
  152. package/types/common/http/index.d.ts +0 -14
  153. package/types/common/http/interfaces/client-http-headers.interface.d.ts +0 -65
  154. package/types/common/http/interfaces/cookie-options.interface.d.ts +0 -4
  155. package/types/common/http/interfaces/server-http-headers.interface.d.ts +0 -1
  156. package/types/common/http/multipart/batch-multipart.d.ts +0 -0
  157. package/types/common/http/multipart/http-request-content.d.ts +0 -0
  158. package/types/common/http/multipart/http-response-content.d.ts +0 -0
  159. package/types/common/http/multipart/index.d.ts +0 -0
  160. package/types/common/i18n/i18n.d.ts +0 -28
  161. package/types/common/i18n/index.d.ts +0 -5
  162. package/types/common/i18n/string-utils.d.ts +0 -2
  163. package/types/common/i18n/translate.d.ts +0 -4
  164. package/types/common/index.d.ts +0 -11
  165. package/types/common/schema/constants.d.ts +0 -2
  166. package/types/common/schema/data-type/complex-type.interface.d.ts +0 -16
  167. package/types/common/schema/data-type/data-type.interface.d.ts +0 -14
  168. package/types/common/schema/data-type/enum-type.interface.d.ts +0 -15
  169. package/types/common/schema/data-type/field.interface.d.ts +0 -21
  170. package/types/common/schema/data-type/mapped-type.interface.d.ts +0 -11
  171. package/types/common/schema/data-type/simple-type.interface.d.ts +0 -18
  172. package/types/common/schema/data-type/union-type.interface.d.ts +0 -10
  173. package/types/common/schema/document.interface.d.ts +0 -34
  174. package/types/common/schema/index.d.ts +0 -51
  175. package/types/common/schema/resource/collection.interface.d.ts +0 -33
  176. package/types/common/schema/resource/container.interface.d.ts +0 -9
  177. package/types/common/schema/resource/endpoint.interface.d.ts +0 -29
  178. package/types/common/schema/resource/resource.interface.d.ts +0 -12
  179. package/types/common/schema/resource/singleton.interface.d.ts +0 -22
  180. package/types/common/schema/type-guards.d.ts +0 -20
  181. package/types/common/types.d.ts +0 -11
  182. package/types/common/url/index.d.ts +0 -5
  183. package/types/common/url/opra-url-path-component.d.ts +0 -15
  184. package/types/common/url/opra-url-path.d.ts +0 -36
  185. package/types/common/url/opra-url.d.ts +0 -70
  186. package/types/common/url/utils/decode-path-component.d.ts +0 -5
  187. package/types/common/url/utils/encode-path-component.d.ts +0 -1
  188. package/types/common/utils/path-utils.d.ts +0 -2
@@ -1,51 +0,0 @@
1
- import { SpecVersion as _SpecVersion } from './constants.js';
2
- import { ComplexType as _ComplexType } from './data-type/complex-type.interface.js';
3
- import { DataType as _DataType, DataTypeBase as _DataTypeBase } from './data-type/data-type.interface.js';
4
- import { EnumArray as _EnumArray, EnumObject as _EnumObject, EnumThunk as _EnumThunk, EnumType as _EnumType } from './data-type/enum-type.interface.js';
5
- import { Field as _Field } from './data-type/field.interface.js';
6
- import { MappedType as _MappedType } from './data-type/mapped-type.interface.js';
7
- import { SimpleType as _SimpleType } from './data-type/simple-type.interface.js';
8
- import { UnionType as _UnionType } from './data-type/union-type.interface.js';
9
- import { ApiDocument as _ApiDocument, ContactPerson as _ContactPerson, DocumentInfo as _DocumentInfo, LicenseInfo as _LicenseInfo, ServerInfo as _ServerInfo } from './document.interface.js';
10
- import { Collection as _Collection } from './resource/collection.interface.js';
11
- import { Container as _Container } from './resource/container.interface.js';
12
- import { Endpoint as _Endpoint } from './resource/endpoint.interface.js';
13
- import { Resource as _Resource, ResourceBase as _ResourceBase } from './resource/resource.interface.js';
14
- import { Singleton as _Singleton } from './resource/singleton.interface.js';
15
- import { isCollection as _isCollection, isComplexType as _isComplexType, isContainer as _isContainer, isDataType as _isDataType, isEnumType as _isEnumType, isMappedType as _isMappedType, isResource as _isResource, isSimpleType as _isSimpleType, isSingleton as _isSingleton, isUnionType as _isUnionType } from './type-guards.js';
16
- export declare namespace OpraSchema {
17
- const SpecVersion = "1.0";
18
- type SpecVersion = _SpecVersion;
19
- type EnumObject = _EnumObject;
20
- type EnumArray = _EnumArray;
21
- type EnumThunk = _EnumThunk;
22
- type ApiDocument = _ApiDocument;
23
- type ContactPerson = _ContactPerson;
24
- type ServerInfo = _ServerInfo;
25
- type LicenseInfo = _LicenseInfo;
26
- type DocumentInfo = _DocumentInfo;
27
- type DataTypeBase = _DataTypeBase;
28
- type ResourceBase = _ResourceBase;
29
- export import DataType = _DataType;
30
- export import ComplexType = _ComplexType;
31
- export import Field = _Field;
32
- export import EnumType = _EnumType;
33
- export import MappedType = _MappedType;
34
- export import SimpleType = _SimpleType;
35
- export import UnionType = _UnionType;
36
- export import Resource = _Resource;
37
- export import Collection = _Collection;
38
- export import Container = _Container;
39
- export import Singleton = _Singleton;
40
- export import Endpoint = _Endpoint;
41
- const isDataType: typeof _isDataType;
42
- const isComplexType: typeof _isComplexType;
43
- const isEnumType: typeof _isEnumType;
44
- const isMappedType: typeof _isMappedType;
45
- const isSimpleType: typeof _isSimpleType;
46
- const isUnionType: typeof _isUnionType;
47
- const isResource: typeof _isResource;
48
- const isCollection: typeof _isCollection;
49
- const isContainer: typeof _isContainer;
50
- const isSingleton: typeof _isSingleton;
51
- }
@@ -1,33 +0,0 @@
1
- import type { DataType } from '../data-type/data-type.interface.js';
2
- import type { Field } from '../data-type/field.interface';
3
- import type { _Operation, Endpoint } from './endpoint.interface.js';
4
- import type { ResourceBase } from './resource.interface.js';
5
- export interface Collection extends ResourceBase {
6
- kind: Collection.Kind;
7
- type: DataType.Name;
8
- primaryKey: Field.Name | Field.Name[];
9
- operations: Collection.Operations;
10
- }
11
- export declare namespace Collection {
12
- const Kind = "Collection";
13
- type Kind = 'Collection';
14
- type CreateOperation = Endpoint & _Operation.InputPickOmit & _Operation.ResponsePickOmit;
15
- type DeleteOperation = Endpoint;
16
- type DeleteManyOperation = Endpoint & _Operation.Filter;
17
- type GetOperation = Endpoint & _Operation.ResponsePickOmit;
18
- type FindManyOperation = Endpoint & _Operation.Filter & _Operation.ResponsePickOmit & {
19
- sortFields?: string[];
20
- defaultSort?: string[];
21
- };
22
- type UpdateOperation = Endpoint & _Operation.InputPickOmit & _Operation.ResponsePickOmit;
23
- type UpdateManyOperation = Endpoint & _Operation.InputPickOmit & _Operation.Filter;
24
- interface Operations {
25
- create?: CreateOperation;
26
- delete?: DeleteOperation;
27
- get?: GetOperation;
28
- update?: UpdateOperation;
29
- deleteMany?: DeleteManyOperation;
30
- findMany?: FindManyOperation;
31
- updateMany?: UpdateManyOperation;
32
- }
33
- }
@@ -1,9 +0,0 @@
1
- import type { Resource, ResourceBase } from './resource.interface.js';
2
- export interface Container extends ResourceBase {
3
- kind: Container.Kind;
4
- resources: Resource[];
5
- }
6
- export declare namespace Container {
7
- const Kind = "Container";
8
- type Kind = 'Container';
9
- }
@@ -1,29 +0,0 @@
1
- import type { ComparisonOperator } from '../../filter/index.js';
2
- import type { Field } from '../data-type/field.interface';
3
- export interface Endpoint {
4
- description?: string;
5
- handler?: Endpoint.MethodHandler;
6
- }
7
- export declare namespace Endpoint {
8
- type MethodHandler = (...args: any[]) => any | Promise<any>;
9
- }
10
- export declare namespace _Operation {
11
- interface Filter {
12
- filters?: {
13
- field: Field.QualifiedName;
14
- operators?: ComparisonOperator[];
15
- }[];
16
- }
17
- interface InputPickOmit {
18
- input?: {
19
- pick?: Field.QualifiedName[];
20
- omit?: Field.QualifiedName[];
21
- };
22
- }
23
- interface ResponsePickOmit {
24
- response?: {
25
- pick?: Field.QualifiedName[];
26
- omit?: Field.QualifiedName[];
27
- };
28
- }
29
- }
@@ -1,12 +0,0 @@
1
- import type { Collection } from './collection.interface.js';
2
- import type { Container } from './container.interface.js';
3
- import type { Singleton } from './singleton.interface.js';
4
- export type Resource = Collection | Singleton | Container;
5
- export declare namespace Resource {
6
- type Name = string;
7
- type Kind = Collection.Kind | Singleton.Kind | Container.Kind;
8
- }
9
- export interface ResourceBase {
10
- kind: string;
11
- description?: string;
12
- }
@@ -1,22 +0,0 @@
1
- import type { DataType } from '../data-type/data-type.interface.js';
2
- import type { _Operation, Endpoint } from './endpoint.interface.js';
3
- import type { ResourceBase } from './resource.interface.js';
4
- export interface Singleton extends ResourceBase {
5
- kind: Singleton.Kind;
6
- type: DataType.Name;
7
- operations: Singleton.Operations;
8
- }
9
- export declare namespace Singleton {
10
- const Kind = "Singleton";
11
- type Kind = 'Singleton';
12
- type CreateOperation = Endpoint & _Operation.InputPickOmit & _Operation.ResponsePickOmit;
13
- type DeleteOperation = Endpoint;
14
- type GetOperation = Endpoint & _Operation.ResponsePickOmit;
15
- type UpdateOperation = Endpoint & _Operation.InputPickOmit & _Operation.ResponsePickOmit;
16
- interface Operations {
17
- create?: CreateOperation;
18
- delete?: DeleteOperation;
19
- get?: GetOperation;
20
- update?: UpdateOperation;
21
- }
22
- }
@@ -1,20 +0,0 @@
1
- import { ComplexType } from './data-type/complex-type.interface.js';
2
- import { DataType } from './data-type/data-type.interface.js';
3
- import { EnumType } from './data-type/enum-type.interface.js';
4
- import { MappedType } from './data-type/mapped-type.interface.js';
5
- import { SimpleType } from './data-type/simple-type.interface.js';
6
- import { UnionType } from './data-type/union-type.interface.js';
7
- import { Collection } from './resource/collection.interface.js';
8
- import { Container } from './resource/container.interface.js';
9
- import { Resource } from './resource/resource.interface.js';
10
- import { Singleton } from './resource/singleton.interface.js';
11
- export declare function isDataType(obj: any): obj is DataType;
12
- export declare function isComplexType(obj: any): obj is ComplexType;
13
- export declare function isSimpleType(obj: any): obj is SimpleType;
14
- export declare function isUnionType(obj: any): obj is UnionType;
15
- export declare function isMappedType(obj: any): obj is MappedType;
16
- export declare function isEnumType(obj: any): obj is EnumType;
17
- export declare function isResource(obj: any): obj is Resource;
18
- export declare function isCollection(obj: any): obj is Collection;
19
- export declare function isSingleton(obj: any): obj is Singleton;
20
- export declare function isContainer(obj: any): obj is Container;
@@ -1,11 +0,0 @@
1
- import { Builtin, DeepPickWritable, Type } from 'ts-gems';
2
- export type PartialInput<T> = DeepNullablePartial<DeepPickWritable<T>>;
3
- export type PartialOutput<T> = DeepNullablePartial<T>;
4
- type DeepNullablePartial<T> = T extends Builtin ? T : T extends Promise<infer U> ? Promise<DeepNullablePartial<U>> : T extends (infer U)[] ? DeepNullablePartial<U>[] : {
5
- [P in keyof T]?: DeepNullablePartial<Exclude<T[P], undefined>> | null;
6
- };
7
- export type Thunk<T> = T | (() => T);
8
- export type ThunkAsync<T> = T | Promise<T> | (() => T) | (() => Promise<T>);
9
- export type TypeThunk<T = any> = Thunk<Type<T>>;
10
- export type TypeThunkAsync<T = any> = ThunkAsync<Type<T>>;
11
- export {};
@@ -1,5 +0,0 @@
1
- export * from './opra-url.js';
2
- export * from './opra-url-path.js';
3
- export * from './opra-url-path-component.js';
4
- export * from './utils/encode-path-component.js';
5
- export * from './utils/decode-path-component.js';
@@ -1,15 +0,0 @@
1
- declare const nodeInspectCustom: unique symbol;
2
- export type OpraURLPathComponentInit = {
3
- resource: string;
4
- key?: any;
5
- typeCast?: string;
6
- };
7
- export declare class OpraURLPathComponent {
8
- resource: string;
9
- key?: any;
10
- typeCast?: string;
11
- constructor(init: OpraURLPathComponentInit);
12
- toString(): string;
13
- [nodeInspectCustom](): any;
14
- }
15
- export {};
@@ -1,36 +0,0 @@
1
- import type { OpraURL } from './opra-url.js';
2
- import { OpraURLPathComponent, OpraURLPathComponentInit } from './opra-url-path-component.js';
3
- declare const nodeInspectCustom: unique symbol;
4
- declare const kEntries: unique symbol;
5
- declare const kOptions: unique symbol;
6
- export interface OpraURLPathOptions {
7
- onChange?: () => void;
8
- }
9
- export declare class OpraURLPath {
10
- protected static kEntries: symbol;
11
- protected static kOptions: symbol;
12
- protected [kEntries]: OpraURLPathComponent[];
13
- protected [kOptions]: OpraURLPathOptions;
14
- constructor(init?: string | OpraURLPath | URL | OpraURLPathComponentInit | OpraURLPathComponentInit[], options?: OpraURLPathOptions);
15
- get size(): number;
16
- changed(): void;
17
- clear(): void;
18
- get(index: number): OpraURLPathComponent;
19
- join(...source: (string | OpraURLPath | URL | OpraURL | OpraURLPathComponentInit)[]): this;
20
- entries(): IterableIterator<[OpraURLPathComponent, number]>;
21
- forEach(callback: (component: OpraURLPathComponent, _this: this) => void): void;
22
- getResource(index: number): string | undefined;
23
- getKey(index: number): any;
24
- pop(): OpraURLPathComponent | undefined;
25
- shift(): OpraURLPathComponent | undefined;
26
- slice(start: number, end?: number): OpraURLPath;
27
- splice(start: number, deleteCount: number, join?: string | OpraURLPath | URL | OpraURL | OpraURLPathComponentInit | OpraURLPathComponentInit[]): void;
28
- unshift(join: string | OpraURLPath | URL | OpraURL | OpraURLPathComponentInit | OpraURLPathComponentInit[]): void;
29
- toString(): string;
30
- values(): IterableIterator<OpraURLPathComponent>;
31
- protected _join(target: OpraURLPathComponent[], source: string | OpraURLPath | URL | OpraURL | OpraURLPathComponentInit | OpraURLPathComponentInit[]): void;
32
- [nodeInspectCustom](): OpraURLPathComponent[];
33
- [Symbol.iterator](): IterableIterator<[OpraURLPathComponent, number]>;
34
- get [Symbol.toStringTag](): string;
35
- }
36
- export {};
@@ -1,70 +0,0 @@
1
- import { HttpParams } from '../http/index.js';
2
- import { OpraURLPath } from './opra-url-path.js';
3
- import { OpraURLPathComponentInit } from './opra-url-path-component.js';
4
- declare const nodeInspectCustom: unique symbol;
5
- declare const kContext: unique symbol;
6
- declare const kPath: unique symbol;
7
- declare const kParams: unique symbol;
8
- export declare class OpraURL {
9
- protected static kContext: symbol;
10
- protected static kPath: symbol;
11
- protected static kParams: symbol;
12
- protected [kPath]: OpraURLPath;
13
- protected [kParams]: HttpParams;
14
- protected [kContext]: {
15
- protocol: string;
16
- username: string;
17
- pathname?: string;
18
- prefix: string;
19
- hostname: string;
20
- port: string;
21
- hash: string;
22
- password: string;
23
- search?: string;
24
- address?: string;
25
- };
26
- constructor(input?: string | URL | OpraURL, base?: string | URL | OpraURL);
27
- get address(): string;
28
- get host(): string;
29
- set host(v: string);
30
- get hostname(): string;
31
- set hostname(v: string);
32
- get href(): string;
33
- get password(): string;
34
- set password(v: string);
35
- get port(): string;
36
- set port(value: string | number);
37
- get prefix(): string;
38
- set prefix(value: string);
39
- get protocol(): string;
40
- set protocol(v: string);
41
- get username(): string;
42
- set username(v: string);
43
- get origin(): string;
44
- get path(): OpraURLPath;
45
- get pathname(): string;
46
- set pathname(v: string);
47
- get hash(): string;
48
- set hash(v: string);
49
- get search(): string;
50
- set search(v: string);
51
- get searchParams(): HttpParams;
52
- parse(input: string): void;
53
- join(...source: (string | OpraURLPath | URL | OpraURL | OpraURLPathComponentInit)[]): this;
54
- toString(): string;
55
- [nodeInspectCustom](): {
56
- protocol: string;
57
- username: string;
58
- password: string;
59
- host: string;
60
- hostname: string;
61
- origin: string;
62
- pathPrefix: string;
63
- path: OpraURLPath;
64
- pathname: string;
65
- search: string;
66
- hash: string;
67
- };
68
- protected _setPathname(v: string, trimPrefix?: boolean): void;
69
- }
70
- export {};
@@ -1,5 +0,0 @@
1
- export declare function decodePathComponent(input: string): {
2
- resource: string;
3
- key?: any;
4
- typeCast?: string;
5
- };
@@ -1 +0,0 @@
1
- export declare function encodePathComponent(resource: string, key?: any, typeCast?: string): string;
@@ -1,2 +0,0 @@
1
- export declare function normalizePath(p?: string, noLeadingSlash?: boolean): string;
2
- export declare function joinPath(...p: string[]): string;