@vcd/sdk 0.13.0 → 15.0.0

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 (91) hide show
  1. package/README.md +3 -118
  2. package/client/client/api.result.service.d.ts +20 -0
  3. package/client/client/constants.d.ts +10 -0
  4. package/client/client/index.d.ts +7 -0
  5. package/client/client/logging.interceptor.d.ts +14 -0
  6. package/client/client/request.headers.interceptor.d.ts +20 -0
  7. package/client/client/response.normalization.interceptor.d.ts +39 -0
  8. package/client/client/vcd.api.client.d.ts +351 -0
  9. package/client/client/vcd.http.client.d.ts +32 -0
  10. package/client/client/vcd.transfer.client.d.ts +121 -0
  11. package/client/container-hooks/index.d.ts +58 -0
  12. package/client/index.d.ts +2 -0
  13. package/client/openapi.d.ts +76 -0
  14. package/client/query/filter.builder.d.ts +162 -0
  15. package/client/query/index.d.ts +2 -0
  16. package/client/query/query.builder.d.ts +30 -0
  17. package/common/container-hooks.d.ts +2 -2
  18. package/core/plugin.module.d.ts +10 -5
  19. package/esm2020/client/client/api.result.service.mjs +43 -0
  20. package/esm2020/client/client/constants.mjs +13 -0
  21. package/esm2020/client/client/index.mjs +8 -0
  22. package/esm2020/client/client/logging.interceptor.mjs +44 -0
  23. package/esm2020/client/client/request.headers.interceptor.mjs +91 -0
  24. package/esm2020/client/client/response.normalization.interceptor.mjs +59 -0
  25. package/esm2020/client/client/vcd.api.client.mjs +602 -0
  26. package/esm2020/client/client/vcd.http.client.mjs +52 -0
  27. package/esm2020/client/client/vcd.transfer.client.mjs +166 -0
  28. package/esm2020/client/container-hooks/index.mjs +57 -0
  29. package/esm2020/client/index.mjs +3 -0
  30. package/esm2020/client/openapi.mjs +16 -0
  31. package/esm2020/client/query/filter.builder.mjs +195 -0
  32. package/esm2020/client/query/index.mjs +3 -0
  33. package/esm2020/client/query/query.builder.mjs +79 -0
  34. package/esm2020/common/container-hooks.mjs +74 -0
  35. package/esm2020/common/index.mjs +2 -0
  36. package/esm2020/core/index.mjs +2 -0
  37. package/esm2020/core/plugin.module.mjs +18 -0
  38. package/esm2020/main.mjs +45 -0
  39. package/esm2020/public-api.mjs +8 -0
  40. package/esm2020/vcd-sdk.mjs +5 -0
  41. package/fesm2015/vcd-sdk.mjs +1513 -0
  42. package/fesm2015/vcd-sdk.mjs.map +1 -0
  43. package/fesm2020/vcd-sdk.mjs +1508 -0
  44. package/fesm2020/vcd-sdk.mjs.map +1 -0
  45. package/index.d.ts +5 -0
  46. package/main.d.ts +11 -5
  47. package/package.json +30 -39
  48. package/public-api.d.ts +1 -1
  49. package/LICENSE.txt +0 -12
  50. package/bundles/vcd-sdk.umd.js +0 -810
  51. package/bundles/vcd-sdk.umd.js.map +0 -1
  52. package/bundles/vcd-sdk.umd.min.js +0 -16
  53. package/bundles/vcd-sdk.umd.min.js.map +0 -1
  54. package/esm2015/common/container-hooks.js +0 -219
  55. package/esm2015/common/index.js +0 -6
  56. package/esm2015/core/index.js +0 -6
  57. package/esm2015/core/plugin.module.js +0 -53
  58. package/esm2015/i18n/index.js +0 -8
  59. package/esm2015/i18n/translate.pipe.js +0 -92
  60. package/esm2015/i18n/translate.service.js +0 -229
  61. package/esm2015/i18n/translation.loader.js +0 -63
  62. package/esm2015/main.js +0 -37
  63. package/esm2015/public-api.js +0 -12
  64. package/esm2015/vcd-sdk.js +0 -10
  65. package/esm5/common/container-hooks.js +0 -266
  66. package/esm5/common/index.js +0 -6
  67. package/esm5/core/index.js +0 -6
  68. package/esm5/core/plugin.module.js +0 -64
  69. package/esm5/i18n/index.js +0 -8
  70. package/esm5/i18n/translate.pipe.js +0 -108
  71. package/esm5/i18n/translate.service.js +0 -280
  72. package/esm5/i18n/translation.loader.js +0 -68
  73. package/esm5/main.js +0 -41
  74. package/esm5/public-api.js +0 -12
  75. package/esm5/vcd-sdk.js +0 -10
  76. package/fesm2015/vcd-sdk.js +0 -511
  77. package/fesm2015/vcd-sdk.js.map +0 -1
  78. package/fesm5/vcd-sdk.js +0 -620
  79. package/fesm5/vcd-sdk.js.map +0 -1
  80. package/i18n/index.d.ts +0 -3
  81. package/i18n/translate.pipe.d.ts +0 -12
  82. package/i18n/translate.service.d.ts +0 -21
  83. package/i18n/translation.loader.d.ts +0 -11
  84. package/schematics/collection.json +0 -10
  85. package/schematics/ng-add/index.d.ts +0 -3
  86. package/schematics/ng-add/index.js +0 -101
  87. package/schematics/ng-add/index.ts +0 -134
  88. package/schematics/ng-add/schema.d.ts +0 -8
  89. package/schematics/ng-add/schema.json +0 -19
  90. package/vcd-sdk.d.ts +0 -5
  91. package/vcd-sdk.metadata.json +0 -1
@@ -0,0 +1,121 @@
1
+ import { Observable, Observer } from 'rxjs';
2
+ import { VcdHttpClient } from './vcd.http.client';
3
+ /**
4
+ * Default chunk size is 50MiB. This is equal to the chunk size the VCD UI uses for library uploads.
5
+ */
6
+ export declare const MAX_CHUNK_SIZE: number;
7
+ /**
8
+ * How many times to retry a chunk upload.
9
+ */
10
+ export declare const MAX_CHUNK_RETRY_COUNT = 5;
11
+ /**
12
+ * Details about a completed file transfer.
13
+ */
14
+ export interface TransferResult {
15
+ /**
16
+ * Filename being transferred.
17
+ */
18
+ filename: string | '<blob>';
19
+ /**
20
+ * URL being used for the transfer.
21
+ */
22
+ transferUrl: string;
23
+ /**
24
+ * How many retries in total were required
25
+ */
26
+ retryCount: number;
27
+ /**
28
+ * The number of chunks that have been sent.
29
+ */
30
+ chunksSent: number;
31
+ /**
32
+ * How many bytes have been sent.
33
+ */
34
+ bytesSent: number;
35
+ /**
36
+ * How many milliseconds that have elapsed since starting the transfer.
37
+ */
38
+ timeTakenMs: number;
39
+ }
40
+ /**
41
+ * Details about a file transfer in progress.
42
+ */
43
+ export interface TransferProgress {
44
+ /**
45
+ * Filename being transferred.
46
+ */
47
+ filename: string | '<blob>';
48
+ /**
49
+ * URL being used for the transfer.
50
+ */
51
+ transferUrl: string;
52
+ /**
53
+ * The current retry number for the current chunk.
54
+ */
55
+ retryNumber: number;
56
+ /**
57
+ * The number of retries in total.
58
+ */
59
+ retryCount: number;
60
+ /**
61
+ * The number of chunks that have been sent.
62
+ */
63
+ chunksSent: number;
64
+ /**
65
+ * The number of chunks remaining.
66
+ */
67
+ chunksRemaining: number;
68
+ /**
69
+ * How many bytes have been sent.
70
+ */
71
+ bytesSent: number;
72
+ /**
73
+ * How many bytes remaining to be sent.
74
+ */
75
+ bytesRemaining: number;
76
+ /**
77
+ * Percentage completion.
78
+ */
79
+ percent: number;
80
+ /**
81
+ * How many milliseconds that have elapsed since starting the transfer.
82
+ */
83
+ timeTakenMs: number;
84
+ /**
85
+ * Naive estimate of time remaining. This is not scientific at all - a simple linear extrapolation.
86
+ */
87
+ estimatedTimeRemainingMs: number;
88
+ }
89
+ /**
90
+ * A special error thrown by the transfer client. It gives access to the causing error, and the final progress
91
+ * before the error occurred.
92
+ */
93
+ export declare class TransferError extends Error {
94
+ readonly originalError: any;
95
+ readonly lastProgress: TransferProgress;
96
+ constructor(message: string, originalError: any, lastProgress: TransferProgress);
97
+ }
98
+ /**
99
+ * This is used to upload files to a VCD API transfer URL. It is not suggested to create this class - instead
100
+ * use the startTransfer method in VcdApiClient.
101
+ */
102
+ export declare class VcdTransferClient {
103
+ httpClient: VcdHttpClient;
104
+ transferUrl: string;
105
+ maxChunkSize: number;
106
+ maxChunkRetryCount: number;
107
+ /**
108
+ * Create a transfer client.
109
+ * @param httpClient the http client to be used
110
+ * @param transferUrl the URL to upload to
111
+ */
112
+ constructor(httpClient: VcdHttpClient, transferUrl: string, maxChunkSize?: number, maxChunkRetryCount?: number);
113
+ /**
114
+ * Upload data, optionally listening for progress updates.
115
+ * @param source what to upload.
116
+ * @param progressObserver (optional) this will get progress notifications during the upload
117
+ * @returns fetails of the finished upload.
118
+ * @throws TransferError when a chunk upload fails.
119
+ */
120
+ upload(source: Blob | File, progressObserver?: Observer<TransferProgress>): Observable<TransferResult>;
121
+ }
@@ -0,0 +1,58 @@
1
+ /**
2
+ * This is the currently supported - albeit very minimal - public SDK.
3
+ */
4
+ import { InjectionToken } from '@angular/core';
5
+ /**
6
+ * Wire in as a string. Gives the root URL for API access (for example, the load balancer URL
7
+ * or the single-cell URL).
8
+ */
9
+ export declare const API_ROOT_URL: InjectionToken<string>;
10
+ /**
11
+ * Wire in as a string. Gives the root URL for the legacy Flex application.
12
+ */
13
+ export declare const FLEX_APP_URL: InjectionToken<string>;
14
+ /**
15
+ * Wire in as a string. Gives the current scope of the VCD-UI. As of current, this will be
16
+ * either 'tenant' for the tenant portal, or 'service-provider' for the service-provider portal.
17
+ */
18
+ export declare const SESSION_SCOPE: InjectionToken<string>;
19
+ /**
20
+ * Wire in as a string. Gives the unique name (not the display name) of the current tenant
21
+ * organization that the VCD-UI is being used for.
22
+ */
23
+ export declare const SESSION_ORGANIZATION: InjectionToken<string>;
24
+ /**
25
+ * Wire in as a string. Gives the UUID identifier of the current tenant
26
+ * organization that the VCD-UI is being used for.
27
+ */
28
+ export declare const SESSION_ORG_ID: InjectionToken<string>;
29
+ /**
30
+ * Wire in as a string. Gives the full root path for module assets (e.g. images, scripts, text files)
31
+ *
32
+ * ATTENTION!
33
+ * Add || new InjectionToken to workaround the Angular security mechanics which prevent use of injection tokens
34
+ * which potentially are not defiend. The same fix can be applied for the rest tokens if needed.
35
+ */
36
+ export declare const EXTENSION_ASSET_URL: InjectionToken<string>;
37
+ /**
38
+ * Wire in as a string. Gives the Angular 2 route that the module is registered under.
39
+ */
40
+ export declare const EXTENSION_ROUTE: InjectionToken<string>;
41
+ /**
42
+ * Wire in as a boolean. True if running under the SDK, false if running in production.
43
+ */
44
+ export declare const SDK_MODE: InjectionToken<boolean>;
45
+ /**
46
+ * Inject this to access the authentication token.
47
+ */
48
+ export interface AuthTokenHolderService {
49
+ /**
50
+ * The authentication token.
51
+ */
52
+ token: string;
53
+ /**
54
+ * JWT token
55
+ */
56
+ jwt?: string;
57
+ }
58
+ export declare const AuthTokenHolderService: AuthTokenHolderService;
@@ -0,0 +1,2 @@
1
+ export * from './query';
2
+ export * from './client';
@@ -0,0 +1,76 @@
1
+ /**
2
+ * Entity reference used to describe VCD entities
3
+ */
4
+ export declare class EntityReference {
5
+ 'name': string;
6
+ 'id': string;
7
+ }
8
+ /**
9
+ * Session
10
+ */
11
+ export declare class Session {
12
+ /**
13
+ * ID of session
14
+ */
15
+ 'id': string;
16
+ /**
17
+ * User of this session
18
+ */
19
+ 'user': EntityReference;
20
+ /**
21
+ * Organization user is logged into for this session
22
+ */
23
+ 'org': EntityReference;
24
+ /**
25
+ * The accessible location this session is valid for
26
+ */
27
+ 'location': string;
28
+ /**
29
+ * User's roles for this session
30
+ */
31
+ 'roles': Array<string>;
32
+ /**
33
+ * References to user's roles
34
+ */
35
+ 'roleRefs': Array<EntityReference>;
36
+ /**
37
+ * The session idle timeout in minutes
38
+ */
39
+ 'sessionIdleTimeoutMinutes': number;
40
+ }
41
+ /**
42
+ * A list of locations accessible to this session.
43
+ */
44
+ export interface AccessibleLocations {
45
+ /**
46
+ * How many results there are in total (i.e., considering all pages).
47
+ */
48
+ resultTotal?: number;
49
+ /**
50
+ * How many pages there are in total.
51
+ */
52
+ pageCount?: number;
53
+ /**
54
+ * The page that was fetched, 1-indexed.
55
+ */
56
+ page?: number;
57
+ /**
58
+ * Result count for page that was fetched.
59
+ */
60
+ pageSize?: number;
61
+ /**
62
+ * The current page of accessible locations.
63
+ */
64
+ values?: Array<AccessibleLocation>;
65
+ }
66
+ /**
67
+ * A location accessible to this session.
68
+ */
69
+ export declare class AccessibleLocation {
70
+ 'locationId': string;
71
+ 'site': EntityReference;
72
+ 'org': EntityReference;
73
+ 'restApiEndpoint': string;
74
+ 'uiEndpoint': string;
75
+ 'apiVersion': string;
76
+ }
@@ -0,0 +1,162 @@
1
+ export declare namespace Filter {
2
+ /**
3
+ * Collection of strategies for wilcard string matching.
4
+ */
5
+ class MatchMode {
6
+ /**
7
+ * Match the start of a string.
8
+ */
9
+ static readonly START: string;
10
+ /**
11
+ * Match the end of a string.
12
+ */
13
+ static readonly END: string;
14
+ /**
15
+ * Match anywhere in the string.
16
+ */
17
+ static readonly ANYWHERE: string;
18
+ }
19
+ /**
20
+ * A filter item that can define a comparison/condition.
21
+ */
22
+ interface Property {
23
+ /**
24
+ * Create a filter condition to evaluate whether the property is equal to the specified value.
25
+ *
26
+ * @param value the pattern to evaluate
27
+ * @param moreValues optional additional patterns to evaluate that will be treated as an OR condition
28
+ * @returns an evaluatable filter condition
29
+ */
30
+ equalTo(value: (boolean | number | string), ...moreValues: (boolean | number | string)[]): CompleteCondition;
31
+ /**
32
+ * Create a filter condition to evaluate whether the property is not equal to the specified value.
33
+ *
34
+ * @param value the pattern to evaluate
35
+ * @returns an evaluatable filter condition
36
+ */
37
+ notEqualTo(value: (boolean | number | string)): CompleteCondition;
38
+ /**
39
+ * Create a filter condition to evaluate whether the property is less than the specified value.
40
+ *
41
+ * @param value the pattern to evaluate
42
+ * @returns an evaluatable filter condition
43
+ */
44
+ lessThan(value: number): CompleteCondition;
45
+ /**
46
+ * Create a filter condition to evaluate whether the property is less than or equal to the specified value.
47
+ *
48
+ * @param value the pattern to evaluate
49
+ * @returns an evaluatable filter condition
50
+ */
51
+ lessOrEqualTo(value: number): CompleteCondition;
52
+ /**
53
+ * Create a filter condition to evaluate whether the property is greater than the specified value.
54
+ *
55
+ * @param value the pattern to evaluate
56
+ * @returns an evaluatable filter condition
57
+ */
58
+ greaterThan(value: number): CompleteCondition;
59
+ /**
60
+ * Create a filter condition to evaluate whether the property is greater than or equal to the specified value.
61
+ *
62
+ * @param value the pattern to evaluate
63
+ * @returns an evaluatable filter condition
64
+ */
65
+ greaterOrEqualTo(value: number): CompleteCondition;
66
+ /**
67
+ * Create a filter condition to evaluate whether the property is a wildcard match with the specified value.
68
+ *
69
+ * @param value the pattern to evaluate
70
+ * @param mode the type of wildcard evaluation to perform
71
+ * @returns an evaluatable filter condition
72
+ */
73
+ like(value: string, mode: MatchMode): CompleteCondition;
74
+ }
75
+ /**
76
+ * A representation of a condition that is incomplete by itself, like an empty condition, aggregation wrapper, or junction.
77
+ */
78
+ interface PartialCondition {
79
+ /**
80
+ * Create a simple property to be evaulated as a filter condition.
81
+ *
82
+ * @param property the name of the property
83
+ * @returns a Property instance for defining a filter condition
84
+ */
85
+ is(property: string): Property;
86
+ /**
87
+ * Create a conjunction (AND) condition from existing conditions.
88
+ *
89
+ * @param condition1 first condition
90
+ * @param condition2 second condition
91
+ * @param conditionN any additional conditions
92
+ * @returns an evaluatable filter condition
93
+ */
94
+ and(condition1: CompleteCondition, condition2: CompleteCondition, conditionN?: CompleteCondition[]): CompleteCondition;
95
+ /**
96
+ * Create a disjunction (OR) condition from existing conditions.
97
+ *
98
+ * @param condition1 first condition
99
+ * @param condition2 second condition
100
+ * @param conditionN any additional conditions
101
+ * @returns an evaluatable filter condition
102
+ */
103
+ or(condition1: CompleteCondition, condition2: CompleteCondition, conditionN?: CompleteCondition[]): CompleteCondition;
104
+ }
105
+ /**
106
+ * An evaluatable filter condition.
107
+ */
108
+ interface CompleteCondition {
109
+ /**
110
+ * Add a condtion to this condition.
111
+ *
112
+ * This new condition will be ANDed to the existing condition.
113
+ *
114
+ * @returns an incomplete (empty) condition
115
+ */
116
+ and(): PartialCondition;
117
+ /**
118
+ * Add a condtion to this condition.
119
+ *
120
+ * This new condition will be ORed to the existing condition.
121
+ *
122
+ * @returns an incomplete (empty) condition
123
+ */
124
+ or(): PartialCondition;
125
+ /**
126
+ * Build the FIQL representation of the condition.
127
+ *
128
+ * @returns a FIQL string
129
+ */
130
+ query(): string;
131
+ }
132
+ /**
133
+ * Builds a FIQL search condition using a fluent interface.
134
+ */
135
+ class Builder implements PartialCondition {
136
+ /**
137
+ * Create a simple property to be evaulated as a filter condition.
138
+ *
139
+ * @param property the name of the property
140
+ * @returns a Property instance for defining a filter condition
141
+ */
142
+ is(property: string): Property;
143
+ /**
144
+ * Create a conjunction (AND) condition from existing conditions.
145
+ *
146
+ * @param condition1 first condition
147
+ * @param condition2 second condition
148
+ * @param conditionN any additional conditions
149
+ * @returns an evaluatable filter condition
150
+ */
151
+ and(condition1: CompleteCondition, condition2: CompleteCondition, conditionN?: CompleteCondition[]): CompleteCondition;
152
+ /**
153
+ * Create a disjunction (OR) condition from existing conditions.
154
+ *
155
+ * @param condition1 first condition
156
+ * @param condition2 second condition
157
+ * @param conditionN any additional conditions
158
+ * @returns an evaluatable filter condition
159
+ */
160
+ or(condition1: CompleteCondition, condition2: CompleteCondition, conditionN?: CompleteCondition[]): CompleteCondition;
161
+ }
162
+ }
@@ -0,0 +1,2 @@
1
+ export * from './query.builder';
2
+ export * from './filter.builder';
@@ -0,0 +1,30 @@
1
+ export declare namespace Query {
2
+ class Builder {
3
+ private _type;
4
+ private _format;
5
+ private _links;
6
+ private _pageSize;
7
+ private _fields;
8
+ private _filter;
9
+ private _sort;
10
+ private constructor();
11
+ static getBuilder(): Builder;
12
+ static ofType(type: string): Builder;
13
+ format(format: Query.Format): Builder;
14
+ links(links: boolean): Builder;
15
+ pageSize(pageSize: number): Builder;
16
+ fields(...fields: string[]): Builder;
17
+ filter(filter: string): Builder;
18
+ sort(...sort: {
19
+ field: string;
20
+ reverse?: boolean;
21
+ }[]): Builder;
22
+ get(): string;
23
+ getCloudAPI(): string;
24
+ }
25
+ class Format {
26
+ static readonly ID_RECORDS: string;
27
+ static readonly RECORDS: string;
28
+ static readonly REFERENCES: string;
29
+ }
30
+ }
@@ -67,7 +67,7 @@ export interface ExtensionNavRegistrationAction {
67
67
  payload: ExtensionNavRegistration;
68
68
  readonly type: string;
69
69
  }
70
- export declare type ExtensionNavRegistrationActionCtor = new (payload: ExtensionNavRegistration) => ExtensionNavRegistrationAction;
70
+ export type ExtensionNavRegistrationActionCtor = new (payload: ExtensionNavRegistration) => ExtensionNavRegistrationAction;
71
71
  export declare const ExtensionNavRegistrationAction: ExtensionNavRegistrationActionCtor;
72
72
  /**
73
73
  * Inject this to access the authentication token.
@@ -118,7 +118,7 @@ export interface EntityActionExtensionSubmenu {
118
118
  /**
119
119
  * This represents menu information for an entity action.
120
120
  */
121
- export declare type EntityActionExtensionMenuEntry = EntityActionExtensionMenuItem | EntityActionExtensionSubmenu;
121
+ export type EntityActionExtensionMenuEntry = EntityActionExtensionMenuItem | EntityActionExtensionSubmenu;
122
122
  /**
123
123
  * Every component referenced by an entity action extension point must inherit from this.
124
124
  */
@@ -1,11 +1,16 @@
1
1
  import { Store } from '@ngrx/store';
2
2
  import { ExtensionNavRegistration } from '../common';
3
- import { TranslateService } from '../i18n';
4
3
  export declare class PluginModule {
5
4
  private appStore;
6
- private translate;
7
- constructor(appStore: Store<any>, translate?: TranslateService);
5
+ constructor(appStore: Store<any>);
8
6
  protected registerExtension(extension: ExtensionNavRegistration): void;
9
- protected getDefaultLanguage(): string;
10
- protected getSupportedLanguages(): string[];
7
+ }
8
+ /**
9
+ * Config object that is passed on VcdSdkModule init
10
+ * using .forRoot() method. It can be used to store
11
+ * configutration properties that are later used by the Services
12
+ * provided.
13
+ */
14
+ export declare class VcdSdkConfig {
15
+ apiVersion: string;
11
16
  }
@@ -0,0 +1,43 @@
1
+ import { Injectable } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ // tslint:disable:variable-name
4
+ export class ApiResultService {
5
+ constructor() {
6
+ this._results = [];
7
+ }
8
+ get results() {
9
+ return this._results;
10
+ }
11
+ add(result) {
12
+ this._results = [result, ...this._results.slice(0, 99)];
13
+ }
14
+ clear() {
15
+ this._results = [];
16
+ }
17
+ }
18
+ ApiResultService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: ApiResultService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
19
+ ApiResultService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: ApiResultService });
20
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: ApiResultService, decorators: [{
21
+ type: Injectable
22
+ }] });
23
+ export class ApiResult {
24
+ get message() {
25
+ return this._message;
26
+ }
27
+ get succeeded() {
28
+ return this._succeeded;
29
+ }
30
+ get started() {
31
+ return this._started;
32
+ }
33
+ get finished() {
34
+ return this._finished;
35
+ }
36
+ constructor(message, succeeded, started, finished) {
37
+ this._message = message;
38
+ this._succeeded = succeeded;
39
+ this._started = started;
40
+ this._finished = finished;
41
+ }
42
+ }
43
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBpLnJlc3VsdC5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdmNkL3Nkay9zcmMvY2xpZW50L2NsaWVudC9hcGkucmVzdWx0LnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQzs7QUFFM0MsK0JBQStCO0FBRS9CLE1BQU0sT0FBTyxnQkFBZ0I7SUFEN0I7UUFFWSxhQUFRLEdBQWdCLEVBQUUsQ0FBQztLQVl0QztJQVhHLElBQVcsT0FBTztRQUNkLE9BQU8sSUFBSSxDQUFDLFFBQVEsQ0FBQztJQUN6QixDQUFDO0lBRUQsR0FBRyxDQUFDLE1BQWlCO1FBQ2pCLElBQUksQ0FBQyxRQUFRLEdBQUcsQ0FBQyxNQUFNLEVBQUUsR0FBRyxJQUFJLENBQUMsUUFBUSxDQUFDLEtBQUssQ0FBQyxDQUFDLEVBQUUsRUFBRSxDQUFDLENBQUMsQ0FBQztJQUM1RCxDQUFDO0lBRUQsS0FBSztRQUNELElBQUksQ0FBQyxRQUFRLEdBQUcsRUFBRSxDQUFDO0lBQ3ZCLENBQUM7OzZHQVpRLGdCQUFnQjtpSEFBaEIsZ0JBQWdCOzJGQUFoQixnQkFBZ0I7a0JBRDVCLFVBQVU7O0FBZ0JYLE1BQU0sT0FBTyxTQUFTO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*/
4
+ export const HTTP_HEADERS = Object.freeze({
5
+ Authorization: 'Authorization',
6
+ etag: 'etag',
7
+ // Angular is dealing with case sensitive links despite the specification
8
+ // https://github.com/angular/angular/issues/6142
9
+ link: 'link',
10
+ Link: 'Link',
11
+ x_vcloud_authorization: 'x-vcloud-authorization'
12
+ });
13
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdmNkL3Nkay9zcmMvY2xpZW50L2NsaWVudC9jb25zdGFudHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFDSCxNQUFNLENBQUMsTUFBTSxZQUFZLEdBQUcsTUFBTSxDQUFDLE1BQU0sQ0FBQztJQUV0QyxhQUFhLEVBQUUsZUFBZTtJQUU5QixJQUFJLEVBQUUsTUFBTTtJQUVaLHlFQUF5RTtJQUN6RSxpREFBaUQ7SUFDakQsSUFBSSxFQUFFLE1BQU07SUFDWixJQUFJLEVBQUUsTUFBTTtJQUVaLHNCQUFzQixFQUFFLHdCQUF3QjtDQUNuRCxDQUFDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEhUVFAgSGVhZGVyc1xuICovXG5leHBvcnQgY29uc3QgSFRUUF9IRUFERVJTID0gT2JqZWN0LmZyZWV6ZSh7XG5cbiAgICBBdXRob3JpemF0aW9uOiAnQXV0aG9yaXphdGlvbicsXG5cbiAgICBldGFnOiAnZXRhZycsXG5cbiAgICAvLyBBbmd1bGFyIGlzIGRlYWxpbmcgd2l0aCBjYXNlIHNlbnNpdGl2ZSBsaW5rcyBkZXNwaXRlIHRoZSBzcGVjaWZpY2F0aW9uXG4gICAgLy8gaHR0cHM6Ly9naXRodWIuY29tL2FuZ3VsYXIvYW5ndWxhci9pc3N1ZXMvNjE0MlxuICAgIGxpbms6ICdsaW5rJyxcbiAgICBMaW5rOiAnTGluaycsXG5cbiAgICB4X3ZjbG91ZF9hdXRob3JpemF0aW9uOiAneC12Y2xvdWQtYXV0aG9yaXphdGlvbidcbn0pO1xuIl19
@@ -0,0 +1,8 @@
1
+ export * from './api.result.service';
2
+ export * from './vcd.http.client';
3
+ export * from './vcd.api.client';
4
+ export * from './vcd.transfer.client';
5
+ export * from './request.headers.interceptor';
6
+ export * from './logging.interceptor';
7
+ export * from './response.normalization.interceptor';
8
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy92Y2Qvc2RrL3NyYy9jbGllbnQvY2xpZW50L2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsc0JBQXNCLENBQUM7QUFDckMsY0FBYyxtQkFBbUIsQ0FBQztBQUNsQyxjQUFjLGtCQUFrQixDQUFDO0FBQ2pDLGNBQWMsdUJBQXVCLENBQUM7QUFDdEMsY0FBYywrQkFBK0IsQ0FBQztBQUM5QyxjQUFjLHVCQUF1QixDQUFDO0FBQ3RDLGNBQWMsc0NBQXNDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2FwaS5yZXN1bHQuc2VydmljZSc7XG5leHBvcnQgKiBmcm9tICcuL3ZjZC5odHRwLmNsaWVudCc7XG5leHBvcnQgKiBmcm9tICcuL3ZjZC5hcGkuY2xpZW50JztcbmV4cG9ydCAqIGZyb20gJy4vdmNkLnRyYW5zZmVyLmNsaWVudCc7XG5leHBvcnQgKiBmcm9tICcuL3JlcXVlc3QuaGVhZGVycy5pbnRlcmNlcHRvcic7XG5leHBvcnQgKiBmcm9tICcuL2xvZ2dpbmcuaW50ZXJjZXB0b3InO1xuZXhwb3J0ICogZnJvbSAnLi9yZXNwb25zZS5ub3JtYWxpemF0aW9uLmludGVyY2VwdG9yJztcbiJdfQ==
@@ -0,0 +1,44 @@
1
+ import { Injectable, Optional } from '@angular/core';
2
+ import { HttpResponse } from '@angular/common/http';
3
+ import { finalize, tap } from 'rxjs/operators';
4
+ import { ApiResult } from './api.result.service';
5
+ import * as i0 from "@angular/core";
6
+ import * as i1 from "./api.result.service";
7
+ // tslint:disable:variable-name
8
+ export class LoggingInterceptor {
9
+ set enabled(enabled) {
10
+ this._enabled = enabled;
11
+ if (this._enabled && this._outputToConsole) {
12
+ console.warn('API logging enabled but no provider found for ApiResultService. Results will be output to the console.');
13
+ }
14
+ }
15
+ constructor(apiResultService) {
16
+ this.apiResultService = apiResultService;
17
+ this._enabled = false;
18
+ this._outputToConsole = !this.apiResultService;
19
+ }
20
+ intercept(req, next) {
21
+ if (!this._enabled) {
22
+ return next.handle(req);
23
+ }
24
+ const started = new Date();
25
+ let succeeded;
26
+ return next.handle(req)
27
+ .pipe(tap(event => succeeded = event instanceof HttpResponse ? true : false, error => succeeded = false), finalize(() => {
28
+ if (this._outputToConsole) {
29
+ console.log(`${req.method} ${req.urlWithParams} completed in ${Date.now() - started.getTime()} ms. Success: ${succeeded}`);
30
+ }
31
+ else {
32
+ this.apiResultService.add(new ApiResult(`${req.method} ${req.urlWithParams}`, succeeded, started, new Date()));
33
+ }
34
+ }));
35
+ }
36
+ }
37
+ LoggingInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: LoggingInterceptor, deps: [{ token: i1.ApiResultService, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
38
+ LoggingInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: LoggingInterceptor });
39
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: LoggingInterceptor, decorators: [{
40
+ type: Injectable
41
+ }], ctorParameters: function () { return [{ type: i1.ApiResultService, decorators: [{
42
+ type: Optional
43
+ }] }]; } });
44
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9nZ2luZy5pbnRlcmNlcHRvci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3ZjZC9zZGsvc3JjL2NsaWVudC9jbGllbnQvbG9nZ2luZy5pbnRlcmNlcHRvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUNyRCxPQUFPLEVBRVEsWUFBWSxFQUMxQixNQUFNLHNCQUFzQixDQUFDO0FBRzlCLE9BQU8sRUFBRSxRQUFRLEVBQUUsR0FBRyxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFDL0MsT0FBTyxFQUFvQixTQUFTLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQzs7O0FBRW5FLCtCQUErQjtBQUUvQixNQUFNLE9BQU8sa0JBQWtCO0lBRzdCLElBQUksT0FBTyxDQUFDLE9BQWdCO1FBQzFCLElBQUksQ0FBQyxRQUFRLEdBQUcsT0FBTyxDQUFDO1FBQ3hCLElBQUksSUFBSSxDQUFDLFFBQVEsSUFBSSxJQUFJLENBQUMsZ0JBQWdCLEVBQUU7WUFDMUMsT0FBTyxDQUFDLElBQUksQ0FBQyx5R0FBeUcsQ0FBQyxDQUFDO1NBQ3pIO0lBQ0gsQ0FBQztJQUVELFlBQWdDLGdCQUFrQztRQUFsQyxxQkFBZ0IsR0FBaEIsZ0JBQWdCLENBQWtCO1FBUjFELGFBQVEsR0FBRyxLQUFLLENBQUM7UUFTdkIsSUFBSSxDQUFDLGdCQUFnQixHQUFHLENBQUMsSUFBSSxDQUFDLGdCQUFnQixDQUFDO0lBQ2pELENBQUM7SUFFRCxTQ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