@temporalio/client
Advanced tools
Comparing version 1.8.1 to 1.8.2
@@ -8,3 +8,2 @@ import { BaseClient, BaseClientOptions, LoadedWithDefaults } from './base-client'; | ||
export declare class ActivityNotFoundError extends Error { | ||
readonly name = "ActivityNotFoundError"; | ||
} | ||
@@ -16,3 +15,2 @@ /** | ||
export declare class ActivityCompletionError extends Error { | ||
readonly name = "ActivityCompletionError"; | ||
} | ||
@@ -24,3 +22,2 @@ /** | ||
export declare class ActivityCancelledError extends Error { | ||
readonly name = "ActivityCancelledError"; | ||
} | ||
@@ -27,0 +24,0 @@ /** |
"use strict"; | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -7,2 +13,3 @@ exports.AsyncCompletionClient = exports.ActivityCancelledError = exports.ActivityCompletionError = exports.ActivityNotFoundError = void 0; | ||
const internal_non_workflow_1 = require("@temporalio/common/lib/internal-non-workflow"); | ||
const type_helpers_1 = require("@temporalio/common/lib/type-helpers"); | ||
const base_client_1 = require("./base-client"); | ||
@@ -15,8 +22,7 @@ const errors_1 = require("./errors"); | ||
*/ | ||
class ActivityNotFoundError extends Error { | ||
constructor() { | ||
super(...arguments); | ||
this.name = 'ActivityNotFoundError'; | ||
} | ||
} | ||
let ActivityNotFoundError = class ActivityNotFoundError extends Error { | ||
}; | ||
ActivityNotFoundError = __decorate([ | ||
(0, type_helpers_1.SymbolBasedInstanceOfError)('ActivityNotFoundError') | ||
], ActivityNotFoundError); | ||
exports.ActivityNotFoundError = ActivityNotFoundError; | ||
@@ -27,8 +33,7 @@ /** | ||
*/ | ||
class ActivityCompletionError extends Error { | ||
constructor() { | ||
super(...arguments); | ||
this.name = 'ActivityCompletionError'; | ||
} | ||
} | ||
let ActivityCompletionError = class ActivityCompletionError extends Error { | ||
}; | ||
ActivityCompletionError = __decorate([ | ||
(0, type_helpers_1.SymbolBasedInstanceOfError)('ActivityCompletionError') | ||
], ActivityCompletionError); | ||
exports.ActivityCompletionError = ActivityCompletionError; | ||
@@ -39,8 +44,7 @@ /** | ||
*/ | ||
class ActivityCancelledError extends Error { | ||
constructor() { | ||
super(...arguments); | ||
this.name = 'ActivityCancelledError'; | ||
} | ||
} | ||
let ActivityCancelledError = class ActivityCancelledError extends Error { | ||
}; | ||
ActivityCancelledError = __decorate([ | ||
(0, type_helpers_1.SymbolBasedInstanceOfError)('ActivityCancelledError') | ||
], ActivityCancelledError); | ||
exports.ActivityCancelledError = ActivityCancelledError; | ||
@@ -47,0 +51,0 @@ function defaultAsyncCompletionClientOptions() { |
@@ -7,3 +7,2 @@ import { ServiceError as GrpcServiceError } from '@grpc/grpc-js'; | ||
export declare class ServiceError extends Error { | ||
readonly name: string; | ||
readonly cause?: Error; | ||
@@ -26,3 +25,2 @@ constructor(message: string, opts?: { | ||
readonly retryState: RetryState; | ||
readonly name: string; | ||
constructor(message: string, cause: TemporalFailure | undefined, retryState: RetryState); | ||
@@ -38,3 +36,2 @@ } | ||
readonly newExecutionRunId: string; | ||
readonly name: string; | ||
constructor(message: string, newExecutionRunId: string); | ||
@@ -41,0 +38,0 @@ } |
"use strict"; | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isServerErrorResponse = exports.isGrpcServiceError = exports.WorkflowContinuedAsNewError = exports.WorkflowFailedError = exports.ServiceError = void 0; | ||
const type_helpers_1 = require("@temporalio/common/lib/type-helpers"); | ||
/** | ||
* Generic Error class for errors coming from the service | ||
*/ | ||
class ServiceError extends Error { | ||
let ServiceError = class ServiceError extends Error { | ||
constructor(message, opts) { | ||
super(message); | ||
this.name = 'ServiceError'; | ||
this.cause = opts?.cause; | ||
} | ||
} | ||
}; | ||
ServiceError = __decorate([ | ||
(0, type_helpers_1.SymbolBasedInstanceOfError)('ServiceError') | ||
], ServiceError); | ||
exports.ServiceError = ServiceError; | ||
@@ -24,3 +33,3 @@ /** | ||
*/ | ||
class WorkflowFailedError extends Error { | ||
let WorkflowFailedError = class WorkflowFailedError extends Error { | ||
constructor(message, cause, retryState) { | ||
@@ -30,5 +39,7 @@ super(message); | ||
this.retryState = retryState; | ||
this.name = 'WorkflowFailedError'; | ||
} | ||
} | ||
}; | ||
WorkflowFailedError = __decorate([ | ||
(0, type_helpers_1.SymbolBasedInstanceOfError)('WorkflowFailedError') | ||
], WorkflowFailedError); | ||
exports.WorkflowFailedError = WorkflowFailedError; | ||
@@ -41,12 +52,16 @@ /** | ||
*/ | ||
class WorkflowContinuedAsNewError extends Error { | ||
let WorkflowContinuedAsNewError = class WorkflowContinuedAsNewError extends Error { | ||
constructor(message, newExecutionRunId) { | ||
super(message); | ||
this.newExecutionRunId = newExecutionRunId; | ||
this.name = 'WorkflowExecutionContinuedAsNewError'; | ||
} | ||
} | ||
}; | ||
WorkflowContinuedAsNewError = __decorate([ | ||
(0, type_helpers_1.SymbolBasedInstanceOfError)('WorkflowExecutionContinuedAsNewError') | ||
], WorkflowContinuedAsNewError); | ||
exports.WorkflowContinuedAsNewError = WorkflowContinuedAsNewError; | ||
function isGrpcServiceError(err) { | ||
return err instanceof Error && err.details !== undefined && err.metadata !== undefined; | ||
return ((0, type_helpers_1.isError)(err) && | ||
typeof err?.details === 'string' && | ||
(0, type_helpers_1.isRecord)(err.metadata)); | ||
} | ||
@@ -53,0 +68,0 @@ exports.isGrpcServiceError = isGrpcServiceError; |
@@ -6,2 +6,3 @@ "use strict"; | ||
const node_events_1 = require("node:events"); | ||
const type_helpers_1 = require("@temporalio/common/lib/type-helpers"); | ||
function toAsyncIterator(iterable) { | ||
@@ -74,3 +75,3 @@ return iterable[Symbol.asyncIterator](); | ||
catch (err) { | ||
if (err?.name === 'AbortError') { | ||
if ((0, type_helpers_1.isAbortError)(err)) { | ||
return; | ||
@@ -77,0 +78,0 @@ } |
@@ -161,3 +161,2 @@ import { Workflow } from '@temporalio/common'; | ||
readonly scheduleId: string; | ||
readonly name: string; | ||
constructor(message: string, scheduleId: string); | ||
@@ -175,4 +174,3 @@ } | ||
readonly scheduleId: string; | ||
readonly name: string; | ||
constructor(message: string, scheduleId: string); | ||
} |
"use strict"; | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -11,2 +17,3 @@ exports.ScheduleNotFoundError = exports.ScheduleAlreadyRunning = exports.ScheduleClient = void 0; | ||
const time_1 = require("@temporalio/common/lib/time"); | ||
const type_helpers_1 = require("@temporalio/common/lib/type-helpers"); | ||
const errors_1 = require("./errors"); | ||
@@ -32,5 +39,2 @@ const schedule_helpers_1 = require("./schedule-helpers"); | ||
} | ||
if (!opts.action.workflowId && action === 'UPDATE') { | ||
throw new TypeError(`Missing ${structureName}.action.workflowId for 'startWorkflow' action`); | ||
} | ||
if (!opts.action.workflowType) { | ||
@@ -302,3 +306,3 @@ throw new TypeError(`Missing ${structureName}.action.workflowType for 'startWorkflow' action`); | ||
assertRequiredScheduleOptions(updated, 'UPDATE'); | ||
await this.client._updateSchedule(scheduleId, (0, schedule_helpers_1.compileUpdatedScheduleOptions)(updated), currentHeader); | ||
await this.client._updateSchedule(scheduleId, (0, schedule_helpers_1.compileUpdatedScheduleOptions)(scheduleId, updated), currentHeader); | ||
}, | ||
@@ -360,9 +364,11 @@ async delete() { | ||
*/ | ||
class ScheduleAlreadyRunning extends Error { | ||
let ScheduleAlreadyRunning = class ScheduleAlreadyRunning extends Error { | ||
constructor(message, scheduleId) { | ||
super(message); | ||
this.scheduleId = scheduleId; | ||
this.name = 'ScheduleAlreadyRunning'; | ||
} | ||
} | ||
}; | ||
ScheduleAlreadyRunning = __decorate([ | ||
(0, type_helpers_1.SymbolBasedInstanceOfError)('ScheduleAlreadyRunning') | ||
], ScheduleAlreadyRunning); | ||
exports.ScheduleAlreadyRunning = ScheduleAlreadyRunning; | ||
@@ -377,10 +383,12 @@ /** | ||
*/ | ||
class ScheduleNotFoundError extends Error { | ||
let ScheduleNotFoundError = class ScheduleNotFoundError extends Error { | ||
constructor(message, scheduleId) { | ||
super(message); | ||
this.scheduleId = scheduleId; | ||
this.name = 'ScheduleNotFoundError'; | ||
} | ||
} | ||
}; | ||
ScheduleNotFoundError = __decorate([ | ||
(0, type_helpers_1.SymbolBasedInstanceOfError)('ScheduleNotFoundError') | ||
], ScheduleNotFoundError); | ||
exports.ScheduleNotFoundError = ScheduleNotFoundError; | ||
//# sourceMappingURL=schedule-client.js.map |
@@ -10,3 +10,3 @@ import { LoadedDataConverter, SearchAttributes } from '@temporalio/common'; | ||
export declare function compileScheduleOptions(options: ScheduleOptions): CompiledScheduleOptions; | ||
export declare function compileUpdatedScheduleOptions(options: ScheduleUpdateOptions): CompiledScheduleUpdateOptions; | ||
export declare function compileUpdatedScheduleOptions(scheduleId: string, options: ScheduleUpdateOptions): CompiledScheduleUpdateOptions; | ||
export declare function encodeScheduleSpec(spec: ScheduleSpec): temporal.api.schedule.v1.IScheduleSpec; | ||
@@ -13,0 +13,0 @@ export declare function encodeScheduleAction(dataConverter: LoadedDataConverter, action: CompiledScheduleAction, headers: Headers): Promise<temporal.api.schedule.v1.IScheduleAction>; |
@@ -128,3 +128,3 @@ "use strict"; | ||
exports.compileScheduleOptions = compileScheduleOptions; | ||
function compileUpdatedScheduleOptions(options) { | ||
function compileUpdatedScheduleOptions(scheduleId, options) { | ||
const workflowTypeOrFunc = options.action.workflowType; | ||
@@ -136,2 +136,3 @@ const workflowType = (0, common_1.extractWorkflowType)(workflowTypeOrFunc); | ||
...options.action, | ||
workflowId: options.action.workflowId ?? `${scheduleId}-workflow`, | ||
workflowType, | ||
@@ -138,0 +139,0 @@ args: (options.action.args ?? []), |
@@ -118,5 +118,3 @@ import { Replace } from '@temporalio/common/lib/type-helpers'; | ||
export type ScheduleUpdateOptions<A extends ScheduleOptionsAction = ScheduleOptionsAction> = Replace<Omit<ScheduleOptions, 'scheduleId' | 'memo' | 'searchAttributes'>, { | ||
action: Replace<A, { | ||
workflowId: string; | ||
}>; | ||
action: A; | ||
state: Omit<ScheduleOptions['state'], 'triggerImmediately' | 'backfill'>; | ||
@@ -123,0 +121,0 @@ }>; |
@@ -119,5 +119,3 @@ import { RequireAtLeastOne } from '@temporalio/common/lib/type-helpers'; | ||
export declare class BuildIdNotFoundError extends Error { | ||
readonly name: string; | ||
constructor(message: string); | ||
} | ||
export {}; |
"use strict"; | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -222,9 +228,8 @@ exports.BuildIdNotFoundError = exports.reachabilityResponseFromProto = exports.TaskQueueClient = exports.UnversionedBuildId = void 0; | ||
*/ | ||
class BuildIdNotFoundError extends Error { | ||
constructor(message) { | ||
super(message); | ||
this.name = 'BuildIdNotFoundError'; | ||
} | ||
} | ||
let BuildIdNotFoundError = class BuildIdNotFoundError extends Error { | ||
}; | ||
BuildIdNotFoundError = __decorate([ | ||
(0, type_helpers_1.SymbolBasedInstanceOfError)('BuildIdNotFoundError') | ||
], BuildIdNotFoundError); | ||
exports.BuildIdNotFoundError = BuildIdNotFoundError; | ||
//# sourceMappingURL=task-queue-client.js.map |
@@ -338,3 +338,2 @@ import { status as grpcStatus } from '@grpc/grpc-js'; | ||
readonly status: temporal.api.enums.v1.WorkflowExecutionStatus; | ||
readonly name: string; | ||
constructor(status: temporal.api.enums.v1.WorkflowExecutionStatus); | ||
@@ -344,5 +343,4 @@ } | ||
readonly code: grpcStatus; | ||
readonly name: string; | ||
constructor(message: string, code: grpcStatus); | ||
} | ||
export {}; |
"use strict"; | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -8,2 +14,3 @@ exports.QueryNotRegisteredError = exports.QueryRejectedError = exports.WorkflowClient = void 0; | ||
const interceptors_1 = require("@temporalio/common/lib/interceptors"); | ||
const type_helpers_1 = require("@temporalio/common/lib/type-helpers"); | ||
const internal_non_workflow_1 = require("@temporalio/common/lib/internal-non-workflow"); | ||
@@ -621,18 +628,22 @@ const proto_1 = require("@temporalio/proto"); | ||
exports.WorkflowClient = WorkflowClient; | ||
class QueryRejectedError extends Error { | ||
let QueryRejectedError = class QueryRejectedError extends Error { | ||
constructor(status) { | ||
super('Query rejected'); | ||
this.status = status; | ||
this.name = 'QueryRejectedError'; | ||
} | ||
} | ||
}; | ||
QueryRejectedError = __decorate([ | ||
(0, type_helpers_1.SymbolBasedInstanceOfError)('QueryRejectedError') | ||
], QueryRejectedError); | ||
exports.QueryRejectedError = QueryRejectedError; | ||
class QueryNotRegisteredError extends Error { | ||
let QueryNotRegisteredError = class QueryNotRegisteredError extends Error { | ||
constructor(message, code) { | ||
super(message); | ||
this.code = code; | ||
this.name = 'QueryNotRegisteredError'; | ||
} | ||
} | ||
}; | ||
QueryNotRegisteredError = __decorate([ | ||
(0, type_helpers_1.SymbolBasedInstanceOfError)('QueryNotRegisteredError') | ||
], QueryNotRegisteredError); | ||
exports.QueryNotRegisteredError = QueryNotRegisteredError; | ||
//# sourceMappingURL=workflow-client.js.map |
{ | ||
"name": "@temporalio/client", | ||
"version": "1.8.1", | ||
"version": "1.8.2", | ||
"description": "Temporal.io SDK Client sub-package", | ||
@@ -17,4 +17,4 @@ "main": "lib/index.js", | ||
"@grpc/grpc-js": "~1.7.3", | ||
"@temporalio/common": "1.8.1", | ||
"@temporalio/proto": "1.8.1", | ||
"@temporalio/common": "1.8.2", | ||
"@temporalio/proto": "1.8.2", | ||
"abort-controller": "^3.0.0", | ||
@@ -43,3 +43,3 @@ "long": "^5.2.0", | ||
], | ||
"gitHead": "97808111bbec478260e915726bb9730a489f8fa4" | ||
"gitHead": "d85bf54da757741b438f8d39a0e7265b80d4f0d6" | ||
} |
@@ -9,2 +9,3 @@ import { status as grpcStatus } from '@grpc/grpc-js'; | ||
} from '@temporalio/common/lib/internal-non-workflow'; | ||
import { SymbolBasedInstanceOfError } from '@temporalio/common/lib/type-helpers'; | ||
import { | ||
@@ -25,5 +26,4 @@ BaseClient, | ||
*/ | ||
export class ActivityNotFoundError extends Error { | ||
public readonly name = 'ActivityNotFoundError'; | ||
} | ||
@SymbolBasedInstanceOfError('ActivityNotFoundError') | ||
export class ActivityNotFoundError extends Error {} | ||
@@ -34,5 +34,4 @@ /** | ||
*/ | ||
export class ActivityCompletionError extends Error { | ||
public readonly name = 'ActivityCompletionError'; | ||
} | ||
@SymbolBasedInstanceOfError('ActivityCompletionError') | ||
export class ActivityCompletionError extends Error {} | ||
@@ -43,5 +42,4 @@ /** | ||
*/ | ||
export class ActivityCancelledError extends Error { | ||
public readonly name = 'ActivityCancelledError'; | ||
} | ||
@SymbolBasedInstanceOfError('ActivityCancelledError') | ||
export class ActivityCancelledError extends Error {} | ||
@@ -48,0 +46,0 @@ /** |
import { ServiceError as GrpcServiceError } from '@grpc/grpc-js'; | ||
import { RetryState, TemporalFailure } from '@temporalio/common'; | ||
import { isError, isRecord, SymbolBasedInstanceOfError } from '@temporalio/common/lib/type-helpers'; | ||
@@ -7,4 +8,4 @@ /** | ||
*/ | ||
@SymbolBasedInstanceOfError('ServiceError') | ||
export class ServiceError extends Error { | ||
public readonly name: string = 'ServiceError'; | ||
public readonly cause?: Error; | ||
@@ -27,4 +28,4 @@ | ||
*/ | ||
@SymbolBasedInstanceOfError('WorkflowFailedError') | ||
export class WorkflowFailedError extends Error { | ||
public readonly name: string = 'WorkflowFailedError'; | ||
public constructor( | ||
@@ -45,4 +46,4 @@ message: string, | ||
*/ | ||
@SymbolBasedInstanceOfError('WorkflowExecutionContinuedAsNewError') | ||
export class WorkflowContinuedAsNewError extends Error { | ||
public readonly name: string = 'WorkflowExecutionContinuedAsNewError'; | ||
public constructor(message: string, public readonly newExecutionRunId: string) { | ||
@@ -54,3 +55,7 @@ super(message); | ||
export function isGrpcServiceError(err: unknown): err is GrpcServiceError { | ||
return err instanceof Error && (err as any).details !== undefined && (err as any).metadata !== undefined; | ||
return ( | ||
isError(err) && | ||
typeof (err as GrpcServiceError)?.details === 'string' && | ||
isRecord((err as GrpcServiceError).metadata) | ||
); | ||
} | ||
@@ -57,0 +62,0 @@ |
import 'abort-controller/polyfill'; // eslint-disable-line import/no-unassigned-import | ||
import { EventEmitter, on, once } from 'node:events'; | ||
import { isAbortError } from '@temporalio/common/lib/type-helpers'; | ||
@@ -111,3 +112,3 @@ export interface MapAsyncOptions { | ||
} catch (err: unknown) { | ||
if ((err as Error)?.name === 'AbortError') { | ||
if (isAbortError(err)) { | ||
return; | ||
@@ -114,0 +115,0 @@ } |
@@ -12,2 +12,3 @@ import { status as grpcStatus } from '@grpc/grpc-js'; | ||
import { optionalDateToTs, optionalTsToDate, optionalTsToMs, tsToDate } from '@temporalio/common/lib/time'; | ||
import { SymbolBasedInstanceOfError } from '@temporalio/common/lib/type-helpers'; | ||
import { CreateScheduleInput, CreateScheduleOutput, ScheduleClientInterceptor } from './interceptors'; | ||
@@ -153,5 +154,2 @@ import { WorkflowService } from './types'; | ||
} | ||
if (!opts.action.workflowId && action === 'UPDATE') { | ||
throw new TypeError(`Missing ${structureName}.action.workflowId for 'startWorkflow' action`); | ||
} | ||
if (!opts.action.workflowType) { | ||
@@ -464,3 +462,7 @@ throw new TypeError(`Missing ${structureName}.action.workflowType for 'startWorkflow' action`); | ||
assertRequiredScheduleOptions(updated, 'UPDATE'); | ||
await this.client._updateSchedule(scheduleId, compileUpdatedScheduleOptions(updated), currentHeader); | ||
await this.client._updateSchedule( | ||
scheduleId, | ||
compileUpdatedScheduleOptions(scheduleId, updated), | ||
currentHeader | ||
); | ||
}, | ||
@@ -532,5 +534,4 @@ | ||
*/ | ||
@SymbolBasedInstanceOfError('ScheduleAlreadyRunning') | ||
export class ScheduleAlreadyRunning extends Error { | ||
public readonly name: string = 'ScheduleAlreadyRunning'; | ||
constructor(message: string, public readonly scheduleId: string) { | ||
@@ -549,5 +550,4 @@ super(message); | ||
*/ | ||
@SymbolBasedInstanceOfError('ScheduleNotFoundError') | ||
export class ScheduleNotFoundError extends Error { | ||
public readonly name: string = 'ScheduleNotFoundError'; | ||
constructor(message: string, public readonly scheduleId: string) { | ||
@@ -554,0 +554,0 @@ super(message); |
@@ -224,3 +224,6 @@ import Long from 'long'; // eslint-disable-line import/no-named-as-default | ||
export function compileUpdatedScheduleOptions(options: ScheduleUpdateOptions): CompiledScheduleUpdateOptions { | ||
export function compileUpdatedScheduleOptions( | ||
scheduleId: string, | ||
options: ScheduleUpdateOptions | ||
): CompiledScheduleUpdateOptions { | ||
const workflowTypeOrFunc = options.action.workflowType; | ||
@@ -232,2 +235,3 @@ const workflowType = extractWorkflowType(workflowTypeOrFunc); | ||
...options.action, | ||
workflowId: options.action.workflowId ?? `${scheduleId}-workflow`, | ||
workflowType, | ||
@@ -234,0 +238,0 @@ args: (options.action.args ?? []) as unknown[], |
@@ -138,9 +138,3 @@ import { checkExtends, Replace } from '@temporalio/common/lib/type-helpers'; | ||
{ | ||
action: Replace< | ||
A, | ||
{ | ||
// No default value on update | ||
workflowId: string; | ||
} | ||
>; | ||
action: A; | ||
state: Omit<ScheduleOptions['state'], 'triggerImmediately' | 'backfill'>; | ||
@@ -147,0 +141,0 @@ } |
import { status } from '@grpc/grpc-js'; | ||
import { filterNullAndUndefined } from '@temporalio/common/lib/internal-non-workflow'; | ||
import { assertNever, RequireAtLeastOne } from '@temporalio/common/lib/type-helpers'; | ||
import { assertNever, SymbolBasedInstanceOfError, RequireAtLeastOne } from '@temporalio/common/lib/type-helpers'; | ||
import { temporal } from '@temporalio/proto'; | ||
@@ -291,8 +291,3 @@ import { BaseClient, BaseClientOptions, defaultBaseClientOptions, LoadedWithDefaults } from './base-client'; | ||
*/ | ||
export class BuildIdNotFoundError extends Error { | ||
public readonly name: string = 'BuildIdNotFoundError'; | ||
constructor(message: string) { | ||
super(message); | ||
} | ||
} | ||
@SymbolBasedInstanceOfError('BuildIdNotFoundError') | ||
export class BuildIdNotFoundError extends Error {} |
@@ -25,2 +25,3 @@ import { status as grpcStatus } from '@grpc/grpc-js'; | ||
import { History } from '@temporalio/common/lib/proto-utils'; | ||
import { SymbolBasedInstanceOfError } from '@temporalio/common/lib/type-helpers'; | ||
import { | ||
@@ -996,4 +997,4 @@ decodeArrayFromPayloads, | ||
@SymbolBasedInstanceOfError('QueryRejectedError') | ||
export class QueryRejectedError extends Error { | ||
public readonly name: string = 'QueryRejectedError'; | ||
constructor(public readonly status: temporal.api.enums.v1.WorkflowExecutionStatus) { | ||
@@ -1004,4 +1005,4 @@ super('Query rejected'); | ||
@SymbolBasedInstanceOfError('QueryNotRegisteredError') | ||
export class QueryNotRegisteredError extends Error { | ||
public readonly name: string = 'QueryNotRegisteredError'; | ||
constructor(message: string, public readonly code: grpcStatus) { | ||
@@ -1008,0 +1009,0 @@ super(message); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
462660
9748
+ Added@temporalio/common@1.8.2(transitive)
+ Added@temporalio/proto@1.8.2(transitive)
- Removed@temporalio/common@1.8.1(transitive)
- Removed@temporalio/proto@1.8.1(transitive)
Updated@temporalio/common@1.8.2
Updated@temporalio/proto@1.8.2