@@ -1294,7 +1294,7 @@ export class ObjectStackClient {
12941294 * List feed items for a record
12951295 */
12961296 list : async ( object : string , recordId : string , options ?: { type ?: string ; limit ?: number ; cursor ?: string } ) : Promise < GetFeedResponse > => {
1297- const route = this . getRoute ( 'feed ' ) ;
1297+ const route = this . getRoute ( 'data ' ) ;
12981298 const params = new URLSearchParams ( ) ;
12991299 if ( options ?. type ) params . set ( 'type' , options . type ) ;
13001300 if ( options ?. limit ) params . set ( 'limit' , String ( options . limit ) ) ;
@@ -1308,7 +1308,7 @@ export class ObjectStackClient {
13081308 * Create a new feed item (comment, note, task, etc.)
13091309 */
13101310 create : async ( object : string , recordId : string , data : { type : string ; body ?: string ; mentions ?: any [ ] ; parentId ?: string ; visibility ?: string } ) : Promise < CreateFeedItemResponse > => {
1311- const route = this . getRoute ( 'feed ' ) ;
1311+ const route = this . getRoute ( 'data ' ) ;
13121312 const res = await this . fetch ( `${ this . baseUrl } ${ route } /${ encodeURIComponent ( object ) } /${ encodeURIComponent ( recordId ) } /feed` , {
13131313 method : 'POST' ,
13141314 body : JSON . stringify ( data )
@@ -1320,7 +1320,7 @@ export class ObjectStackClient {
13201320 * Update an existing feed item
13211321 */
13221322 update : async ( object : string , recordId : string , feedId : string , data : { body ?: string ; mentions ?: any [ ] ; visibility ?: string } ) : Promise < UpdateFeedItemResponse > => {
1323- const route = this . getRoute ( 'feed ' ) ;
1323+ const route = this . getRoute ( 'data ' ) ;
13241324 const res = await this . fetch ( `${ this . baseUrl } ${ route } /${ encodeURIComponent ( object ) } /${ encodeURIComponent ( recordId ) } /feed/${ encodeURIComponent ( feedId ) } ` , {
13251325 method : 'PUT' ,
13261326 body : JSON . stringify ( data )
@@ -1332,7 +1332,7 @@ export class ObjectStackClient {
13321332 * Delete a feed item
13331333 */
13341334 delete : async ( object : string , recordId : string , feedId : string ) : Promise < DeleteFeedItemResponse > => {
1335- const route = this . getRoute ( 'feed ' ) ;
1335+ const route = this . getRoute ( 'data ' ) ;
13361336 const res = await this . fetch ( `${ this . baseUrl } ${ route } /${ encodeURIComponent ( object ) } /${ encodeURIComponent ( recordId ) } /feed/${ encodeURIComponent ( feedId ) } ` , {
13371337 method : 'DELETE'
13381338 } ) ;
@@ -1343,7 +1343,7 @@ export class ObjectStackClient {
13431343 * Add an emoji reaction to a feed item
13441344 */
13451345 addReaction : async ( object : string , recordId : string , feedId : string , emoji : string ) : Promise < AddReactionResponse > => {
1346- const route = this . getRoute ( 'feed ' ) ;
1346+ const route = this . getRoute ( 'data ' ) ;
13471347 const res = await this . fetch ( `${ this . baseUrl } ${ route } /${ encodeURIComponent ( object ) } /${ encodeURIComponent ( recordId ) } /feed/${ encodeURIComponent ( feedId ) } /reactions` , {
13481348 method : 'POST' ,
13491349 body : JSON . stringify ( { emoji } )
@@ -1355,7 +1355,7 @@ export class ObjectStackClient {
13551355 * Remove an emoji reaction from a feed item
13561356 */
13571357 removeReaction : async ( object : string , recordId : string , feedId : string , emoji : string ) : Promise < RemoveReactionResponse > => {
1358- const route = this . getRoute ( 'feed ' ) ;
1358+ const route = this . getRoute ( 'data ' ) ;
13591359 const res = await this . fetch ( `${ this . baseUrl } ${ route } /${ encodeURIComponent ( object ) } /${ encodeURIComponent ( recordId ) } /feed/${ encodeURIComponent ( feedId ) } /reactions/${ encodeURIComponent ( emoji ) } ` , {
13601360 method : 'DELETE'
13611361 } ) ;
@@ -1366,7 +1366,7 @@ export class ObjectStackClient {
13661366 * Pin a feed item to the top of the timeline
13671367 */
13681368 pin : async ( object : string , recordId : string , feedId : string ) : Promise < PinFeedItemResponse > => {
1369- const route = this . getRoute ( 'feed ' ) ;
1369+ const route = this . getRoute ( 'data ' ) ;
13701370 const res = await this . fetch ( `${ this . baseUrl } ${ route } /${ encodeURIComponent ( object ) } /${ encodeURIComponent ( recordId ) } /feed/${ encodeURIComponent ( feedId ) } /pin` , {
13711371 method : 'POST'
13721372 } ) ;
@@ -1377,7 +1377,7 @@ export class ObjectStackClient {
13771377 * Unpin a feed item
13781378 */
13791379 unpin : async ( object : string , recordId : string , feedId : string ) : Promise < UnpinFeedItemResponse > => {
1380- const route = this . getRoute ( 'feed ' ) ;
1380+ const route = this . getRoute ( 'data ' ) ;
13811381 const res = await this . fetch ( `${ this . baseUrl } ${ route } /${ encodeURIComponent ( object ) } /${ encodeURIComponent ( recordId ) } /feed/${ encodeURIComponent ( feedId ) } /pin` , {
13821382 method : 'DELETE'
13831383 } ) ;
@@ -1388,7 +1388,7 @@ export class ObjectStackClient {
13881388 * Star (bookmark) a feed item
13891389 */
13901390 star : async ( object : string , recordId : string , feedId : string ) : Promise < StarFeedItemResponse > => {
1391- const route = this . getRoute ( 'feed ' ) ;
1391+ const route = this . getRoute ( 'data ' ) ;
13921392 const res = await this . fetch ( `${ this . baseUrl } ${ route } /${ encodeURIComponent ( object ) } /${ encodeURIComponent ( recordId ) } /feed/${ encodeURIComponent ( feedId ) } /star` , {
13931393 method : 'POST'
13941394 } ) ;
@@ -1399,7 +1399,7 @@ export class ObjectStackClient {
13991399 * Unstar a feed item
14001400 */
14011401 unstar : async ( object : string , recordId : string , feedId : string ) : Promise < UnstarFeedItemResponse > => {
1402- const route = this . getRoute ( 'feed ' ) ;
1402+ const route = this . getRoute ( 'data ' ) ;
14031403 const res = await this . fetch ( `${ this . baseUrl } ${ route } /${ encodeURIComponent ( object ) } /${ encodeURIComponent ( recordId ) } /feed/${ encodeURIComponent ( feedId ) } /star` , {
14041404 method : 'DELETE'
14051405 } ) ;
@@ -1410,7 +1410,7 @@ export class ObjectStackClient {
14101410 * Search feed items
14111411 */
14121412 search : async ( object : string , recordId : string , query : string , options ?: { type ?: string ; actorId ?: string ; dateFrom ?: string ; dateTo ?: string ; limit ?: number ; cursor ?: string } ) : Promise < SearchFeedResponse > => {
1413- const route = this . getRoute ( 'feed ' ) ;
1413+ const route = this . getRoute ( 'data ' ) ;
14141414 const params = new URLSearchParams ( ) ;
14151415 params . set ( 'query' , query ) ;
14161416 if ( options ?. type ) params . set ( 'type' , options . type ) ;
@@ -1427,7 +1427,7 @@ export class ObjectStackClient {
14271427 * Get field-level changelog for a record
14281428 */
14291429 getChangelog : async ( object : string , recordId : string , options ?: { field ?: string ; actorId ?: string ; dateFrom ?: string ; dateTo ?: string ; limit ?: number ; cursor ?: string } ) : Promise < GetChangelogResponse > => {
1430- const route = this . getRoute ( 'feed ' ) ;
1430+ const route = this . getRoute ( 'data ' ) ;
14311431 const params = new URLSearchParams ( ) ;
14321432 if ( options ?. field ) params . set ( 'field' , options . field ) ;
14331433 if ( options ?. actorId ) params . set ( 'actorId' , options . actorId ) ;
@@ -1444,7 +1444,7 @@ export class ObjectStackClient {
14441444 * Subscribe to record notifications
14451445 */
14461446 subscribe : async ( object : string , recordId : string , options ?: { events ?: string [ ] ; channels ?: string [ ] } ) : Promise < SubscribeResponse > => {
1447- const route = this . getRoute ( 'feed ' ) ;
1447+ const route = this . getRoute ( 'data ' ) ;
14481448 const res = await this . fetch ( `${ this . baseUrl } ${ route } /${ encodeURIComponent ( object ) } /${ encodeURIComponent ( recordId ) } /subscribe` , {
14491449 method : 'POST' ,
14501450 body : JSON . stringify ( options || { } )
@@ -1456,7 +1456,7 @@ export class ObjectStackClient {
14561456 * Unsubscribe from record notifications
14571457 */
14581458 unsubscribe : async ( object : string , recordId : string ) : Promise < UnsubscribeResponse > => {
1459- const route = this . getRoute ( 'feed ' ) ;
1459+ const route = this . getRoute ( 'data ' ) ;
14601460 const res = await this . fetch ( `${ this . baseUrl } ${ route } /${ encodeURIComponent ( object ) } /${ encodeURIComponent ( recordId ) } /subscribe` , {
14611461 method : 'DELETE'
14621462 } ) ;
0 commit comments