flexinet-api 0.0.595-prerelease0 → 0.0.643-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 +2 -2
- package/api.ts +228 -3
- package/dist/api.d.ts +155 -3
- package/dist/api.js +139 -4
- package/dist/esm/api.d.ts +155 -3
- package/dist/esm/api.js +136 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## flexinet-api@0.0.
|
|
1
|
+
## flexinet-api@0.0.643-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.
|
|
39
|
+
npm install flexinet-api@0.0.643-prerelease0 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
package/api.ts
CHANGED
|
@@ -131,6 +131,12 @@ export interface BackofficeConfig {
|
|
|
131
131
|
* @memberof BackofficeConfig
|
|
132
132
|
*/
|
|
133
133
|
'notificationEmailConfig'?: NotificationEmailAddress;
|
|
134
|
+
/**
|
|
135
|
+
*
|
|
136
|
+
* @type {Array<NotificationPreference>}
|
|
137
|
+
* @memberof BackofficeConfig
|
|
138
|
+
*/
|
|
139
|
+
'notificationPreferences'?: Array<NotificationPreference>;
|
|
134
140
|
}
|
|
135
141
|
/**
|
|
136
142
|
*
|
|
@@ -1035,13 +1041,27 @@ export interface Notification {
|
|
|
1035
1041
|
'kind': NotificationKind;
|
|
1036
1042
|
/**
|
|
1037
1043
|
*
|
|
1038
|
-
* @type {string}
|
|
1044
|
+
* @type {Array<string>}
|
|
1039
1045
|
* @memberof Notification
|
|
1040
1046
|
*/
|
|
1041
|
-
'
|
|
1047
|
+
'references'?: Array<string>;
|
|
1042
1048
|
}
|
|
1043
1049
|
|
|
1044
1050
|
|
|
1051
|
+
/**
|
|
1052
|
+
*
|
|
1053
|
+
* @export
|
|
1054
|
+
* @enum {string}
|
|
1055
|
+
*/
|
|
1056
|
+
|
|
1057
|
+
export const NotificationChannel = {
|
|
1058
|
+
Email: 'email',
|
|
1059
|
+
Sms: 'sms'
|
|
1060
|
+
} as const;
|
|
1061
|
+
|
|
1062
|
+
export type NotificationChannel = typeof NotificationChannel[keyof typeof NotificationChannel];
|
|
1063
|
+
|
|
1064
|
+
|
|
1045
1065
|
/**
|
|
1046
1066
|
*
|
|
1047
1067
|
* @export
|
|
@@ -1062,7 +1082,13 @@ export interface NotificationEmailAddress {
|
|
|
1062
1082
|
*/
|
|
1063
1083
|
|
|
1064
1084
|
export const NotificationKind = {
|
|
1065
|
-
|
|
1085
|
+
PromotionStart: 'promotion_start',
|
|
1086
|
+
PromotionHalfTime: 'promotion_half_time',
|
|
1087
|
+
PromotionEnd: 'promotion_end',
|
|
1088
|
+
NewProduct: 'new_product',
|
|
1089
|
+
ExpiryReminder: 'expiry_reminder',
|
|
1090
|
+
OrderConfirmation: 'order_confirmation',
|
|
1091
|
+
ProductRequestResponse: 'product_request_response'
|
|
1066
1092
|
} as const;
|
|
1067
1093
|
|
|
1068
1094
|
export type NotificationKind = typeof NotificationKind[keyof typeof NotificationKind];
|
|
@@ -1099,6 +1125,33 @@ export interface NotificationListResponse {
|
|
|
1099
1125
|
*/
|
|
1100
1126
|
'unreadCount': number;
|
|
1101
1127
|
}
|
|
1128
|
+
/**
|
|
1129
|
+
*
|
|
1130
|
+
* @export
|
|
1131
|
+
* @interface NotificationPreference
|
|
1132
|
+
*/
|
|
1133
|
+
export interface NotificationPreference {
|
|
1134
|
+
/**
|
|
1135
|
+
*
|
|
1136
|
+
* @type {NotificationChannel}
|
|
1137
|
+
* @memberof NotificationPreference
|
|
1138
|
+
*/
|
|
1139
|
+
'channel': NotificationChannel;
|
|
1140
|
+
/**
|
|
1141
|
+
*
|
|
1142
|
+
* @type {boolean}
|
|
1143
|
+
* @memberof NotificationPreference
|
|
1144
|
+
*/
|
|
1145
|
+
'enabled': boolean;
|
|
1146
|
+
/**
|
|
1147
|
+
*
|
|
1148
|
+
* @type {NotificationKind}
|
|
1149
|
+
* @memberof NotificationPreference
|
|
1150
|
+
*/
|
|
1151
|
+
'kind': NotificationKind;
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1154
|
+
|
|
1102
1155
|
/**
|
|
1103
1156
|
*
|
|
1104
1157
|
* @export
|
|
@@ -2003,6 +2056,12 @@ export interface Promotion {
|
|
|
2003
2056
|
* @memberof Promotion
|
|
2004
2057
|
*/
|
|
2005
2058
|
'type': PromotionType;
|
|
2059
|
+
/**
|
|
2060
|
+
*
|
|
2061
|
+
* @type {PromotionNotificationConfig}
|
|
2062
|
+
* @memberof Promotion
|
|
2063
|
+
*/
|
|
2064
|
+
'notificationConfig': PromotionNotificationConfig;
|
|
2006
2065
|
}
|
|
2007
2066
|
|
|
2008
2067
|
|
|
@@ -2025,6 +2084,31 @@ export interface PromotionClaimRequest {
|
|
|
2025
2084
|
*/
|
|
2026
2085
|
'clientId'?: string;
|
|
2027
2086
|
}
|
|
2087
|
+
/**
|
|
2088
|
+
*
|
|
2089
|
+
* @export
|
|
2090
|
+
* @interface PromotionNotificationConfig
|
|
2091
|
+
*/
|
|
2092
|
+
export interface PromotionNotificationConfig {
|
|
2093
|
+
/**
|
|
2094
|
+
*
|
|
2095
|
+
* @type {Array<NotificationChannel>}
|
|
2096
|
+
* @memberof PromotionNotificationConfig
|
|
2097
|
+
*/
|
|
2098
|
+
'channels': Array<NotificationChannel>;
|
|
2099
|
+
/**
|
|
2100
|
+
*
|
|
2101
|
+
* @type {Array<NotificationKind>}
|
|
2102
|
+
* @memberof PromotionNotificationConfig
|
|
2103
|
+
*/
|
|
2104
|
+
'kinds': Array<NotificationKind>;
|
|
2105
|
+
/**
|
|
2106
|
+
*
|
|
2107
|
+
* @type {boolean}
|
|
2108
|
+
* @memberof PromotionNotificationConfig
|
|
2109
|
+
*/
|
|
2110
|
+
'forEachPeriod': boolean;
|
|
2111
|
+
}
|
|
2028
2112
|
/**
|
|
2029
2113
|
*
|
|
2030
2114
|
* @export
|
|
@@ -2121,6 +2205,12 @@ export interface PromotionRequest {
|
|
|
2121
2205
|
* @memberof PromotionRequest
|
|
2122
2206
|
*/
|
|
2123
2207
|
'endAt': string;
|
|
2208
|
+
/**
|
|
2209
|
+
*
|
|
2210
|
+
* @type {PromotionNotificationConfig}
|
|
2211
|
+
* @memberof PromotionRequest
|
|
2212
|
+
*/
|
|
2213
|
+
'notificationConfig'?: PromotionNotificationConfig;
|
|
2124
2214
|
}
|
|
2125
2215
|
|
|
2126
2216
|
|
|
@@ -3080,6 +3170,12 @@ export interface UpdatePromotionRequest {
|
|
|
3080
3170
|
* @memberof UpdatePromotionRequest
|
|
3081
3171
|
*/
|
|
3082
3172
|
'repetition'?: Repetition;
|
|
3173
|
+
/**
|
|
3174
|
+
*
|
|
3175
|
+
* @type {PromotionNotificationConfig}
|
|
3176
|
+
* @memberof UpdatePromotionRequest
|
|
3177
|
+
*/
|
|
3178
|
+
'notificationConfig'?: PromotionNotificationConfig;
|
|
3083
3179
|
}
|
|
3084
3180
|
|
|
3085
3181
|
|
|
@@ -5380,6 +5476,36 @@ export const NotificationApiAxiosParamCreator = function (configuration?: Config
|
|
|
5380
5476
|
|
|
5381
5477
|
|
|
5382
5478
|
|
|
5479
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
5480
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
5481
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
5482
|
+
|
|
5483
|
+
return {
|
|
5484
|
+
url: toPathString(localVarUrlObj),
|
|
5485
|
+
options: localVarRequestOptions,
|
|
5486
|
+
};
|
|
5487
|
+
},
|
|
5488
|
+
/**
|
|
5489
|
+
* Get notification preferences for the authenticated user
|
|
5490
|
+
* @summary Get notification preferences
|
|
5491
|
+
* @param {*} [options] Override http request option.
|
|
5492
|
+
* @throws {RequiredError}
|
|
5493
|
+
*/
|
|
5494
|
+
getNotificationPreferences: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
5495
|
+
const localVarPath = `/users/notifications/preferences`;
|
|
5496
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
5497
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
5498
|
+
let baseOptions;
|
|
5499
|
+
if (configuration) {
|
|
5500
|
+
baseOptions = configuration.baseOptions;
|
|
5501
|
+
}
|
|
5502
|
+
|
|
5503
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
5504
|
+
const localVarHeaderParameter = {} as any;
|
|
5505
|
+
const localVarQueryParameter = {} as any;
|
|
5506
|
+
|
|
5507
|
+
|
|
5508
|
+
|
|
5383
5509
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
5384
5510
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
5385
5511
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
@@ -5466,6 +5592,42 @@ export const NotificationApiAxiosParamCreator = function (configuration?: Config
|
|
|
5466
5592
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
5467
5593
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
5468
5594
|
|
|
5595
|
+
return {
|
|
5596
|
+
url: toPathString(localVarUrlObj),
|
|
5597
|
+
options: localVarRequestOptions,
|
|
5598
|
+
};
|
|
5599
|
+
},
|
|
5600
|
+
/**
|
|
5601
|
+
* Update notification preferences for the authenticated user
|
|
5602
|
+
* @summary Update notification preferences
|
|
5603
|
+
* @param {Array<NotificationPreference>} notificationPreference notification preferences
|
|
5604
|
+
* @param {*} [options] Override http request option.
|
|
5605
|
+
* @throws {RequiredError}
|
|
5606
|
+
*/
|
|
5607
|
+
updateNotificationPreferences: async (notificationPreference: Array<NotificationPreference>, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
5608
|
+
// verify required parameter 'notificationPreference' is not null or undefined
|
|
5609
|
+
assertParamExists('updateNotificationPreferences', 'notificationPreference', notificationPreference)
|
|
5610
|
+
const localVarPath = `/users/notifications/preferences`;
|
|
5611
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
5612
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
5613
|
+
let baseOptions;
|
|
5614
|
+
if (configuration) {
|
|
5615
|
+
baseOptions = configuration.baseOptions;
|
|
5616
|
+
}
|
|
5617
|
+
|
|
5618
|
+
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
|
|
5619
|
+
const localVarHeaderParameter = {} as any;
|
|
5620
|
+
const localVarQueryParameter = {} as any;
|
|
5621
|
+
|
|
5622
|
+
|
|
5623
|
+
|
|
5624
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
5625
|
+
|
|
5626
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
5627
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
5628
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
5629
|
+
localVarRequestOptions.data = serializeDataIfNeeded(notificationPreference, localVarRequestOptions, configuration)
|
|
5630
|
+
|
|
5469
5631
|
return {
|
|
5470
5632
|
url: toPathString(localVarUrlObj),
|
|
5471
5633
|
options: localVarRequestOptions,
|
|
@@ -5503,6 +5665,16 @@ export const NotificationApiFp = function(configuration?: Configuration) {
|
|
|
5503
5665
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getNotification(notificationID, options);
|
|
5504
5666
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
5505
5667
|
},
|
|
5668
|
+
/**
|
|
5669
|
+
* Get notification preferences for the authenticated user
|
|
5670
|
+
* @summary Get notification preferences
|
|
5671
|
+
* @param {*} [options] Override http request option.
|
|
5672
|
+
* @throws {RequiredError}
|
|
5673
|
+
*/
|
|
5674
|
+
async getNotificationPreferences(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<NotificationPreference>>> {
|
|
5675
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getNotificationPreferences(options);
|
|
5676
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
5677
|
+
},
|
|
5506
5678
|
/**
|
|
5507
5679
|
* List paginated notifications
|
|
5508
5680
|
* @summary List notifications
|
|
@@ -5526,6 +5698,17 @@ export const NotificationApiFp = function(configuration?: Configuration) {
|
|
|
5526
5698
|
const localVarAxiosArgs = await localVarAxiosParamCreator.markNotificationAsRead(notificationID, options);
|
|
5527
5699
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
5528
5700
|
},
|
|
5701
|
+
/**
|
|
5702
|
+
* Update notification preferences for the authenticated user
|
|
5703
|
+
* @summary Update notification preferences
|
|
5704
|
+
* @param {Array<NotificationPreference>} notificationPreference notification preferences
|
|
5705
|
+
* @param {*} [options] Override http request option.
|
|
5706
|
+
* @throws {RequiredError}
|
|
5707
|
+
*/
|
|
5708
|
+
async updateNotificationPreferences(notificationPreference: Array<NotificationPreference>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
5709
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.updateNotificationPreferences(notificationPreference, options);
|
|
5710
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
5711
|
+
},
|
|
5529
5712
|
}
|
|
5530
5713
|
};
|
|
5531
5714
|
|
|
@@ -5556,6 +5739,15 @@ export const NotificationApiFactory = function (configuration?: Configuration, b
|
|
|
5556
5739
|
getNotification(notificationID: string, options?: any): AxiosPromise<Notification> {
|
|
5557
5740
|
return localVarFp.getNotification(notificationID, options).then((request) => request(axios, basePath));
|
|
5558
5741
|
},
|
|
5742
|
+
/**
|
|
5743
|
+
* Get notification preferences for the authenticated user
|
|
5744
|
+
* @summary Get notification preferences
|
|
5745
|
+
* @param {*} [options] Override http request option.
|
|
5746
|
+
* @throws {RequiredError}
|
|
5747
|
+
*/
|
|
5748
|
+
getNotificationPreferences(options?: any): AxiosPromise<Array<NotificationPreference>> {
|
|
5749
|
+
return localVarFp.getNotificationPreferences(options).then((request) => request(axios, basePath));
|
|
5750
|
+
},
|
|
5559
5751
|
/**
|
|
5560
5752
|
* List paginated notifications
|
|
5561
5753
|
* @summary List notifications
|
|
@@ -5577,6 +5769,16 @@ export const NotificationApiFactory = function (configuration?: Configuration, b
|
|
|
5577
5769
|
markNotificationAsRead(notificationID: string, options?: any): AxiosPromise<void> {
|
|
5578
5770
|
return localVarFp.markNotificationAsRead(notificationID, options).then((request) => request(axios, basePath));
|
|
5579
5771
|
},
|
|
5772
|
+
/**
|
|
5773
|
+
* Update notification preferences for the authenticated user
|
|
5774
|
+
* @summary Update notification preferences
|
|
5775
|
+
* @param {Array<NotificationPreference>} notificationPreference notification preferences
|
|
5776
|
+
* @param {*} [options] Override http request option.
|
|
5777
|
+
* @throws {RequiredError}
|
|
5778
|
+
*/
|
|
5779
|
+
updateNotificationPreferences(notificationPreference: Array<NotificationPreference>, options?: any): AxiosPromise<void> {
|
|
5780
|
+
return localVarFp.updateNotificationPreferences(notificationPreference, options).then((request) => request(axios, basePath));
|
|
5781
|
+
},
|
|
5580
5782
|
};
|
|
5581
5783
|
};
|
|
5582
5784
|
|
|
@@ -5611,6 +5813,17 @@ export class NotificationApi extends BaseAPI {
|
|
|
5611
5813
|
return NotificationApiFp(this.configuration).getNotification(notificationID, options).then((request) => request(this.axios, this.basePath));
|
|
5612
5814
|
}
|
|
5613
5815
|
|
|
5816
|
+
/**
|
|
5817
|
+
* Get notification preferences for the authenticated user
|
|
5818
|
+
* @summary Get notification preferences
|
|
5819
|
+
* @param {*} [options] Override http request option.
|
|
5820
|
+
* @throws {RequiredError}
|
|
5821
|
+
* @memberof NotificationApi
|
|
5822
|
+
*/
|
|
5823
|
+
public getNotificationPreferences(options?: AxiosRequestConfig) {
|
|
5824
|
+
return NotificationApiFp(this.configuration).getNotificationPreferences(options).then((request) => request(this.axios, this.basePath));
|
|
5825
|
+
}
|
|
5826
|
+
|
|
5614
5827
|
/**
|
|
5615
5828
|
* List paginated notifications
|
|
5616
5829
|
* @summary List notifications
|
|
@@ -5635,6 +5848,18 @@ export class NotificationApi extends BaseAPI {
|
|
|
5635
5848
|
public markNotificationAsRead(notificationID: string, options?: AxiosRequestConfig) {
|
|
5636
5849
|
return NotificationApiFp(this.configuration).markNotificationAsRead(notificationID, options).then((request) => request(this.axios, this.basePath));
|
|
5637
5850
|
}
|
|
5851
|
+
|
|
5852
|
+
/**
|
|
5853
|
+
* Update notification preferences for the authenticated user
|
|
5854
|
+
* @summary Update notification preferences
|
|
5855
|
+
* @param {Array<NotificationPreference>} notificationPreference notification preferences
|
|
5856
|
+
* @param {*} [options] Override http request option.
|
|
5857
|
+
* @throws {RequiredError}
|
|
5858
|
+
* @memberof NotificationApi
|
|
5859
|
+
*/
|
|
5860
|
+
public updateNotificationPreferences(notificationPreference: Array<NotificationPreference>, options?: AxiosRequestConfig) {
|
|
5861
|
+
return NotificationApiFp(this.configuration).updateNotificationPreferences(notificationPreference, options).then((request) => request(this.axios, this.basePath));
|
|
5862
|
+
}
|
|
5638
5863
|
}
|
|
5639
5864
|
|
|
5640
5865
|
|
package/dist/api.d.ts
CHANGED
|
@@ -114,6 +114,12 @@ export interface BackofficeConfig {
|
|
|
114
114
|
* @memberof BackofficeConfig
|
|
115
115
|
*/
|
|
116
116
|
'notificationEmailConfig'?: NotificationEmailAddress;
|
|
117
|
+
/**
|
|
118
|
+
*
|
|
119
|
+
* @type {Array<NotificationPreference>}
|
|
120
|
+
* @memberof BackofficeConfig
|
|
121
|
+
*/
|
|
122
|
+
'notificationPreferences'?: Array<NotificationPreference>;
|
|
117
123
|
}
|
|
118
124
|
/**
|
|
119
125
|
*
|
|
@@ -986,11 +992,21 @@ export interface Notification {
|
|
|
986
992
|
'kind': NotificationKind;
|
|
987
993
|
/**
|
|
988
994
|
*
|
|
989
|
-
* @type {string}
|
|
995
|
+
* @type {Array<string>}
|
|
990
996
|
* @memberof Notification
|
|
991
997
|
*/
|
|
992
|
-
'
|
|
998
|
+
'references'?: Array<string>;
|
|
993
999
|
}
|
|
1000
|
+
/**
|
|
1001
|
+
*
|
|
1002
|
+
* @export
|
|
1003
|
+
* @enum {string}
|
|
1004
|
+
*/
|
|
1005
|
+
export declare const NotificationChannel: {
|
|
1006
|
+
readonly Email: "email";
|
|
1007
|
+
readonly Sms: "sms";
|
|
1008
|
+
};
|
|
1009
|
+
export type NotificationChannel = typeof NotificationChannel[keyof typeof NotificationChannel];
|
|
994
1010
|
/**
|
|
995
1011
|
*
|
|
996
1012
|
* @export
|
|
@@ -1010,7 +1026,13 @@ export interface NotificationEmailAddress {
|
|
|
1010
1026
|
* @enum {string}
|
|
1011
1027
|
*/
|
|
1012
1028
|
export declare const NotificationKind: {
|
|
1013
|
-
readonly
|
|
1029
|
+
readonly PromotionStart: "promotion_start";
|
|
1030
|
+
readonly PromotionHalfTime: "promotion_half_time";
|
|
1031
|
+
readonly PromotionEnd: "promotion_end";
|
|
1032
|
+
readonly NewProduct: "new_product";
|
|
1033
|
+
readonly ExpiryReminder: "expiry_reminder";
|
|
1034
|
+
readonly OrderConfirmation: "order_confirmation";
|
|
1035
|
+
readonly ProductRequestResponse: "product_request_response";
|
|
1014
1036
|
};
|
|
1015
1037
|
export type NotificationKind = typeof NotificationKind[keyof typeof NotificationKind];
|
|
1016
1038
|
/**
|
|
@@ -1044,6 +1066,31 @@ export interface NotificationListResponse {
|
|
|
1044
1066
|
*/
|
|
1045
1067
|
'unreadCount': number;
|
|
1046
1068
|
}
|
|
1069
|
+
/**
|
|
1070
|
+
*
|
|
1071
|
+
* @export
|
|
1072
|
+
* @interface NotificationPreference
|
|
1073
|
+
*/
|
|
1074
|
+
export interface NotificationPreference {
|
|
1075
|
+
/**
|
|
1076
|
+
*
|
|
1077
|
+
* @type {NotificationChannel}
|
|
1078
|
+
* @memberof NotificationPreference
|
|
1079
|
+
*/
|
|
1080
|
+
'channel': NotificationChannel;
|
|
1081
|
+
/**
|
|
1082
|
+
*
|
|
1083
|
+
* @type {boolean}
|
|
1084
|
+
* @memberof NotificationPreference
|
|
1085
|
+
*/
|
|
1086
|
+
'enabled': boolean;
|
|
1087
|
+
/**
|
|
1088
|
+
*
|
|
1089
|
+
* @type {NotificationKind}
|
|
1090
|
+
* @memberof NotificationPreference
|
|
1091
|
+
*/
|
|
1092
|
+
'kind': NotificationKind;
|
|
1093
|
+
}
|
|
1047
1094
|
/**
|
|
1048
1095
|
*
|
|
1049
1096
|
* @export
|
|
@@ -1910,6 +1957,12 @@ export interface Promotion {
|
|
|
1910
1957
|
* @memberof Promotion
|
|
1911
1958
|
*/
|
|
1912
1959
|
'type': PromotionType;
|
|
1960
|
+
/**
|
|
1961
|
+
*
|
|
1962
|
+
* @type {PromotionNotificationConfig}
|
|
1963
|
+
* @memberof Promotion
|
|
1964
|
+
*/
|
|
1965
|
+
'notificationConfig': PromotionNotificationConfig;
|
|
1913
1966
|
}
|
|
1914
1967
|
/**
|
|
1915
1968
|
*
|
|
@@ -1930,6 +1983,31 @@ export interface PromotionClaimRequest {
|
|
|
1930
1983
|
*/
|
|
1931
1984
|
'clientId'?: string;
|
|
1932
1985
|
}
|
|
1986
|
+
/**
|
|
1987
|
+
*
|
|
1988
|
+
* @export
|
|
1989
|
+
* @interface PromotionNotificationConfig
|
|
1990
|
+
*/
|
|
1991
|
+
export interface PromotionNotificationConfig {
|
|
1992
|
+
/**
|
|
1993
|
+
*
|
|
1994
|
+
* @type {Array<NotificationChannel>}
|
|
1995
|
+
* @memberof PromotionNotificationConfig
|
|
1996
|
+
*/
|
|
1997
|
+
'channels': Array<NotificationChannel>;
|
|
1998
|
+
/**
|
|
1999
|
+
*
|
|
2000
|
+
* @type {Array<NotificationKind>}
|
|
2001
|
+
* @memberof PromotionNotificationConfig
|
|
2002
|
+
*/
|
|
2003
|
+
'kinds': Array<NotificationKind>;
|
|
2004
|
+
/**
|
|
2005
|
+
*
|
|
2006
|
+
* @type {boolean}
|
|
2007
|
+
* @memberof PromotionNotificationConfig
|
|
2008
|
+
*/
|
|
2009
|
+
'forEachPeriod': boolean;
|
|
2010
|
+
}
|
|
1933
2011
|
/**
|
|
1934
2012
|
*
|
|
1935
2013
|
* @export
|
|
@@ -2028,6 +2106,12 @@ export interface PromotionRequest {
|
|
|
2028
2106
|
* @memberof PromotionRequest
|
|
2029
2107
|
*/
|
|
2030
2108
|
'endAt': string;
|
|
2109
|
+
/**
|
|
2110
|
+
*
|
|
2111
|
+
* @type {PromotionNotificationConfig}
|
|
2112
|
+
* @memberof PromotionRequest
|
|
2113
|
+
*/
|
|
2114
|
+
'notificationConfig'?: PromotionNotificationConfig;
|
|
2031
2115
|
}
|
|
2032
2116
|
/**
|
|
2033
2117
|
*
|
|
@@ -2922,6 +3006,12 @@ export interface UpdatePromotionRequest {
|
|
|
2922
3006
|
* @memberof UpdatePromotionRequest
|
|
2923
3007
|
*/
|
|
2924
3008
|
'repetition'?: Repetition;
|
|
3009
|
+
/**
|
|
3010
|
+
*
|
|
3011
|
+
* @type {PromotionNotificationConfig}
|
|
3012
|
+
* @memberof UpdatePromotionRequest
|
|
3013
|
+
*/
|
|
3014
|
+
'notificationConfig'?: PromotionNotificationConfig;
|
|
2925
3015
|
}
|
|
2926
3016
|
/**
|
|
2927
3017
|
*
|
|
@@ -4205,6 +4295,13 @@ export declare const NotificationApiAxiosParamCreator: (configuration?: Configur
|
|
|
4205
4295
|
* @throws {RequiredError}
|
|
4206
4296
|
*/
|
|
4207
4297
|
getNotification: (notificationID: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
4298
|
+
/**
|
|
4299
|
+
* Get notification preferences for the authenticated user
|
|
4300
|
+
* @summary Get notification preferences
|
|
4301
|
+
* @param {*} [options] Override http request option.
|
|
4302
|
+
* @throws {RequiredError}
|
|
4303
|
+
*/
|
|
4304
|
+
getNotificationPreferences: (options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
4208
4305
|
/**
|
|
4209
4306
|
* List paginated notifications
|
|
4210
4307
|
* @summary List notifications
|
|
@@ -4222,6 +4319,14 @@ export declare const NotificationApiAxiosParamCreator: (configuration?: Configur
|
|
|
4222
4319
|
* @throws {RequiredError}
|
|
4223
4320
|
*/
|
|
4224
4321
|
markNotificationAsRead: (notificationID: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
4322
|
+
/**
|
|
4323
|
+
* Update notification preferences for the authenticated user
|
|
4324
|
+
* @summary Update notification preferences
|
|
4325
|
+
* @param {Array<NotificationPreference>} notificationPreference notification preferences
|
|
4326
|
+
* @param {*} [options] Override http request option.
|
|
4327
|
+
* @throws {RequiredError}
|
|
4328
|
+
*/
|
|
4329
|
+
updateNotificationPreferences: (notificationPreference: Array<NotificationPreference>, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
4225
4330
|
};
|
|
4226
4331
|
/**
|
|
4227
4332
|
* NotificationApi - functional programming interface
|
|
@@ -4244,6 +4349,13 @@ export declare const NotificationApiFp: (configuration?: Configuration) => {
|
|
|
4244
4349
|
* @throws {RequiredError}
|
|
4245
4350
|
*/
|
|
4246
4351
|
getNotification(notificationID: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Notification>>;
|
|
4352
|
+
/**
|
|
4353
|
+
* Get notification preferences for the authenticated user
|
|
4354
|
+
* @summary Get notification preferences
|
|
4355
|
+
* @param {*} [options] Override http request option.
|
|
4356
|
+
* @throws {RequiredError}
|
|
4357
|
+
*/
|
|
4358
|
+
getNotificationPreferences(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<NotificationPreference>>>;
|
|
4247
4359
|
/**
|
|
4248
4360
|
* List paginated notifications
|
|
4249
4361
|
* @summary List notifications
|
|
@@ -4261,6 +4373,14 @@ export declare const NotificationApiFp: (configuration?: Configuration) => {
|
|
|
4261
4373
|
* @throws {RequiredError}
|
|
4262
4374
|
*/
|
|
4263
4375
|
markNotificationAsRead(notificationID: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
|
|
4376
|
+
/**
|
|
4377
|
+
* Update notification preferences for the authenticated user
|
|
4378
|
+
* @summary Update notification preferences
|
|
4379
|
+
* @param {Array<NotificationPreference>} notificationPreference notification preferences
|
|
4380
|
+
* @param {*} [options] Override http request option.
|
|
4381
|
+
* @throws {RequiredError}
|
|
4382
|
+
*/
|
|
4383
|
+
updateNotificationPreferences(notificationPreference: Array<NotificationPreference>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
|
|
4264
4384
|
};
|
|
4265
4385
|
/**
|
|
4266
4386
|
* NotificationApi - factory interface
|
|
@@ -4283,6 +4403,13 @@ export declare const NotificationApiFactory: (configuration?: Configuration, bas
|
|
|
4283
4403
|
* @throws {RequiredError}
|
|
4284
4404
|
*/
|
|
4285
4405
|
getNotification(notificationID: string, options?: any): AxiosPromise<Notification>;
|
|
4406
|
+
/**
|
|
4407
|
+
* Get notification preferences for the authenticated user
|
|
4408
|
+
* @summary Get notification preferences
|
|
4409
|
+
* @param {*} [options] Override http request option.
|
|
4410
|
+
* @throws {RequiredError}
|
|
4411
|
+
*/
|
|
4412
|
+
getNotificationPreferences(options?: any): AxiosPromise<Array<NotificationPreference>>;
|
|
4286
4413
|
/**
|
|
4287
4414
|
* List paginated notifications
|
|
4288
4415
|
* @summary List notifications
|
|
@@ -4300,6 +4427,14 @@ export declare const NotificationApiFactory: (configuration?: Configuration, bas
|
|
|
4300
4427
|
* @throws {RequiredError}
|
|
4301
4428
|
*/
|
|
4302
4429
|
markNotificationAsRead(notificationID: string, options?: any): AxiosPromise<void>;
|
|
4430
|
+
/**
|
|
4431
|
+
* Update notification preferences for the authenticated user
|
|
4432
|
+
* @summary Update notification preferences
|
|
4433
|
+
* @param {Array<NotificationPreference>} notificationPreference notification preferences
|
|
4434
|
+
* @param {*} [options] Override http request option.
|
|
4435
|
+
* @throws {RequiredError}
|
|
4436
|
+
*/
|
|
4437
|
+
updateNotificationPreferences(notificationPreference: Array<NotificationPreference>, options?: any): AxiosPromise<void>;
|
|
4303
4438
|
};
|
|
4304
4439
|
/**
|
|
4305
4440
|
* NotificationApi - object-oriented interface
|
|
@@ -4326,6 +4461,14 @@ export declare class NotificationApi extends BaseAPI {
|
|
|
4326
4461
|
* @memberof NotificationApi
|
|
4327
4462
|
*/
|
|
4328
4463
|
getNotification(notificationID: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<Notification, any>>;
|
|
4464
|
+
/**
|
|
4465
|
+
* Get notification preferences for the authenticated user
|
|
4466
|
+
* @summary Get notification preferences
|
|
4467
|
+
* @param {*} [options] Override http request option.
|
|
4468
|
+
* @throws {RequiredError}
|
|
4469
|
+
* @memberof NotificationApi
|
|
4470
|
+
*/
|
|
4471
|
+
getNotificationPreferences(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<NotificationPreference[], any>>;
|
|
4329
4472
|
/**
|
|
4330
4473
|
* List paginated notifications
|
|
4331
4474
|
* @summary List notifications
|
|
@@ -4345,6 +4488,15 @@ export declare class NotificationApi extends BaseAPI {
|
|
|
4345
4488
|
* @memberof NotificationApi
|
|
4346
4489
|
*/
|
|
4347
4490
|
markNotificationAsRead(notificationID: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
|
|
4491
|
+
/**
|
|
4492
|
+
* Update notification preferences for the authenticated user
|
|
4493
|
+
* @summary Update notification preferences
|
|
4494
|
+
* @param {Array<NotificationPreference>} notificationPreference notification preferences
|
|
4495
|
+
* @param {*} [options] Override http request option.
|
|
4496
|
+
* @throws {RequiredError}
|
|
4497
|
+
* @memberof NotificationApi
|
|
4498
|
+
*/
|
|
4499
|
+
updateNotificationPreferences(notificationPreference: Array<NotificationPreference>, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
|
|
4348
4500
|
}
|
|
4349
4501
|
/**
|
|
4350
4502
|
* OrderApi - axios parameter creator
|
package/dist/api.js
CHANGED
|
@@ -22,9 +22,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.
|
|
26
|
-
exports.
|
|
27
|
-
exports.UserApi = exports.UserApiFactory = exports.UserApiFp = void 0;
|
|
25
|
+
exports.ClientApiFactory = exports.ClientApiFp = exports.ClientApiAxiosParamCreator = exports.CategoryApi = exports.CategoryApiFactory = exports.CategoryApiFp = exports.CategoryApiAxiosParamCreator = exports.BalanceApi = exports.BalanceApiFactory = exports.BalanceApiFp = exports.BalanceApiAxiosParamCreator = exports.AuditApi = exports.AuditApiFactory = exports.AuditApiFp = exports.AuditApiAxiosParamCreator = exports.WebhookKind = exports.UserSource = exports.UserRole = exports.TransactionSource = exports.TransactionKind = exports.TransactionEventKind = exports.TargetMu = exports.TagValidatorType = exports.TagRuleKind = exports.TagDataType = exports.SortDirection = exports.RuleKind = exports.RuleGroupState = exports.Repetition = exports.PromotionType = exports.PromotionSortByField = exports.ProgressState = exports.ProductUsage = exports.ProductStatus = exports.ProductRequestStatus = exports.ProductRequestApprovalRequestStatusEnum = exports.ProductKind = exports.ProductAvailability = exports.OrderKindEnum = exports.NotificationStatus = exports.NotificationKind = exports.NotificationChannel = exports.Feature = exports.EventCreationRequestKindEnum = exports.CustomDealRestrictionPriority = exports.Condition = exports.BonusMu = exports.BeneficiaryKind = exports.AuditLogObjectType = exports.AuditLogActionEnum = void 0;
|
|
26
|
+
exports.TransactionApi = exports.TransactionApiFactory = exports.TransactionApiFp = exports.TransactionApiAxiosParamCreator = exports.TagApi = exports.TagApiFactory = exports.TagApiFp = exports.TagApiAxiosParamCreator = exports.SegmentApi = exports.SegmentApiFactory = exports.SegmentApiFp = exports.SegmentApiAxiosParamCreator = exports.PromotionApi = exports.PromotionApiFactory = exports.PromotionApiFp = exports.PromotionApiAxiosParamCreator = exports.ListProgressIntervalEnum = exports.ProgressApi = exports.ProgressApiFactory = exports.ProgressApiFp = exports.ProgressApiAxiosParamCreator = exports.ProductApi = exports.ProductApiFactory = exports.ProductApiFp = exports.ProductApiAxiosParamCreator = exports.OrderApi = exports.OrderApiFactory = exports.OrderApiFp = exports.OrderApiAxiosParamCreator = exports.NotificationApi = exports.NotificationApiFactory = exports.NotificationApiFp = exports.NotificationApiAxiosParamCreator = exports.IntegrationApi = exports.IntegrationApiFactory = exports.IntegrationApiFp = exports.IntegrationApiAxiosParamCreator = exports.DefaultApi = exports.DefaultApiFactory = exports.DefaultApiFp = exports.DefaultApiAxiosParamCreator = exports.CustomDealsApi = exports.CustomDealsApiFactory = exports.CustomDealsApiFp = exports.CustomDealsApiAxiosParamCreator = exports.ConfigurationApi = exports.ConfigurationApiFactory = exports.ConfigurationApiFp = exports.ConfigurationApiAxiosParamCreator = exports.ClientApi = void 0;
|
|
27
|
+
exports.UserApi = exports.UserApiFactory = exports.UserApiFp = exports.UserApiAxiosParamCreator = void 0;
|
|
28
28
|
const axios_1 = require("axios");
|
|
29
29
|
// Some imports not used depending on template conditions
|
|
30
30
|
// @ts-ignore
|
|
@@ -94,13 +94,28 @@ exports.Feature = {
|
|
|
94
94
|
SalesBudget: 'sales_budget',
|
|
95
95
|
CustomDeals: 'custom_deals'
|
|
96
96
|
};
|
|
97
|
+
/**
|
|
98
|
+
*
|
|
99
|
+
* @export
|
|
100
|
+
* @enum {string}
|
|
101
|
+
*/
|
|
102
|
+
exports.NotificationChannel = {
|
|
103
|
+
Email: 'email',
|
|
104
|
+
Sms: 'sms'
|
|
105
|
+
};
|
|
97
106
|
/**
|
|
98
107
|
*
|
|
99
108
|
* @export
|
|
100
109
|
* @enum {string}
|
|
101
110
|
*/
|
|
102
111
|
exports.NotificationKind = {
|
|
103
|
-
|
|
112
|
+
PromotionStart: 'promotion_start',
|
|
113
|
+
PromotionHalfTime: 'promotion_half_time',
|
|
114
|
+
PromotionEnd: 'promotion_end',
|
|
115
|
+
NewProduct: 'new_product',
|
|
116
|
+
ExpiryReminder: 'expiry_reminder',
|
|
117
|
+
OrderConfirmation: 'order_confirmation',
|
|
118
|
+
ProductRequestResponse: 'product_request_response'
|
|
104
119
|
};
|
|
105
120
|
/**
|
|
106
121
|
*
|
|
@@ -2132,6 +2147,31 @@ const NotificationApiAxiosParamCreator = function (configuration) {
|
|
|
2132
2147
|
options: localVarRequestOptions,
|
|
2133
2148
|
};
|
|
2134
2149
|
}),
|
|
2150
|
+
/**
|
|
2151
|
+
* Get notification preferences for the authenticated user
|
|
2152
|
+
* @summary Get notification preferences
|
|
2153
|
+
* @param {*} [options] Override http request option.
|
|
2154
|
+
* @throws {RequiredError}
|
|
2155
|
+
*/
|
|
2156
|
+
getNotificationPreferences: (options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2157
|
+
const localVarPath = `/users/notifications/preferences`;
|
|
2158
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2159
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2160
|
+
let baseOptions;
|
|
2161
|
+
if (configuration) {
|
|
2162
|
+
baseOptions = configuration.baseOptions;
|
|
2163
|
+
}
|
|
2164
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2165
|
+
const localVarHeaderParameter = {};
|
|
2166
|
+
const localVarQueryParameter = {};
|
|
2167
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2168
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2169
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2170
|
+
return {
|
|
2171
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2172
|
+
options: localVarRequestOptions,
|
|
2173
|
+
};
|
|
2174
|
+
}),
|
|
2135
2175
|
/**
|
|
2136
2176
|
* List paginated notifications
|
|
2137
2177
|
* @summary List notifications
|
|
@@ -2200,6 +2240,36 @@ const NotificationApiAxiosParamCreator = function (configuration) {
|
|
|
2200
2240
|
options: localVarRequestOptions,
|
|
2201
2241
|
};
|
|
2202
2242
|
}),
|
|
2243
|
+
/**
|
|
2244
|
+
* Update notification preferences for the authenticated user
|
|
2245
|
+
* @summary Update notification preferences
|
|
2246
|
+
* @param {Array<NotificationPreference>} notificationPreference notification preferences
|
|
2247
|
+
* @param {*} [options] Override http request option.
|
|
2248
|
+
* @throws {RequiredError}
|
|
2249
|
+
*/
|
|
2250
|
+
updateNotificationPreferences: (notificationPreference, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2251
|
+
// verify required parameter 'notificationPreference' is not null or undefined
|
|
2252
|
+
(0, common_1.assertParamExists)('updateNotificationPreferences', 'notificationPreference', notificationPreference);
|
|
2253
|
+
const localVarPath = `/users/notifications/preferences`;
|
|
2254
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2255
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2256
|
+
let baseOptions;
|
|
2257
|
+
if (configuration) {
|
|
2258
|
+
baseOptions = configuration.baseOptions;
|
|
2259
|
+
}
|
|
2260
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
|
|
2261
|
+
const localVarHeaderParameter = {};
|
|
2262
|
+
const localVarQueryParameter = {};
|
|
2263
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
2264
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2265
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2266
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2267
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(notificationPreference, localVarRequestOptions, configuration);
|
|
2268
|
+
return {
|
|
2269
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2270
|
+
options: localVarRequestOptions,
|
|
2271
|
+
};
|
|
2272
|
+
}),
|
|
2203
2273
|
};
|
|
2204
2274
|
};
|
|
2205
2275
|
exports.NotificationApiAxiosParamCreator = NotificationApiAxiosParamCreator;
|
|
@@ -2236,6 +2306,18 @@ const NotificationApiFp = function (configuration) {
|
|
|
2236
2306
|
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
2237
2307
|
});
|
|
2238
2308
|
},
|
|
2309
|
+
/**
|
|
2310
|
+
* Get notification preferences for the authenticated user
|
|
2311
|
+
* @summary Get notification preferences
|
|
2312
|
+
* @param {*} [options] Override http request option.
|
|
2313
|
+
* @throws {RequiredError}
|
|
2314
|
+
*/
|
|
2315
|
+
getNotificationPreferences(options) {
|
|
2316
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2317
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getNotificationPreferences(options);
|
|
2318
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
2319
|
+
});
|
|
2320
|
+
},
|
|
2239
2321
|
/**
|
|
2240
2322
|
* List paginated notifications
|
|
2241
2323
|
* @summary List notifications
|
|
@@ -2263,6 +2345,19 @@ const NotificationApiFp = function (configuration) {
|
|
|
2263
2345
|
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
2264
2346
|
});
|
|
2265
2347
|
},
|
|
2348
|
+
/**
|
|
2349
|
+
* Update notification preferences for the authenticated user
|
|
2350
|
+
* @summary Update notification preferences
|
|
2351
|
+
* @param {Array<NotificationPreference>} notificationPreference notification preferences
|
|
2352
|
+
* @param {*} [options] Override http request option.
|
|
2353
|
+
* @throws {RequiredError}
|
|
2354
|
+
*/
|
|
2355
|
+
updateNotificationPreferences(notificationPreference, options) {
|
|
2356
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2357
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.updateNotificationPreferences(notificationPreference, options);
|
|
2358
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
2359
|
+
});
|
|
2360
|
+
},
|
|
2266
2361
|
};
|
|
2267
2362
|
};
|
|
2268
2363
|
exports.NotificationApiFp = NotificationApiFp;
|
|
@@ -2293,6 +2388,15 @@ const NotificationApiFactory = function (configuration, basePath, axios) {
|
|
|
2293
2388
|
getNotification(notificationID, options) {
|
|
2294
2389
|
return localVarFp.getNotification(notificationID, options).then((request) => request(axios, basePath));
|
|
2295
2390
|
},
|
|
2391
|
+
/**
|
|
2392
|
+
* Get notification preferences for the authenticated user
|
|
2393
|
+
* @summary Get notification preferences
|
|
2394
|
+
* @param {*} [options] Override http request option.
|
|
2395
|
+
* @throws {RequiredError}
|
|
2396
|
+
*/
|
|
2397
|
+
getNotificationPreferences(options) {
|
|
2398
|
+
return localVarFp.getNotificationPreferences(options).then((request) => request(axios, basePath));
|
|
2399
|
+
},
|
|
2296
2400
|
/**
|
|
2297
2401
|
* List paginated notifications
|
|
2298
2402
|
* @summary List notifications
|
|
@@ -2314,6 +2418,16 @@ const NotificationApiFactory = function (configuration, basePath, axios) {
|
|
|
2314
2418
|
markNotificationAsRead(notificationID, options) {
|
|
2315
2419
|
return localVarFp.markNotificationAsRead(notificationID, options).then((request) => request(axios, basePath));
|
|
2316
2420
|
},
|
|
2421
|
+
/**
|
|
2422
|
+
* Update notification preferences for the authenticated user
|
|
2423
|
+
* @summary Update notification preferences
|
|
2424
|
+
* @param {Array<NotificationPreference>} notificationPreference notification preferences
|
|
2425
|
+
* @param {*} [options] Override http request option.
|
|
2426
|
+
* @throws {RequiredError}
|
|
2427
|
+
*/
|
|
2428
|
+
updateNotificationPreferences(notificationPreference, options) {
|
|
2429
|
+
return localVarFp.updateNotificationPreferences(notificationPreference, options).then((request) => request(axios, basePath));
|
|
2430
|
+
},
|
|
2317
2431
|
};
|
|
2318
2432
|
};
|
|
2319
2433
|
exports.NotificationApiFactory = NotificationApiFactory;
|
|
@@ -2346,6 +2460,16 @@ class NotificationApi extends base_1.BaseAPI {
|
|
|
2346
2460
|
getNotification(notificationID, options) {
|
|
2347
2461
|
return (0, exports.NotificationApiFp)(this.configuration).getNotification(notificationID, options).then((request) => request(this.axios, this.basePath));
|
|
2348
2462
|
}
|
|
2463
|
+
/**
|
|
2464
|
+
* Get notification preferences for the authenticated user
|
|
2465
|
+
* @summary Get notification preferences
|
|
2466
|
+
* @param {*} [options] Override http request option.
|
|
2467
|
+
* @throws {RequiredError}
|
|
2468
|
+
* @memberof NotificationApi
|
|
2469
|
+
*/
|
|
2470
|
+
getNotificationPreferences(options) {
|
|
2471
|
+
return (0, exports.NotificationApiFp)(this.configuration).getNotificationPreferences(options).then((request) => request(this.axios, this.basePath));
|
|
2472
|
+
}
|
|
2349
2473
|
/**
|
|
2350
2474
|
* List paginated notifications
|
|
2351
2475
|
* @summary List notifications
|
|
@@ -2369,6 +2493,17 @@ class NotificationApi extends base_1.BaseAPI {
|
|
|
2369
2493
|
markNotificationAsRead(notificationID, options) {
|
|
2370
2494
|
return (0, exports.NotificationApiFp)(this.configuration).markNotificationAsRead(notificationID, options).then((request) => request(this.axios, this.basePath));
|
|
2371
2495
|
}
|
|
2496
|
+
/**
|
|
2497
|
+
* Update notification preferences for the authenticated user
|
|
2498
|
+
* @summary Update notification preferences
|
|
2499
|
+
* @param {Array<NotificationPreference>} notificationPreference notification preferences
|
|
2500
|
+
* @param {*} [options] Override http request option.
|
|
2501
|
+
* @throws {RequiredError}
|
|
2502
|
+
* @memberof NotificationApi
|
|
2503
|
+
*/
|
|
2504
|
+
updateNotificationPreferences(notificationPreference, options) {
|
|
2505
|
+
return (0, exports.NotificationApiFp)(this.configuration).updateNotificationPreferences(notificationPreference, options).then((request) => request(this.axios, this.basePath));
|
|
2506
|
+
}
|
|
2372
2507
|
}
|
|
2373
2508
|
exports.NotificationApi = NotificationApi;
|
|
2374
2509
|
/**
|
package/dist/esm/api.d.ts
CHANGED
|
@@ -114,6 +114,12 @@ export interface BackofficeConfig {
|
|
|
114
114
|
* @memberof BackofficeConfig
|
|
115
115
|
*/
|
|
116
116
|
'notificationEmailConfig'?: NotificationEmailAddress;
|
|
117
|
+
/**
|
|
118
|
+
*
|
|
119
|
+
* @type {Array<NotificationPreference>}
|
|
120
|
+
* @memberof BackofficeConfig
|
|
121
|
+
*/
|
|
122
|
+
'notificationPreferences'?: Array<NotificationPreference>;
|
|
117
123
|
}
|
|
118
124
|
/**
|
|
119
125
|
*
|
|
@@ -986,11 +992,21 @@ export interface Notification {
|
|
|
986
992
|
'kind': NotificationKind;
|
|
987
993
|
/**
|
|
988
994
|
*
|
|
989
|
-
* @type {string}
|
|
995
|
+
* @type {Array<string>}
|
|
990
996
|
* @memberof Notification
|
|
991
997
|
*/
|
|
992
|
-
'
|
|
998
|
+
'references'?: Array<string>;
|
|
993
999
|
}
|
|
1000
|
+
/**
|
|
1001
|
+
*
|
|
1002
|
+
* @export
|
|
1003
|
+
* @enum {string}
|
|
1004
|
+
*/
|
|
1005
|
+
export declare const NotificationChannel: {
|
|
1006
|
+
readonly Email: "email";
|
|
1007
|
+
readonly Sms: "sms";
|
|
1008
|
+
};
|
|
1009
|
+
export type NotificationChannel = typeof NotificationChannel[keyof typeof NotificationChannel];
|
|
994
1010
|
/**
|
|
995
1011
|
*
|
|
996
1012
|
* @export
|
|
@@ -1010,7 +1026,13 @@ export interface NotificationEmailAddress {
|
|
|
1010
1026
|
* @enum {string}
|
|
1011
1027
|
*/
|
|
1012
1028
|
export declare const NotificationKind: {
|
|
1013
|
-
readonly
|
|
1029
|
+
readonly PromotionStart: "promotion_start";
|
|
1030
|
+
readonly PromotionHalfTime: "promotion_half_time";
|
|
1031
|
+
readonly PromotionEnd: "promotion_end";
|
|
1032
|
+
readonly NewProduct: "new_product";
|
|
1033
|
+
readonly ExpiryReminder: "expiry_reminder";
|
|
1034
|
+
readonly OrderConfirmation: "order_confirmation";
|
|
1035
|
+
readonly ProductRequestResponse: "product_request_response";
|
|
1014
1036
|
};
|
|
1015
1037
|
export type NotificationKind = typeof NotificationKind[keyof typeof NotificationKind];
|
|
1016
1038
|
/**
|
|
@@ -1044,6 +1066,31 @@ export interface NotificationListResponse {
|
|
|
1044
1066
|
*/
|
|
1045
1067
|
'unreadCount': number;
|
|
1046
1068
|
}
|
|
1069
|
+
/**
|
|
1070
|
+
*
|
|
1071
|
+
* @export
|
|
1072
|
+
* @interface NotificationPreference
|
|
1073
|
+
*/
|
|
1074
|
+
export interface NotificationPreference {
|
|
1075
|
+
/**
|
|
1076
|
+
*
|
|
1077
|
+
* @type {NotificationChannel}
|
|
1078
|
+
* @memberof NotificationPreference
|
|
1079
|
+
*/
|
|
1080
|
+
'channel': NotificationChannel;
|
|
1081
|
+
/**
|
|
1082
|
+
*
|
|
1083
|
+
* @type {boolean}
|
|
1084
|
+
* @memberof NotificationPreference
|
|
1085
|
+
*/
|
|
1086
|
+
'enabled': boolean;
|
|
1087
|
+
/**
|
|
1088
|
+
*
|
|
1089
|
+
* @type {NotificationKind}
|
|
1090
|
+
* @memberof NotificationPreference
|
|
1091
|
+
*/
|
|
1092
|
+
'kind': NotificationKind;
|
|
1093
|
+
}
|
|
1047
1094
|
/**
|
|
1048
1095
|
*
|
|
1049
1096
|
* @export
|
|
@@ -1910,6 +1957,12 @@ export interface Promotion {
|
|
|
1910
1957
|
* @memberof Promotion
|
|
1911
1958
|
*/
|
|
1912
1959
|
'type': PromotionType;
|
|
1960
|
+
/**
|
|
1961
|
+
*
|
|
1962
|
+
* @type {PromotionNotificationConfig}
|
|
1963
|
+
* @memberof Promotion
|
|
1964
|
+
*/
|
|
1965
|
+
'notificationConfig': PromotionNotificationConfig;
|
|
1913
1966
|
}
|
|
1914
1967
|
/**
|
|
1915
1968
|
*
|
|
@@ -1930,6 +1983,31 @@ export interface PromotionClaimRequest {
|
|
|
1930
1983
|
*/
|
|
1931
1984
|
'clientId'?: string;
|
|
1932
1985
|
}
|
|
1986
|
+
/**
|
|
1987
|
+
*
|
|
1988
|
+
* @export
|
|
1989
|
+
* @interface PromotionNotificationConfig
|
|
1990
|
+
*/
|
|
1991
|
+
export interface PromotionNotificationConfig {
|
|
1992
|
+
/**
|
|
1993
|
+
*
|
|
1994
|
+
* @type {Array<NotificationChannel>}
|
|
1995
|
+
* @memberof PromotionNotificationConfig
|
|
1996
|
+
*/
|
|
1997
|
+
'channels': Array<NotificationChannel>;
|
|
1998
|
+
/**
|
|
1999
|
+
*
|
|
2000
|
+
* @type {Array<NotificationKind>}
|
|
2001
|
+
* @memberof PromotionNotificationConfig
|
|
2002
|
+
*/
|
|
2003
|
+
'kinds': Array<NotificationKind>;
|
|
2004
|
+
/**
|
|
2005
|
+
*
|
|
2006
|
+
* @type {boolean}
|
|
2007
|
+
* @memberof PromotionNotificationConfig
|
|
2008
|
+
*/
|
|
2009
|
+
'forEachPeriod': boolean;
|
|
2010
|
+
}
|
|
1933
2011
|
/**
|
|
1934
2012
|
*
|
|
1935
2013
|
* @export
|
|
@@ -2028,6 +2106,12 @@ export interface PromotionRequest {
|
|
|
2028
2106
|
* @memberof PromotionRequest
|
|
2029
2107
|
*/
|
|
2030
2108
|
'endAt': string;
|
|
2109
|
+
/**
|
|
2110
|
+
*
|
|
2111
|
+
* @type {PromotionNotificationConfig}
|
|
2112
|
+
* @memberof PromotionRequest
|
|
2113
|
+
*/
|
|
2114
|
+
'notificationConfig'?: PromotionNotificationConfig;
|
|
2031
2115
|
}
|
|
2032
2116
|
/**
|
|
2033
2117
|
*
|
|
@@ -2922,6 +3006,12 @@ export interface UpdatePromotionRequest {
|
|
|
2922
3006
|
* @memberof UpdatePromotionRequest
|
|
2923
3007
|
*/
|
|
2924
3008
|
'repetition'?: Repetition;
|
|
3009
|
+
/**
|
|
3010
|
+
*
|
|
3011
|
+
* @type {PromotionNotificationConfig}
|
|
3012
|
+
* @memberof UpdatePromotionRequest
|
|
3013
|
+
*/
|
|
3014
|
+
'notificationConfig'?: PromotionNotificationConfig;
|
|
2925
3015
|
}
|
|
2926
3016
|
/**
|
|
2927
3017
|
*
|
|
@@ -4205,6 +4295,13 @@ export declare const NotificationApiAxiosParamCreator: (configuration?: Configur
|
|
|
4205
4295
|
* @throws {RequiredError}
|
|
4206
4296
|
*/
|
|
4207
4297
|
getNotification: (notificationID: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
4298
|
+
/**
|
|
4299
|
+
* Get notification preferences for the authenticated user
|
|
4300
|
+
* @summary Get notification preferences
|
|
4301
|
+
* @param {*} [options] Override http request option.
|
|
4302
|
+
* @throws {RequiredError}
|
|
4303
|
+
*/
|
|
4304
|
+
getNotificationPreferences: (options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
4208
4305
|
/**
|
|
4209
4306
|
* List paginated notifications
|
|
4210
4307
|
* @summary List notifications
|
|
@@ -4222,6 +4319,14 @@ export declare const NotificationApiAxiosParamCreator: (configuration?: Configur
|
|
|
4222
4319
|
* @throws {RequiredError}
|
|
4223
4320
|
*/
|
|
4224
4321
|
markNotificationAsRead: (notificationID: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
4322
|
+
/**
|
|
4323
|
+
* Update notification preferences for the authenticated user
|
|
4324
|
+
* @summary Update notification preferences
|
|
4325
|
+
* @param {Array<NotificationPreference>} notificationPreference notification preferences
|
|
4326
|
+
* @param {*} [options] Override http request option.
|
|
4327
|
+
* @throws {RequiredError}
|
|
4328
|
+
*/
|
|
4329
|
+
updateNotificationPreferences: (notificationPreference: Array<NotificationPreference>, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
4225
4330
|
};
|
|
4226
4331
|
/**
|
|
4227
4332
|
* NotificationApi - functional programming interface
|
|
@@ -4244,6 +4349,13 @@ export declare const NotificationApiFp: (configuration?: Configuration) => {
|
|
|
4244
4349
|
* @throws {RequiredError}
|
|
4245
4350
|
*/
|
|
4246
4351
|
getNotification(notificationID: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Notification>>;
|
|
4352
|
+
/**
|
|
4353
|
+
* Get notification preferences for the authenticated user
|
|
4354
|
+
* @summary Get notification preferences
|
|
4355
|
+
* @param {*} [options] Override http request option.
|
|
4356
|
+
* @throws {RequiredError}
|
|
4357
|
+
*/
|
|
4358
|
+
getNotificationPreferences(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<NotificationPreference>>>;
|
|
4247
4359
|
/**
|
|
4248
4360
|
* List paginated notifications
|
|
4249
4361
|
* @summary List notifications
|
|
@@ -4261,6 +4373,14 @@ export declare const NotificationApiFp: (configuration?: Configuration) => {
|
|
|
4261
4373
|
* @throws {RequiredError}
|
|
4262
4374
|
*/
|
|
4263
4375
|
markNotificationAsRead(notificationID: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
|
|
4376
|
+
/**
|
|
4377
|
+
* Update notification preferences for the authenticated user
|
|
4378
|
+
* @summary Update notification preferences
|
|
4379
|
+
* @param {Array<NotificationPreference>} notificationPreference notification preferences
|
|
4380
|
+
* @param {*} [options] Override http request option.
|
|
4381
|
+
* @throws {RequiredError}
|
|
4382
|
+
*/
|
|
4383
|
+
updateNotificationPreferences(notificationPreference: Array<NotificationPreference>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
|
|
4264
4384
|
};
|
|
4265
4385
|
/**
|
|
4266
4386
|
* NotificationApi - factory interface
|
|
@@ -4283,6 +4403,13 @@ export declare const NotificationApiFactory: (configuration?: Configuration, bas
|
|
|
4283
4403
|
* @throws {RequiredError}
|
|
4284
4404
|
*/
|
|
4285
4405
|
getNotification(notificationID: string, options?: any): AxiosPromise<Notification>;
|
|
4406
|
+
/**
|
|
4407
|
+
* Get notification preferences for the authenticated user
|
|
4408
|
+
* @summary Get notification preferences
|
|
4409
|
+
* @param {*} [options] Override http request option.
|
|
4410
|
+
* @throws {RequiredError}
|
|
4411
|
+
*/
|
|
4412
|
+
getNotificationPreferences(options?: any): AxiosPromise<Array<NotificationPreference>>;
|
|
4286
4413
|
/**
|
|
4287
4414
|
* List paginated notifications
|
|
4288
4415
|
* @summary List notifications
|
|
@@ -4300,6 +4427,14 @@ export declare const NotificationApiFactory: (configuration?: Configuration, bas
|
|
|
4300
4427
|
* @throws {RequiredError}
|
|
4301
4428
|
*/
|
|
4302
4429
|
markNotificationAsRead(notificationID: string, options?: any): AxiosPromise<void>;
|
|
4430
|
+
/**
|
|
4431
|
+
* Update notification preferences for the authenticated user
|
|
4432
|
+
* @summary Update notification preferences
|
|
4433
|
+
* @param {Array<NotificationPreference>} notificationPreference notification preferences
|
|
4434
|
+
* @param {*} [options] Override http request option.
|
|
4435
|
+
* @throws {RequiredError}
|
|
4436
|
+
*/
|
|
4437
|
+
updateNotificationPreferences(notificationPreference: Array<NotificationPreference>, options?: any): AxiosPromise<void>;
|
|
4303
4438
|
};
|
|
4304
4439
|
/**
|
|
4305
4440
|
* NotificationApi - object-oriented interface
|
|
@@ -4326,6 +4461,14 @@ export declare class NotificationApi extends BaseAPI {
|
|
|
4326
4461
|
* @memberof NotificationApi
|
|
4327
4462
|
*/
|
|
4328
4463
|
getNotification(notificationID: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<Notification, any>>;
|
|
4464
|
+
/**
|
|
4465
|
+
* Get notification preferences for the authenticated user
|
|
4466
|
+
* @summary Get notification preferences
|
|
4467
|
+
* @param {*} [options] Override http request option.
|
|
4468
|
+
* @throws {RequiredError}
|
|
4469
|
+
* @memberof NotificationApi
|
|
4470
|
+
*/
|
|
4471
|
+
getNotificationPreferences(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<NotificationPreference[], any>>;
|
|
4329
4472
|
/**
|
|
4330
4473
|
* List paginated notifications
|
|
4331
4474
|
* @summary List notifications
|
|
@@ -4345,6 +4488,15 @@ export declare class NotificationApi extends BaseAPI {
|
|
|
4345
4488
|
* @memberof NotificationApi
|
|
4346
4489
|
*/
|
|
4347
4490
|
markNotificationAsRead(notificationID: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
|
|
4491
|
+
/**
|
|
4492
|
+
* Update notification preferences for the authenticated user
|
|
4493
|
+
* @summary Update notification preferences
|
|
4494
|
+
* @param {Array<NotificationPreference>} notificationPreference notification preferences
|
|
4495
|
+
* @param {*} [options] Override http request option.
|
|
4496
|
+
* @throws {RequiredError}
|
|
4497
|
+
* @memberof NotificationApi
|
|
4498
|
+
*/
|
|
4499
|
+
updateNotificationPreferences(notificationPreference: Array<NotificationPreference>, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
|
|
4348
4500
|
}
|
|
4349
4501
|
/**
|
|
4350
4502
|
* OrderApi - axios parameter creator
|
package/dist/esm/api.js
CHANGED
|
@@ -89,13 +89,28 @@ export const Feature = {
|
|
|
89
89
|
SalesBudget: 'sales_budget',
|
|
90
90
|
CustomDeals: 'custom_deals'
|
|
91
91
|
};
|
|
92
|
+
/**
|
|
93
|
+
*
|
|
94
|
+
* @export
|
|
95
|
+
* @enum {string}
|
|
96
|
+
*/
|
|
97
|
+
export const NotificationChannel = {
|
|
98
|
+
Email: 'email',
|
|
99
|
+
Sms: 'sms'
|
|
100
|
+
};
|
|
92
101
|
/**
|
|
93
102
|
*
|
|
94
103
|
* @export
|
|
95
104
|
* @enum {string}
|
|
96
105
|
*/
|
|
97
106
|
export const NotificationKind = {
|
|
98
|
-
|
|
107
|
+
PromotionStart: 'promotion_start',
|
|
108
|
+
PromotionHalfTime: 'promotion_half_time',
|
|
109
|
+
PromotionEnd: 'promotion_end',
|
|
110
|
+
NewProduct: 'new_product',
|
|
111
|
+
ExpiryReminder: 'expiry_reminder',
|
|
112
|
+
OrderConfirmation: 'order_confirmation',
|
|
113
|
+
ProductRequestResponse: 'product_request_response'
|
|
99
114
|
};
|
|
100
115
|
/**
|
|
101
116
|
*
|
|
@@ -2095,6 +2110,31 @@ export const NotificationApiAxiosParamCreator = function (configuration) {
|
|
|
2095
2110
|
options: localVarRequestOptions,
|
|
2096
2111
|
};
|
|
2097
2112
|
}),
|
|
2113
|
+
/**
|
|
2114
|
+
* Get notification preferences for the authenticated user
|
|
2115
|
+
* @summary Get notification preferences
|
|
2116
|
+
* @param {*} [options] Override http request option.
|
|
2117
|
+
* @throws {RequiredError}
|
|
2118
|
+
*/
|
|
2119
|
+
getNotificationPreferences: (options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2120
|
+
const localVarPath = `/users/notifications/preferences`;
|
|
2121
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2122
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2123
|
+
let baseOptions;
|
|
2124
|
+
if (configuration) {
|
|
2125
|
+
baseOptions = configuration.baseOptions;
|
|
2126
|
+
}
|
|
2127
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2128
|
+
const localVarHeaderParameter = {};
|
|
2129
|
+
const localVarQueryParameter = {};
|
|
2130
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2131
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2132
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2133
|
+
return {
|
|
2134
|
+
url: toPathString(localVarUrlObj),
|
|
2135
|
+
options: localVarRequestOptions,
|
|
2136
|
+
};
|
|
2137
|
+
}),
|
|
2098
2138
|
/**
|
|
2099
2139
|
* List paginated notifications
|
|
2100
2140
|
* @summary List notifications
|
|
@@ -2163,6 +2203,36 @@ export const NotificationApiAxiosParamCreator = function (configuration) {
|
|
|
2163
2203
|
options: localVarRequestOptions,
|
|
2164
2204
|
};
|
|
2165
2205
|
}),
|
|
2206
|
+
/**
|
|
2207
|
+
* Update notification preferences for the authenticated user
|
|
2208
|
+
* @summary Update notification preferences
|
|
2209
|
+
* @param {Array<NotificationPreference>} notificationPreference notification preferences
|
|
2210
|
+
* @param {*} [options] Override http request option.
|
|
2211
|
+
* @throws {RequiredError}
|
|
2212
|
+
*/
|
|
2213
|
+
updateNotificationPreferences: (notificationPreference, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2214
|
+
// verify required parameter 'notificationPreference' is not null or undefined
|
|
2215
|
+
assertParamExists('updateNotificationPreferences', 'notificationPreference', notificationPreference);
|
|
2216
|
+
const localVarPath = `/users/notifications/preferences`;
|
|
2217
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2218
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2219
|
+
let baseOptions;
|
|
2220
|
+
if (configuration) {
|
|
2221
|
+
baseOptions = configuration.baseOptions;
|
|
2222
|
+
}
|
|
2223
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
|
|
2224
|
+
const localVarHeaderParameter = {};
|
|
2225
|
+
const localVarQueryParameter = {};
|
|
2226
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
2227
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2228
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2229
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2230
|
+
localVarRequestOptions.data = serializeDataIfNeeded(notificationPreference, localVarRequestOptions, configuration);
|
|
2231
|
+
return {
|
|
2232
|
+
url: toPathString(localVarUrlObj),
|
|
2233
|
+
options: localVarRequestOptions,
|
|
2234
|
+
};
|
|
2235
|
+
}),
|
|
2166
2236
|
};
|
|
2167
2237
|
};
|
|
2168
2238
|
/**
|
|
@@ -2198,6 +2268,18 @@ export const NotificationApiFp = function (configuration) {
|
|
|
2198
2268
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
2199
2269
|
});
|
|
2200
2270
|
},
|
|
2271
|
+
/**
|
|
2272
|
+
* Get notification preferences for the authenticated user
|
|
2273
|
+
* @summary Get notification preferences
|
|
2274
|
+
* @param {*} [options] Override http request option.
|
|
2275
|
+
* @throws {RequiredError}
|
|
2276
|
+
*/
|
|
2277
|
+
getNotificationPreferences(options) {
|
|
2278
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2279
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getNotificationPreferences(options);
|
|
2280
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
2281
|
+
});
|
|
2282
|
+
},
|
|
2201
2283
|
/**
|
|
2202
2284
|
* List paginated notifications
|
|
2203
2285
|
* @summary List notifications
|
|
@@ -2225,6 +2307,19 @@ export const NotificationApiFp = function (configuration) {
|
|
|
2225
2307
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
2226
2308
|
});
|
|
2227
2309
|
},
|
|
2310
|
+
/**
|
|
2311
|
+
* Update notification preferences for the authenticated user
|
|
2312
|
+
* @summary Update notification preferences
|
|
2313
|
+
* @param {Array<NotificationPreference>} notificationPreference notification preferences
|
|
2314
|
+
* @param {*} [options] Override http request option.
|
|
2315
|
+
* @throws {RequiredError}
|
|
2316
|
+
*/
|
|
2317
|
+
updateNotificationPreferences(notificationPreference, options) {
|
|
2318
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2319
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.updateNotificationPreferences(notificationPreference, options);
|
|
2320
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
2321
|
+
});
|
|
2322
|
+
},
|
|
2228
2323
|
};
|
|
2229
2324
|
};
|
|
2230
2325
|
/**
|
|
@@ -2254,6 +2349,15 @@ export const NotificationApiFactory = function (configuration, basePath, axios)
|
|
|
2254
2349
|
getNotification(notificationID, options) {
|
|
2255
2350
|
return localVarFp.getNotification(notificationID, options).then((request) => request(axios, basePath));
|
|
2256
2351
|
},
|
|
2352
|
+
/**
|
|
2353
|
+
* Get notification preferences for the authenticated user
|
|
2354
|
+
* @summary Get notification preferences
|
|
2355
|
+
* @param {*} [options] Override http request option.
|
|
2356
|
+
* @throws {RequiredError}
|
|
2357
|
+
*/
|
|
2358
|
+
getNotificationPreferences(options) {
|
|
2359
|
+
return localVarFp.getNotificationPreferences(options).then((request) => request(axios, basePath));
|
|
2360
|
+
},
|
|
2257
2361
|
/**
|
|
2258
2362
|
* List paginated notifications
|
|
2259
2363
|
* @summary List notifications
|
|
@@ -2275,6 +2379,16 @@ export const NotificationApiFactory = function (configuration, basePath, axios)
|
|
|
2275
2379
|
markNotificationAsRead(notificationID, options) {
|
|
2276
2380
|
return localVarFp.markNotificationAsRead(notificationID, options).then((request) => request(axios, basePath));
|
|
2277
2381
|
},
|
|
2382
|
+
/**
|
|
2383
|
+
* Update notification preferences for the authenticated user
|
|
2384
|
+
* @summary Update notification preferences
|
|
2385
|
+
* @param {Array<NotificationPreference>} notificationPreference notification preferences
|
|
2386
|
+
* @param {*} [options] Override http request option.
|
|
2387
|
+
* @throws {RequiredError}
|
|
2388
|
+
*/
|
|
2389
|
+
updateNotificationPreferences(notificationPreference, options) {
|
|
2390
|
+
return localVarFp.updateNotificationPreferences(notificationPreference, options).then((request) => request(axios, basePath));
|
|
2391
|
+
},
|
|
2278
2392
|
};
|
|
2279
2393
|
};
|
|
2280
2394
|
/**
|
|
@@ -2306,6 +2420,16 @@ export class NotificationApi extends BaseAPI {
|
|
|
2306
2420
|
getNotification(notificationID, options) {
|
|
2307
2421
|
return NotificationApiFp(this.configuration).getNotification(notificationID, options).then((request) => request(this.axios, this.basePath));
|
|
2308
2422
|
}
|
|
2423
|
+
/**
|
|
2424
|
+
* Get notification preferences for the authenticated user
|
|
2425
|
+
* @summary Get notification preferences
|
|
2426
|
+
* @param {*} [options] Override http request option.
|
|
2427
|
+
* @throws {RequiredError}
|
|
2428
|
+
* @memberof NotificationApi
|
|
2429
|
+
*/
|
|
2430
|
+
getNotificationPreferences(options) {
|
|
2431
|
+
return NotificationApiFp(this.configuration).getNotificationPreferences(options).then((request) => request(this.axios, this.basePath));
|
|
2432
|
+
}
|
|
2309
2433
|
/**
|
|
2310
2434
|
* List paginated notifications
|
|
2311
2435
|
* @summary List notifications
|
|
@@ -2329,6 +2453,17 @@ export class NotificationApi extends BaseAPI {
|
|
|
2329
2453
|
markNotificationAsRead(notificationID, options) {
|
|
2330
2454
|
return NotificationApiFp(this.configuration).markNotificationAsRead(notificationID, options).then((request) => request(this.axios, this.basePath));
|
|
2331
2455
|
}
|
|
2456
|
+
/**
|
|
2457
|
+
* Update notification preferences for the authenticated user
|
|
2458
|
+
* @summary Update notification preferences
|
|
2459
|
+
* @param {Array<NotificationPreference>} notificationPreference notification preferences
|
|
2460
|
+
* @param {*} [options] Override http request option.
|
|
2461
|
+
* @throws {RequiredError}
|
|
2462
|
+
* @memberof NotificationApi
|
|
2463
|
+
*/
|
|
2464
|
+
updateNotificationPreferences(notificationPreference, options) {
|
|
2465
|
+
return NotificationApiFp(this.configuration).updateNotificationPreferences(notificationPreference, options).then((request) => request(this.axios, this.basePath));
|
|
2466
|
+
}
|
|
2332
2467
|
}
|
|
2333
2468
|
/**
|
|
2334
2469
|
* OrderApi - axios parameter creator
|