@azure-tools/communication-short-codes 1.0.0-beta.1 → 1.0.0-beta.2

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 (32) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/index.js +80 -155
  3. package/dist/index.js.map +1 -1
  4. package/dist-esm/src/generated/src/index.js +1 -0
  5. package/dist-esm/src/generated/src/index.js.map +1 -1
  6. package/dist-esm/src/generated/src/models/index.js.map +1 -1
  7. package/dist-esm/src/generated/src/models/mappers.js +8 -65
  8. package/dist-esm/src/generated/src/models/mappers.js.map +1 -1
  9. package/dist-esm/src/generated/src/models/parameters.js +1 -0
  10. package/dist-esm/src/generated/src/models/parameters.js.map +1 -1
  11. package/dist-esm/src/generated/src/operations/index.js +1 -1
  12. package/dist-esm/src/generated/src/operations/index.js.map +1 -1
  13. package/dist-esm/src/generated/src/operations/{shortCodes.js → shortCodesOperations.js} +19 -46
  14. package/dist-esm/src/generated/src/operations/shortCodesOperations.js.map +1 -0
  15. package/dist-esm/src/generated/src/operationsInterfaces/index.js +9 -0
  16. package/dist-esm/src/generated/src/operationsInterfaces/index.js.map +1 -0
  17. package/dist-esm/src/generated/src/operationsInterfaces/shortCodesOperations.js +9 -0
  18. package/dist-esm/src/generated/src/operationsInterfaces/shortCodesOperations.js.map +1 -0
  19. package/dist-esm/src/generated/src/shortCodesClient.js +2 -2
  20. package/dist-esm/src/generated/src/shortCodesClient.js.map +1 -1
  21. package/dist-esm/src/generated/src/shortCodesClientContext.js +13 -11
  22. package/dist-esm/src/generated/src/shortCodesClientContext.js.map +1 -1
  23. package/dist-esm/src/models.js.map +1 -1
  24. package/dist-esm/src/shortCodesClient.js +19 -29
  25. package/dist-esm/src/shortCodesClient.js.map +1 -1
  26. package/dist-esm/src/utils/constants.js +1 -1
  27. package/dist-esm/src/utils/constants.js.map +1 -1
  28. package/dist-esm/src/utils/tracing.js +1 -1
  29. package/dist-esm/src/utils/tracing.js.map +1 -1
  30. package/package.json +32 -28
  31. package/types/communication-short-codes.d.ts +10 -10
  32. package/dist-esm/src/generated/src/operations/shortCodes.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Release History
2
2
 
3
+ ## 1.0.0-beta.2 (2022-03-31)
4
+ ### Features Added
5
+ - Migrated from using `@azure/core-http` to `@azure/core-rest-pipeline` for the handling of HTTP requests. See [Azure Core v1 vs v2](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-rest-pipeline/documentation/core2.md) for more on the difference and benefits of the move.
6
+
7
+ ### Breaking Changes
8
+ - `ShortCodesClient.submitUSProgramBrief` no longer returns the generic `RestResponse` type, and instead returns the more specific `USProgramBrief`. Because of this, the `_response` property is no longer exposed in the returned object. However, in the operation options, it can take a callback (`onResponse`) to access the HTTP response. See https://github.com/Azure/autorest.typescript/wiki/%60core-http%60-dependency-migration-to-%60core-client%60-%60core-rest-pipeline%60#change-to-the-_response-property
9
+
3
10
  ## 1.0.0-beta.1 (2021-11-05)
4
11
 
5
12
  The first preview of the Azure Communication Short Codes Client has the following features:
package/dist/index.js CHANGED
@@ -4,14 +4,30 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var communicationCommon = require('@azure/communication-common');
6
6
  var coreAuth = require('@azure/core-auth');
7
- var coreHttp = require('@azure/core-http');
8
- var logger$1 = require('@azure/logger');
9
7
  var coreTracing = require('@azure/core-tracing');
8
+ var logger$1 = require('@azure/logger');
9
+ var coreClient = require('@azure/core-client');
10
10
  var tslib = require('tslib');
11
11
 
12
- // Copyright (c) Microsoft Corporation.
13
- // Licensed under the MIT license.
14
- const SDK_VERSION = "1.0.0-beta.1";
12
+ function _interopNamespace(e) {
13
+ if (e && e.__esModule) return e;
14
+ var n = Object.create(null);
15
+ if (e) {
16
+ Object.keys(e).forEach(function (k) {
17
+ if (k !== 'default') {
18
+ var d = Object.getOwnPropertyDescriptor(e, k);
19
+ Object.defineProperty(n, k, d.get ? d : {
20
+ enumerable: true,
21
+ get: function () { return e[k]; }
22
+ });
23
+ }
24
+ });
25
+ }
26
+ n["default"] = e;
27
+ return Object.freeze(n);
28
+ }
29
+
30
+ var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
15
31
 
16
32
  // Copyright (c) Microsoft Corporation.
17
33
  /**
@@ -28,7 +44,7 @@ const logger = logger$1.createClientLogger("communication-short-codes");
28
44
  */
29
45
  const createSpan = coreTracing.createSpanFunction({
30
46
  packagePrefix: "Azure.Communication",
31
- namespace: "Microsoft.Communication"
47
+ namespace: "Microsoft.Communication",
32
48
  });
33
49
 
34
50
  /*
@@ -78,8 +94,7 @@ const ShortCode = {
78
94
  numberType: {
79
95
  serializedName: "numberType",
80
96
  type: {
81
- name: "Enum",
82
- allowedValues: ["shortCode", "alphaId"]
97
+ name: "String"
83
98
  }
84
99
  },
85
100
  countryCode: {
@@ -187,15 +202,7 @@ const USProgramBrief = {
187
202
  status: {
188
203
  serializedName: "status",
189
204
  type: {
190
- name: "Enum",
191
- allowedValues: [
192
- "submitted",
193
- "approved",
194
- "submitNewVanityNumbers",
195
- "updateProgramBrief",
196
- "draft",
197
- "denied"
198
- ]
205
+ name: "String"
199
206
  }
200
207
  },
201
208
  number: {
@@ -314,8 +321,7 @@ const ShortCodeCost = {
314
321
  serializedName: "billingFrequency",
315
322
  required: true,
316
323
  type: {
317
- name: "Enum",
318
- allowedValues: ["monthly", "once"]
324
+ name: "String"
319
325
  }
320
326
  }
321
327
  }
@@ -346,8 +352,7 @@ const ProgramDetails = {
346
352
  numberType: {
347
353
  serializedName: "numberType",
348
354
  type: {
349
- name: "Enum",
350
- allowedValues: ["shortCode", "alphaId"]
355
+ name: "String"
351
356
  }
352
357
  },
353
358
  isPoliticalCampaign: {
@@ -524,8 +529,7 @@ const MessageDetails = {
524
529
  recurrence: {
525
530
  serializedName: "recurrence",
526
531
  type: {
527
- name: "Enum",
528
- allowedValues: ["subscription", "transaction"]
532
+ name: "String"
529
533
  }
530
534
  },
531
535
  helpMessage: {
@@ -561,8 +565,7 @@ const MessageDetails = {
561
565
  directionality: {
562
566
  serializedName: "directionality",
563
567
  type: {
564
- name: "Enum",
565
- allowedValues: ["oneWay", "twoWay"]
568
+ name: "String"
566
569
  }
567
570
  },
568
571
  useCases: {
@@ -588,50 +591,7 @@ const UseCase = {
588
591
  contentCategory: {
589
592
  serializedName: "contentCategory",
590
593
  type: {
591
- name: "Enum",
592
- allowedValues: [
593
- "ringTones",
594
- "smsChat",
595
- "video",
596
- "loyaltyProgramPointsPrizes",
597
- "gifting",
598
- "inApplicationBilling",
599
- "textToScreen",
600
- "games",
601
- "audioChat",
602
- "mmsPictures",
603
- "sweepstakesContestAuction",
604
- "financialBanking",
605
- "premiumWap",
606
- "queryService",
607
- "wallpaperScreensaver",
608
- "voting",
609
- "application",
610
- "mobileGivingDonations",
611
- "coupons",
612
- "loyaltyProgram",
613
- "noPointsPrizes",
614
- "informationalAlerts",
615
- "microBilling",
616
- "trivia",
617
- "entertainmentAlerts",
618
- "accountNotification",
619
- "ageGatedContent",
620
- "conversationalMessaging",
621
- "deliveryNotification",
622
- "education",
623
- "emergencyAlerts",
624
- "fraudAlerts",
625
- "loanArrangement",
626
- "onBehalfOfCarrier",
627
- "political",
628
- "promotionalMarketing",
629
- "publicServiceAnnouncements",
630
- "securityAlerts",
631
- "socialMedia",
632
- "twoFactorAuthentication",
633
- "other"
634
- ]
594
+ name: "String"
635
595
  }
636
596
  },
637
597
  examples: {
@@ -677,8 +637,7 @@ const MessageExample = {
677
637
  direction: {
678
638
  serializedName: "direction",
679
639
  type: {
680
- name: "Enum",
681
- allowedValues: ["toUser", "fromUser"]
640
+ name: "String"
682
641
  }
683
642
  },
684
643
  text: {
@@ -830,6 +789,7 @@ const endpoint = {
830
789
  const skip = {
831
790
  parameterPath: ["options", "skip"],
832
791
  mapper: {
792
+ defaultValue: 0,
833
793
  serializedName: "skip",
834
794
  type: {
835
795
  name: "Number"
@@ -901,10 +861,11 @@ const nextLink = {
901
861
  * Code generated by Microsoft (R) AutoRest Code Generator.
902
862
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
903
863
  */
904
- /** Class representing a ShortCodes. */
905
- class ShortCodes$1 {
864
+ /// <reference lib="esnext.asynciterable" />
865
+ /** Class containing ShortCodesOperations operations. */
866
+ class ShortCodesOperationsImpl {
906
867
  /**
907
- * Initialize a new instance of the class ShortCodes class.
868
+ * Initialize a new instance of the class ShortCodesOperations class.
908
869
  * @param client Reference to the service client
909
870
  */
910
871
  constructor(client) {
@@ -1011,10 +972,7 @@ class ShortCodes$1 {
1011
972
  * @param options The options parameters.
1012
973
  */
1013
974
  _getShortCodes(options) {
1014
- const operationArguments = {
1015
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
1016
- };
1017
- return this.client.sendOperationRequest(operationArguments, getShortCodesOperationSpec);
975
+ return this.client.sendOperationRequest({ options }, getShortCodesOperationSpec);
1018
976
  }
1019
977
  /**
1020
978
  * Creates or updates a US Program Brief.
@@ -1022,11 +980,7 @@ class ShortCodes$1 {
1022
980
  * @param options The options parameters.
1023
981
  */
1024
982
  upsertUSProgramBrief(programBriefId, options) {
1025
- const operationArguments = {
1026
- programBriefId,
1027
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
1028
- };
1029
- return this.client.sendOperationRequest(operationArguments, upsertUSProgramBriefOperationSpec);
983
+ return this.client.sendOperationRequest({ programBriefId, options }, upsertUSProgramBriefOperationSpec);
1030
984
  }
1031
985
  /**
1032
986
  * Deletes a US Program Brief.
@@ -1034,43 +988,30 @@ class ShortCodes$1 {
1034
988
  * @param options The options parameters.
1035
989
  */
1036
990
  deleteUSProgramBrief(programBriefId, options) {
1037
- const operationArguments = {
1038
- programBriefId,
1039
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
1040
- };
1041
- return this.client.sendOperationRequest(operationArguments, deleteUSProgramBriefOperationSpec);
991
+ return this.client.sendOperationRequest({ programBriefId, options }, deleteUSProgramBriefOperationSpec);
1042
992
  }
1043
993
  /**
1044
- * @param programBriefId
994
+ * Get a US Program Brief by id.
995
+ * @param programBriefId Program Brief Id. Must be a valid GUID
1045
996
  * @param options The options parameters.
1046
997
  */
1047
998
  getUSProgramBrief(programBriefId, options) {
1048
- const operationArguments = {
1049
- programBriefId,
1050
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
1051
- };
1052
- return this.client.sendOperationRequest(operationArguments, getUSProgramBriefOperationSpec);
999
+ return this.client.sendOperationRequest({ programBriefId, options }, getUSProgramBriefOperationSpec);
1053
1000
  }
1054
1001
  /**
1055
- * @param programBriefId
1002
+ * Submits a US Program Brief for review.
1003
+ * @param programBriefId Program Brief Id. Must be a valid GUID
1056
1004
  * @param options The options parameters.
1057
1005
  */
1058
1006
  submitUSProgramBrief(programBriefId, options) {
1059
- const operationArguments = {
1060
- programBriefId,
1061
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
1062
- };
1063
- return this.client.sendOperationRequest(operationArguments, submitUSProgramBriefOperationSpec);
1007
+ return this.client.sendOperationRequest({ programBriefId, options }, submitUSProgramBriefOperationSpec);
1064
1008
  }
1065
1009
  /**
1066
1010
  * Gets the list of US Program Briefs for the current resource.
1067
1011
  * @param options The options parameters.
1068
1012
  */
1069
1013
  _getUSProgramBriefs(options) {
1070
- const operationArguments = {
1071
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
1072
- };
1073
- return this.client.sendOperationRequest(operationArguments, getUSProgramBriefsOperationSpec);
1014
+ return this.client.sendOperationRequest({ options }, getUSProgramBriefsOperationSpec);
1074
1015
  }
1075
1016
  /**
1076
1017
  * GetShortCodesNext
@@ -1078,11 +1019,7 @@ class ShortCodes$1 {
1078
1019
  * @param options The options parameters.
1079
1020
  */
1080
1021
  _getShortCodesNext(nextLink, options) {
1081
- const operationArguments = {
1082
- nextLink,
1083
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
1084
- };
1085
- return this.client.sendOperationRequest(operationArguments, getShortCodesNextOperationSpec);
1022
+ return this.client.sendOperationRequest({ nextLink, options }, getShortCodesNextOperationSpec);
1086
1023
  }
1087
1024
  /**
1088
1025
  * GetUSProgramBriefsNext
@@ -1090,15 +1027,11 @@ class ShortCodes$1 {
1090
1027
  * @param options The options parameters.
1091
1028
  */
1092
1029
  _getUSProgramBriefsNext(nextLink, options) {
1093
- const operationArguments = {
1094
- nextLink,
1095
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
1096
- };
1097
- return this.client.sendOperationRequest(operationArguments, getUSProgramBriefsNextOperationSpec);
1030
+ return this.client.sendOperationRequest({ nextLink, options }, getUSProgramBriefsNextOperationSpec);
1098
1031
  }
1099
1032
  }
1100
1033
  // Operation Specifications
1101
- const serializer = new coreHttp.Serializer(Mappers, /* isXml */ false);
1034
+ const serializer = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
1102
1035
  const getShortCodesOperationSpec = {
1103
1036
  path: "/shortCodes",
1104
1037
  httpMethod: "GET",
@@ -1238,9 +1171,7 @@ const getUSProgramBriefsNextOperationSpec = {
1238
1171
  * Code generated by Microsoft (R) AutoRest Code Generator.
1239
1172
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1240
1173
  */
1241
- const packageName = "azure-communication-short-codes";
1242
- const packageVersion = "1.0.0-beta.1";
1243
- class ShortCodesClientContext extends coreHttp.ServiceClient {
1174
+ class ShortCodesClientContext extends coreClient__namespace.ServiceClient {
1244
1175
  /**
1245
1176
  * Initializes a new instance of the ShortCodesClientContext class.
1246
1177
  * @param endpoint The communication resource, for example https://resourcename.communication.azure.com
@@ -1254,13 +1185,17 @@ class ShortCodesClientContext extends coreHttp.ServiceClient {
1254
1185
  if (!options) {
1255
1186
  options = {};
1256
1187
  }
1257
- if (!options.userAgent) {
1258
- const defaultUserAgent = coreHttp.getDefaultUserAgentValue();
1259
- options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
1260
- }
1261
- super(undefined, options);
1262
- this.requestContentType = "application/json; charset=utf-8";
1263
- this.baseUri = options.endpoint || "{endpoint}";
1188
+ const defaults = {
1189
+ requestContentType: "application/json; charset=utf-8"
1190
+ };
1191
+ const packageDetails = `azsdk-js-communication-short-codes/1.0.0-beta.2`;
1192
+ const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
1193
+ ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
1194
+ : `${packageDetails}`;
1195
+ const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
1196
+ userAgentPrefix
1197
+ }, baseUri: options.endpoint || "{endpoint}" });
1198
+ super(optionsWithDefaults);
1264
1199
  // Parameter assignments
1265
1200
  this.endpoint = endpoint;
1266
1201
  // Assigning values to Constant parameters
@@ -1275,7 +1210,7 @@ class ShortCodesClientContext extends coreHttp.ServiceClient {
1275
1210
  * Code generated by Microsoft (R) AutoRest Code Generator.
1276
1211
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1277
1212
  */
1278
- class ShortCodesClient extends ShortCodesClientContext {
1213
+ class ShortCodesClient$1 extends ShortCodesClientContext {
1279
1214
  /**
1280
1215
  * Initializes a new instance of the ShortCodesClient class.
1281
1216
  * @param endpoint The communication resource, for example https://resourcename.communication.azure.com
@@ -1283,46 +1218,36 @@ class ShortCodesClient extends ShortCodesClientContext {
1283
1218
  */
1284
1219
  constructor(endpoint, options) {
1285
1220
  super(endpoint, options);
1286
- this.shortCodes = new ShortCodes$1(this);
1221
+ this.shortCodesOperations = new ShortCodesOperationsImpl(this);
1287
1222
  }
1288
1223
  }
1289
1224
 
1290
1225
  // Copyright (c) Microsoft Corporation.
1291
1226
  const isShortCodesClientOptions = (options) => options && !communicationCommon.isKeyCredential(options) && !coreAuth.isTokenCredential(options);
1292
- class ShortCodesClient$1 {
1227
+ class ShortCodesClient {
1293
1228
  constructor(connectionStringOrUrl, credentialOrOptions, maybeOptions = {}) {
1294
1229
  const { url, credential } = communicationCommon.parseClientArguments(connectionStringOrUrl, credentialOrOptions);
1295
1230
  const options = isShortCodesClientOptions(credentialOrOptions)
1296
1231
  ? credentialOrOptions
1297
1232
  : maybeOptions;
1298
- const libInfo = `azsdk-js-communication-short-codes/${SDK_VERSION}`;
1299
- if (!options.userAgentOptions) {
1300
- options.userAgentOptions = {};
1301
- }
1302
- if (options.userAgentOptions.userAgentPrefix) {
1303
- options.userAgentOptions.userAgentPrefix = `${options.userAgentOptions.userAgentPrefix} ${libInfo}`;
1304
- }
1305
- else {
1306
- options.userAgentOptions.userAgentPrefix = libInfo;
1307
- }
1308
1233
  const internalPipelineOptions = Object.assign(Object.assign({}, options), {
1309
1234
  loggingOptions: {
1310
- logger: logger.info
1311
- }
1235
+ logger: logger.info,
1236
+ },
1312
1237
  });
1238
+ this.client = new ShortCodesClient$1(url, internalPipelineOptions);
1313
1239
  const authPolicy = communicationCommon.createCommunicationAuthPolicy(credential);
1314
- const pipeline = coreHttp.createPipelineFromOptions(internalPipelineOptions, authPolicy);
1315
- this.client = new ShortCodesClient(url, pipeline).shortCodes;
1240
+ this.client.pipeline.addPolicy(authPolicy);
1316
1241
  }
1317
1242
  listShortCodes(options = {}) {
1318
1243
  const { span, updatedOptions } = createSpan("ShortCodesClient-listShortCodes", options);
1319
1244
  try {
1320
- return this.client.listShortCodes(updatedOptions);
1245
+ return this.client.shortCodesOperations.listShortCodes(updatedOptions);
1321
1246
  }
1322
1247
  catch (e) {
1323
1248
  span.setStatus({
1324
1249
  code: coreTracing.SpanStatusCode.ERROR,
1325
- message: e.message
1250
+ message: e.message,
1326
1251
  });
1327
1252
  throw e;
1328
1253
  }
@@ -1333,12 +1258,12 @@ class ShortCodesClient$1 {
1333
1258
  async upsertUSProgramBrief(programBriefId, options = {}) {
1334
1259
  const { span, updatedOptions } = createSpan("ShortCodesClient-upsertUSProgramBrief", options);
1335
1260
  try {
1336
- return await this.client.upsertUSProgramBrief(programBriefId, updatedOptions);
1261
+ return await this.client.shortCodesOperations.upsertUSProgramBrief(programBriefId, updatedOptions);
1337
1262
  }
1338
1263
  catch (e) {
1339
1264
  span.setStatus({
1340
1265
  code: coreTracing.SpanStatusCode.ERROR,
1341
- message: e.message
1266
+ message: e.message,
1342
1267
  });
1343
1268
  throw e;
1344
1269
  }
@@ -1349,12 +1274,12 @@ class ShortCodesClient$1 {
1349
1274
  async deleteUSProgramBrief(programBriefId, options) {
1350
1275
  const { span, updatedOptions } = createSpan("ShortCodesClient-deleteUSProgramBrief", options);
1351
1276
  try {
1352
- return await this.client.deleteUSProgramBrief(programBriefId, updatedOptions);
1277
+ return await this.client.shortCodesOperations.deleteUSProgramBrief(programBriefId, updatedOptions);
1353
1278
  }
1354
1279
  catch (e) {
1355
1280
  span.setStatus({
1356
1281
  code: coreTracing.SpanStatusCode.ERROR,
1357
- message: e.message
1282
+ message: e.message,
1358
1283
  });
1359
1284
  throw e;
1360
1285
  }
@@ -1365,12 +1290,12 @@ class ShortCodesClient$1 {
1365
1290
  async getUSProgramBrief(programBriefId, options) {
1366
1291
  const { span, updatedOptions } = createSpan("ShortCodesClient-getUSProgramBrief", options);
1367
1292
  try {
1368
- return await this.client.getUSProgramBrief(programBriefId, updatedOptions);
1293
+ return await this.client.shortCodesOperations.getUSProgramBrief(programBriefId, updatedOptions);
1369
1294
  }
1370
1295
  catch (e) {
1371
1296
  span.setStatus({
1372
1297
  code: coreTracing.SpanStatusCode.ERROR,
1373
- message: e.message
1298
+ message: e.message,
1374
1299
  });
1375
1300
  throw e;
1376
1301
  }
@@ -1381,12 +1306,12 @@ class ShortCodesClient$1 {
1381
1306
  listUSProgramBriefs(options = {}) {
1382
1307
  const { span, updatedOptions } = createSpan("ShortCodesClient-listUSProgramBriefs", options);
1383
1308
  try {
1384
- return this.client.listUSProgramBriefs(updatedOptions);
1309
+ return this.client.shortCodesOperations.listUSProgramBriefs(updatedOptions);
1385
1310
  }
1386
1311
  catch (e) {
1387
1312
  span.setStatus({
1388
1313
  code: coreTracing.SpanStatusCode.ERROR,
1389
- message: e.message
1314
+ message: e.message,
1390
1315
  });
1391
1316
  throw e;
1392
1317
  }
@@ -1397,12 +1322,12 @@ class ShortCodesClient$1 {
1397
1322
  async submitUSProgramBrief(programBriefId, options) {
1398
1323
  const { span, updatedOptions } = createSpan("ShortCodesClient-submitUSProgramBrief", options);
1399
1324
  try {
1400
- return await this.client.submitUSProgramBrief(programBriefId, updatedOptions);
1325
+ return await this.client.shortCodesOperations.submitUSProgramBrief(programBriefId, updatedOptions);
1401
1326
  }
1402
1327
  catch (e) {
1403
1328
  span.setStatus({
1404
1329
  code: coreTracing.SpanStatusCode.ERROR,
1405
- message: e.message
1330
+ message: e.message,
1406
1331
  });
1407
1332
  throw e;
1408
1333
  }
@@ -1412,5 +1337,5 @@ class ShortCodesClient$1 {
1412
1337
  }
1413
1338
  }
1414
1339
 
1415
- exports.ShortCodesClient = ShortCodesClient$1;
1340
+ exports.ShortCodesClient = ShortCodesClient;
1416
1341
  //# sourceMappingURL=index.js.map