@equisoft/account-service-sdk-typescript 4.5.1-snapshot.20230203171151 → 4.5.1-snapshot.20230207210529

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 (244) hide show
  1. package/.openapi-generator/FILES +1 -0
  2. package/.openapi-generator/VERSION +1 -1
  3. package/README.md +2 -2
  4. package/dist/apis/OAuthApi.d.ts +6 -6
  5. package/dist/apis/OAuthApi.js +1 -1
  6. package/dist/apis/OrganizationApi.d.ts +38 -38
  7. package/dist/apis/OrganizationApi.js +1 -1
  8. package/dist/apis/PermissionApi.d.ts +4 -4
  9. package/dist/apis/PermissionApi.js +1 -1
  10. package/dist/apis/RoleApi.d.ts +4 -4
  11. package/dist/apis/RoleApi.js +1 -1
  12. package/dist/apis/ServiceAccountApi.d.ts +18 -18
  13. package/dist/apis/ServiceAccountApi.js +1 -1
  14. package/dist/apis/SessionApi.d.ts +26 -26
  15. package/dist/apis/SessionApi.js +1 -1
  16. package/dist/apis/UserApi.d.ts +56 -44
  17. package/dist/apis/UserApi.js +41 -1
  18. package/dist/models/ApplyPermissionsPayload.d.ts +6 -2
  19. package/dist/models/ApplyPermissionsPayload.js +12 -2
  20. package/dist/models/AuthenticationUserAccount.d.ts +5 -1
  21. package/dist/models/AuthenticationUserAccount.js +15 -2
  22. package/dist/models/CreateOrUpdateOAuthClientPayload.d.ts +6 -2
  23. package/dist/models/CreateOrUpdateOAuthClientPayload.js +14 -2
  24. package/dist/models/CreateOrUpdateOrganizationPayload.d.ts +6 -2
  25. package/dist/models/CreateOrUpdateOrganizationPayload.js +13 -2
  26. package/dist/models/CreateOrUpdatePermissionPayload.d.ts +6 -2
  27. package/dist/models/CreateOrUpdatePermissionPayload.js +11 -2
  28. package/dist/models/CreateOrganizationPayload.d.ts +6 -2
  29. package/dist/models/CreateOrganizationPayload.js +13 -2
  30. package/dist/models/CreateOrganizationUserServiceOptionPayload.d.ts +5 -1
  31. package/dist/models/CreateOrganizationUserServiceOptionPayload.js +11 -2
  32. package/dist/models/CreateOrganizationUserServicePayload.d.ts +5 -1
  33. package/dist/models/CreateOrganizationUserServicePayload.js +10 -2
  34. package/dist/models/CreateRole.d.ts +6 -2
  35. package/dist/models/CreateRole.js +12 -2
  36. package/dist/models/DatabaseState.d.ts +2 -1
  37. package/dist/models/DatabaseState.js +3 -2
  38. package/dist/models/EnableEquisoftConnectPayloadSchema.d.ts +5 -1
  39. package/dist/models/EnableEquisoftConnectPayloadSchema.js +10 -2
  40. package/dist/models/ErrorMessage.d.ts +2 -1
  41. package/dist/models/ErrorMessage.js +3 -2
  42. package/dist/models/ErrorPayload.d.ts +6 -2
  43. package/dist/models/ErrorPayload.js +11 -2
  44. package/dist/models/Id.d.ts +5 -1
  45. package/dist/models/Id.js +12 -2
  46. package/dist/models/ImpersonatePayload.d.ts +5 -1
  47. package/dist/models/ImpersonatePayload.js +11 -2
  48. package/dist/models/LegacyRoleSchema.d.ts +6 -2
  49. package/dist/models/LegacyRoleSchema.js +12 -2
  50. package/dist/models/ListOrganizationElement.d.ts +8 -4
  51. package/dist/models/ListOrganizationElement.js +14 -2
  52. package/dist/models/ListUserOrganizations.d.ts +6 -2
  53. package/dist/models/ListUserOrganizations.js +11 -2
  54. package/dist/models/LocalizedString.d.ts +5 -1
  55. package/dist/models/LocalizedString.js +12 -2
  56. package/dist/models/LoginPayload.d.ts +5 -1
  57. package/dist/models/LoginPayload.js +12 -2
  58. package/dist/models/OAuthClient.d.ts +6 -2
  59. package/dist/models/OAuthClient.js +20 -2
  60. package/dist/models/OAuthClientCreated.d.ts +5 -1
  61. package/dist/models/OAuthClientCreated.js +11 -2
  62. package/dist/models/OAuthClientPublicKey.d.ts +5 -1
  63. package/dist/models/OAuthClientPublicKey.js +12 -2
  64. package/dist/models/Organization.d.ts +8 -4
  65. package/dist/models/Organization.js +16 -2
  66. package/dist/models/OrganizationCreated.d.ts +5 -1
  67. package/dist/models/OrganizationCreated.js +11 -2
  68. package/dist/models/OrganizationPathElement.d.ts +6 -2
  69. package/dist/models/OrganizationPathElement.js +12 -2
  70. package/dist/models/OrganizationRoleAttribution.d.ts +7 -3
  71. package/dist/models/OrganizationRoleAttribution.js +12 -2
  72. package/dist/models/OrganizationRoleAttributionPermission.d.ts +6 -2
  73. package/dist/models/OrganizationRoleAttributionPermission.js +12 -2
  74. package/dist/models/OrganizationRoleAttributionRole.d.ts +7 -3
  75. package/dist/models/OrganizationRoleAttributionRole.js +13 -2
  76. package/dist/models/OrganizationRoleAttributions.d.ts +6 -2
  77. package/dist/models/OrganizationRoleAttributions.js +11 -2
  78. package/dist/models/OrganizationServicesElement.d.ts +5 -1
  79. package/dist/models/OrganizationServicesElement.js +11 -2
  80. package/dist/models/OrganizationSsoProvider.d.ts +6 -2
  81. package/dist/models/OrganizationSsoProvider.js +12 -2
  82. package/dist/models/OrganizationUserServiceAssociation.d.ts +5 -1
  83. package/dist/models/OrganizationUserServiceAssociation.js +12 -2
  84. package/dist/models/PermissionCode.d.ts +5 -1
  85. package/dist/models/PermissionCode.js +11 -2
  86. package/dist/models/PermissionCreated.d.ts +5 -1
  87. package/dist/models/PermissionCreated.js +11 -2
  88. package/dist/models/PermissionList.d.ts +6 -2
  89. package/dist/models/PermissionList.js +11 -2
  90. package/dist/models/PermissionResourceType.d.ts +2 -1
  91. package/dist/models/PermissionResourceType.js +3 -2
  92. package/dist/models/Role.d.ts +6 -2
  93. package/dist/models/Role.js +13 -2
  94. package/dist/models/RoleCreated.d.ts +6 -2
  95. package/dist/models/RoleCreated.js +13 -2
  96. package/dist/models/RolesOnOrganization.d.ts +9 -5
  97. package/dist/models/RolesOnOrganization.js +15 -2
  98. package/dist/models/SendResetPasswordLinkPayload.d.ts +5 -1
  99. package/dist/models/SendResetPasswordLinkPayload.js +12 -2
  100. package/dist/models/ServiceAccess.d.ts +7 -3
  101. package/dist/models/ServiceAccess.js +11 -2
  102. package/dist/models/ServiceAccountCreationSchema.d.ts +5 -1
  103. package/dist/models/ServiceAccountCreationSchema.js +13 -2
  104. package/dist/models/ServiceAccountSchema.d.ts +6 -2
  105. package/dist/models/ServiceAccountSchema.js +16 -2
  106. package/dist/models/ServiceAccountStatus.d.ts +2 -1
  107. package/dist/models/ServiceAccountStatus.js +3 -2
  108. package/dist/models/ServiceAccountUpdateSchema.d.ts +5 -1
  109. package/dist/models/ServiceAccountUpdateSchema.js +10 -2
  110. package/dist/models/ServiceAccountUuidSchema.d.ts +5 -1
  111. package/dist/models/ServiceAccountUuidSchema.js +11 -2
  112. package/dist/models/ServiceName.d.ts +2 -1
  113. package/dist/models/ServiceName.js +3 -2
  114. package/dist/models/Session.d.ts +8 -4
  115. package/dist/models/Session.js +18 -2
  116. package/dist/models/SessionPayload.d.ts +6 -2
  117. package/dist/models/SessionPayload.js +12 -2
  118. package/dist/models/SessionState.d.ts +2 -1
  119. package/dist/models/SessionState.js +3 -2
  120. package/dist/models/SetPasswordByConfirmationHashPayload.d.ts +31 -0
  121. package/dist/models/SetPasswordByConfirmationHashPayload.js +50 -0
  122. package/dist/models/SetUserAccountPasswordPayload.d.ts +5 -1
  123. package/dist/models/SetUserAccountPasswordPayload.js +12 -2
  124. package/dist/models/SsoProvider.d.ts +5 -1
  125. package/dist/models/SsoProvider.js +12 -2
  126. package/dist/models/SsoToken.d.ts +5 -1
  127. package/dist/models/SsoToken.js +12 -2
  128. package/dist/models/UpdateParentOrganizationPayload.d.ts +5 -1
  129. package/dist/models/UpdateParentOrganizationPayload.js +11 -2
  130. package/dist/models/UpdateUserAccountPayload.d.ts +5 -1
  131. package/dist/models/UpdateUserAccountPayload.js +12 -2
  132. package/dist/models/UpdateUserAccountSsoPayload.d.ts +5 -1
  133. package/dist/models/UpdateUserAccountSsoPayload.js +11 -2
  134. package/dist/models/UpsertServicePayload.d.ts +5 -1
  135. package/dist/models/UpsertServicePayload.js +10 -2
  136. package/dist/models/User.d.ts +10 -6
  137. package/dist/models/User.js +27 -2
  138. package/dist/models/UserAccountOrganizationRoles.d.ts +7 -3
  139. package/dist/models/UserAccountOrganizationRoles.js +13 -2
  140. package/dist/models/UserAccountPermission.d.ts +6 -2
  141. package/dist/models/UserAccountPermission.js +12 -2
  142. package/dist/models/UserAccountRole.d.ts +6 -2
  143. package/dist/models/UserAccountRole.js +12 -2
  144. package/dist/models/UserAccountRoleAttributions.d.ts +6 -2
  145. package/dist/models/UserAccountRoleAttributions.js +11 -2
  146. package/dist/models/UserAccountSearchResult.d.ts +10 -6
  147. package/dist/models/UserAccountSearchResult.js +27 -2
  148. package/dist/models/UserAgreement.d.ts +6 -2
  149. package/dist/models/UserAgreement.js +11 -2
  150. package/dist/models/UserAgreementState.d.ts +2 -1
  151. package/dist/models/UserAgreementState.js +3 -2
  152. package/dist/models/UserPermissions.d.ts +7 -3
  153. package/dist/models/UserPermissions.js +12 -2
  154. package/dist/models/UserServiceAssociation.d.ts +5 -1
  155. package/dist/models/UserServiceAssociation.js +12 -2
  156. package/dist/models/UserSsoProvider.d.ts +5 -1
  157. package/dist/models/UserSsoProvider.js +11 -2
  158. package/dist/models/UserState.d.ts +2 -1
  159. package/dist/models/UserState.js +3 -2
  160. package/dist/models/index.d.ts +1 -0
  161. package/dist/models/index.js +1 -0
  162. package/dist/runtime.d.ts +16 -3
  163. package/dist/runtime.js +30 -3
  164. package/package.json +1 -1
  165. package/src/apis/OAuthApi.ts +11 -9
  166. package/src/apis/OrganizationApi.ts +55 -53
  167. package/src/apis/PermissionApi.ts +8 -6
  168. package/src/apis/RoleApi.ts +7 -5
  169. package/src/apis/ServiceAccountApi.ts +27 -25
  170. package/src/apis/SessionApi.ts +33 -31
  171. package/src/apis/UserApi.ts +114 -58
  172. package/src/models/ApplyPermissionsPayload.ts +13 -2
  173. package/src/models/AuthenticationUserAccount.ts +15 -1
  174. package/src/models/CreateOrUpdateOAuthClientPayload.ts +15 -2
  175. package/src/models/CreateOrUpdateOrganizationPayload.ts +14 -2
  176. package/src/models/CreateOrUpdatePermissionPayload.ts +12 -2
  177. package/src/models/CreateOrganizationPayload.ts +14 -2
  178. package/src/models/CreateOrganizationUserServiceOptionPayload.ts +11 -1
  179. package/src/models/CreateOrganizationUserServicePayload.ts +10 -1
  180. package/src/models/CreateRole.ts +13 -2
  181. package/src/models/DatabaseState.ts +3 -2
  182. package/src/models/EnableEquisoftConnectPayloadSchema.ts +10 -1
  183. package/src/models/ErrorMessage.ts +3 -2
  184. package/src/models/ErrorPayload.ts +12 -2
  185. package/src/models/Id.ts +12 -1
  186. package/src/models/ImpersonatePayload.ts +11 -1
  187. package/src/models/LegacyRoleSchema.ts +13 -2
  188. package/src/models/ListOrganizationElement.ts +17 -4
  189. package/src/models/ListUserOrganizations.ts +12 -2
  190. package/src/models/LocalizedString.ts +12 -1
  191. package/src/models/LoginPayload.ts +12 -1
  192. package/src/models/OAuthClient.ts +21 -2
  193. package/src/models/OAuthClientCreated.ts +11 -1
  194. package/src/models/OAuthClientPublicKey.ts +12 -1
  195. package/src/models/Organization.ts +19 -4
  196. package/src/models/OrganizationCreated.ts +11 -1
  197. package/src/models/OrganizationPathElement.ts +13 -2
  198. package/src/models/OrganizationRoleAttribution.ts +14 -3
  199. package/src/models/OrganizationRoleAttributionPermission.ts +13 -2
  200. package/src/models/OrganizationRoleAttributionRole.ts +15 -3
  201. package/src/models/OrganizationRoleAttributions.ts +12 -2
  202. package/src/models/OrganizationServicesElement.ts +11 -1
  203. package/src/models/OrganizationSsoProvider.ts +13 -2
  204. package/src/models/OrganizationUserServiceAssociation.ts +12 -1
  205. package/src/models/PermissionCode.ts +11 -1
  206. package/src/models/PermissionCreated.ts +11 -1
  207. package/src/models/PermissionList.ts +12 -2
  208. package/src/models/PermissionResourceType.ts +3 -2
  209. package/src/models/Role.ts +14 -2
  210. package/src/models/RoleCreated.ts +14 -2
  211. package/src/models/RolesOnOrganization.ts +19 -5
  212. package/src/models/SendResetPasswordLinkPayload.ts +12 -1
  213. package/src/models/ServiceAccess.ts +13 -3
  214. package/src/models/ServiceAccountCreationSchema.ts +13 -1
  215. package/src/models/ServiceAccountSchema.ts +17 -2
  216. package/src/models/ServiceAccountStatus.ts +3 -2
  217. package/src/models/ServiceAccountUpdateSchema.ts +10 -1
  218. package/src/models/ServiceAccountUuidSchema.ts +11 -1
  219. package/src/models/ServiceName.ts +3 -2
  220. package/src/models/Session.ts +21 -4
  221. package/src/models/SessionPayload.ts +13 -2
  222. package/src/models/SessionState.ts +3 -2
  223. package/src/models/SetPasswordByConfirmationHashPayload.ts +66 -0
  224. package/src/models/SetUserAccountPasswordPayload.ts +12 -1
  225. package/src/models/SsoProvider.ts +12 -1
  226. package/src/models/SsoToken.ts +12 -1
  227. package/src/models/UpdateParentOrganizationPayload.ts +11 -1
  228. package/src/models/UpdateUserAccountPayload.ts +12 -1
  229. package/src/models/UpdateUserAccountSsoPayload.ts +11 -1
  230. package/src/models/UpsertServicePayload.ts +10 -1
  231. package/src/models/User.ts +32 -6
  232. package/src/models/UserAccountOrganizationRoles.ts +15 -3
  233. package/src/models/UserAccountPermission.ts +13 -2
  234. package/src/models/UserAccountRole.ts +13 -2
  235. package/src/models/UserAccountRoleAttributions.ts +12 -2
  236. package/src/models/UserAccountSearchResult.ts +32 -6
  237. package/src/models/UserAgreement.ts +12 -2
  238. package/src/models/UserAgreementState.ts +3 -2
  239. package/src/models/UserPermissions.ts +14 -3
  240. package/src/models/UserServiceAssociation.ts +12 -1
  241. package/src/models/UserSsoProvider.ts +11 -1
  242. package/src/models/UserState.ts +3 -2
  243. package/src/models/index.ts +1 -0
  244. package/src/runtime.ts +40 -6
@@ -4,7 +4,7 @@
4
4
  * User account and session management
5
5
  * Provides HTTP endpoints to manage User Accounts and User Sessions.
6
6
  *
7
- * The version of the OpenAPI document: 4.5.0
7
+ * The version of the OpenAPI document: 4.5.1-SNAPSHOT
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -13,8 +13,8 @@
13
13
  */
14
14
 
15
15
  import { exists, mapValues } from '../runtime';
16
+ import type { UserAccountOrganizationRoles } from './UserAccountOrganizationRoles';
16
17
  import {
17
- UserAccountOrganizationRoles,
18
18
  UserAccountOrganizationRolesFromJSON,
19
19
  UserAccountOrganizationRolesFromJSONTyped,
20
20
  UserAccountOrganizationRolesToJSON,
@@ -34,6 +34,16 @@ export interface UserAccountRoleAttributions {
34
34
  organizations: Array<UserAccountOrganizationRoles>;
35
35
  }
36
36
 
37
+ /**
38
+ * Check if a given object implements the UserAccountRoleAttributions interface.
39
+ */
40
+ export function instanceOfUserAccountRoleAttributions(value: object): boolean {
41
+ let isInstance = true;
42
+ isInstance = isInstance && "organizations" in value;
43
+
44
+ return isInstance;
45
+ }
46
+
37
47
  export function UserAccountRoleAttributionsFromJSON(json: any): UserAccountRoleAttributions {
38
48
  return UserAccountRoleAttributionsFromJSONTyped(json, false);
39
49
  }
@@ -4,7 +4,7 @@
4
4
  * User account and session management
5
5
  * Provides HTTP endpoints to manage User Accounts and User Sessions.
6
6
  *
7
- * The version of the OpenAPI document: 4.5.0
7
+ * The version of the OpenAPI document: 4.5.1-SNAPSHOT
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -13,32 +13,32 @@
13
13
  */
14
14
 
15
15
  import { exists, mapValues } from '../runtime';
16
+ import type { ServiceAccess } from './ServiceAccess';
16
17
  import {
17
- ServiceAccess,
18
18
  ServiceAccessFromJSON,
19
19
  ServiceAccessFromJSONTyped,
20
20
  ServiceAccessToJSON,
21
21
  } from './ServiceAccess';
22
+ import type { UserAgreement } from './UserAgreement';
22
23
  import {
23
- UserAgreement,
24
24
  UserAgreementFromJSON,
25
25
  UserAgreementFromJSONTyped,
26
26
  UserAgreementToJSON,
27
27
  } from './UserAgreement';
28
+ import type { UserServiceAssociation } from './UserServiceAssociation';
28
29
  import {
29
- UserServiceAssociation,
30
30
  UserServiceAssociationFromJSON,
31
31
  UserServiceAssociationFromJSONTyped,
32
32
  UserServiceAssociationToJSON,
33
33
  } from './UserServiceAssociation';
34
+ import type { UserSsoProvider } from './UserSsoProvider';
34
35
  import {
35
- UserSsoProvider,
36
36
  UserSsoProviderFromJSON,
37
37
  UserSsoProviderFromJSONTyped,
38
38
  UserSsoProviderToJSON,
39
39
  } from './UserSsoProvider';
40
+ import type { UserState } from './UserState';
40
41
  import {
41
- UserState,
42
42
  UserStateFromJSON,
43
43
  UserStateFromJSONTyped,
44
44
  UserStateToJSON,
@@ -190,6 +190,32 @@ export interface UserAccountSearchResult {
190
190
  ssoIdentifier?: string | null;
191
191
  }
192
192
 
193
+ /**
194
+ * Check if a given object implements the UserAccountSearchResult interface.
195
+ */
196
+ export function instanceOfUserAccountSearchResult(value: object): boolean {
197
+ let isInstance = true;
198
+ isInstance = isInstance && "id" in value;
199
+ isInstance = isInstance && "uuid" in value;
200
+ isInstance = isInstance && "displayName" in value;
201
+ isInstance = isInstance && "sortName" in value;
202
+ isInstance = isInstance && "givenName" in value;
203
+ isInstance = isInstance && "familyName" in value;
204
+ isInstance = isInstance && "email" in value;
205
+ isInstance = isInstance && "locale" in value;
206
+ isInstance = isInstance && "state" in value;
207
+ isInstance = isInstance && "locked" in value;
208
+ isInstance = isInstance && "deletable" in value;
209
+ isInstance = isInstance && "billable" in value;
210
+ isInstance = isInstance && "agreement" in value;
211
+ isInstance = isInstance && "services" in value;
212
+ isInstance = isInstance && "servicesUsers" in value;
213
+ isInstance = isInstance && "legacyServices" in value;
214
+ isInstance = isInstance && "authType" in value;
215
+
216
+ return isInstance;
217
+ }
218
+
193
219
  export function UserAccountSearchResultFromJSON(json: any): UserAccountSearchResult {
194
220
  return UserAccountSearchResultFromJSONTyped(json, false);
195
221
  }
@@ -4,7 +4,7 @@
4
4
  * User account and session management
5
5
  * Provides HTTP endpoints to manage User Accounts and User Sessions.
6
6
  *
7
- * The version of the OpenAPI document: 4.5.0
7
+ * The version of the OpenAPI document: 4.5.1-SNAPSHOT
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -13,8 +13,8 @@
13
13
  */
14
14
 
15
15
  import { exists, mapValues } from '../runtime';
16
+ import type { UserAgreementState } from './UserAgreementState';
16
17
  import {
17
- UserAgreementState,
18
18
  UserAgreementStateFromJSON,
19
19
  UserAgreementStateFromJSONTyped,
20
20
  UserAgreementStateToJSON,
@@ -34,6 +34,16 @@ export interface UserAgreement {
34
34
  state: UserAgreementState;
35
35
  }
36
36
 
37
+ /**
38
+ * Check if a given object implements the UserAgreement interface.
39
+ */
40
+ export function instanceOfUserAgreement(value: object): boolean {
41
+ let isInstance = true;
42
+ isInstance = isInstance && "state" in value;
43
+
44
+ return isInstance;
45
+ }
46
+
37
47
  export function UserAgreementFromJSON(json: any): UserAgreement {
38
48
  return UserAgreementFromJSONTyped(json, false);
39
49
  }
@@ -4,7 +4,7 @@
4
4
  * User account and session management
5
5
  * Provides HTTP endpoints to manage User Accounts and User Sessions.
6
6
  *
7
- * The version of the OpenAPI document: 4.5.0
7
+ * The version of the OpenAPI document: 4.5.1-SNAPSHOT
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -21,7 +21,8 @@
21
21
  */
22
22
  export const UserAgreementState = {
23
23
  ACCEPTED: 'ACCEPTED',
24
- REQUESTED: 'REQUESTED'
24
+ REQUESTED: 'REQUESTED',
25
+ unknown_default_open_api: '11184809'
25
26
  } as const;
26
27
  export type UserAgreementState = typeof UserAgreementState[keyof typeof UserAgreementState];
27
28
 
@@ -4,7 +4,7 @@
4
4
  * User account and session management
5
5
  * Provides HTTP endpoints to manage User Accounts and User Sessions.
6
6
  *
7
- * The version of the OpenAPI document: 4.5.0
7
+ * The version of the OpenAPI document: 4.5.1-SNAPSHOT
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -13,14 +13,14 @@
13
13
  */
14
14
 
15
15
  import { exists, mapValues } from '../runtime';
16
+ import type { LegacyRoleSchema } from './LegacyRoleSchema';
16
17
  import {
17
- LegacyRoleSchema,
18
18
  LegacyRoleSchemaFromJSON,
19
19
  LegacyRoleSchemaFromJSONTyped,
20
20
  LegacyRoleSchemaToJSON,
21
21
  } from './LegacyRoleSchema';
22
+ import type { RolesOnOrganization } from './RolesOnOrganization';
22
23
  import {
23
- RolesOnOrganization,
24
24
  RolesOnOrganizationFromJSON,
25
25
  RolesOnOrganizationFromJSONTyped,
26
26
  RolesOnOrganizationToJSON,
@@ -46,6 +46,17 @@ export interface UserPermissions {
46
46
  legacyRoles: Array<LegacyRoleSchema>;
47
47
  }
48
48
 
49
+ /**
50
+ * Check if a given object implements the UserPermissions interface.
51
+ */
52
+ export function instanceOfUserPermissions(value: object): boolean {
53
+ let isInstance = true;
54
+ isInstance = isInstance && "organizations" in value;
55
+ isInstance = isInstance && "legacyRoles" in value;
56
+
57
+ return isInstance;
58
+ }
59
+
49
60
  export function UserPermissionsFromJSON(json: any): UserPermissions {
50
61
  return UserPermissionsFromJSONTyped(json, false);
51
62
  }
@@ -4,7 +4,7 @@
4
4
  * User account and session management
5
5
  * Provides HTTP endpoints to manage User Accounts and User Sessions.
6
6
  *
7
- * The version of the OpenAPI document: 4.5.0
7
+ * The version of the OpenAPI document: 4.5.1-SNAPSHOT
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -45,6 +45,17 @@ export interface UserServiceAssociation {
45
45
  options?: { [key: string]: string; } | null;
46
46
  }
47
47
 
48
+ /**
49
+ * Check if a given object implements the UserServiceAssociation interface.
50
+ */
51
+ export function instanceOfUserServiceAssociation(value: object): boolean {
52
+ let isInstance = true;
53
+ isInstance = isInstance && "organizationUuid" in value;
54
+ isInstance = isInstance && "code" in value;
55
+
56
+ return isInstance;
57
+ }
58
+
48
59
  export function UserServiceAssociationFromJSON(json: any): UserServiceAssociation {
49
60
  return UserServiceAssociationFromJSONTyped(json, false);
50
61
  }
@@ -4,7 +4,7 @@
4
4
  * User account and session management
5
5
  * Provides HTTP endpoints to manage User Accounts and User Sessions.
6
6
  *
7
- * The version of the OpenAPI document: 4.5.0
7
+ * The version of the OpenAPI document: 4.5.1-SNAPSHOT
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -27,6 +27,16 @@ export interface UserSsoProvider {
27
27
  code: string;
28
28
  }
29
29
 
30
+ /**
31
+ * Check if a given object implements the UserSsoProvider interface.
32
+ */
33
+ export function instanceOfUserSsoProvider(value: object): boolean {
34
+ let isInstance = true;
35
+ isInstance = isInstance && "code" in value;
36
+
37
+ return isInstance;
38
+ }
39
+
30
40
  export function UserSsoProviderFromJSON(json: any): UserSsoProvider {
31
41
  return UserSsoProviderFromJSONTyped(json, false);
32
42
  }
@@ -4,7 +4,7 @@
4
4
  * User account and session management
5
5
  * Provides HTTP endpoints to manage User Accounts and User Sessions.
6
6
  *
7
- * The version of the OpenAPI document: 4.5.0
7
+ * The version of the OpenAPI document: 4.5.1-SNAPSHOT
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -23,7 +23,8 @@
23
23
  export const UserState = {
24
24
  DELETED: 'DELETED',
25
25
  DISABLED: 'DISABLED',
26
- ENABLED: 'ENABLED'
26
+ ENABLED: 'ENABLED',
27
+ unknown_default_open_api: '11184809'
27
28
  } as const;
28
29
  export type UserState = typeof UserState[keyof typeof UserState];
29
30
 
@@ -51,6 +51,7 @@ export * from './ServiceName';
51
51
  export * from './Session';
52
52
  export * from './SessionPayload';
53
53
  export * from './SessionState';
54
+ export * from './SetPasswordByConfirmationHashPayload';
54
55
  export * from './SetUserAccountPasswordPayload';
55
56
  export * from './SsoProvider';
56
57
  export * from './SsoToken';
package/src/runtime.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * User account and session management
5
5
  * Provides HTTP endpoints to manage User Accounts and User Sessions.
6
6
  *
7
- * The version of the OpenAPI document: 4.5.0
7
+ * The version of the OpenAPI document: 4.5.1-SNAPSHOT
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -113,7 +113,7 @@ export class BaseAPI {
113
113
  return this.withMiddleware<T>(...middlewares);
114
114
  }
115
115
 
116
- protected async request(context: RequestOpts, initOverrides?: RequestInit | InitOverideFunction): Promise<Response> {
116
+ protected async request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise<Response> {
117
117
  const { url, init } = await this.createFetchParams(context, initOverrides);
118
118
  const response = await this.fetchApi(url, init);
119
119
  if (response.status >= 200 && response.status < 300) {
@@ -122,7 +122,7 @@ export class BaseAPI {
122
122
  throw new ResponseError(response, 'Response returned an error code');
123
123
  }
124
124
 
125
- private async createFetchParams(context: RequestOpts, initOverrides?: RequestInit | InitOverideFunction) {
125
+ private async createFetchParams(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction) {
126
126
  let url = this.configuration.basePath + context.path;
127
127
  if (context.query !== undefined && Object.keys(context.query).length !== 0) {
128
128
  // only add the querystring to the URL if there are query parameters.
@@ -177,7 +177,25 @@ export class BaseAPI {
177
177
  }) || fetchParams;
178
178
  }
179
179
  }
180
- let response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init);
180
+ let response = undefined;
181
+ try {
182
+ response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init);
183
+ } catch (e) {
184
+ for (const middleware of this.middleware) {
185
+ if (middleware.onError) {
186
+ response = await middleware.onError({
187
+ fetch: this.fetchApi,
188
+ url: fetchParams.url,
189
+ init: fetchParams.init,
190
+ error: e,
191
+ response: response ? response.clone() : undefined,
192
+ }) || response;
193
+ }
194
+ }
195
+ if (response !== undefined) {
196
+ throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response');
197
+ }
198
+ }
181
199
  for (const middleware of this.middleware) {
182
200
  if (middleware.post) {
183
201
  response = await middleware.post({
@@ -218,6 +236,13 @@ export class ResponseError extends Error {
218
236
  }
219
237
  }
220
238
 
239
+ export class FetchError extends Error {
240
+ name: "FetchError" = "FetchError";
241
+ constructor(public cause: unknown, msg?: string) {
242
+ super(msg);
243
+ }
244
+ }
245
+
221
246
  export class RequiredError extends Error {
222
247
  name: "RequiredError" = "RequiredError";
223
248
  constructor(public field: string, msg?: string) {
@@ -242,7 +267,7 @@ export type HTTPBody = Json | FormData | URLSearchParams;
242
267
  export type HTTPRequestInit = { headers?: HTTPHeaders; method: HTTPMethod; credentials?: RequestCredentials; body?: HTTPBody }
243
268
  export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original';
244
269
 
245
- export type InitOverideFunction = (requestContext: { init: HTTPRequestInit, context: RequestOpts }) => Promise<RequestInit>
270
+ export type InitOverrideFunction = (requestContext: { init: HTTPRequestInit, context: RequestOpts }) => Promise<RequestInit>
246
271
 
247
272
  export interface FetchParams {
248
273
  url: string;
@@ -269,7 +294,7 @@ export function querystring(params: HTTPQuery, prefix: string = ''): string {
269
294
  .join('&');
270
295
  }
271
296
 
272
- function querystringSingleKey(key: string, value: string | number | null | boolean | Array<string | number | null | boolean> | Set<string | number | null | boolean> | HTTPQuery, keyPrefix: string = ''): string {
297
+ function querystringSingleKey(key: string, value: string | number | null | undefined | boolean | Array<string | number | null | boolean> | Set<string | number | null | boolean> | HTTPQuery, keyPrefix: string = ''): string {
273
298
  const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key);
274
299
  if (value instanceof Array) {
275
300
  const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue)))
@@ -322,9 +347,18 @@ export interface ResponseContext {
322
347
  response: Response;
323
348
  }
324
349
 
350
+ export interface ErrorContext {
351
+ fetch: FetchAPI;
352
+ url: string;
353
+ init: RequestInit;
354
+ error: unknown;
355
+ response?: Response;
356
+ }
357
+
325
358
  export interface Middleware {
326
359
  pre?(context: RequestContext): Promise<FetchParams | void>;
327
360
  post?(context: ResponseContext): Promise<Response | void>;
361
+ onError?(context: ErrorContext): Promise<Response | void>;
328
362
  }
329
363
 
330
364
  export interface ApiResponse<T> {