sailpoint-api-client 1.3.0 → 1.3.1
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/beta/README.md +2 -2
- package/beta/api.ts +3243 -1187
- package/beta/base.ts +1 -1
- package/beta/common.ts +3 -3
- package/beta/package.json +1 -1
- package/configuration.ts +12 -31
- package/dist/beta/api.d.ts +2489 -1058
- package/dist/beta/api.js +1828 -457
- package/dist/beta/api.js.map +1 -1
- package/dist/beta/base.js +1 -1
- package/dist/beta/base.js.map +1 -1
- package/dist/beta/common.js +3 -3
- package/dist/beta/common.js.map +1 -1
- package/dist/configuration.d.ts +1 -22
- package/dist/configuration.js +10 -8
- package/dist/configuration.js.map +1 -1
- package/dist/index.d.ts +0 -4
- package/dist/index.js +3 -9
- package/dist/index.js.map +1 -1
- package/dist/index.spec.js +0 -35
- package/dist/index.spec.js.map +1 -1
- package/dist/v3/api.d.ts +4120 -1505
- package/dist/v3/api.js +6856 -4414
- package/dist/v3/api.js.map +1 -1
- package/dist/v3/base.js +1 -1
- package/dist/v3/base.js.map +1 -1
- package/dist/v3/common.js +3 -3
- package/dist/v3/common.js.map +1 -1
- package/index.spec.ts +1 -24
- package/index.ts +0 -6
- package/package.json +1 -1
- package/v3/README.md +2 -2
- package/v3/api.ts +5355 -1581
- package/v3/base.ts +1 -1
- package/v3/common.ts +3 -3
- package/v3/package.json +1 -1
- package/cc/.openapi-generator/FILES +0 -12
- package/cc/.openapi-generator/VERSION +0 -1
- package/cc/.openapi-generator-ignore +0 -23
- package/cc/README.md +0 -45
- package/cc/api.ts +0 -3877
- package/cc/base.ts +0 -71
- package/cc/common.ts +0 -142
- package/cc/configuration.ts +0 -101
- package/cc/git_push.sh +0 -57
- package/cc/index.ts +0 -17
- package/cc/package.json +0 -35
- package/cc/tsconfig.json +0 -21
- package/dist/cc/api.d.ts +0 -2946
- package/dist/cc/api.js +0 -2260
- package/dist/cc/api.js.map +0 -1
- package/dist/cc/base.d.ts +0 -55
- package/dist/cc/base.js +0 -86
- package/dist/cc/base.js.map +0 -1
- package/dist/cc/common.d.ts +0 -65
- package/dist/cc/common.js +0 -251
- package/dist/cc/common.js.map +0 -1
- package/dist/cc/configuration.d.ts +0 -83
- package/dist/cc/configuration.js +0 -45
- package/dist/cc/configuration.js.map +0 -1
- package/dist/cc/index.d.ts +0 -12
- package/dist/cc/index.js +0 -31
- package/dist/cc/index.js.map +0 -1
- package/dist/v2/api.d.ts +0 -1359
- package/dist/v2/api.js +0 -1242
- package/dist/v2/api.js.map +0 -1
- package/dist/v2/base.d.ts +0 -55
- package/dist/v2/base.js +0 -86
- package/dist/v2/base.js.map +0 -1
- package/dist/v2/common.d.ts +0 -65
- package/dist/v2/common.js +0 -251
- package/dist/v2/common.js.map +0 -1
- package/dist/v2/configuration.d.ts +0 -83
- package/dist/v2/configuration.js +0 -45
- package/dist/v2/configuration.js.map +0 -1
- package/dist/v2/index.d.ts +0 -12
- package/dist/v2/index.js +0 -31
- package/dist/v2/index.js.map +0 -1
- package/v2/.openapi-generator/FILES +0 -12
- package/v2/.openapi-generator/VERSION +0 -1
- package/v2/.openapi-generator-ignore +0 -23
- package/v2/README.md +0 -45
- package/v2/api.ts +0 -1900
- package/v2/base.ts +0 -71
- package/v2/common.ts +0 -142
- package/v2/configuration.ts +0 -101
- package/v2/git_push.sh +0 -57
- package/v2/index.ts +0 -17
- package/v2/package.json +0 -35
- package/v2/tsconfig.json +0 -21
package/beta/base.ts
CHANGED
|
@@ -52,7 +52,7 @@ export class BaseAPI {
|
|
|
52
52
|
constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {
|
|
53
53
|
if (configuration) {
|
|
54
54
|
this.configuration = configuration;
|
|
55
|
-
this.basePath = configuration.
|
|
55
|
+
this.basePath = configuration.basePath + "/beta"|| this.basePath;
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
};
|
package/beta/common.ts
CHANGED
|
@@ -134,9 +134,9 @@ export const toPathString = function (url: URL) {
|
|
|
134
134
|
export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) {
|
|
135
135
|
return <T = unknown, R = AxiosResponse<T>>(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
136
136
|
axiosRetry(globalAxios, configuration.retriesConfig)
|
|
137
|
-
axiosArgs.axiosOptions.headers['X-SailPoint-SDK'] = 'typescript-1.3.
|
|
138
|
-
axiosArgs.axiosOptions.headers['User-Agent'] = 'OpenAPI-Generator/1.3.
|
|
139
|
-
const axiosRequestArgs = {...axiosArgs.axiosOptions, url: (configuration?.
|
|
137
|
+
axiosArgs.axiosOptions.headers['X-SailPoint-SDK'] = 'typescript-1.3.1'
|
|
138
|
+
axiosArgs.axiosOptions.headers['User-Agent'] = 'OpenAPI-Generator/1.3.1/ts'
|
|
139
|
+
const axiosRequestArgs = {...axiosArgs.axiosOptions, url: (configuration?.basePath + "/beta" || basePath) + axiosArgs.url};
|
|
140
140
|
return axios.request<T, R>(axiosRequestArgs);
|
|
141
141
|
};
|
|
142
142
|
}
|
package/beta/package.json
CHANGED
package/configuration.ts
CHANGED
|
@@ -3,6 +3,7 @@ import * as os from 'os';
|
|
|
3
3
|
import * as path from 'path';
|
|
4
4
|
import * as yaml from "js-yaml";
|
|
5
5
|
import * as fs from "fs";
|
|
6
|
+
import FormData from 'form-data'
|
|
6
7
|
import { IAxiosRetryConfig } from "axios-retry";
|
|
7
8
|
|
|
8
9
|
export interface ConfigurationParameters {
|
|
@@ -97,28 +98,7 @@ export class Configuration {
|
|
|
97
98
|
* @type {string}
|
|
98
99
|
* @memberof Configuration
|
|
99
100
|
*/
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* override base path
|
|
103
|
-
*
|
|
104
|
-
* @type {string}
|
|
105
|
-
* @memberof Configuration
|
|
106
|
-
*/
|
|
107
|
-
basePathV3?: string;
|
|
108
|
-
/**
|
|
109
|
-
* override base path
|
|
110
|
-
*
|
|
111
|
-
* @type {string}
|
|
112
|
-
* @memberof Configuration
|
|
113
|
-
*/
|
|
114
|
-
basePathV2?: string;
|
|
115
|
-
/**
|
|
116
|
-
* override base path
|
|
117
|
-
*
|
|
118
|
-
* @type {string}
|
|
119
|
-
* @memberof Configuration
|
|
120
|
-
*/
|
|
121
|
-
basePathCC?: string;
|
|
101
|
+
basePath?: string;
|
|
122
102
|
/**
|
|
123
103
|
* base options for axios calls
|
|
124
104
|
*
|
|
@@ -149,17 +129,18 @@ export class Configuration {
|
|
|
149
129
|
}
|
|
150
130
|
|
|
151
131
|
this.accessToken = param.accessToken
|
|
152
|
-
|
|
153
|
-
this.basePathBeta = param.baseurl + `/beta`
|
|
154
|
-
this.basePathV3 = param.baseurl + `/v3`
|
|
155
|
-
this.basePathV2 = param.baseurl + `/v2`
|
|
156
|
-
this.basePathCC = param.baseurl
|
|
132
|
+
this.basePath = param.baseurl
|
|
157
133
|
this.tokenUrl = param.tokenUrl
|
|
158
134
|
this.clientId = param.clientId;
|
|
159
135
|
this.clientSecret = param.clientSecret;
|
|
160
|
-
const url = `${this.tokenUrl}
|
|
136
|
+
const url = `${this.tokenUrl}`;
|
|
137
|
+
const formData = new FormData()
|
|
138
|
+
formData .append('grant_type', 'client_credentials')
|
|
139
|
+
formData .append('client_id', this.clientId)
|
|
140
|
+
formData .append('client_secret', this.clientSecret)
|
|
141
|
+
|
|
161
142
|
if (!this.accessToken) {
|
|
162
|
-
this.accessToken = this.getAccessToken(url);
|
|
143
|
+
this.accessToken = this.getAccessToken(url, formData);
|
|
163
144
|
}
|
|
164
145
|
|
|
165
146
|
}
|
|
@@ -227,9 +208,9 @@ export class Configuration {
|
|
|
227
208
|
|
|
228
209
|
}
|
|
229
210
|
|
|
230
|
-
private async getAccessToken(url: string): Promise<string> {
|
|
211
|
+
private async getAccessToken(url: string, formData: FormData): Promise<string> {
|
|
231
212
|
try {
|
|
232
|
-
const {data, status} = await axios.post(url)
|
|
213
|
+
const {data, status} = await axios.post(url, formData )
|
|
233
214
|
if (status === 200) {
|
|
234
215
|
return data.access_token;
|
|
235
216
|
} else {
|