@azure-rest/communication-job-router 1.1.0-alpha.20241209.1 → 1.1.0-alpha.20241210.1

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.
@@ -10,7 +10,7 @@ export default function createClient(connectionString: string, options: ClientOp
10
10
  /**
11
11
  * Initialize a new instance of `AzureCommunicationRoutingServiceClient`
12
12
  * @param endpoint - Uri of your Communication resource
13
- * @param credentialOrOptions The key or token credential.
13
+ * @param credentialOrOptions - The key or token credential.
14
14
  * @param options - the parameter for all optional parameters
15
15
  */
16
16
  export default function createClient(endpoint: string, credentialOrOptions?: KeyCredential | TokenCredential, options?: ClientOptions): AzureCommunicationRoutingServiceClient;
@@ -1 +1 @@
1
- {"version":3,"file":"azureCommunicationRoutingServiceClient.js","sourceRoot":"","sources":["../../src/azureCommunicationRoutingServiceClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,EACL,6BAA6B,EAC7B,eAAe,EACf,oBAAoB,GACrB,MAAM,6BAA6B,CAAC;AAwBrC,iBAAiB;AACjB,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,IAAY,EACZ,IAAwD,EACxD,IAAoB;;IAEpB,IAAI,mBAAgE,CAAC;IACrE,IAAI,OAAkC,CAAC;IACvC,MAAM,qBAAqB,GAAG,IAAI,CAAC;IAEnC,kFAAkF;IAClF,IAAI,iBAAiB,CAAC,IAAI,CAAC,IAAI,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC;QACrD,mBAAmB,GAAG,IAAuC,CAAC;QAC9D,OAAO,GAAG,IAAqB,CAAC;IAClC,CAAC;SAAM,CAAC;QACN,OAAO,GAAG,IAAqB,CAAC;IAClC,CAAC;IACD,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC1B,OAAO,GAAG,EAAE,CAAC;IACf,CAAC;IAED,2FAA2F;IAC3F,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,oBAAoB,CAAC,qBAAqB,EAAE,mBAAmB,CAAC,CAAC;IAC7F,MAAM,OAAO,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,mCAAI,GAAG,GAAG,EAAE,CAAC;IAC7C,OAAO,CAAC,UAAU,GAAG,MAAA,OAAO,CAAC,UAAU,mCAAI,oBAAoB,CAAC;IAChE,MAAM,aAAa,GAAG,qDAAqD,CAAC;IAC5E,MAAM,eAAe,GACnB,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,MAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,CAAC,eAAe,CAAA;QACpE,CAAC,CAAC,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,CAAC,eAAe,IAAI,aAAa,EAAE;QACjE,CAAC,CAAC,GAAG,aAAa,EAAE,CAAC;IACzB,OAAO,mCACF,OAAO,KACV,gBAAgB,EAAE;YAChB,eAAe;SAChB,EACD,cAAc,EAAE;YACd,MAAM,EAAE,MAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,cAAc,0CAAE,MAAM,mCAAI,MAAM,CAAC,IAAI;SACvD,GACF,CAAC;IAEF,MAAM,MAAM,GAAG,SAAS,CAAC,OAAO,EAAE,OAAO,CAA2C,CAAC;IAErF,MAAM,UAAU,GAAG,6BAA6B,CAAC,UAAU,CAAC,CAAC;IAC7D,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAEtC,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ClientOptions } from \"@azure-rest/core-client\";\nimport { getClient } from \"@azure-rest/core-client\";\nimport type { KeyCredential, TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\nimport { logger } from \"./logger.js\";\nimport type { AzureCommunicationRoutingServiceClient } from \"./clientDefinitions.js\";\nimport {\n createCommunicationAuthPolicy,\n isKeyCredential,\n parseClientArguments,\n} from \"@azure/communication-common\";\n\n/**\n * Initialize a new instance of `AzureCommunicationRoutingServiceClient`\n * @param connectionString - The connectionString or url of your Communication Services resource.\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n connectionString: string,\n options: ClientOptions,\n): AzureCommunicationRoutingServiceClient;\n\n/**\n * Initialize a new instance of `AzureCommunicationRoutingServiceClient`\n * @param endpoint - Uri of your Communication resource\n * @param credentialOrOptions The key or token credential.\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n endpoint: string,\n credentialOrOptions?: KeyCredential | TokenCredential,\n options?: ClientOptions,\n): AzureCommunicationRoutingServiceClient;\n\n// Implementation\nexport default function createClient(\n arg1: string,\n arg2?: ClientOptions | (KeyCredential | TokenCredential),\n arg3?: ClientOptions,\n): AzureCommunicationRoutingServiceClient {\n let credentialOrOptions: KeyCredential | TokenCredential | undefined;\n let options: ClientOptions | undefined;\n const connectionStringOrUrl = arg1;\n\n // Determine which constructor is being called based on the types of the arguments\n if (isTokenCredential(arg2) || isKeyCredential(arg2)) {\n credentialOrOptions = arg2 as KeyCredential | TokenCredential;\n options = arg3 as ClientOptions;\n } else {\n options = arg2 as ClientOptions;\n }\n if (options === undefined) {\n options = {};\n }\n\n // Rest of the function remains the same, using connectionStringOrUrl or endpoint as needed\n const { url, credential } = parseClientArguments(connectionStringOrUrl, credentialOrOptions);\n const baseUrl = options?.baseUrl ?? `${url}`;\n options.apiVersion = options.apiVersion ?? \"2024-01-18-preview\";\n const userAgentInfo = `azsdk-js-communication-job-router-rest/1.1.0-beta.2`;\n const userAgentPrefix =\n options?.userAgentOptions && options?.userAgentOptions.userAgentPrefix\n ? `${options?.userAgentOptions.userAgentPrefix} ${userAgentInfo}`\n : `${userAgentInfo}`;\n options = {\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n loggingOptions: {\n logger: options?.loggingOptions?.logger ?? logger.info,\n },\n };\n\n const client = getClient(baseUrl, options) as AzureCommunicationRoutingServiceClient;\n\n const authPolicy = createCommunicationAuthPolicy(credential);\n client.pipeline.addPolicy(authPolicy);\n\n return client;\n}\n"]}
1
+ {"version":3,"file":"azureCommunicationRoutingServiceClient.js","sourceRoot":"","sources":["../../src/azureCommunicationRoutingServiceClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,EACL,6BAA6B,EAC7B,eAAe,EACf,oBAAoB,GACrB,MAAM,6BAA6B,CAAC;AAwBrC,iBAAiB;AACjB,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,IAAY,EACZ,IAAwD,EACxD,IAAoB;;IAEpB,IAAI,mBAAgE,CAAC;IACrE,IAAI,OAAkC,CAAC;IACvC,MAAM,qBAAqB,GAAG,IAAI,CAAC;IAEnC,kFAAkF;IAClF,IAAI,iBAAiB,CAAC,IAAI,CAAC,IAAI,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC;QACrD,mBAAmB,GAAG,IAAuC,CAAC;QAC9D,OAAO,GAAG,IAAqB,CAAC;IAClC,CAAC;SAAM,CAAC;QACN,OAAO,GAAG,IAAqB,CAAC;IAClC,CAAC;IACD,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC1B,OAAO,GAAG,EAAE,CAAC;IACf,CAAC;IAED,2FAA2F;IAC3F,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,oBAAoB,CAAC,qBAAqB,EAAE,mBAAmB,CAAC,CAAC;IAC7F,MAAM,OAAO,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,mCAAI,GAAG,GAAG,EAAE,CAAC;IAC7C,OAAO,CAAC,UAAU,GAAG,MAAA,OAAO,CAAC,UAAU,mCAAI,oBAAoB,CAAC;IAChE,MAAM,aAAa,GAAG,qDAAqD,CAAC;IAC5E,MAAM,eAAe,GACnB,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,MAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,CAAC,eAAe,CAAA;QACpE,CAAC,CAAC,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,CAAC,eAAe,IAAI,aAAa,EAAE;QACjE,CAAC,CAAC,GAAG,aAAa,EAAE,CAAC;IACzB,OAAO,mCACF,OAAO,KACV,gBAAgB,EAAE;YAChB,eAAe;SAChB,EACD,cAAc,EAAE;YACd,MAAM,EAAE,MAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,cAAc,0CAAE,MAAM,mCAAI,MAAM,CAAC,IAAI;SACvD,GACF,CAAC;IAEF,MAAM,MAAM,GAAG,SAAS,CAAC,OAAO,EAAE,OAAO,CAA2C,CAAC;IAErF,MAAM,UAAU,GAAG,6BAA6B,CAAC,UAAU,CAAC,CAAC;IAC7D,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAEtC,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ClientOptions } from \"@azure-rest/core-client\";\nimport { getClient } from \"@azure-rest/core-client\";\nimport type { KeyCredential, TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\nimport { logger } from \"./logger.js\";\nimport type { AzureCommunicationRoutingServiceClient } from \"./clientDefinitions.js\";\nimport {\n createCommunicationAuthPolicy,\n isKeyCredential,\n parseClientArguments,\n} from \"@azure/communication-common\";\n\n/**\n * Initialize a new instance of `AzureCommunicationRoutingServiceClient`\n * @param connectionString - The connectionString or url of your Communication Services resource.\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n connectionString: string,\n options: ClientOptions,\n): AzureCommunicationRoutingServiceClient;\n\n/**\n * Initialize a new instance of `AzureCommunicationRoutingServiceClient`\n * @param endpoint - Uri of your Communication resource\n * @param credentialOrOptions - The key or token credential.\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n endpoint: string,\n credentialOrOptions?: KeyCredential | TokenCredential,\n options?: ClientOptions,\n): AzureCommunicationRoutingServiceClient;\n\n// Implementation\nexport default function createClient(\n arg1: string,\n arg2?: ClientOptions | (KeyCredential | TokenCredential),\n arg3?: ClientOptions,\n): AzureCommunicationRoutingServiceClient {\n let credentialOrOptions: KeyCredential | TokenCredential | undefined;\n let options: ClientOptions | undefined;\n const connectionStringOrUrl = arg1;\n\n // Determine which constructor is being called based on the types of the arguments\n if (isTokenCredential(arg2) || isKeyCredential(arg2)) {\n credentialOrOptions = arg2 as KeyCredential | TokenCredential;\n options = arg3 as ClientOptions;\n } else {\n options = arg2 as ClientOptions;\n }\n if (options === undefined) {\n options = {};\n }\n\n // Rest of the function remains the same, using connectionStringOrUrl or endpoint as needed\n const { url, credential } = parseClientArguments(connectionStringOrUrl, credentialOrOptions);\n const baseUrl = options?.baseUrl ?? `${url}`;\n options.apiVersion = options.apiVersion ?? \"2024-01-18-preview\";\n const userAgentInfo = `azsdk-js-communication-job-router-rest/1.1.0-beta.2`;\n const userAgentPrefix =\n options?.userAgentOptions && options?.userAgentOptions.userAgentPrefix\n ? `${options?.userAgentOptions.userAgentPrefix} ${userAgentInfo}`\n : `${userAgentInfo}`;\n options = {\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n loggingOptions: {\n logger: options?.loggingOptions?.logger ?? logger.info,\n },\n };\n\n const client = getClient(baseUrl, options) as AzureCommunicationRoutingServiceClient;\n\n const authPolicy = createCommunicationAuthPolicy(credential);\n client.pipeline.addPolicy(authPolicy);\n\n return client;\n}\n"]}
@@ -10,7 +10,7 @@ export default function createClient(connectionString: string, options: ClientOp
10
10
  /**
11
11
  * Initialize a new instance of `AzureCommunicationRoutingServiceClient`
12
12
  * @param endpoint - Uri of your Communication resource
13
- * @param credentialOrOptions The key or token credential.
13
+ * @param credentialOrOptions - The key or token credential.
14
14
  * @param options - the parameter for all optional parameters
15
15
  */
16
16
  export default function createClient(endpoint: string, credentialOrOptions?: KeyCredential | TokenCredential, options?: ClientOptions): AzureCommunicationRoutingServiceClient;
@@ -1 +1 @@
1
- {"version":3,"file":"azureCommunicationRoutingServiceClient.js","sourceRoot":"","sources":["../../src/azureCommunicationRoutingServiceClient.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAqClC,+BA6CC;AA/ED,yDAAoD;AAEpD,gDAAqD;AACrD,2CAAqC;AAErC,sEAIqC;AAwBrC,iBAAiB;AACjB,SAAwB,YAAY,CAClC,IAAY,EACZ,IAAwD,EACxD,IAAoB;;IAEpB,IAAI,mBAAgE,CAAC;IACrE,IAAI,OAAkC,CAAC;IACvC,MAAM,qBAAqB,GAAG,IAAI,CAAC;IAEnC,kFAAkF;IAClF,IAAI,IAAA,6BAAiB,EAAC,IAAI,CAAC,IAAI,IAAA,sCAAe,EAAC,IAAI,CAAC,EAAE,CAAC;QACrD,mBAAmB,GAAG,IAAuC,CAAC;QAC9D,OAAO,GAAG,IAAqB,CAAC;IAClC,CAAC;SAAM,CAAC;QACN,OAAO,GAAG,IAAqB,CAAC;IAClC,CAAC;IACD,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC1B,OAAO,GAAG,EAAE,CAAC;IACf,CAAC;IAED,2FAA2F;IAC3F,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,IAAA,2CAAoB,EAAC,qBAAqB,EAAE,mBAAmB,CAAC,CAAC;IAC7F,MAAM,OAAO,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,mCAAI,GAAG,GAAG,EAAE,CAAC;IAC7C,OAAO,CAAC,UAAU,GAAG,MAAA,OAAO,CAAC,UAAU,mCAAI,oBAAoB,CAAC;IAChE,MAAM,aAAa,GAAG,qDAAqD,CAAC;IAC5E,MAAM,eAAe,GACnB,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,MAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,CAAC,eAAe,CAAA;QACpE,CAAC,CAAC,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,CAAC,eAAe,IAAI,aAAa,EAAE;QACjE,CAAC,CAAC,GAAG,aAAa,EAAE,CAAC;IACzB,OAAO,mCACF,OAAO,KACV,gBAAgB,EAAE;YAChB,eAAe;SAChB,EACD,cAAc,EAAE;YACd,MAAM,EAAE,MAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,cAAc,0CAAE,MAAM,mCAAI,kBAAM,CAAC,IAAI;SACvD,GACF,CAAC;IAEF,MAAM,MAAM,GAAG,IAAA,uBAAS,EAAC,OAAO,EAAE,OAAO,CAA2C,CAAC;IAErF,MAAM,UAAU,GAAG,IAAA,oDAA6B,EAAC,UAAU,CAAC,CAAC;IAC7D,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAEtC,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ClientOptions } from \"@azure-rest/core-client\";\nimport { getClient } from \"@azure-rest/core-client\";\nimport type { KeyCredential, TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\nimport { logger } from \"./logger.js\";\nimport type { AzureCommunicationRoutingServiceClient } from \"./clientDefinitions.js\";\nimport {\n createCommunicationAuthPolicy,\n isKeyCredential,\n parseClientArguments,\n} from \"@azure/communication-common\";\n\n/**\n * Initialize a new instance of `AzureCommunicationRoutingServiceClient`\n * @param connectionString - The connectionString or url of your Communication Services resource.\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n connectionString: string,\n options: ClientOptions,\n): AzureCommunicationRoutingServiceClient;\n\n/**\n * Initialize a new instance of `AzureCommunicationRoutingServiceClient`\n * @param endpoint - Uri of your Communication resource\n * @param credentialOrOptions The key or token credential.\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n endpoint: string,\n credentialOrOptions?: KeyCredential | TokenCredential,\n options?: ClientOptions,\n): AzureCommunicationRoutingServiceClient;\n\n// Implementation\nexport default function createClient(\n arg1: string,\n arg2?: ClientOptions | (KeyCredential | TokenCredential),\n arg3?: ClientOptions,\n): AzureCommunicationRoutingServiceClient {\n let credentialOrOptions: KeyCredential | TokenCredential | undefined;\n let options: ClientOptions | undefined;\n const connectionStringOrUrl = arg1;\n\n // Determine which constructor is being called based on the types of the arguments\n if (isTokenCredential(arg2) || isKeyCredential(arg2)) {\n credentialOrOptions = arg2 as KeyCredential | TokenCredential;\n options = arg3 as ClientOptions;\n } else {\n options = arg2 as ClientOptions;\n }\n if (options === undefined) {\n options = {};\n }\n\n // Rest of the function remains the same, using connectionStringOrUrl or endpoint as needed\n const { url, credential } = parseClientArguments(connectionStringOrUrl, credentialOrOptions);\n const baseUrl = options?.baseUrl ?? `${url}`;\n options.apiVersion = options.apiVersion ?? \"2024-01-18-preview\";\n const userAgentInfo = `azsdk-js-communication-job-router-rest/1.1.0-beta.2`;\n const userAgentPrefix =\n options?.userAgentOptions && options?.userAgentOptions.userAgentPrefix\n ? `${options?.userAgentOptions.userAgentPrefix} ${userAgentInfo}`\n : `${userAgentInfo}`;\n options = {\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n loggingOptions: {\n logger: options?.loggingOptions?.logger ?? logger.info,\n },\n };\n\n const client = getClient(baseUrl, options) as AzureCommunicationRoutingServiceClient;\n\n const authPolicy = createCommunicationAuthPolicy(credential);\n client.pipeline.addPolicy(authPolicy);\n\n return client;\n}\n"]}
1
+ {"version":3,"file":"azureCommunicationRoutingServiceClient.js","sourceRoot":"","sources":["../../src/azureCommunicationRoutingServiceClient.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAqClC,+BA6CC;AA/ED,yDAAoD;AAEpD,gDAAqD;AACrD,2CAAqC;AAErC,sEAIqC;AAwBrC,iBAAiB;AACjB,SAAwB,YAAY,CAClC,IAAY,EACZ,IAAwD,EACxD,IAAoB;;IAEpB,IAAI,mBAAgE,CAAC;IACrE,IAAI,OAAkC,CAAC;IACvC,MAAM,qBAAqB,GAAG,IAAI,CAAC;IAEnC,kFAAkF;IAClF,IAAI,IAAA,6BAAiB,EAAC,IAAI,CAAC,IAAI,IAAA,sCAAe,EAAC,IAAI,CAAC,EAAE,CAAC;QACrD,mBAAmB,GAAG,IAAuC,CAAC;QAC9D,OAAO,GAAG,IAAqB,CAAC;IAClC,CAAC;SAAM,CAAC;QACN,OAAO,GAAG,IAAqB,CAAC;IAClC,CAAC;IACD,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC1B,OAAO,GAAG,EAAE,CAAC;IACf,CAAC;IAED,2FAA2F;IAC3F,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,IAAA,2CAAoB,EAAC,qBAAqB,EAAE,mBAAmB,CAAC,CAAC;IAC7F,MAAM,OAAO,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,mCAAI,GAAG,GAAG,EAAE,CAAC;IAC7C,OAAO,CAAC,UAAU,GAAG,MAAA,OAAO,CAAC,UAAU,mCAAI,oBAAoB,CAAC;IAChE,MAAM,aAAa,GAAG,qDAAqD,CAAC;IAC5E,MAAM,eAAe,GACnB,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,MAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,CAAC,eAAe,CAAA;QACpE,CAAC,CAAC,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,CAAC,eAAe,IAAI,aAAa,EAAE;QACjE,CAAC,CAAC,GAAG,aAAa,EAAE,CAAC;IACzB,OAAO,mCACF,OAAO,KACV,gBAAgB,EAAE;YAChB,eAAe;SAChB,EACD,cAAc,EAAE;YACd,MAAM,EAAE,MAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,cAAc,0CAAE,MAAM,mCAAI,kBAAM,CAAC,IAAI;SACvD,GACF,CAAC;IAEF,MAAM,MAAM,GAAG,IAAA,uBAAS,EAAC,OAAO,EAAE,OAAO,CAA2C,CAAC;IAErF,MAAM,UAAU,GAAG,IAAA,oDAA6B,EAAC,UAAU,CAAC,CAAC;IAC7D,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAEtC,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ClientOptions } from \"@azure-rest/core-client\";\nimport { getClient } from \"@azure-rest/core-client\";\nimport type { KeyCredential, TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\nimport { logger } from \"./logger.js\";\nimport type { AzureCommunicationRoutingServiceClient } from \"./clientDefinitions.js\";\nimport {\n createCommunicationAuthPolicy,\n isKeyCredential,\n parseClientArguments,\n} from \"@azure/communication-common\";\n\n/**\n * Initialize a new instance of `AzureCommunicationRoutingServiceClient`\n * @param connectionString - The connectionString or url of your Communication Services resource.\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n connectionString: string,\n options: ClientOptions,\n): AzureCommunicationRoutingServiceClient;\n\n/**\n * Initialize a new instance of `AzureCommunicationRoutingServiceClient`\n * @param endpoint - Uri of your Communication resource\n * @param credentialOrOptions - The key or token credential.\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n endpoint: string,\n credentialOrOptions?: KeyCredential | TokenCredential,\n options?: ClientOptions,\n): AzureCommunicationRoutingServiceClient;\n\n// Implementation\nexport default function createClient(\n arg1: string,\n arg2?: ClientOptions | (KeyCredential | TokenCredential),\n arg3?: ClientOptions,\n): AzureCommunicationRoutingServiceClient {\n let credentialOrOptions: KeyCredential | TokenCredential | undefined;\n let options: ClientOptions | undefined;\n const connectionStringOrUrl = arg1;\n\n // Determine which constructor is being called based on the types of the arguments\n if (isTokenCredential(arg2) || isKeyCredential(arg2)) {\n credentialOrOptions = arg2 as KeyCredential | TokenCredential;\n options = arg3 as ClientOptions;\n } else {\n options = arg2 as ClientOptions;\n }\n if (options === undefined) {\n options = {};\n }\n\n // Rest of the function remains the same, using connectionStringOrUrl or endpoint as needed\n const { url, credential } = parseClientArguments(connectionStringOrUrl, credentialOrOptions);\n const baseUrl = options?.baseUrl ?? `${url}`;\n options.apiVersion = options.apiVersion ?? \"2024-01-18-preview\";\n const userAgentInfo = `azsdk-js-communication-job-router-rest/1.1.0-beta.2`;\n const userAgentPrefix =\n options?.userAgentOptions && options?.userAgentOptions.userAgentPrefix\n ? `${options?.userAgentOptions.userAgentPrefix} ${userAgentInfo}`\n : `${userAgentInfo}`;\n options = {\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n loggingOptions: {\n logger: options?.loggingOptions?.logger ?? logger.info,\n },\n };\n\n const client = getClient(baseUrl, options) as AzureCommunicationRoutingServiceClient;\n\n const authPolicy = createCommunicationAuthPolicy(credential);\n client.pipeline.addPolicy(authPolicy);\n\n return client;\n}\n"]}
@@ -10,7 +10,7 @@ export default function createClient(connectionString: string, options: ClientOp
10
10
  /**
11
11
  * Initialize a new instance of `AzureCommunicationRoutingServiceClient`
12
12
  * @param endpoint - Uri of your Communication resource
13
- * @param credentialOrOptions The key or token credential.
13
+ * @param credentialOrOptions - The key or token credential.
14
14
  * @param options - the parameter for all optional parameters
15
15
  */
16
16
  export default function createClient(endpoint: string, credentialOrOptions?: KeyCredential | TokenCredential, options?: ClientOptions): AzureCommunicationRoutingServiceClient;
@@ -1 +1 @@
1
- {"version":3,"file":"azureCommunicationRoutingServiceClient.js","sourceRoot":"","sources":["../../src/azureCommunicationRoutingServiceClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,EACL,6BAA6B,EAC7B,eAAe,EACf,oBAAoB,GACrB,MAAM,6BAA6B,CAAC;AAwBrC,iBAAiB;AACjB,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,IAAY,EACZ,IAAwD,EACxD,IAAoB;;IAEpB,IAAI,mBAAgE,CAAC;IACrE,IAAI,OAAkC,CAAC;IACvC,MAAM,qBAAqB,GAAG,IAAI,CAAC;IAEnC,kFAAkF;IAClF,IAAI,iBAAiB,CAAC,IAAI,CAAC,IAAI,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC;QACrD,mBAAmB,GAAG,IAAuC,CAAC;QAC9D,OAAO,GAAG,IAAqB,CAAC;IAClC,CAAC;SAAM,CAAC;QACN,OAAO,GAAG,IAAqB,CAAC;IAClC,CAAC;IACD,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC1B,OAAO,GAAG,EAAE,CAAC;IACf,CAAC;IAED,2FAA2F;IAC3F,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,oBAAoB,CAAC,qBAAqB,EAAE,mBAAmB,CAAC,CAAC;IAC7F,MAAM,OAAO,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,mCAAI,GAAG,GAAG,EAAE,CAAC;IAC7C,OAAO,CAAC,UAAU,GAAG,MAAA,OAAO,CAAC,UAAU,mCAAI,oBAAoB,CAAC;IAChE,MAAM,aAAa,GAAG,qDAAqD,CAAC;IAC5E,MAAM,eAAe,GACnB,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,MAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,CAAC,eAAe,CAAA;QACpE,CAAC,CAAC,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,CAAC,eAAe,IAAI,aAAa,EAAE;QACjE,CAAC,CAAC,GAAG,aAAa,EAAE,CAAC;IACzB,OAAO,mCACF,OAAO,KACV,gBAAgB,EAAE;YAChB,eAAe;SAChB,EACD,cAAc,EAAE;YACd,MAAM,EAAE,MAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,cAAc,0CAAE,MAAM,mCAAI,MAAM,CAAC,IAAI;SACvD,GACF,CAAC;IAEF,MAAM,MAAM,GAAG,SAAS,CAAC,OAAO,EAAE,OAAO,CAA2C,CAAC;IAErF,MAAM,UAAU,GAAG,6BAA6B,CAAC,UAAU,CAAC,CAAC;IAC7D,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAEtC,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ClientOptions } from \"@azure-rest/core-client\";\nimport { getClient } from \"@azure-rest/core-client\";\nimport type { KeyCredential, TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\nimport { logger } from \"./logger.js\";\nimport type { AzureCommunicationRoutingServiceClient } from \"./clientDefinitions.js\";\nimport {\n createCommunicationAuthPolicy,\n isKeyCredential,\n parseClientArguments,\n} from \"@azure/communication-common\";\n\n/**\n * Initialize a new instance of `AzureCommunicationRoutingServiceClient`\n * @param connectionString - The connectionString or url of your Communication Services resource.\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n connectionString: string,\n options: ClientOptions,\n): AzureCommunicationRoutingServiceClient;\n\n/**\n * Initialize a new instance of `AzureCommunicationRoutingServiceClient`\n * @param endpoint - Uri of your Communication resource\n * @param credentialOrOptions The key or token credential.\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n endpoint: string,\n credentialOrOptions?: KeyCredential | TokenCredential,\n options?: ClientOptions,\n): AzureCommunicationRoutingServiceClient;\n\n// Implementation\nexport default function createClient(\n arg1: string,\n arg2?: ClientOptions | (KeyCredential | TokenCredential),\n arg3?: ClientOptions,\n): AzureCommunicationRoutingServiceClient {\n let credentialOrOptions: KeyCredential | TokenCredential | undefined;\n let options: ClientOptions | undefined;\n const connectionStringOrUrl = arg1;\n\n // Determine which constructor is being called based on the types of the arguments\n if (isTokenCredential(arg2) || isKeyCredential(arg2)) {\n credentialOrOptions = arg2 as KeyCredential | TokenCredential;\n options = arg3 as ClientOptions;\n } else {\n options = arg2 as ClientOptions;\n }\n if (options === undefined) {\n options = {};\n }\n\n // Rest of the function remains the same, using connectionStringOrUrl or endpoint as needed\n const { url, credential } = parseClientArguments(connectionStringOrUrl, credentialOrOptions);\n const baseUrl = options?.baseUrl ?? `${url}`;\n options.apiVersion = options.apiVersion ?? \"2024-01-18-preview\";\n const userAgentInfo = `azsdk-js-communication-job-router-rest/1.1.0-beta.2`;\n const userAgentPrefix =\n options?.userAgentOptions && options?.userAgentOptions.userAgentPrefix\n ? `${options?.userAgentOptions.userAgentPrefix} ${userAgentInfo}`\n : `${userAgentInfo}`;\n options = {\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n loggingOptions: {\n logger: options?.loggingOptions?.logger ?? logger.info,\n },\n };\n\n const client = getClient(baseUrl, options) as AzureCommunicationRoutingServiceClient;\n\n const authPolicy = createCommunicationAuthPolicy(credential);\n client.pipeline.addPolicy(authPolicy);\n\n return client;\n}\n"]}
1
+ {"version":3,"file":"azureCommunicationRoutingServiceClient.js","sourceRoot":"","sources":["../../src/azureCommunicationRoutingServiceClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,EACL,6BAA6B,EAC7B,eAAe,EACf,oBAAoB,GACrB,MAAM,6BAA6B,CAAC;AAwBrC,iBAAiB;AACjB,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,IAAY,EACZ,IAAwD,EACxD,IAAoB;;IAEpB,IAAI,mBAAgE,CAAC;IACrE,IAAI,OAAkC,CAAC;IACvC,MAAM,qBAAqB,GAAG,IAAI,CAAC;IAEnC,kFAAkF;IAClF,IAAI,iBAAiB,CAAC,IAAI,CAAC,IAAI,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC;QACrD,mBAAmB,GAAG,IAAuC,CAAC;QAC9D,OAAO,GAAG,IAAqB,CAAC;IAClC,CAAC;SAAM,CAAC;QACN,OAAO,GAAG,IAAqB,CAAC;IAClC,CAAC;IACD,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC1B,OAAO,GAAG,EAAE,CAAC;IACf,CAAC;IAED,2FAA2F;IAC3F,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,oBAAoB,CAAC,qBAAqB,EAAE,mBAAmB,CAAC,CAAC;IAC7F,MAAM,OAAO,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,mCAAI,GAAG,GAAG,EAAE,CAAC;IAC7C,OAAO,CAAC,UAAU,GAAG,MAAA,OAAO,CAAC,UAAU,mCAAI,oBAAoB,CAAC;IAChE,MAAM,aAAa,GAAG,qDAAqD,CAAC;IAC5E,MAAM,eAAe,GACnB,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,MAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,CAAC,eAAe,CAAA;QACpE,CAAC,CAAC,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,CAAC,eAAe,IAAI,aAAa,EAAE;QACjE,CAAC,CAAC,GAAG,aAAa,EAAE,CAAC;IACzB,OAAO,mCACF,OAAO,KACV,gBAAgB,EAAE;YAChB,eAAe;SAChB,EACD,cAAc,EAAE;YACd,MAAM,EAAE,MAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,cAAc,0CAAE,MAAM,mCAAI,MAAM,CAAC,IAAI;SACvD,GACF,CAAC;IAEF,MAAM,MAAM,GAAG,SAAS,CAAC,OAAO,EAAE,OAAO,CAA2C,CAAC;IAErF,MAAM,UAAU,GAAG,6BAA6B,CAAC,UAAU,CAAC,CAAC;IAC7D,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAEtC,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ClientOptions } from \"@azure-rest/core-client\";\nimport { getClient } from \"@azure-rest/core-client\";\nimport type { KeyCredential, TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\nimport { logger } from \"./logger.js\";\nimport type { AzureCommunicationRoutingServiceClient } from \"./clientDefinitions.js\";\nimport {\n createCommunicationAuthPolicy,\n isKeyCredential,\n parseClientArguments,\n} from \"@azure/communication-common\";\n\n/**\n * Initialize a new instance of `AzureCommunicationRoutingServiceClient`\n * @param connectionString - The connectionString or url of your Communication Services resource.\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n connectionString: string,\n options: ClientOptions,\n): AzureCommunicationRoutingServiceClient;\n\n/**\n * Initialize a new instance of `AzureCommunicationRoutingServiceClient`\n * @param endpoint - Uri of your Communication resource\n * @param credentialOrOptions - The key or token credential.\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n endpoint: string,\n credentialOrOptions?: KeyCredential | TokenCredential,\n options?: ClientOptions,\n): AzureCommunicationRoutingServiceClient;\n\n// Implementation\nexport default function createClient(\n arg1: string,\n arg2?: ClientOptions | (KeyCredential | TokenCredential),\n arg3?: ClientOptions,\n): AzureCommunicationRoutingServiceClient {\n let credentialOrOptions: KeyCredential | TokenCredential | undefined;\n let options: ClientOptions | undefined;\n const connectionStringOrUrl = arg1;\n\n // Determine which constructor is being called based on the types of the arguments\n if (isTokenCredential(arg2) || isKeyCredential(arg2)) {\n credentialOrOptions = arg2 as KeyCredential | TokenCredential;\n options = arg3 as ClientOptions;\n } else {\n options = arg2 as ClientOptions;\n }\n if (options === undefined) {\n options = {};\n }\n\n // Rest of the function remains the same, using connectionStringOrUrl or endpoint as needed\n const { url, credential } = parseClientArguments(connectionStringOrUrl, credentialOrOptions);\n const baseUrl = options?.baseUrl ?? `${url}`;\n options.apiVersion = options.apiVersion ?? \"2024-01-18-preview\";\n const userAgentInfo = `azsdk-js-communication-job-router-rest/1.1.0-beta.2`;\n const userAgentPrefix =\n options?.userAgentOptions && options?.userAgentOptions.userAgentPrefix\n ? `${options?.userAgentOptions.userAgentPrefix} ${userAgentInfo}`\n : `${userAgentInfo}`;\n options = {\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n loggingOptions: {\n logger: options?.loggingOptions?.logger ?? logger.info,\n },\n };\n\n const client = getClient(baseUrl, options) as AzureCommunicationRoutingServiceClient;\n\n const authPolicy = createCommunicationAuthPolicy(credential);\n client.pipeline.addPolicy(authPolicy);\n\n return client;\n}\n"]}
@@ -10,7 +10,7 @@ export default function createClient(connectionString: string, options: ClientOp
10
10
  /**
11
11
  * Initialize a new instance of `AzureCommunicationRoutingServiceClient`
12
12
  * @param endpoint - Uri of your Communication resource
13
- * @param credentialOrOptions The key or token credential.
13
+ * @param credentialOrOptions - The key or token credential.
14
14
  * @param options - the parameter for all optional parameters
15
15
  */
16
16
  export default function createClient(endpoint: string, credentialOrOptions?: KeyCredential | TokenCredential, options?: ClientOptions): AzureCommunicationRoutingServiceClient;
@@ -1 +1 @@
1
- {"version":3,"file":"azureCommunicationRoutingServiceClient.js","sourceRoot":"","sources":["../../src/azureCommunicationRoutingServiceClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,EACL,6BAA6B,EAC7B,eAAe,EACf,oBAAoB,GACrB,MAAM,6BAA6B,CAAC;AAwBrC,iBAAiB;AACjB,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,IAAY,EACZ,IAAwD,EACxD,IAAoB;;IAEpB,IAAI,mBAAgE,CAAC;IACrE,IAAI,OAAkC,CAAC;IACvC,MAAM,qBAAqB,GAAG,IAAI,CAAC;IAEnC,kFAAkF;IAClF,IAAI,iBAAiB,CAAC,IAAI,CAAC,IAAI,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC;QACrD,mBAAmB,GAAG,IAAuC,CAAC;QAC9D,OAAO,GAAG,IAAqB,CAAC;IAClC,CAAC;SAAM,CAAC;QACN,OAAO,GAAG,IAAqB,CAAC;IAClC,CAAC;IACD,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC1B,OAAO,GAAG,EAAE,CAAC;IACf,CAAC;IAED,2FAA2F;IAC3F,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,oBAAoB,CAAC,qBAAqB,EAAE,mBAAmB,CAAC,CAAC;IAC7F,MAAM,OAAO,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,mCAAI,GAAG,GAAG,EAAE,CAAC;IAC7C,OAAO,CAAC,UAAU,GAAG,MAAA,OAAO,CAAC,UAAU,mCAAI,oBAAoB,CAAC;IAChE,MAAM,aAAa,GAAG,qDAAqD,CAAC;IAC5E,MAAM,eAAe,GACnB,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,MAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,CAAC,eAAe,CAAA;QACpE,CAAC,CAAC,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,CAAC,eAAe,IAAI,aAAa,EAAE;QACjE,CAAC,CAAC,GAAG,aAAa,EAAE,CAAC;IACzB,OAAO,mCACF,OAAO,KACV,gBAAgB,EAAE;YAChB,eAAe;SAChB,EACD,cAAc,EAAE;YACd,MAAM,EAAE,MAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,cAAc,0CAAE,MAAM,mCAAI,MAAM,CAAC,IAAI;SACvD,GACF,CAAC;IAEF,MAAM,MAAM,GAAG,SAAS,CAAC,OAAO,EAAE,OAAO,CAA2C,CAAC;IAErF,MAAM,UAAU,GAAG,6BAA6B,CAAC,UAAU,CAAC,CAAC;IAC7D,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAEtC,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ClientOptions } from \"@azure-rest/core-client\";\nimport { getClient } from \"@azure-rest/core-client\";\nimport type { KeyCredential, TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\nimport { logger } from \"./logger.js\";\nimport type { AzureCommunicationRoutingServiceClient } from \"./clientDefinitions.js\";\nimport {\n createCommunicationAuthPolicy,\n isKeyCredential,\n parseClientArguments,\n} from \"@azure/communication-common\";\n\n/**\n * Initialize a new instance of `AzureCommunicationRoutingServiceClient`\n * @param connectionString - The connectionString or url of your Communication Services resource.\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n connectionString: string,\n options: ClientOptions,\n): AzureCommunicationRoutingServiceClient;\n\n/**\n * Initialize a new instance of `AzureCommunicationRoutingServiceClient`\n * @param endpoint - Uri of your Communication resource\n * @param credentialOrOptions The key or token credential.\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n endpoint: string,\n credentialOrOptions?: KeyCredential | TokenCredential,\n options?: ClientOptions,\n): AzureCommunicationRoutingServiceClient;\n\n// Implementation\nexport default function createClient(\n arg1: string,\n arg2?: ClientOptions | (KeyCredential | TokenCredential),\n arg3?: ClientOptions,\n): AzureCommunicationRoutingServiceClient {\n let credentialOrOptions: KeyCredential | TokenCredential | undefined;\n let options: ClientOptions | undefined;\n const connectionStringOrUrl = arg1;\n\n // Determine which constructor is being called based on the types of the arguments\n if (isTokenCredential(arg2) || isKeyCredential(arg2)) {\n credentialOrOptions = arg2 as KeyCredential | TokenCredential;\n options = arg3 as ClientOptions;\n } else {\n options = arg2 as ClientOptions;\n }\n if (options === undefined) {\n options = {};\n }\n\n // Rest of the function remains the same, using connectionStringOrUrl or endpoint as needed\n const { url, credential } = parseClientArguments(connectionStringOrUrl, credentialOrOptions);\n const baseUrl = options?.baseUrl ?? `${url}`;\n options.apiVersion = options.apiVersion ?? \"2024-01-18-preview\";\n const userAgentInfo = `azsdk-js-communication-job-router-rest/1.1.0-beta.2`;\n const userAgentPrefix =\n options?.userAgentOptions && options?.userAgentOptions.userAgentPrefix\n ? `${options?.userAgentOptions.userAgentPrefix} ${userAgentInfo}`\n : `${userAgentInfo}`;\n options = {\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n loggingOptions: {\n logger: options?.loggingOptions?.logger ?? logger.info,\n },\n };\n\n const client = getClient(baseUrl, options) as AzureCommunicationRoutingServiceClient;\n\n const authPolicy = createCommunicationAuthPolicy(credential);\n client.pipeline.addPolicy(authPolicy);\n\n return client;\n}\n"]}
1
+ {"version":3,"file":"azureCommunicationRoutingServiceClient.js","sourceRoot":"","sources":["../../src/azureCommunicationRoutingServiceClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,EACL,6BAA6B,EAC7B,eAAe,EACf,oBAAoB,GACrB,MAAM,6BAA6B,CAAC;AAwBrC,iBAAiB;AACjB,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,IAAY,EACZ,IAAwD,EACxD,IAAoB;;IAEpB,IAAI,mBAAgE,CAAC;IACrE,IAAI,OAAkC,CAAC;IACvC,MAAM,qBAAqB,GAAG,IAAI,CAAC;IAEnC,kFAAkF;IAClF,IAAI,iBAAiB,CAAC,IAAI,CAAC,IAAI,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC;QACrD,mBAAmB,GAAG,IAAuC,CAAC;QAC9D,OAAO,GAAG,IAAqB,CAAC;IAClC,CAAC;SAAM,CAAC;QACN,OAAO,GAAG,IAAqB,CAAC;IAClC,CAAC;IACD,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC1B,OAAO,GAAG,EAAE,CAAC;IACf,CAAC;IAED,2FAA2F;IAC3F,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,oBAAoB,CAAC,qBAAqB,EAAE,mBAAmB,CAAC,CAAC;IAC7F,MAAM,OAAO,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,mCAAI,GAAG,GAAG,EAAE,CAAC;IAC7C,OAAO,CAAC,UAAU,GAAG,MAAA,OAAO,CAAC,UAAU,mCAAI,oBAAoB,CAAC;IAChE,MAAM,aAAa,GAAG,qDAAqD,CAAC;IAC5E,MAAM,eAAe,GACnB,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,MAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,CAAC,eAAe,CAAA;QACpE,CAAC,CAAC,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,CAAC,eAAe,IAAI,aAAa,EAAE;QACjE,CAAC,CAAC,GAAG,aAAa,EAAE,CAAC;IACzB,OAAO,mCACF,OAAO,KACV,gBAAgB,EAAE;YAChB,eAAe;SAChB,EACD,cAAc,EAAE;YACd,MAAM,EAAE,MAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,cAAc,0CAAE,MAAM,mCAAI,MAAM,CAAC,IAAI;SACvD,GACF,CAAC;IAEF,MAAM,MAAM,GAAG,SAAS,CAAC,OAAO,EAAE,OAAO,CAA2C,CAAC;IAErF,MAAM,UAAU,GAAG,6BAA6B,CAAC,UAAU,CAAC,CAAC;IAC7D,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAEtC,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ClientOptions } from \"@azure-rest/core-client\";\nimport { getClient } from \"@azure-rest/core-client\";\nimport type { KeyCredential, TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\nimport { logger } from \"./logger.js\";\nimport type { AzureCommunicationRoutingServiceClient } from \"./clientDefinitions.js\";\nimport {\n createCommunicationAuthPolicy,\n isKeyCredential,\n parseClientArguments,\n} from \"@azure/communication-common\";\n\n/**\n * Initialize a new instance of `AzureCommunicationRoutingServiceClient`\n * @param connectionString - The connectionString or url of your Communication Services resource.\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n connectionString: string,\n options: ClientOptions,\n): AzureCommunicationRoutingServiceClient;\n\n/**\n * Initialize a new instance of `AzureCommunicationRoutingServiceClient`\n * @param endpoint - Uri of your Communication resource\n * @param credentialOrOptions - The key or token credential.\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n endpoint: string,\n credentialOrOptions?: KeyCredential | TokenCredential,\n options?: ClientOptions,\n): AzureCommunicationRoutingServiceClient;\n\n// Implementation\nexport default function createClient(\n arg1: string,\n arg2?: ClientOptions | (KeyCredential | TokenCredential),\n arg3?: ClientOptions,\n): AzureCommunicationRoutingServiceClient {\n let credentialOrOptions: KeyCredential | TokenCredential | undefined;\n let options: ClientOptions | undefined;\n const connectionStringOrUrl = arg1;\n\n // Determine which constructor is being called based on the types of the arguments\n if (isTokenCredential(arg2) || isKeyCredential(arg2)) {\n credentialOrOptions = arg2 as KeyCredential | TokenCredential;\n options = arg3 as ClientOptions;\n } else {\n options = arg2 as ClientOptions;\n }\n if (options === undefined) {\n options = {};\n }\n\n // Rest of the function remains the same, using connectionStringOrUrl or endpoint as needed\n const { url, credential } = parseClientArguments(connectionStringOrUrl, credentialOrOptions);\n const baseUrl = options?.baseUrl ?? `${url}`;\n options.apiVersion = options.apiVersion ?? \"2024-01-18-preview\";\n const userAgentInfo = `azsdk-js-communication-job-router-rest/1.1.0-beta.2`;\n const userAgentPrefix =\n options?.userAgentOptions && options?.userAgentOptions.userAgentPrefix\n ? `${options?.userAgentOptions.userAgentPrefix} ${userAgentInfo}`\n : `${userAgentInfo}`;\n options = {\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n loggingOptions: {\n logger: options?.loggingOptions?.logger ?? logger.info,\n },\n };\n\n const client = getClient(baseUrl, options) as AzureCommunicationRoutingServiceClient;\n\n const authPolicy = createCommunicationAuthPolicy(credential);\n client.pipeline.addPolicy(authPolicy);\n\n return client;\n}\n"]}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@azure-rest/communication-job-router",
3
3
  "sdk-type": "client",
4
4
  "author": "Microsoft Corporation",
5
- "version": "1.1.0-alpha.20241209.1",
5
+ "version": "1.1.0-alpha.20241210.1",
6
6
  "description": "Azure client library for Azure Communication Job Router services",
7
7
  "keywords": [
8
8
  "node",
@@ -43,7 +43,7 @@
43
43
  "generate:client": "echo skipped",
44
44
  "integration-test": "npm run integration-test:node && npm run integration-test:browser",
45
45
  "integration-test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser",
46
- "integration-test:node": "dev-tool run test:vitest",
46
+ "integration-test:node": "dev-tool run test:vitest --esm",
47
47
  "lint": "eslint package.json api-extractor.json src test",
48
48
  "lint:fix": "eslint package.json api-extractor.json src test --fix --fix-type [problem,suggestion]",
49
49
  "pack": "npm pack 2>&1",
@@ -115,7 +115,8 @@
115
115
  "browser",
116
116
  "react-native"
117
117
  ],
118
- "selfLink": false
118
+ "selfLink": false,
119
+ "project": "./tsconfig.src.json"
119
120
  },
120
121
  "exports": {
121
122
  "./package.json": "./package.json",