File tree 2 files changed +22
-5
lines changed
tests/api-resources/events
2 files changed +22
-5
lines changed Original file line number Diff line number Diff line change @@ -408,7 +408,7 @@ export namespace EventSearchResponse {
408
408
/**
409
409
* The Orb Customer identifier
410
410
*/
411
- customer_id : string ;
411
+ customer_id : string | null ;
412
412
413
413
/**
414
414
* A name to meaningfully identify the action or event type.
@@ -529,10 +529,23 @@ export namespace EventIngestParams {
529
529
export interface EventSearchParams {
530
530
/**
531
531
* This is an explicit array of IDs to filter by. Note that an event's ID is the
532
- * idempotency_key that was originally used for ingestion. Values in this array
533
- * will be treated case sensitively.
532
+ * idempotency_key that was originally used for ingestion, and this only supports
533
+ * events that have not been amended. Values in this array will be treated case
534
+ * sensitively.
534
535
*/
535
536
event_ids : Array < string > ;
537
+
538
+ /**
539
+ * The end of the timeframe, exclusive, in which to search events. If not
540
+ * specified, the current time is used.
541
+ */
542
+ timeframe_end ?: string | null ;
543
+
544
+ /**
545
+ * The start of the timeframe, inclusive, in which to search events. If not
546
+ * specified, the one week ago is used.
547
+ */
548
+ timeframe_start ?: string | null ;
536
549
}
537
550
538
551
export namespace Events {
Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ describe('resource events', () => {
118
118
} ) ;
119
119
120
120
test ( 'search: only required params' , async ( ) => {
121
- const responsePromise = orb . events . search ( { event_ids : [ 'string' , 'string' , 'string' ] } ) ;
121
+ const responsePromise = orb . events . search ( { event_ids : [ 'string' ] } ) ;
122
122
const rawResponse = await responsePromise . asResponse ( ) ;
123
123
expect ( rawResponse ) . toBeInstanceOf ( Response ) ;
124
124
const response = await responsePromise ;
@@ -129,6 +129,10 @@ describe('resource events', () => {
129
129
} ) ;
130
130
131
131
test ( 'search: required and optional params' , async ( ) => {
132
- const response = await orb . events . search ( { event_ids : [ 'string' , 'string' , 'string' ] } ) ;
132
+ const response = await orb . events . search ( {
133
+ event_ids : [ 'string' ] ,
134
+ timeframe_end : '2019-12-27T18:11:19.117Z' ,
135
+ timeframe_start : '2019-12-27T18:11:19.117Z' ,
136
+ } ) ;
133
137
} ) ;
134
138
} ) ;
You can’t perform that action at this time.
0 commit comments