@configura/web-api-auth 1.6.1 → 2.0.0-alpha.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.
- package/dist/CatalogueAuthAPI.d.ts +61 -42
- package/dist/CatalogueAuthAPI.js +8 -5
- package/package.json +2 -2
|
@@ -1,39 +1,47 @@
|
|
|
1
1
|
/** AdditionalProductConfiguration */
|
|
2
|
-
export interface
|
|
2
|
+
export interface DtoAdditionalProductConfiguration {
|
|
3
3
|
refKey?: string;
|
|
4
4
|
selected?: boolean;
|
|
5
|
-
selOptions: Array<
|
|
6
|
-
additionalProducts?: Array<
|
|
5
|
+
selOptions: Array<DtoSelectedOption>;
|
|
6
|
+
additionalProducts?: Array<DtoAdditionalProductConfiguration>;
|
|
7
7
|
}
|
|
8
8
|
/** AuthAPIConfig */
|
|
9
|
-
export interface
|
|
9
|
+
export interface DtoAuthAPIConfig {
|
|
10
10
|
endpoint?: string;
|
|
11
11
|
secretToken?: string;
|
|
12
12
|
}
|
|
13
13
|
/** AuthorizeRequest */
|
|
14
|
-
export interface
|
|
15
|
-
permissions?: Array<
|
|
14
|
+
export interface DtoAuthorizeRequest {
|
|
15
|
+
permissions?: Array<DtoCataloguePermission>;
|
|
16
16
|
}
|
|
17
17
|
/** AuthorizeResponse */
|
|
18
|
-
export interface
|
|
18
|
+
export interface DtoAuthorizeResponse {
|
|
19
19
|
endpoint: string;
|
|
20
20
|
secretToken: string;
|
|
21
|
-
apiSession:
|
|
21
|
+
apiSession: DtoCatalogueAPISession;
|
|
22
22
|
}
|
|
23
23
|
/** CatalogueAPISession */
|
|
24
|
-
export interface
|
|
24
|
+
export interface DtoCatalogueAPISession {
|
|
25
25
|
expires: string;
|
|
26
26
|
features?: Array<string>;
|
|
27
|
-
permissions?: Array<
|
|
27
|
+
permissions?: Array<DtoCataloguePermission>;
|
|
28
28
|
}
|
|
29
29
|
/** CatalogueAuthAPISession */
|
|
30
|
-
export interface
|
|
30
|
+
export interface DtoCatalogueAuthAPISession {
|
|
31
31
|
expires: string;
|
|
32
32
|
features?: Array<string>;
|
|
33
|
-
permissions?: Array<
|
|
33
|
+
permissions?: Array<DtoCataloguePermission>;
|
|
34
34
|
}
|
|
35
35
|
/** CatalogueParams */
|
|
36
|
-
export interface
|
|
36
|
+
export interface DtoCatalogueParams extends DtoCatalogueParamsWithoutCid {
|
|
37
|
+
cid: number;
|
|
38
|
+
}
|
|
39
|
+
/** CatalogueParamsWithLang */
|
|
40
|
+
export interface DtoCatalogueParamsWithLang extends DtoCatalogueParams {
|
|
41
|
+
lang: string;
|
|
42
|
+
}
|
|
43
|
+
/** CatalogueParamsWithoutCid */
|
|
44
|
+
export interface DtoCatalogueParamsWithoutCid {
|
|
37
45
|
enterprise: string;
|
|
38
46
|
prdCat: string;
|
|
39
47
|
prdCatVersion: string;
|
|
@@ -41,7 +49,7 @@ export interface CatalogueParams {
|
|
|
41
49
|
priceList: string;
|
|
42
50
|
}
|
|
43
51
|
/** CataloguePermission */
|
|
44
|
-
export interface
|
|
52
|
+
export interface DtoCataloguePermission {
|
|
45
53
|
cid: number;
|
|
46
54
|
enterprise: string;
|
|
47
55
|
prdCat: string;
|
|
@@ -50,47 +58,55 @@ export interface CataloguePermission {
|
|
|
50
58
|
vendors?: Array<string>;
|
|
51
59
|
}
|
|
52
60
|
/** ErrorResponse */
|
|
53
|
-
export interface
|
|
61
|
+
export interface DtoErrorResponse {
|
|
54
62
|
error: string;
|
|
55
63
|
code: number;
|
|
56
64
|
eventId?: string;
|
|
57
65
|
}
|
|
58
66
|
/** ExportFormat - Format of the exported product, identical to the format's file extension. */
|
|
59
|
-
export declare type
|
|
60
|
-
export declare const
|
|
67
|
+
export declare type DtoExportFormat = "glb" | "gltf" | "fbx" | "dwg" | "cmdrw" | "cmfav" | "cmsym";
|
|
68
|
+
export declare const dtoExportFormatNames: DtoExportFormat[];
|
|
61
69
|
/** Orientation */
|
|
62
|
-
export interface
|
|
70
|
+
export interface DtoOrientation {
|
|
63
71
|
yaw: number;
|
|
64
72
|
pitch: number;
|
|
65
73
|
roll: number;
|
|
66
74
|
}
|
|
67
75
|
/** Point */
|
|
68
|
-
export interface
|
|
76
|
+
export interface DtoPoint {
|
|
69
77
|
x: number;
|
|
70
78
|
y: number;
|
|
71
79
|
z: number;
|
|
72
80
|
}
|
|
81
|
+
/** ProductParams */
|
|
82
|
+
export interface DtoProductParams extends DtoCatalogueParams {
|
|
83
|
+
partNumber: string;
|
|
84
|
+
}
|
|
85
|
+
/** ProductParamsWithLang */
|
|
86
|
+
export interface DtoProductParamsWithLang extends DtoProductParams {
|
|
87
|
+
lang: string;
|
|
88
|
+
}
|
|
73
89
|
/** RefreshSessionTokenResponse */
|
|
74
|
-
export interface
|
|
75
|
-
apiSession:
|
|
90
|
+
export interface DtoRefreshSessionTokenResponse {
|
|
91
|
+
apiSession: DtoCatalogueAPISession;
|
|
76
92
|
}
|
|
77
93
|
/** RenderFormat */
|
|
78
|
-
export declare type
|
|
79
|
-
export declare const
|
|
94
|
+
export declare type DtoRenderFormat = "jpg" | "png";
|
|
95
|
+
export declare const dtoRenderFormatNames: DtoRenderFormat[];
|
|
80
96
|
/** SelectedOption */
|
|
81
|
-
export interface
|
|
97
|
+
export interface DtoSelectedOption {
|
|
82
98
|
code: string;
|
|
83
|
-
numericValue?:
|
|
99
|
+
numericValue?: DtoValueWithUnit;
|
|
84
100
|
next?: {
|
|
85
|
-
[index: string]:
|
|
101
|
+
[index: string]: DtoSelectedOption;
|
|
86
102
|
};
|
|
87
103
|
}
|
|
88
104
|
/** TargetCameraArgs */
|
|
89
|
-
export interface
|
|
90
|
-
location?:
|
|
91
|
-
target?:
|
|
92
|
-
direction?:
|
|
93
|
-
normal?:
|
|
105
|
+
export interface DtoTargetCameraArgs {
|
|
106
|
+
location?: DtoPoint;
|
|
107
|
+
target?: DtoPoint;
|
|
108
|
+
direction?: DtoVector;
|
|
109
|
+
normal?: DtoVector;
|
|
94
110
|
yaw?: number;
|
|
95
111
|
pitch?: number;
|
|
96
112
|
roll?: number;
|
|
@@ -99,38 +115,41 @@ export interface TargetCameraArgs {
|
|
|
99
115
|
minHeight?: number;
|
|
100
116
|
}
|
|
101
117
|
/** Transform */
|
|
102
|
-
export interface
|
|
103
|
-
pos:
|
|
104
|
-
scale:
|
|
105
|
-
rot:
|
|
118
|
+
export interface DtoTransform {
|
|
119
|
+
pos: DtoVector;
|
|
120
|
+
scale: DtoVector;
|
|
121
|
+
rot: DtoOrientation;
|
|
106
122
|
}
|
|
107
123
|
/** ValueWithUnit */
|
|
108
|
-
export interface
|
|
124
|
+
export interface DtoValueWithUnit {
|
|
109
125
|
value: number;
|
|
110
126
|
unit?: string;
|
|
111
127
|
}
|
|
112
128
|
/** Vector */
|
|
113
|
-
export interface
|
|
129
|
+
export interface DtoVector {
|
|
114
130
|
x: number;
|
|
115
131
|
y: number;
|
|
116
132
|
z: number;
|
|
117
133
|
}
|
|
118
|
-
export declare type
|
|
134
|
+
export declare type DtoRequestOptions = {
|
|
119
135
|
method: "POST" | "GET" | "DELETE";
|
|
120
136
|
headers: {
|
|
121
137
|
[index: string]: string;
|
|
122
138
|
};
|
|
123
139
|
body?: string;
|
|
124
140
|
};
|
|
125
|
-
export declare class
|
|
141
|
+
export declare class DtoAPIError<T> extends Error {
|
|
126
142
|
body?: string;
|
|
127
143
|
error?: Error;
|
|
128
144
|
parsed?: T;
|
|
129
145
|
status?: number;
|
|
130
146
|
}
|
|
131
147
|
export declare class CatalogueAuthAPI {
|
|
132
|
-
auth:
|
|
133
|
-
fetch<T>(url: string, options:
|
|
134
|
-
postAuthorize(body:
|
|
148
|
+
auth: DtoAuthAPIConfig | undefined;
|
|
149
|
+
fetch<T>(url: string, options: DtoRequestOptions): Promise<T>;
|
|
150
|
+
postAuthorize(body: DtoAuthorizeRequest): Promise<DtoAuthorizeResponse>;
|
|
135
151
|
}
|
|
152
|
+
export declare const DTO_OPERATION_ID_TO_DEBIT_GROUP: {
|
|
153
|
+
[operation_id: string]: string;
|
|
154
|
+
};
|
|
136
155
|
//# sourceMappingURL=CatalogueAuthAPI.d.ts.map
|
package/dist/CatalogueAuthAPI.js
CHANGED
|
@@ -14,14 +14,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.CatalogueAuthAPI = exports.
|
|
17
|
+
exports.DTO_OPERATION_ID_TO_DEBIT_GROUP = exports.CatalogueAuthAPI = exports.DtoAPIError = exports.dtoRenderFormatNames = exports.dtoExportFormatNames = void 0;
|
|
18
18
|
const http_1 = __importDefault(require("http"));
|
|
19
19
|
const https_1 = __importDefault(require("https"));
|
|
20
|
-
exports.
|
|
21
|
-
exports.
|
|
22
|
-
class
|
|
20
|
+
exports.dtoExportFormatNames = ["glb", "gltf", "fbx", "dwg", "cmdrw", "cmfav", "cmsym"];
|
|
21
|
+
exports.dtoRenderFormatNames = ["jpg", "png"];
|
|
22
|
+
class DtoAPIError extends Error {
|
|
23
23
|
}
|
|
24
|
-
exports.
|
|
24
|
+
exports.DtoAPIError = DtoAPIError;
|
|
25
25
|
class CatalogueAuthAPI {
|
|
26
26
|
fetch(url, options) {
|
|
27
27
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -79,3 +79,6 @@ class CatalogueAuthAPI {
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
exports.CatalogueAuthAPI = CatalogueAuthAPI;
|
|
82
|
+
exports.DTO_OPERATION_ID_TO_DEBIT_GROUP = {
|
|
83
|
+
postAuthorize: "base",
|
|
84
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@configura/web-api-auth",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-alpha.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -21,5 +21,5 @@
|
|
|
21
21
|
"publishConfig": {
|
|
22
22
|
"access": "public"
|
|
23
23
|
},
|
|
24
|
-
"gitHead": "
|
|
24
|
+
"gitHead": "b802ecc481c41f8dd8342dc6eaf5010a86f0f85d"
|
|
25
25
|
}
|