@emilgroup/tenant-sdk 1.0.1 → 1.1.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.
Files changed (223) hide show
  1. package/.openapi-generator/FILES +14 -57
  2. package/README.md +2 -2
  3. package/api/custom-schema-api.ts +52 -60
  4. package/api/data-report-api.ts +65 -75
  5. package/api/data-report-executor-api.ts +10 -26
  6. package/api/{user-subscription-api.ts → invite-organizations-api.ts} +139 -161
  7. package/api/invite-users-api.ts +75 -79
  8. package/api/organizations-api.ts +455 -0
  9. package/api/users-api.ts +138 -148
  10. package/api.ts +4 -14
  11. package/dist/api/custom-schema-api.d.ts +42 -42
  12. package/dist/api/custom-schema-api.js +31 -38
  13. package/dist/api/data-report-api.d.ts +52 -52
  14. package/dist/api/data-report-api.js +40 -49
  15. package/dist/api/data-report-executor-api.d.ts +7 -16
  16. package/dist/api/data-report-executor-api.js +9 -17
  17. package/dist/api/{user-subscription-api.d.ts → invite-organizations-api.d.ts} +89 -103
  18. package/dist/api/{user-subscription-api.js → invite-organizations-api.js} +106 -114
  19. package/dist/api/invite-users-api.d.ts +63 -60
  20. package/dist/api/invite-users-api.js +40 -49
  21. package/dist/api/organizations-api.d.ts +261 -0
  22. package/dist/api/{settings-api.js → organizations-api.js} +135 -195
  23. package/dist/api/users-api.d.ts +113 -109
  24. package/dist/api/users-api.js +76 -93
  25. package/dist/api.d.ts +2 -7
  26. package/dist/api.js +2 -7
  27. package/dist/models/assign-user-roles-request-dto.d.ts +2 -2
  28. package/dist/models/{manage-subscription-request-dto.d.ts → batch-delete-response-class.d.ts} +5 -5
  29. package/dist/models/create-custom-schema-request-dto.d.ts +1 -0
  30. package/dist/models/create-custom-schema-request-dto.js +2 -1
  31. package/dist/models/{insurance-response-class.d.ts → delete-response-class.d.ts} +6 -6
  32. package/dist/models/{get-embedded-url-response-class.d.ts → disable-users-response-class.d.ts} +6 -6
  33. package/dist/models/{insurance-company-response-class.d.ts → enable-users-response-class.d.ts} +6 -6
  34. package/dist/models/{create-alert-response-class.d.ts → get-organization-response-class.d.ts} +7 -7
  35. package/dist/models/index.d.ts +12 -50
  36. package/dist/models/index.js +12 -50
  37. package/dist/models/invite-org-request-dto.d.ts +78 -0
  38. package/dist/models/invite-user-request-dto.d.ts +8 -2
  39. package/dist/models/invite-users-request-dto.d.ts +2 -2
  40. package/dist/models/invite-users-response-class.d.ts +24 -0
  41. package/dist/models/{list-user-subscriptions-response-class.d.ts → list-org-invitations-response-class.d.ts} +8 -8
  42. package/dist/models/{list-alert-history-response-class.d.ts → list-organizations-response-class.d.ts} +9 -9
  43. package/dist/models/org-invitation-class.d.ts +103 -0
  44. package/dist/models/{create-dashboard-response-class.d.ts → org-invitation-response-class.d.ts} +7 -7
  45. package/dist/models/organization-class.d.ts +84 -0
  46. package/dist/models/set-setting-request-dto.d.ts +10 -4
  47. package/dist/models/subscription-class.d.ts +9 -2
  48. package/dist/models/update-custom-schema-request-dto.d.ts +1 -0
  49. package/dist/models/update-custom-schema-request-dto.js +2 -1
  50. package/dist/models/user-class.d.ts +13 -5
  51. package/models/assign-user-roles-request-dto.ts +2 -2
  52. package/models/{manage-subscription-request-dto.ts → batch-delete-response-class.ts} +5 -5
  53. package/models/create-custom-schema-request-dto.ts +2 -1
  54. package/models/{insurance-response-class.ts → delete-response-class.ts} +6 -6
  55. package/models/{get-embedded-url-response-class.ts → disable-users-response-class.ts} +6 -6
  56. package/models/{insurance-company-response-class.ts → enable-users-response-class.ts} +6 -6
  57. package/models/{channel-response-class.ts → get-organization-response-class.ts} +7 -12
  58. package/models/index.ts +12 -50
  59. package/models/invite-org-request-dto.ts +84 -0
  60. package/models/invite-user-request-dto.ts +8 -2
  61. package/models/invite-users-request-dto.ts +2 -2
  62. package/models/invite-users-response-class.ts +30 -0
  63. package/models/{list-user-subscriptions-response-class.ts → list-org-invitations-response-class.ts} +8 -8
  64. package/models/{list-alert-history-response-class.ts → list-organizations-response-class.ts} +9 -9
  65. package/models/org-invitation-class.ts +109 -0
  66. package/models/{create-alert-response-class.ts → org-invitation-response-class.ts} +7 -7
  67. package/models/organization-class.ts +90 -0
  68. package/models/set-setting-request-dto.ts +10 -4
  69. package/models/subscription-class.ts +9 -2
  70. package/models/update-custom-schema-request-dto.ts +2 -1
  71. package/models/user-class.ts +13 -5
  72. package/package.json +1 -1
  73. package/api/alerts-api.ts +0 -860
  74. package/api/dashboard-api.ts +0 -792
  75. package/api/reports-api.ts +0 -860
  76. package/api/scenario-analysis-api.ts +0 -977
  77. package/api/settings-api.ts +0 -484
  78. package/api/tariff-comparisons-api.ts +0 -381
  79. package/dist/api/alerts-api.d.ts +0 -479
  80. package/dist/api/alerts-api.js +0 -752
  81. package/dist/api/dashboard-api.d.ts +0 -434
  82. package/dist/api/dashboard-api.js +0 -724
  83. package/dist/api/reports-api.d.ts +0 -479
  84. package/dist/api/reports-api.js +0 -752
  85. package/dist/api/scenario-analysis-api.d.ts +0 -529
  86. package/dist/api/scenario-analysis-api.js +0 -895
  87. package/dist/api/settings-api.d.ts +0 -264
  88. package/dist/api/tariff-comparisons-api.d.ts +0 -206
  89. package/dist/api/tariff-comparisons-api.js +0 -409
  90. package/dist/models/alert-class.d.ts +0 -90
  91. package/dist/models/alert-history-class.d.ts +0 -108
  92. package/dist/models/channel-response-class.d.ts +0 -30
  93. package/dist/models/compare-tariffs-request-dto.d.ts +0 -37
  94. package/dist/models/compare-tariffs-request-dto.js +0 -22
  95. package/dist/models/compare-tariffs-response-class.d.ts +0 -31
  96. package/dist/models/condition-dto.d.ts +0 -43
  97. package/dist/models/condition-dto.js +0 -22
  98. package/dist/models/create-alert-request-dto.d.ts +0 -79
  99. package/dist/models/create-alert-request-dto.js +0 -27
  100. package/dist/models/create-dashboard-request-dto.d.ts +0 -70
  101. package/dist/models/create-dashboard-request-dto.js +0 -29
  102. package/dist/models/create-report-request-dto.d.ts +0 -49
  103. package/dist/models/create-report-request-dto.js +0 -22
  104. package/dist/models/create-report-response-class.d.ts +0 -25
  105. package/dist/models/create-scenario-analysis-request-dto.d.ts +0 -74
  106. package/dist/models/create-scenario-analysis-request-dto.js +0 -22
  107. package/dist/models/create-scenario-analysis-response-class.d.ts +0 -25
  108. package/dist/models/dashboard-class.d.ts +0 -78
  109. package/dist/models/get-alert-response-class.d.ts +0 -25
  110. package/dist/models/get-dashboard-response-class.d.ts +0 -25
  111. package/dist/models/get-report-response-class.d.ts +0 -25
  112. package/dist/models/get-report-response-class.js +0 -15
  113. package/dist/models/get-scenario-analysis-response-class.d.ts +0 -25
  114. package/dist/models/get-scenario-analysis-response-class.js +0 -15
  115. package/dist/models/grouped-tariff-class.d.ts +0 -30
  116. package/dist/models/grouped-tariff-class.js +0 -15
  117. package/dist/models/insurance-company-response-class.js +0 -15
  118. package/dist/models/insurance-response-class.js +0 -15
  119. package/dist/models/list-alert-history-response-class.js +0 -15
  120. package/dist/models/list-alerts-response-class.d.ts +0 -31
  121. package/dist/models/list-alerts-response-class.js +0 -15
  122. package/dist/models/list-channels-response-class.d.ts +0 -25
  123. package/dist/models/list-channels-response-class.js +0 -15
  124. package/dist/models/list-dashboards-response-class.d.ts +0 -31
  125. package/dist/models/list-dashboards-response-class.js +0 -15
  126. package/dist/models/list-insurance-companies-response-class.d.ts +0 -25
  127. package/dist/models/list-insurance-companies-response-class.js +0 -15
  128. package/dist/models/list-report-history-response-class.d.ts +0 -31
  129. package/dist/models/list-report-history-response-class.js +0 -15
  130. package/dist/models/list-reports-response-class.d.ts +0 -31
  131. package/dist/models/list-reports-response-class.js +0 -15
  132. package/dist/models/list-scenario-analyses-response-class.d.ts +0 -31
  133. package/dist/models/list-scenario-analyses-response-class.js +0 -15
  134. package/dist/models/list-scenario-analysis-dates-response-class.d.ts +0 -25
  135. package/dist/models/list-scenario-analysis-dates-response-class.js +0 -15
  136. package/dist/models/list-tariff-insurance-companies-response-class.d.ts +0 -25
  137. package/dist/models/list-tariff-insurance-companies-response-class.js +0 -15
  138. package/dist/models/list-tariffs-response-class.d.ts +0 -25
  139. package/dist/models/list-tariffs-response-class.js +0 -15
  140. package/dist/models/list-user-subscriptions-response-class.js +0 -15
  141. package/dist/models/manage-subscription-request-dto.js +0 -15
  142. package/dist/models/manage-subscription-response-class.d.ts +0 -25
  143. package/dist/models/manage-subscription-response-class.js +0 -15
  144. package/dist/models/report-class.d.ts +0 -66
  145. package/dist/models/report-class.js +0 -15
  146. package/dist/models/report-history-class.d.ts +0 -48
  147. package/dist/models/report-history-class.js +0 -15
  148. package/dist/models/scenario-analysis-class.d.ts +0 -108
  149. package/dist/models/scenario-analysis-class.js +0 -15
  150. package/dist/models/scenario-analysis-date-response-class.d.ts +0 -36
  151. package/dist/models/scenario-analysis-date-response-class.js +0 -15
  152. package/dist/models/set-tenant-setting-response-class.d.ts +0 -36
  153. package/dist/models/set-tenant-setting-response-class.js +0 -15
  154. package/dist/models/update-alert-request-dto.d.ts +0 -72
  155. package/dist/models/update-alert-request-dto.js +0 -21
  156. package/dist/models/update-alert-response-class.d.ts +0 -25
  157. package/dist/models/update-alert-response-class.js +0 -15
  158. package/dist/models/update-dashboard-request-dto.d.ts +0 -76
  159. package/dist/models/update-dashboard-request-dto.js +0 -29
  160. package/dist/models/update-dashboard-response-class.d.ts +0 -25
  161. package/dist/models/update-dashboard-response-class.js +0 -15
  162. package/dist/models/update-report-request-dto.d.ts +0 -55
  163. package/dist/models/update-report-request-dto.js +0 -22
  164. package/dist/models/update-report-response-class.d.ts +0 -25
  165. package/dist/models/update-report-response-class.js +0 -15
  166. package/dist/models/update-scenario-analysis-request-dto.d.ts +0 -74
  167. package/dist/models/update-scenario-analysis-request-dto.js +0 -22
  168. package/dist/models/update-scenario-analysis-response-class.d.ts +0 -25
  169. package/dist/models/update-scenario-analysis-response-class.js +0 -15
  170. package/models/alert-class.ts +0 -96
  171. package/models/alert-history-class.ts +0 -114
  172. package/models/compare-tariffs-request-dto.ts +0 -46
  173. package/models/compare-tariffs-response-class.ts +0 -37
  174. package/models/condition-dto.ts +0 -52
  175. package/models/create-alert-request-dto.ts +0 -89
  176. package/models/create-dashboard-request-dto.ts +0 -81
  177. package/models/create-dashboard-response-class.ts +0 -31
  178. package/models/create-report-request-dto.ts +0 -58
  179. package/models/create-report-response-class.ts +0 -31
  180. package/models/create-scenario-analysis-request-dto.ts +0 -83
  181. package/models/create-scenario-analysis-response-class.ts +0 -31
  182. package/models/dashboard-class.ts +0 -84
  183. package/models/get-alert-response-class.ts +0 -31
  184. package/models/get-dashboard-response-class.ts +0 -31
  185. package/models/get-report-response-class.ts +0 -31
  186. package/models/get-scenario-analysis-response-class.ts +0 -31
  187. package/models/grouped-tariff-class.ts +0 -36
  188. package/models/list-alerts-response-class.ts +0 -37
  189. package/models/list-channels-response-class.ts +0 -31
  190. package/models/list-dashboards-response-class.ts +0 -37
  191. package/models/list-insurance-companies-response-class.ts +0 -31
  192. package/models/list-report-history-response-class.ts +0 -37
  193. package/models/list-reports-response-class.ts +0 -37
  194. package/models/list-scenario-analyses-response-class.ts +0 -37
  195. package/models/list-scenario-analysis-dates-response-class.ts +0 -31
  196. package/models/list-tariff-insurance-companies-response-class.ts +0 -31
  197. package/models/list-tariffs-response-class.ts +0 -31
  198. package/models/manage-subscription-response-class.ts +0 -31
  199. package/models/report-class.ts +0 -72
  200. package/models/report-history-class.ts +0 -54
  201. package/models/scenario-analysis-class.ts +0 -114
  202. package/models/scenario-analysis-date-response-class.ts +0 -42
  203. package/models/set-tenant-setting-response-class.ts +0 -42
  204. package/models/update-alert-request-dto.ts +0 -81
  205. package/models/update-alert-response-class.ts +0 -31
  206. package/models/update-dashboard-request-dto.ts +0 -87
  207. package/models/update-dashboard-response-class.ts +0 -31
  208. package/models/update-report-request-dto.ts +0 -64
  209. package/models/update-report-response-class.ts +0 -31
  210. package/models/update-scenario-analysis-request-dto.ts +0 -83
  211. package/models/update-scenario-analysis-response-class.ts +0 -31
  212. /package/dist/models/{alert-class.js → batch-delete-response-class.js} +0 -0
  213. /package/dist/models/{alert-history-class.js → delete-response-class.js} +0 -0
  214. /package/dist/models/{channel-response-class.js → disable-users-response-class.js} +0 -0
  215. /package/dist/models/{compare-tariffs-response-class.js → enable-users-response-class.js} +0 -0
  216. /package/dist/models/{create-alert-response-class.js → get-organization-response-class.js} +0 -0
  217. /package/dist/models/{create-dashboard-response-class.js → invite-org-request-dto.js} +0 -0
  218. /package/dist/models/{create-report-response-class.js → invite-users-response-class.js} +0 -0
  219. /package/dist/models/{create-scenario-analysis-response-class.js → list-org-invitations-response-class.js} +0 -0
  220. /package/dist/models/{dashboard-class.js → list-organizations-response-class.js} +0 -0
  221. /package/dist/models/{get-alert-response-class.js → org-invitation-class.js} +0 -0
  222. /package/dist/models/{get-dashboard-response-class.js → org-invitation-response-class.js} +0 -0
  223. /package/dist/models/{get-embedded-url-response-class.js → organization-class.js} +0 -0
@@ -21,36 +21,33 @@ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObj
21
21
  // @ts-ignore
22
22
  import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
23
23
  // @ts-ignore
24
- import { ListUserSubscriptionsResponseClass } from '../models';
24
+ import { InviteOrgRequestDto } from '../models';
25
25
  // @ts-ignore
26
- import { ManageSubscriptionRequestDto } from '../models';
26
+ import { ListOrgInvitationsResponseClass } from '../models';
27
27
  // @ts-ignore
28
- import { ManageSubscriptionResponseClass } from '../models';
28
+ import { OrgInvitationResponseClass } from '../models';
29
29
  // URLSearchParams not necessarily used
30
30
  // @ts-ignore
31
31
  import { URL, URLSearchParams } from 'url';
32
32
  const FormData = require('form-data');
33
33
  /**
34
- * UserSubscriptionApi - axios parameter creator
34
+ * InviteOrganizationsApi - axios parameter creator
35
35
  * @export
36
36
  */
37
- export const UserSubscriptionApiAxiosParamCreator = function (configuration?: Configuration) {
37
+ export const InviteOrganizationsApiAxiosParamCreator = function (configuration?: Configuration) {
38
38
  return {
39
39
  /**
40
- * Returns a list of user subscriptions you have previously created. The user subscriptions are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
41
- * @summary List user subscriptions
42
- * @param {string} [authorization] Bearer Token
43
- * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
44
- * @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
45
- * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
46
- * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
47
- * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
48
- * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
40
+ * This sends an email to invite an organization.
41
+ * @summary Invite an organization
42
+ * @param {InviteOrgRequestDto} inviteOrgRequestDto
43
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
49
44
  * @param {*} [options] Override http request option.
50
45
  * @throws {RequiredError}
51
46
  */
52
- listInvites: async (authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
53
- const localVarPath = `/tenantservice/v1/subscriptions`;
47
+ inviteOrg: async (inviteOrgRequestDto: InviteOrgRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
48
+ // verify required parameter 'inviteOrgRequestDto' is not null or undefined
49
+ assertParamExists('inviteOrg', 'inviteOrgRequestDto', inviteOrgRequestDto)
50
+ const localVarPath = `/tenantservice/v1/invitations/organizations`;
54
51
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
55
52
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
56
53
  let baseOptions;
@@ -60,7 +57,7 @@ export const UserSubscriptionApiAxiosParamCreator = function (configuration?: Co
60
57
  baseAccessToken = configuration.accessToken;
61
58
  }
62
59
 
63
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
60
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
64
61
  const localVarHeaderParameter = {} as any;
65
62
  const localVarQueryParameter = {} as any;
66
63
 
@@ -68,39 +65,18 @@ export const UserSubscriptionApiAxiosParamCreator = function (configuration?: Co
68
65
  // http bearer authentication required
69
66
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
70
67
 
71
- if (pageSize !== undefined) {
72
- localVarQueryParameter['pageSize'] = pageSize;
73
- }
74
-
75
- if (pageToken !== undefined) {
76
- localVarQueryParameter['pageToken'] = pageToken;
77
- }
78
-
79
- if (filter !== undefined) {
80
- localVarQueryParameter['filter'] = filter;
81
- }
82
-
83
- if (search !== undefined) {
84
- localVarQueryParameter['search'] = search;
85
- }
86
-
87
- if (order !== undefined) {
88
- localVarQueryParameter['order'] = order;
89
- }
90
-
91
- if (expand !== undefined) {
92
- localVarQueryParameter['expand'] = expand;
93
- }
94
-
95
68
  if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
96
69
  localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
97
70
  }
98
71
 
99
72
 
100
73
 
74
+ localVarHeaderParameter['Content-Type'] = 'application/json';
75
+
101
76
  setSearchParams(localVarUrlObj, localVarQueryParameter);
102
77
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
103
78
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
79
+ localVarRequestOptions.data = serializeDataIfNeeded(inviteOrgRequestDto, localVarRequestOptions, configuration)
104
80
 
105
81
  return {
106
82
  url: toPathString(localVarUrlObj),
@@ -108,24 +84,20 @@ export const UserSubscriptionApiAxiosParamCreator = function (configuration?: Co
108
84
  };
109
85
  },
110
86
  /**
111
- *
112
- * @param {string} entity
113
- * @param {number} entityId
114
- * @param {ManageSubscriptionRequestDto} manageSubscriptionRequestDto
115
- * @param {string} [authorization] Bearer Token
87
+ * Returns a list of org invitations you have previously created. The org invitations are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
88
+ * @summary List org invitations
89
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
90
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
91
+ * @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
92
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
93
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
94
+ * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
95
+ * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
116
96
  * @param {*} [options] Override http request option.
117
97
  * @throws {RequiredError}
118
98
  */
119
- manageSubscription: async (entity: string, entityId: number, manageSubscriptionRequestDto: ManageSubscriptionRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
120
- // verify required parameter 'entity' is not null or undefined
121
- assertParamExists('manageSubscription', 'entity', entity)
122
- // verify required parameter 'entityId' is not null or undefined
123
- assertParamExists('manageSubscription', 'entityId', entityId)
124
- // verify required parameter 'manageSubscriptionRequestDto' is not null or undefined
125
- assertParamExists('manageSubscription', 'manageSubscriptionRequestDto', manageSubscriptionRequestDto)
126
- const localVarPath = `/tenantservice/v1/subscriptions/{entity}/{entityId}`
127
- .replace(`{${"entity"}}`, encodeURIComponent(String(entity)))
128
- .replace(`{${"entityId"}}`, encodeURIComponent(String(entityId)));
99
+ listOrgInvitations: async (authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
100
+ const localVarPath = `/tenantservice/v1/invitations/organizations`;
129
101
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
130
102
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
131
103
  let baseOptions;
@@ -135,7 +107,7 @@ export const UserSubscriptionApiAxiosParamCreator = function (configuration?: Co
135
107
  baseAccessToken = configuration.accessToken;
136
108
  }
137
109
 
138
- const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
110
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
139
111
  const localVarHeaderParameter = {} as any;
140
112
  const localVarQueryParameter = {} as any;
141
113
 
@@ -143,18 +115,39 @@ export const UserSubscriptionApiAxiosParamCreator = function (configuration?: Co
143
115
  // http bearer authentication required
144
116
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
145
117
 
118
+ if (pageSize !== undefined) {
119
+ localVarQueryParameter['pageSize'] = pageSize;
120
+ }
121
+
122
+ if (pageToken !== undefined) {
123
+ localVarQueryParameter['pageToken'] = pageToken;
124
+ }
125
+
126
+ if (filter !== undefined) {
127
+ localVarQueryParameter['filter'] = filter;
128
+ }
129
+
130
+ if (search !== undefined) {
131
+ localVarQueryParameter['search'] = search;
132
+ }
133
+
134
+ if (order !== undefined) {
135
+ localVarQueryParameter['order'] = order;
136
+ }
137
+
138
+ if (expand !== undefined) {
139
+ localVarQueryParameter['expand'] = expand;
140
+ }
141
+
146
142
  if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
147
143
  localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
148
144
  }
149
145
 
150
146
 
151
147
 
152
- localVarHeaderParameter['Content-Type'] = 'application/json';
153
-
154
148
  setSearchParams(localVarUrlObj, localVarQueryParameter);
155
149
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
156
150
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
157
- localVarRequestOptions.data = serializeDataIfNeeded(manageSubscriptionRequestDto, localVarRequestOptions, configuration)
158
151
 
159
152
  return {
160
153
  url: toPathString(localVarUrlObj),
@@ -165,56 +158,66 @@ export const UserSubscriptionApiAxiosParamCreator = function (configuration?: Co
165
158
  };
166
159
 
167
160
  /**
168
- * UserSubscriptionApi - functional programming interface
161
+ * InviteOrganizationsApi - functional programming interface
169
162
  * @export
170
163
  */
171
- export const UserSubscriptionApiFp = function(configuration?: Configuration) {
172
- const localVarAxiosParamCreator = UserSubscriptionApiAxiosParamCreator(configuration)
164
+ export const InviteOrganizationsApiFp = function(configuration?: Configuration) {
165
+ const localVarAxiosParamCreator = InviteOrganizationsApiAxiosParamCreator(configuration)
173
166
  return {
174
167
  /**
175
- * Returns a list of user subscriptions you have previously created. The user subscriptions are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
176
- * @summary List user subscriptions
177
- * @param {string} [authorization] Bearer Token
178
- * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
179
- * @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
180
- * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
181
- * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
182
- * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
183
- * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
168
+ * This sends an email to invite an organization.
169
+ * @summary Invite an organization
170
+ * @param {InviteOrgRequestDto} inviteOrgRequestDto
171
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
184
172
  * @param {*} [options] Override http request option.
185
173
  * @throws {RequiredError}
186
174
  */
187
- async listInvites(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListUserSubscriptionsResponseClass>> {
188
- const localVarAxiosArgs = await localVarAxiosParamCreator.listInvites(authorization, pageSize, pageToken, filter, search, order, expand, options);
175
+ async inviteOrg(inviteOrgRequestDto: InviteOrgRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OrgInvitationResponseClass>> {
176
+ const localVarAxiosArgs = await localVarAxiosParamCreator.inviteOrg(inviteOrgRequestDto, authorization, options);
189
177
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
190
178
  },
191
179
  /**
192
- *
193
- * @param {string} entity
194
- * @param {number} entityId
195
- * @param {ManageSubscriptionRequestDto} manageSubscriptionRequestDto
196
- * @param {string} [authorization] Bearer Token
180
+ * Returns a list of org invitations you have previously created. The org invitations are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
181
+ * @summary List org invitations
182
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
183
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
184
+ * @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
185
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
186
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
187
+ * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
188
+ * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
197
189
  * @param {*} [options] Override http request option.
198
190
  * @throws {RequiredError}
199
191
  */
200
- async manageSubscription(entity: string, entityId: number, manageSubscriptionRequestDto: ManageSubscriptionRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ManageSubscriptionResponseClass>> {
201
- const localVarAxiosArgs = await localVarAxiosParamCreator.manageSubscription(entity, entityId, manageSubscriptionRequestDto, authorization, options);
192
+ async listOrgInvitations(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListOrgInvitationsResponseClass>> {
193
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listOrgInvitations(authorization, pageSize, pageToken, filter, search, order, expand, options);
202
194
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
203
195
  },
204
196
  }
205
197
  };
206
198
 
207
199
  /**
208
- * UserSubscriptionApi - factory interface
200
+ * InviteOrganizationsApi - factory interface
209
201
  * @export
210
202
  */
211
- export const UserSubscriptionApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
212
- const localVarFp = UserSubscriptionApiFp(configuration)
203
+ export const InviteOrganizationsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
204
+ const localVarFp = InviteOrganizationsApiFp(configuration)
213
205
  return {
214
206
  /**
215
- * Returns a list of user subscriptions you have previously created. The user subscriptions are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
216
- * @summary List user subscriptions
217
- * @param {string} [authorization] Bearer Token
207
+ * This sends an email to invite an organization.
208
+ * @summary Invite an organization
209
+ * @param {InviteOrgRequestDto} inviteOrgRequestDto
210
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
211
+ * @param {*} [options] Override http request option.
212
+ * @throws {RequiredError}
213
+ */
214
+ inviteOrg(inviteOrgRequestDto: InviteOrgRequestDto, authorization?: string, options?: any): AxiosPromise<OrgInvitationResponseClass> {
215
+ return localVarFp.inviteOrg(inviteOrgRequestDto, authorization, options).then((request) => request(axios, basePath));
216
+ },
217
+ /**
218
+ * Returns a list of org invitations you have previously created. The org invitations are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
219
+ * @summary List org invitations
220
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
218
221
  * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
219
222
  * @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
220
223
  * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
@@ -224,142 +227,117 @@ export const UserSubscriptionApiFactory = function (configuration?: Configuratio
224
227
  * @param {*} [options] Override http request option.
225
228
  * @throws {RequiredError}
226
229
  */
227
- listInvites(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, options?: any): AxiosPromise<ListUserSubscriptionsResponseClass> {
228
- return localVarFp.listInvites(authorization, pageSize, pageToken, filter, search, order, expand, options).then((request) => request(axios, basePath));
229
- },
230
- /**
231
- *
232
- * @param {string} entity
233
- * @param {number} entityId
234
- * @param {ManageSubscriptionRequestDto} manageSubscriptionRequestDto
235
- * @param {string} [authorization] Bearer Token
236
- * @param {*} [options] Override http request option.
237
- * @throws {RequiredError}
238
- */
239
- manageSubscription(entity: string, entityId: number, manageSubscriptionRequestDto: ManageSubscriptionRequestDto, authorization?: string, options?: any): AxiosPromise<ManageSubscriptionResponseClass> {
240
- return localVarFp.manageSubscription(entity, entityId, manageSubscriptionRequestDto, authorization, options).then((request) => request(axios, basePath));
230
+ listOrgInvitations(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, options?: any): AxiosPromise<ListOrgInvitationsResponseClass> {
231
+ return localVarFp.listOrgInvitations(authorization, pageSize, pageToken, filter, search, order, expand, options).then((request) => request(axios, basePath));
241
232
  },
242
233
  };
243
234
  };
244
235
 
245
236
  /**
246
- * Request parameters for listInvites operation in UserSubscriptionApi.
237
+ * Request parameters for inviteOrg operation in InviteOrganizationsApi.
247
238
  * @export
248
- * @interface UserSubscriptionApiListInvitesRequest
239
+ * @interface InviteOrganizationsApiInviteOrgRequest
249
240
  */
250
- export interface UserSubscriptionApiListInvitesRequest {
241
+ export interface InviteOrganizationsApiInviteOrgRequest {
242
+ /**
243
+ *
244
+ * @type {InviteOrgRequestDto}
245
+ * @memberof InviteOrganizationsApiInviteOrg
246
+ */
247
+ readonly inviteOrgRequestDto: InviteOrgRequestDto
248
+
251
249
  /**
252
- * Bearer Token
250
+ * Bearer Token: provided by the login endpoint under the name accessToken.
253
251
  * @type {string}
254
- * @memberof UserSubscriptionApiListInvites
252
+ * @memberof InviteOrganizationsApiInviteOrg
253
+ */
254
+ readonly authorization?: string
255
+ }
256
+
257
+ /**
258
+ * Request parameters for listOrgInvitations operation in InviteOrganizationsApi.
259
+ * @export
260
+ * @interface InviteOrganizationsApiListOrgInvitationsRequest
261
+ */
262
+ export interface InviteOrganizationsApiListOrgInvitationsRequest {
263
+ /**
264
+ * Bearer Token: provided by the login endpoint under the name accessToken.
265
+ * @type {string}
266
+ * @memberof InviteOrganizationsApiListOrgInvitations
255
267
  */
256
268
  readonly authorization?: string
257
269
 
258
270
  /**
259
271
  * A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
260
272
  * @type {any}
261
- * @memberof UserSubscriptionApiListInvites
273
+ * @memberof InviteOrganizationsApiListOrgInvitations
262
274
  */
263
275
  readonly pageSize?: any
264
276
 
265
277
  /**
266
278
  * A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
267
279
  * @type {any}
268
- * @memberof UserSubscriptionApiListInvites
280
+ * @memberof InviteOrganizationsApiListOrgInvitations
269
281
  */
270
282
  readonly pageToken?: any
271
283
 
272
284
  /**
273
285
  * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
274
286
  * @type {any}
275
- * @memberof UserSubscriptionApiListInvites
287
+ * @memberof InviteOrganizationsApiListOrgInvitations
276
288
  */
277
289
  readonly filter?: any
278
290
 
279
291
  /**
280
292
  * Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
281
293
  * @type {any}
282
- * @memberof UserSubscriptionApiListInvites
294
+ * @memberof InviteOrganizationsApiListOrgInvitations
283
295
  */
284
296
  readonly search?: any
285
297
 
286
298
  /**
287
299
  * The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
288
300
  * @type {any}
289
- * @memberof UserSubscriptionApiListInvites
301
+ * @memberof InviteOrganizationsApiListOrgInvitations
290
302
  */
291
303
  readonly order?: any
292
304
 
293
305
  /**
294
306
  * Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
295
307
  * @type {any}
296
- * @memberof UserSubscriptionApiListInvites
308
+ * @memberof InviteOrganizationsApiListOrgInvitations
297
309
  */
298
310
  readonly expand?: any
299
311
  }
300
312
 
301
313
  /**
302
- * Request parameters for manageSubscription operation in UserSubscriptionApi.
314
+ * InviteOrganizationsApi - object-oriented interface
303
315
  * @export
304
- * @interface UserSubscriptionApiManageSubscriptionRequest
305
- */
306
- export interface UserSubscriptionApiManageSubscriptionRequest {
307
- /**
308
- *
309
- * @type {string}
310
- * @memberof UserSubscriptionApiManageSubscription
311
- */
312
- readonly entity: string
313
-
314
- /**
315
- *
316
- * @type {number}
317
- * @memberof UserSubscriptionApiManageSubscription
318
- */
319
- readonly entityId: number
320
-
321
- /**
322
- *
323
- * @type {ManageSubscriptionRequestDto}
324
- * @memberof UserSubscriptionApiManageSubscription
325
- */
326
- readonly manageSubscriptionRequestDto: ManageSubscriptionRequestDto
327
-
328
- /**
329
- * Bearer Token
330
- * @type {string}
331
- * @memberof UserSubscriptionApiManageSubscription
332
- */
333
- readonly authorization?: string
334
- }
335
-
336
- /**
337
- * UserSubscriptionApi - object-oriented interface
338
- * @export
339
- * @class UserSubscriptionApi
316
+ * @class InviteOrganizationsApi
340
317
  * @extends {BaseAPI}
341
318
  */
342
- export class UserSubscriptionApi extends BaseAPI {
319
+ export class InviteOrganizationsApi extends BaseAPI {
343
320
  /**
344
- * Returns a list of user subscriptions you have previously created. The user subscriptions are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
345
- * @summary List user subscriptions
346
- * @param {UserSubscriptionApiListInvitesRequest} requestParameters Request parameters.
321
+ * This sends an email to invite an organization.
322
+ * @summary Invite an organization
323
+ * @param {InviteOrganizationsApiInviteOrgRequest} requestParameters Request parameters.
347
324
  * @param {*} [options] Override http request option.
348
325
  * @throws {RequiredError}
349
- * @memberof UserSubscriptionApi
326
+ * @memberof InviteOrganizationsApi
350
327
  */
351
- public listInvites(requestParameters: UserSubscriptionApiListInvitesRequest = {}, options?: AxiosRequestConfig) {
352
- return UserSubscriptionApiFp(this.configuration).listInvites(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
328
+ public inviteOrg(requestParameters: InviteOrganizationsApiInviteOrgRequest, options?: AxiosRequestConfig) {
329
+ return InviteOrganizationsApiFp(this.configuration).inviteOrg(requestParameters.inviteOrgRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
353
330
  }
354
331
 
355
332
  /**
356
- *
357
- * @param {UserSubscriptionApiManageSubscriptionRequest} requestParameters Request parameters.
333
+ * Returns a list of org invitations you have previously created. The org invitations are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
334
+ * @summary List org invitations
335
+ * @param {InviteOrganizationsApiListOrgInvitationsRequest} requestParameters Request parameters.
358
336
  * @param {*} [options] Override http request option.
359
337
  * @throws {RequiredError}
360
- * @memberof UserSubscriptionApi
338
+ * @memberof InviteOrganizationsApi
361
339
  */
362
- public manageSubscription(requestParameters: UserSubscriptionApiManageSubscriptionRequest, options?: AxiosRequestConfig) {
363
- return UserSubscriptionApiFp(this.configuration).manageSubscription(requestParameters.entity, requestParameters.entityId, requestParameters.manageSubscriptionRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
340
+ public listOrgInvitations(requestParameters: InviteOrganizationsApiListOrgInvitationsRequest = {}, options?: AxiosRequestConfig) {
341
+ return InviteOrganizationsApiFp(this.configuration).listOrgInvitations(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
364
342
  }
365
343
  }