@@ -926,127 +926,6 @@ class PlatformNotificationsV1 extends BaseService {
926926
927927 return this . createRequest ( parameters ) ;
928928 }
929-
930- /**
931- * Get user's last acknowledged notification Id.
932- *
933- * Retrieve the ID of the last notification acknowledged by the user for a specific account.
934- *
935- * @param {Object } [params] - The parameters to send to the service.
936- * @param {string } [params.accountId] - The account ID to retrieve acknowledgment for.
937- * @param {string } [params.lastProcessedId] - Client's last known notification ID for quick comparison.
938- * @param {OutgoingHttpHeaders } [params.headers] - Custom request headers
939- * @returns {Promise<PlatformNotificationsV1.Response<PlatformNotificationsV1.Acknowledgment>> }
940- */
941- public getAcknowledgment (
942- params ?: PlatformNotificationsV1 . GetAcknowledgmentParams
943- ) : Promise < PlatformNotificationsV1 . Response < PlatformNotificationsV1 . Acknowledgment > > {
944- const _params = { ...params } ;
945- const _requiredParams = [ ] ;
946- const _validParams = [ 'accountId' , 'lastProcessedId' , 'signal' , 'headers' ] ;
947- const _validationErrors = validateParams ( _params , _requiredParams , _validParams ) ;
948- if ( _validationErrors ) {
949- return Promise . reject ( _validationErrors ) ;
950- }
951-
952- const query = {
953- 'account_id' : _params . accountId ,
954- 'last_processed_id' : _params . lastProcessedId ,
955- } ;
956-
957- const sdkHeaders = getSdkHeaders (
958- PlatformNotificationsV1 . DEFAULT_SERVICE_NAME ,
959- 'v1' ,
960- 'getAcknowledgment'
961- ) ;
962-
963- const parameters = {
964- options : {
965- url : '/v1/notifications/acknowledgment' ,
966- method : 'GET' ,
967- qs : query ,
968- } ,
969- defaultOptions : extend ( true , { } , this . baseOptions , {
970- headers : extend (
971- true ,
972- sdkHeaders ,
973- this . baseOptions . headers ,
974- {
975- 'Accept' : 'application/json' ,
976- } ,
977- _params . headers
978- ) ,
979- axiosOptions : {
980- signal : _params . signal ,
981- } ,
982- } ) ,
983- } ;
984-
985- return this . createRequest ( parameters ) ;
986- }
987-
988- /**
989- * Update user's last acknowledged notification.
990- *
991- * Update the ID of the last notification acknowledged by the user for a specific account.
992- *
993- * @param {Object } params - The parameters to send to the service.
994- * @param {string } params.lastAcknowledgedId - The ID of a notification.
995- * @param {string } [params.accountId] - The account ID to update acknowledgment for.
996- * @param {OutgoingHttpHeaders } [params.headers] - Custom request headers
997- * @returns {Promise<PlatformNotificationsV1.Response<PlatformNotificationsV1.Acknowledgment>> }
998- */
999- public replaceNotificationAcknowledgment (
1000- params : PlatformNotificationsV1 . ReplaceNotificationAcknowledgmentParams
1001- ) : Promise < PlatformNotificationsV1 . Response < PlatformNotificationsV1 . Acknowledgment > > {
1002- const _params = { ...params } ;
1003- const _requiredParams = [ 'lastAcknowledgedId' ] ;
1004- const _validParams = [ 'lastAcknowledgedId' , 'accountId' , 'signal' , 'headers' ] ;
1005- const _validationErrors = validateParams ( _params , _requiredParams , _validParams ) ;
1006- if ( _validationErrors ) {
1007- return Promise . reject ( _validationErrors ) ;
1008- }
1009-
1010- const body = {
1011- 'last_acknowledged_id' : _params . lastAcknowledgedId ,
1012- } ;
1013-
1014- const query = {
1015- 'account_id' : _params . accountId ,
1016- } ;
1017-
1018- const sdkHeaders = getSdkHeaders (
1019- PlatformNotificationsV1 . DEFAULT_SERVICE_NAME ,
1020- 'v1' ,
1021- 'replaceNotificationAcknowledgment'
1022- ) ;
1023-
1024- const parameters = {
1025- options : {
1026- url : '/v1/notifications/acknowledgment' ,
1027- method : 'PUT' ,
1028- body,
1029- qs : query ,
1030- } ,
1031- defaultOptions : extend ( true , { } , this . baseOptions , {
1032- headers : extend (
1033- true ,
1034- sdkHeaders ,
1035- this . baseOptions . headers ,
1036- {
1037- 'Accept' : 'application/json' ,
1038- 'Content-Type' : 'application/json' ,
1039- } ,
1040- _params . headers
1041- ) ,
1042- axiosOptions : {
1043- signal : _params . signal ,
1044- } ,
1045- } ) ,
1046- } ;
1047-
1048- return this . createRequest ( parameters ) ;
1049- }
1050929}
1051930
1052931/*************************
@@ -1260,38 +1139,10 @@ namespace PlatformNotificationsV1 {
12601139 limit ?: number ;
12611140 }
12621141
1263- /** Parameters for the `getAcknowledgment` operation. */
1264- export interface GetAcknowledgmentParams extends DefaultParams {
1265- /** The account ID to retrieve acknowledgment for. */
1266- accountId ?: string ;
1267- /** Client's last known notification ID for quick comparison. */
1268- lastProcessedId ?: string ;
1269- }
1270-
1271- /** Parameters for the `replaceNotificationAcknowledgment` operation. */
1272- export interface ReplaceNotificationAcknowledgmentParams extends DefaultParams {
1273- /** The ID of a notification, represented as a timestamp string. */
1274- lastAcknowledgedId : string ;
1275- /** The account ID to update acknowledgment for. */
1276- accountId ?: string ;
1277- }
1278-
12791142 /*************************
12801143 * model interfaces
12811144 ************************/
12821145
1283- /**
1284- * Status indicating whether the user has unread notifications.
1285- */
1286- export interface Acknowledgment {
1287- /** Indicates whether the user has unread notifications. */
1288- has_unread : boolean ;
1289- /** The ID of the most recent notification available to the user. */
1290- latest_notification_id : string ;
1291- /** The ID of the last notification acknowledged by the user. */
1292- last_acknowledged_id : string ;
1293- }
1294-
12951146 /**
12961147 * AddDestination.
12971148 */
0 commit comments