@azure-tools/communication-short-codes 1.0.0-beta.2 → 1.0.0-beta.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.
package/README.md CHANGED
@@ -7,7 +7,7 @@ The phone numbers library provides capabilities for short codes administration.
7
7
  ### Prerequisites
8
8
 
9
9
  - An [Azure subscription][azure_sub].
10
- - An existing Communication Services resource. If you need to create the resource, you can use the [Azure Portal][azure_portal], the[Azure PowerShell][azure_powershell], or the [Azure CLI][azure_cli].
10
+ - An existing Communication Services resource. If you need to create the resource, you can use the [Azure Portal][azure_portal], the [Azure PowerShell][azure_powershell], or the [Azure CLI][azure_cli].
11
11
 
12
12
  ### Installing
13
13
 
package/dist/index.js CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var communicationCommon = require('@azure/communication-common');
6
5
  var coreAuth = require('@azure/core-auth');
6
+ var communicationCommon = require('@azure/communication-common');
7
7
  var coreTracing = require('@azure/core-tracing');
8
8
  var logger$1 = require('@azure/logger');
9
9
  var coreClient = require('@azure/core-client');
@@ -274,6 +274,18 @@ const USProgramBrief = {
274
274
  name: "Composite",
275
275
  className: "TrafficDetails"
276
276
  }
277
+ },
278
+ attachments: {
279
+ serializedName: "attachments",
280
+ type: {
281
+ name: "Sequence",
282
+ element: {
283
+ type: {
284
+ name: "Composite",
285
+ className: "ProgramBriefAttachmentSummary"
286
+ }
287
+ }
288
+ }
277
289
  }
278
290
  }
279
291
  }
@@ -379,8 +391,8 @@ const ProgramDetails = {
379
391
  name: "String"
380
392
  }
381
393
  },
382
- signUpTypes: {
383
- serializedName: "signUpTypes",
394
+ callToActionTypes: {
395
+ serializedName: "callToActionTypes",
384
396
  type: {
385
397
  name: "Sequence",
386
398
  element: {
@@ -396,8 +408,14 @@ const ProgramDetails = {
396
408
  }
397
409
  }
398
410
  },
399
- signUpUrl: {
400
- serializedName: "signUpUrl",
411
+ callToActionUrl: {
412
+ serializedName: "callToActionUrl",
413
+ type: {
414
+ name: "String"
415
+ }
416
+ },
417
+ callToAction: {
418
+ serializedName: "callToAction",
401
419
  type: {
402
420
  name: "String"
403
421
  }
@@ -514,16 +532,10 @@ const MessageDetails = {
514
532
  name: "Composite",
515
533
  className: "MessageDetails",
516
534
  modelProperties: {
517
- supportedProtocols: {
518
- serializedName: "supportedProtocols",
535
+ supportedProtocol: {
536
+ serializedName: "supportedProtocol",
519
537
  type: {
520
- name: "Sequence",
521
- element: {
522
- type: {
523
- name: "Enum",
524
- allowedValues: ["sms", "mms"]
525
- }
526
- }
538
+ name: "String"
527
539
  }
528
540
  },
529
541
  recurrence: {
@@ -532,32 +544,32 @@ const MessageDetails = {
532
544
  name: "String"
533
545
  }
534
546
  },
535
- helpMessage: {
536
- serializedName: "helpMessage",
547
+ helpAnswerToUser: {
548
+ serializedName: "helpAnswerToUser",
537
549
  type: {
538
550
  name: "String"
539
551
  }
540
552
  },
541
- optOutMessage: {
542
- serializedName: "optOutMessage",
553
+ optOutAnswerToUser: {
554
+ serializedName: "optOutAnswerToUser",
543
555
  type: {
544
556
  name: "String"
545
557
  }
546
558
  },
547
- optInMessage: {
548
- serializedName: "optInMessage",
559
+ optInMessageToUser: {
560
+ serializedName: "optInMessageToUser",
549
561
  type: {
550
562
  name: "String"
551
563
  }
552
564
  },
553
- optInReply: {
554
- serializedName: "optInReply",
565
+ optInAnswerFromUser: {
566
+ serializedName: "optInAnswerFromUser",
555
567
  type: {
556
568
  name: "String"
557
569
  }
558
570
  },
559
- confirmationMessage: {
560
- serializedName: "confirmationMessage",
571
+ optInConfirmationMessageToUser: {
572
+ serializedName: "optInConfirmationMessageToUser",
561
573
  type: {
562
574
  name: "String"
563
575
  }
@@ -588,8 +600,14 @@ const UseCase = {
588
600
  name: "Composite",
589
601
  className: "UseCase",
590
602
  modelProperties: {
591
- contentCategory: {
592
- serializedName: "contentCategory",
603
+ contentType: {
604
+ serializedName: "contentType",
605
+ type: {
606
+ name: "String"
607
+ }
608
+ },
609
+ customContentType: {
610
+ serializedName: "customContentType",
593
611
  type: {
594
612
  name: "String"
595
613
  }
@@ -709,6 +727,32 @@ const TrafficDetails = {
709
727
  }
710
728
  }
711
729
  };
730
+ const ProgramBriefAttachmentSummary = {
731
+ type: {
732
+ name: "Composite",
733
+ className: "ProgramBriefAttachmentSummary",
734
+ modelProperties: {
735
+ id: {
736
+ serializedName: "id",
737
+ type: {
738
+ name: "Uuid"
739
+ }
740
+ },
741
+ type: {
742
+ serializedName: "type",
743
+ type: {
744
+ name: "String"
745
+ }
746
+ },
747
+ fileName: {
748
+ serializedName: "fileName",
749
+ type: {
750
+ name: "String"
751
+ }
752
+ }
753
+ }
754
+ }
755
+ };
712
756
  const USProgramBriefs = {
713
757
  type: {
714
758
  name: "Composite",
@@ -735,6 +779,81 @@ const USProgramBriefs = {
735
779
  }
736
780
  }
737
781
  };
782
+ const ProgramBriefAttachment = {
783
+ type: {
784
+ name: "Composite",
785
+ className: "ProgramBriefAttachment",
786
+ modelProperties: {
787
+ id: {
788
+ serializedName: "id",
789
+ required: true,
790
+ type: {
791
+ name: "Uuid"
792
+ }
793
+ },
794
+ type: {
795
+ serializedName: "type",
796
+ required: true,
797
+ type: {
798
+ name: "String"
799
+ }
800
+ },
801
+ fileName: {
802
+ serializedName: "fileName",
803
+ required: true,
804
+ type: {
805
+ name: "String"
806
+ }
807
+ },
808
+ fileSizeInBytes: {
809
+ serializedName: "fileSizeInBytes",
810
+ type: {
811
+ name: "Number"
812
+ }
813
+ },
814
+ fileType: {
815
+ serializedName: "fileType",
816
+ required: true,
817
+ type: {
818
+ name: "String"
819
+ }
820
+ },
821
+ fileContentBase64: {
822
+ serializedName: "fileContentBase64",
823
+ required: true,
824
+ type: {
825
+ name: "String"
826
+ }
827
+ }
828
+ }
829
+ }
830
+ };
831
+ const ProgramBriefAttachments = {
832
+ type: {
833
+ name: "Composite",
834
+ className: "ProgramBriefAttachments",
835
+ modelProperties: {
836
+ attachments: {
837
+ serializedName: "attachments",
838
+ type: {
839
+ name: "Sequence",
840
+ element: {
841
+ type: {
842
+ name: "Composite",
843
+ className: "ProgramBriefAttachment"
844
+ }
845
+ }
846
+ }
847
+ },
848
+ nextLink: {
849
+ serializedName: "nextLink",
850
+ type: {
851
+ name: "String"
852
+ }
853
+ }
854
+ }
855
+ }
856
+ };
738
857
 
739
858
  var Mappers = /*#__PURE__*/Object.freeze({
740
859
  __proto__: null,
@@ -754,7 +873,10 @@ var Mappers = /*#__PURE__*/Object.freeze({
754
873
  MessageExampleSequence: MessageExampleSequence,
755
874
  MessageExample: MessageExample,
756
875
  TrafficDetails: TrafficDetails,
757
- USProgramBriefs: USProgramBriefs
876
+ ProgramBriefAttachmentSummary: ProgramBriefAttachmentSummary,
877
+ USProgramBriefs: USProgramBriefs,
878
+ ProgramBriefAttachment: ProgramBriefAttachment,
879
+ ProgramBriefAttachments: ProgramBriefAttachments
758
880
  });
759
881
 
760
882
  /*
@@ -842,6 +964,27 @@ const programBriefId = {
842
964
  }
843
965
  }
844
966
  };
967
+ const contentType1 = {
968
+ parameterPath: ["options", "contentType"],
969
+ mapper: {
970
+ defaultValue: "application/json",
971
+ isConstant: true,
972
+ serializedName: "Content-Type",
973
+ type: {
974
+ name: "String"
975
+ }
976
+ }
977
+ };
978
+ const attachmentId = {
979
+ parameterPath: "attachmentId",
980
+ mapper: {
981
+ serializedName: "attachmentId",
982
+ required: true,
983
+ type: {
984
+ name: "Uuid"
985
+ }
986
+ }
987
+ };
845
988
  const nextLink = {
846
989
  parameterPath: "nextLink",
847
990
  mapper: {
@@ -967,6 +1110,55 @@ class ShortCodesOperationsImpl {
967
1110
  }
968
1111
  });
969
1112
  }
1113
+ /**
1114
+ * Gets the list of attachments from a US Program Brief.
1115
+ * @param programBriefId
1116
+ * @param options The options parameters.
1117
+ */
1118
+ listUSProgramBriefAttachments(programBriefId, options) {
1119
+ const iter = this.getUSProgramBriefAttachmentsPagingAll(programBriefId, options);
1120
+ return {
1121
+ next() {
1122
+ return iter.next();
1123
+ },
1124
+ [Symbol.asyncIterator]() {
1125
+ return this;
1126
+ },
1127
+ byPage: () => {
1128
+ return this.getUSProgramBriefAttachmentsPagingPage(programBriefId, options);
1129
+ }
1130
+ };
1131
+ }
1132
+ getUSProgramBriefAttachmentsPagingPage(programBriefId, options) {
1133
+ return tslib.__asyncGenerator(this, arguments, function* getUSProgramBriefAttachmentsPagingPage_1() {
1134
+ let result = yield tslib.__await(this._getUSProgramBriefAttachments(programBriefId, options));
1135
+ yield yield tslib.__await(result.attachments || []);
1136
+ let continuationToken = result.nextLink;
1137
+ while (continuationToken) {
1138
+ result = yield tslib.__await(this._getUSProgramBriefAttachmentsNext(programBriefId, continuationToken, options));
1139
+ continuationToken = result.nextLink;
1140
+ yield yield tslib.__await(result.attachments || []);
1141
+ }
1142
+ });
1143
+ }
1144
+ getUSProgramBriefAttachmentsPagingAll(programBriefId, options) {
1145
+ return tslib.__asyncGenerator(this, arguments, function* getUSProgramBriefAttachmentsPagingAll_1() {
1146
+ var e_3, _a;
1147
+ try {
1148
+ for (var _b = tslib.__asyncValues(this.getUSProgramBriefAttachmentsPagingPage(programBriefId, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
1149
+ const page = _c.value;
1150
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
1151
+ }
1152
+ }
1153
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
1154
+ finally {
1155
+ try {
1156
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
1157
+ }
1158
+ finally { if (e_3) throw e_3.error; }
1159
+ }
1160
+ });
1161
+ }
970
1162
  /**
971
1163
  * Gets the list of short codes for the current resource.
972
1164
  * @param options The options parameters.
@@ -1013,6 +1205,58 @@ class ShortCodesOperationsImpl {
1013
1205
  _getUSProgramBriefs(options) {
1014
1206
  return this.client.sendOperationRequest({ options }, getUSProgramBriefsOperationSpec);
1015
1207
  }
1208
+ /**
1209
+ * Creates or replace an attachment on a US Program Brief.
1210
+ * @param programBriefId Program Brief Id. Must be a valid GUID
1211
+ * @param attachmentId Attachment Id. Must be a valid GUID
1212
+ * @param id Program Brief Attachment Id.
1213
+ * @param fileName The name of the file being attached
1214
+ * e.g. 'myFile01'
1215
+ * @param fileType The type of file being attached
1216
+ * e.g. 'pdf', 'jpg', 'png'
1217
+ * @param fileContentBase64 File content as base 64 encoded string
1218
+ * @param type Attachment type describing the purpose of the attachment
1219
+ * e.g. 'callToAction', 'termsOfService'
1220
+ * @param options The options parameters.
1221
+ */
1222
+ createOrReplaceUSProgramBriefAttachment(programBriefId, attachmentId, id, fileName, fileType, fileContentBase64, type, options) {
1223
+ return this.client.sendOperationRequest({
1224
+ programBriefId,
1225
+ attachmentId,
1226
+ id,
1227
+ fileName,
1228
+ fileType,
1229
+ fileContentBase64,
1230
+ type,
1231
+ options
1232
+ }, createOrReplaceUSProgramBriefAttachmentOperationSpec);
1233
+ }
1234
+ /**
1235
+ * Gets a specific an attachment from a US Program Brief.
1236
+ * @param programBriefId Program Brief Id. Must be a valid GUID
1237
+ * @param attachmentId Attachment Id. Must be a valid GUID
1238
+ * @param options The options parameters.
1239
+ */
1240
+ getUSProgramBriefAttachment(programBriefId, attachmentId, options) {
1241
+ return this.client.sendOperationRequest({ programBriefId, attachmentId, options }, getUSProgramBriefAttachmentOperationSpec);
1242
+ }
1243
+ /**
1244
+ * Deletes a specific attachment from a US Program Brief.
1245
+ * @param programBriefId Program Brief Id. Must be a valid GUID
1246
+ * @param attachmentId Attachment Id. Must be a valid GUID
1247
+ * @param options The options parameters.
1248
+ */
1249
+ deleteUSProgramBriefAttachment(programBriefId, attachmentId, options) {
1250
+ return this.client.sendOperationRequest({ programBriefId, attachmentId, options }, deleteUSProgramBriefAttachmentOperationSpec);
1251
+ }
1252
+ /**
1253
+ * Gets the list of attachments from a US Program Brief.
1254
+ * @param programBriefId
1255
+ * @param options The options parameters.
1256
+ */
1257
+ _getUSProgramBriefAttachments(programBriefId, options) {
1258
+ return this.client.sendOperationRequest({ programBriefId, options }, getUSProgramBriefAttachmentsOperationSpec);
1259
+ }
1016
1260
  /**
1017
1261
  * GetShortCodesNext
1018
1262
  * @param nextLink The nextLink from the previous successful call to the GetShortCodes method.
@@ -1029,6 +1273,16 @@ class ShortCodesOperationsImpl {
1029
1273
  _getUSProgramBriefsNext(nextLink, options) {
1030
1274
  return this.client.sendOperationRequest({ nextLink, options }, getUSProgramBriefsNextOperationSpec);
1031
1275
  }
1276
+ /**
1277
+ * GetUSProgramBriefAttachmentsNext
1278
+ * @param programBriefId
1279
+ * @param nextLink The nextLink from the previous successful call to the GetUSProgramBriefAttachments
1280
+ * method.
1281
+ * @param options The options parameters.
1282
+ */
1283
+ _getUSProgramBriefAttachmentsNext(programBriefId, nextLink, options) {
1284
+ return this.client.sendOperationRequest({ programBriefId, nextLink, options }, getUSProgramBriefAttachmentsNextOperationSpec);
1285
+ }
1032
1286
  }
1033
1287
  // Operation Specifications
1034
1288
  const serializer = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
@@ -1131,6 +1385,95 @@ const getUSProgramBriefsOperationSpec = {
1131
1385
  headerParameters: [accept],
1132
1386
  serializer
1133
1387
  };
1388
+ const createOrReplaceUSProgramBriefAttachmentOperationSpec = {
1389
+ path: "/shortCodes/countries/US/programBriefs/{programBriefId}/attachments/{attachmentId}",
1390
+ httpMethod: "PUT",
1391
+ responses: {
1392
+ 200: {
1393
+ bodyMapper: ProgramBriefAttachment
1394
+ },
1395
+ 201: {
1396
+ bodyMapper: ProgramBriefAttachment
1397
+ },
1398
+ default: {
1399
+ bodyMapper: CommunicationErrorResponse
1400
+ }
1401
+ },
1402
+ requestBody: {
1403
+ parameterPath: {
1404
+ id: ["id"],
1405
+ type: ["type"],
1406
+ fileName: ["fileName"],
1407
+ fileSizeInBytes: ["options", "fileSizeInBytes"],
1408
+ fileType: ["fileType"],
1409
+ fileContentBase64: ["fileContentBase64"]
1410
+ },
1411
+ mapper: Object.assign(Object.assign({}, ProgramBriefAttachment), { required: true })
1412
+ },
1413
+ queryParameters: [apiVersion],
1414
+ urlParameters: [
1415
+ endpoint,
1416
+ programBriefId,
1417
+ attachmentId
1418
+ ],
1419
+ headerParameters: [accept, contentType1],
1420
+ mediaType: "json",
1421
+ serializer
1422
+ };
1423
+ const getUSProgramBriefAttachmentOperationSpec = {
1424
+ path: "/shortCodes/countries/US/programBriefs/{programBriefId}/attachments/{attachmentId}",
1425
+ httpMethod: "GET",
1426
+ responses: {
1427
+ 200: {
1428
+ bodyMapper: ProgramBriefAttachment
1429
+ },
1430
+ default: {
1431
+ bodyMapper: CommunicationErrorResponse
1432
+ }
1433
+ },
1434
+ queryParameters: [apiVersion],
1435
+ urlParameters: [
1436
+ endpoint,
1437
+ programBriefId,
1438
+ attachmentId
1439
+ ],
1440
+ headerParameters: [accept],
1441
+ serializer
1442
+ };
1443
+ const deleteUSProgramBriefAttachmentOperationSpec = {
1444
+ path: "/shortCodes/countries/US/programBriefs/{programBriefId}/attachments/{attachmentId}",
1445
+ httpMethod: "DELETE",
1446
+ responses: {
1447
+ 204: {},
1448
+ default: {
1449
+ bodyMapper: CommunicationErrorResponse
1450
+ }
1451
+ },
1452
+ queryParameters: [apiVersion],
1453
+ urlParameters: [
1454
+ endpoint,
1455
+ programBriefId,
1456
+ attachmentId
1457
+ ],
1458
+ headerParameters: [accept],
1459
+ serializer
1460
+ };
1461
+ const getUSProgramBriefAttachmentsOperationSpec = {
1462
+ path: "/shortCodes/countries/US/programBriefs/{programBriefId}/attachments",
1463
+ httpMethod: "GET",
1464
+ responses: {
1465
+ 200: {
1466
+ bodyMapper: ProgramBriefAttachments
1467
+ },
1468
+ default: {
1469
+ bodyMapper: CommunicationErrorResponse
1470
+ }
1471
+ },
1472
+ queryParameters: [skip, top, apiVersion],
1473
+ urlParameters: [endpoint, programBriefId],
1474
+ headerParameters: [accept],
1475
+ serializer
1476
+ };
1134
1477
  const getShortCodesNextOperationSpec = {
1135
1478
  path: "{nextLink}",
1136
1479
  httpMethod: "GET",
@@ -1163,6 +1506,26 @@ const getUSProgramBriefsNextOperationSpec = {
1163
1506
  headerParameters: [accept],
1164
1507
  serializer
1165
1508
  };
1509
+ const getUSProgramBriefAttachmentsNextOperationSpec = {
1510
+ path: "{nextLink}",
1511
+ httpMethod: "GET",
1512
+ responses: {
1513
+ 200: {
1514
+ bodyMapper: ProgramBriefAttachments
1515
+ },
1516
+ default: {
1517
+ bodyMapper: CommunicationErrorResponse
1518
+ }
1519
+ },
1520
+ queryParameters: [skip, top, apiVersion],
1521
+ urlParameters: [
1522
+ endpoint,
1523
+ programBriefId,
1524
+ nextLink
1525
+ ],
1526
+ headerParameters: [accept],
1527
+ serializer
1528
+ };
1166
1529
 
1167
1530
  /*
1168
1531
  * Copyright (c) Microsoft Corporation.
@@ -1188,7 +1551,7 @@ class ShortCodesClientContext extends coreClient__namespace.ServiceClient {
1188
1551
  const defaults = {
1189
1552
  requestContentType: "application/json; charset=utf-8"
1190
1553
  };
1191
- const packageDetails = `azsdk-js-communication-short-codes/1.0.0-beta.2`;
1554
+ const packageDetails = `azsdk-js-communication-short-codes/1.0.0-beta.3`;
1192
1555
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
1193
1556
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
1194
1557
  : `${packageDetails}`;
@@ -1222,7 +1585,6 @@ class ShortCodesClient$1 extends ShortCodesClientContext {
1222
1585
  }
1223
1586
  }
1224
1587
 
1225
- // Copyright (c) Microsoft Corporation.
1226
1588
  const isShortCodesClientOptions = (options) => options && !communicationCommon.isKeyCredential(options) && !coreAuth.isTokenCredential(options);
1227
1589
  class ShortCodesClient {
1228
1590
  constructor(connectionStringOrUrl, credentialOrOptions, maybeOptions = {}) {
@@ -1335,6 +1697,70 @@ class ShortCodesClient {
1335
1697
  span.end();
1336
1698
  }
1337
1699
  }
1700
+ async getUSProgramBriefAttachment(programBriefId, attachmentId, options) {
1701
+ const { span, updatedOptions } = createSpan("ShortCodesClient-getUSProgramBriefAttachment", options);
1702
+ try {
1703
+ return await this.client.shortCodesOperations.getUSProgramBriefAttachment(programBriefId, attachmentId, updatedOptions);
1704
+ }
1705
+ catch (e) {
1706
+ span.setStatus({
1707
+ code: coreTracing.SpanStatusCode.ERROR,
1708
+ message: e.message,
1709
+ });
1710
+ throw e;
1711
+ }
1712
+ finally {
1713
+ span.end();
1714
+ }
1715
+ }
1716
+ listUSProgramBriefAttachments(programBriefId, options = {}) {
1717
+ const { span, updatedOptions } = createSpan("ShortCodesClient-listUSProgramBriefAttachments", options);
1718
+ try {
1719
+ return this.client.shortCodesOperations.listUSProgramBriefAttachments(programBriefId, updatedOptions);
1720
+ }
1721
+ catch (e) {
1722
+ span.setStatus({
1723
+ code: coreTracing.SpanStatusCode.ERROR,
1724
+ message: e.message,
1725
+ });
1726
+ throw e;
1727
+ }
1728
+ finally {
1729
+ span.end();
1730
+ }
1731
+ }
1732
+ async deleteUSProgramBriefAttachment(programBriefId, attachmentId, options) {
1733
+ const { span, updatedOptions } = createSpan("ShortCodesClient-deleteUSProgramBriefAttachment", options);
1734
+ try {
1735
+ return await this.client.shortCodesOperations.deleteUSProgramBriefAttachment(programBriefId, attachmentId, updatedOptions);
1736
+ }
1737
+ catch (e) {
1738
+ span.setStatus({
1739
+ code: coreTracing.SpanStatusCode.ERROR,
1740
+ message: e.message,
1741
+ });
1742
+ throw e;
1743
+ }
1744
+ finally {
1745
+ span.end();
1746
+ }
1747
+ }
1748
+ async createOrReplaceUSProgramBriefAttachment(programBriefId, attachmentId, fileName, fileType, fileContent, attachmentType, options = {}) {
1749
+ const { span, updatedOptions } = createSpan("ShortCodesClient-createOrReplaceUSProgramBriefAttachment", options);
1750
+ try {
1751
+ return await this.client.shortCodesOperations.createOrReplaceUSProgramBriefAttachment(programBriefId, attachmentId, attachmentId, fileName, fileType, fileContent, attachmentType, updatedOptions);
1752
+ }
1753
+ catch (e) {
1754
+ span.setStatus({
1755
+ code: coreTracing.SpanStatusCode.ERROR,
1756
+ message: e.message,
1757
+ });
1758
+ throw e;
1759
+ }
1760
+ finally {
1761
+ span.end();
1762
+ }
1763
+ }
1338
1764
  }
1339
1765
 
1340
1766
  exports.ShortCodesClient = ShortCodesClient;