@@ -143,7 +143,7 @@ export class ActivityClient extends AsyncCompletionClient implements TypedActivi
143143 * Creates an Activity handle from ID and optionally from run ID. If `runId` is not set, the handle will refer to the
144144 * newest Activity run with the given Activity ID.
145145 *
146- * Note 1: this function always succeeds. If the provided ID is invalid, the error will only be thrown when calling
146+ * Note 1: this function always succeeds. If the provided ID is invalid, an error will only be thrown when calling
147147 * the handle's methods.
148148 *
149149 * Note 2: if `runID` is not set when calling `getHandle`, then `runId` property of the returned handle will always
@@ -273,7 +273,7 @@ export class ActivityClient extends AsyncCompletionClient implements TypedActivi
273273 input : ActivityStartInput
274274 ) : Promise < temporal . api . workflowservice . v1 . IStartActivityExecutionRequest > {
275275 const searchAttributes = input . options . typedSearchAttributes
276- ? encodeUnifiedSearchAttributes ( undefined , input . options . typedSearchAttributes )
276+ ? { indexedFields : encodeUnifiedSearchAttributes ( undefined , input . options . typedSearchAttributes ) }
277277 : undefined ;
278278
279279 return {
@@ -291,7 +291,7 @@ export class ActivityClient extends AsyncCompletionClient implements TypedActivi
291291 input : { payloads : await encodeToPayloads ( this . dataConverter , ...( input . options . args || [ ] ) ) } ,
292292 idReusePolicy : encodeActivityIdReusePolicy ( input . options . idReusePolicy ) ,
293293 idConflictPolicy : encodeActivityIdConflictPolicy ( input . options . idConflictPolicy ) ,
294- searchAttributes : { indexedFields : searchAttributes } ,
294+ searchAttributes,
295295 header : input . headers ,
296296 userMetadata : await encodeUserMetadata ( this . dataConverter , input . options . summary , undefined ) ,
297297 priority : input . options . priority ? compilePriority ( input . options . priority ) : undefined ,
@@ -427,7 +427,7 @@ export class ActivityClient extends AsyncCompletionClient implements TypedActivi
427427 } ) ) ,
428428 } ;
429429 } catch ( err ) {
430- this . rethrowGrpcError ( err , 'Failed to request activity cancellation ' ) ;
430+ this . rethrowGrpcError ( err , 'Failed to count activities ' ) ;
431431 }
432432 }
433433
@@ -498,6 +498,9 @@ export interface ActivityOptions {
498498 * If set, specifies maximum time between successful heartbeats.
499499 */
500500 heartbeatTimeout ?: Duration ;
501+ /**
502+ * Controls how Activity is retried. If not set, the server will assign default retry policy.
503+ */
501504 retry ?: RetryPolicy ;
502505 /**
503506 * Is set, specifies total time the activity is allowed to run, including retries.
0 commit comments