File tree 3 files changed +24
-10
lines changed
3 files changed +24
-10
lines changed Original file line number Diff line number Diff line change @@ -624,7 +624,7 @@ export class OFS {
624
624
offset : number = 0 ,
625
625
limit : number = 100
626
626
) : Promise < OFSResponse > {
627
- const partialURL = "/rest/ofscCore/v1/activities" ;
627
+ const partialURL = "/rest/ofscCore/v1/activities/custom-actions/search " ;
628
628
return this . _get ( partialURL , {
629
629
...params ,
630
630
offset : offset ,
Original file line number Diff line number Diff line change @@ -175,13 +175,13 @@ export interface OFSGetActivitiesParams {
175
175
}
176
176
177
177
export interface OFSSearchForActivitiesParams {
178
- dateFrom ?: string ;
179
- dateTo ?: string ;
178
+ dateFrom : string ;
179
+ dateTo : string ;
180
+ searchForValue : string ;
181
+ searchInField : string ;
180
182
fields ?: string ;
181
183
includeMultiday ?: string ;
182
184
includeNonScheduled ?: boolean ;
183
- searchForValue : string ;
184
- searchInField : string ;
185
185
}
186
186
187
187
export interface OFSBulkUpdateRequestInterface {
Original file line number Diff line number Diff line change @@ -78,9 +78,6 @@ test("Bulk Update Activities", async () => {
78
78
79
79
// Perform bulk update
80
80
var bulkUpdateResult = await myProxy . bulkUpdateActivity ( bulkUpdateData ) ;
81
- console . log (
82
- `BULK UPDATE RESPONSE ${ JSON . stringify ( bulkUpdateResult . data , null , 2 ) } `
83
- ) ;
84
81
expect ( bulkUpdateResult . data . results . length ) . toBe ( 2 ) ;
85
82
} ) ;
86
83
@@ -327,19 +324,36 @@ test("Get Activities", async () => {
327
324
} ) ;
328
325
329
326
test ( "Search for Activities" , async ( ) => {
327
+ var currentDate = new Date ( ) . toISOString ( ) . split ( "T" ) [ 0 ] ;
330
328
var result = await myProxy . searchForActivities (
331
329
{
330
+ dateFrom : currentDate ,
331
+ dateTo : currentDate ,
332
332
searchForValue : "137165209" ,
333
333
searchInField : "apptNumber" ,
334
334
} ,
335
335
0 ,
336
336
100
337
337
) ;
338
338
if ( result . status !== 200 ) {
339
- console . log ( result ) ;
339
+ console . log (
340
+ `Search for Activities ERROR: ${ JSON . stringify (
341
+ result . data ,
342
+ null ,
343
+ 2
344
+ ) } `
345
+ ) ;
346
+ } else {
347
+ console . log (
348
+ `Search for Activities Result: ${ JSON . stringify (
349
+ result . data ,
350
+ null ,
351
+ 2
352
+ ) } `
353
+ ) ;
340
354
}
341
355
expect ( result . status ) . toBe ( 200 ) ;
342
- expect ( result . data . items . length ) . toBe ( 1 ) ;
356
+ expect ( result . data . items . length ) . toBe ( 2 ) ;
343
357
} ) ;
344
358
345
359
test ( "Get Activities with includeChildren" , async ( ) => {
You can’t perform that action at this time.
0 commit comments