flexinet-api 0.0.492-prerelease0 → 0.0.501-prerelease0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## flexinet-api@0.0.492-prerelease0
1
+ ## flexinet-api@0.0.501-prerelease0
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
 
@@ -36,7 +36,7 @@ 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 flexinet-api@0.0.492-prerelease0 --save
39
+ npm install flexinet-api@0.0.501-prerelease0 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
package/api.ts CHANGED
@@ -1627,6 +1627,31 @@ export interface ProductsResponse {
1627
1627
  */
1628
1628
  'nextToken'?: string;
1629
1629
  }
1630
+ /**
1631
+ *
1632
+ * @export
1633
+ * @interface Profile
1634
+ */
1635
+ export interface Profile {
1636
+ /**
1637
+ *
1638
+ * @type {User}
1639
+ * @memberof Profile
1640
+ */
1641
+ 'user': User;
1642
+ /**
1643
+ *
1644
+ * @type {ProfileDetails}
1645
+ * @memberof Profile
1646
+ */
1647
+ 'details': ProfileDetails;
1648
+ }
1649
+ /**
1650
+ * @type ProfileDetails
1651
+ * @export
1652
+ */
1653
+ export type ProfileDetails = CustomeruserDetails | SystemUserDetails;
1654
+
1630
1655
  /**
1631
1656
  *
1632
1657
  * @export
@@ -2091,39 +2116,6 @@ export const RuleKind = {
2091
2116
  export type RuleKind = typeof RuleKind[keyof typeof RuleKind];
2092
2117
 
2093
2118
 
2094
- /**
2095
- *
2096
- * @export
2097
- * @interface SalesUserDetails
2098
- */
2099
- export interface SalesUserDetails {
2100
- /**
2101
- *
2102
- * @type {string}
2103
- * @memberof SalesUserDetails
2104
- */
2105
- 'name': string;
2106
- /**
2107
- *
2108
- * @type {string}
2109
- * @memberof SalesUserDetails
2110
- */
2111
- 'email': string;
2112
- /**
2113
- *
2114
- * @type {UserRole}
2115
- * @memberof SalesUserDetails
2116
- */
2117
- 'role': UserRole;
2118
- /**
2119
- *
2120
- * @type {string}
2121
- * @memberof SalesUserDetails
2122
- */
2123
- 'departmentId'?: string;
2124
- }
2125
-
2126
-
2127
2119
  /**
2128
2120
  *
2129
2121
  * @export
@@ -2219,6 +2211,43 @@ export const SortDirection = {
2219
2211
  export type SortDirection = typeof SortDirection[keyof typeof SortDirection];
2220
2212
 
2221
2213
 
2214
+ /**
2215
+ *
2216
+ * @export
2217
+ * @interface SystemUserDetails
2218
+ */
2219
+ export interface SystemUserDetails {
2220
+ /**
2221
+ *
2222
+ * @type {string}
2223
+ * @memberof SystemUserDetails
2224
+ */
2225
+ 'firstName'?: string;
2226
+ /**
2227
+ *
2228
+ * @type {string}
2229
+ * @memberof SystemUserDetails
2230
+ */
2231
+ 'lastName'?: string;
2232
+ /**
2233
+ *
2234
+ * @type {string}
2235
+ * @memberof SystemUserDetails
2236
+ */
2237
+ 'email'?: string;
2238
+ /**
2239
+ *
2240
+ * @type {string}
2241
+ * @memberof SystemUserDetails
2242
+ */
2243
+ 'department'?: string;
2244
+ /**
2245
+ *
2246
+ * @type {string}
2247
+ * @memberof SystemUserDetails
2248
+ */
2249
+ 'jobTitle'?: string;
2250
+ }
2222
2251
  /**
2223
2252
  *
2224
2253
  * @export
@@ -2647,6 +2676,18 @@ export interface Transaction {
2647
2676
  * @memberof Transaction
2648
2677
  */
2649
2678
  'kind': TransactionKind;
2679
+ /**
2680
+ *
2681
+ * @type {TransactionSource}
2682
+ * @memberof Transaction
2683
+ */
2684
+ 'source': TransactionSource;
2685
+ /**
2686
+ *
2687
+ * @type {string}
2688
+ * @memberof Transaction
2689
+ */
2690
+ 'sourceReference'?: string;
2650
2691
  /**
2651
2692
  *
2652
2693
  * @type {number}
@@ -2771,6 +2812,24 @@ export const TransactionKind = {
2771
2812
  export type TransactionKind = typeof TransactionKind[keyof typeof TransactionKind];
2772
2813
 
2773
2814
 
2815
+ /**
2816
+ *
2817
+ * @export
2818
+ * @enum {string}
2819
+ */
2820
+
2821
+ export const TransactionSource = {
2822
+ SalesEvent: 'sales_event',
2823
+ Webshop: 'webshop',
2824
+ Promotion: 'promotion',
2825
+ Manual: 'manual',
2826
+ Expiry: 'expiry',
2827
+ Transfer: 'transfer'
2828
+ } as const;
2829
+
2830
+ export type TransactionSource = typeof TransactionSource[keyof typeof TransactionSource];
2831
+
2832
+
2774
2833
  /**
2775
2834
  *
2776
2835
  * @export
@@ -2957,6 +3016,12 @@ export interface User {
2957
3016
  * @memberof User
2958
3017
  */
2959
3018
  'source': string;
3019
+ /**
3020
+ *
3021
+ * @type {UserRole}
3022
+ * @memberof User
3023
+ */
3024
+ 'role': UserRole;
2960
3025
  /**
2961
3026
  *
2962
3027
  * @type {string}
@@ -2975,13 +3040,9 @@ export interface User {
2975
3040
  * @memberof User
2976
3041
  */
2977
3042
  'manager'?: User;
2978
- /**
2979
- *
2980
- * @type {UserDetails}
2981
- * @memberof User
2982
- */
2983
- 'details': UserDetails;
2984
3043
  }
3044
+
3045
+
2985
3046
  /**
2986
3047
  *
2987
3048
  * @export
@@ -3001,12 +3062,6 @@ export interface UserBalance {
3001
3062
  */
3002
3063
  'clientBalance'?: Balance;
3003
3064
  }
3004
- /**
3005
- * @type UserDetails
3006
- * @export
3007
- */
3008
- export type UserDetails = CustomeruserDetails | SalesUserDetails;
3009
-
3010
3065
  /**
3011
3066
  *
3012
3067
  * @export
@@ -8792,6 +8847,50 @@ export const TransactionApiAxiosParamCreator = function (configuration?: Configu
8792
8847
 
8793
8848
 
8794
8849
 
8850
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
8851
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
8852
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
8853
+
8854
+ return {
8855
+ url: toPathString(localVarUrlObj),
8856
+ options: localVarRequestOptions,
8857
+ };
8858
+ },
8859
+ /**
8860
+ * List existing transactions
8861
+ * @summary List existing transactions for users
8862
+ * @param {string} [paginationToken] This is the pagination token
8863
+ * @param {Array<string>} [userIDs] This is the user ID
8864
+ * @param {*} [options] Override http request option.
8865
+ * @throws {RequiredError}
8866
+ */
8867
+ listUserTransactions: async (paginationToken?: string, userIDs?: Array<string>, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
8868
+ const localVarPath = `/users/transactions`;
8869
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
8870
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
8871
+ let baseOptions;
8872
+ if (configuration) {
8873
+ baseOptions = configuration.baseOptions;
8874
+ }
8875
+
8876
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
8877
+ const localVarHeaderParameter = {} as any;
8878
+ const localVarQueryParameter = {} as any;
8879
+
8880
+ // authentication customerJWT required
8881
+ // http bearer authentication required
8882
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
8883
+
8884
+ if (paginationToken !== undefined) {
8885
+ localVarQueryParameter['paginationToken'] = paginationToken;
8886
+ }
8887
+
8888
+ if (userIDs) {
8889
+ localVarQueryParameter['userIDs'] = userIDs;
8890
+ }
8891
+
8892
+
8893
+
8795
8894
  setSearchParams(localVarUrlObj, localVarQueryParameter);
8796
8895
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
8797
8896
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@@ -8824,6 +8923,18 @@ export const TransactionApiFp = function(configuration?: Configuration) {
8824
8923
  const localVarAxiosArgs = await localVarAxiosParamCreator.listTransactions(paginationToken, clientIDs, userIDs, options);
8825
8924
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
8826
8925
  },
8926
+ /**
8927
+ * List existing transactions
8928
+ * @summary List existing transactions for users
8929
+ * @param {string} [paginationToken] This is the pagination token
8930
+ * @param {Array<string>} [userIDs] This is the user ID
8931
+ * @param {*} [options] Override http request option.
8932
+ * @throws {RequiredError}
8933
+ */
8934
+ async listUserTransactions(paginationToken?: string, userIDs?: Array<string>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TransactionsResponse>> {
8935
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listUserTransactions(paginationToken, userIDs, options);
8936
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
8937
+ },
8827
8938
  }
8828
8939
  };
8829
8940
 
@@ -8846,6 +8957,17 @@ export const TransactionApiFactory = function (configuration?: Configuration, ba
8846
8957
  listTransactions(paginationToken?: string, clientIDs?: Array<string>, userIDs?: Array<string>, options?: any): AxiosPromise<TransactionsResponse> {
8847
8958
  return localVarFp.listTransactions(paginationToken, clientIDs, userIDs, options).then((request) => request(axios, basePath));
8848
8959
  },
8960
+ /**
8961
+ * List existing transactions
8962
+ * @summary List existing transactions for users
8963
+ * @param {string} [paginationToken] This is the pagination token
8964
+ * @param {Array<string>} [userIDs] This is the user ID
8965
+ * @param {*} [options] Override http request option.
8966
+ * @throws {RequiredError}
8967
+ */
8968
+ listUserTransactions(paginationToken?: string, userIDs?: Array<string>, options?: any): AxiosPromise<TransactionsResponse> {
8969
+ return localVarFp.listUserTransactions(paginationToken, userIDs, options).then((request) => request(axios, basePath));
8970
+ },
8849
8971
  };
8850
8972
  };
8851
8973
 
@@ -8869,6 +8991,19 @@ export class TransactionApi extends BaseAPI {
8869
8991
  public listTransactions(paginationToken?: string, clientIDs?: Array<string>, userIDs?: Array<string>, options?: AxiosRequestConfig) {
8870
8992
  return TransactionApiFp(this.configuration).listTransactions(paginationToken, clientIDs, userIDs, options).then((request) => request(this.axios, this.basePath));
8871
8993
  }
8994
+
8995
+ /**
8996
+ * List existing transactions
8997
+ * @summary List existing transactions for users
8998
+ * @param {string} [paginationToken] This is the pagination token
8999
+ * @param {Array<string>} [userIDs] This is the user ID
9000
+ * @param {*} [options] Override http request option.
9001
+ * @throws {RequiredError}
9002
+ * @memberof TransactionApi
9003
+ */
9004
+ public listUserTransactions(paginationToken?: string, userIDs?: Array<string>, options?: AxiosRequestConfig) {
9005
+ return TransactionApiFp(this.configuration).listUserTransactions(paginationToken, userIDs, options).then((request) => request(this.axios, this.basePath));
9006
+ }
8872
9007
  }
8873
9008
 
8874
9009
 
@@ -8879,6 +9014,44 @@ export class TransactionApi extends BaseAPI {
8879
9014
  */
8880
9015
  export const UserApiAxiosParamCreator = function (configuration?: Configuration) {
8881
9016
  return {
9017
+ /**
9018
+ * Get current user
9019
+ * @summary Get current user
9020
+ * @param {*} [options] Override http request option.
9021
+ * @throws {RequiredError}
9022
+ */
9023
+ getCurrentUser: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
9024
+ const localVarPath = `/me`;
9025
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
9026
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
9027
+ let baseOptions;
9028
+ if (configuration) {
9029
+ baseOptions = configuration.baseOptions;
9030
+ }
9031
+
9032
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
9033
+ const localVarHeaderParameter = {} as any;
9034
+ const localVarQueryParameter = {} as any;
9035
+
9036
+ // authentication systemJWT required
9037
+ // http bearer authentication required
9038
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
9039
+
9040
+ // authentication customerJWT required
9041
+ // http bearer authentication required
9042
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
9043
+
9044
+
9045
+
9046
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
9047
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
9048
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
9049
+
9050
+ return {
9051
+ url: toPathString(localVarUrlObj),
9052
+ options: localVarRequestOptions,
9053
+ };
9054
+ },
8882
9055
  /**
8883
9056
  * Get user by id
8884
9057
  * @summary Get user
@@ -9065,6 +9238,16 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration)
9065
9238
  export const UserApiFp = function(configuration?: Configuration) {
9066
9239
  const localVarAxiosParamCreator = UserApiAxiosParamCreator(configuration)
9067
9240
  return {
9241
+ /**
9242
+ * Get current user
9243
+ * @summary Get current user
9244
+ * @param {*} [options] Override http request option.
9245
+ * @throws {RequiredError}
9246
+ */
9247
+ async getCurrentUser(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Profile>> {
9248
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getCurrentUser(options);
9249
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
9250
+ },
9068
9251
  /**
9069
9252
  * Get user by id
9070
9253
  * @summary Get user
@@ -9124,6 +9307,15 @@ export const UserApiFp = function(configuration?: Configuration) {
9124
9307
  export const UserApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
9125
9308
  const localVarFp = UserApiFp(configuration)
9126
9309
  return {
9310
+ /**
9311
+ * Get current user
9312
+ * @summary Get current user
9313
+ * @param {*} [options] Override http request option.
9314
+ * @throws {RequiredError}
9315
+ */
9316
+ getCurrentUser(options?: any): AxiosPromise<Profile> {
9317
+ return localVarFp.getCurrentUser(options).then((request) => request(axios, basePath));
9318
+ },
9127
9319
  /**
9128
9320
  * Get user by id
9129
9321
  * @summary Get user
@@ -9179,6 +9371,17 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
9179
9371
  * @extends {BaseAPI}
9180
9372
  */
9181
9373
  export class UserApi extends BaseAPI {
9374
+ /**
9375
+ * Get current user
9376
+ * @summary Get current user
9377
+ * @param {*} [options] Override http request option.
9378
+ * @throws {RequiredError}
9379
+ * @memberof UserApi
9380
+ */
9381
+ public getCurrentUser(options?: AxiosRequestConfig) {
9382
+ return UserApiFp(this.configuration).getCurrentUser(options).then((request) => request(this.axios, this.basePath));
9383
+ }
9384
+
9182
9385
  /**
9183
9386
  * Get user by id
9184
9387
  * @summary Get user