Skip to content

Commit 9626bb9

Browse files
band-swi[bot]DX-Bandwidthckoegel
authored
SWI-6218 Update SDK Based on Recent Spec Changes (#45)
* Generate SDK with OpenAPI Generator Version 7.6.0 * fix tsconfig template * fix potentially undefined Verb `content` and `attributes` * don't use ?? --------- Co-authored-by: DX-Bandwidth <[email protected]> Co-authored-by: ckoegel <[email protected]>
1 parent 82c2ab5 commit 9626bb9

File tree

5 files changed

+8
-10
lines changed

5 files changed

+8
-10
lines changed

bandwidth.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1862,7 +1862,6 @@ components:
18621862
- from
18631863
- text
18641864
- media
1865-
- priority
18661865
messageDeliveredCallback:
18671866
description: Message Delivered Callback
18681867
type: object
@@ -2035,7 +2034,6 @@ components:
20352034
- from
20362035
- text
20372036
- tag
2038-
- priority
20392037
callbackMethodEnum:
20402038
type: string
20412039
nullable: true

custom_templates/tsconfig.mustache

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,5 @@
2323
"dist",
2424
"tests",
2525
"node_modules"
26-
],
27-
"include": ["global.d.ts"]
26+
]
2827
}

models/bxml/Verb.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import { XMLBuilder, XMLWriterOptions } from 'xmlbuilder2/lib/interfaces';
88
*/
99
export class Verb {
1010
name: string;
11-
content: string;
12-
attributes: object;
11+
content: string | undefined;
12+
attributes: object | undefined;
1313

1414
/**
1515
* Creates an instance of Verb
@@ -19,15 +19,16 @@ export class Verb {
1919
*/
2020
constructor(name: string, content?: string, attributes?: object) {
2121
this.name = name;
22-
this.attributes = attributes;
2322
this.content = content;
23+
this.attributes = attributes;
2424
}
2525

2626
/**
2727
* Generate an XML element for the verb
2828
*/
2929
generateXml(): XMLBuilder {
30-
const xml = create().ele(this.name, this.attributes).txt(this.content);
30+
const xml = create().ele(this.name, this.attributes);
31+
if (this.content) { xml.txt(this.content); }
3132
return xml;
3233
}
3334

models/message-failed-callback-message.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export interface MessageFailedCallbackMessage {
9797
* @type {PriorityEnum}
9898
* @memberof MessageFailedCallbackMessage
9999
*/
100-
'priority': PriorityEnum;
100+
'priority'?: PriorityEnum;
101101
}
102102

103103

models/message-sending-callback-message.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export interface MessageSendingCallbackMessage {
9797
* @type {PriorityEnum}
9898
* @memberof MessageSendingCallbackMessage
9999
*/
100-
'priority': PriorityEnum;
100+
'priority'?: PriorityEnum;
101101
}
102102

103103

0 commit comments

Comments
 (0)