@azure-tools/communication-short-codes 1.0.0-beta.1 → 1.0.0-beta.4
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 +1 -1
- package/dist/index.js +596 -267
- package/dist/index.js.map +1 -1
- package/dist-esm/src/generated/src/index.js +1 -1
- package/dist-esm/src/generated/src/index.js.map +1 -1
- package/dist-esm/src/generated/src/models/index.js.map +1 -1
- package/dist-esm/src/generated/src/models/mappers.js +153 -91
- package/dist-esm/src/generated/src/models/mappers.js.map +1 -1
- package/dist-esm/src/generated/src/models/parameters.js +48 -2
- package/dist-esm/src/generated/src/models/parameters.js.map +1 -1
- package/dist-esm/src/generated/src/operations/index.js +1 -1
- package/dist-esm/src/generated/src/operations/index.js.map +1 -1
- package/dist-esm/src/generated/src/operations/shortCodesOperations.js +561 -0
- package/dist-esm/src/generated/src/operations/shortCodesOperations.js.map +1 -0
- package/dist-esm/src/generated/src/operationsInterfaces/index.js +9 -0
- package/dist-esm/src/generated/src/operationsInterfaces/index.js.map +1 -0
- package/dist-esm/src/generated/src/operationsInterfaces/shortCodesOperations.js +9 -0
- package/dist-esm/src/generated/src/operationsInterfaces/shortCodesOperations.js.map +1 -0
- package/dist-esm/src/generated/src/shortCodesClient.js +70 -5
- package/dist-esm/src/generated/src/shortCodesClient.js.map +1 -1
- package/dist-esm/src/generated/src/tracing.js +14 -0
- package/dist-esm/src/generated/src/tracing.js.map +1 -0
- package/dist-esm/src/models.js.map +1 -1
- package/dist-esm/src/shortCodesClient.js +53 -76
- package/dist-esm/src/shortCodesClient.js.map +1 -1
- package/dist-esm/src/utils/constants.js +1 -1
- package/dist-esm/src/utils/constants.js.map +1 -1
- package/dist-esm/src/utils/index.js +0 -1
- package/dist-esm/src/utils/index.js.map +1 -1
- package/package.json +42 -40
- package/types/communication-short-codes.d.ts +105 -26
- package/CHANGELOG.md +0 -10
- package/dist-esm/src/generated/src/operations/shortCodes.js +0 -341
- package/dist-esm/src/generated/src/operations/shortCodes.js.map +0 -1
- package/dist-esm/src/generated/src/shortCodesClientContext.js +0 -38
- package/dist-esm/src/generated/src/shortCodesClientContext.js.map +0 -1
- package/dist-esm/src/utils/tracing.js +0 -14
- package/dist-esm/src/utils/tracing.js.map +0 -1
|
@@ -0,0 +1,561 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
|
|
9
|
+
import { tracingClient } from "../tracing";
|
|
10
|
+
import * as coreClient from "@azure/core-client";
|
|
11
|
+
import * as Mappers from "../models/mappers";
|
|
12
|
+
import * as Parameters from "../models/parameters";
|
|
13
|
+
/// <reference lib="esnext.asynciterable" />
|
|
14
|
+
/** Class containing ShortCodesOperations operations. */
|
|
15
|
+
export class ShortCodesOperationsImpl {
|
|
16
|
+
/**
|
|
17
|
+
* Initialize a new instance of the class ShortCodesOperations class.
|
|
18
|
+
* @param client Reference to the service client
|
|
19
|
+
*/
|
|
20
|
+
constructor(client) {
|
|
21
|
+
this.client = client;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Gets the list of short codes for the current resource.
|
|
25
|
+
* @param options The options parameters.
|
|
26
|
+
*/
|
|
27
|
+
listShortCodes(options) {
|
|
28
|
+
const iter = this.getShortCodesPagingAll(options);
|
|
29
|
+
return {
|
|
30
|
+
next() {
|
|
31
|
+
return iter.next();
|
|
32
|
+
},
|
|
33
|
+
[Symbol.asyncIterator]() {
|
|
34
|
+
return this;
|
|
35
|
+
},
|
|
36
|
+
byPage: () => {
|
|
37
|
+
return this.getShortCodesPagingPage(options);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
getShortCodesPagingPage(options) {
|
|
42
|
+
return __asyncGenerator(this, arguments, function* getShortCodesPagingPage_1() {
|
|
43
|
+
let result = yield __await(this._getShortCodes(options));
|
|
44
|
+
yield yield __await(result.shortCodes || []);
|
|
45
|
+
let continuationToken = result.nextLink;
|
|
46
|
+
while (continuationToken) {
|
|
47
|
+
result = yield __await(this._getShortCodesNext(continuationToken, options));
|
|
48
|
+
continuationToken = result.nextLink;
|
|
49
|
+
yield yield __await(result.shortCodes || []);
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
getShortCodesPagingAll(options) {
|
|
54
|
+
return __asyncGenerator(this, arguments, function* getShortCodesPagingAll_1() {
|
|
55
|
+
var e_1, _a;
|
|
56
|
+
try {
|
|
57
|
+
for (var _b = __asyncValues(this.getShortCodesPagingPage(options)), _c; _c = yield __await(_b.next()), !_c.done;) {
|
|
58
|
+
const page = _c.value;
|
|
59
|
+
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
63
|
+
finally {
|
|
64
|
+
try {
|
|
65
|
+
if (_c && !_c.done && (_a = _b.return)) yield __await(_a.call(_b));
|
|
66
|
+
}
|
|
67
|
+
finally { if (e_1) throw e_1.error; }
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Gets the list of US Program Briefs for the current resource.
|
|
73
|
+
* @param options The options parameters.
|
|
74
|
+
*/
|
|
75
|
+
listUSProgramBriefs(options) {
|
|
76
|
+
const iter = this.getUSProgramBriefsPagingAll(options);
|
|
77
|
+
return {
|
|
78
|
+
next() {
|
|
79
|
+
return iter.next();
|
|
80
|
+
},
|
|
81
|
+
[Symbol.asyncIterator]() {
|
|
82
|
+
return this;
|
|
83
|
+
},
|
|
84
|
+
byPage: () => {
|
|
85
|
+
return this.getUSProgramBriefsPagingPage(options);
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
getUSProgramBriefsPagingPage(options) {
|
|
90
|
+
return __asyncGenerator(this, arguments, function* getUSProgramBriefsPagingPage_1() {
|
|
91
|
+
let result = yield __await(this._getUSProgramBriefs(options));
|
|
92
|
+
yield yield __await(result.programBriefs || []);
|
|
93
|
+
let continuationToken = result.nextLink;
|
|
94
|
+
while (continuationToken) {
|
|
95
|
+
result = yield __await(this._getUSProgramBriefsNext(continuationToken, options));
|
|
96
|
+
continuationToken = result.nextLink;
|
|
97
|
+
yield yield __await(result.programBriefs || []);
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
getUSProgramBriefsPagingAll(options) {
|
|
102
|
+
return __asyncGenerator(this, arguments, function* getUSProgramBriefsPagingAll_1() {
|
|
103
|
+
var e_2, _a;
|
|
104
|
+
try {
|
|
105
|
+
for (var _b = __asyncValues(this.getUSProgramBriefsPagingPage(options)), _c; _c = yield __await(_b.next()), !_c.done;) {
|
|
106
|
+
const page = _c.value;
|
|
107
|
+
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
111
|
+
finally {
|
|
112
|
+
try {
|
|
113
|
+
if (_c && !_c.done && (_a = _b.return)) yield __await(_a.call(_b));
|
|
114
|
+
}
|
|
115
|
+
finally { if (e_2) throw e_2.error; }
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Gets the list of attachments from a US Program Brief.
|
|
121
|
+
* @param programBriefId
|
|
122
|
+
* @param options The options parameters.
|
|
123
|
+
*/
|
|
124
|
+
listUSProgramBriefAttachments(programBriefId, options) {
|
|
125
|
+
const iter = this.getUSProgramBriefAttachmentsPagingAll(programBriefId, options);
|
|
126
|
+
return {
|
|
127
|
+
next() {
|
|
128
|
+
return iter.next();
|
|
129
|
+
},
|
|
130
|
+
[Symbol.asyncIterator]() {
|
|
131
|
+
return this;
|
|
132
|
+
},
|
|
133
|
+
byPage: () => {
|
|
134
|
+
return this.getUSProgramBriefAttachmentsPagingPage(programBriefId, options);
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
getUSProgramBriefAttachmentsPagingPage(programBriefId, options) {
|
|
139
|
+
return __asyncGenerator(this, arguments, function* getUSProgramBriefAttachmentsPagingPage_1() {
|
|
140
|
+
let result = yield __await(this._getUSProgramBriefAttachments(programBriefId, options));
|
|
141
|
+
yield yield __await(result.attachments || []);
|
|
142
|
+
let continuationToken = result.nextLink;
|
|
143
|
+
while (continuationToken) {
|
|
144
|
+
result = yield __await(this._getUSProgramBriefAttachmentsNext(programBriefId, continuationToken, options));
|
|
145
|
+
continuationToken = result.nextLink;
|
|
146
|
+
yield yield __await(result.attachments || []);
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
getUSProgramBriefAttachmentsPagingAll(programBriefId, options) {
|
|
151
|
+
return __asyncGenerator(this, arguments, function* getUSProgramBriefAttachmentsPagingAll_1() {
|
|
152
|
+
var e_3, _a;
|
|
153
|
+
try {
|
|
154
|
+
for (var _b = __asyncValues(this.getUSProgramBriefAttachmentsPagingPage(programBriefId, options)), _c; _c = yield __await(_b.next()), !_c.done;) {
|
|
155
|
+
const page = _c.value;
|
|
156
|
+
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
160
|
+
finally {
|
|
161
|
+
try {
|
|
162
|
+
if (_c && !_c.done && (_a = _b.return)) yield __await(_a.call(_b));
|
|
163
|
+
}
|
|
164
|
+
finally { if (e_3) throw e_3.error; }
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Gets the list of short codes for the current resource.
|
|
170
|
+
* @param options The options parameters.
|
|
171
|
+
*/
|
|
172
|
+
async _getShortCodes(options) {
|
|
173
|
+
return tracingClient.withSpan("ShortCodesClient._getShortCodes", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
174
|
+
return this.client.sendOperationRequest({ options }, getShortCodesOperationSpec);
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Creates or updates a US Program Brief.
|
|
179
|
+
* @param programBriefId Program Brief Id. Must be a valid GUID
|
|
180
|
+
* @param options The options parameters.
|
|
181
|
+
*/
|
|
182
|
+
async upsertUSProgramBrief(programBriefId, options) {
|
|
183
|
+
return tracingClient.withSpan("ShortCodesClient.upsertUSProgramBrief", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
184
|
+
return this.client.sendOperationRequest({ programBriefId, options }, upsertUSProgramBriefOperationSpec);
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Deletes a US Program Brief.
|
|
189
|
+
* @param programBriefId Program Brief Id. Must be a valid GUID
|
|
190
|
+
* @param options The options parameters.
|
|
191
|
+
*/
|
|
192
|
+
async deleteUSProgramBrief(programBriefId, options) {
|
|
193
|
+
return tracingClient.withSpan("ShortCodesClient.deleteUSProgramBrief", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
194
|
+
return this.client.sendOperationRequest({ programBriefId, options }, deleteUSProgramBriefOperationSpec);
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Get a US Program Brief by id.
|
|
199
|
+
* @param programBriefId Program Brief Id. Must be a valid GUID
|
|
200
|
+
* @param options The options parameters.
|
|
201
|
+
*/
|
|
202
|
+
async getUSProgramBrief(programBriefId, options) {
|
|
203
|
+
return tracingClient.withSpan("ShortCodesClient.getUSProgramBrief", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
204
|
+
return this.client.sendOperationRequest({ programBriefId, options }, getUSProgramBriefOperationSpec);
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Submits a US Program Brief for review.
|
|
209
|
+
* @param programBriefId Program Brief Id. Must be a valid GUID
|
|
210
|
+
* @param options The options parameters.
|
|
211
|
+
*/
|
|
212
|
+
async submitUSProgramBrief(programBriefId, options) {
|
|
213
|
+
return tracingClient.withSpan("ShortCodesClient.submitUSProgramBrief", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
214
|
+
return this.client.sendOperationRequest({ programBriefId, options }, submitUSProgramBriefOperationSpec);
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Gets the list of US Program Briefs for the current resource.
|
|
219
|
+
* @param options The options parameters.
|
|
220
|
+
*/
|
|
221
|
+
async _getUSProgramBriefs(options) {
|
|
222
|
+
return tracingClient.withSpan("ShortCodesClient._getUSProgramBriefs", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
223
|
+
return this.client.sendOperationRequest({ options }, getUSProgramBriefsOperationSpec);
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Creates or replace an attachment on a US Program Brief.
|
|
228
|
+
* @param programBriefId Program Brief Id. Must be a valid GUID
|
|
229
|
+
* @param attachmentId Attachment Id. Must be a valid GUID
|
|
230
|
+
* @param id Program Brief Attachment Id.
|
|
231
|
+
* @param fileName The name of the file being attached
|
|
232
|
+
* e.g. 'myFile01'
|
|
233
|
+
* @param fileType The type of file being attached
|
|
234
|
+
* e.g. 'pdf', 'jpg', 'png'
|
|
235
|
+
* @param fileContentBase64 File content as base 64 encoded string
|
|
236
|
+
* @param type Attachment type describing the purpose of the attachment
|
|
237
|
+
* e.g. 'callToAction', 'termsOfService'
|
|
238
|
+
* @param options The options parameters.
|
|
239
|
+
*/
|
|
240
|
+
async createOrReplaceUSProgramBriefAttachment(programBriefId, attachmentId, id, fileName, fileType, fileContentBase64, type, options) {
|
|
241
|
+
return tracingClient.withSpan("ShortCodesClient.createOrReplaceUSProgramBriefAttachment", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
242
|
+
return this.client.sendOperationRequest({
|
|
243
|
+
programBriefId,
|
|
244
|
+
attachmentId,
|
|
245
|
+
id,
|
|
246
|
+
fileName,
|
|
247
|
+
fileType,
|
|
248
|
+
fileContentBase64,
|
|
249
|
+
type,
|
|
250
|
+
options
|
|
251
|
+
}, createOrReplaceUSProgramBriefAttachmentOperationSpec);
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Gets a specific an attachment from a US Program Brief.
|
|
256
|
+
* @param programBriefId Program Brief Id. Must be a valid GUID
|
|
257
|
+
* @param attachmentId Attachment Id. Must be a valid GUID
|
|
258
|
+
* @param options The options parameters.
|
|
259
|
+
*/
|
|
260
|
+
async getUSProgramBriefAttachment(programBriefId, attachmentId, options) {
|
|
261
|
+
return tracingClient.withSpan("ShortCodesClient.getUSProgramBriefAttachment", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
262
|
+
return this.client.sendOperationRequest({ programBriefId, attachmentId, options }, getUSProgramBriefAttachmentOperationSpec);
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Deletes a specific attachment from a US Program Brief.
|
|
267
|
+
* @param programBriefId Program Brief Id. Must be a valid GUID
|
|
268
|
+
* @param attachmentId Attachment Id. Must be a valid GUID
|
|
269
|
+
* @param options The options parameters.
|
|
270
|
+
*/
|
|
271
|
+
async deleteUSProgramBriefAttachment(programBriefId, attachmentId, options) {
|
|
272
|
+
return tracingClient.withSpan("ShortCodesClient.deleteUSProgramBriefAttachment", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
273
|
+
return this.client.sendOperationRequest({ programBriefId, attachmentId, options }, deleteUSProgramBriefAttachmentOperationSpec);
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* Gets the list of attachments from a US Program Brief.
|
|
278
|
+
* @param programBriefId
|
|
279
|
+
* @param options The options parameters.
|
|
280
|
+
*/
|
|
281
|
+
async _getUSProgramBriefAttachments(programBriefId, options) {
|
|
282
|
+
return tracingClient.withSpan("ShortCodesClient._getUSProgramBriefAttachments", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
283
|
+
return this.client.sendOperationRequest({ programBriefId, options }, getUSProgramBriefAttachmentsOperationSpec);
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* GetShortCodesNext
|
|
288
|
+
* @param nextLink The nextLink from the previous successful call to the GetShortCodes method.
|
|
289
|
+
* @param options The options parameters.
|
|
290
|
+
*/
|
|
291
|
+
async _getShortCodesNext(nextLink, options) {
|
|
292
|
+
return tracingClient.withSpan("ShortCodesClient._getShortCodesNext", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
293
|
+
return this.client.sendOperationRequest({ nextLink, options }, getShortCodesNextOperationSpec);
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* GetUSProgramBriefsNext
|
|
298
|
+
* @param nextLink The nextLink from the previous successful call to the GetUSProgramBriefs method.
|
|
299
|
+
* @param options The options parameters.
|
|
300
|
+
*/
|
|
301
|
+
async _getUSProgramBriefsNext(nextLink, options) {
|
|
302
|
+
return tracingClient.withSpan("ShortCodesClient._getUSProgramBriefsNext", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
303
|
+
return this.client.sendOperationRequest({ nextLink, options }, getUSProgramBriefsNextOperationSpec);
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* GetUSProgramBriefAttachmentsNext
|
|
308
|
+
* @param programBriefId
|
|
309
|
+
* @param nextLink The nextLink from the previous successful call to the GetUSProgramBriefAttachments
|
|
310
|
+
* method.
|
|
311
|
+
* @param options The options parameters.
|
|
312
|
+
*/
|
|
313
|
+
async _getUSProgramBriefAttachmentsNext(programBriefId, nextLink, options) {
|
|
314
|
+
return tracingClient.withSpan("ShortCodesClient._getUSProgramBriefAttachmentsNext", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
315
|
+
return this.client.sendOperationRequest({ programBriefId, nextLink, options }, getUSProgramBriefAttachmentsNextOperationSpec);
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
// Operation Specifications
|
|
320
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
321
|
+
const getShortCodesOperationSpec = {
|
|
322
|
+
path: "/shortCodes",
|
|
323
|
+
httpMethod: "GET",
|
|
324
|
+
responses: {
|
|
325
|
+
200: {
|
|
326
|
+
bodyMapper: Mappers.ShortCodes
|
|
327
|
+
},
|
|
328
|
+
default: {
|
|
329
|
+
bodyMapper: Mappers.CommunicationErrorResponse
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
queryParameters: [Parameters.skip, Parameters.top, Parameters.apiVersion],
|
|
333
|
+
urlParameters: [Parameters.endpoint],
|
|
334
|
+
headerParameters: [Parameters.accept],
|
|
335
|
+
serializer
|
|
336
|
+
};
|
|
337
|
+
const upsertUSProgramBriefOperationSpec = {
|
|
338
|
+
path: "/shortCodes/countries/US/programBriefs/{programBriefId}",
|
|
339
|
+
httpMethod: "PATCH",
|
|
340
|
+
responses: {
|
|
341
|
+
200: {
|
|
342
|
+
bodyMapper: Mappers.USProgramBrief
|
|
343
|
+
},
|
|
344
|
+
201: {
|
|
345
|
+
bodyMapper: Mappers.USProgramBrief
|
|
346
|
+
},
|
|
347
|
+
default: {
|
|
348
|
+
bodyMapper: Mappers.CommunicationErrorResponse
|
|
349
|
+
}
|
|
350
|
+
},
|
|
351
|
+
requestBody: Parameters.body,
|
|
352
|
+
queryParameters: [Parameters.apiVersion],
|
|
353
|
+
urlParameters: [Parameters.endpoint, Parameters.programBriefId],
|
|
354
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
355
|
+
mediaType: "json",
|
|
356
|
+
serializer
|
|
357
|
+
};
|
|
358
|
+
const deleteUSProgramBriefOperationSpec = {
|
|
359
|
+
path: "/shortCodes/countries/US/programBriefs/{programBriefId}",
|
|
360
|
+
httpMethod: "DELETE",
|
|
361
|
+
responses: {
|
|
362
|
+
204: {},
|
|
363
|
+
default: {
|
|
364
|
+
bodyMapper: Mappers.CommunicationErrorResponse
|
|
365
|
+
}
|
|
366
|
+
},
|
|
367
|
+
queryParameters: [Parameters.apiVersion],
|
|
368
|
+
urlParameters: [Parameters.endpoint, Parameters.programBriefId],
|
|
369
|
+
headerParameters: [Parameters.accept],
|
|
370
|
+
serializer
|
|
371
|
+
};
|
|
372
|
+
const getUSProgramBriefOperationSpec = {
|
|
373
|
+
path: "/shortCodes/countries/US/programBriefs/{programBriefId}",
|
|
374
|
+
httpMethod: "GET",
|
|
375
|
+
responses: {
|
|
376
|
+
200: {
|
|
377
|
+
bodyMapper: Mappers.USProgramBrief
|
|
378
|
+
},
|
|
379
|
+
default: {
|
|
380
|
+
bodyMapper: Mappers.CommunicationErrorResponse
|
|
381
|
+
}
|
|
382
|
+
},
|
|
383
|
+
queryParameters: [Parameters.apiVersion],
|
|
384
|
+
urlParameters: [Parameters.endpoint, Parameters.programBriefId],
|
|
385
|
+
headerParameters: [Parameters.accept],
|
|
386
|
+
serializer
|
|
387
|
+
};
|
|
388
|
+
const submitUSProgramBriefOperationSpec = {
|
|
389
|
+
path: "/shortCodes/countries/US/programBriefs/{programBriefId}/:submit",
|
|
390
|
+
httpMethod: "POST",
|
|
391
|
+
responses: {
|
|
392
|
+
200: {
|
|
393
|
+
bodyMapper: Mappers.USProgramBrief
|
|
394
|
+
},
|
|
395
|
+
default: {
|
|
396
|
+
bodyMapper: Mappers.CommunicationErrorResponse
|
|
397
|
+
}
|
|
398
|
+
},
|
|
399
|
+
queryParameters: [Parameters.apiVersion],
|
|
400
|
+
urlParameters: [Parameters.endpoint, Parameters.programBriefId],
|
|
401
|
+
headerParameters: [Parameters.accept],
|
|
402
|
+
serializer
|
|
403
|
+
};
|
|
404
|
+
const getUSProgramBriefsOperationSpec = {
|
|
405
|
+
path: "/shortCodes/countries/US/programBriefs",
|
|
406
|
+
httpMethod: "GET",
|
|
407
|
+
responses: {
|
|
408
|
+
200: {
|
|
409
|
+
bodyMapper: Mappers.USProgramBriefs
|
|
410
|
+
},
|
|
411
|
+
default: {
|
|
412
|
+
bodyMapper: Mappers.CommunicationErrorResponse
|
|
413
|
+
}
|
|
414
|
+
},
|
|
415
|
+
queryParameters: [Parameters.skip, Parameters.top, Parameters.apiVersion],
|
|
416
|
+
urlParameters: [Parameters.endpoint],
|
|
417
|
+
headerParameters: [Parameters.accept],
|
|
418
|
+
serializer
|
|
419
|
+
};
|
|
420
|
+
const createOrReplaceUSProgramBriefAttachmentOperationSpec = {
|
|
421
|
+
path: "/shortCodes/countries/US/programBriefs/{programBriefId}/attachments/{attachmentId}",
|
|
422
|
+
httpMethod: "PUT",
|
|
423
|
+
responses: {
|
|
424
|
+
200: {
|
|
425
|
+
bodyMapper: Mappers.ProgramBriefAttachment
|
|
426
|
+
},
|
|
427
|
+
201: {
|
|
428
|
+
bodyMapper: Mappers.ProgramBriefAttachment
|
|
429
|
+
},
|
|
430
|
+
default: {
|
|
431
|
+
bodyMapper: Mappers.CommunicationErrorResponse
|
|
432
|
+
}
|
|
433
|
+
},
|
|
434
|
+
requestBody: {
|
|
435
|
+
parameterPath: {
|
|
436
|
+
id: ["id"],
|
|
437
|
+
type: ["type"],
|
|
438
|
+
fileName: ["fileName"],
|
|
439
|
+
fileSizeInBytes: ["options", "fileSizeInBytes"],
|
|
440
|
+
fileType: ["fileType"],
|
|
441
|
+
fileContentBase64: ["fileContentBase64"]
|
|
442
|
+
},
|
|
443
|
+
mapper: Object.assign(Object.assign({}, Mappers.ProgramBriefAttachment), { required: true })
|
|
444
|
+
},
|
|
445
|
+
queryParameters: [Parameters.apiVersion],
|
|
446
|
+
urlParameters: [
|
|
447
|
+
Parameters.endpoint,
|
|
448
|
+
Parameters.programBriefId,
|
|
449
|
+
Parameters.attachmentId
|
|
450
|
+
],
|
|
451
|
+
headerParameters: [Parameters.accept, Parameters.contentType1],
|
|
452
|
+
mediaType: "json",
|
|
453
|
+
serializer
|
|
454
|
+
};
|
|
455
|
+
const getUSProgramBriefAttachmentOperationSpec = {
|
|
456
|
+
path: "/shortCodes/countries/US/programBriefs/{programBriefId}/attachments/{attachmentId}",
|
|
457
|
+
httpMethod: "GET",
|
|
458
|
+
responses: {
|
|
459
|
+
200: {
|
|
460
|
+
bodyMapper: Mappers.ProgramBriefAttachment
|
|
461
|
+
},
|
|
462
|
+
default: {
|
|
463
|
+
bodyMapper: Mappers.CommunicationErrorResponse
|
|
464
|
+
}
|
|
465
|
+
},
|
|
466
|
+
queryParameters: [Parameters.apiVersion],
|
|
467
|
+
urlParameters: [
|
|
468
|
+
Parameters.endpoint,
|
|
469
|
+
Parameters.programBriefId,
|
|
470
|
+
Parameters.attachmentId
|
|
471
|
+
],
|
|
472
|
+
headerParameters: [Parameters.accept],
|
|
473
|
+
serializer
|
|
474
|
+
};
|
|
475
|
+
const deleteUSProgramBriefAttachmentOperationSpec = {
|
|
476
|
+
path: "/shortCodes/countries/US/programBriefs/{programBriefId}/attachments/{attachmentId}",
|
|
477
|
+
httpMethod: "DELETE",
|
|
478
|
+
responses: {
|
|
479
|
+
204: {},
|
|
480
|
+
default: {
|
|
481
|
+
bodyMapper: Mappers.CommunicationErrorResponse
|
|
482
|
+
}
|
|
483
|
+
},
|
|
484
|
+
queryParameters: [Parameters.apiVersion],
|
|
485
|
+
urlParameters: [
|
|
486
|
+
Parameters.endpoint,
|
|
487
|
+
Parameters.programBriefId,
|
|
488
|
+
Parameters.attachmentId
|
|
489
|
+
],
|
|
490
|
+
headerParameters: [Parameters.accept],
|
|
491
|
+
serializer
|
|
492
|
+
};
|
|
493
|
+
const getUSProgramBriefAttachmentsOperationSpec = {
|
|
494
|
+
path: "/shortCodes/countries/US/programBriefs/{programBriefId}/attachments",
|
|
495
|
+
httpMethod: "GET",
|
|
496
|
+
responses: {
|
|
497
|
+
200: {
|
|
498
|
+
bodyMapper: Mappers.ProgramBriefAttachments
|
|
499
|
+
},
|
|
500
|
+
default: {
|
|
501
|
+
bodyMapper: Mappers.CommunicationErrorResponse
|
|
502
|
+
}
|
|
503
|
+
},
|
|
504
|
+
queryParameters: [Parameters.skip, Parameters.top, Parameters.apiVersion],
|
|
505
|
+
urlParameters: [Parameters.endpoint, Parameters.programBriefId],
|
|
506
|
+
headerParameters: [Parameters.accept],
|
|
507
|
+
serializer
|
|
508
|
+
};
|
|
509
|
+
const getShortCodesNextOperationSpec = {
|
|
510
|
+
path: "{nextLink}",
|
|
511
|
+
httpMethod: "GET",
|
|
512
|
+
responses: {
|
|
513
|
+
200: {
|
|
514
|
+
bodyMapper: Mappers.ShortCodes
|
|
515
|
+
},
|
|
516
|
+
default: {
|
|
517
|
+
bodyMapper: Mappers.CommunicationErrorResponse
|
|
518
|
+
}
|
|
519
|
+
},
|
|
520
|
+
queryParameters: [Parameters.skip, Parameters.top, Parameters.apiVersion],
|
|
521
|
+
urlParameters: [Parameters.endpoint, Parameters.nextLink],
|
|
522
|
+
headerParameters: [Parameters.accept],
|
|
523
|
+
serializer
|
|
524
|
+
};
|
|
525
|
+
const getUSProgramBriefsNextOperationSpec = {
|
|
526
|
+
path: "{nextLink}",
|
|
527
|
+
httpMethod: "GET",
|
|
528
|
+
responses: {
|
|
529
|
+
200: {
|
|
530
|
+
bodyMapper: Mappers.USProgramBriefs
|
|
531
|
+
},
|
|
532
|
+
default: {
|
|
533
|
+
bodyMapper: Mappers.CommunicationErrorResponse
|
|
534
|
+
}
|
|
535
|
+
},
|
|
536
|
+
queryParameters: [Parameters.skip, Parameters.top, Parameters.apiVersion],
|
|
537
|
+
urlParameters: [Parameters.endpoint, Parameters.nextLink],
|
|
538
|
+
headerParameters: [Parameters.accept],
|
|
539
|
+
serializer
|
|
540
|
+
};
|
|
541
|
+
const getUSProgramBriefAttachmentsNextOperationSpec = {
|
|
542
|
+
path: "{nextLink}",
|
|
543
|
+
httpMethod: "GET",
|
|
544
|
+
responses: {
|
|
545
|
+
200: {
|
|
546
|
+
bodyMapper: Mappers.ProgramBriefAttachments
|
|
547
|
+
},
|
|
548
|
+
default: {
|
|
549
|
+
bodyMapper: Mappers.CommunicationErrorResponse
|
|
550
|
+
}
|
|
551
|
+
},
|
|
552
|
+
queryParameters: [Parameters.skip, Parameters.top, Parameters.apiVersion],
|
|
553
|
+
urlParameters: [
|
|
554
|
+
Parameters.endpoint,
|
|
555
|
+
Parameters.programBriefId,
|
|
556
|
+
Parameters.nextLink
|
|
557
|
+
],
|
|
558
|
+
headerParameters: [Parameters.accept],
|
|
559
|
+
serializer
|
|
560
|
+
};
|
|
561
|
+
//# sourceMappingURL=shortCodesOperations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shortCodesOperations.js","sourceRoot":"","sources":["../../../../../src/generated/src/operations/shortCodesOperations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAG3C,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAC;AAkCnD,4CAA4C;AAC5C,wDAAwD;AACxD,MAAM,OAAO,wBAAwB;IAGnC;;;OAGG;IACH,YAAY,MAAwB;QAClC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACI,cAAc,CACnB,OAA+C;QAE/C,MAAM,IAAI,GAAG,IAAI,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC;QAClD,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,GAAG,EAAE;gBACX,OAAO,IAAI,CAAC,u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AU;CACX,CAAC;AACF,MAAM,6CAA6C,GAA6B;IAC9E,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,uBAAuB;SAC5C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,0BAA0B;SAC/C;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,UAAU,CAAC,GAAG,EAAE,UAAU,CAAC,UAAU,CAAC;IACzE,aAAa,EAAE;QACb,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;KACpB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { tracingClient } from \"../tracing\";\nimport { PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport { ShortCodesOperations } from \"../operationsInterfaces\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { ShortCodesClient } from \"../shortCodesClient\";\nimport {\n ShortCode,\n ShortCodesGetShortCodesNextOptionalParams,\n ShortCodesGetShortCodesOptionalParams,\n USProgramBrief,\n ShortCodesGetUSProgramBriefsNextOptionalParams,\n ShortCodesGetUSProgramBriefsOptionalParams,\n ProgramBriefAttachment,\n ShortCodesGetUSProgramBriefAttachmentsNextOptionalParams,\n ShortCodesGetUSProgramBriefAttachmentsOptionalParams,\n ShortCodesGetShortCodesResponse,\n ShortCodesUpsertUSProgramBriefOptionalParams,\n ShortCodesUpsertUSProgramBriefResponse,\n ShortCodesDeleteUSProgramBriefOptionalParams,\n ShortCodesGetUSProgramBriefOptionalParams,\n ShortCodesGetUSProgramBriefResponse,\n ShortCodesSubmitUSProgramBriefOptionalParams,\n ShortCodesSubmitUSProgramBriefResponse,\n ShortCodesGetUSProgramBriefsResponse,\n AttachmentType,\n FileType,\n ShortCodesCreateOrReplaceUSProgramBriefAttachmentOptionalParams,\n ShortCodesCreateOrReplaceUSProgramBriefAttachmentResponse,\n ShortCodesGetUSProgramBriefAttachmentOptionalParams,\n ShortCodesGetUSProgramBriefAttachmentResponse,\n ShortCodesDeleteUSProgramBriefAttachmentOptionalParams,\n ShortCodesGetUSProgramBriefAttachmentsResponse,\n ShortCodesGetShortCodesNextResponse,\n ShortCodesGetUSProgramBriefsNextResponse,\n ShortCodesGetUSProgramBriefAttachmentsNextResponse\n} from \"../models\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing ShortCodesOperations operations. */\nexport class ShortCodesOperationsImpl implements ShortCodesOperations {\n private readonly client: ShortCodesClient;\n\n /**\n * Initialize a new instance of the class ShortCodesOperations class.\n * @param client Reference to the service client\n */\n constructor(client: ShortCodesClient) {\n this.client = client;\n }\n\n /**\n * Gets the list of short codes for the current resource.\n * @param options The options parameters.\n */\n public listShortCodes(\n options?: ShortCodesGetShortCodesOptionalParams\n ): PagedAsyncIterableIterator<ShortCode> {\n const iter = this.getShortCodesPagingAll(options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: () => {\n return this.getShortCodesPagingPage(options);\n }\n };\n }\n\n private async *getShortCodesPagingPage(\n options?: ShortCodesGetShortCodesOptionalParams\n ): AsyncIterableIterator<ShortCode[]> {\n let result = await this._getShortCodes(options);\n yield result.shortCodes || [];\n let continuationToken = result.nextLink;\n while (continuationToken) {\n result = await this._getShortCodesNext(continuationToken, options);\n continuationToken = result.nextLink;\n yield result.shortCodes || [];\n }\n }\n\n private async *getShortCodesPagingAll(\n options?: ShortCodesGetShortCodesOptionalParams\n ): AsyncIterableIterator<ShortCode> {\n for await (const page of this.getShortCodesPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Gets the list of US Program Briefs for the current resource.\n * @param options The options parameters.\n */\n public listUSProgramBriefs(\n options?: ShortCodesGetUSProgramBriefsOptionalParams\n ): PagedAsyncIterableIterator<USProgramBrief> {\n const iter = this.getUSProgramBriefsPagingAll(options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: () => {\n return this.getUSProgramBriefsPagingPage(options);\n }\n };\n }\n\n private async *getUSProgramBriefsPagingPage(\n options?: ShortCodesGetUSProgramBriefsOptionalParams\n ): AsyncIterableIterator<USProgramBrief[]> {\n let result = await this._getUSProgramBriefs(options);\n yield result.programBriefs || [];\n let continuationToken = result.nextLink;\n while (continuationToken) {\n result = await this._getUSProgramBriefsNext(continuationToken, options);\n continuationToken = result.nextLink;\n yield result.programBriefs || [];\n }\n }\n\n private async *getUSProgramBriefsPagingAll(\n options?: ShortCodesGetUSProgramBriefsOptionalParams\n ): AsyncIterableIterator<USProgramBrief> {\n for await (const page of this.getUSProgramBriefsPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Gets the list of attachments from a US Program Brief.\n * @param programBriefId\n * @param options The options parameters.\n */\n public listUSProgramBriefAttachments(\n programBriefId: string,\n options?: ShortCodesGetUSProgramBriefAttachmentsOptionalParams\n ): PagedAsyncIterableIterator<ProgramBriefAttachment> {\n const iter = this.getUSProgramBriefAttachmentsPagingAll(\n programBriefId,\n options\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: () => {\n return this.getUSProgramBriefAttachmentsPagingPage(\n programBriefId,\n options\n );\n }\n };\n }\n\n private async *getUSProgramBriefAttachmentsPagingPage(\n programBriefId: string,\n options?: ShortCodesGetUSProgramBriefAttachmentsOptionalParams\n ): AsyncIterableIterator<ProgramBriefAttachment[]> {\n let result = await this._getUSProgramBriefAttachments(\n programBriefId,\n options\n );\n yield result.attachments || [];\n let continuationToken = result.nextLink;\n while (continuationToken) {\n result = await this._getUSProgramBriefAttachmentsNext(\n programBriefId,\n continuationToken,\n options\n );\n continuationToken = result.nextLink;\n yield result.attachments || [];\n }\n }\n\n private async *getUSProgramBriefAttachmentsPagingAll(\n programBriefId: string,\n options?: ShortCodesGetUSProgramBriefAttachmentsOptionalParams\n ): AsyncIterableIterator<ProgramBriefAttachment> {\n for await (const page of this.getUSProgramBriefAttachmentsPagingPage(\n programBriefId,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Gets the list of short codes for the current resource.\n * @param options The options parameters.\n */\n private async _getShortCodes(\n options?: ShortCodesGetShortCodesOptionalParams\n ): Promise<ShortCodesGetShortCodesResponse> {\n return tracingClient.withSpan(\n \"ShortCodesClient._getShortCodes\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { options },\n getShortCodesOperationSpec\n ) as Promise<ShortCodesGetShortCodesResponse>;\n }\n );\n }\n\n /**\n * Creates or updates a US Program Brief.\n * @param programBriefId Program Brief Id. Must be a valid GUID\n * @param options The options parameters.\n */\n async upsertUSProgramBrief(\n programBriefId: string,\n options?: ShortCodesUpsertUSProgramBriefOptionalParams\n ): Promise<ShortCodesUpsertUSProgramBriefResponse> {\n return tracingClient.withSpan(\n \"ShortCodesClient.upsertUSProgramBrief\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { programBriefId, options },\n upsertUSProgramBriefOperationSpec\n ) as Promise<ShortCodesUpsertUSProgramBriefResponse>;\n }\n );\n }\n\n /**\n * Deletes a US Program Brief.\n * @param programBriefId Program Brief Id. Must be a valid GUID\n * @param options The options parameters.\n */\n async deleteUSProgramBrief(\n programBriefId: string,\n options?: ShortCodesDeleteUSProgramBriefOptionalParams\n ): Promise<void> {\n return tracingClient.withSpan(\n \"ShortCodesClient.deleteUSProgramBrief\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { programBriefId, options },\n deleteUSProgramBriefOperationSpec\n ) as Promise<void>;\n }\n );\n }\n\n /**\n * Get a US Program Brief by id.\n * @param programBriefId Program Brief Id. Must be a valid GUID\n * @param options The options parameters.\n */\n async getUSProgramBrief(\n programBriefId: string,\n options?: ShortCodesGetUSProgramBriefOptionalParams\n ): Promise<ShortCodesGetUSProgramBriefResponse> {\n return tracingClient.withSpan(\n \"ShortCodesClient.getUSProgramBrief\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { programBriefId, options },\n getUSProgramBriefOperationSpec\n ) as Promise<ShortCodesGetUSProgramBriefResponse>;\n }\n );\n }\n\n /**\n * Submits a US Program Brief for review.\n * @param programBriefId Program Brief Id. Must be a valid GUID\n * @param options The options parameters.\n */\n async submitUSProgramBrief(\n programBriefId: string,\n options?: ShortCodesSubmitUSProgramBriefOptionalParams\n ): Promise<ShortCodesSubmitUSProgramBriefResponse> {\n return tracingClient.withSpan(\n \"ShortCodesClient.submitUSProgramBrief\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { programBriefId, options },\n submitUSProgramBriefOperationSpec\n ) as Promise<ShortCodesSubmitUSProgramBriefResponse>;\n }\n );\n }\n\n /**\n * Gets the list of US Program Briefs for the current resource.\n * @param options The options parameters.\n */\n private async _getUSProgramBriefs(\n options?: ShortCodesGetUSProgramBriefsOptionalParams\n ): Promise<ShortCodesGetUSProgramBriefsResponse> {\n return tracingClient.withSpan(\n \"ShortCodesClient._getUSProgramBriefs\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { options },\n getUSProgramBriefsOperationSpec\n ) as Promise<ShortCodesGetUSProgramBriefsResponse>;\n }\n );\n }\n\n /**\n * Creates or replace an attachment on a US Program Brief.\n * @param programBriefId Program Brief Id. Must be a valid GUID\n * @param attachmentId Attachment Id. Must be a valid GUID\n * @param id Program Brief Attachment Id.\n * @param fileName The name of the file being attached\n * e.g. 'myFile01'\n * @param fileType The type of file being attached\n * e.g. 'pdf', 'jpg', 'png'\n * @param fileContentBase64 File content as base 64 encoded string\n * @param type Attachment type describing the purpose of the attachment\n * e.g. 'callToAction', 'termsOfService'\n * @param options The options parameters.\n */\n async createOrReplaceUSProgramBriefAttachment(\n programBriefId: string,\n attachmentId: string,\n id: string,\n fileName: string,\n fileType: FileType,\n fileContentBase64: string,\n type: AttachmentType,\n options?: ShortCodesCreateOrReplaceUSProgramBriefAttachmentOptionalParams\n ): Promise<ShortCodesCreateOrReplaceUSProgramBriefAttachmentResponse> {\n return tracingClient.withSpan(\n \"ShortCodesClient.createOrReplaceUSProgramBriefAttachment\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n {\n programBriefId,\n attachmentId,\n id,\n fileName,\n fileType,\n fileContentBase64,\n type,\n options\n },\n createOrReplaceUSProgramBriefAttachmentOperationSpec\n ) as Promise<ShortCodesCreateOrReplaceUSProgramBriefAttachmentResponse>;\n }\n );\n }\n\n /**\n * Gets a specific an attachment from a US Program Brief.\n * @param programBriefId Program Brief Id. Must be a valid GUID\n * @param attachmentId Attachment Id. Must be a valid GUID\n * @param options The options parameters.\n */\n async getUSProgramBriefAttachment(\n programBriefId: string,\n attachmentId: string,\n options?: ShortCodesGetUSProgramBriefAttachmentOptionalParams\n ): Promise<ShortCodesGetUSProgramBriefAttachmentResponse> {\n return tracingClient.withSpan(\n \"ShortCodesClient.getUSProgramBriefAttachment\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { programBriefId, attachmentId, options },\n getUSProgramBriefAttachmentOperationSpec\n ) as Promise<ShortCodesGetUSProgramBriefAttachmentResponse>;\n }\n );\n }\n\n /**\n * Deletes a specific attachment from a US Program Brief.\n * @param programBriefId Program Brief Id. Must be a valid GUID\n * @param attachmentId Attachment Id. Must be a valid GUID\n * @param options The options parameters.\n */\n async deleteUSProgramBriefAttachment(\n programBriefId: string,\n attachmentId: string,\n options?: ShortCodesDeleteUSProgramBriefAttachmentOptionalParams\n ): Promise<void> {\n return tracingClient.withSpan(\n \"ShortCodesClient.deleteUSProgramBriefAttachment\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { programBriefId, attachmentId, options },\n deleteUSProgramBriefAttachmentOperationSpec\n ) as Promise<void>;\n }\n );\n }\n\n /**\n * Gets the list of attachments from a US Program Brief.\n * @param programBriefId\n * @param options The options parameters.\n */\n private async _getUSProgramBriefAttachments(\n programBriefId: string,\n options?: ShortCodesGetUSProgramBriefAttachmentsOptionalParams\n ): Promise<ShortCodesGetUSProgramBriefAttachmentsResponse> {\n return tracingClient.withSpan(\n \"ShortCodesClient._getUSProgramBriefAttachments\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { programBriefId, options },\n getUSProgramBriefAttachmentsOperationSpec\n ) as Promise<ShortCodesGetUSProgramBriefAttachmentsResponse>;\n }\n );\n }\n\n /**\n * GetShortCodesNext\n * @param nextLink The nextLink from the previous successful call to the GetShortCodes method.\n * @param options The options parameters.\n */\n private async _getShortCodesNext(\n nextLink: string,\n options?: ShortCodesGetShortCodesNextOptionalParams\n ): Promise<ShortCodesGetShortCodesNextResponse> {\n return tracingClient.withSpan(\n \"ShortCodesClient._getShortCodesNext\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { nextLink, options },\n getShortCodesNextOperationSpec\n ) as Promise<ShortCodesGetShortCodesNextResponse>;\n }\n );\n }\n\n /**\n * GetUSProgramBriefsNext\n * @param nextLink The nextLink from the previous successful call to the GetUSProgramBriefs method.\n * @param options The options parameters.\n */\n private async _getUSProgramBriefsNext(\n nextLink: string,\n options?: ShortCodesGetUSProgramBriefsNextOptionalParams\n ): Promise<ShortCodesGetUSProgramBriefsNextResponse> {\n return tracingClient.withSpan(\n \"ShortCodesClient._getUSProgramBriefsNext\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { nextLink, options },\n getUSProgramBriefsNextOperationSpec\n ) as Promise<ShortCodesGetUSProgramBriefsNextResponse>;\n }\n );\n }\n\n /**\n * GetUSProgramBriefAttachmentsNext\n * @param programBriefId\n * @param nextLink The nextLink from the previous successful call to the GetUSProgramBriefAttachments\n * method.\n * @param options The options parameters.\n */\n private async _getUSProgramBriefAttachmentsNext(\n programBriefId: string,\n nextLink: string,\n options?: ShortCodesGetUSProgramBriefAttachmentsNextOptionalParams\n ): Promise<ShortCodesGetUSProgramBriefAttachmentsNextResponse> {\n return tracingClient.withSpan(\n \"ShortCodesClient._getUSProgramBriefAttachmentsNext\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { programBriefId, nextLink, options },\n getUSProgramBriefAttachmentsNextOperationSpec\n ) as Promise<ShortCodesGetUSProgramBriefAttachmentsNextResponse>;\n }\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getShortCodesOperationSpec: coreClient.OperationSpec = {\n path: \"/shortCodes\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ShortCodes\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse\n }\n },\n queryParameters: [Parameters.skip, Parameters.top, Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst upsertUSProgramBriefOperationSpec: coreClient.OperationSpec = {\n path: \"/shortCodes/countries/US/programBriefs/{programBriefId}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.USProgramBrief\n },\n 201: {\n bodyMapper: Mappers.USProgramBrief\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse\n }\n },\n requestBody: Parameters.body,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.programBriefId],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst deleteUSProgramBriefOperationSpec: coreClient.OperationSpec = {\n path: \"/shortCodes/countries/US/programBriefs/{programBriefId}\",\n httpMethod: \"DELETE\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.programBriefId],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getUSProgramBriefOperationSpec: coreClient.OperationSpec = {\n path: \"/shortCodes/countries/US/programBriefs/{programBriefId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.USProgramBrief\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.programBriefId],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst submitUSProgramBriefOperationSpec: coreClient.OperationSpec = {\n path: \"/shortCodes/countries/US/programBriefs/{programBriefId}/:submit\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.USProgramBrief\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.programBriefId],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getUSProgramBriefsOperationSpec: coreClient.OperationSpec = {\n path: \"/shortCodes/countries/US/programBriefs\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.USProgramBriefs\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse\n }\n },\n queryParameters: [Parameters.skip, Parameters.top, Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst createOrReplaceUSProgramBriefAttachmentOperationSpec: coreClient.OperationSpec = {\n path:\n \"/shortCodes/countries/US/programBriefs/{programBriefId}/attachments/{attachmentId}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.ProgramBriefAttachment\n },\n 201: {\n bodyMapper: Mappers.ProgramBriefAttachment\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse\n }\n },\n requestBody: {\n parameterPath: {\n id: [\"id\"],\n type: [\"type\"],\n fileName: [\"fileName\"],\n fileSizeInBytes: [\"options\", \"fileSizeInBytes\"],\n fileType: [\"fileType\"],\n fileContentBase64: [\"fileContentBase64\"]\n },\n mapper: { ...Mappers.ProgramBriefAttachment, required: true }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.endpoint,\n Parameters.programBriefId,\n Parameters.attachmentId\n ],\n headerParameters: [Parameters.accept, Parameters.contentType1],\n mediaType: \"json\",\n serializer\n};\nconst getUSProgramBriefAttachmentOperationSpec: coreClient.OperationSpec = {\n path:\n \"/shortCodes/countries/US/programBriefs/{programBriefId}/attachments/{attachmentId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ProgramBriefAttachment\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.endpoint,\n Parameters.programBriefId,\n Parameters.attachmentId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst deleteUSProgramBriefAttachmentOperationSpec: coreClient.OperationSpec = {\n path:\n \"/shortCodes/countries/US/programBriefs/{programBriefId}/attachments/{attachmentId}\",\n httpMethod: \"DELETE\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.endpoint,\n Parameters.programBriefId,\n Parameters.attachmentId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getUSProgramBriefAttachmentsOperationSpec: coreClient.OperationSpec = {\n path: \"/shortCodes/countries/US/programBriefs/{programBriefId}/attachments\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ProgramBriefAttachments\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse\n }\n },\n queryParameters: [Parameters.skip, Parameters.top, Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.programBriefId],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getShortCodesNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ShortCodes\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse\n }\n },\n queryParameters: [Parameters.skip, Parameters.top, Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.nextLink],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getUSProgramBriefsNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.USProgramBriefs\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse\n }\n },\n queryParameters: [Parameters.skip, Parameters.top, Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.nextLink],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getUSProgramBriefAttachmentsNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ProgramBriefAttachments\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse\n }\n },\n queryParameters: [Parameters.skip, Parameters.top, Parameters.apiVersion],\n urlParameters: [\n Parameters.endpoint,\n Parameters.programBriefId,\n Parameters.nextLink\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
export * from "./shortCodesOperations";
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/generated/src/operationsInterfaces/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,wBAAwB,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nexport * from \"./shortCodesOperations\";\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=shortCodesOperations.js.map
|