@epilot/customer-portal-client 0.1.3 → 0.1.5
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/client.d.ts +1 -0
- package/dist/client.js +14 -0
- package/dist/definition.d.ts +3 -0
- package/dist/definition.js +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +14 -0
- package/dist/openapi.d.ts +137 -0
- package/package.json +3 -2
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getClient: () => import("openapi-client-axios").OpenAPIClient<import("./openapi").OperationMethods, import("./openapi").PathsDictionary>;
|
package/dist/client.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getClient = void 0;
|
|
7
|
+
var openapi_client_axios_1 = __importDefault(require("openapi-client-axios"));
|
|
8
|
+
var definition_1 = __importDefault(require("./definition"));
|
|
9
|
+
var getClient = function () {
|
|
10
|
+
var api = new openapi_client_axios_1.default({ definition: definition_1.default, quick: true });
|
|
11
|
+
return api.initSync();
|
|
12
|
+
};
|
|
13
|
+
exports.getClient = getClient;
|
|
14
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(e,t){for(var o in t)e[o]=t[o];t.__esModule&&Object.defineProperty(e,"__esModule",{value:!0})}(exports,(()=>{"use strict";var e={914:function(e,t,o){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(o(279));t.default=i.default},279:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"Customer Portal API","description":"Backend for epilot end customer portals","version":"1.0.0"},"tags":[{"name":"mock","description":"Mock endpoints"}],"security":[{"CustomerPortalAuth":[]},{"AsOrganization":[]},{"AsBrand":[]},{"AsCustomer":[]}],"paths":{"/v1/customer-portal/auth":{"get":{"operationId":"testAuth","summary":"testAuth","description":"TODO","tags":["mock"],"responses":{"200":{"description":"ok"}}}},"/v1/customer-portal/public/config":{"get":{"operationId":"getPortalConfig","summary":"getPortalConfig","description":"TODO","tags":["mock"],"security":[],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"auth_config":{"type":"object","properties":{"user_pool_id":{"type":"string","example":"eu-central-1_CUEQRNbUb"},"user_pool_client_id":{"type":"string","example":"6bsd0jkgoie74k2i8mrhc1vest"},"user_pool_identity_pool_id":{"type":"string","example":"eu-central-1:a63af1f7-ab86-4ab5-a0eb-f461cb37c2b1"}},"required":["user_pool_id","user_pool_client_id"]}}}}}}}}},"/v1/customer-portal/info":{"get":{"operationId":"getCustomerInfo","summary":"getCustomerInfo","description":"TODO","tags":["mock"],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"object","properties":{"street":{"type":"string","example":"Melatengurtel"},"street_number":{"type":"string","example":"71"},"city":{"type":"string","example":"Koln"}}}}}}}}}}}},"components":{"securitySchemes":{"CustomerPortalAuth":{"type":"http","scheme":"bearer","description":"Customer Portal Cognito Token"},"EpilotAuth":{"type":"http","scheme":"bearer","description":"Epilot Bearer Token"},"AsOrganization":{"type":"apiKey","in":"header","name":"x-ivy-org-id","description":"Set organization id as internal user"},"AsBrand":{"type":"apiKey","in":"header","name":"x-ivy-brand-id","description":"Set brand id as internal user"},"AsContact":{"type":"apiKey","in":"header","name":"x-contact-id","description":"Set contact id as internal user"}},"schemas":{"PortalConfig":{"type":"object","properties":{"auth_config":{"type":"object","properties":{"user_pool_id":{"type":"string","example":"eu-central-1_CUEQRNbUb"},"user_pool_client_id":{"type":"string","example":"6bsd0jkgoie74k2i8mrhc1vest"},"user_pool_identity_pool_id":{"type":"string","example":"eu-central-1:a63af1f7-ab86-4ab5-a0eb-f461cb37c2b1"}},"required":["user_pool_id","user_pool_client_id"]}}},"AuthConfig":{"type":"object","properties":{"user_pool_id":{"type":"string","example":"eu-central-1_CUEQRNbUb"},"user_pool_client_id":{"type":"string","example":"6bsd0jkgoie74k2i8mrhc1vest"},"user_pool_identity_pool_id":{"type":"string","example":"eu-central-1:a63af1f7-ab86-4ab5-a0eb-f461cb37c2b1"}},"required":["user_pool_id","user_pool_client_id"]}}}}')}},t={};return function o(r){if(t[r])return t[r].exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,o),i.exports}(914)})());
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./client"), exports);
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import {
|
|
3
|
+
OpenAPIClient,
|
|
4
|
+
Parameters,
|
|
5
|
+
UnknownParamsObject,
|
|
6
|
+
OperationResponse,
|
|
7
|
+
AxiosRequestConfig,
|
|
8
|
+
} from 'openapi-client-axios';
|
|
9
|
+
|
|
10
|
+
declare namespace Components {
|
|
11
|
+
namespace Schemas {
|
|
12
|
+
export interface AuthConfig {
|
|
13
|
+
/**
|
|
14
|
+
* example:
|
|
15
|
+
* eu-central-1_CUEQRNbUb
|
|
16
|
+
*/
|
|
17
|
+
user_pool_id: string;
|
|
18
|
+
/**
|
|
19
|
+
* example:
|
|
20
|
+
* 6bsd0jkgoie74k2i8mrhc1vest
|
|
21
|
+
*/
|
|
22
|
+
user_pool_client_id: string;
|
|
23
|
+
/**
|
|
24
|
+
* example:
|
|
25
|
+
* eu-central-1:a63af1f7-ab86-4ab5-a0eb-f461cb37c2b1
|
|
26
|
+
*/
|
|
27
|
+
user_pool_identity_pool_id?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface PortalConfig {
|
|
30
|
+
auth_config?: AuthConfig;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
declare namespace Paths {
|
|
35
|
+
namespace GetCustomerInfo {
|
|
36
|
+
namespace Responses {
|
|
37
|
+
export interface $200 {
|
|
38
|
+
address?: {
|
|
39
|
+
/**
|
|
40
|
+
* example:
|
|
41
|
+
* Melatengurtel
|
|
42
|
+
*/
|
|
43
|
+
street?: string;
|
|
44
|
+
/**
|
|
45
|
+
* example:
|
|
46
|
+
* 71
|
|
47
|
+
*/
|
|
48
|
+
street_number?: string;
|
|
49
|
+
/**
|
|
50
|
+
* example:
|
|
51
|
+
* Koln
|
|
52
|
+
*/
|
|
53
|
+
city?: string;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
namespace GetPortalConfig {
|
|
59
|
+
namespace Responses {
|
|
60
|
+
export type $200 = Components.Schemas.PortalConfig;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface OperationMethods {
|
|
66
|
+
/**
|
|
67
|
+
* testAuth - testAuth
|
|
68
|
+
*
|
|
69
|
+
* TODO
|
|
70
|
+
*/
|
|
71
|
+
'testAuth'(
|
|
72
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
73
|
+
data?: any,
|
|
74
|
+
config?: AxiosRequestConfig
|
|
75
|
+
): OperationResponse<any>
|
|
76
|
+
/**
|
|
77
|
+
* getPortalConfig - getPortalConfig
|
|
78
|
+
*
|
|
79
|
+
* TODO
|
|
80
|
+
*/
|
|
81
|
+
'getPortalConfig'(
|
|
82
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
83
|
+
data?: any,
|
|
84
|
+
config?: AxiosRequestConfig
|
|
85
|
+
): OperationResponse<Paths.GetPortalConfig.Responses.$200>
|
|
86
|
+
/**
|
|
87
|
+
* getCustomerInfo - getCustomerInfo
|
|
88
|
+
*
|
|
89
|
+
* TODO
|
|
90
|
+
*/
|
|
91
|
+
'getCustomerInfo'(
|
|
92
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
93
|
+
data?: any,
|
|
94
|
+
config?: AxiosRequestConfig
|
|
95
|
+
): OperationResponse<Paths.GetCustomerInfo.Responses.$200>
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export interface PathsDictionary {
|
|
99
|
+
['/v1/customer-portal/auth']: {
|
|
100
|
+
/**
|
|
101
|
+
* testAuth - testAuth
|
|
102
|
+
*
|
|
103
|
+
* TODO
|
|
104
|
+
*/
|
|
105
|
+
'get'(
|
|
106
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
107
|
+
data?: any,
|
|
108
|
+
config?: AxiosRequestConfig
|
|
109
|
+
): OperationResponse<any>
|
|
110
|
+
}
|
|
111
|
+
['/v1/customer-portal/public/config']: {
|
|
112
|
+
/**
|
|
113
|
+
* getPortalConfig - getPortalConfig
|
|
114
|
+
*
|
|
115
|
+
* TODO
|
|
116
|
+
*/
|
|
117
|
+
'get'(
|
|
118
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
119
|
+
data?: any,
|
|
120
|
+
config?: AxiosRequestConfig
|
|
121
|
+
): OperationResponse<Paths.GetPortalConfig.Responses.$200>
|
|
122
|
+
}
|
|
123
|
+
['/v1/customer-portal/info']: {
|
|
124
|
+
/**
|
|
125
|
+
* getCustomerInfo - getCustomerInfo
|
|
126
|
+
*
|
|
127
|
+
* TODO
|
|
128
|
+
*/
|
|
129
|
+
'get'(
|
|
130
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
131
|
+
data?: any,
|
|
132
|
+
config?: AxiosRequestConfig
|
|
133
|
+
): OperationResponse<Paths.GetCustomerInfo.Responses.$200>
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export type Client = OpenAPIClient<OperationMethods, PathsDictionary>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epilot/customer-portal-client",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "API Client for epilot customer-portal API",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
"openapi": "openapi read --json --dereference --bundle ../lambda/ApiHandlerFunction/openapi.yml > src/openapi.json",
|
|
12
12
|
"typegen": "echo '/* eslint-disable */' > src/openapi.d.ts && typegen ../lambda/ApiHandlerFunction/openapi.yml >> src/openapi.d.ts",
|
|
13
13
|
"build": "npm run openapi && npm run typegen && npm run typescript && npm run bundle-definition",
|
|
14
|
-
"eslint": "../node_modules/.bin/eslint -c ../.eslintrc.yml"
|
|
14
|
+
"eslint": "../node_modules/.bin/eslint -c ../.eslintrc.yml",
|
|
15
|
+
"prepublishOnly": "npm run build"
|
|
15
16
|
},
|
|
16
17
|
"files": [
|
|
17
18
|
"*.js",
|