@@ -12,12 +12,14 @@ import {
1212 CreateCommandResponse ,
1313 CreatePollOptionRequest ,
1414 CreatePollRequest ,
15+ CreateReminderRequest ,
1516 DeleteChannelResponse ,
1617 DeleteChannelsRequest ,
1718 DeleteChannelsResponse ,
1819 DeleteCommandResponse ,
1920 DeleteMessageResponse ,
2021 DeleteReactionResponse ,
22+ DeleteReminderResponse ,
2123 DeleteSegmentTargetsRequest ,
2224 EventResponse ,
2325 ExportChannelsRequest ,
@@ -30,6 +32,7 @@ import {
3032 GetDraftResponse ,
3133 GetManyMessagesResponse ,
3234 GetMessageResponse ,
35+ GetPushTemplatesResponse ,
3336 GetReactionsResponse ,
3437 GetRepliesResponse ,
3538 GetSegmentResponse ,
@@ -71,12 +74,15 @@ import {
7174 QueryPollsResponse ,
7275 QueryReactionsRequest ,
7376 QueryReactionsResponse ,
77+ QueryRemindersRequest ,
78+ QueryRemindersResponse ,
7479 QuerySegmentTargetsRequest ,
7580 QuerySegmentTargetsResponse ,
7681 QuerySegmentsRequest ,
7782 QuerySegmentsResponse ,
7883 QueryThreadsRequest ,
7984 QueryThreadsResponse ,
85+ ReminderResponseData ,
8086 Response ,
8187 SearchPayload ,
8288 SearchResponse ,
@@ -116,10 +122,14 @@ import {
116122 UpdatePollOptionRequest ,
117123 UpdatePollPartialRequest ,
118124 UpdatePollRequest ,
125+ UpdateReminderRequest ,
126+ UpdateReminderResponse ,
119127 UpdateThreadPartialRequest ,
120128 UpdateThreadPartialResponse ,
121129 UpsertPushPreferencesRequest ,
122130 UpsertPushPreferencesResponse ,
131+ UpsertPushTemplateRequest ,
132+ UpsertPushTemplateResponse ,
123133 WrappedUnreadCountsResponse ,
124134} from '../models' ;
125135import { decoders } from '../model-decoders' ;
@@ -790,6 +800,7 @@ export class ChatApi extends BaseApi {
790800 skip_push : request ?. skip_push ,
791801 truncated_at : request ?. truncated_at ,
792802 user_id : request ?. user_id ,
803+ member_ids : request ?. member_ids ,
793804 message : request ?. message ,
794805 user : request ?. user ,
795806 } ;
@@ -876,6 +887,7 @@ export class ChatApi extends BaseApi {
876887 typing_events : request ?. typing_events ,
877888 uploads : request ?. uploads ,
878889 url_enrichment : request ?. url_enrichment ,
890+ user_message_reminders : request ?. user_message_reminders ,
879891 blocklists : request ?. blocklists ,
880892 commands : request ?. commands ,
881893 permissions : request ?. permissions ,
@@ -957,6 +969,7 @@ export class ChatApi extends BaseApi {
957969 typing_events : request ?. typing_events ,
958970 uploads : request ?. uploads ,
959971 url_enrichment : request ?. url_enrichment ,
972+ user_message_reminders : request ?. user_message_reminders ,
960973 allowed_flag_reasons : request ?. allowed_flag_reasons ,
961974 blocklists : request ?. blocklists ,
962975 commands : request ?. commands ,
@@ -1195,6 +1208,7 @@ export class ChatApi extends BaseApi {
11951208 const body = {
11961209 message : request ?. message ,
11971210 skip_enrich_url : request ?. skip_enrich_url ,
1211+ skip_push : request ?. skip_push ,
11981212 } ;
11991213
12001214 const response = await this . sendRequest <
@@ -1414,6 +1428,7 @@ export class ChatApi extends BaseApi {
14141428 const body = {
14151429 message : request ?. message ,
14161430 skip_enrich_url : request ?. skip_enrich_url ,
1431+ skip_push : request ?. skip_push ,
14171432 } ;
14181433
14191434 const response = await this . sendRequest <
@@ -1484,6 +1499,85 @@ export class ChatApi extends BaseApi {
14841499 return { ...response . body , metadata : response . metadata } ;
14851500 } ;
14861501
1502+ deleteReminder = async ( request : {
1503+ message_id : string ;
1504+ user_id ?: string ;
1505+ } ) : Promise < StreamResponse < DeleteReminderResponse > > => {
1506+ const queryParams = {
1507+ user_id : request ?. user_id ,
1508+ } ;
1509+ const pathParams = {
1510+ message_id : request ?. message_id ,
1511+ } ;
1512+
1513+ const response = await this . sendRequest <
1514+ StreamResponse < DeleteReminderResponse >
1515+ > (
1516+ 'DELETE' ,
1517+ '/api/v2/chat/messages/{message_id}/reminders' ,
1518+ pathParams ,
1519+ queryParams ,
1520+ ) ;
1521+
1522+ decoders . DeleteReminderResponse ?.( response . body ) ;
1523+
1524+ return { ...response . body , metadata : response . metadata } ;
1525+ } ;
1526+
1527+ updateReminder = async (
1528+ request : UpdateReminderRequest & { message_id : string } ,
1529+ ) : Promise < StreamResponse < UpdateReminderResponse > > => {
1530+ const pathParams = {
1531+ message_id : request ?. message_id ,
1532+ } ;
1533+ const body = {
1534+ remind_at : request ?. remind_at ,
1535+ user_id : request ?. user_id ,
1536+ user : request ?. user ,
1537+ } ;
1538+
1539+ const response = await this . sendRequest <
1540+ StreamResponse < UpdateReminderResponse >
1541+ > (
1542+ 'PATCH' ,
1543+ '/api/v2/chat/messages/{message_id}/reminders' ,
1544+ pathParams ,
1545+ undefined ,
1546+ body ,
1547+ ) ;
1548+
1549+ decoders . UpdateReminderResponse ?.( response . body ) ;
1550+
1551+ return { ...response . body , metadata : response . metadata } ;
1552+ } ;
1553+
1554+ createReminder = async (
1555+ request : CreateReminderRequest & { message_id : string } ,
1556+ ) : Promise < StreamResponse < ReminderResponseData > > => {
1557+ const pathParams = {
1558+ message_id : request ?. message_id ,
1559+ } ;
1560+ const body = {
1561+ remind_at : request ?. remind_at ,
1562+ user_id : request ?. user_id ,
1563+ user : request ?. user ,
1564+ } ;
1565+
1566+ const response = await this . sendRequest <
1567+ StreamResponse < ReminderResponseData >
1568+ > (
1569+ 'POST' ,
1570+ '/api/v2/chat/messages/{message_id}/reminders' ,
1571+ pathParams ,
1572+ undefined ,
1573+ body ,
1574+ ) ;
1575+
1576+ decoders . ReminderResponseData ?.( response . body ) ;
1577+
1578+ return { ...response . body , metadata : response . metadata } ;
1579+ } ;
1580+
14871581 getReplies = async ( request : {
14881582 parent_id : string ;
14891583 limit ?: number ;
@@ -1908,6 +2002,44 @@ export class ChatApi extends BaseApi {
19082002 return { ...response . body , metadata : response . metadata } ;
19092003 } ;
19102004
2005+ getPushTemplates = async ( request : {
2006+ push_provider_type : string ;
2007+ push_provider_name ?: string ;
2008+ } ) : Promise < StreamResponse < GetPushTemplatesResponse > > => {
2009+ const queryParams = {
2010+ push_provider_type : request ?. push_provider_type ,
2011+ push_provider_name : request ?. push_provider_name ,
2012+ } ;
2013+
2014+ const response = await this . sendRequest <
2015+ StreamResponse < GetPushTemplatesResponse >
2016+ > ( 'GET' , '/api/v2/chat/push_templates' , undefined , queryParams ) ;
2017+
2018+ decoders . GetPushTemplatesResponse ?.( response . body ) ;
2019+
2020+ return { ...response . body , metadata : response . metadata } ;
2021+ } ;
2022+
2023+ upsertPushTemplate = async (
2024+ request : UpsertPushTemplateRequest ,
2025+ ) : Promise < StreamResponse < UpsertPushTemplateResponse > > => {
2026+ const body = {
2027+ event_type : request ?. event_type ,
2028+ push_provider_type : request ?. push_provider_type ,
2029+ enable_push : request ?. enable_push ,
2030+ push_provider_name : request ?. push_provider_name ,
2031+ template : request ?. template ,
2032+ } ;
2033+
2034+ const response = await this . sendRequest <
2035+ StreamResponse < UpsertPushTemplateResponse >
2036+ > ( 'POST' , '/api/v2/chat/push_templates' , undefined , undefined , body ) ;
2037+
2038+ decoders . UpsertPushTemplateResponse ?.( response . body ) ;
2039+
2040+ return { ...response . body , metadata : response . metadata } ;
2041+ } ;
2042+
19112043 queryBannedUsers = async ( request ?: {
19122044 payload ?: QueryBannedUsersPayload ;
19132045 } ) : Promise < StreamResponse < QueryBannedUsersResponse > > => {
@@ -1924,6 +2056,28 @@ export class ChatApi extends BaseApi {
19242056 return { ...response . body , metadata : response . metadata } ;
19252057 } ;
19262058
2059+ queryReminders = async (
2060+ request ?: QueryRemindersRequest ,
2061+ ) : Promise < StreamResponse < QueryRemindersResponse > > => {
2062+ const body = {
2063+ limit : request ?. limit ,
2064+ next : request ?. next ,
2065+ prev : request ?. prev ,
2066+ user_id : request ?. user_id ,
2067+ sort : request ?. sort ,
2068+ filter : request ?. filter ,
2069+ user : request ?. user ,
2070+ } ;
2071+
2072+ const response = await this . sendRequest <
2073+ StreamResponse < QueryRemindersResponse >
2074+ > ( 'POST' , '/api/v2/chat/reminders/query' , undefined , undefined , body ) ;
2075+
2076+ decoders . QueryRemindersResponse ?.( response . body ) ;
2077+
2078+ return { ...response . body , metadata : response . metadata } ;
2079+ } ;
2080+
19272081 search = async ( request ?: {
19282082 payload ?: SearchPayload ;
19292083 } ) : Promise < StreamResponse < SearchResponse > > => {
0 commit comments