@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure-tools/communication-short-codes",
3
- "version": "1.0.0-beta.2",
3
+ "version": "1.0.0-beta.3",
4
4
  "description": "SDK for Azure Communication Services which facilitates short code management.",
5
5
  "sdk-type": "client",
6
6
  "main": "dist/index.js",
@@ -20,18 +20,18 @@
20
20
  "execute:samples": "dev-tool samples run samples-dev",
21
21
  "extract-api": "tsc -p . && api-extractor run --local",
22
22
  "format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"",
23
- "integration-test:browser": "karma start --single-run",
24
- "integration-test:node": "nyc mocha -r esm --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --full-trace -t 300000 dist-esm/test/public/*.spec.js dist-esm/test/public/node/*.spec.js",
23
+ "integration-test:browser": "dev-tool run test:browser",
24
+ "integration-test:node": "dev-tool run test:node-js-input -- --timeout 300000 'dist-esm/test/public/*.spec.js'",
25
25
  "integration-test": "npm run integration-test:node && npm run integration-test:browser",
26
- "lint:fix": "eslint package.json api-extractor.json src test --ext .ts --fix --fix-type [problem,suggestion]",
27
- "lint": "eslint package.json api-extractor.json src test --ext .ts",
26
+ "lint:fix": "eslint package.json api-extractor.json README.md src test --ext .ts,.javascript,.js --fix --fix-type [problem,suggestion]",
27
+ "lint": "eslint package.json api-extractor.json README.md src test --ext .ts,.javascript,.js",
28
28
  "pack": "npm pack 2>&1",
29
29
  "test": "rimraf dist-test && npm run build:test && npm run unit-test && npm run integration-test",
30
30
  "test:browser": "npm run build:test && npm run unit-test:browser && npm run integration-test:browser",
31
31
  "test:node": "npm run build:test && npm run unit-test:node && npm run integration-test:node",
32
32
  "test:watch": "npm run test -- --watch --reporter min",
33
- "unit-test:browser": "karma start --single-run",
34
- "unit-test:node": "mocha -r esm -r ts-node/register --reporter ../../../common/tools/mocha-multi-reporter.js --full-trace --exclude \"test/**/browser/*.spec.ts\" \"test/**/*.spec.ts\"",
33
+ "unit-test:browser": "dev-tool run test:browser",
34
+ "unit-test:node": "dev-tool run test:node-ts-input -- --exclude 'test/**/browser/*.spec.ts' 'test/**/*.spec.ts'",
35
35
  "unit-test": "npm run unit-test:node && npm run unit-test:browser"
36
36
  },
37
37
  "files": [
@@ -72,12 +72,12 @@
72
72
  "tslib": "^2.2.0"
73
73
  },
74
74
  "devDependencies": {
75
- "@azure-tools/test-recorder": "^1.0.0",
75
+ "@azure-tools/test-recorder": "^2.0.0",
76
76
  "@azure/dev-tool": "^1.0.0",
77
77
  "@azure/eslint-plugin-azure-sdk": "^3.0.0",
78
78
  "@azure/identity": "^2.0.1",
79
79
  "@azure/test-utils": "^1.0.0",
80
- "@microsoft/api-extractor": "^7.18.11",
80
+ "@microsoft/api-extractor": "7.18.11",
81
81
  "@types/chai": "^4.1.6",
82
82
  "@types/mocha": "^7.0.2",
83
83
  "@types/node": "^12.0.0",
@@ -85,7 +85,7 @@
85
85
  "chai": "^4.2.0",
86
86
  "cross-env": "^7.0.2",
87
87
  "dotenv": "^8.2.0",
88
- "eslint": "^7.15.0",
88
+ "eslint": "^8.0.0",
89
89
  "inherits": "^2.0.3",
90
90
  "karma": "^6.2.0",
91
91
  "karma-chrome-launcher": "^3.0.0",
@@ -94,8 +94,6 @@
94
94
  "karma-env-preprocessor": "^0.1.1",
95
95
  "karma-firefox-launcher": "^1.1.0",
96
96
  "karma-ie-launcher": "^1.0.0",
97
- "karma-json-preprocessor": "^0.3.3",
98
- "karma-json-to-file-reporter": "^1.0.1",
99
97
  "karma-junit-reporter": "^2.0.1",
100
98
  "karma-mocha": "^2.0.1",
101
99
  "karma-mocha-reporter": "^2.2.5",
@@ -7,9 +7,15 @@ import { OperationOptions } from '@azure/core-client';
7
7
  import { PagedAsyncIterableIterator } from '@azure/core-paging';
8
8
  import { TokenCredential } from '@azure/core-auth';
9
9
 
10
+ /** Defines values for AttachmentType. */
11
+ export declare type AttachmentType = "callToAction" | "termsOfService" | "privacyPolicy" | "other";
12
+
10
13
  /** Defines values for BillingFrequency. */
11
14
  export declare type BillingFrequency = "monthly" | "once";
12
15
 
16
+ /** Defines values for CallToActionType. */
17
+ export declare type CallToActionType = "website" | "pointOfSale" | "sms" | "interactiveVoiceResponse";
18
+
13
19
  export declare interface CompanyInformation {
14
20
  /** Legal entity name for customer submitting Program Brief. */
15
21
  name?: string;
@@ -47,6 +53,9 @@ export declare interface CustomerCareInformation {
47
53
  export declare interface DeleteUSProgramBriefOptions extends OperationOptions {
48
54
  }
49
55
 
56
+ /** Defines values for FileType. */
57
+ export declare type FileType = "png" | "jpg" | "jpeg" | "pdf";
58
+
50
59
  /**
51
60
  * Additional options for the Get US Program Brief request.
52
61
  */
@@ -65,28 +74,28 @@ export declare interface ListShortCodesOptions extends ShortCodesGetShortCodesOp
65
74
  export declare interface ListUSProgramBriefsOptions extends OperationOptions {
66
75
  }
67
76
 
68
- /** Defines values for MessageContentCategory. */
69
- export declare type MessageContentCategory = "ringTones" | "smsChat" | "video" | "loyaltyProgramPointsPrizes" | "gifting" | "inApplicationBilling" | "textToScreen" | "games" | "audioChat" | "mmsPictures" | "sweepstakesContestAuction" | "financialBanking" | "premiumWap" | "queryService" | "wallpaperScreensaver" | "voting" | "application" | "mobileGivingDonations" | "coupons" | "loyaltyProgram" | "noPointsPrizes" | "informationalAlerts" | "microBilling" | "trivia" | "entertainmentAlerts" | "accountNotification" | "ageGatedContent" | "conversationalMessaging" | "deliveryNotification" | "education" | "emergencyAlerts" | "fraudAlerts" | "loanArrangement" | "onBehalfOfCarrier" | "political" | "promotionalMarketing" | "publicServiceAnnouncements" | "securityAlerts" | "socialMedia" | "twoFactorAuthentication" | "other";
77
+ /** Defines values for MessageContentType. */
78
+ export declare type MessageContentType = "accountNotificationInformationalAlerts" | "ageGatedContent" | "chatConversationalMessaging" | "deliveryNotification" | "donationsPledge" | "education" | "fraudAlerts" | "loanArrangement" | "loyaltyProgram" | "marketingAndPromotion" | "mmsPicture" | "mmsVideo" | "oneTimePasswordOrMultiFactorAuthentication" | "political" | "publicServiceAnnouncements" | "securityAlerts" | "socialMedia" | "sweepstakesOrContest" | "votingOrPolling" | "other";
70
79
 
71
80
  export declare interface MessageDetails {
72
- /** Applicable message protocols used in the program e.g. SMS, MMS. */
73
- supportedProtocols?: MessageProtocol[];
81
+ /** Applicable message protocol used in the program e.g. SMS or MMS. */
82
+ supportedProtocol?: MessageProtocol;
74
83
  /** Indicates the nature of the messaging associated with the program e.g. 'subscription', 'transaction'. */
75
84
  recurrence?: Recurrence;
76
85
  /**
77
86
  * Message text for mobile terminated message associated with HELP keyword
78
87
  * e.g 'This is the HELP message test.'.
79
88
  */
80
- helpMessage?: string;
89
+ helpAnswerToUser?: string;
81
90
  /**
82
91
  * "Message text for mobile terminated message associated with STOP keyword
83
92
  * e.g. 'This is the STOP message test.'.
84
93
  */
85
- optOutMessage?: string;
86
- optInMessage?: string;
94
+ optOutAnswerToUser?: string;
95
+ optInMessageToUser?: string;
87
96
  /** Keyword used to confirm double Opt-In method e.g. 'JOIN'. */
88
- optInReply?: string;
89
- confirmationMessage?: string;
97
+ optInAnswerFromUser?: string;
98
+ optInConfirmationMessageToUser?: string;
90
99
  /** Describes directionality e.g. oneWay or twoWay */
91
100
  directionality?: MessageDirectionality;
92
101
  /** Provides message exchange examples from and to end user for each supported message content type. */
@@ -119,6 +128,47 @@ export declare type MessageProtocol = "sms" | "mms";
119
128
  /** Defines values for NumberType. */
120
129
  export declare type NumberType = "shortCode" | "alphaId";
121
130
 
131
+ /** A File Attachment for a Program Brief */
132
+ export declare interface ProgramBriefAttachment {
133
+ /** Program Brief Attachment Id. */
134
+ id: string;
135
+ /**
136
+ * Attachment type describing the purpose of the attachment
137
+ * e.g. 'callToAction', 'termsOfService'
138
+ */
139
+ type: AttachmentType;
140
+ /**
141
+ * The name of the file being attached
142
+ * e.g. 'myFile01'
143
+ */
144
+ fileName: string;
145
+ /** File size in bytes. */
146
+ fileSizeInBytes?: number;
147
+ /**
148
+ * The type of file being attached
149
+ * e.g. 'pdf', 'jpg', 'png'
150
+ */
151
+ fileType: FileType;
152
+ /** File content as base 64 encoded string */
153
+ fileContentBase64: string;
154
+ }
155
+
156
+ /** A summary of Program Brief File Attachment data */
157
+ export declare interface ProgramBriefAttachmentSummary {
158
+ /** Program Brief Attachment Id. */
159
+ id?: string;
160
+ /**
161
+ * Attachment type describing the purpose of the attachment
162
+ * e.g. 'callToAction', 'termsOfService'
163
+ */
164
+ type?: AttachmentType;
165
+ /**
166
+ * The name of the attached file
167
+ * e.g. 'myFile01'
168
+ */
169
+ fileName?: string;
170
+ }
171
+
122
172
  /** Defines values for ProgramBriefStatus. */
123
173
  export declare type ProgramBriefStatus = "submitted" | "approved" | "submitNewVanityNumbers" | "updateProgramBrief" | "draft" | "denied";
124
174
 
@@ -145,9 +195,11 @@ export declare interface ProgramDetails {
145
195
  /** URL for the program or company. */
146
196
  url?: string;
147
197
  /** Indicates how the consumer can sign up to the program e.g. 'website', 'pointOfSale' and/or 'sms'. */
148
- signUpTypes?: ProgramSignUpType[];
198
+ callToActionTypes?: CallToActionType[];
149
199
  /** URL for "call to action" image for the program. */
150
- signUpUrl?: string;
200
+ callToActionUrl?: string;
201
+ /** Call to action text. To be provided when InteractiveVoiceResponse is specified as call to action type */
202
+ callToAction?: string;
151
203
  /** URL for program terms of service. */
152
204
  termsOfServiceUrl?: string;
153
205
  /** URL for privacy policy. */
@@ -160,9 +212,6 @@ export declare interface ProgramDetails {
160
212
  expectedDateOfService?: Date;
161
213
  }
162
214
 
163
- /** Defines values for ProgramSignUpType. */
164
- export declare type ProgramSignUpType = "website" | "pointOfSale" | "sms" | "interactiveVoiceResponse";
165
-
166
215
  /** Defines values for Recurrence. */
167
216
  export declare type Recurrence = "subscription" | "transaction";
168
217
 
@@ -212,6 +261,10 @@ export declare class ShortCodesClient {
212
261
  getUSProgramBrief(programBriefId: string, options?: GetUSProgramBriefOptions): Promise<USProgramBrief>;
213
262
  listUSProgramBriefs(options?: ListUSProgramBriefsOptions): PagedAsyncIterableIterator<USProgramBrief>;
214
263
  submitUSProgramBrief(programBriefId: string, options?: SubmitUSProgramBriefOptions): Promise<USProgramBrief>;
264
+ getUSProgramBriefAttachment(programBriefId: string, attachmentId: string, options?: ShortCodesGetUSProgramBriefAttachmentOptionalParams): Promise<ProgramBriefAttachment>;
265
+ listUSProgramBriefAttachments(programBriefId: string, options?: ShortCodesGetUSProgramBriefAttachmentsOptionalParams): PagedAsyncIterableIterator<ProgramBriefAttachment>;
266
+ deleteUSProgramBriefAttachment(programBriefId: string, attachmentId: string, options?: ShortCodesDeleteUSProgramBriefAttachmentOptionalParams): Promise<void>;
267
+ createOrReplaceUSProgramBriefAttachment(programBriefId: string, attachmentId: string, fileName: string, fileType: FileType, fileContent: string, attachmentType: AttachmentType, options?: ShortCodesCreateOrReplaceUSProgramBriefAttachmentOptionalParams): Promise<ProgramBriefAttachment>;
215
268
  }
216
269
 
217
270
  /**
@@ -220,6 +273,16 @@ export declare class ShortCodesClient {
220
273
  export declare interface ShortCodesClientOptions extends CommonClientOptions {
221
274
  }
222
275
 
276
+ /** Optional parameters. */
277
+ export declare interface ShortCodesCreateOrReplaceUSProgramBriefAttachmentOptionalParams extends coreClient.OperationOptions {
278
+ /** File size in bytes. */
279
+ fileSizeInBytes?: number;
280
+ }
281
+
282
+ /** Optional parameters. */
283
+ export declare interface ShortCodesDeleteUSProgramBriefAttachmentOptionalParams extends coreClient.OperationOptions {
284
+ }
285
+
223
286
  /** Optional parameters. */
224
287
  export declare interface ShortCodesGetShortCodesOptionalParams extends coreClient.OperationOptions {
225
288
  /** An optional parameter for how many entries to skip, for pagination purposes. */
@@ -228,6 +291,18 @@ export declare interface ShortCodesGetShortCodesOptionalParams extends coreClien
228
291
  top?: number;
229
292
  }
230
293
 
294
+ /** Optional parameters. */
295
+ export declare interface ShortCodesGetUSProgramBriefAttachmentOptionalParams extends coreClient.OperationOptions {
296
+ }
297
+
298
+ /** Optional parameters. */
299
+ export declare interface ShortCodesGetUSProgramBriefAttachmentsOptionalParams extends coreClient.OperationOptions {
300
+ /** An optional parameter for how many entries to skip, for pagination purposes. */
301
+ skip?: number;
302
+ /** An optional parameter for how many entries to return, for pagination purposes. */
303
+ top?: number;
304
+ }
305
+
231
306
  /** Optional parameters. */
232
307
  export declare interface ShortCodesUpsertUSProgramBriefOptionalParams extends coreClient.OperationOptions {
233
308
  /** Data to create new a Program Brief or fields to update an existing Program Brief */
@@ -260,8 +335,10 @@ export declare interface TrafficDetails {
260
335
 
261
336
  /** Describes a messaging use case for a given content type by providing example messages. */
262
337
  export declare interface UseCase {
263
- /** Indicates the messaging content category used in the program e.g. 'ringTones', 'smsChat', 'video', 'loyaltyProgramPointsPrizes', 'gifting', 'inApplicationBilling', 'textToScreen'. */
264
- contentCategory?: MessageContentCategory;
338
+ /** Indicates the messaging content type used in the program e.g. 'accountNotificationInformationalAlerts', 'chatConversationalMessaging', 'mmsVideo', 'socialMedia'. */
339
+ contentType?: MessageContentType;
340
+ /** Indicates the messaging content type used in the program whenever it is not any of the pre-defined content types */
341
+ customContentType?: string;
265
342
  /** Example messages to be sent to and from the end user for the indicated content type. */
266
343
  examples?: MessageExampleSequence[];
267
344
  }
@@ -293,6 +370,8 @@ export declare interface USProgramBrief {
293
370
  companyInformation?: CompanyInformation;
294
371
  messageDetails?: MessageDetails;
295
372
  trafficDetails?: TrafficDetails;
373
+ /** A list of summarized data of attachments currently added to the Program Brief */
374
+ attachments?: ProgramBriefAttachmentSummary[];
296
375
  }
297
376
 
298
377
  export { }
package/CHANGELOG.md DELETED
@@ -1,17 +0,0 @@
1
- # Release History
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
-
10
- ## 1.0.0-beta.1 (2021-11-05)
11
-
12
- The first preview of the Azure Communication Short Codes Client has the following features:
13
-
14
- - Management of US Program Briefs
15
- - Create, Update, Get, List & Delete
16
- - US Program Brief submission for review to opt for a Short Code
17
- - List owned Short Codes