@azure/service-bus 7.10.0-alpha.20250107.2 → 7.10.0-alpha.20250109.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/dist/browser/core/managementClient.js +1 -1
  2. package/dist/browser/core/managementClient.js.map +1 -1
  3. package/dist/browser/models.d.ts +4 -4
  4. package/dist/browser/models.js.map +1 -1
  5. package/dist/browser/receivers/sessionReceiver.d.ts +4 -4
  6. package/dist/browser/receivers/sessionReceiver.js +2 -2
  7. package/dist/browser/receivers/sessionReceiver.js.map +1 -1
  8. package/dist/browser/sender.d.ts +1 -1
  9. package/dist/browser/sender.js.map +1 -1
  10. package/dist/browser/serviceBusClient.d.ts +8 -8
  11. package/dist/browser/serviceBusClient.js.map +1 -1
  12. package/dist/browser/serviceBusMessage.d.ts +19 -19
  13. package/dist/browser/serviceBusMessage.js.map +1 -1
  14. package/dist/browser/util/constants.d.ts +1 -1
  15. package/dist/browser/util/constants.js +1 -1
  16. package/dist/browser/util/constants.js.map +1 -1
  17. package/dist/commonjs/core/managementClient.js +1 -1
  18. package/dist/commonjs/core/managementClient.js.map +1 -1
  19. package/dist/commonjs/models.d.ts +4 -4
  20. package/dist/commonjs/models.js.map +1 -1
  21. package/dist/commonjs/receivers/sessionReceiver.d.ts +4 -4
  22. package/dist/commonjs/receivers/sessionReceiver.js +2 -2
  23. package/dist/commonjs/receivers/sessionReceiver.js.map +1 -1
  24. package/dist/commonjs/sender.d.ts +1 -1
  25. package/dist/commonjs/sender.js.map +1 -1
  26. package/dist/commonjs/serviceBusClient.d.ts +8 -8
  27. package/dist/commonjs/serviceBusClient.js.map +1 -1
  28. package/dist/commonjs/serviceBusMessage.d.ts +19 -19
  29. package/dist/commonjs/serviceBusMessage.js.map +1 -1
  30. package/dist/commonjs/util/constants.d.ts +1 -1
  31. package/dist/commonjs/util/constants.js +1 -1
  32. package/dist/commonjs/util/constants.js.map +1 -1
  33. package/dist/esm/core/managementClient.js +1 -1
  34. package/dist/esm/core/managementClient.js.map +1 -1
  35. package/dist/esm/models.d.ts +4 -4
  36. package/dist/esm/models.js.map +1 -1
  37. package/dist/esm/receivers/sessionReceiver.d.ts +4 -4
  38. package/dist/esm/receivers/sessionReceiver.js +2 -2
  39. package/dist/esm/receivers/sessionReceiver.js.map +1 -1
  40. package/dist/esm/sender.d.ts +1 -1
  41. package/dist/esm/sender.js.map +1 -1
  42. package/dist/esm/serviceBusClient.d.ts +8 -8
  43. package/dist/esm/serviceBusClient.js.map +1 -1
  44. package/dist/esm/serviceBusMessage.d.ts +19 -19
  45. package/dist/esm/serviceBusMessage.js.map +1 -1
  46. package/dist/esm/util/constants.d.ts +1 -1
  47. package/dist/esm/util/constants.js +1 -1
  48. package/dist/esm/util/constants.js.map +1 -1
  49. package/dist/react-native/core/managementClient.js +1 -1
  50. package/dist/react-native/core/managementClient.js.map +1 -1
  51. package/dist/react-native/models.d.ts +4 -4
  52. package/dist/react-native/models.js.map +1 -1
  53. package/dist/react-native/receivers/sessionReceiver.d.ts +4 -4
  54. package/dist/react-native/receivers/sessionReceiver.js +2 -2
  55. package/dist/react-native/receivers/sessionReceiver.js.map +1 -1
  56. package/dist/react-native/sender.d.ts +1 -1
  57. package/dist/react-native/sender.js.map +1 -1
  58. package/dist/react-native/serviceBusClient.d.ts +8 -8
  59. package/dist/react-native/serviceBusClient.js.map +1 -1
  60. package/dist/react-native/serviceBusMessage.d.ts +19 -19
  61. package/dist/react-native/serviceBusMessage.js.map +1 -1
  62. package/dist/react-native/util/constants.d.ts +1 -1
  63. package/dist/react-native/util/constants.js +1 -1
  64. package/dist/react-native/util/constants.js.map +1 -1
  65. package/package.json +2 -2
@@ -872,7 +872,7 @@ export class ManagementClient extends LinkEntity {
872
872
  !Array.isArray(response.body.rules)) {
873
873
  return [];
874
874
  }
875
- // Reference: https://docs.microsoft.com/azure/service-bus-messaging/service-bus-amqp-request-response#response-11
875
+ // Reference: https://learn.microsoft.com/azure/service-bus-messaging/service-bus-amqp-request-response#response-11
876
876
  const result = response.body.rules || [];
877
877
  const rules = [];
878
878
  result.forEach((x) => {
@@ -1 +1 @@
1
- {"version":3,"file":"managementClient.js","sourceRoot":"","sources":["../../../src/core/managementClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,IAAI,MAAM,MAAM,CAAC;AAQxB,OAAO,EACL,OAAO,IAAI,eAAe,EAC1B,aAAa,EACb,cAAc,EACd,KAAK,EACL,cAAc,GACf,MAAM,cAAc,CAAC;AAOtB,OAAO,EACL,wBAAwB,EACxB,SAAS,EACT,sBAAsB,EACtB,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,aAAa,EACb,eAAe,EACf,mBAAmB,EACnB,eAAe,GAChB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,OAAO,EAAE,sBAAsB,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,EAC5B,sCAAsC,EACtC,gCAAgC,EAChC,gCAAgC,EAChC,qCAAqC,GACtC,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAIhC,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAChF,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AA4E5E;;GAEG;AACH,MAAM,iBAAiB,GAAG,CAAC,eAAe,CAAC,CAAC;AAE5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A4B;QACrC,OAAO,EAAE,eAAe,CAAC,MAAM,CAAC,WAAW,CAAC;QAC5C,YAAY,EAAE,WAAW,CAAC,UAAU;KACrC,CAAC;IAEF,WAAW,CAAC,mBAAmB,mCAC1B,WAAW,CAAC,mBAAmB,KAClC,CAAC,SAAS,CAAC,oBAAoB,CAAC,EAAE,uBAAuB,GAC1D,CAAC;IAEF,IAAI,WAAW,CAAC,QAAQ,EAAE,CAAC;QACzB,KAAK,CAAC,SAAS,CAAC,eAAe,CAAC,GAAG,WAAW,CAAC,QAAQ,CAAC;IAC1D,CAAC;IAED,MAAM,YAAY,GAChB,WAAW,CAAC,mBAAmB,IAAI,WAAW,CAAC,mBAAmB,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;IAE7F,IAAI,YAAY,EAAE,CAAC;QACjB,KAAK,CAAC,eAAe,CAAC,GAAG,YAAY,CAAC;IACxC,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport Long from \"long\";\nimport type {\n EventContext,\n ReceiverOptions,\n SenderOptions,\n Typed,\n Message as RheaMessage,\n} from \"rhea-promise\";\nimport {\n message as RheaMessageUtil,\n generate_uuid,\n string_to_uuid,\n types,\n ReceiverEvents,\n} from \"rhea-promise\";\nimport type {\n MessagingError,\n SendRequestOptions,\n RetryOptions,\n AmqpAnnotatedMessage,\n} from \"@azure/core-amqp\";\nimport {\n ConditionErrorNameMapper,\n Constants,\n defaultCancellableLock,\n RequestResponseLink,\n} from \"@azure/core-amqp\";\nimport type { ConnectionContext } from \"../connectionContext.js\";\nimport type { ServiceBusReceivedMessage, ServiceBusMessage } from \"../serviceBusMessage.js\";\nimport {\n DispositionType,\n ServiceBusMessageImpl,\n toRheaMessage,\n fromRheaMessage,\n updateScheduledTime,\n updateMessageId,\n} from \"../serviceBusMessage.js\";\nimport type { RequestResponseLinkOptions } from \"./linkEntity.js\";\nimport { LinkEntity } from \"./linkEntity.js\";\nimport type { ServiceBusLogger } from \"../log.js\";\nimport { managementClientLogger, receiverLogger, senderLogger } from \"../log.js\";\nimport { toBuffer, waitForSendable } from \"../util/utils.js\";\nimport {\n InvalidMaxMessageCountError,\n throwErrorIfConnectionClosed,\n throwTypeErrorIfParameterIsEmptyString,\n throwTypeErrorIfParameterMissing,\n throwTypeErrorIfParameterNotLong,\n throwTypeErrorIfParameterTypeMismatch,\n} from \"../util/errors.js\";\nimport { max32BitNumber } from \"../util/constants.js\";\nimport { Buffer } from \"buffer\";\nimport type { OperationOptionsBase } from \"./../modelsToBeSharedWithEventHubs.js\";\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\nimport type { ReceiveMode } from \"../models.js\";\nimport { translateServiceBusError } from \"../serviceBusError.js\";\nimport { defaultDataTransformer, tryToJsonDecode } from \"../dataTransformer.js\";\nimport { delay, isDefined, isObjectWithProperties } from \"@azure/core-util\";\nimport type {\n RuleProperties,\n SqlRuleAction,\n SqlRuleFilter,\n} from \"../serializers/ruleResourceSerializer.js\";\nimport type { ListRequestOptions } from \"../serviceBusAtomManagementClient.js\";\n\n/**\n * @internal\n */\nexport interface SendManagementRequestOptions extends SendRequestOptions {\n /**\n * The name of the sender or receiver link associated with the managmenet operations.\n * This is used for service side optimization.\n */\n associatedLinkName?: string;\n /**\n * Option to disable the client from running JSON.parse() on the message body when receiving the message.\n * Not applicable if the message was sent with AMQP body type value or sequence. Use this option when you\n * prefer to work directly with the bytes present in the message body than have the client attempt to parse it.\n */\n skipParsingBodyAsJson?: boolean;\n /**\n * Whether to skip converting Date type on properties of message annotations\n * or application properties into numbers when receiving the message. By\n * default, properties of Date type is converted into UNIX epoch number for\n * compatibility.\n */\n skipConvertingDate?: boolean;\n}\n\n/**\n * Represents the correlation filter expression.\n * A CorrelationRuleFilter holds a set of conditions that are matched against user and system properties\n * of incoming messages from a Subscription.\n */\nexport interface CorrelationRuleFilter {\n /**\n * Value to be matched with the `correlationId` property of the incoming message.\n */\n correlationId?: string;\n /**\n * Value to be matched with the `messageId` property of the incoming message.\n */\n messageId?: string;\n /**\n * Value to be matched with the `to` property of the incoming message.\n */\n to?: string;\n /**\n * Value to be matched with the `replyTo` property of the incoming message.\n */\n replyTo?: string;\n /**\n * Value to be matched with the `subject` property of the incoming message.\n */\n subject?: string;\n /**\n * Value to be matched with the `sessionId` property of the incoming message.\n */\n sessionId?: string;\n /**\n * Value to be matched with the `replyToSessionId` property of the incoming message.\n */\n replyToSessionId?: string;\n /**\n * Value to be matched with the `contentType` property of the incoming message.\n */\n contentType?: string;\n /**\n * Value to be matched with the user properties of the incoming message.\n */\n applicationProperties?: { [key: string]: string | number | boolean | Date };\n}\n\n/**\n * @internal\n */\nconst sqlRuleProperties = [\"sqlExpression\"];\n\nfunction isSqlRuleFilter(obj: unknown): obj is SqlRuleFilter {\n if (obj) {\n return sqlRuleProperties.some((validProperty) => isObjectWithProperties(obj, [validProperty]));\n }\n\n return false;\n}\n\n/**\n * @internal\n */\nconst correlationProperties = [\n \"correlationId\",\n \"messageId\",\n \"to\",\n \"replyTo\",\n \"subject\",\n \"sessionId\",\n \"replyToSessionId\",\n \"contentType\",\n \"applicationProperties\",\n];\n\nfunction isCorrelationRuleFilter(obj: unknown): obj is CorrelationRuleFilter {\n if (obj) {\n return correlationProperties.some((validProperty) =>\n isObjectWithProperties(obj, [validProperty]),\n );\n }\n\n return false;\n}\n\n/**\n * @internal\n * Options to set when updating the disposition status\n */\nexport interface DispositionStatusOptions extends OperationOptionsBase {\n /**\n * A map of Service Bus brokered message properties\n * to modify.\n */\n propertiesToModify?: { [key: string]: any };\n /**\n * The deadletter reason. May be set if disposition status\n * is set to suspended.\n */\n deadLetterReason?: string;\n /**\n * The deadletter description. May be set if disposition status\n * is set to suspended.\n */\n deadLetterDescription?: string;\n /**\n * This should only be provided if `session` is enabled for a Queue or Topic.\n */\n sessionId?: string;\n /**\n * Retry options.\n */\n retryOptions: RetryOptions | undefined;\n}\n\n/**\n * @internal\n * Options passed to the constructor of ManagementClient\n */\nexport interface ManagementClientOptions {\n address?: string;\n audience?: string;\n}\n\n/**\n * @internal\n * Describes the ServiceBus Management Client that talks\n * to the $management endpoint over AMQP connection.\n */\nexport class ManagementClient extends LinkEntity<RequestResponseLink> {\n /**\n * The reply to Guid for the management client.\n */\n replyTo: string = generate_uuid();\n /**\n * Provides the sequence number of the last peeked message.\n */\n private _lastPeekedSequenceNumber: Long = Long.ZERO;\n /**\n * lock token for init operation\n */\n private _initLock: string = `initMgmtLink-${generate_uuid()}`;\n /**\n * Instantiates the management client.\n * @param context - The connection context\n * @param entityPath - The name/path of the entity (queue/topic/subscription name)\n * for which the management request needs to be made.\n * @param options - Options to be provided for creating the\n * \"$management\" client.\n */\n constructor(context: ConnectionContext, entityPath: string, options?: ManagementClientOptions) {\n super(`${entityPath}/$management`, entityPath, context, \"mgmt\", managementClientLogger, {\n address: options && options.address ? options.address : Constants.management,\n audience:\n options && options.audience\n ? options.audience\n : `${context.config.endpoint}${entityPath}/$management`,\n });\n this._context = context;\n }\n\n /**\n * initialize link with unique this.replyTo address.\n * @param options -\n * @returns updated options bag that has adjusted `timeoutInMs` to account for init time\n */\n private async initWithUniqueReplyTo(\n options: SendManagementRequestOptions = {},\n ): Promise<SendManagementRequestOptions> {\n const retryTimeoutInMs = options.timeoutInMs ?? Constants.defaultOperationTimeoutInMs;\n const initOperationStartTime = Date.now();\n return defaultCancellableLock.acquire(\n this._initLock,\n async () => {\n managementClientLogger.verbose(\n `${this.logPrefix} lock acquired for initializing replyTo address and link`,\n );\n if (!this.isOpen()) {\n this.replyTo = generate_uuid();\n managementClientLogger.verbose(\n `${this.logPrefix} new replyTo address: ${this.replyTo} generated`,\n );\n }\n const { abortSignal } = options;\n const aborter = new AbortController();\n\n const abortListener = (): void => {\n aborter.abort();\n };\n abortSignal?.addEventListener(\"abort\", abortListener);\n\n if (!this.isOpen()) {\n await Promise.race([\n this._init(aborter.signal),\n delay(retryTimeoutInMs, { abortSignal: aborter.signal }).then(\n function onfulfilled() {\n throw {\n name: \"OperationTimeoutError\",\n message:\n \"The initialization of management client timed out. Please try again later.\",\n };\n },\n function onrejected(_) {\n managementClientLogger.verbose(\n `The management client initialization has either completed or been cancelled.`,\n );\n },\n ),\n ]).finally(() => {\n aborter.abort();\n abortSignal?.removeEventListener(\"abort\", abortListener);\n });\n }\n\n // time taken by the init operation\n const timeTakenByInit = Date.now() - initOperationStartTime;\n return {\n ...options,\n // Left over time\n timeoutInMs: retryTimeoutInMs - timeTakenByInit,\n };\n },\n {\n abortSignal: options.abortSignal,\n timeoutInMs: retryTimeoutInMs,\n },\n );\n }\n\n private async _init(abortSignal?: AbortSignalLike): Promise<void> {\n throwErrorIfConnectionClosed(this._context);\n try {\n const rxopt: ReceiverOptions = {\n source: { address: this.address },\n name: this.replyTo,\n target: { address: this.replyTo },\n onSessionError: (context: EventContext) => {\n const sbError = translateServiceBusError(context.session!.error!);\n managementClientLogger.logError(\n sbError,\n `${this.logPrefix} An error occurred on the session for request/response links for $management`,\n );\n },\n };\n const sropt: SenderOptions = {\n target: { address: this.address },\n onError: (context: EventContext) => {\n const ehError = translateServiceBusError(context.sender!.error!);\n managementClientLogger.logError(\n ehError,\n `${this.logPrefix} An error occurred on the $management sender link`,\n );\n },\n };\n\n // Even if multiple parallel requests reach here, the initLink secures a lock\n // to ensure there won't be multiple initializations\n await this.initLink(\n {\n senderOptions: sropt,\n receiverOptions: rxopt,\n },\n abortSignal,\n );\n } catch (err: any) {\n const translatedError = translateServiceBusError(err);\n managementClientLogger.logError(\n translatedError,\n `${this.logPrefix} An error occurred while establishing the $management links`,\n );\n throw translatedError;\n }\n }\n\n protected async createRheaLink(\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: RequestResponseLinkOptions,\n ): Promise<RequestResponseLink> {\n const rheaLink = await RequestResponseLink.create(\n this._context.connection,\n options.senderOptions,\n options.receiverOptions,\n );\n // Attach listener for the `receiver_error` events to log the errors.\n\n // \"message\" event listener is added in core-amqp.\n // \"rhea\" doesn't allow setting only the \"onError\" handler in the options if it is not accompanied by an \"onMessage\" handler.\n // Hence, not passing onError handler in the receiver options, adding a handler below.\n rheaLink.receiver.on(ReceiverEvents.receiverError, (context: EventContext) => {\n const ehError = translateServiceBusError(context.receiver!.error!);\n managementClientLogger.logError(\n ehError,\n `${this.logPrefix} An error occurred on the $management receiver link`,\n );\n });\n return rheaLink;\n }\n\n /**\n * Given array of typed values, returns the element in given index\n */\n private _safelyGetTypedValueFromArray(data: Typed[], index: number): any {\n return Array.isArray(data) && data.length > index && data[index]\n ? data[index].value\n : undefined;\n }\n\n private _decodeApplicationPropertiesMap(\n obj: Typed,\n ): Record<string, string | number | boolean | Date> {\n if (!types.is_map(obj)) {\n throw new Error(\"object to decode is not of Map types\");\n }\n const array = obj.value as Array<Typed>;\n const result: Record<string, string | number | boolean | Date> = {};\n for (let i = 0; i < array.length; i += 2) {\n const key = array[i].value as string;\n result[key] = array[i + 1].value as string | number | boolean | Date;\n }\n\n return result;\n }\n\n private async _makeManagementRequest(\n request: RheaMessage,\n internalLogger: ServiceBusLogger,\n sendRequestOptions: SendManagementRequestOptions = {},\n ): Promise<RheaMessage> {\n if (request.message_id === undefined) {\n request.message_id = generate_uuid();\n }\n\n try {\n const { timeoutInMs } = sendRequestOptions;\n await waitForSendable(\n internalLogger,\n this.logPrefix,\n this.name,\n timeoutInMs ?? Constants.defaultOperationTimeoutInMs,\n this.link?.sender,\n this.link?.session?.outgoing?.available(),\n );\n\n return await this.link!.sendRequest(request, sendRequestOptions);\n } catch (err: any) {\n const translatedError = translateServiceBusError(err);\n internalLogger.logError(\n translatedError,\n \"%s An error occurred during send on management request-response link with address '%s'\",\n this.logPrefix,\n this.address,\n );\n throw translatedError;\n }\n }\n\n /**\n * Closes the AMQP management session to the ServiceBus namespace for this client,\n * returning a promise that will be resolved when disconnection is completed.\n */\n async close(): Promise<void> {\n try {\n // Always clear the timeout, as the isOpen check may report\n // false without ever having cleared the timeout otherwise.\n\n // NOTE: management link currently doesn't have a separate concept of \"detaching\" like\n // the other links do. When we add handling of this (via the onDetached call, like other links)\n // we can change this back to closeLink(\"permanent\").\n await this.closeLink();\n managementClientLogger.verbose(\"Successfully closed the management session.\");\n } catch (err: any) {\n managementClientLogger.logError(\n err,\n `${this.logPrefix} An error occurred while closing the management session`,\n );\n throw err;\n }\n }\n\n /**\n * Fetches the next batch of active messages. The first call to `peek()` fetches the first\n * active message for this client. Each subsequent call fetches the subsequent message in the\n * entity.\n *\n * Unlike a `received` message, `peeked` message will not have lock token associated with it,\n * and hence it cannot be `Completed/Abandoned/Deferred/Deadlettered/Renewed`. This method will\n * also fetch even Deferred messages (but not Deadlettered message).\n *\n * @param messageCount - The number of messages to retrieve. Default value `1`.\n * @param omitMessageBody - Whether to omit message body when peeking. Default value `false`.\n */\n async peek(\n messageCount: number,\n omitMessageBody?: boolean,\n options?: OperationOptionsBase & SendManagementRequestOptions,\n ): Promise<ServiceBusReceivedMessage[]> {\n throwErrorIfConnectionClosed(this._context);\n return this.peekBySequenceNumber(\n this._lastPeekedSequenceNumber.add(1),\n messageCount,\n undefined,\n omitMessageBody,\n options,\n );\n }\n\n /**\n * Fetches the next batch of active messages in the current MessageSession. The first call to\n * `peek()` fetches the first active message for this client. Each subsequent call fetches the\n * subsequent message in the entity.\n *\n * Unlike a `received` message, `peeked` message will not have lock token associated with it,\n * and hence it cannot be `Completed/Abandoned/Deferred/Deadlettered/Renewed`. This method will\n * also fetch even Deferred messages (but not Deadlettered message).\n *\n * @param sessionId - The sessionId from which messages need to be peeked.\n * @param messageCount - The number of messages to retrieve. Default value `1`.\n * @param omitMessageBody - Whether to omit message body when peeking Default value `false`.\n */\n async peekMessagesBySession(\n sessionId: string,\n messageCount: number,\n omitMessageBody?: boolean,\n options?: OperationOptionsBase & SendManagementRequestOptions,\n ): Promise<ServiceBusReceivedMessage[]> {\n throwErrorIfConnectionClosed(this._context);\n return this.peekBySequenceNumber(\n this._lastPeekedSequenceNumber.add(1),\n messageCount,\n sessionId,\n omitMessageBody,\n options,\n );\n }\n\n /**\n * Peeks the desired number of messages from the specified sequence number.\n *\n * @param fromSequenceNumber - The sequence number from where to read the message.\n * @param messageCount - The number of messages to retrieve. Default value `1`.\n * @param sessionId - The sessionId from which messages need to be peeked.\n * @param omitMessageBody - Whether to omit message body when peeking. Default value `false`.\n */\n async peekBySequenceNumber(\n fromSequenceNumber: Long,\n maxMessageCount: number,\n sessionId?: string,\n omitMessageBody?: boolean,\n options?: OperationOptionsBase & SendManagementRequestOptions,\n ): Promise<ServiceBusReceivedMessage[]> {\n throwErrorIfConnectionClosed(this._context);\n const connId = this._context.connectionId;\n\n // Checks for fromSequenceNumber\n throwTypeErrorIfParameterMissing(connId, \"fromSequenceNumber\", fromSequenceNumber);\n throwTypeErrorIfParameterNotLong(connId, \"fromSequenceNumber\", fromSequenceNumber);\n\n // Checks for maxMessageCount\n throwTypeErrorIfParameterMissing(\n this._context.connectionId,\n \"maxMessageCount\",\n maxMessageCount,\n );\n throwTypeErrorIfParameterTypeMismatch(\n this._context.connectionId,\n \"maxMessageCount\",\n maxMessageCount,\n \"number\",\n );\n\n if (isNaN(maxMessageCount) || maxMessageCount < 1) {\n throw new TypeError(InvalidMaxMessageCountError);\n }\n\n const messageList: ServiceBusReceivedMessage[] = [];\n try {\n const messageBody: any = {};\n messageBody[Constants.fromSequenceNumber] = types.wrap_long(\n Buffer.from(fromSequenceNumber.toBytesBE()),\n );\n messageBody[Constants.messageCount] = types.wrap_int(maxMessageCount!);\n if (isDefined(sessionId)) {\n messageBody[Constants.sessionIdMapKey] = sessionId;\n }\n if (isDefined(omitMessageBody)) {\n const omitMessageBodyKey = \"omit-message-body\"; // TODO: Service Bus specific. Put it somewhere\n messageBody[omitMessageBodyKey] = types.wrap_boolean(omitMessageBody);\n }\n const updatedOptions = await this.initWithUniqueReplyTo(options);\n const request: RheaMessage = {\n body: messageBody,\n reply_to: this.replyTo,\n application_properties: {\n operation: Constants.operations.peekMessage,\n },\n };\n if (updatedOptions?.associatedLinkName) {\n request.application_properties![Constants.associatedLinkName] =\n updatedOptions?.associatedLinkName;\n }\n request.application_properties![Constants.trackingId] = generate_uuid();\n\n // TODO: it'd be nice to attribute this peek request to the actual receiver that made it. So have them pass in a\n // log prefix rather than just falling back to the management links.\n receiverLogger.verbose(\n \"%s Peek by sequence number request body: %O.\",\n this.logPrefix,\n request.body,\n );\n\n const result = await this._makeManagementRequest(request, receiverLogger, updatedOptions);\n if (result.application_properties!.statusCode !== 204) {\n const messages = result.body.messages as { message: Buffer }[];\n for (const msg of messages) {\n const decodedMessage = RheaMessageUtil.decode(msg.message);\n const message = fromRheaMessage(decodedMessage as any, {\n skipParsingBodyAsJson: updatedOptions?.skipParsingBodyAsJson ?? false,\n skipConvertingDate: updatedOptions?.skipConvertingDate ?? false,\n });\n messageList.push(message);\n this._lastPeekedSequenceNumber = message.sequenceNumber!;\n }\n }\n } catch (err: any) {\n const error = translateServiceBusError(err) as MessagingError;\n receiverLogger.logError(\n error,\n `${this.logPrefix} An error occurred while sending the request to peek messages to $management endpoint`,\n );\n // statusCode == 404 then do not throw\n if (error.code !== ConditionErrorNameMapper[\"com.microsoft:message-not-found\"]) {\n throw error;\n }\n }\n return messageList;\n }\n\n /**\n * Renews the lock on the message. The lock will be renewed based on the setting specified on\n * the queue.\n *\n * When a message is received in `PeekLock` mode, the message is locked on the server for this\n * receiver instance for a duration as specified during the Queue/Subscription creation\n * (LockDuration). If processing of the message requires longer than this duration, the\n * lock needs to be renewed. For each renewal, it resets the time the message is locked by the\n * LockDuration set on the Entity.\n *\n * @param lockToken - Lock token of the message\n * @param options - Options that can be set while sending the request.\n * @returns New lock token expiry date and time in UTC format.\n */\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n async renewLock(lockToken: string, options?: SendManagementRequestOptions): Promise<Date> {\n throwErrorIfConnectionClosed(this._context);\n if (!options) options = {};\n if (options.timeoutInMs == null) options.timeoutInMs = 5000;\n\n try {\n const messageBody: any = {};\n\n messageBody[Constants.lockTokens] = types.wrap_array(\n [string_to_uuid(lockToken)],\n 0x98,\n undefined,\n );\n const updatedOptions = await this.initWithUniqueReplyTo(options);\n const request: RheaMessage = {\n body: messageBody,\n reply_to: this.replyTo,\n application_properties: {\n operation: Constants.operations.renewLock,\n },\n };\n request.application_properties![Constants.trackingId] = generate_uuid();\n if (updatedOptions.associatedLinkName) {\n request.application_properties![Constants.associatedLinkName] =\n updatedOptions.associatedLinkName;\n }\n receiverLogger.verbose(\n \"[%s] Renew message Lock request: %O.\",\n this._context.connectionId,\n request,\n );\n const result = await this._makeManagementRequest(request, receiverLogger, {\n abortSignal: updatedOptions?.abortSignal,\n requestName: \"renewLock\",\n });\n const lockedUntilUtc = new Date(result.body.expirations[0]);\n return lockedUntilUtc;\n } catch (err: any) {\n const error = translateServiceBusError(err);\n receiverLogger.logError(\n error,\n `${this.logPrefix} An error occurred while sending the renew lock request to $management endpoint`,\n );\n throw error;\n }\n }\n\n /**\n * Schedules an array of messages to appear on Service Bus at a later time.\n *\n * @param scheduledEnqueueTimeUtc - The UTC time at which the messages should be enqueued.\n * @param messages - An array of messages that needs to be scheduled.\n * @returns The sequence numbers of messages that were scheduled.\n */\n async scheduleMessages(\n scheduledEnqueueTimeUtc: Date,\n messages: ServiceBusMessage[] | AmqpAnnotatedMessage[],\n options?: OperationOptionsBase & SendManagementRequestOptions,\n ): Promise<Long[]> {\n throwErrorIfConnectionClosed(this._context);\n if (!messages.length) {\n return [];\n }\n const messageBody: any[] = [];\n for (let i = 0; i < messages.length; i++) {\n const item = messages[i];\n\n try {\n const rheaMessage = toRheaMessage(item, defaultDataTransformer);\n updateMessageId(rheaMessage, rheaMessage.message_id || generate_uuid());\n updateScheduledTime(rheaMessage, scheduledEnqueueTimeUtc);\n\n const entry: {\n message: Buffer;\n [\"message-id\"]: ServiceBusMessage[\"messageId\"];\n [\"partition-key\"]?: ServiceBusMessage[\"partitionKey\"];\n [Constants.sessionIdMapKey]?: string | undefined;\n } = {\n message: RheaMessageUtil.encode(rheaMessage),\n \"message-id\": rheaMessage.message_id,\n };\n\n if (rheaMessage.group_id) {\n entry[Constants.sessionIdMapKey] = rheaMessage.group_id;\n }\n\n if (rheaMessage.message_annotations?.[Constants.partitionKey]) {\n entry[\"partition-key\"] = rheaMessage.message_annotations[Constants.partitionKey];\n }\n\n // Will be required later for implementing Transactions\n // if (item.viaPartitionKey) {\n // entry[\"via-partition-key\"] = item.viaPartitionKey;\n // }\n\n const wrappedEntry = types.wrap_map(entry);\n messageBody.push(wrappedEntry);\n } catch (err: any) {\n const error = translateServiceBusError(err);\n senderLogger.logError(\n error,\n `${this.logPrefix} An error occurred while encoding the item at position ${i} in the messages array`,\n );\n throw error;\n }\n }\n const updatedOptions = await this.initWithUniqueReplyTo(options);\n try {\n const request: RheaMessage = {\n body: { messages: messageBody },\n reply_to: this.replyTo,\n application_properties: {\n operation: Constants.operations.scheduleMessage,\n },\n };\n if (updatedOptions?.associatedLinkName) {\n request.application_properties![Constants.associatedLinkName] =\n updatedOptions?.associatedLinkName;\n }\n request.application_properties![Constants.trackingId] = generate_uuid();\n senderLogger.verbose(\"%s Schedule messages request body: %O.\", this.logPrefix, request.body);\n const result = await this._makeManagementRequest(request, senderLogger, updatedOptions);\n const sequenceNumbers = result.body[Constants.sequenceNumbers];\n const sequenceNumbersAsLong = [];\n for (let i = 0; i < sequenceNumbers.length; i++) {\n if (typeof sequenceNumbers[i] === \"number\") {\n sequenceNumbersAsLong.push(Long.fromNumber(sequenceNumbers[i]));\n } else {\n sequenceNumbersAsLong.push(Long.fromBytesBE(sequenceNumbers[i]));\n }\n }\n return sequenceNumbersAsLong;\n } catch (err: any) {\n const error = translateServiceBusError(err);\n senderLogger.logError(\n error,\n `${this.logPrefix} An error occurred while sending the request to schedule messages to $management endpoint`,\n );\n throw error;\n }\n }\n\n /**\n * Cancels an array of messages that were scheduled.\n * @param sequenceNumbers - An Array of sequence numbers of the message to be cancelled.\n */\n async cancelScheduledMessages(\n sequenceNumbers: Long[],\n options?: OperationOptionsBase & SendManagementRequestOptions,\n ): Promise<void> {\n throwErrorIfConnectionClosed(this._context);\n if (!sequenceNumbers.length) {\n return;\n }\n const messageBody: any = {};\n messageBody[Constants.sequenceNumbers] = [];\n for (let i = 0; i < sequenceNumbers.length; i++) {\n const sequenceNumber = sequenceNumbers[i];\n try {\n messageBody[Constants.sequenceNumbers].push(Buffer.from(sequenceNumber.toBytesBE()));\n } catch (err: any) {\n const error = translateServiceBusError(err);\n senderLogger.logError(\n error,\n `${this.logPrefix} An error occurred while encoding the item at position ${i} in the sequenceNumbers array`,\n );\n throw error;\n }\n }\n\n try {\n messageBody[Constants.sequenceNumbers] = types.wrap_array(\n messageBody[Constants.sequenceNumbers],\n 0x81,\n undefined,\n );\n const updatedOptions = await this.initWithUniqueReplyTo(options);\n const request: RheaMessage = {\n body: messageBody,\n reply_to: this.replyTo,\n application_properties: {\n operation: Constants.operations.cancelScheduledMessage,\n },\n };\n\n if (updatedOptions?.associatedLinkName) {\n request.application_properties![Constants.associatedLinkName] =\n updatedOptions?.associatedLinkName;\n }\n request.application_properties![Constants.trackingId] = generate_uuid();\n senderLogger.verbose(\n \"%s Cancel scheduled messages request body: %O.\",\n this.logPrefix,\n request.body,\n );\n\n await this._makeManagementRequest(request, senderLogger, updatedOptions);\n return;\n } catch (err: any) {\n const error = translateServiceBusError(err);\n senderLogger.logError(\n error,\n `${this.logPrefix} An error occurred while sending the request to cancel the scheduled message to $management endpoint`,\n );\n throw error;\n }\n }\n\n /**\n * Receives a list of deferred messages identified by `sequenceNumbers`.\n *\n * @param sequenceNumbers - A list containing the sequence numbers to receive.\n * @param receiveMode - The mode in which the receiver was created.\n * @returns a list of messages identified by the given sequenceNumbers or an empty list if no messages are found.\n * - Throws an error if the messages have not been deferred.\n */\n async receiveDeferredMessages(\n sequenceNumbers: Long[],\n receiveMode: ReceiveMode,\n sessionId?: string,\n options?: OperationOptionsBase & SendManagementRequestOptions,\n ): Promise<ServiceBusMessageImpl[]> {\n throwErrorIfConnectionClosed(this._context);\n\n if (!sequenceNumbers.length) {\n return [];\n }\n\n const messageList: ServiceBusMessageImpl[] = [];\n const messageBody: any = {};\n messageBody[Constants.sequenceNumbers] = [];\n for (let i = 0; i < sequenceNumbers.length; i++) {\n const sequenceNumber = sequenceNumbers[i];\n try {\n messageBody[Constants.sequenceNumbers].push(Buffer.from(sequenceNumber.toBytesBE()));\n } catch (err: any) {\n const error = translateServiceBusError(err);\n receiverLogger.logError(\n error,\n `${this.logPrefix} An error occurred while encoding the item at position ${i} in the sequenceNumbers array`,\n );\n throw error;\n }\n }\n\n try {\n messageBody[Constants.sequenceNumbers] = types.wrap_array(\n messageBody[Constants.sequenceNumbers],\n 0x81,\n undefined,\n );\n const receiverSettleMode: number = receiveMode === \"receiveAndDelete\" ? 0 : 1;\n messageBody[Constants.receiverSettleMode] = types.wrap_uint(receiverSettleMode);\n if (sessionId != null) {\n messageBody[Constants.sessionIdMapKey] = sessionId;\n }\n const updatedOptions = await this.initWithUniqueReplyTo(options);\n const request: RheaMessage = {\n body: messageBody,\n reply_to: this.replyTo,\n application_properties: {\n operation: Constants.operations.receiveBySequenceNumber,\n },\n };\n if (updatedOptions?.associatedLinkName) {\n request.application_properties![Constants.associatedLinkName] =\n updatedOptions?.associatedLinkName;\n }\n request.application_properties![Constants.trackingId] = generate_uuid();\n receiverLogger.verbose(\n \"%s Receive deferred messages request body: %O.\",\n this.logPrefix,\n request.body,\n );\n\n const result = await this._makeManagementRequest(request, receiverLogger, updatedOptions);\n const messages = result.body.messages as {\n message: Buffer;\n \"lock-token\": Buffer;\n }[];\n for (const msg of messages) {\n const decodedMessage = RheaMessageUtil.decode(msg.message);\n const message = new ServiceBusMessageImpl(\n decodedMessage as any,\n { tag: msg[\"lock-token\"] } as any,\n false,\n receiveMode,\n updatedOptions?.skipParsingBodyAsJson ?? false,\n false,\n );\n messageList.push(message);\n }\n return messageList;\n } catch (err: any) {\n const error = translateServiceBusError(err);\n receiverLogger.logError(\n error,\n `${this.logPrefix} An error occurred while sending the request to receive deferred messages to $management endpoint`,\n );\n throw error;\n }\n }\n\n private async _deleteMessages(\n messageCount: number,\n enqueueTimeUtcOlderThan: Date,\n sessionId?: string,\n options?: OperationOptionsBase & SendManagementRequestOptions,\n ): Promise<number> {\n try {\n const messageBody: any = {};\n messageBody[Constants.messageCount] = types.wrap_int(messageCount);\n messageBody[Constants.enqueuedTimeUtc] = enqueueTimeUtcOlderThan;\n if (isDefined(sessionId)) {\n messageBody[Constants.sessionIdMapKey] = sessionId;\n }\n\n const updatedOptions = await this.initWithUniqueReplyTo(options);\n const request: RheaMessage = {\n body: messageBody,\n reply_to: this.replyTo,\n application_properties: {\n operation: Constants.operations.deleteMessages,\n },\n };\n if (updatedOptions?.associatedLinkName) {\n request.application_properties![Constants.associatedLinkName] =\n updatedOptions?.associatedLinkName;\n }\n request.application_properties![Constants.trackingId] = generate_uuid();\n receiverLogger.verbose(\"%s delete messages request body: %O.\", this.logPrefix, request.body);\n\n const result = await this._makeManagementRequest(request, receiverLogger, updatedOptions);\n if (result.application_properties!.statusCode === 200) {\n return result.body[\"message-count\"];\n } else if (\n result.application_properties!.statusCode === 204 &&\n result.application_properties!.errorCondition === \"com.microsoft:message-not-found\"\n ) {\n return 0;\n } else {\n throw new Error(\n `Unexpected response with status code of ${result.application_properties!.statusCode}`,\n );\n }\n } catch (err: any) {\n const error = translateServiceBusError(err) as MessagingError;\n receiverLogger.logError(\n error,\n `${this.logPrefix} An error occurred while sending the request to delete messages to $management endpoint`,\n );\n throw error;\n }\n }\n\n /**\n * Delete messages. If no option is specified, all messages will be deleted.\n *\n * @param messageCount - number of messages to delete in a batch.\n * @param enqueueTimeUtcOlderThan - Delete messages whose enqueue time (UTC) are older than this.\n * @returns number of messages deleted.\n */\n async deleteMessages(\n messageCount: number,\n enqueueTimeUtcOlderThan?: Date,\n sessionId?: string,\n options: OperationOptionsBase & SendManagementRequestOptions = {},\n ): Promise<number> {\n throwTypeErrorIfParameterMissing(this._context.connectionId, \"messageCount\", messageCount);\n throwTypeErrorIfParameterTypeMismatch(\n this._context.connectionId,\n \"messageCount\",\n messageCount,\n \"number\",\n );\n\n if (isNaN(messageCount) || messageCount < 1) {\n throw new TypeError(\"'messageCount' must be a number greater than 0.\");\n }\n\n enqueueTimeUtcOlderThan ??= new Date();\n\n return this._deleteMessages(messageCount, enqueueTimeUtcOlderThan, sessionId, options);\n }\n\n /**\n * Updates the disposition status of deferred messages.\n *\n * @param lockTokens - Message lock tokens to update disposition status.\n * @param dispositionStatus - The disposition status to be set\n * @param options - Optional parameters that can be provided while updating the disposition status.\n */\n async updateDispositionStatus(\n lockToken: string,\n dispositionType: DispositionType,\n // TODO: mgmt link retry<> will come in the next PR.\n options?: Omit<DispositionStatusOptions, \"retryOptions\"> & SendManagementRequestOptions,\n ): Promise<void> {\n throwErrorIfConnectionClosed(this._context);\n if (!options) options = {};\n try {\n let dispositionStatus: \"completed\" | \"defered\" | \"suspended\" | \"abandoned\";\n\n if (dispositionType === DispositionType.abandon) dispositionStatus = \"abandoned\";\n else if (dispositionType === DispositionType.complete) dispositionStatus = \"completed\";\n else if (dispositionType === DispositionType.defer) dispositionStatus = \"defered\";\n else if (dispositionType === DispositionType.deadletter) dispositionStatus = \"suspended\";\n else throw new Error(`Provided \"dispositionType\" - ${dispositionType} is invalid`);\n\n const messageBody: any = {};\n const lockTokenBuffer: Buffer[] = [];\n lockTokenBuffer.push(string_to_uuid(lockToken));\n messageBody[Constants.lockTokens] = types.wrap_array(lockTokenBuffer, 0x98, undefined);\n messageBody[Constants.dispositionStatus] = dispositionStatus;\n if (options.deadLetterDescription != null) {\n messageBody[Constants.deadLetterDescription] = options.deadLetterDescription;\n }\n if (options.deadLetterReason != null) {\n messageBody[Constants.deadLetterReason] = options.deadLetterReason;\n }\n if (options.propertiesToModify != null) {\n messageBody[Constants.propertiesToModify] = options.propertiesToModify;\n }\n if (options.sessionId != null) {\n messageBody[Constants.sessionIdMapKey] = options.sessionId;\n }\n const updatedOptions = await this.initWithUniqueReplyTo(options);\n const request: RheaMessage = {\n body: messageBody,\n reply_to: this.replyTo,\n application_properties: {\n operation: Constants.operations.updateDisposition,\n },\n };\n if (updatedOptions.associatedLinkName) {\n request.application_properties![Constants.associatedLinkName] =\n updatedOptions.associatedLinkName;\n }\n request.application_properties![Constants.trackingId] = generate_uuid();\n receiverLogger.verbose(\n \"%s Update disposition status request body: %O.\",\n this.logPrefix,\n request.body,\n );\n await this._makeManagementRequest(request, receiverLogger, updatedOptions);\n } catch (err: any) {\n const error = translateServiceBusError(err);\n receiverLogger.logError(\n error,\n `${this.logPrefix} An error occurred while sending the request to update disposition status to $management endpoint`,\n );\n throw error;\n }\n }\n\n /**\n * Renews the lock for the specified session.\n *\n * @param sessionId - Id of the session for which the lock needs to be renewed\n * @param options - Options that can be set while sending the request.\n * @returns New lock token expiry date and time in UTC format.\n */\n async renewSessionLock(\n sessionId: string,\n options?: OperationOptionsBase & SendManagementRequestOptions,\n ): Promise<Date> {\n throwErrorIfConnectionClosed(this._context);\n try {\n const messageBody: any = {};\n messageBody[Constants.sessionIdMapKey] = sessionId;\n const updatedOptions = await this.initWithUniqueReplyTo(options);\n const request: RheaMessage = {\n body: messageBody,\n reply_to: this.replyTo,\n application_properties: {\n operation: Constants.operations.renewSessionLock,\n },\n };\n request.application_properties![Constants.trackingId] = generate_uuid();\n if (updatedOptions?.associatedLinkName) {\n request.application_properties![Constants.associatedLinkName] =\n updatedOptions?.associatedLinkName;\n }\n receiverLogger.verbose(\n \"%s Renew Session Lock request body: %O.\",\n this.logPrefix,\n request.body,\n );\n const result = await this._makeManagementRequest(request, receiverLogger, updatedOptions);\n const lockedUntilUtc = new Date(result.body.expiration);\n receiverLogger.verbose(\n \"%s Lock for session '%s' will expire at %s.\",\n this.logPrefix,\n sessionId,\n lockedUntilUtc.toString(),\n );\n return lockedUntilUtc;\n } catch (err: any) {\n const error = translateServiceBusError(err);\n receiverLogger.logError(\n error,\n `${this.logPrefix} An error occurred while sending the renew lock request to $management endpoint`,\n );\n throw error;\n }\n }\n\n /**\n * Sets the state of the specified session.\n *\n * @param sessionId - The session for which the state needs to be set\n * @param state - The state that needs to be set.\n */\n async setSessionState(\n sessionId: string,\n state: unknown,\n options?: OperationOptionsBase & SendManagementRequestOptions,\n ): Promise<void> {\n throwErrorIfConnectionClosed(this._context);\n\n try {\n const messageBody: any = {};\n messageBody[Constants.sessionIdMapKey] = sessionId;\n messageBody[\"session-state\"] = toBuffer(state);\n const updatedOptions = await this.initWithUniqueReplyTo(options);\n const request: RheaMessage = {\n body: messageBody,\n reply_to: this.replyTo,\n application_properties: {\n operation: Constants.operations.setSessionState,\n },\n };\n if (updatedOptions?.associatedLinkName) {\n request.application_properties![Constants.associatedLinkName] =\n updatedOptions?.associatedLinkName;\n }\n request.application_properties![Constants.trackingId] = generate_uuid();\n receiverLogger.verbose(\n \"%s Set Session state request body: %O.\",\n this.logPrefix,\n request.body,\n );\n await this._makeManagementRequest(request, receiverLogger, updatedOptions);\n } catch (err: any) {\n const error = translateServiceBusError(err);\n receiverLogger.logError(\n error,\n `${this.logPrefix} An error occurred while sending the renew lock request to $management endpoint`,\n );\n throw error;\n }\n }\n\n /**\n * Gets the state of the specified session.\n *\n * @param sessionId - The session for which the state needs to be retrieved.\n * @returns The state of that session\n */\n async getSessionState(\n sessionId: string,\n options?: OperationOptionsBase & SendManagementRequestOptions,\n ): Promise<any> {\n throwErrorIfConnectionClosed(this._context);\n try {\n const messageBody: any = {};\n messageBody[Constants.sessionIdMapKey] = sessionId;\n const updatedOptions = await this.initWithUniqueReplyTo(options);\n const request: RheaMessage = {\n body: messageBody,\n reply_to: this.replyTo,\n application_properties: {\n operation: Constants.operations.getSessionState,\n },\n };\n if (updatedOptions?.associatedLinkName) {\n request.application_properties![Constants.associatedLinkName] =\n updatedOptions?.associatedLinkName;\n }\n request.application_properties![Constants.trackingId] = generate_uuid();\n receiverLogger.verbose(\n \"%s Get session state request body: %O.\",\n this.logPrefix,\n request.body,\n );\n const result = await this._makeManagementRequest(request, receiverLogger, updatedOptions);\n return result.body[\"session-state\"]\n ? tryToJsonDecode(result.body[\"session-state\"])\n : result.body[\"session-state\"];\n } catch (err: any) {\n const error = translateServiceBusError(err);\n receiverLogger.logError(\n error,\n `${this.logPrefix} An error occurred while sending the renew lock request to $management endpoint`,\n );\n throw error;\n }\n }\n\n /**\n * Lists the sessions on the ServiceBus Queue/Topic.\n * @param lastUpdateTime - Filter to include only sessions updated after a given time.\n * @param skip - The number of sessions to skip\n * @param top - Maximum numer of sessions.\n * @returns A list of session ids.\n */\n async listMessageSessions(\n skip: number,\n top: number,\n lastUpdatedTime?: Date,\n options?: OperationOptionsBase & SendManagementRequestOptions,\n ): Promise<string[]> {\n throwErrorIfConnectionClosed(this._context);\n const defaultLastUpdatedTimeForListingSessions: number = 259200000; // 3 * 24 * 3600 * 1000\n if (typeof skip !== \"number\") {\n throw new Error(\"'skip' is a required parameter and must be of type 'number'.\");\n }\n if (typeof top !== \"number\") {\n throw new Error(\"'top' is a required parameter and must be of type 'number'.\");\n }\n if (lastUpdatedTime && !(lastUpdatedTime instanceof Date)) {\n throw new Error(\"'lastUpdatedTime' must be of type 'Date'.\");\n }\n if (!lastUpdatedTime) {\n lastUpdatedTime = new Date(Date.now() - defaultLastUpdatedTimeForListingSessions);\n }\n try {\n const messageBody: any = {};\n messageBody[\"last-updated-time\"] = lastUpdatedTime;\n messageBody[\"skip\"] = types.wrap_int(skip);\n messageBody[\"top\"] = types.wrap_int(top);\n const updatedOptions = await this.initWithUniqueReplyTo(options);\n const request: RheaMessage = {\n body: messageBody,\n reply_to: this.replyTo,\n application_properties: {\n operation: Constants.operations.enumerateSessions,\n },\n };\n request.application_properties![Constants.trackingId] = generate_uuid();\n managementClientLogger.verbose(\n \"%s List sessions request body: %O.\",\n this.logPrefix,\n request.body,\n );\n const response = await this._makeManagementRequest(\n request,\n managementClientLogger,\n updatedOptions,\n );\n\n return (response && response.body && response.body[\"sessions-ids\"]) || [];\n } catch (err: any) {\n const error = translateServiceBusError(err);\n managementClientLogger.logError(\n error,\n `${this.logPrefix} An error occurred while sending the renew lock request to $management endpoint`,\n );\n throw error;\n }\n }\n\n /**\n * Get all the rules on the Subscription.\n * @returns A list of rules.\n */\n async getRules(\n options?: ListRequestOptions & OperationOptionsBase & SendManagementRequestOptions,\n ): Promise<RuleProperties[]> {\n throwErrorIfConnectionClosed(this._context);\n try {\n const updatedOptions = (await this.initWithUniqueReplyTo(options)) as ListRequestOptions &\n OperationOptionsBase &\n SendManagementRequestOptions;\n const request: RheaMessage = {\n body: {\n top: updatedOptions?.maxCount\n ? types.wrap_int(updatedOptions.maxCount)\n : types.wrap_int(max32BitNumber),\n skip: updatedOptions?.skip ? types.wrap_int(updatedOptions.skip) : types.wrap_int(0),\n },\n reply_to: this.replyTo,\n application_properties: {\n operation: Constants.operations.enumerateRules,\n },\n };\n request.application_properties![Constants.trackingId] = generate_uuid();\n\n managementClientLogger.verbose(\n \"%s Get rules request body: %O.\",\n this.logPrefix,\n request.body,\n );\n const response = await this._makeManagementRequest(\n request,\n managementClientLogger,\n updatedOptions,\n );\n if (\n response.application_properties!.statusCode === 204 ||\n !response.body ||\n !Array.isArray(response.body.rules)\n ) {\n return [];\n }\n\n // Reference: https://docs.microsoft.com/azure/service-bus-messaging/service-bus-amqp-request-response#response-11\n const result: { \"rule-description\": Typed }[] = response.body.rules || [];\n const rules: RuleProperties[] = [];\n result.forEach((x) => {\n const ruleDescriptor = x[\"rule-description\"];\n let filter: SqlRuleFilter | CorrelationRuleFilter;\n\n // We use the first three elements of the `ruleDescriptor.value` to get filter, action, name\n if (\n !ruleDescriptor ||\n !ruleDescriptor.descriptor ||\n ruleDescriptor.descriptor.value !== Constants.descriptorCodes.ruleDescriptionList ||\n !Array.isArray(ruleDescriptor.value) ||\n ruleDescriptor.value.length < 3\n ) {\n return;\n }\n\n const filtersRawData: Typed = ruleDescriptor.value[0];\n const actionsRawData: Typed = ruleDescriptor.value[1];\n let sqlRuleAction: SqlRuleAction;\n if (\n actionsRawData.descriptor.value === Constants.descriptorCodes.sqlRuleActionList &&\n Array.isArray(actionsRawData.value) &&\n actionsRawData.value.length\n ) {\n sqlRuleAction = {\n sqlExpression: this._safelyGetTypedValueFromArray(actionsRawData.value, 0),\n };\n } else {\n sqlRuleAction = {};\n }\n\n switch (filtersRawData.descriptor.value) {\n case Constants.descriptorCodes.trueFilterList:\n filter = {\n sqlExpression: \"1=1\",\n };\n break;\n case Constants.descriptorCodes.falseFilterList:\n filter = {\n sqlExpression: \"1=0\",\n };\n break;\n case Constants.descriptorCodes.sqlFilterList:\n filter = {\n sqlExpression: this._safelyGetTypedValueFromArray(filtersRawData.value, 0),\n };\n break;\n case Constants.descriptorCodes.correlationFilterList:\n filter = {\n correlationId: this._safelyGetTypedValueFromArray(filtersRawData.value, 0),\n messageId: this._safelyGetTypedValueFromArray(filtersRawData.value, 1),\n to: this._safelyGetTypedValueFromArray(filtersRawData.value, 2),\n replyTo: this._safelyGetTypedValueFromArray(filtersRawData.value, 3),\n subject: this._safelyGetTypedValueFromArray(filtersRawData.value, 4),\n sessionId: this._safelyGetTypedValueFromArray(filtersRawData.value, 5),\n replyToSessionId: this._safelyGetTypedValueFromArray(filtersRawData.value, 6),\n contentType: this._safelyGetTypedValueFromArray(filtersRawData.value, 7),\n applicationProperties:\n Array.isArray(filtersRawData.value) &&\n filtersRawData.value.length > 8 &&\n filtersRawData.value[8]\n ? this._decodeApplicationPropertiesMap(filtersRawData.value[8])\n : undefined,\n };\n break;\n default:\n throw new Error(\n `${this.logPrefix} Found unexpected descriptor code for the filter: ${filtersRawData.descriptor.value}`,\n );\n }\n\n const rule: RuleProperties = {\n name: ruleDescriptor.value[2].value,\n filter,\n action: sqlRuleAction,\n };\n rules.push(rule);\n });\n\n return rules;\n } catch (err: any) {\n const error = translateServiceBusError(err);\n managementClientLogger.logError(\n error,\n `${this.logPrefix} An error occurred while sending the get rules request to $management endpoint`,\n );\n throw error;\n }\n }\n\n /**\n * Removes the rule on the Subscription identified by the given rule name.\n */\n async removeRule(\n ruleName: string,\n options?: OperationOptionsBase & SendManagementRequestOptions,\n ): Promise<void> {\n throwErrorIfConnectionClosed(this._context);\n throwTypeErrorIfParameterMissing(this._context.connectionId, \"ruleName\", ruleName);\n ruleName = String(ruleName);\n throwTypeErrorIfParameterIsEmptyString(this._context.connectionId, \"ruleName\", ruleName);\n\n try {\n const updatedOptions = await this.initWithUniqueReplyTo(options);\n const request: RheaMessage = {\n body: {\n \"rule-name\": types.wrap_string(ruleName),\n },\n reply_to: this.replyTo,\n application_properties: {\n operation: Constants.operations.removeRule,\n },\n };\n request.application_properties![Constants.trackingId] = generate_uuid();\n\n managementClientLogger.verbose(\n \"%s Remove Rule request body: %O.\",\n this.logPrefix,\n request.body,\n );\n await this._makeManagementRequest(request, managementClientLogger, updatedOptions);\n } catch (err: any) {\n const error = translateServiceBusError(err);\n managementClientLogger.logError(\n error,\n `${this.logPrefix} An error occurred while sending the remove rule request to $management endpoint`,\n );\n throw error;\n }\n }\n\n /**\n * Adds a rule on the subscription as defined by the given rule name, filter and action\n * @param ruleName - Name of the rule\n * @param filter - A Boolean, SQL expression or a Correlation filter\n * @param sqlRuleActionExpression - Action to perform if the message satisfies the filtering expression\n */\n async addRule(\n ruleName: string,\n filter: SqlRuleFilter | CorrelationRuleFilter,\n sqlRuleActionExpression?: string,\n options?: OperationOptionsBase & SendManagementRequestOptions,\n ): Promise<void> {\n throwErrorIfConnectionClosed(this._context);\n\n throwTypeErrorIfParameterMissing(this._context.connectionId, \"ruleName\", ruleName);\n ruleName = String(ruleName);\n throwTypeErrorIfParameterIsEmptyString(this._context.connectionId, \"ruleName\", ruleName);\n\n throwTypeErrorIfParameterMissing(this._context.connectionId, \"filter\", filter);\n if (!isSqlRuleFilter(filter) && !isCorrelationRuleFilter(filter)) {\n throw new TypeError(\n `The parameter \"filter\" should implement either the SqlRuleFilter or the CorrelationRuleFilter interface.`,\n );\n }\n\n try {\n const ruleDescription: any = {};\n if (isSqlRuleFilter(filter)) {\n ruleDescription[\"sql-filter\"] = {\n expression: filter.sqlExpression,\n };\n } else {\n ruleDescription[\"correlation-filter\"] = {\n \"correlation-id\": filter.correlationId,\n \"message-id\": filter.messageId,\n to: filter.to,\n \"reply-to\": filter.replyTo,\n label: filter.subject,\n \"session-id\": filter.sessionId,\n \"reply-to-session-id\": filter.replyToSessionId,\n \"content-type\": filter.contentType,\n properties: filter.applicationProperties,\n };\n }\n\n if (sqlRuleActionExpression !== undefined) {\n ruleDescription[\"sql-rule-action\"] = {\n expression: String(sqlRuleActionExpression),\n };\n }\n const updatedOptions = await this.initWithUniqueReplyTo(options);\n const request: RheaMessage = {\n body: {\n \"rule-name\": types.wrap_string(ruleName),\n \"rule-description\": types.wrap_map(ruleDescription),\n },\n reply_to: this.replyTo,\n application_properties: {\n operation: Constants.operations.addRule,\n },\n };\n request.application_properties![Constants.trackingId] = generate_uuid();\n\n managementClientLogger.verbose(\"%s Add Rule request body: %O.\", this.logPrefix, request.body);\n await this._makeManagementRequest(request, managementClientLogger, updatedOptions);\n } catch (err: any) {\n const error = translateServiceBusError(err);\n managementClientLogger.logError(\n error,\n `${this.logPrefix} An error occurred while sending the Add rule request to $management endpoint`,\n );\n throw error;\n }\n }\n\n protected removeLinkFromContext(): void {\n delete this._context.managementClients[this.name];\n }\n}\n\n/**\n * Converts an AmqpAnnotatedMessage or ServiceBusMessage into a properly formatted\n * message for sending to the mgmt link for scheduling.\n *\n * @internal\n * @hidden\n */\nexport function toScheduleableMessage(\n item: ServiceBusMessage | AmqpAnnotatedMessage,\n scheduledEnqueueTimeUtc: Date,\n): Record<string, unknown> {\n const rheaMessage = toRheaMessage(item, defaultDataTransformer);\n updateMessageId(rheaMessage, rheaMessage.message_id || generate_uuid());\n updateScheduledTime(rheaMessage, scheduledEnqueueTimeUtc);\n\n const entry: Record<string, unknown> = {\n message: RheaMessageUtil.encode(rheaMessage),\n \"message-id\": rheaMessage.message_id,\n };\n\n rheaMessage.message_annotations = {\n ...rheaMessage.message_annotations,\n [Constants.scheduledEnqueueTime]: scheduledEnqueueTimeUtc,\n };\n\n if (rheaMessage.group_id) {\n entry[Constants.sessionIdMapKey] = rheaMessage.group_id;\n }\n\n const partitionKey =\n rheaMessage.message_annotations && rheaMessage.message_annotations[Constants.partitionKey];\n\n if (partitionKey) {\n entry[\"partition-key\"] = partitionKey;\n }\n return entry;\n}\n"]}
1
+ {"version":3,"file":"managementClient.js","sourceRoot":"","sources":["../../../src/core/managementClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,IAAI,MAAM,MAAM,CAAC;AAQxB,OAAO,EACL,OAAO,IAAI,eAAe,EAC1B,aAAa,EACb,cAAc,EACd,KAAK,EACL,cAAc,GACf,MAAM,cAAc,CAAC;AAOtB,OAAO,EACL,wBAAwB,EACxB,SAAS,EACT,sBAAsB,EACtB,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,aAAa,EACb,eAAe,EACf,mBAAmB,EACnB,eAAe,GAChB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,OAAO,EAAE,sBAAsB,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,EAC5B,sCAAsC,EACtC,gCAAgC,EAChC,gCAAgC,EAChC,qCAAqC,GACtC,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAIhC,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM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AC,CAAC;IAChE,eAAe,CAAC,WAAW,EAAE,WAAW,CAAC,UAAU,IAAI,aAAa,EAAE,CAAC,CAAC;IACxE,mBAAmB,CAAC,WAAW,EAAE,uBAAuB,CAAC,CAAC;IAE1D,MAAM,KAAK,GAA4B;QACrC,OAAO,EAAE,eAAe,CAAC,MAAM,CAAC,WAAW,CAAC;QAC5C,YAAY,EAAE,WAAW,CAAC,UAAU;KACrC,CAAC;IAEF,WAAW,CAAC,mBAAmB,mCAC1B,WAAW,CAAC,mBAAmB,KAClC,CAAC,SAAS,CAAC,oBAAoB,CAAC,EAAE,uBAAuB,GAC1D,CAAC;IAEF,IAAI,WAAW,CAAC,QAAQ,EAAE,CAAC;QACzB,KAAK,CAAC,SAAS,CAAC,eAAe,CAAC,GAAG,WAAW,CAAC,QAAQ,CAAC;IAC1D,CAAC;IAED,MAAM,YAAY,GAChB,WAAW,CAAC,mBAAmB,IAAI,WAAW,CAAC,mBAAmB,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;IAE7F,IAAI,YAAY,EAAE,CAAC;QACjB,KAAK,CAAC,eAAe,CAAC,GAAG,YAAY,CAAC;IACxC,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport Long from \"long\";\nimport type {\n EventContext,\n ReceiverOptions,\n SenderOptions,\n Typed,\n Message as RheaMessage,\n} from \"rhea-promise\";\nimport {\n message as RheaMessageUtil,\n generate_uuid,\n string_to_uuid,\n types,\n ReceiverEvents,\n} from \"rhea-promise\";\nimport type {\n MessagingError,\n SendRequestOptions,\n RetryOptions,\n AmqpAnnotatedMessage,\n} from \"@azure/core-amqp\";\nimport {\n ConditionErrorNameMapper,\n Constants,\n defaultCancellableLock,\n RequestResponseLink,\n} from \"@azure/core-amqp\";\nimport type { ConnectionContext } from \"../connectionContext.js\";\nimport type { ServiceBusReceivedMessage, ServiceBusMessage } from \"../serviceBusMessage.js\";\nimport {\n DispositionType,\n ServiceBusMessageImpl,\n toRheaMessage,\n fromRheaMessage,\n updateScheduledTime,\n updateMessageId,\n} from \"../serviceBusMessage.js\";\nimport type { RequestResponseLinkOptions } from \"./linkEntity.js\";\nimport { LinkEntity } from \"./linkEntity.js\";\nimport type { ServiceBusLogger } from \"../log.js\";\nimport { managementClientLogger, receiverLogger, senderLogger } from \"../log.js\";\nimport { toBuffer, waitForSendable } from \"../util/utils.js\";\nimport {\n InvalidMaxMessageCountError,\n throwErrorIfConnectionClosed,\n throwTypeErrorIfParameterIsEmptyString,\n throwTypeErrorIfParameterMissing,\n throwTypeErrorIfParameterNotLong,\n throwTypeErrorIfParameterTypeMismatch,\n} from \"../util/errors.js\";\nimport { max32BitNumber } from \"../util/constants.js\";\nimport { Buffer } from \"buffer\";\nimport type { OperationOptionsBase } from \"./../modelsToBeSharedWithEventHubs.js\";\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\nimport type { ReceiveMode } from \"../models.js\";\nimport { translateServiceBusError } from \"../serviceBusError.js\";\nimport { defaultDataTransformer, tryToJsonDecode } from \"../dataTransformer.js\";\nimport { delay, isDefined, isObjectWithProperties } from \"@azure/core-util\";\nimport type {\n RuleProperties,\n SqlRuleAction,\n SqlRuleFilter,\n} from \"../serializers/ruleResourceSerializer.js\";\nimport type { ListRequestOptions } from \"../serviceBusAtomManagementClient.js\";\n\n/**\n * @internal\n */\nexport interface SendManagementRequestOptions extends SendRequestOptions {\n /**\n * The name of the sender or receiver link associated with the managmenet operations.\n * This is used for service side optimization.\n */\n associatedLinkName?: string;\n /**\n * Option to disable the client from running JSON.parse() on the message body when receiving the message.\n * Not applicable if the message was sent with AMQP body type value or sequence. Use this option when you\n * prefer to work directly with the bytes present in the message body than have the client attempt to parse it.\n */\n skipParsingBodyAsJson?: boolean;\n /**\n * Whether to skip converting Date type on properties of message annotations\n * or application properties into numbers when receiving the message. By\n * default, properties of Date type is converted into UNIX epoch number for\n * compatibility.\n */\n skipConvertingDate?: boolean;\n}\n\n/**\n * Represents the correlation filter expression.\n * A CorrelationRuleFilter holds a set of conditions that are matched against user and system properties\n * of incoming messages from a Subscription.\n */\nexport interface CorrelationRuleFilter {\n /**\n * Value to be matched with the `correlationId` property of the incoming message.\n */\n correlationId?: string;\n /**\n * Value to be matched with the `messageId` property of the incoming message.\n */\n messageId?: string;\n /**\n * Value to be matched with the `to` property of the incoming message.\n */\n to?: string;\n /**\n * Value to be matched with the `replyTo` property of the incoming message.\n */\n replyTo?: string;\n /**\n * Value to be matched with the `subject` property of the incoming message.\n */\n subject?: string;\n /**\n * Value to be matched with the `sessionId` property of the incoming message.\n */\n sessionId?: string;\n /**\n * Value to be matched with the `replyToSessionId` property of the incoming message.\n */\n replyToSessionId?: string;\n /**\n * Value to be matched with the `contentType` property of the incoming message.\n */\n contentType?: string;\n /**\n * Value to be matched with the user properties of the incoming message.\n */\n applicationProperties?: { [key: string]: string | number | boolean | Date };\n}\n\n/**\n * @internal\n */\nconst sqlRuleProperties = [\"sqlExpression\"];\n\nfunction isSqlRuleFilter(obj: unknown): obj is SqlRuleFilter {\n if (obj) {\n return sqlRuleProperties.some((validProperty) => isObjectWithProperties(obj, [validProperty]));\n }\n\n return false;\n}\n\n/**\n * @internal\n */\nconst correlationProperties = [\n \"correlationId\",\n \"messageId\",\n \"to\",\n \"replyTo\",\n \"subject\",\n \"sessionId\",\n \"replyToSessionId\",\n \"contentType\",\n \"applicationProperties\",\n];\n\nfunction isCorrelationRuleFilter(obj: unknown): obj is CorrelationRuleFilter {\n if (obj) {\n return correlationProperties.some((validProperty) =>\n isObjectWithProperties(obj, [validProperty]),\n );\n }\n\n return false;\n}\n\n/**\n * @internal\n * Options to set when updating the disposition status\n */\nexport interface DispositionStatusOptions extends OperationOptionsBase {\n /**\n * A map of Service Bus brokered message properties\n * to modify.\n */\n propertiesToModify?: { [key: string]: any };\n /**\n * The deadletter reason. May be set if disposition status\n * is set to suspended.\n */\n deadLetterReason?: string;\n /**\n * The deadletter description. May be set if disposition status\n * is set to suspended.\n */\n deadLetterDescription?: string;\n /**\n * This should only be provided if `session` is enabled for a Queue or Topic.\n */\n sessionId?: string;\n /**\n * Retry options.\n */\n retryOptions: RetryOptions | undefined;\n}\n\n/**\n * @internal\n * Options passed to the constructor of ManagementClient\n */\nexport interface ManagementClientOptions {\n address?: string;\n audience?: string;\n}\n\n/**\n * @internal\n * Describes the ServiceBus Management Client that talks\n * to the $management endpoint over AMQP connection.\n */\nexport class ManagementClient extends LinkEntity<RequestResponseLink> {\n /**\n * The reply to Guid for the management client.\n */\n replyTo: string = generate_uuid();\n /**\n * Provides the sequence number of the last peeked message.\n */\n private _lastPeekedSequenceNumber: Long = Long.ZERO;\n /**\n * lock token for init operation\n */\n private _initLock: string = `initMgmtLink-${generate_uuid()}`;\n /**\n * Instantiates the management client.\n * @param context - The connection context\n * @param entityPath - The name/path of the entity (queue/topic/subscription name)\n * for which the management request needs to be made.\n * @param options - Options to be provided for creating the\n * \"$management\" client.\n */\n constructor(context: ConnectionContext, entityPath: string, options?: ManagementClientOptions) {\n super(`${entityPath}/$management`, entityPath, context, \"mgmt\", managementClientLogger, {\n address: options && options.address ? options.address : Constants.management,\n audience:\n options && options.audience\n ? options.audience\n : `${context.config.endpoint}${entityPath}/$management`,\n });\n this._context = context;\n }\n\n /**\n * initialize link with unique this.replyTo address.\n * @param options -\n * @returns updated options bag that has adjusted `timeoutInMs` to account for init time\n */\n private async initWithUniqueReplyTo(\n options: SendManagementRequestOptions = {},\n ): Promise<SendManagementRequestOptions> {\n const retryTimeoutInMs = options.timeoutInMs ?? Constants.defaultOperationTimeoutInMs;\n const initOperationStartTime = Date.now();\n return defaultCancellableLock.acquire(\n this._initLock,\n async () => {\n managementClientLogger.verbose(\n `${this.logPrefix} lock acquired for initializing replyTo address and link`,\n );\n if (!this.isOpen()) {\n this.replyTo = generate_uuid();\n managementClientLogger.verbose(\n `${this.logPrefix} new replyTo address: ${this.replyTo} generated`,\n );\n }\n const { abortSignal } = options;\n const aborter = new AbortController();\n\n const abortListener = (): void => {\n aborter.abort();\n };\n abortSignal?.addEventListener(\"abort\", abortListener);\n\n if (!this.isOpen()) {\n await Promise.race([\n this._init(aborter.signal),\n delay(retryTimeoutInMs, { abortSignal: aborter.signal }).then(\n function onfulfilled() {\n throw {\n name: \"OperationTimeoutError\",\n message:\n \"The initialization of management client timed out. Please try again later.\",\n };\n },\n function onrejected(_) {\n managementClientLogger.verbose(\n `The management client initialization has either completed or been cancelled.`,\n );\n },\n ),\n ]).finally(() => {\n aborter.abort();\n abortSignal?.removeEventListener(\"abort\", abortListener);\n });\n }\n\n // time taken by the init operation\n const timeTakenByInit = Date.now() - initOperationStartTime;\n return {\n ...options,\n // Left over time\n timeoutInMs: retryTimeoutInMs - timeTakenByInit,\n };\n },\n {\n abortSignal: options.abortSignal,\n timeoutInMs: retryTimeoutInMs,\n },\n );\n }\n\n private async _init(abortSignal?: AbortSignalLike): Promise<void> {\n throwErrorIfConnectionClosed(this._context);\n try {\n const rxopt: ReceiverOptions = {\n source: { address: this.address },\n name: this.replyTo,\n target: { address: this.replyTo },\n onSessionError: (context: EventContext) => {\n const sbError = translateServiceBusError(context.session!.error!);\n managementClientLogger.logError(\n sbError,\n `${this.logPrefix} An error occurred on the session for request/response links for $management`,\n );\n },\n };\n const sropt: SenderOptions = {\n target: { address: this.address },\n onError: (context: EventContext) => {\n const ehError = translateServiceBusError(context.sender!.error!);\n managementClientLogger.logError(\n ehError,\n `${this.logPrefix} An error occurred on the $management sender link`,\n );\n },\n };\n\n // Even if multiple parallel requests reach here, the initLink secures a lock\n // to ensure there won't be multiple initializations\n await this.initLink(\n {\n senderOptions: sropt,\n receiverOptions: rxopt,\n },\n abortSignal,\n );\n } catch (err: any) {\n const translatedError = translateServiceBusError(err);\n managementClientLogger.logError(\n translatedError,\n `${this.logPrefix} An error occurred while establishing the $management links`,\n );\n throw translatedError;\n }\n }\n\n protected async createRheaLink(\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: RequestResponseLinkOptions,\n ): Promise<RequestResponseLink> {\n const rheaLink = await RequestResponseLink.create(\n this._context.connection,\n options.senderOptions,\n options.receiverOptions,\n );\n // Attach listener for the `receiver_error` events to log the errors.\n\n // \"message\" event listener is added in core-amqp.\n // \"rhea\" doesn't allow setting only the \"onError\" handler in the options if it is not accompanied by an \"onMessage\" handler.\n // Hence, not passing onError handler in the receiver options, adding a handler below.\n rheaLink.receiver.on(ReceiverEvents.receiverError, (context: EventContext) => {\n const ehError = translateServiceBusError(context.receiver!.error!);\n managementClientLogger.logError(\n ehError,\n `${this.logPrefix} An error occurred on the $management receiver link`,\n );\n });\n return rheaLink;\n }\n\n /**\n * Given array of typed values, returns the element in given index\n */\n private _safelyGetTypedValueFromArray(data: Typed[], index: number): any {\n return Array.isArray(data) && data.length > index && data[index]\n ? data[index].value\n : undefined;\n }\n\n private _decodeApplicationPropertiesMap(\n obj: Typed,\n ): Record<string, string | number | boolean | Date> {\n if (!types.is_map(obj)) {\n throw new Error(\"object to decode is not of Map types\");\n }\n const array = obj.value as Array<Typed>;\n const result: Record<string, string | number | boolean | Date> = {};\n for (let i = 0; i < array.length; i += 2) {\n const key = array[i].value as string;\n result[key] = array[i + 1].value as string | number | boolean | Date;\n }\n\n return result;\n }\n\n private async _makeManagementRequest(\n request: RheaMessage,\n internalLogger: ServiceBusLogger,\n sendRequestOptions: SendManagementRequestOptions = {},\n ): Promise<RheaMessage> {\n if (request.message_id === undefined) {\n request.message_id = generate_uuid();\n }\n\n try {\n const { timeoutInMs } = sendRequestOptions;\n await waitForSendable(\n internalLogger,\n this.logPrefix,\n this.name,\n timeoutInMs ?? Constants.defaultOperationTimeoutInMs,\n this.link?.sender,\n this.link?.session?.outgoing?.available(),\n );\n\n return await this.link!.sendRequest(request, sendRequestOptions);\n } catch (err: any) {\n const translatedError = translateServiceBusError(err);\n internalLogger.logError(\n translatedError,\n \"%s An error occurred during send on management request-response link with address '%s'\",\n this.logPrefix,\n this.address,\n );\n throw translatedError;\n }\n }\n\n /**\n * Closes the AMQP management session to the ServiceBus namespace for this client,\n * returning a promise that will be resolved when disconnection is completed.\n */\n async close(): Promise<void> {\n try {\n // Always clear the timeout, as the isOpen check may report\n // false without ever having cleared the timeout otherwise.\n\n // NOTE: management link currently doesn't have a separate concept of \"detaching\" like\n // the other links do. When we add handling of this (via the onDetached call, like other links)\n // we can change this back to closeLink(\"permanent\").\n await this.closeLink();\n managementClientLogger.verbose(\"Successfully closed the management session.\");\n } catch (err: any) {\n managementClientLogger.logError(\n err,\n `${this.logPrefix} An error occurred while closing the management session`,\n );\n throw err;\n }\n }\n\n /**\n * Fetches the next batch of active messages. The first call to `peek()` fetches the first\n * active message for this client. Each subsequent call fetches the subsequent message in the\n * entity.\n *\n * Unlike a `received` message, `peeked` message will not have lock token associated with it,\n * and hence it cannot be `Completed/Abandoned/Deferred/Deadlettered/Renewed`. This method will\n * also fetch even Deferred messages (but not Deadlettered message).\n *\n * @param messageCount - The number of messages to retrieve. Default value `1`.\n * @param omitMessageBody - Whether to omit message body when peeking. Default value `false`.\n */\n async peek(\n messageCount: number,\n omitMessageBody?: boolean,\n options?: OperationOptionsBase & SendManagementRequestOptions,\n ): Promise<ServiceBusReceivedMessage[]> {\n throwErrorIfConnectionClosed(this._context);\n return this.peekBySequenceNumber(\n this._lastPeekedSequenceNumber.add(1),\n messageCount,\n undefined,\n omitMessageBody,\n options,\n );\n }\n\n /**\n * Fetches the next batch of active messages in the current MessageSession. The first call to\n * `peek()` fetches the first active message for this client. Each subsequent call fetches the\n * subsequent message in the entity.\n *\n * Unlike a `received` message, `peeked` message will not have lock token associated with it,\n * and hence it cannot be `Completed/Abandoned/Deferred/Deadlettered/Renewed`. This method will\n * also fetch even Deferred messages (but not Deadlettered message).\n *\n * @param sessionId - The sessionId from which messages need to be peeked.\n * @param messageCount - The number of messages to retrieve. Default value `1`.\n * @param omitMessageBody - Whether to omit message body when peeking Default value `false`.\n */\n async peekMessagesBySession(\n sessionId: string,\n messageCount: number,\n omitMessageBody?: boolean,\n options?: OperationOptionsBase & SendManagementRequestOptions,\n ): Promise<ServiceBusReceivedMessage[]> {\n throwErrorIfConnectionClosed(this._context);\n return this.peekBySequenceNumber(\n this._lastPeekedSequenceNumber.add(1),\n messageCount,\n sessionId,\n omitMessageBody,\n options,\n );\n }\n\n /**\n * Peeks the desired number of messages from the specified sequence number.\n *\n * @param fromSequenceNumber - The sequence number from where to read the message.\n * @param messageCount - The number of messages to retrieve. Default value `1`.\n * @param sessionId - The sessionId from which messages need to be peeked.\n * @param omitMessageBody - Whether to omit message body when peeking. Default value `false`.\n */\n async peekBySequenceNumber(\n fromSequenceNumber: Long,\n maxMessageCount: number,\n sessionId?: string,\n omitMessageBody?: boolean,\n options?: OperationOptionsBase & SendManagementRequestOptions,\n ): Promise<ServiceBusReceivedMessage[]> {\n throwErrorIfConnectionClosed(this._context);\n const connId = this._context.connectionId;\n\n // Checks for fromSequenceNumber\n throwTypeErrorIfParameterMissing(connId, \"fromSequenceNumber\", fromSequenceNumber);\n throwTypeErrorIfParameterNotLong(connId, \"fromSequenceNumber\", fromSequenceNumber);\n\n // Checks for maxMessageCount\n throwTypeErrorIfParameterMissing(\n this._context.connectionId,\n \"maxMessageCount\",\n maxMessageCount,\n );\n throwTypeErrorIfParameterTypeMismatch(\n this._context.connectionId,\n \"maxMessageCount\",\n maxMessageCount,\n \"number\",\n );\n\n if (isNaN(maxMessageCount) || maxMessageCount < 1) {\n throw new TypeError(InvalidMaxMessageCountError);\n }\n\n const messageList: ServiceBusReceivedMessage[] = [];\n try {\n const messageBody: any = {};\n messageBody[Constants.fromSequenceNumber] = types.wrap_long(\n Buffer.from(fromSequenceNumber.toBytesBE()),\n );\n messageBody[Constants.messageCount] = types.wrap_int(maxMessageCount!);\n if (isDefined(sessionId)) {\n messageBody[Constants.sessionIdMapKey] = sessionId;\n }\n if (isDefined(omitMessageBody)) {\n const omitMessageBodyKey = \"omit-message-body\"; // TODO: Service Bus specific. Put it somewhere\n messageBody[omitMessageBodyKey] = types.wrap_boolean(omitMessageBody);\n }\n const updatedOptions = await this.initWithUniqueReplyTo(options);\n const request: RheaMessage = {\n body: messageBody,\n reply_to: this.replyTo,\n application_properties: {\n operation: Constants.operations.peekMessage,\n },\n };\n if (updatedOptions?.associatedLinkName) {\n request.application_properties![Constants.associatedLinkName] =\n updatedOptions?.associatedLinkName;\n }\n request.application_properties![Constants.trackingId] = generate_uuid();\n\n // TODO: it'd be nice to attribute this peek request to the actual receiver that made it. So have them pass in a\n // log prefix rather than just falling back to the management links.\n receiverLogger.verbose(\n \"%s Peek by sequence number request body: %O.\",\n this.logPrefix,\n request.body,\n );\n\n const result = await this._makeManagementRequest(request, receiverLogger, updatedOptions);\n if (result.application_properties!.statusCode !== 204) {\n const messages = result.body.messages as { message: Buffer }[];\n for (const msg of messages) {\n const decodedMessage = RheaMessageUtil.decode(msg.message);\n const message = fromRheaMessage(decodedMessage as any, {\n skipParsingBodyAsJson: updatedOptions?.skipParsingBodyAsJson ?? false,\n skipConvertingDate: updatedOptions?.skipConvertingDate ?? false,\n });\n messageList.push(message);\n this._lastPeekedSequenceNumber = message.sequenceNumber!;\n }\n }\n } catch (err: any) {\n const error = translateServiceBusError(err) as MessagingError;\n receiverLogger.logError(\n error,\n `${this.logPrefix} An error occurred while sending the request to peek messages to $management endpoint`,\n );\n // statusCode == 404 then do not throw\n if (error.code !== ConditionErrorNameMapper[\"com.microsoft:message-not-found\"]) {\n throw error;\n }\n }\n return messageList;\n }\n\n /**\n * Renews the lock on the message. The lock will be renewed based on the setting specified on\n * the queue.\n *\n * When a message is received in `PeekLock` mode, the message is locked on the server for this\n * receiver instance for a duration as specified during the Queue/Subscription creation\n * (LockDuration). If processing of the message requires longer than this duration, the\n * lock needs to be renewed. For each renewal, it resets the time the message is locked by the\n * LockDuration set on the Entity.\n *\n * @param lockToken - Lock token of the message\n * @param options - Options that can be set while sending the request.\n * @returns New lock token expiry date and time in UTC format.\n */\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n async renewLock(lockToken: string, options?: SendManagementRequestOptions): Promise<Date> {\n throwErrorIfConnectionClosed(this._context);\n if (!options) options = {};\n if (options.timeoutInMs == null) options.timeoutInMs = 5000;\n\n try {\n const messageBody: any = {};\n\n messageBody[Constants.lockTokens] = types.wrap_array(\n [string_to_uuid(lockToken)],\n 0x98,\n undefined,\n );\n const updatedOptions = await this.initWithUniqueReplyTo(options);\n const request: RheaMessage = {\n body: messageBody,\n reply_to: this.replyTo,\n application_properties: {\n operation: Constants.operations.renewLock,\n },\n };\n request.application_properties![Constants.trackingId] = generate_uuid();\n if (updatedOptions.associatedLinkName) {\n request.application_properties![Constants.associatedLinkName] =\n updatedOptions.associatedLinkName;\n }\n receiverLogger.verbose(\n \"[%s] Renew message Lock request: %O.\",\n this._context.connectionId,\n request,\n );\n const result = await this._makeManagementRequest(request, receiverLogger, {\n abortSignal: updatedOptions?.abortSignal,\n requestName: \"renewLock\",\n });\n const lockedUntilUtc = new Date(result.body.expirations[0]);\n return lockedUntilUtc;\n } catch (err: any) {\n const error = translateServiceBusError(err);\n receiverLogger.logError(\n error,\n `${this.logPrefix} An error occurred while sending the renew lock request to $management endpoint`,\n );\n throw error;\n }\n }\n\n /**\n * Schedules an array of messages to appear on Service Bus at a later time.\n *\n * @param scheduledEnqueueTimeUtc - The UTC time at which the messages should be enqueued.\n * @param messages - An array of messages that needs to be scheduled.\n * @returns The sequence numbers of messages that were scheduled.\n */\n async scheduleMessages(\n scheduledEnqueueTimeUtc: Date,\n messages: ServiceBusMessage[] | AmqpAnnotatedMessage[],\n options?: OperationOptionsBase & SendManagementRequestOptions,\n ): Promise<Long[]> {\n throwErrorIfConnectionClosed(this._context);\n if (!messages.length) {\n return [];\n }\n const messageBody: any[] = [];\n for (let i = 0; i < messages.length; i++) {\n const item = messages[i];\n\n try {\n const rheaMessage = toRheaMessage(item, defaultDataTransformer);\n updateMessageId(rheaMessage, rheaMessage.message_id || generate_uuid());\n updateScheduledTime(rheaMessage, scheduledEnqueueTimeUtc);\n\n const entry: {\n message: Buffer;\n [\"message-id\"]: ServiceBusMessage[\"messageId\"];\n [\"partition-key\"]?: ServiceBusMessage[\"partitionKey\"];\n [Constants.sessionIdMapKey]?: string | undefined;\n } = {\n message: RheaMessageUtil.encode(rheaMessage),\n \"message-id\": rheaMessage.message_id,\n };\n\n if (rheaMessage.group_id) {\n entry[Constants.sessionIdMapKey] = rheaMessage.group_id;\n }\n\n if (rheaMessage.message_annotations?.[Constants.partitionKey]) {\n entry[\"partition-key\"] = rheaMessage.message_annotations[Constants.partitionKey];\n }\n\n // Will be required later for implementing Transactions\n // if (item.viaPartitionKey) {\n // entry[\"via-partition-key\"] = item.viaPartitionKey;\n // }\n\n const wrappedEntry = types.wrap_map(entry);\n messageBody.push(wrappedEntry);\n } catch (err: any) {\n const error = translateServiceBusError(err);\n senderLogger.logError(\n error,\n `${this.logPrefix} An error occurred while encoding the item at position ${i} in the messages array`,\n );\n throw error;\n }\n }\n const updatedOptions = await this.initWithUniqueReplyTo(options);\n try {\n const request: RheaMessage = {\n body: { messages: messageBody },\n reply_to: this.replyTo,\n application_properties: {\n operation: Constants.operations.scheduleMessage,\n },\n };\n if (updatedOptions?.associatedLinkName) {\n request.application_properties![Constants.associatedLinkName] =\n updatedOptions?.associatedLinkName;\n }\n request.application_properties![Constants.trackingId] = generate_uuid();\n senderLogger.verbose(\"%s Schedule messages request body: %O.\", this.logPrefix, request.body);\n const result = await this._makeManagementRequest(request, senderLogger, updatedOptions);\n const sequenceNumbers = result.body[Constants.sequenceNumbers];\n const sequenceNumbersAsLong = [];\n for (let i = 0; i < sequenceNumbers.length; i++) {\n if (typeof sequenceNumbers[i] === \"number\") {\n sequenceNumbersAsLong.push(Long.fromNumber(sequenceNumbers[i]));\n } else {\n sequenceNumbersAsLong.push(Long.fromBytesBE(sequenceNumbers[i]));\n }\n }\n return sequenceNumbersAsLong;\n } catch (err: any) {\n const error = translateServiceBusError(err);\n senderLogger.logError(\n error,\n `${this.logPrefix} An error occurred while sending the request to schedule messages to $management endpoint`,\n );\n throw error;\n }\n }\n\n /**\n * Cancels an array of messages that were scheduled.\n * @param sequenceNumbers - An Array of sequence numbers of the message to be cancelled.\n */\n async cancelScheduledMessages(\n sequenceNumbers: Long[],\n options?: OperationOptionsBase & SendManagementRequestOptions,\n ): Promise<void> {\n throwErrorIfConnectionClosed(this._context);\n if (!sequenceNumbers.length) {\n return;\n }\n const messageBody: any = {};\n messageBody[Constants.sequenceNumbers] = [];\n for (let i = 0; i < sequenceNumbers.length; i++) {\n const sequenceNumber = sequenceNumbers[i];\n try {\n messageBody[Constants.sequenceNumbers].push(Buffer.from(sequenceNumber.toBytesBE()));\n } catch (err: any) {\n const error = translateServiceBusError(err);\n senderLogger.logError(\n error,\n `${this.logPrefix} An error occurred while encoding the item at position ${i} in the sequenceNumbers array`,\n );\n throw error;\n }\n }\n\n try {\n messageBody[Constants.sequenceNumbers] = types.wrap_array(\n messageBody[Constants.sequenceNumbers],\n 0x81,\n undefined,\n );\n const updatedOptions = await this.initWithUniqueReplyTo(options);\n const request: RheaMessage = {\n body: messageBody,\n reply_to: this.replyTo,\n application_properties: {\n operation: Constants.operations.cancelScheduledMessage,\n },\n };\n\n if (updatedOptions?.associatedLinkName) {\n request.application_properties![Constants.associatedLinkName] =\n updatedOptions?.associatedLinkName;\n }\n request.application_properties![Constants.trackingId] = generate_uuid();\n senderLogger.verbose(\n \"%s Cancel scheduled messages request body: %O.\",\n this.logPrefix,\n request.body,\n );\n\n await this._makeManagementRequest(request, senderLogger, updatedOptions);\n return;\n } catch (err: any) {\n const error = translateServiceBusError(err);\n senderLogger.logError(\n error,\n `${this.logPrefix} An error occurred while sending the request to cancel the scheduled message to $management endpoint`,\n );\n throw error;\n }\n }\n\n /**\n * Receives a list of deferred messages identified by `sequenceNumbers`.\n *\n * @param sequenceNumbers - A list containing the sequence numbers to receive.\n * @param receiveMode - The mode in which the receiver was created.\n * @returns a list of messages identified by the given sequenceNumbers or an empty list if no messages are found.\n * - Throws an error if the messages have not been deferred.\n */\n async receiveDeferredMessages(\n sequenceNumbers: Long[],\n receiveMode: ReceiveMode,\n sessionId?: string,\n options?: OperationOptionsBase & SendManagementRequestOptions,\n ): Promise<ServiceBusMessageImpl[]> {\n throwErrorIfConnectionClosed(this._context);\n\n if (!sequenceNumbers.length) {\n return [];\n }\n\n const messageList: ServiceBusMessageImpl[] = [];\n const messageBody: any = {};\n messageBody[Constants.sequenceNumbers] = [];\n for (let i = 0; i < sequenceNumbers.length; i++) {\n const sequenceNumber = sequenceNumbers[i];\n try {\n messageBody[Constants.sequenceNumbers].push(Buffer.from(sequenceNumber.toBytesBE()));\n } catch (err: any) {\n const error = translateServiceBusError(err);\n receiverLogger.logError(\n error,\n `${this.logPrefix} An error occurred while encoding the item at position ${i} in the sequenceNumbers array`,\n );\n throw error;\n }\n }\n\n try {\n messageBody[Constants.sequenceNumbers] = types.wrap_array(\n messageBody[Constants.sequenceNumbers],\n 0x81,\n undefined,\n );\n const receiverSettleMode: number = receiveMode === \"receiveAndDelete\" ? 0 : 1;\n messageBody[Constants.receiverSettleMode] = types.wrap_uint(receiverSettleMode);\n if (sessionId != null) {\n messageBody[Constants.sessionIdMapKey] = sessionId;\n }\n const updatedOptions = await this.initWithUniqueReplyTo(options);\n const request: RheaMessage = {\n body: messageBody,\n reply_to: this.replyTo,\n application_properties: {\n operation: Constants.operations.receiveBySequenceNumber,\n },\n };\n if (updatedOptions?.associatedLinkName) {\n request.application_properties![Constants.associatedLinkName] =\n updatedOptions?.associatedLinkName;\n }\n request.application_properties![Constants.trackingId] = generate_uuid();\n receiverLogger.verbose(\n \"%s Receive deferred messages request body: %O.\",\n this.logPrefix,\n request.body,\n );\n\n const result = await this._makeManagementRequest(request, receiverLogger, updatedOptions);\n const messages = result.body.messages as {\n message: Buffer;\n \"lock-token\": Buffer;\n }[];\n for (const msg of messages) {\n const decodedMessage = RheaMessageUtil.decode(msg.message);\n const message = new ServiceBusMessageImpl(\n decodedMessage as any,\n { tag: msg[\"lock-token\"] } as any,\n false,\n receiveMode,\n updatedOptions?.skipParsingBodyAsJson ?? false,\n false,\n );\n messageList.push(message);\n }\n return messageList;\n } catch (err: any) {\n const error = translateServiceBusError(err);\n receiverLogger.logError(\n error,\n `${this.logPrefix} An error occurred while sending the request to receive deferred messages to $management endpoint`,\n );\n throw error;\n }\n }\n\n private async _deleteMessages(\n messageCount: number,\n enqueueTimeUtcOlderThan: Date,\n sessionId?: string,\n options?: OperationOptionsBase & SendManagementRequestOptions,\n ): Promise<number> {\n try {\n const messageBody: any = {};\n messageBody[Constants.messageCount] = types.wrap_int(messageCount);\n messageBody[Constants.enqueuedTimeUtc] = enqueueTimeUtcOlderThan;\n if (isDefined(sessionId)) {\n messageBody[Constants.sessionIdMapKey] = sessionId;\n }\n\n const updatedOptions = await this.initWithUniqueReplyTo(options);\n const request: RheaMessage = {\n body: messageBody,\n reply_to: this.replyTo,\n application_properties: {\n operation: Constants.operations.deleteMessages,\n },\n };\n if (updatedOptions?.associatedLinkName) {\n request.application_properties![Constants.associatedLinkName] =\n updatedOptions?.associatedLinkName;\n }\n request.application_properties![Constants.trackingId] = generate_uuid();\n receiverLogger.verbose(\"%s delete messages request body: %O.\", this.logPrefix, request.body);\n\n const result = await this._makeManagementRequest(request, receiverLogger, updatedOptions);\n if (result.application_properties!.statusCode === 200) {\n return result.body[\"message-count\"];\n } else if (\n result.application_properties!.statusCode === 204 &&\n result.application_properties!.errorCondition === \"com.microsoft:message-not-found\"\n ) {\n return 0;\n } else {\n throw new Error(\n `Unexpected response with status code of ${result.application_properties!.statusCode}`,\n );\n }\n } catch (err: any) {\n const error = translateServiceBusError(err) as MessagingError;\n receiverLogger.logError(\n error,\n `${this.logPrefix} An error occurred while sending the request to delete messages to $management endpoint`,\n );\n throw error;\n }\n }\n\n /**\n * Delete messages. If no option is specified, all messages will be deleted.\n *\n * @param messageCount - number of messages to delete in a batch.\n * @param enqueueTimeUtcOlderThan - Delete messages whose enqueue time (UTC) are older than this.\n * @returns number of messages deleted.\n */\n async deleteMessages(\n messageCount: number,\n enqueueTimeUtcOlderThan?: Date,\n sessionId?: string,\n options: OperationOptionsBase & SendManagementRequestOptions = {},\n ): Promise<number> {\n throwTypeErrorIfParameterMissing(this._context.connectionId, \"messageCount\", messageCount);\n throwTypeErrorIfParameterTypeMismatch(\n this._context.connectionId,\n \"messageCount\",\n messageCount,\n \"number\",\n );\n\n if (isNaN(messageCount) || messageCount < 1) {\n throw new TypeError(\"'messageCount' must be a number greater than 0.\");\n }\n\n enqueueTimeUtcOlderThan ??= new Date();\n\n return this._deleteMessages(messageCount, enqueueTimeUtcOlderThan, sessionId, options);\n }\n\n /**\n * Updates the disposition status of deferred messages.\n *\n * @param lockTokens - Message lock tokens to update disposition status.\n * @param dispositionStatus - The disposition status to be set\n * @param options - Optional parameters that can be provided while updating the disposition status.\n */\n async updateDispositionStatus(\n lockToken: string,\n dispositionType: DispositionType,\n // TODO: mgmt link retry<> will come in the next PR.\n options?: Omit<DispositionStatusOptions, \"retryOptions\"> & SendManagementRequestOptions,\n ): Promise<void> {\n throwErrorIfConnectionClosed(this._context);\n if (!options) options = {};\n try {\n let dispositionStatus: \"completed\" | \"defered\" | \"suspended\" | \"abandoned\";\n\n if (dispositionType === DispositionType.abandon) dispositionStatus = \"abandoned\";\n else if (dispositionType === DispositionType.complete) dispositionStatus = \"completed\";\n else if (dispositionType === DispositionType.defer) dispositionStatus = \"defered\";\n else if (dispositionType === DispositionType.deadletter) dispositionStatus = \"suspended\";\n else throw new Error(`Provided \"dispositionType\" - ${dispositionType} is invalid`);\n\n const messageBody: any = {};\n const lockTokenBuffer: Buffer[] = [];\n lockTokenBuffer.push(string_to_uuid(lockToken));\n messageBody[Constants.lockTokens] = types.wrap_array(lockTokenBuffer, 0x98, undefined);\n messageBody[Constants.dispositionStatus] = dispositionStatus;\n if (options.deadLetterDescription != null) {\n messageBody[Constants.deadLetterDescription] = options.deadLetterDescription;\n }\n if (options.deadLetterReason != null) {\n messageBody[Constants.deadLetterReason] = options.deadLetterReason;\n }\n if (options.propertiesToModify != null) {\n messageBody[Constants.propertiesToModify] = options.propertiesToModify;\n }\n if (options.sessionId != null) {\n messageBody[Constants.sessionIdMapKey] = options.sessionId;\n }\n const updatedOptions = await this.initWithUniqueReplyTo(options);\n const request: RheaMessage = {\n body: messageBody,\n reply_to: this.replyTo,\n application_properties: {\n operation: Constants.operations.updateDisposition,\n },\n };\n if (updatedOptions.associatedLinkName) {\n request.application_properties![Constants.associatedLinkName] =\n updatedOptions.associatedLinkName;\n }\n request.application_properties![Constants.trackingId] = generate_uuid();\n receiverLogger.verbose(\n \"%s Update disposition status request body: %O.\",\n this.logPrefix,\n request.body,\n );\n await this._makeManagementRequest(request, receiverLogger, updatedOptions);\n } catch (err: any) {\n const error = translateServiceBusError(err);\n receiverLogger.logError(\n error,\n `${this.logPrefix} An error occurred while sending the request to update disposition status to $management endpoint`,\n );\n throw error;\n }\n }\n\n /**\n * Renews the lock for the specified session.\n *\n * @param sessionId - Id of the session for which the lock needs to be renewed\n * @param options - Options that can be set while sending the request.\n * @returns New lock token expiry date and time in UTC format.\n */\n async renewSessionLock(\n sessionId: string,\n options?: OperationOptionsBase & SendManagementRequestOptions,\n ): Promise<Date> {\n throwErrorIfConnectionClosed(this._context);\n try {\n const messageBody: any = {};\n messageBody[Constants.sessionIdMapKey] = sessionId;\n const updatedOptions = await this.initWithUniqueReplyTo(options);\n const request: RheaMessage = {\n body: messageBody,\n reply_to: this.replyTo,\n application_properties: {\n operation: Constants.operations.renewSessionLock,\n },\n };\n request.application_properties![Constants.trackingId] = generate_uuid();\n if (updatedOptions?.associatedLinkName) {\n request.application_properties![Constants.associatedLinkName] =\n updatedOptions?.associatedLinkName;\n }\n receiverLogger.verbose(\n \"%s Renew Session Lock request body: %O.\",\n this.logPrefix,\n request.body,\n );\n const result = await this._makeManagementRequest(request, receiverLogger, updatedOptions);\n const lockedUntilUtc = new Date(result.body.expiration);\n receiverLogger.verbose(\n \"%s Lock for session '%s' will expire at %s.\",\n this.logPrefix,\n sessionId,\n lockedUntilUtc.toString(),\n );\n return lockedUntilUtc;\n } catch (err: any) {\n const error = translateServiceBusError(err);\n receiverLogger.logError(\n error,\n `${this.logPrefix} An error occurred while sending the renew lock request to $management endpoint`,\n );\n throw error;\n }\n }\n\n /**\n * Sets the state of the specified session.\n *\n * @param sessionId - The session for which the state needs to be set\n * @param state - The state that needs to be set.\n */\n async setSessionState(\n sessionId: string,\n state: unknown,\n options?: OperationOptionsBase & SendManagementRequestOptions,\n ): Promise<void> {\n throwErrorIfConnectionClosed(this._context);\n\n try {\n const messageBody: any = {};\n messageBody[Constants.sessionIdMapKey] = sessionId;\n messageBody[\"session-state\"] = toBuffer(state);\n const updatedOptions = await this.initWithUniqueReplyTo(options);\n const request: RheaMessage = {\n body: messageBody,\n reply_to: this.replyTo,\n application_properties: {\n operation: Constants.operations.setSessionState,\n },\n };\n if (updatedOptions?.associatedLinkName) {\n request.application_properties![Constants.associatedLinkName] =\n updatedOptions?.associatedLinkName;\n }\n request.application_properties![Constants.trackingId] = generate_uuid();\n receiverLogger.verbose(\n \"%s Set Session state request body: %O.\",\n this.logPrefix,\n request.body,\n );\n await this._makeManagementRequest(request, receiverLogger, updatedOptions);\n } catch (err: any) {\n const error = translateServiceBusError(err);\n receiverLogger.logError(\n error,\n `${this.logPrefix} An error occurred while sending the renew lock request to $management endpoint`,\n );\n throw error;\n }\n }\n\n /**\n * Gets the state of the specified session.\n *\n * @param sessionId - The session for which the state needs to be retrieved.\n * @returns The state of that session\n */\n async getSessionState(\n sessionId: string,\n options?: OperationOptionsBase & SendManagementRequestOptions,\n ): Promise<any> {\n throwErrorIfConnectionClosed(this._context);\n try {\n const messageBody: any = {};\n messageBody[Constants.sessionIdMapKey] = sessionId;\n const updatedOptions = await this.initWithUniqueReplyTo(options);\n const request: RheaMessage = {\n body: messageBody,\n reply_to: this.replyTo,\n application_properties: {\n operation: Constants.operations.getSessionState,\n },\n };\n if (updatedOptions?.associatedLinkName) {\n request.application_properties![Constants.associatedLinkName] =\n updatedOptions?.associatedLinkName;\n }\n request.application_properties![Constants.trackingId] = generate_uuid();\n receiverLogger.verbose(\n \"%s Get session state request body: %O.\",\n this.logPrefix,\n request.body,\n );\n const result = await this._makeManagementRequest(request, receiverLogger, updatedOptions);\n return result.body[\"session-state\"]\n ? tryToJsonDecode(result.body[\"session-state\"])\n : result.body[\"session-state\"];\n } catch (err: any) {\n const error = translateServiceBusError(err);\n receiverLogger.logError(\n error,\n `${this.logPrefix} An error occurred while sending the renew lock request to $management endpoint`,\n );\n throw error;\n }\n }\n\n /**\n * Lists the sessions on the ServiceBus Queue/Topic.\n * @param lastUpdateTime - Filter to include only sessions updated after a given time.\n * @param skip - The number of sessions to skip\n * @param top - Maximum numer of sessions.\n * @returns A list of session ids.\n */\n async listMessageSessions(\n skip: number,\n top: number,\n lastUpdatedTime?: Date,\n options?: OperationOptionsBase & SendManagementRequestOptions,\n ): Promise<string[]> {\n throwErrorIfConnectionClosed(this._context);\n const defaultLastUpdatedTimeForListingSessions: number = 259200000; // 3 * 24 * 3600 * 1000\n if (typeof skip !== \"number\") {\n throw new Error(\"'skip' is a required parameter and must be of type 'number'.\");\n }\n if (typeof top !== \"number\") {\n throw new Error(\"'top' is a required parameter and must be of type 'number'.\");\n }\n if (lastUpdatedTime && !(lastUpdatedTime instanceof Date)) {\n throw new Error(\"'lastUpdatedTime' must be of type 'Date'.\");\n }\n if (!lastUpdatedTime) {\n lastUpdatedTime = new Date(Date.now() - defaultLastUpdatedTimeForListingSessions);\n }\n try {\n const messageBody: any = {};\n messageBody[\"last-updated-time\"] = lastUpdatedTime;\n messageBody[\"skip\"] = types.wrap_int(skip);\n messageBody[\"top\"] = types.wrap_int(top);\n const updatedOptions = await this.initWithUniqueReplyTo(options);\n const request: RheaMessage = {\n body: messageBody,\n reply_to: this.replyTo,\n application_properties: {\n operation: Constants.operations.enumerateSessions,\n },\n };\n request.application_properties![Constants.trackingId] = generate_uuid();\n managementClientLogger.verbose(\n \"%s List sessions request body: %O.\",\n this.logPrefix,\n request.body,\n );\n const response = await this._makeManagementRequest(\n request,\n managementClientLogger,\n updatedOptions,\n );\n\n return (response && response.body && response.body[\"sessions-ids\"]) || [];\n } catch (err: any) {\n const error = translateServiceBusError(err);\n managementClientLogger.logError(\n error,\n `${this.logPrefix} An error occurred while sending the renew lock request to $management endpoint`,\n );\n throw error;\n }\n }\n\n /**\n * Get all the rules on the Subscription.\n * @returns A list of rules.\n */\n async getRules(\n options?: ListRequestOptions & OperationOptionsBase & SendManagementRequestOptions,\n ): Promise<RuleProperties[]> {\n throwErrorIfConnectionClosed(this._context);\n try {\n const updatedOptions = (await this.initWithUniqueReplyTo(options)) as ListRequestOptions &\n OperationOptionsBase &\n SendManagementRequestOptions;\n const request: RheaMessage = {\n body: {\n top: updatedOptions?.maxCount\n ? types.wrap_int(updatedOptions.maxCount)\n : types.wrap_int(max32BitNumber),\n skip: updatedOptions?.skip ? types.wrap_int(updatedOptions.skip) : types.wrap_int(0),\n },\n reply_to: this.replyTo,\n application_properties: {\n operation: Constants.operations.enumerateRules,\n },\n };\n request.application_properties![Constants.trackingId] = generate_uuid();\n\n managementClientLogger.verbose(\n \"%s Get rules request body: %O.\",\n this.logPrefix,\n request.body,\n );\n const response = await this._makeManagementRequest(\n request,\n managementClientLogger,\n updatedOptions,\n );\n if (\n response.application_properties!.statusCode === 204 ||\n !response.body ||\n !Array.isArray(response.body.rules)\n ) {\n return [];\n }\n\n // Reference: https://learn.microsoft.com/azure/service-bus-messaging/service-bus-amqp-request-response#response-11\n const result: { \"rule-description\": Typed }[] = response.body.rules || [];\n const rules: RuleProperties[] = [];\n result.forEach((x) => {\n const ruleDescriptor = x[\"rule-description\"];\n let filter: SqlRuleFilter | CorrelationRuleFilter;\n\n // We use the first three elements of the `ruleDescriptor.value` to get filter, action, name\n if (\n !ruleDescriptor ||\n !ruleDescriptor.descriptor ||\n ruleDescriptor.descriptor.value !== Constants.descriptorCodes.ruleDescriptionList ||\n !Array.isArray(ruleDescriptor.value) ||\n ruleDescriptor.value.length < 3\n ) {\n return;\n }\n\n const filtersRawData: Typed = ruleDescriptor.value[0];\n const actionsRawData: Typed = ruleDescriptor.value[1];\n let sqlRuleAction: SqlRuleAction;\n if (\n actionsRawData.descriptor.value === Constants.descriptorCodes.sqlRuleActionList &&\n Array.isArray(actionsRawData.value) &&\n actionsRawData.value.length\n ) {\n sqlRuleAction = {\n sqlExpression: this._safelyGetTypedValueFromArray(actionsRawData.value, 0),\n };\n } else {\n sqlRuleAction = {};\n }\n\n switch (filtersRawData.descriptor.value) {\n case Constants.descriptorCodes.trueFilterList:\n filter = {\n sqlExpression: \"1=1\",\n };\n break;\n case Constants.descriptorCodes.falseFilterList:\n filter = {\n sqlExpression: \"1=0\",\n };\n break;\n case Constants.descriptorCodes.sqlFilterList:\n filter = {\n sqlExpression: this._safelyGetTypedValueFromArray(filtersRawData.value, 0),\n };\n break;\n case Constants.descriptorCodes.correlationFilterList:\n filter = {\n correlationId: this._safelyGetTypedValueFromArray(filtersRawData.value, 0),\n messageId: this._safelyGetTypedValueFromArray(filtersRawData.value, 1),\n to: this._safelyGetTypedValueFromArray(filtersRawData.value, 2),\n replyTo: this._safelyGetTypedValueFromArray(filtersRawData.value, 3),\n subject: this._safelyGetTypedValueFromArray(filtersRawData.value, 4),\n sessionId: this._safelyGetTypedValueFromArray(filtersRawData.value, 5),\n replyToSessionId: this._safelyGetTypedValueFromArray(filtersRawData.value, 6),\n contentType: this._safelyGetTypedValueFromArray(filtersRawData.value, 7),\n applicationProperties:\n Array.isArray(filtersRawData.value) &&\n filtersRawData.value.length > 8 &&\n filtersRawData.value[8]\n ? this._decodeApplicationPropertiesMap(filtersRawData.value[8])\n : undefined,\n };\n break;\n default:\n throw new Error(\n `${this.logPrefix} Found unexpected descriptor code for the filter: ${filtersRawData.descriptor.value}`,\n );\n }\n\n const rule: RuleProperties = {\n name: ruleDescriptor.value[2].value,\n filter,\n action: sqlRuleAction,\n };\n rules.push(rule);\n });\n\n return rules;\n } catch (err: any) {\n const error = translateServiceBusError(err);\n managementClientLogger.logError(\n error,\n `${this.logPrefix} An error occurred while sending the get rules request to $management endpoint`,\n );\n throw error;\n }\n }\n\n /**\n * Removes the rule on the Subscription identified by the given rule name.\n */\n async removeRule(\n ruleName: string,\n options?: OperationOptionsBase & SendManagementRequestOptions,\n ): Promise<void> {\n throwErrorIfConnectionClosed(this._context);\n throwTypeErrorIfParameterMissing(this._context.connectionId, \"ruleName\", ruleName);\n ruleName = String(ruleName);\n throwTypeErrorIfParameterIsEmptyString(this._context.connectionId, \"ruleName\", ruleName);\n\n try {\n const updatedOptions = await this.initWithUniqueReplyTo(options);\n const request: RheaMessage = {\n body: {\n \"rule-name\": types.wrap_string(ruleName),\n },\n reply_to: this.replyTo,\n application_properties: {\n operation: Constants.operations.removeRule,\n },\n };\n request.application_properties![Constants.trackingId] = generate_uuid();\n\n managementClientLogger.verbose(\n \"%s Remove Rule request body: %O.\",\n this.logPrefix,\n request.body,\n );\n await this._makeManagementRequest(request, managementClientLogger, updatedOptions);\n } catch (err: any) {\n const error = translateServiceBusError(err);\n managementClientLogger.logError(\n error,\n `${this.logPrefix} An error occurred while sending the remove rule request to $management endpoint`,\n );\n throw error;\n }\n }\n\n /**\n * Adds a rule on the subscription as defined by the given rule name, filter and action\n * @param ruleName - Name of the rule\n * @param filter - A Boolean, SQL expression or a Correlation filter\n * @param sqlRuleActionExpression - Action to perform if the message satisfies the filtering expression\n */\n async addRule(\n ruleName: string,\n filter: SqlRuleFilter | CorrelationRuleFilter,\n sqlRuleActionExpression?: string,\n options?: OperationOptionsBase & SendManagementRequestOptions,\n ): Promise<void> {\n throwErrorIfConnectionClosed(this._context);\n\n throwTypeErrorIfParameterMissing(this._context.connectionId, \"ruleName\", ruleName);\n ruleName = String(ruleName);\n throwTypeErrorIfParameterIsEmptyString(this._context.connectionId, \"ruleName\", ruleName);\n\n throwTypeErrorIfParameterMissing(this._context.connectionId, \"filter\", filter);\n if (!isSqlRuleFilter(filter) && !isCorrelationRuleFilter(filter)) {\n throw new TypeError(\n `The parameter \"filter\" should implement either the SqlRuleFilter or the CorrelationRuleFilter interface.`,\n );\n }\n\n try {\n const ruleDescription: any = {};\n if (isSqlRuleFilter(filter)) {\n ruleDescription[\"sql-filter\"] = {\n expression: filter.sqlExpression,\n };\n } else {\n ruleDescription[\"correlation-filter\"] = {\n \"correlation-id\": filter.correlationId,\n \"message-id\": filter.messageId,\n to: filter.to,\n \"reply-to\": filter.replyTo,\n label: filter.subject,\n \"session-id\": filter.sessionId,\n \"reply-to-session-id\": filter.replyToSessionId,\n \"content-type\": filter.contentType,\n properties: filter.applicationProperties,\n };\n }\n\n if (sqlRuleActionExpression !== undefined) {\n ruleDescription[\"sql-rule-action\"] = {\n expression: String(sqlRuleActionExpression),\n };\n }\n const updatedOptions = await this.initWithUniqueReplyTo(options);\n const request: RheaMessage = {\n body: {\n \"rule-name\": types.wrap_string(ruleName),\n \"rule-description\": types.wrap_map(ruleDescription),\n },\n reply_to: this.replyTo,\n application_properties: {\n operation: Constants.operations.addRule,\n },\n };\n request.application_properties![Constants.trackingId] = generate_uuid();\n\n managementClientLogger.verbose(\"%s Add Rule request body: %O.\", this.logPrefix, request.body);\n await this._makeManagementRequest(request, managementClientLogger, updatedOptions);\n } catch (err: any) {\n const error = translateServiceBusError(err);\n managementClientLogger.logError(\n error,\n `${this.logPrefix} An error occurred while sending the Add rule request to $management endpoint`,\n );\n throw error;\n }\n }\n\n protected removeLinkFromContext(): void {\n delete this._context.managementClients[this.name];\n }\n}\n\n/**\n * Converts an AmqpAnnotatedMessage or ServiceBusMessage into a properly formatted\n * message for sending to the mgmt link for scheduling.\n *\n * @internal\n * @hidden\n */\nexport function toScheduleableMessage(\n item: ServiceBusMessage | AmqpAnnotatedMessage,\n scheduledEnqueueTimeUtc: Date,\n): Record<string, unknown> {\n const rheaMessage = toRheaMessage(item, defaultDataTransformer);\n updateMessageId(rheaMessage, rheaMessage.message_id || generate_uuid());\n updateScheduledTime(rheaMessage, scheduledEnqueueTimeUtc);\n\n const entry: Record<string, unknown> = {\n message: RheaMessageUtil.encode(rheaMessage),\n \"message-id\": rheaMessage.message_id,\n };\n\n rheaMessage.message_annotations = {\n ...rheaMessage.message_annotations,\n [Constants.scheduledEnqueueTime]: scheduledEnqueueTimeUtc,\n };\n\n if (rheaMessage.group_id) {\n entry[Constants.sessionIdMapKey] = rheaMessage.group_id;\n }\n\n const partitionKey =\n rheaMessage.message_annotations && rheaMessage.message_annotations[Constants.partitionKey];\n\n if (partitionKey) {\n entry[\"partition-key\"] = partitionKey;\n }\n return entry;\n}\n"]}
@@ -71,7 +71,7 @@ export interface MessageHandlers {
71
71
  * Note that when receiving messages in a stream using `subscribe()`, the receiver will automatically retry receiving messages on all errors unless
72
72
  * `close()` is called on the subscription. It is completely up to users to decide what errors are considered non-recoverable and to handle them
73
73
  * accordingly in this callback.
74
- * For a list of errors occurs within Service Bus, please refer to https://docs.microsoft.com/javascript/api/\@azure/service-bus/servicebuserror?view=azure-node-latest
74
+ * For a list of errors occurs within Service Bus, please refer to https://learn.microsoft.com/javascript/api/\@azure/service-bus/servicebuserror?view=azure-node-latest
75
75
  * @param args - The error and additional context to indicate where
76
76
  * the error originated.
77
77
  */
@@ -122,14 +122,14 @@ export interface ServiceBusReceiverOptions {
122
122
  * the message.
123
123
  *
124
124
  * More information about how peekLock and message settlement works here:
125
- * https://docs.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock
125
+ * https://learn.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock
126
126
  *
127
127
  */
128
128
  receiveMode?: "peekLock" | "receiveAndDelete";
129
129
  /**
130
130
  * Represents the sub queue that is applicable for any queue or subscription.
131
131
  * Valid values are "deadLetter" and "transferDeadLetter". To learn more about dead letter queues,
132
- * see https://docs.microsoft.com/azure/service-bus-messaging/service-bus-dead-letter-queues
132
+ * see https://learn.microsoft.com/azure/service-bus-messaging/service-bus-dead-letter-queues
133
133
  */
134
134
  subQueueType?: "deadLetter" | "transferDeadLetter";
135
135
  /**
@@ -257,7 +257,7 @@ export interface ServiceBusSessionReceiverOptions extends OperationOptionsBase {
257
257
  * the message.
258
258
  *
259
259
  * More information about how peekLock and message settlement works here:
260
- * https://docs.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock
260
+ * https://learn.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock
261
261
  *
262
262
  */
263
263
  receiveMode?: "peekLock" | "receiveAndDelete";
@@ -1 +1 @@
1
- {"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { OperationOptionsBase } from \"./modelsToBeSharedWithEventHubs.js\";\nimport type Long from \"long\";\nimport type { ServiceBusReceivedMessage } from \"./serviceBusMessage.js\";\nimport type { ServiceBusError } from \"./serviceBusError.js\";\n\n/**\n * Arguments to the `processError` callback.\n */\nexport interface ProcessErrorArgs {\n /**\n * The error.\n */\n error: Error | ServiceBusError;\n /**\n * The operation where the error originated.\n *\n * 'abandon': Errors that occur when if `abandon` is triggered automatically.\n * 'complete': Errors that occur when autoComplete completes a message.\n * 'processMessageCallback': Errors thrown from the user's `processMessage` callback passed to `subscribe`.\n * 'receive': Errors thrown when receiving messages.\n * 'renewLock': Errors thrown when automatic lock renewal fails.\n */\n errorSource: \"abandon\" | \"complete\" | \"processMessageCallback\" | \"receive\" | \"renewLock\";\n /**\n * The entity path for the current receiver.\n */\n entityPath: string;\n /**\n * The fully qualified namespace for the Service Bus.\n */\n fullyQualifiedNamespace: string;\n /**\n * The identifier of the client that raised this event.\n */\n identifier: string;\n}\n\n/**\n * @internal\n */\nexport interface InternalProcessErrorArgs extends Omit<ProcessErrorArgs, \"errorSource\"> {\n /**\n * The operation where the error originated.\n *\n * 'abandon': Errors that occur when if `abandon` is triggered automatically.\n * 'complete': Errors that occur when autoComplete completes a message.\n * 'processMessageCallback': Errors thrown from the user's `processMessage` callback passed to `subscribe`.\n * 'receive': Errors thrown when receiving messages.\n * 'renewLock': Errors thrown when automatic lock renewal fails.\n */\n errorSource: ProcessErrorArgs[\"errorSource\"] | \"internal\";\n}\n\n/**\n * The general message handler interface (used for streamMessages).\n */\nexport interface MessageHandlers {\n /**\n * Handler that processes messages from service bus.\n *\n * @param message - A message received from Service Bus.\n */\n processMessage(message: ServiceBusReceivedMessage): Promise<void>;\n /**\n * Handler that processes errors that occur during receiving.\n *\n * This handler will be called for any error that occurs in the receiver when\n * - receiving the message, or\n * - executing your `processMessage` callback, or\n * - receiver is completing the message on your behalf after successfully running your `processMessage` callback and `autoCompleteMessages` is enabled\n * - receiver is abandoning the message on your behalf if running your `processMessage` callback fails and `autoCompleteMessages` is enabled\n * - receiver is renewing the lock on your behalf due to auto lock renewal feature being enabled\n *\n * Note that when receiving messages in a stream using `subscribe()`, the receiver will automatically retry receiving messages on all errors unless\n * `close()` is called on the subscription. It is completely up to users to decide what errors are considered non-recoverable and to handle them\n * accordingly in this callback.\n * For a list of errors occurs within Service Bus, please refer to https://docs.microsoft.com/javascript/api/\\@azure/service-bus/servicebuserror?view=azure-node-latest\n * @param args - The error and additional context to indicate where\n * the error originated.\n */\n processError(args: ProcessErrorArgs): Promise<void>;\n}\n\n/**\n * @internal\n */\nexport interface InternalMessageHandlers extends MessageHandlers {\n /**\n * Called when the connection is initialized but before we've added credits.\n * NOTE: This handler is completely internal and only used for tests.\n */\n postInitialize?: () => Promise<void>;\n\n /**\n * Called before we actually initialize the link itself.\n * NOTE: This handler is completely internal and only used for tests.\n */\n preInitialize?: () => Promise<void>;\n\n /**\n * Forwards internal errors that are not normally reported to the customer to `processError`.\n * (defaults to false)\n */\n forwardInternalErrors?: boolean;\n}\n\n/**\n * Represents the possible receive modes for the receiver.\n * @internal\n */\nexport type ReceiveMode = \"peekLock\" | \"receiveAndDelete\";\n\n/**\n * Options to use when creating a receiver.\n */\nexport interface ServiceBusReceiverOptions {\n /**\n * Represents the receive mode for the receiver.\n *\n * In receiveAndDelete mode, messages are deleted from Service Bus as they are received.\n *\n * In peekLock mode, the receiver has a lock on the message for the duration specified on the\n * queue/subscription.\n *\n * Messages that are not settled within the lock duration will be redelivered as many times as\n * the max delivery count set on the queue/subscription, after which they get sent to a separate\n * dead letter queue.\n *\n * You can settle a message by calling complete(), abandon(), defer() or deadletter() methods on\n * the message.\n *\n * More information about how peekLock and message settlement works here:\n * https://docs.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock\n *\n */\n receiveMode?: \"peekLock\" | \"receiveAndDelete\";\n /**\n * Represents the sub queue that is applicable for any queue or subscription.\n * Valid values are \"deadLetter\" and \"transferDeadLetter\". To learn more about dead letter queues,\n * see https://docs.microsoft.com/azure/service-bus-messaging/service-bus-dead-letter-queues\n */\n subQueueType?: \"deadLetter\" | \"transferDeadLetter\";\n\n /**\n * The maximum duration, in milliseconds, that the lock on the message will be renewed automatically by the client.\n * This auto renewal stops once the message is settled.\n *\n * - **Default**: `300 * 1000` milliseconds (5 minutes).\n * - **To disable autolock renewal**, set this to `0`.\n *\n * **Example:**\n *\n * If the message lock expires in 2 minutes and your message processing time is 8 minutes...\n *\n * Set maxAutoLockRenewalDurationInMs to 10 minutes, and the message lock will be automatically renewed for 4 times\n * (equivalent to having the message locked for 4 times its lock duration by leveraging the lock renewals).\n */\n maxAutoLockRenewalDurationInMs?: number;\n /**\n * Option to disable the client from running JSON.parse() on the message body when receiving the message.\n * Not applicable if the message was sent with AMQP body type value or sequence. Use this option when you\n * prefer to work directly with the bytes present in the message body than have the client attempt to parse it.\n */\n skipParsingBodyAsJson?: boolean;\n /**\n * Whether to skip converting Date type on properties of message annotations\n * or application properties into numbers when receiving the message. By\n * default, properties of Date type is converted into UNIX epoch number for\n * compatibility.\n */\n skipConvertingDate?: boolean;\n /**\n * Sets the name to identify the receiver. This can be used to correlate logs and exceptions.\n * If not specified or empty, a random unique one will be used.\n */\n identifier?: string;\n}\n\n/**\n * Options to use when creating a sender.\n */\nexport interface ServiceBusSenderOptions {\n /**\n * Sets the name to identify the sender. This can be used to correlate logs and exceptions.\n * If not specified or empty, a random unique one will be used.\n */\n identifier?: string;\n}\n\n/**\n * Options to configure the `createBatch` method on the `Sender`.\n * - `maxSizeInBytes`: The upper limit for the size of batch.\n *\n * Example usage:\n * ```js\n * {\n * maxSizeInBytes: 1024 * 1024 // 1 MB\n * }\n * ```\n */\nexport interface CreateMessageBatchOptions extends OperationOptionsBase {\n /**\n * The upper limit for the size of batch. The `tryAdd` function will return `false` after this limit is reached.\n */\n maxSizeInBytes?: number;\n}\n\n/**\n * Options when receiving a batch of messages from Service Bus.\n */\nexport interface ReceiveMessagesOptions extends OperationOptionsBase {\n /**\n * The maximum amount of time to wait for messages to arrive.\n * **Default**: `60000` milliseconds.\n */\n maxWaitTimeInMs?: number;\n}\n\n/**\n * Options when getting an iterable iterator from Service Bus.\n */\nexport interface GetMessageIteratorOptions extends OperationOptionsBase {}\n\n/**\n * Options used when subscribing to a Service Bus queue or subscription.\n */\nexport interface SubscribeOptions extends OperationOptionsBase {\n /**\n * Indicates whether the message should be settled automatically based on the result from the\n * user provided `processMessage` callback.\n *\n * - If an error is thrown from the `processMessage` callback the message will be abandoned\n * using `receiver.abandonMessage()`. Doing so will make the message available again from the\n * queue/subscription and the delivery count will be incremented.\n * - If NO error is thrown from `processMessage` the message will be completed\n * using `receiver.completeMessage()`. Doing so removes the message from the queue/subscription.\n *\n * This option is ignored if messages are received in the `receiveAndDelete` receive mode or if\n * the message is already settled in the user provided message callback.\n *\n * - **Default**: `true`.\n */\n autoCompleteMessages?: boolean;\n /**\n * The maximum number of concurrent calls that the library\n * can make to the user's message handler. Once this limit has been reached, more messages will\n * not be received until at least one of the calls to the user's message handler has completed.\n * - **Default**: `1`.\n */\n maxConcurrentCalls?: number;\n}\n\n/**\n * Describes the options passed to the `acceptSession` and `acceptNextSession` methods\n * when using a Queue/Subscription that has sessions enabled.\n */\nexport interface ServiceBusSessionReceiverOptions extends OperationOptionsBase {\n /**\n * Represents the receive mode for the receiver.\n *\n * In receiveAndDelete mode, messages are deleted from Service Bus as they are received.\n *\n * In peekLock mode, the receiver has a lock on the message for the duration specified on the\n * queue/subscription.\n *\n * Messages that are not settled within the lock duration will be redelivered as many times as\n * the max delivery count set on the queue/subscription, after which they get sent to a separate\n * dead letter queue.\n *\n * You can settle a message by calling complete(), abandon(), defer() or deadletter() methods on\n * the message.\n *\n * More information about how peekLock and message settlement works here:\n * https://docs.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock\n *\n */\n receiveMode?: \"peekLock\" | \"receiveAndDelete\";\n /**\n * The maximum duration, in milliseconds, that the lock on the session will be renewed automatically by the client.\n *\n * - **Default**: `300000` milliseconds (5 minutes).\n * - **To disable autolock renewal**, set this to `0`.\n *\n * **Example:**\n *\n * If the lock expires in 2 minutes and your processing time is 8 minutes...\n *\n * Set maxAutoLockRenewalDurationInMs to 10 minutes, and the lock will be automatically renewed about 4 times\n * (equivalent to having the session locked for 4 times its lock duration by leveraging the lock renewals).\n */\n maxAutoLockRenewalDurationInMs?: number;\n /**\n * Option to disable the client from running JSON.parse() on the message body when receiving the message.\n * Not applicable if the message was sent with AMQP body type value or sequence. Use this option when you\n * prefer to work directly with the bytes present in the message body than have the client attempt to parse it.\n */\n skipParsingBodyAsJson?: boolean;\n /**\n * Whether to skip converting Date type on properties of message annotations\n * or application properties into numbers when receiving the message. By\n * default, properties of Date type is converted into UNIX epoch number for\n * compatibility.\n */\n skipConvertingDate?: boolean;\n /**\n * Sets the name to identify the session receiver. This can be used to correlate logs and exceptions.\n * If not specified or empty, a random unique one will be used.\n */\n identifier?: string;\n}\n\n/**\n * Describes the options passed to the `peekMessages` method on a receiver.\n */\nexport interface PeekMessagesOptions extends OperationOptionsBase {\n /**\n * The sequence number to start peeking messages from (inclusive).\n */\n fromSequenceNumber?: Long;\n}\n\n/**\n * Options to configure messages deletion.\n */\nexport interface DeleteMessagesOptions extends OperationOptionsBase {\n /**\n * If specified, only messages enqueued before this time are deleted.\n */\n beforeEnqueueTime?: Date;\n /**\n * Up to `maxMessageCount` messages will be deleted.\n */\n maxMessageCount: number;\n}\n\n/**\n * Options to configure deletion of all messages in an entity.\n */\nexport interface PurgeMessagesOptions extends OperationOptionsBase {\n /**\n * If specified, only messages enqueued before this time are deleted.\n */\n beforeEnqueueTime?: Date;\n}\n"]}
1
+ {"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { OperationOptionsBase } from \"./modelsToBeSharedWithEventHubs.js\";\nimport type Long from \"long\";\nimport type { ServiceBusReceivedMessage } from \"./serviceBusMessage.js\";\nimport type { ServiceBusError } from \"./serviceBusError.js\";\n\n/**\n * Arguments to the `processError` callback.\n */\nexport interface ProcessErrorArgs {\n /**\n * The error.\n */\n error: Error | ServiceBusError;\n /**\n * The operation where the error originated.\n *\n * 'abandon': Errors that occur when if `abandon` is triggered automatically.\n * 'complete': Errors that occur when autoComplete completes a message.\n * 'processMessageCallback': Errors thrown from the user's `processMessage` callback passed to `subscribe`.\n * 'receive': Errors thrown when receiving messages.\n * 'renewLock': Errors thrown when automatic lock renewal fails.\n */\n errorSource: \"abandon\" | \"complete\" | \"processMessageCallback\" | \"receive\" | \"renewLock\";\n /**\n * The entity path for the current receiver.\n */\n entityPath: string;\n /**\n * The fully qualified namespace for the Service Bus.\n */\n fullyQualifiedNamespace: string;\n /**\n * The identifier of the client that raised this event.\n */\n identifier: string;\n}\n\n/**\n * @internal\n */\nexport interface InternalProcessErrorArgs extends Omit<ProcessErrorArgs, \"errorSource\"> {\n /**\n * The operation where the error originated.\n *\n * 'abandon': Errors that occur when if `abandon` is triggered automatically.\n * 'complete': Errors that occur when autoComplete completes a message.\n * 'processMessageCallback': Errors thrown from the user's `processMessage` callback passed to `subscribe`.\n * 'receive': Errors thrown when receiving messages.\n * 'renewLock': Errors thrown when automatic lock renewal fails.\n */\n errorSource: ProcessErrorArgs[\"errorSource\"] | \"internal\";\n}\n\n/**\n * The general message handler interface (used for streamMessages).\n */\nexport interface MessageHandlers {\n /**\n * Handler that processes messages from service bus.\n *\n * @param message - A message received from Service Bus.\n */\n processMessage(message: ServiceBusReceivedMessage): Promise<void>;\n /**\n * Handler that processes errors that occur during receiving.\n *\n * This handler will be called for any error that occurs in the receiver when\n * - receiving the message, or\n * - executing your `processMessage` callback, or\n * - receiver is completing the message on your behalf after successfully running your `processMessage` callback and `autoCompleteMessages` is enabled\n * - receiver is abandoning the message on your behalf if running your `processMessage` callback fails and `autoCompleteMessages` is enabled\n * - receiver is renewing the lock on your behalf due to auto lock renewal feature being enabled\n *\n * Note that when receiving messages in a stream using `subscribe()`, the receiver will automatically retry receiving messages on all errors unless\n * `close()` is called on the subscription. It is completely up to users to decide what errors are considered non-recoverable and to handle them\n * accordingly in this callback.\n * For a list of errors occurs within Service Bus, please refer to https://learn.microsoft.com/javascript/api/\\@azure/service-bus/servicebuserror?view=azure-node-latest\n * @param args - The error and additional context to indicate where\n * the error originated.\n */\n processError(args: ProcessErrorArgs): Promise<void>;\n}\n\n/**\n * @internal\n */\nexport interface InternalMessageHandlers extends MessageHandlers {\n /**\n * Called when the connection is initialized but before we've added credits.\n * NOTE: This handler is completely internal and only used for tests.\n */\n postInitialize?: () => Promise<void>;\n\n /**\n * Called before we actually initialize the link itself.\n * NOTE: This handler is completely internal and only used for tests.\n */\n preInitialize?: () => Promise<void>;\n\n /**\n * Forwards internal errors that are not normally reported to the customer to `processError`.\n * (defaults to false)\n */\n forwardInternalErrors?: boolean;\n}\n\n/**\n * Represents the possible receive modes for the receiver.\n * @internal\n */\nexport type ReceiveMode = \"peekLock\" | \"receiveAndDelete\";\n\n/**\n * Options to use when creating a receiver.\n */\nexport interface ServiceBusReceiverOptions {\n /**\n * Represents the receive mode for the receiver.\n *\n * In receiveAndDelete mode, messages are deleted from Service Bus as they are received.\n *\n * In peekLock mode, the receiver has a lock on the message for the duration specified on the\n * queue/subscription.\n *\n * Messages that are not settled within the lock duration will be redelivered as many times as\n * the max delivery count set on the queue/subscription, after which they get sent to a separate\n * dead letter queue.\n *\n * You can settle a message by calling complete(), abandon(), defer() or deadletter() methods on\n * the message.\n *\n * More information about how peekLock and message settlement works here:\n * https://learn.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock\n *\n */\n receiveMode?: \"peekLock\" | \"receiveAndDelete\";\n /**\n * Represents the sub queue that is applicable for any queue or subscription.\n * Valid values are \"deadLetter\" and \"transferDeadLetter\". To learn more about dead letter queues,\n * see https://learn.microsoft.com/azure/service-bus-messaging/service-bus-dead-letter-queues\n */\n subQueueType?: \"deadLetter\" | \"transferDeadLetter\";\n\n /**\n * The maximum duration, in milliseconds, that the lock on the message will be renewed automatically by the client.\n * This auto renewal stops once the message is settled.\n *\n * - **Default**: `300 * 1000` milliseconds (5 minutes).\n * - **To disable autolock renewal**, set this to `0`.\n *\n * **Example:**\n *\n * If the message lock expires in 2 minutes and your message processing time is 8 minutes...\n *\n * Set maxAutoLockRenewalDurationInMs to 10 minutes, and the message lock will be automatically renewed for 4 times\n * (equivalent to having the message locked for 4 times its lock duration by leveraging the lock renewals).\n */\n maxAutoLockRenewalDurationInMs?: number;\n /**\n * Option to disable the client from running JSON.parse() on the message body when receiving the message.\n * Not applicable if the message was sent with AMQP body type value or sequence. Use this option when you\n * prefer to work directly with the bytes present in the message body than have the client attempt to parse it.\n */\n skipParsingBodyAsJson?: boolean;\n /**\n * Whether to skip converting Date type on properties of message annotations\n * or application properties into numbers when receiving the message. By\n * default, properties of Date type is converted into UNIX epoch number for\n * compatibility.\n */\n skipConvertingDate?: boolean;\n /**\n * Sets the name to identify the receiver. This can be used to correlate logs and exceptions.\n * If not specified or empty, a random unique one will be used.\n */\n identifier?: string;\n}\n\n/**\n * Options to use when creating a sender.\n */\nexport interface ServiceBusSenderOptions {\n /**\n * Sets the name to identify the sender. This can be used to correlate logs and exceptions.\n * If not specified or empty, a random unique one will be used.\n */\n identifier?: string;\n}\n\n/**\n * Options to configure the `createBatch` method on the `Sender`.\n * - `maxSizeInBytes`: The upper limit for the size of batch.\n *\n * Example usage:\n * ```js\n * {\n * maxSizeInBytes: 1024 * 1024 // 1 MB\n * }\n * ```\n */\nexport interface CreateMessageBatchOptions extends OperationOptionsBase {\n /**\n * The upper limit for the size of batch. The `tryAdd` function will return `false` after this limit is reached.\n */\n maxSizeInBytes?: number;\n}\n\n/**\n * Options when receiving a batch of messages from Service Bus.\n */\nexport interface ReceiveMessagesOptions extends OperationOptionsBase {\n /**\n * The maximum amount of time to wait for messages to arrive.\n * **Default**: `60000` milliseconds.\n */\n maxWaitTimeInMs?: number;\n}\n\n/**\n * Options when getting an iterable iterator from Service Bus.\n */\nexport interface GetMessageIteratorOptions extends OperationOptionsBase {}\n\n/**\n * Options used when subscribing to a Service Bus queue or subscription.\n */\nexport interface SubscribeOptions extends OperationOptionsBase {\n /**\n * Indicates whether the message should be settled automatically based on the result from the\n * user provided `processMessage` callback.\n *\n * - If an error is thrown from the `processMessage` callback the message will be abandoned\n * using `receiver.abandonMessage()`. Doing so will make the message available again from the\n * queue/subscription and the delivery count will be incremented.\n * - If NO error is thrown from `processMessage` the message will be completed\n * using `receiver.completeMessage()`. Doing so removes the message from the queue/subscription.\n *\n * This option is ignored if messages are received in the `receiveAndDelete` receive mode or if\n * the message is already settled in the user provided message callback.\n *\n * - **Default**: `true`.\n */\n autoCompleteMessages?: boolean;\n /**\n * The maximum number of concurrent calls that the library\n * can make to the user's message handler. Once this limit has been reached, more messages will\n * not be received until at least one of the calls to the user's message handler has completed.\n * - **Default**: `1`.\n */\n maxConcurrentCalls?: number;\n}\n\n/**\n * Describes the options passed to the `acceptSession` and `acceptNextSession` methods\n * when using a Queue/Subscription that has sessions enabled.\n */\nexport interface ServiceBusSessionReceiverOptions extends OperationOptionsBase {\n /**\n * Represents the receive mode for the receiver.\n *\n * In receiveAndDelete mode, messages are deleted from Service Bus as they are received.\n *\n * In peekLock mode, the receiver has a lock on the message for the duration specified on the\n * queue/subscription.\n *\n * Messages that are not settled within the lock duration will be redelivered as many times as\n * the max delivery count set on the queue/subscription, after which they get sent to a separate\n * dead letter queue.\n *\n * You can settle a message by calling complete(), abandon(), defer() or deadletter() methods on\n * the message.\n *\n * More information about how peekLock and message settlement works here:\n * https://learn.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock\n *\n */\n receiveMode?: \"peekLock\" | \"receiveAndDelete\";\n /**\n * The maximum duration, in milliseconds, that the lock on the session will be renewed automatically by the client.\n *\n * - **Default**: `300000` milliseconds (5 minutes).\n * - **To disable autolock renewal**, set this to `0`.\n *\n * **Example:**\n *\n * If the lock expires in 2 minutes and your processing time is 8 minutes...\n *\n * Set maxAutoLockRenewalDurationInMs to 10 minutes, and the lock will be automatically renewed about 4 times\n * (equivalent to having the session locked for 4 times its lock duration by leveraging the lock renewals).\n */\n maxAutoLockRenewalDurationInMs?: number;\n /**\n * Option to disable the client from running JSON.parse() on the message body when receiving the message.\n * Not applicable if the message was sent with AMQP body type value or sequence. Use this option when you\n * prefer to work directly with the bytes present in the message body than have the client attempt to parse it.\n */\n skipParsingBodyAsJson?: boolean;\n /**\n * Whether to skip converting Date type on properties of message annotations\n * or application properties into numbers when receiving the message. By\n * default, properties of Date type is converted into UNIX epoch number for\n * compatibility.\n */\n skipConvertingDate?: boolean;\n /**\n * Sets the name to identify the session receiver. This can be used to correlate logs and exceptions.\n * If not specified or empty, a random unique one will be used.\n */\n identifier?: string;\n}\n\n/**\n * Describes the options passed to the `peekMessages` method on a receiver.\n */\nexport interface PeekMessagesOptions extends OperationOptionsBase {\n /**\n * The sequence number to start peeking messages from (inclusive).\n */\n fromSequenceNumber?: Long;\n}\n\n/**\n * Options to configure messages deletion.\n */\nexport interface DeleteMessagesOptions extends OperationOptionsBase {\n /**\n * If specified, only messages enqueued before this time are deleted.\n */\n beforeEnqueueTime?: Date;\n /**\n * Up to `maxMessageCount` messages will be deleted.\n */\n maxMessageCount: number;\n}\n\n/**\n * Options to configure deletion of all messages in an entity.\n */\nexport interface PurgeMessagesOptions extends OperationOptionsBase {\n /**\n * If specified, only messages enqueued before this time are deleted.\n */\n beforeEnqueueTime?: Date;\n}\n"]}