sailpoint-api-client 1.4.13 → 1.4.15

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 (80) hide show
  1. package/beta/.openapi-generator/VERSION +1 -1
  2. package/beta/README.md +5 -4
  3. package/beta/api.ts +7533 -7494
  4. package/beta/base.ts +19 -4
  5. package/beta/common.ts +30 -18
  6. package/beta/configuration.ts +9 -0
  7. package/beta/index.ts +1 -0
  8. package/beta/package.json +5 -6
  9. package/beta/tsconfig.json +1 -1
  10. package/configuration.ts +244 -206
  11. package/dist/beta/api.d.ts +4745 -6144
  12. package/dist/beta/api.js +8011 -6456
  13. package/dist/beta/api.js.map +1 -1
  14. package/dist/beta/base.d.ts +15 -4
  15. package/dist/beta/base.js +6 -3
  16. package/dist/beta/base.js.map +1 -1
  17. package/dist/beta/common.d.ts +3 -3
  18. package/dist/beta/common.js +26 -17
  19. package/dist/beta/common.js.map +1 -1
  20. package/dist/beta/configuration.d.ts +8 -0
  21. package/dist/beta/configuration.js +1 -0
  22. package/dist/beta/configuration.js.map +1 -1
  23. package/dist/beta/index.d.ts +1 -0
  24. package/dist/beta/index.js +1 -0
  25. package/dist/beta/index.js.map +1 -1
  26. package/dist/configuration.d.ts +14 -5
  27. package/dist/configuration.js +34 -21
  28. package/dist/configuration.js.map +1 -1
  29. package/dist/paginator.d.ts +2 -1
  30. package/dist/paginator.js.map +1 -1
  31. package/dist/v2024/api.d.ts +9441 -10079
  32. package/dist/v2024/api.js +14002 -10432
  33. package/dist/v2024/api.js.map +1 -1
  34. package/dist/v2024/base.d.ts +15 -4
  35. package/dist/v2024/base.js +6 -3
  36. package/dist/v2024/base.js.map +1 -1
  37. package/dist/v2024/common.d.ts +3 -3
  38. package/dist/v2024/common.js +26 -17
  39. package/dist/v2024/common.js.map +1 -1
  40. package/dist/v2024/configuration.d.ts +8 -0
  41. package/dist/v2024/configuration.js +1 -0
  42. package/dist/v2024/configuration.js.map +1 -1
  43. package/dist/v2024/index.d.ts +1 -0
  44. package/dist/v2024/index.js +1 -0
  45. package/dist/v2024/index.js.map +1 -1
  46. package/dist/v3/api.d.ts +4808 -5330
  47. package/dist/v3/api.js +4880 -3906
  48. package/dist/v3/api.js.map +1 -1
  49. package/dist/v3/base.d.ts +15 -4
  50. package/dist/v3/base.js +6 -3
  51. package/dist/v3/base.js.map +1 -1
  52. package/dist/v3/common.d.ts +3 -3
  53. package/dist/v3/common.js +26 -17
  54. package/dist/v3/common.js.map +1 -1
  55. package/dist/v3/configuration.d.ts +8 -0
  56. package/dist/v3/configuration.js +1 -0
  57. package/dist/v3/configuration.js.map +1 -1
  58. package/dist/v3/index.d.ts +1 -0
  59. package/dist/v3/index.js +1 -0
  60. package/dist/v3/index.js.map +1 -1
  61. package/package.json +4 -3
  62. package/paginator.ts +2 -1
  63. package/v2024/.openapi-generator/VERSION +1 -1
  64. package/v2024/README.md +5 -4
  65. package/v2024/api.ts +23095 -21387
  66. package/v2024/base.ts +19 -4
  67. package/v2024/common.ts +30 -18
  68. package/v2024/configuration.ts +9 -0
  69. package/v2024/index.ts +1 -0
  70. package/v2024/package.json +5 -6
  71. package/v2024/tsconfig.json +1 -1
  72. package/v3/.openapi-generator/VERSION +1 -1
  73. package/v3/README.md +5 -4
  74. package/v3/api.ts +6527 -6124
  75. package/v3/base.ts +19 -4
  76. package/v3/common.ts +30 -18
  77. package/v3/configuration.ts +9 -0
  78. package/v3/index.ts +1 -0
  79. package/v3/package.json +5 -6
  80. package/v3/tsconfig.json +1 -1
package/v2024/base.ts CHANGED
@@ -13,10 +13,11 @@
13
13
  */
14
14
 
15
15
 
16
- import { Configuration } from "../configuration";
16
+ import type { Configuration } from '../configuration';
17
17
  // Some imports not used depending on template conditions
18
18
  // @ts-ignore
19
- import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
19
+ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
20
+ import globalAxios from 'axios';
20
21
 
21
22
  export const BASE_PATH = "https://sailpoint.api.identitynow.com/v2024".replace(/\/+$/, "");
22
23
 
@@ -38,7 +39,7 @@ export const COLLECTION_FORMATS = {
38
39
  */
39
40
  export interface RequestArgs {
40
41
  url: string;
41
- axiosOptions: AxiosRequestConfig;
42
+ axiosOptions: RawAxiosRequestConfig;
42
43
  }
43
44
 
44
45
  /**
@@ -64,8 +65,22 @@ export class BaseAPI {
64
65
  * @extends {Error}
65
66
  */
66
67
  export class RequiredError extends Error {
67
- name: "RequiredError" = "RequiredError";
68
68
  constructor(public field: string, msg?: string) {
69
69
  super(msg);
70
+ this.name = "RequiredError"
70
71
  }
71
72
  }
73
+
74
+ interface ServerMap {
75
+ [key: string]: {
76
+ url: string,
77
+ description: string,
78
+ }[];
79
+ }
80
+
81
+ /**
82
+ *
83
+ * @export
84
+ */
85
+ export const operationServerMap: ServerMap = {
86
+ }
package/v2024/common.ts CHANGED
@@ -13,9 +13,10 @@
13
13
  */
14
14
 
15
15
 
16
- import { Configuration } from "../configuration";
17
- import { RequiredError, RequestArgs } from "./base";
18
- import { AxiosInstance, AxiosResponse } from 'axios';
16
+ import type { Configuration } from "../configuration";
17
+ import type { RequestArgs } from "./base";
18
+ import type { AxiosInstance, AxiosResponse } from 'axios';
19
+ import { RequiredError } from "./base";
19
20
  import axiosRetry from "axios-retry";
20
21
 
21
22
  /**
@@ -84,24 +85,35 @@ export const setOAuthToObject = async function (object: any, name: string, scope
84
85
  }
85
86
  }
86
87
 
88
+ function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void {
89
+ if (parameter == null) return;
90
+ if (typeof parameter === "object") {
91
+ if (Array.isArray(parameter)) {
92
+ (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
93
+ }
94
+ else {
95
+ Object.keys(parameter).forEach(currentKey =>
96
+ setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`)
97
+ );
98
+ }
99
+ }
100
+ else {
101
+ if (urlSearchParams.has(key)) {
102
+ urlSearchParams.append(key, parameter);
103
+ }
104
+ else {
105
+ urlSearchParams.set(key, parameter);
106
+ }
107
+ }
108
+ }
109
+
87
110
  /**
88
111
  *
89
112
  * @export
90
113
  */
91
114
  export const setSearchParams = function (url: URL, ...objects: any[]) {
92
115
  const searchParams = new URLSearchParams(url.search);
93
- for (const object of objects) {
94
- for (const key in object) {
95
- if (Array.isArray(object[key])) {
96
- searchParams.delete(key);
97
- for (const item of object[key]) {
98
- searchParams.append(key, item);
99
- }
100
- } else {
101
- searchParams.set(key, object[key]);
102
- }
103
- }
104
- }
116
+ setFlattenedQueryParams(searchParams, objects);
105
117
  url.search = searchParams.toString();
106
118
  }
107
119
 
@@ -133,11 +145,11 @@ export const toPathString = function (url: URL) {
133
145
  */
134
146
  export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) {
135
147
  return <T = unknown, R = AxiosResponse<T>>(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
136
- axiosRetry(globalAxios, configuration.retriesConfig)
148
+ axiosRetry(axios, configuration.retriesConfig)
137
149
  const headers = {
138
- ...{'User-Agent':'OpenAPI-Generator/1.4.13/ts'},
150
+ ...{'User-Agent':'OpenAPI-Generator/1.4.15/ts'},
139
151
  ...axiosArgs.axiosOptions.headers,
140
- ...{'X-SailPoint-SDK':'typescript-1.4.13'}
152
+ ...{'X-SailPoint-SDK':'typescript-1.4.15'}
141
153
  }
142
154
 
143
155
  if(!configuration.experimental && ("X-SailPoint-Experimental" in headers)) {
@@ -19,6 +19,7 @@ export interface ConfigurationParameters {
19
19
  password?: string;
20
20
  accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
21
21
  basePath?: string;
22
+ serverIndex?: number;
22
23
  baseOptions?: any;
23
24
  formDataCtor?: new () => any;
24
25
  }
@@ -58,6 +59,13 @@ export class Configuration {
58
59
  * @memberof Configuration
59
60
  */
60
61
  basePath?: string;
62
+ /**
63
+ * override server index
64
+ *
65
+ * @type {number}
66
+ * @memberof Configuration
67
+ */
68
+ serverIndex?: number;
61
69
  /**
62
70
  * base options for axios calls
63
71
  *
@@ -80,6 +88,7 @@ export class Configuration {
80
88
  this.password = param.password;
81
89
  this.accessToken = param.accessToken;
82
90
  this.basePath = param.basePath;
91
+ this.serverIndex = param.serverIndex;
83
92
  this.baseOptions = param.baseOptions;
84
93
  this.formDataCtor = param.formDataCtor;
85
94
  }
package/v2024/index.ts CHANGED
@@ -14,4 +14,5 @@
14
14
 
15
15
 
16
16
  export * from "./api";
17
+ export * from "../configuration";
17
18
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sailpoint-sdk",
3
- "version": "1.4.13",
3
+ "version": "1.4.15",
4
4
  "description": "OpenAPI client for sailpoint-sdk",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "repository": {
@@ -18,16 +18,15 @@
18
18
  "main": "./dist/index.js",
19
19
  "typings": "./dist/index.d.ts",
20
20
  "scripts": {
21
- "build": "tsc --outDir dist/",
21
+ "build": "tsc",
22
22
  "prepare": "npm run build"
23
23
  },
24
24
  "dependencies": {
25
- "axios": "^0.26.1",
26
- "axios-retry": "^3.4.0"
25
+ "axios": "^1.6.1"
27
26
  },
28
27
  "devDependencies": {
29
- "@types/node": "^12.11.5",
30
- "typescript": "^4.0"
28
+ "@types/node": "12.11.5 - 12.20.42",
29
+ "typescript": "^4.0 || ^5.0"
31
30
  },
32
31
  "publishConfig": {
33
32
  "registry": "sailpoint.com"
@@ -2,7 +2,7 @@
2
2
  "compilerOptions": {
3
3
  "declaration": true,
4
4
  "target": "ES5",
5
- "module": "CommonJS",
5
+ "module": "commonjs",
6
6
  "noImplicitAny": true,
7
7
  "outDir": "dist",
8
8
  "rootDir": ".",
@@ -1 +1 @@
1
- 6.0.1
1
+ 7.11.0
package/v3/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## sailpoint-sdk@1.4.13
1
+ ## sailpoint-sdk@1.4.15
2
2
 
3
3
  This generator creates TypeScript/JavaScript client that utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments:
4
4
 
@@ -15,7 +15,7 @@ Module system
15
15
  * CommonJS
16
16
  * ES6 module system
17
17
 
18
- It can be used in both TypeScript and JavaScript. In TypeScript, the definition should be automatically resolved via `package.json`. ([Reference](http://www.typescriptlang.org/docs/handbook/typings-for-npm-packages.html))
18
+ It can be used in both TypeScript and JavaScript. In TypeScript, the definition will be automatically resolved via `package.json`. ([Reference](https://www.typescriptlang.org/docs/handbook/declaration-files/consumption.html))
19
19
 
20
20
  ### Building
21
21
 
@@ -27,7 +27,7 @@ npm run build
27
27
 
28
28
  ### Publishing
29
29
 
30
- First build the package then run ```npm publish```
30
+ First build the package then run `npm publish`
31
31
 
32
32
  ### Consuming
33
33
 
@@ -36,10 +36,11 @@ navigate to the folder of your consuming project and run one of the following co
36
36
  _published:_
37
37
 
38
38
  ```
39
- npm install sailpoint-sdk@1.4.13 --save
39
+ npm install sailpoint-sdk@1.4.15 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
43
43
 
44
44
  ```
45
45
  npm install PATH_TO_GENERATED_PACKAGE --save
46
+ ```