@caraer/client 2.0.456 → 2.0.458
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/api.ts +77 -6
- package/dist/api.d.ts +40 -6
- package/dist/api.js +66 -4
- package/dist/esm/api.d.ts +40 -6
- package/dist/esm/api.js +66 -4
- package/docs/NotificationsApi.md +49 -1
- package/docs/ShowResponseMapStringString.md +3 -3
- package/package.json +1 -1
package/api.ts
CHANGED
|
@@ -5495,11 +5495,17 @@ export interface ShowResponseMapStringObject {
|
|
|
5495
5495
|
'data'?: { [key: string]: any | null; };
|
|
5496
5496
|
}
|
|
5497
5497
|
/**
|
|
5498
|
-
*
|
|
5498
|
+
* Represents the response for viewing or showing a specific resource.
|
|
5499
5499
|
*/
|
|
5500
5500
|
export interface ShowResponseMapStringString {
|
|
5501
|
+
/**
|
|
5502
|
+
* A message detailing the result of the operation.
|
|
5503
|
+
*/
|
|
5501
5504
|
'message'?: string;
|
|
5502
|
-
|
|
5505
|
+
/**
|
|
5506
|
+
* The data payload of the response, if any.
|
|
5507
|
+
*/
|
|
5508
|
+
'data'?: { [key: string]: string; };
|
|
5503
5509
|
}
|
|
5504
5510
|
/**
|
|
5505
5511
|
* Represents the response for viewing or showing a specific resource.
|
|
@@ -16396,6 +16402,40 @@ export const NotificationsApiAxiosParamCreator = function (configuration?: Confi
|
|
|
16396
16402
|
options: localVarRequestOptions,
|
|
16397
16403
|
};
|
|
16398
16404
|
},
|
|
16405
|
+
/**
|
|
16406
|
+
*
|
|
16407
|
+
* @summary Mint a Firebase custom token so the app can listen to its inbox
|
|
16408
|
+
* @param {*} [options] Override http request option.
|
|
16409
|
+
* @throws {RequiredError}
|
|
16410
|
+
*/
|
|
16411
|
+
firebaseToken: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
16412
|
+
const localVarPath = `/api/v2/notifications/firebase-token`;
|
|
16413
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
16414
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
16415
|
+
let baseOptions;
|
|
16416
|
+
if (configuration) {
|
|
16417
|
+
baseOptions = configuration.baseOptions;
|
|
16418
|
+
}
|
|
16419
|
+
|
|
16420
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
16421
|
+
const localVarHeaderParameter = {} as any;
|
|
16422
|
+
const localVarQueryParameter = {} as any;
|
|
16423
|
+
|
|
16424
|
+
// authentication bearerAuth required
|
|
16425
|
+
// http bearer authentication required
|
|
16426
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
16427
|
+
|
|
16428
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
16429
|
+
|
|
16430
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
16431
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
16432
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
16433
|
+
|
|
16434
|
+
return {
|
|
16435
|
+
url: toPathString(localVarUrlObj),
|
|
16436
|
+
options: localVarRequestOptions,
|
|
16437
|
+
};
|
|
16438
|
+
},
|
|
16399
16439
|
/**
|
|
16400
16440
|
*
|
|
16401
16441
|
* @summary List in-app notifications for the logged-in user
|
|
@@ -16442,7 +16482,7 @@ export const NotificationsApiAxiosParamCreator = function (configuration?: Confi
|
|
|
16442
16482
|
},
|
|
16443
16483
|
/**
|
|
16444
16484
|
*
|
|
16445
|
-
* @summary Mark all notifications as read
|
|
16485
|
+
* @summary Mark all notifications as read
|
|
16446
16486
|
* @param {*} [options] Override http request option.
|
|
16447
16487
|
* @throws {RequiredError}
|
|
16448
16488
|
*/
|
|
@@ -16573,6 +16613,18 @@ export const NotificationsApiFp = function(configuration?: Configuration) {
|
|
|
16573
16613
|
const localVarOperationServerBasePath = operationServerMap['NotificationsApi.dismissNotification']?.[localVarOperationServerIndex]?.url;
|
|
16574
16614
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
16575
16615
|
},
|
|
16616
|
+
/**
|
|
16617
|
+
*
|
|
16618
|
+
* @summary Mint a Firebase custom token so the app can listen to its inbox
|
|
16619
|
+
* @param {*} [options] Override http request option.
|
|
16620
|
+
* @throws {RequiredError}
|
|
16621
|
+
*/
|
|
16622
|
+
async firebaseToken(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ShowResponseMapStringString>> {
|
|
16623
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.firebaseToken(options);
|
|
16624
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
16625
|
+
const localVarOperationServerBasePath = operationServerMap['NotificationsApi.firebaseToken']?.[localVarOperationServerIndex]?.url;
|
|
16626
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
16627
|
+
},
|
|
16576
16628
|
/**
|
|
16577
16629
|
*
|
|
16578
16630
|
* @summary List in-app notifications for the logged-in user
|
|
@@ -16589,7 +16641,7 @@ export const NotificationsApiFp = function(configuration?: Configuration) {
|
|
|
16589
16641
|
},
|
|
16590
16642
|
/**
|
|
16591
16643
|
*
|
|
16592
|
-
* @summary Mark all notifications as read
|
|
16644
|
+
* @summary Mark all notifications as read
|
|
16593
16645
|
* @param {*} [options] Override http request option.
|
|
16594
16646
|
* @throws {RequiredError}
|
|
16595
16647
|
*/
|
|
@@ -16644,6 +16696,15 @@ export const NotificationsApiFactory = function (configuration?: Configuration,
|
|
|
16644
16696
|
dismissNotification(notificationId: string, options?: RawAxiosRequestConfig): AxiosPromise<DeleteResponseString> {
|
|
16645
16697
|
return localVarFp.dismissNotification(notificationId, options).then((request) => request(axios, basePath));
|
|
16646
16698
|
},
|
|
16699
|
+
/**
|
|
16700
|
+
*
|
|
16701
|
+
* @summary Mint a Firebase custom token so the app can listen to its inbox
|
|
16702
|
+
* @param {*} [options] Override http request option.
|
|
16703
|
+
* @throws {RequiredError}
|
|
16704
|
+
*/
|
|
16705
|
+
firebaseToken(options?: RawAxiosRequestConfig): AxiosPromise<ShowResponseMapStringString> {
|
|
16706
|
+
return localVarFp.firebaseToken(options).then((request) => request(axios, basePath));
|
|
16707
|
+
},
|
|
16647
16708
|
/**
|
|
16648
16709
|
*
|
|
16649
16710
|
* @summary List in-app notifications for the logged-in user
|
|
@@ -16657,7 +16718,7 @@ export const NotificationsApiFactory = function (configuration?: Configuration,
|
|
|
16657
16718
|
},
|
|
16658
16719
|
/**
|
|
16659
16720
|
*
|
|
16660
|
-
* @summary Mark all notifications as read
|
|
16721
|
+
* @summary Mark all notifications as read
|
|
16661
16722
|
* @param {*} [options] Override http request option.
|
|
16662
16723
|
* @throws {RequiredError}
|
|
16663
16724
|
*/
|
|
@@ -16702,6 +16763,16 @@ export class NotificationsApi extends BaseAPI {
|
|
|
16702
16763
|
return NotificationsApiFp(this.configuration).dismissNotification(notificationId, options).then((request) => request(this.axios, this.basePath));
|
|
16703
16764
|
}
|
|
16704
16765
|
|
|
16766
|
+
/**
|
|
16767
|
+
*
|
|
16768
|
+
* @summary Mint a Firebase custom token so the app can listen to its inbox
|
|
16769
|
+
* @param {*} [options] Override http request option.
|
|
16770
|
+
* @throws {RequiredError}
|
|
16771
|
+
*/
|
|
16772
|
+
public firebaseToken(options?: RawAxiosRequestConfig) {
|
|
16773
|
+
return NotificationsApiFp(this.configuration).firebaseToken(options).then((request) => request(this.axios, this.basePath));
|
|
16774
|
+
}
|
|
16775
|
+
|
|
16705
16776
|
/**
|
|
16706
16777
|
*
|
|
16707
16778
|
* @summary List in-app notifications for the logged-in user
|
|
@@ -16716,7 +16787,7 @@ export class NotificationsApi extends BaseAPI {
|
|
|
16716
16787
|
|
|
16717
16788
|
/**
|
|
16718
16789
|
*
|
|
16719
|
-
* @summary Mark all notifications as read
|
|
16790
|
+
* @summary Mark all notifications as read
|
|
16720
16791
|
* @param {*} [options] Override http request option.
|
|
16721
16792
|
* @throws {RequiredError}
|
|
16722
16793
|
*/
|
package/dist/api.d.ts
CHANGED
|
@@ -5552,12 +5552,18 @@ export interface ShowResponseMapStringObject {
|
|
|
5552
5552
|
};
|
|
5553
5553
|
}
|
|
5554
5554
|
/**
|
|
5555
|
-
*
|
|
5555
|
+
* Represents the response for viewing or showing a specific resource.
|
|
5556
5556
|
*/
|
|
5557
5557
|
export interface ShowResponseMapStringString {
|
|
5558
|
+
/**
|
|
5559
|
+
* A message detailing the result of the operation.
|
|
5560
|
+
*/
|
|
5558
5561
|
'message'?: string;
|
|
5562
|
+
/**
|
|
5563
|
+
* The data payload of the response, if any.
|
|
5564
|
+
*/
|
|
5559
5565
|
'data'?: {
|
|
5560
|
-
[key: string]:
|
|
5566
|
+
[key: string]: string;
|
|
5561
5567
|
};
|
|
5562
5568
|
}
|
|
5563
5569
|
/**
|
|
@@ -11678,6 +11684,13 @@ export declare const NotificationsApiAxiosParamCreator: (configuration?: Configu
|
|
|
11678
11684
|
* @throws {RequiredError}
|
|
11679
11685
|
*/
|
|
11680
11686
|
dismissNotification: (notificationId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
11687
|
+
/**
|
|
11688
|
+
*
|
|
11689
|
+
* @summary Mint a Firebase custom token so the app can listen to its inbox
|
|
11690
|
+
* @param {*} [options] Override http request option.
|
|
11691
|
+
* @throws {RequiredError}
|
|
11692
|
+
*/
|
|
11693
|
+
firebaseToken: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
11681
11694
|
/**
|
|
11682
11695
|
*
|
|
11683
11696
|
* @summary List in-app notifications for the logged-in user
|
|
@@ -11689,7 +11702,7 @@ export declare const NotificationsApiAxiosParamCreator: (configuration?: Configu
|
|
|
11689
11702
|
listNotifications: (company?: string, limit?: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
11690
11703
|
/**
|
|
11691
11704
|
*
|
|
11692
|
-
* @summary Mark all notifications as read
|
|
11705
|
+
* @summary Mark all notifications as read
|
|
11693
11706
|
* @param {*} [options] Override http request option.
|
|
11694
11707
|
* @throws {RequiredError}
|
|
11695
11708
|
*/
|
|
@@ -11723,6 +11736,13 @@ export declare const NotificationsApiFp: (configuration?: Configuration) => {
|
|
|
11723
11736
|
* @throws {RequiredError}
|
|
11724
11737
|
*/
|
|
11725
11738
|
dismissNotification(notificationId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DeleteResponseString>>;
|
|
11739
|
+
/**
|
|
11740
|
+
*
|
|
11741
|
+
* @summary Mint a Firebase custom token so the app can listen to its inbox
|
|
11742
|
+
* @param {*} [options] Override http request option.
|
|
11743
|
+
* @throws {RequiredError}
|
|
11744
|
+
*/
|
|
11745
|
+
firebaseToken(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ShowResponseMapStringString>>;
|
|
11726
11746
|
/**
|
|
11727
11747
|
*
|
|
11728
11748
|
* @summary List in-app notifications for the logged-in user
|
|
@@ -11734,7 +11754,7 @@ export declare const NotificationsApiFp: (configuration?: Configuration) => {
|
|
|
11734
11754
|
listNotifications(company?: string, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ShowResponseNotificationInboxDTO>>;
|
|
11735
11755
|
/**
|
|
11736
11756
|
*
|
|
11737
|
-
* @summary Mark all notifications as read
|
|
11757
|
+
* @summary Mark all notifications as read
|
|
11738
11758
|
* @param {*} [options] Override http request option.
|
|
11739
11759
|
* @throws {RequiredError}
|
|
11740
11760
|
*/
|
|
@@ -11768,6 +11788,13 @@ export declare const NotificationsApiFactory: (configuration?: Configuration, ba
|
|
|
11768
11788
|
* @throws {RequiredError}
|
|
11769
11789
|
*/
|
|
11770
11790
|
dismissNotification(notificationId: string, options?: RawAxiosRequestConfig): AxiosPromise<DeleteResponseString>;
|
|
11791
|
+
/**
|
|
11792
|
+
*
|
|
11793
|
+
* @summary Mint a Firebase custom token so the app can listen to its inbox
|
|
11794
|
+
* @param {*} [options] Override http request option.
|
|
11795
|
+
* @throws {RequiredError}
|
|
11796
|
+
*/
|
|
11797
|
+
firebaseToken(options?: RawAxiosRequestConfig): AxiosPromise<ShowResponseMapStringString>;
|
|
11771
11798
|
/**
|
|
11772
11799
|
*
|
|
11773
11800
|
* @summary List in-app notifications for the logged-in user
|
|
@@ -11779,7 +11806,7 @@ export declare const NotificationsApiFactory: (configuration?: Configuration, ba
|
|
|
11779
11806
|
listNotifications(company?: string, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise<ShowResponseNotificationInboxDTO>;
|
|
11780
11807
|
/**
|
|
11781
11808
|
*
|
|
11782
|
-
* @summary Mark all notifications as read
|
|
11809
|
+
* @summary Mark all notifications as read
|
|
11783
11810
|
* @param {*} [options] Override http request option.
|
|
11784
11811
|
* @throws {RequiredError}
|
|
11785
11812
|
*/
|
|
@@ -11813,6 +11840,13 @@ export declare class NotificationsApi extends BaseAPI {
|
|
|
11813
11840
|
* @throws {RequiredError}
|
|
11814
11841
|
*/
|
|
11815
11842
|
dismissNotification(notificationId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<DeleteResponseString, any, {}>>;
|
|
11843
|
+
/**
|
|
11844
|
+
*
|
|
11845
|
+
* @summary Mint a Firebase custom token so the app can listen to its inbox
|
|
11846
|
+
* @param {*} [options] Override http request option.
|
|
11847
|
+
* @throws {RequiredError}
|
|
11848
|
+
*/
|
|
11849
|
+
firebaseToken(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ShowResponseMapStringString, any, {}>>;
|
|
11816
11850
|
/**
|
|
11817
11851
|
*
|
|
11818
11852
|
* @summary List in-app notifications for the logged-in user
|
|
@@ -11824,7 +11858,7 @@ export declare class NotificationsApi extends BaseAPI {
|
|
|
11824
11858
|
listNotifications(company?: string, limit?: number, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ShowResponseNotificationInboxDTO, any, {}>>;
|
|
11825
11859
|
/**
|
|
11826
11860
|
*
|
|
11827
|
-
* @summary Mark all notifications as read
|
|
11861
|
+
* @summary Mark all notifications as read
|
|
11828
11862
|
* @param {*} [options] Override http request option.
|
|
11829
11863
|
* @throws {RequiredError}
|
|
11830
11864
|
*/
|
package/dist/api.js
CHANGED
|
@@ -8704,6 +8704,35 @@ const NotificationsApiAxiosParamCreator = function (configuration) {
|
|
|
8704
8704
|
options: localVarRequestOptions,
|
|
8705
8705
|
};
|
|
8706
8706
|
}),
|
|
8707
|
+
/**
|
|
8708
|
+
*
|
|
8709
|
+
* @summary Mint a Firebase custom token so the app can listen to its inbox
|
|
8710
|
+
* @param {*} [options] Override http request option.
|
|
8711
|
+
* @throws {RequiredError}
|
|
8712
|
+
*/
|
|
8713
|
+
firebaseToken: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
8714
|
+
const localVarPath = `/api/v2/notifications/firebase-token`;
|
|
8715
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
8716
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
8717
|
+
let baseOptions;
|
|
8718
|
+
if (configuration) {
|
|
8719
|
+
baseOptions = configuration.baseOptions;
|
|
8720
|
+
}
|
|
8721
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
8722
|
+
const localVarHeaderParameter = {};
|
|
8723
|
+
const localVarQueryParameter = {};
|
|
8724
|
+
// authentication bearerAuth required
|
|
8725
|
+
// http bearer authentication required
|
|
8726
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
8727
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
8728
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
8729
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
8730
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
8731
|
+
return {
|
|
8732
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
8733
|
+
options: localVarRequestOptions,
|
|
8734
|
+
};
|
|
8735
|
+
}),
|
|
8707
8736
|
/**
|
|
8708
8737
|
*
|
|
8709
8738
|
* @summary List in-app notifications for the logged-in user
|
|
@@ -8743,7 +8772,7 @@ const NotificationsApiAxiosParamCreator = function (configuration) {
|
|
|
8743
8772
|
}),
|
|
8744
8773
|
/**
|
|
8745
8774
|
*
|
|
8746
|
-
* @summary Mark all notifications as read
|
|
8775
|
+
* @summary Mark all notifications as read
|
|
8747
8776
|
* @param {*} [options] Override http request option.
|
|
8748
8777
|
* @throws {RequiredError}
|
|
8749
8778
|
*/
|
|
@@ -8862,6 +8891,21 @@ const NotificationsApiFp = function (configuration) {
|
|
|
8862
8891
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
8863
8892
|
});
|
|
8864
8893
|
},
|
|
8894
|
+
/**
|
|
8895
|
+
*
|
|
8896
|
+
* @summary Mint a Firebase custom token so the app can listen to its inbox
|
|
8897
|
+
* @param {*} [options] Override http request option.
|
|
8898
|
+
* @throws {RequiredError}
|
|
8899
|
+
*/
|
|
8900
|
+
firebaseToken(options) {
|
|
8901
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
8902
|
+
var _a, _b, _c;
|
|
8903
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.firebaseToken(options);
|
|
8904
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
8905
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['NotificationsApi.firebaseToken']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
8906
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
8907
|
+
});
|
|
8908
|
+
},
|
|
8865
8909
|
/**
|
|
8866
8910
|
*
|
|
8867
8911
|
* @summary List in-app notifications for the logged-in user
|
|
@@ -8881,7 +8925,7 @@ const NotificationsApiFp = function (configuration) {
|
|
|
8881
8925
|
},
|
|
8882
8926
|
/**
|
|
8883
8927
|
*
|
|
8884
|
-
* @summary Mark all notifications as read
|
|
8928
|
+
* @summary Mark all notifications as read
|
|
8885
8929
|
* @param {*} [options] Override http request option.
|
|
8886
8930
|
* @throws {RequiredError}
|
|
8887
8931
|
*/
|
|
@@ -8945,6 +8989,15 @@ const NotificationsApiFactory = function (configuration, basePath, axios) {
|
|
|
8945
8989
|
dismissNotification(notificationId, options) {
|
|
8946
8990
|
return localVarFp.dismissNotification(notificationId, options).then((request) => request(axios, basePath));
|
|
8947
8991
|
},
|
|
8992
|
+
/**
|
|
8993
|
+
*
|
|
8994
|
+
* @summary Mint a Firebase custom token so the app can listen to its inbox
|
|
8995
|
+
* @param {*} [options] Override http request option.
|
|
8996
|
+
* @throws {RequiredError}
|
|
8997
|
+
*/
|
|
8998
|
+
firebaseToken(options) {
|
|
8999
|
+
return localVarFp.firebaseToken(options).then((request) => request(axios, basePath));
|
|
9000
|
+
},
|
|
8948
9001
|
/**
|
|
8949
9002
|
*
|
|
8950
9003
|
* @summary List in-app notifications for the logged-in user
|
|
@@ -8958,7 +9011,7 @@ const NotificationsApiFactory = function (configuration, basePath, axios) {
|
|
|
8958
9011
|
},
|
|
8959
9012
|
/**
|
|
8960
9013
|
*
|
|
8961
|
-
* @summary Mark all notifications as read
|
|
9014
|
+
* @summary Mark all notifications as read
|
|
8962
9015
|
* @param {*} [options] Override http request option.
|
|
8963
9016
|
* @throws {RequiredError}
|
|
8964
9017
|
*/
|
|
@@ -9002,6 +9055,15 @@ class NotificationsApi extends base_1.BaseAPI {
|
|
|
9002
9055
|
dismissNotification(notificationId, options) {
|
|
9003
9056
|
return (0, exports.NotificationsApiFp)(this.configuration).dismissNotification(notificationId, options).then((request) => request(this.axios, this.basePath));
|
|
9004
9057
|
}
|
|
9058
|
+
/**
|
|
9059
|
+
*
|
|
9060
|
+
* @summary Mint a Firebase custom token so the app can listen to its inbox
|
|
9061
|
+
* @param {*} [options] Override http request option.
|
|
9062
|
+
* @throws {RequiredError}
|
|
9063
|
+
*/
|
|
9064
|
+
firebaseToken(options) {
|
|
9065
|
+
return (0, exports.NotificationsApiFp)(this.configuration).firebaseToken(options).then((request) => request(this.axios, this.basePath));
|
|
9066
|
+
}
|
|
9005
9067
|
/**
|
|
9006
9068
|
*
|
|
9007
9069
|
* @summary List in-app notifications for the logged-in user
|
|
@@ -9015,7 +9077,7 @@ class NotificationsApi extends base_1.BaseAPI {
|
|
|
9015
9077
|
}
|
|
9016
9078
|
/**
|
|
9017
9079
|
*
|
|
9018
|
-
* @summary Mark all notifications as read
|
|
9080
|
+
* @summary Mark all notifications as read
|
|
9019
9081
|
* @param {*} [options] Override http request option.
|
|
9020
9082
|
* @throws {RequiredError}
|
|
9021
9083
|
*/
|
package/dist/esm/api.d.ts
CHANGED
|
@@ -5552,12 +5552,18 @@ export interface ShowResponseMapStringObject {
|
|
|
5552
5552
|
};
|
|
5553
5553
|
}
|
|
5554
5554
|
/**
|
|
5555
|
-
*
|
|
5555
|
+
* Represents the response for viewing or showing a specific resource.
|
|
5556
5556
|
*/
|
|
5557
5557
|
export interface ShowResponseMapStringString {
|
|
5558
|
+
/**
|
|
5559
|
+
* A message detailing the result of the operation.
|
|
5560
|
+
*/
|
|
5558
5561
|
'message'?: string;
|
|
5562
|
+
/**
|
|
5563
|
+
* The data payload of the response, if any.
|
|
5564
|
+
*/
|
|
5559
5565
|
'data'?: {
|
|
5560
|
-
[key: string]:
|
|
5566
|
+
[key: string]: string;
|
|
5561
5567
|
};
|
|
5562
5568
|
}
|
|
5563
5569
|
/**
|
|
@@ -11678,6 +11684,13 @@ export declare const NotificationsApiAxiosParamCreator: (configuration?: Configu
|
|
|
11678
11684
|
* @throws {RequiredError}
|
|
11679
11685
|
*/
|
|
11680
11686
|
dismissNotification: (notificationId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
11687
|
+
/**
|
|
11688
|
+
*
|
|
11689
|
+
* @summary Mint a Firebase custom token so the app can listen to its inbox
|
|
11690
|
+
* @param {*} [options] Override http request option.
|
|
11691
|
+
* @throws {RequiredError}
|
|
11692
|
+
*/
|
|
11693
|
+
firebaseToken: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
11681
11694
|
/**
|
|
11682
11695
|
*
|
|
11683
11696
|
* @summary List in-app notifications for the logged-in user
|
|
@@ -11689,7 +11702,7 @@ export declare const NotificationsApiAxiosParamCreator: (configuration?: Configu
|
|
|
11689
11702
|
listNotifications: (company?: string, limit?: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
11690
11703
|
/**
|
|
11691
11704
|
*
|
|
11692
|
-
* @summary Mark all notifications as read
|
|
11705
|
+
* @summary Mark all notifications as read
|
|
11693
11706
|
* @param {*} [options] Override http request option.
|
|
11694
11707
|
* @throws {RequiredError}
|
|
11695
11708
|
*/
|
|
@@ -11723,6 +11736,13 @@ export declare const NotificationsApiFp: (configuration?: Configuration) => {
|
|
|
11723
11736
|
* @throws {RequiredError}
|
|
11724
11737
|
*/
|
|
11725
11738
|
dismissNotification(notificationId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DeleteResponseString>>;
|
|
11739
|
+
/**
|
|
11740
|
+
*
|
|
11741
|
+
* @summary Mint a Firebase custom token so the app can listen to its inbox
|
|
11742
|
+
* @param {*} [options] Override http request option.
|
|
11743
|
+
* @throws {RequiredError}
|
|
11744
|
+
*/
|
|
11745
|
+
firebaseToken(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ShowResponseMapStringString>>;
|
|
11726
11746
|
/**
|
|
11727
11747
|
*
|
|
11728
11748
|
* @summary List in-app notifications for the logged-in user
|
|
@@ -11734,7 +11754,7 @@ export declare const NotificationsApiFp: (configuration?: Configuration) => {
|
|
|
11734
11754
|
listNotifications(company?: string, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ShowResponseNotificationInboxDTO>>;
|
|
11735
11755
|
/**
|
|
11736
11756
|
*
|
|
11737
|
-
* @summary Mark all notifications as read
|
|
11757
|
+
* @summary Mark all notifications as read
|
|
11738
11758
|
* @param {*} [options] Override http request option.
|
|
11739
11759
|
* @throws {RequiredError}
|
|
11740
11760
|
*/
|
|
@@ -11768,6 +11788,13 @@ export declare const NotificationsApiFactory: (configuration?: Configuration, ba
|
|
|
11768
11788
|
* @throws {RequiredError}
|
|
11769
11789
|
*/
|
|
11770
11790
|
dismissNotification(notificationId: string, options?: RawAxiosRequestConfig): AxiosPromise<DeleteResponseString>;
|
|
11791
|
+
/**
|
|
11792
|
+
*
|
|
11793
|
+
* @summary Mint a Firebase custom token so the app can listen to its inbox
|
|
11794
|
+
* @param {*} [options] Override http request option.
|
|
11795
|
+
* @throws {RequiredError}
|
|
11796
|
+
*/
|
|
11797
|
+
firebaseToken(options?: RawAxiosRequestConfig): AxiosPromise<ShowResponseMapStringString>;
|
|
11771
11798
|
/**
|
|
11772
11799
|
*
|
|
11773
11800
|
* @summary List in-app notifications for the logged-in user
|
|
@@ -11779,7 +11806,7 @@ export declare const NotificationsApiFactory: (configuration?: Configuration, ba
|
|
|
11779
11806
|
listNotifications(company?: string, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise<ShowResponseNotificationInboxDTO>;
|
|
11780
11807
|
/**
|
|
11781
11808
|
*
|
|
11782
|
-
* @summary Mark all notifications as read
|
|
11809
|
+
* @summary Mark all notifications as read
|
|
11783
11810
|
* @param {*} [options] Override http request option.
|
|
11784
11811
|
* @throws {RequiredError}
|
|
11785
11812
|
*/
|
|
@@ -11813,6 +11840,13 @@ export declare class NotificationsApi extends BaseAPI {
|
|
|
11813
11840
|
* @throws {RequiredError}
|
|
11814
11841
|
*/
|
|
11815
11842
|
dismissNotification(notificationId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<DeleteResponseString, any, {}>>;
|
|
11843
|
+
/**
|
|
11844
|
+
*
|
|
11845
|
+
* @summary Mint a Firebase custom token so the app can listen to its inbox
|
|
11846
|
+
* @param {*} [options] Override http request option.
|
|
11847
|
+
* @throws {RequiredError}
|
|
11848
|
+
*/
|
|
11849
|
+
firebaseToken(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ShowResponseMapStringString, any, {}>>;
|
|
11816
11850
|
/**
|
|
11817
11851
|
*
|
|
11818
11852
|
* @summary List in-app notifications for the logged-in user
|
|
@@ -11824,7 +11858,7 @@ export declare class NotificationsApi extends BaseAPI {
|
|
|
11824
11858
|
listNotifications(company?: string, limit?: number, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ShowResponseNotificationInboxDTO, any, {}>>;
|
|
11825
11859
|
/**
|
|
11826
11860
|
*
|
|
11827
|
-
* @summary Mark all notifications as read
|
|
11861
|
+
* @summary Mark all notifications as read
|
|
11828
11862
|
* @param {*} [options] Override http request option.
|
|
11829
11863
|
* @throws {RequiredError}
|
|
11830
11864
|
*/
|
package/dist/esm/api.js
CHANGED
|
@@ -8643,6 +8643,35 @@ export const NotificationsApiAxiosParamCreator = function (configuration) {
|
|
|
8643
8643
|
options: localVarRequestOptions,
|
|
8644
8644
|
};
|
|
8645
8645
|
}),
|
|
8646
|
+
/**
|
|
8647
|
+
*
|
|
8648
|
+
* @summary Mint a Firebase custom token so the app can listen to its inbox
|
|
8649
|
+
* @param {*} [options] Override http request option.
|
|
8650
|
+
* @throws {RequiredError}
|
|
8651
|
+
*/
|
|
8652
|
+
firebaseToken: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
8653
|
+
const localVarPath = `/api/v2/notifications/firebase-token`;
|
|
8654
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
8655
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
8656
|
+
let baseOptions;
|
|
8657
|
+
if (configuration) {
|
|
8658
|
+
baseOptions = configuration.baseOptions;
|
|
8659
|
+
}
|
|
8660
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
8661
|
+
const localVarHeaderParameter = {};
|
|
8662
|
+
const localVarQueryParameter = {};
|
|
8663
|
+
// authentication bearerAuth required
|
|
8664
|
+
// http bearer authentication required
|
|
8665
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
8666
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
8667
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
8668
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
8669
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
8670
|
+
return {
|
|
8671
|
+
url: toPathString(localVarUrlObj),
|
|
8672
|
+
options: localVarRequestOptions,
|
|
8673
|
+
};
|
|
8674
|
+
}),
|
|
8646
8675
|
/**
|
|
8647
8676
|
*
|
|
8648
8677
|
* @summary List in-app notifications for the logged-in user
|
|
@@ -8682,7 +8711,7 @@ export const NotificationsApiAxiosParamCreator = function (configuration) {
|
|
|
8682
8711
|
}),
|
|
8683
8712
|
/**
|
|
8684
8713
|
*
|
|
8685
|
-
* @summary Mark all notifications as read
|
|
8714
|
+
* @summary Mark all notifications as read
|
|
8686
8715
|
* @param {*} [options] Override http request option.
|
|
8687
8716
|
* @throws {RequiredError}
|
|
8688
8717
|
*/
|
|
@@ -8800,6 +8829,21 @@ export const NotificationsApiFp = function (configuration) {
|
|
|
8800
8829
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
8801
8830
|
});
|
|
8802
8831
|
},
|
|
8832
|
+
/**
|
|
8833
|
+
*
|
|
8834
|
+
* @summary Mint a Firebase custom token so the app can listen to its inbox
|
|
8835
|
+
* @param {*} [options] Override http request option.
|
|
8836
|
+
* @throws {RequiredError}
|
|
8837
|
+
*/
|
|
8838
|
+
firebaseToken(options) {
|
|
8839
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
8840
|
+
var _a, _b, _c;
|
|
8841
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.firebaseToken(options);
|
|
8842
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
8843
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['NotificationsApi.firebaseToken']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
8844
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
8845
|
+
});
|
|
8846
|
+
},
|
|
8803
8847
|
/**
|
|
8804
8848
|
*
|
|
8805
8849
|
* @summary List in-app notifications for the logged-in user
|
|
@@ -8819,7 +8863,7 @@ export const NotificationsApiFp = function (configuration) {
|
|
|
8819
8863
|
},
|
|
8820
8864
|
/**
|
|
8821
8865
|
*
|
|
8822
|
-
* @summary Mark all notifications as read
|
|
8866
|
+
* @summary Mark all notifications as read
|
|
8823
8867
|
* @param {*} [options] Override http request option.
|
|
8824
8868
|
* @throws {RequiredError}
|
|
8825
8869
|
*/
|
|
@@ -8882,6 +8926,15 @@ export const NotificationsApiFactory = function (configuration, basePath, axios)
|
|
|
8882
8926
|
dismissNotification(notificationId, options) {
|
|
8883
8927
|
return localVarFp.dismissNotification(notificationId, options).then((request) => request(axios, basePath));
|
|
8884
8928
|
},
|
|
8929
|
+
/**
|
|
8930
|
+
*
|
|
8931
|
+
* @summary Mint a Firebase custom token so the app can listen to its inbox
|
|
8932
|
+
* @param {*} [options] Override http request option.
|
|
8933
|
+
* @throws {RequiredError}
|
|
8934
|
+
*/
|
|
8935
|
+
firebaseToken(options) {
|
|
8936
|
+
return localVarFp.firebaseToken(options).then((request) => request(axios, basePath));
|
|
8937
|
+
},
|
|
8885
8938
|
/**
|
|
8886
8939
|
*
|
|
8887
8940
|
* @summary List in-app notifications for the logged-in user
|
|
@@ -8895,7 +8948,7 @@ export const NotificationsApiFactory = function (configuration, basePath, axios)
|
|
|
8895
8948
|
},
|
|
8896
8949
|
/**
|
|
8897
8950
|
*
|
|
8898
|
-
* @summary Mark all notifications as read
|
|
8951
|
+
* @summary Mark all notifications as read
|
|
8899
8952
|
* @param {*} [options] Override http request option.
|
|
8900
8953
|
* @throws {RequiredError}
|
|
8901
8954
|
*/
|
|
@@ -8938,6 +8991,15 @@ export class NotificationsApi extends BaseAPI {
|
|
|
8938
8991
|
dismissNotification(notificationId, options) {
|
|
8939
8992
|
return NotificationsApiFp(this.configuration).dismissNotification(notificationId, options).then((request) => request(this.axios, this.basePath));
|
|
8940
8993
|
}
|
|
8994
|
+
/**
|
|
8995
|
+
*
|
|
8996
|
+
* @summary Mint a Firebase custom token so the app can listen to its inbox
|
|
8997
|
+
* @param {*} [options] Override http request option.
|
|
8998
|
+
* @throws {RequiredError}
|
|
8999
|
+
*/
|
|
9000
|
+
firebaseToken(options) {
|
|
9001
|
+
return NotificationsApiFp(this.configuration).firebaseToken(options).then((request) => request(this.axios, this.basePath));
|
|
9002
|
+
}
|
|
8941
9003
|
/**
|
|
8942
9004
|
*
|
|
8943
9005
|
* @summary List in-app notifications for the logged-in user
|
|
@@ -8951,7 +9013,7 @@ export class NotificationsApi extends BaseAPI {
|
|
|
8951
9013
|
}
|
|
8952
9014
|
/**
|
|
8953
9015
|
*
|
|
8954
|
-
* @summary Mark all notifications as read
|
|
9016
|
+
* @summary Mark all notifications as read
|
|
8955
9017
|
* @param {*} [options] Override http request option.
|
|
8956
9018
|
* @throws {RequiredError}
|
|
8957
9019
|
*/
|
package/docs/NotificationsApi.md
CHANGED
|
@@ -5,8 +5,9 @@ All URIs are relative to *https://v2.api.caraer.com*
|
|
|
5
5
|
|Method | HTTP request | Description|
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
7
|
|[**dismissNotification**](#dismissnotification) | **DELETE** /api/v2/notifications/{notificationId} | Dismiss a notification|
|
|
8
|
+
|[**firebaseToken**](#firebasetoken) | **GET** /api/v2/notifications/firebase-token | Mint a Firebase custom token so the app can listen to its inbox|
|
|
8
9
|
|[**listNotifications**](#listnotifications) | **GET** /api/v2/notifications | List in-app notifications for the logged-in user|
|
|
9
|
-
|[**markAllAsRead**](#markallasread) | **PATCH** /api/v2/notifications/read-all | Mark all notifications as read
|
|
10
|
+
|[**markAllAsRead**](#markallasread) | **PATCH** /api/v2/notifications/read-all | Mark all notifications as read|
|
|
10
11
|
|[**markAsRead**](#markasread) | **PATCH** /api/v2/notifications/{notificationId}/read | Mark a notification as read|
|
|
11
12
|
|[**sendNotification**](#sendnotification) | **POST** /api/v2/notifications | Send a notification (app token)|
|
|
12
13
|
|
|
@@ -64,6 +65,53 @@ const { status, data } = await apiInstance.dismissNotification(
|
|
|
64
65
|
|
|
65
66
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
66
67
|
|
|
68
|
+
# **firebaseToken**
|
|
69
|
+
> ShowResponseMapStringString firebaseToken()
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
### Example
|
|
73
|
+
|
|
74
|
+
```typescript
|
|
75
|
+
import {
|
|
76
|
+
NotificationsApi,
|
|
77
|
+
Configuration
|
|
78
|
+
} from '@caraer/client';
|
|
79
|
+
|
|
80
|
+
const configuration = new Configuration();
|
|
81
|
+
const apiInstance = new NotificationsApi(configuration);
|
|
82
|
+
|
|
83
|
+
const { status, data } = await apiInstance.firebaseToken();
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Parameters
|
|
87
|
+
This endpoint does not have any parameters.
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
### Return type
|
|
91
|
+
|
|
92
|
+
**ShowResponseMapStringString**
|
|
93
|
+
|
|
94
|
+
### Authorization
|
|
95
|
+
|
|
96
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
97
|
+
|
|
98
|
+
### HTTP request headers
|
|
99
|
+
|
|
100
|
+
- **Content-Type**: Not defined
|
|
101
|
+
- **Accept**: application/json
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
### HTTP response details
|
|
105
|
+
| Status code | Description | Response headers |
|
|
106
|
+
|-------------|-------------|------------------|
|
|
107
|
+
|**200** | OK | - |
|
|
108
|
+
|**401** | Authentication is required or the token is invalid. | - |
|
|
109
|
+
|**403** | The caller is missing a required role or scope. | - |
|
|
110
|
+
|**404** | The requested resource was not found. | - |
|
|
111
|
+
|**500** | An internal server error occurred. | - |
|
|
112
|
+
|
|
113
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
114
|
+
|
|
67
115
|
# **listNotifications**
|
|
68
116
|
> ShowResponseNotificationInboxDTO listNotifications()
|
|
69
117
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# ShowResponseMapStringString
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Represents the response for viewing or showing a specific resource.
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
7
|
Name | Type | Description | Notes
|
|
8
8
|
------------ | ------------- | ------------- | -------------
|
|
9
|
-
**message** | **string** |
|
|
10
|
-
**data** | **{ [key: string]:
|
|
9
|
+
**message** | **string** | A message detailing the result of the operation. | [optional] [default to undefined]
|
|
10
|
+
**data** | **{ [key: string]: string; }** | The data payload of the response, if any. | [optional] [default to undefined]
|
|
11
11
|
|
|
12
12
|
## Example
|
|
13
13
|
|