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/dist/esm/api.d.ts CHANGED
@@ -1543,6 +1543,30 @@ export interface ProductsResponse {
1543
1543
  */
1544
1544
  'nextToken'?: string;
1545
1545
  }
1546
+ /**
1547
+ *
1548
+ * @export
1549
+ * @interface Profile
1550
+ */
1551
+ export interface Profile {
1552
+ /**
1553
+ *
1554
+ * @type {User}
1555
+ * @memberof Profile
1556
+ */
1557
+ 'user': User;
1558
+ /**
1559
+ *
1560
+ * @type {ProfileDetails}
1561
+ * @memberof Profile
1562
+ */
1563
+ 'details': ProfileDetails;
1564
+ }
1565
+ /**
1566
+ * @type ProfileDetails
1567
+ * @export
1568
+ */
1569
+ export type ProfileDetails = CustomeruserDetails | SystemUserDetails;
1546
1570
  /**
1547
1571
  *
1548
1572
  * @export
@@ -1984,37 +2008,6 @@ export declare const RuleKind: {
1984
2008
  readonly Tag: "tag";
1985
2009
  };
1986
2010
  export type RuleKind = typeof RuleKind[keyof typeof RuleKind];
1987
- /**
1988
- *
1989
- * @export
1990
- * @interface SalesUserDetails
1991
- */
1992
- export interface SalesUserDetails {
1993
- /**
1994
- *
1995
- * @type {string}
1996
- * @memberof SalesUserDetails
1997
- */
1998
- 'name': string;
1999
- /**
2000
- *
2001
- * @type {string}
2002
- * @memberof SalesUserDetails
2003
- */
2004
- 'email': string;
2005
- /**
2006
- *
2007
- * @type {UserRole}
2008
- * @memberof SalesUserDetails
2009
- */
2010
- 'role': UserRole;
2011
- /**
2012
- *
2013
- * @type {string}
2014
- * @memberof SalesUserDetails
2015
- */
2016
- 'departmentId'?: string;
2017
- }
2018
2011
  /**
2019
2012
  *
2020
2013
  * @export
@@ -2106,6 +2099,43 @@ export declare const SortDirection: {
2106
2099
  readonly Desc: "desc";
2107
2100
  };
2108
2101
  export type SortDirection = typeof SortDirection[keyof typeof SortDirection];
2102
+ /**
2103
+ *
2104
+ * @export
2105
+ * @interface SystemUserDetails
2106
+ */
2107
+ export interface SystemUserDetails {
2108
+ /**
2109
+ *
2110
+ * @type {string}
2111
+ * @memberof SystemUserDetails
2112
+ */
2113
+ 'firstName'?: string;
2114
+ /**
2115
+ *
2116
+ * @type {string}
2117
+ * @memberof SystemUserDetails
2118
+ */
2119
+ 'lastName'?: string;
2120
+ /**
2121
+ *
2122
+ * @type {string}
2123
+ * @memberof SystemUserDetails
2124
+ */
2125
+ 'email'?: string;
2126
+ /**
2127
+ *
2128
+ * @type {string}
2129
+ * @memberof SystemUserDetails
2130
+ */
2131
+ 'department'?: string;
2132
+ /**
2133
+ *
2134
+ * @type {string}
2135
+ * @memberof SystemUserDetails
2136
+ */
2137
+ 'jobTitle'?: string;
2138
+ }
2109
2139
  /**
2110
2140
  *
2111
2141
  * @export
@@ -2505,6 +2535,18 @@ export interface Transaction {
2505
2535
  * @memberof Transaction
2506
2536
  */
2507
2537
  'kind': TransactionKind;
2538
+ /**
2539
+ *
2540
+ * @type {TransactionSource}
2541
+ * @memberof Transaction
2542
+ */
2543
+ 'source': TransactionSource;
2544
+ /**
2545
+ *
2546
+ * @type {string}
2547
+ * @memberof Transaction
2548
+ */
2549
+ 'sourceReference'?: string;
2508
2550
  /**
2509
2551
  *
2510
2552
  * @type {number}
@@ -2621,6 +2663,20 @@ export declare const TransactionKind: {
2621
2663
  readonly Debit: "debit";
2622
2664
  };
2623
2665
  export type TransactionKind = typeof TransactionKind[keyof typeof TransactionKind];
2666
+ /**
2667
+ *
2668
+ * @export
2669
+ * @enum {string}
2670
+ */
2671
+ export declare const TransactionSource: {
2672
+ readonly SalesEvent: "sales_event";
2673
+ readonly Webshop: "webshop";
2674
+ readonly Promotion: "promotion";
2675
+ readonly Manual: "manual";
2676
+ readonly Expiry: "expiry";
2677
+ readonly Transfer: "transfer";
2678
+ };
2679
+ export type TransactionSource = typeof TransactionSource[keyof typeof TransactionSource];
2624
2680
  /**
2625
2681
  *
2626
2682
  * @export
@@ -2809,6 +2865,12 @@ export interface User {
2809
2865
  * @memberof User
2810
2866
  */
2811
2867
  'source': string;
2868
+ /**
2869
+ *
2870
+ * @type {UserRole}
2871
+ * @memberof User
2872
+ */
2873
+ 'role': UserRole;
2812
2874
  /**
2813
2875
  *
2814
2876
  * @type {string}
@@ -2827,12 +2889,6 @@ export interface User {
2827
2889
  * @memberof User
2828
2890
  */
2829
2891
  'manager'?: User;
2830
- /**
2831
- *
2832
- * @type {UserDetails}
2833
- * @memberof User
2834
- */
2835
- 'details': UserDetails;
2836
2892
  }
2837
2893
  /**
2838
2894
  *
@@ -2853,11 +2909,6 @@ export interface UserBalance {
2853
2909
  */
2854
2910
  'clientBalance'?: Balance;
2855
2911
  }
2856
- /**
2857
- * @type UserDetails
2858
- * @export
2859
- */
2860
- export type UserDetails = CustomeruserDetails | SalesUserDetails;
2861
2912
  /**
2862
2913
  *
2863
2914
  * @export
@@ -5746,6 +5797,15 @@ export declare const TransactionApiAxiosParamCreator: (configuration?: Configura
5746
5797
  * @throws {RequiredError}
5747
5798
  */
5748
5799
  listTransactions: (paginationToken?: string, clientIDs?: Array<string>, userIDs?: Array<string>, options?: AxiosRequestConfig) => Promise<RequestArgs>;
5800
+ /**
5801
+ * List existing transactions
5802
+ * @summary List existing transactions for users
5803
+ * @param {string} [paginationToken] This is the pagination token
5804
+ * @param {Array<string>} [userIDs] This is the user ID
5805
+ * @param {*} [options] Override http request option.
5806
+ * @throws {RequiredError}
5807
+ */
5808
+ listUserTransactions: (paginationToken?: string, userIDs?: Array<string>, options?: AxiosRequestConfig) => Promise<RequestArgs>;
5749
5809
  };
5750
5810
  /**
5751
5811
  * TransactionApi - functional programming interface
@@ -5762,6 +5822,15 @@ export declare const TransactionApiFp: (configuration?: Configuration) => {
5762
5822
  * @throws {RequiredError}
5763
5823
  */
5764
5824
  listTransactions(paginationToken?: string, clientIDs?: Array<string>, userIDs?: Array<string>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TransactionsResponse>>;
5825
+ /**
5826
+ * List existing transactions
5827
+ * @summary List existing transactions for users
5828
+ * @param {string} [paginationToken] This is the pagination token
5829
+ * @param {Array<string>} [userIDs] This is the user ID
5830
+ * @param {*} [options] Override http request option.
5831
+ * @throws {RequiredError}
5832
+ */
5833
+ listUserTransactions(paginationToken?: string, userIDs?: Array<string>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TransactionsResponse>>;
5765
5834
  };
5766
5835
  /**
5767
5836
  * TransactionApi - factory interface
@@ -5778,6 +5847,15 @@ export declare const TransactionApiFactory: (configuration?: Configuration, base
5778
5847
  * @throws {RequiredError}
5779
5848
  */
5780
5849
  listTransactions(paginationToken?: string, clientIDs?: Array<string>, userIDs?: Array<string>, options?: any): AxiosPromise<TransactionsResponse>;
5850
+ /**
5851
+ * List existing transactions
5852
+ * @summary List existing transactions for users
5853
+ * @param {string} [paginationToken] This is the pagination token
5854
+ * @param {Array<string>} [userIDs] This is the user ID
5855
+ * @param {*} [options] Override http request option.
5856
+ * @throws {RequiredError}
5857
+ */
5858
+ listUserTransactions(paginationToken?: string, userIDs?: Array<string>, options?: any): AxiosPromise<TransactionsResponse>;
5781
5859
  };
5782
5860
  /**
5783
5861
  * TransactionApi - object-oriented interface
@@ -5797,12 +5875,29 @@ export declare class TransactionApi extends BaseAPI {
5797
5875
  * @memberof TransactionApi
5798
5876
  */
5799
5877
  listTransactions(paginationToken?: string, clientIDs?: Array<string>, userIDs?: Array<string>, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<TransactionsResponse, any>>;
5878
+ /**
5879
+ * List existing transactions
5880
+ * @summary List existing transactions for users
5881
+ * @param {string} [paginationToken] This is the pagination token
5882
+ * @param {Array<string>} [userIDs] This is the user ID
5883
+ * @param {*} [options] Override http request option.
5884
+ * @throws {RequiredError}
5885
+ * @memberof TransactionApi
5886
+ */
5887
+ listUserTransactions(paginationToken?: string, userIDs?: Array<string>, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<TransactionsResponse, any>>;
5800
5888
  }
5801
5889
  /**
5802
5890
  * UserApi - axios parameter creator
5803
5891
  * @export
5804
5892
  */
5805
5893
  export declare const UserApiAxiosParamCreator: (configuration?: Configuration) => {
5894
+ /**
5895
+ * Get current user
5896
+ * @summary Get current user
5897
+ * @param {*} [options] Override http request option.
5898
+ * @throws {RequiredError}
5899
+ */
5900
+ getCurrentUser: (options?: AxiosRequestConfig) => Promise<RequestArgs>;
5806
5901
  /**
5807
5902
  * Get user by id
5808
5903
  * @summary Get user
@@ -5846,6 +5941,13 @@ export declare const UserApiAxiosParamCreator: (configuration?: Configuration) =
5846
5941
  * @export
5847
5942
  */
5848
5943
  export declare const UserApiFp: (configuration?: Configuration) => {
5944
+ /**
5945
+ * Get current user
5946
+ * @summary Get current user
5947
+ * @param {*} [options] Override http request option.
5948
+ * @throws {RequiredError}
5949
+ */
5950
+ getCurrentUser(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Profile>>;
5849
5951
  /**
5850
5952
  * Get user by id
5851
5953
  * @summary Get user
@@ -5889,6 +5991,13 @@ export declare const UserApiFp: (configuration?: Configuration) => {
5889
5991
  * @export
5890
5992
  */
5891
5993
  export declare const UserApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
5994
+ /**
5995
+ * Get current user
5996
+ * @summary Get current user
5997
+ * @param {*} [options] Override http request option.
5998
+ * @throws {RequiredError}
5999
+ */
6000
+ getCurrentUser(options?: any): AxiosPromise<Profile>;
5892
6001
  /**
5893
6002
  * Get user by id
5894
6003
  * @summary Get user
@@ -5934,6 +6043,14 @@ export declare const UserApiFactory: (configuration?: Configuration, basePath?:
5934
6043
  * @extends {BaseAPI}
5935
6044
  */
5936
6045
  export declare class UserApi extends BaseAPI {
6046
+ /**
6047
+ * Get current user
6048
+ * @summary Get current user
6049
+ * @param {*} [options] Override http request option.
6050
+ * @throws {RequiredError}
6051
+ * @memberof UserApi
6052
+ */
6053
+ getCurrentUser(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<Profile, any>>;
5937
6054
  /**
5938
6055
  * Get user by id
5939
6056
  * @summary Get user
package/dist/esm/api.js CHANGED
@@ -275,6 +275,19 @@ export const TransactionKind = {
275
275
  Credit: 'credit',
276
276
  Debit: 'debit'
277
277
  };
278
+ /**
279
+ *
280
+ * @export
281
+ * @enum {string}
282
+ */
283
+ export const TransactionSource = {
284
+ SalesEvent: 'sales_event',
285
+ Webshop: 'webshop',
286
+ Promotion: 'promotion',
287
+ Manual: 'manual',
288
+ Expiry: 'expiry',
289
+ Transfer: 'transfer'
290
+ };
278
291
  /**
279
292
  *
280
293
  * @export
@@ -5389,6 +5402,42 @@ export const TransactionApiAxiosParamCreator = function (configuration) {
5389
5402
  options: localVarRequestOptions,
5390
5403
  };
5391
5404
  }),
5405
+ /**
5406
+ * List existing transactions
5407
+ * @summary List existing transactions for users
5408
+ * @param {string} [paginationToken] This is the pagination token
5409
+ * @param {Array<string>} [userIDs] This is the user ID
5410
+ * @param {*} [options] Override http request option.
5411
+ * @throws {RequiredError}
5412
+ */
5413
+ listUserTransactions: (paginationToken, userIDs, options = {}) => __awaiter(this, void 0, void 0, function* () {
5414
+ const localVarPath = `/users/transactions`;
5415
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
5416
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
5417
+ let baseOptions;
5418
+ if (configuration) {
5419
+ baseOptions = configuration.baseOptions;
5420
+ }
5421
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
5422
+ const localVarHeaderParameter = {};
5423
+ const localVarQueryParameter = {};
5424
+ // authentication customerJWT required
5425
+ // http bearer authentication required
5426
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
5427
+ if (paginationToken !== undefined) {
5428
+ localVarQueryParameter['paginationToken'] = paginationToken;
5429
+ }
5430
+ if (userIDs) {
5431
+ localVarQueryParameter['userIDs'] = userIDs;
5432
+ }
5433
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
5434
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
5435
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
5436
+ return {
5437
+ url: toPathString(localVarUrlObj),
5438
+ options: localVarRequestOptions,
5439
+ };
5440
+ }),
5392
5441
  };
5393
5442
  };
5394
5443
  /**
@@ -5413,6 +5462,20 @@ export const TransactionApiFp = function (configuration) {
5413
5462
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
5414
5463
  });
5415
5464
  },
5465
+ /**
5466
+ * List existing transactions
5467
+ * @summary List existing transactions for users
5468
+ * @param {string} [paginationToken] This is the pagination token
5469
+ * @param {Array<string>} [userIDs] This is the user ID
5470
+ * @param {*} [options] Override http request option.
5471
+ * @throws {RequiredError}
5472
+ */
5473
+ listUserTransactions(paginationToken, userIDs, options) {
5474
+ return __awaiter(this, void 0, void 0, function* () {
5475
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listUserTransactions(paginationToken, userIDs, options);
5476
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
5477
+ });
5478
+ },
5416
5479
  };
5417
5480
  };
5418
5481
  /**
@@ -5434,6 +5497,17 @@ export const TransactionApiFactory = function (configuration, basePath, axios) {
5434
5497
  listTransactions(paginationToken, clientIDs, userIDs, options) {
5435
5498
  return localVarFp.listTransactions(paginationToken, clientIDs, userIDs, options).then((request) => request(axios, basePath));
5436
5499
  },
5500
+ /**
5501
+ * List existing transactions
5502
+ * @summary List existing transactions for users
5503
+ * @param {string} [paginationToken] This is the pagination token
5504
+ * @param {Array<string>} [userIDs] This is the user ID
5505
+ * @param {*} [options] Override http request option.
5506
+ * @throws {RequiredError}
5507
+ */
5508
+ listUserTransactions(paginationToken, userIDs, options) {
5509
+ return localVarFp.listUserTransactions(paginationToken, userIDs, options).then((request) => request(axios, basePath));
5510
+ },
5437
5511
  };
5438
5512
  };
5439
5513
  /**
@@ -5456,6 +5530,18 @@ export class TransactionApi extends BaseAPI {
5456
5530
  listTransactions(paginationToken, clientIDs, userIDs, options) {
5457
5531
  return TransactionApiFp(this.configuration).listTransactions(paginationToken, clientIDs, userIDs, options).then((request) => request(this.axios, this.basePath));
5458
5532
  }
5533
+ /**
5534
+ * List existing transactions
5535
+ * @summary List existing transactions for users
5536
+ * @param {string} [paginationToken] This is the pagination token
5537
+ * @param {Array<string>} [userIDs] This is the user ID
5538
+ * @param {*} [options] Override http request option.
5539
+ * @throws {RequiredError}
5540
+ * @memberof TransactionApi
5541
+ */
5542
+ listUserTransactions(paginationToken, userIDs, options) {
5543
+ return TransactionApiFp(this.configuration).listUserTransactions(paginationToken, userIDs, options).then((request) => request(this.axios, this.basePath));
5544
+ }
5459
5545
  }
5460
5546
  /**
5461
5547
  * UserApi - axios parameter creator
@@ -5463,6 +5549,37 @@ export class TransactionApi extends BaseAPI {
5463
5549
  */
5464
5550
  export const UserApiAxiosParamCreator = function (configuration) {
5465
5551
  return {
5552
+ /**
5553
+ * Get current user
5554
+ * @summary Get current user
5555
+ * @param {*} [options] Override http request option.
5556
+ * @throws {RequiredError}
5557
+ */
5558
+ getCurrentUser: (options = {}) => __awaiter(this, void 0, void 0, function* () {
5559
+ const localVarPath = `/me`;
5560
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
5561
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
5562
+ let baseOptions;
5563
+ if (configuration) {
5564
+ baseOptions = configuration.baseOptions;
5565
+ }
5566
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
5567
+ const localVarHeaderParameter = {};
5568
+ const localVarQueryParameter = {};
5569
+ // authentication systemJWT required
5570
+ // http bearer authentication required
5571
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
5572
+ // authentication customerJWT required
5573
+ // http bearer authentication required
5574
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
5575
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
5576
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
5577
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
5578
+ return {
5579
+ url: toPathString(localVarUrlObj),
5580
+ options: localVarRequestOptions,
5581
+ };
5582
+ }),
5466
5583
  /**
5467
5584
  * Get user by id
5468
5585
  * @summary Get user
@@ -5618,6 +5735,18 @@ export const UserApiAxiosParamCreator = function (configuration) {
5618
5735
  export const UserApiFp = function (configuration) {
5619
5736
  const localVarAxiosParamCreator = UserApiAxiosParamCreator(configuration);
5620
5737
  return {
5738
+ /**
5739
+ * Get current user
5740
+ * @summary Get current user
5741
+ * @param {*} [options] Override http request option.
5742
+ * @throws {RequiredError}
5743
+ */
5744
+ getCurrentUser(options) {
5745
+ return __awaiter(this, void 0, void 0, function* () {
5746
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getCurrentUser(options);
5747
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
5748
+ });
5749
+ },
5621
5750
  /**
5622
5751
  * Get user by id
5623
5752
  * @summary Get user
@@ -5684,6 +5813,15 @@ export const UserApiFp = function (configuration) {
5684
5813
  export const UserApiFactory = function (configuration, basePath, axios) {
5685
5814
  const localVarFp = UserApiFp(configuration);
5686
5815
  return {
5816
+ /**
5817
+ * Get current user
5818
+ * @summary Get current user
5819
+ * @param {*} [options] Override http request option.
5820
+ * @throws {RequiredError}
5821
+ */
5822
+ getCurrentUser(options) {
5823
+ return localVarFp.getCurrentUser(options).then((request) => request(axios, basePath));
5824
+ },
5687
5825
  /**
5688
5826
  * Get user by id
5689
5827
  * @summary Get user
@@ -5738,6 +5876,16 @@ export const UserApiFactory = function (configuration, basePath, axios) {
5738
5876
  * @extends {BaseAPI}
5739
5877
  */
5740
5878
  export class UserApi extends BaseAPI {
5879
+ /**
5880
+ * Get current user
5881
+ * @summary Get current user
5882
+ * @param {*} [options] Override http request option.
5883
+ * @throws {RequiredError}
5884
+ * @memberof UserApi
5885
+ */
5886
+ getCurrentUser(options) {
5887
+ return UserApiFp(this.configuration).getCurrentUser(options).then((request) => request(this.axios, this.basePath));
5888
+ }
5741
5889
  /**
5742
5890
  * Get user by id
5743
5891
  * @summary Get user
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flexinet-api",
3
- "version": "0.0.492-prerelease0",
3
+ "version": "0.0.501-prerelease0",
4
4
  "description": "OpenAPI client for flexinet-api",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "repository": {