@emilgroup/tenant-sdk-node 1.0.0 → 1.0.2

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.
@@ -37,14 +37,12 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi
37
37
  /**
38
38
  * Get Organization by code
39
39
  * @summary Retrieve the Organization
40
- * @param {string} authorization Bearer Token
41
40
  * @param {string} code
41
+ * @param {string} [authorization] Bearer Token
42
42
  * @param {*} [options] Override http request option.
43
43
  * @throws {RequiredError}
44
44
  */
45
- getOrganization: async (authorization: string, code: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
46
- // verify required parameter 'authorization' is not null or undefined
47
- assertParamExists('getOrganization', 'authorization', authorization)
45
+ getOrganization: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
48
46
  // verify required parameter 'code' is not null or undefined
49
47
  assertParamExists('getOrganization', 'code', code)
50
48
  const localVarPath = `/tenantservice/v1/organizations/{code}`
@@ -84,7 +82,7 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi
84
82
  /**
85
83
  * This will fetch list of organizations
86
84
  * @summary List organizations
87
- * @param {string} authorization Bearer Token
85
+ * @param {string} [authorization] Bearer Token
88
86
  * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
89
87
  * @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.
90
88
  * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
@@ -94,9 +92,7 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi
94
92
  * @param {*} [options] Override http request option.
95
93
  * @throws {RequiredError}
96
94
  */
97
- listOrganizations: async (authorization: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
98
- // verify required parameter 'authorization' is not null or undefined
99
- assertParamExists('listOrganizations', 'authorization', authorization)
95
+ listOrganizations: async (authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
100
96
  const localVarPath = `/tenantservice/v1/organizations`;
101
97
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
102
98
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -167,19 +163,19 @@ export const OrganizationsApiFp = function(configuration?: Configuration) {
167
163
  /**
168
164
  * Get Organization by code
169
165
  * @summary Retrieve the Organization
170
- * @param {string} authorization Bearer Token
171
166
  * @param {string} code
167
+ * @param {string} [authorization] Bearer Token
172
168
  * @param {*} [options] Override http request option.
173
169
  * @throws {RequiredError}
174
170
  */
175
- async getOrganization(authorization: string, code: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetOrganizationResponseClass>> {
176
- const localVarAxiosArgs = await localVarAxiosParamCreator.getOrganization(authorization, code, options);
171
+ async getOrganization(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetOrganizationResponseClass>> {
172
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getOrganization(code, authorization, options);
177
173
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
178
174
  },
179
175
  /**
180
176
  * This will fetch list of organizations
181
177
  * @summary List organizations
182
- * @param {string} authorization Bearer Token
178
+ * @param {string} [authorization] Bearer Token
183
179
  * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
184
180
  * @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
181
  * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
@@ -189,7 +185,7 @@ export const OrganizationsApiFp = function(configuration?: Configuration) {
189
185
  * @param {*} [options] Override http request option.
190
186
  * @throws {RequiredError}
191
187
  */
192
- async listOrganizations(authorization: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListOrganizationsResponseClass>> {
188
+ async listOrganizations(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListOrganizationsResponseClass>> {
193
189
  const localVarAxiosArgs = await localVarAxiosParamCreator.listOrganizations(authorization, pageSize, pageToken, filter, search, order, expand, options);
194
190
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
195
191
  },
@@ -206,18 +202,18 @@ export const OrganizationsApiFactory = function (configuration?: Configuration,
206
202
  /**
207
203
  * Get Organization by code
208
204
  * @summary Retrieve the Organization
209
- * @param {string} authorization Bearer Token
210
205
  * @param {string} code
206
+ * @param {string} [authorization] Bearer Token
211
207
  * @param {*} [options] Override http request option.
212
208
  * @throws {RequiredError}
213
209
  */
214
- getOrganization(authorization: string, code: string, options?: any): AxiosPromise<GetOrganizationResponseClass> {
215
- return localVarFp.getOrganization(authorization, code, options).then((request) => request(axios, basePath));
210
+ getOrganization(code: string, authorization?: string, options?: any): AxiosPromise<GetOrganizationResponseClass> {
211
+ return localVarFp.getOrganization(code, authorization, options).then((request) => request(axios, basePath));
216
212
  },
217
213
  /**
218
214
  * This will fetch list of organizations
219
215
  * @summary List organizations
220
- * @param {string} authorization Bearer Token
216
+ * @param {string} [authorization] Bearer Token
221
217
  * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
222
218
  * @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.
223
219
  * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
@@ -227,7 +223,7 @@ export const OrganizationsApiFactory = function (configuration?: Configuration,
227
223
  * @param {*} [options] Override http request option.
228
224
  * @throws {RequiredError}
229
225
  */
230
- listOrganizations(authorization: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, options?: any): AxiosPromise<ListOrganizationsResponseClass> {
226
+ listOrganizations(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, options?: any): AxiosPromise<ListOrganizationsResponseClass> {
231
227
  return localVarFp.listOrganizations(authorization, pageSize, pageToken, filter, search, order, expand, options).then((request) => request(axios, basePath));
232
228
  },
233
229
  };
@@ -240,18 +236,18 @@ export const OrganizationsApiFactory = function (configuration?: Configuration,
240
236
  */
241
237
  export interface OrganizationsApiGetOrganizationRequest {
242
238
  /**
243
- * Bearer Token
239
+ *
244
240
  * @type {string}
245
241
  * @memberof OrganizationsApiGetOrganization
246
242
  */
247
- readonly authorization: string
243
+ readonly code: string
248
244
 
249
245
  /**
250
- *
246
+ * Bearer Token
251
247
  * @type {string}
252
248
  * @memberof OrganizationsApiGetOrganization
253
249
  */
254
- readonly code: string
250
+ readonly authorization?: string
255
251
  }
256
252
 
257
253
  /**
@@ -265,7 +261,7 @@ export interface OrganizationsApiListOrganizationsRequest {
265
261
  * @type {string}
266
262
  * @memberof OrganizationsApiListOrganizations
267
263
  */
268
- readonly authorization: string
264
+ readonly authorization?: string
269
265
 
270
266
  /**
271
267
  * A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
@@ -326,7 +322,7 @@ export class OrganizationsApi extends BaseAPI {
326
322
  * @memberof OrganizationsApi
327
323
  */
328
324
  public getOrganization(requestParameters: OrganizationsApiGetOrganizationRequest, options?: AxiosRequestConfig) {
329
- return OrganizationsApiFp(this.configuration).getOrganization(requestParameters.authorization, requestParameters.code, options).then((request) => request(this.axios, this.basePath));
325
+ return OrganizationsApiFp(this.configuration).getOrganization(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
330
326
  }
331
327
 
332
328
  /**
@@ -337,7 +333,7 @@ export class OrganizationsApi extends BaseAPI {
337
333
  * @throws {RequiredError}
338
334
  * @memberof OrganizationsApi
339
335
  */
340
- public listOrganizations(requestParameters: OrganizationsApiListOrganizationsRequest, options?: AxiosRequestConfig) {
336
+ public listOrganizations(requestParameters: OrganizationsApiListOrganizationsRequest = {}, options?: AxiosRequestConfig) {
341
337
  return OrganizationsApiFp(this.configuration).listOrganizations(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
342
338
  }
343
339
  }